Prevent mochapro commandline following symlinks

I’m on Mocha Pro 2020 Version 7.0.4, in linux
When I run
mochapro <some .exr seq>
and some of the files in the seq are actually symlinks, as mocha opens and presents options for loading the filesequence, it seems to be following the symlink rather than using the path I gave it.
This doesn’t work for me, as my exr sequence is physically spread across multiple folders/areas.
Is there a way to prevent it from following the symlink?
Further than this, where can I find documentation on mochas cli? Can a --help be added in future?

What is the bit depth for the EXR files?

I’m going to tag @martinb for the python.

16 bit half float

You can find the documentation for the command-line interface in the Command Line section of the Mocha User Guide:

The arguments have limited scope, however.

I’ll need to check with the dev team on the symlink situation though as that’s not a situation I’ve experienced before. I’ll get back to you.

Essentially, the way the sequence reading system works is you feed it an image, and then Mocha scans the folder based on the image you selected.
If you want to avoid following a symlink, select an image in the folder that doesn’t contain a symlink, then it will load the sequence from the correct folder.

As described by our head engineer:

… if the chosen file is a symlink and resides in FolderX, mocha will only load the files in Folder X.
For example, if /FolderA/image000.exr is a symink to /FolderX/image000.exr , then:
mocha /FolderA/image000.exr will only load the images in /FolderX .

Can a commandline option to not do this be provided in future?
Unfortunately our backend is set up so that in most cases we will not have a non-symlinked file available.

We can look into it. Because we read the list of files based on the selected image, it might take some reworking to search based on the current folder, as you’re sourcing from more than one place.

You could use the Mocha Python API to augment the pipeline to load the images into a new project, but it’s very likely our Python clip object uses the same process to load sequences.

I’ll write a feature request and chat with the team about the best practice here.

For example, how do you handle it in your main compositor? Are these symlinks being generated via the Nuke Studio shot templates, or is it a different approach?

The symlinks are generated as part of our rendering process, we write to different areas and present the symlinks in one folder to appear as a continuous filesequence. Nuke doesn’t seem to have a problem with this approach, it’s essentially ignorant that they’re symlinks at all.

Mocha actually does work with the symlinks as well, as long as we choose the sequence manually from the Import clip section of the new project dialog box - it’s just when we try to open mocha from the commandline passing the sequence (of symlinks) as an argument, mocha’s new project dialog instead ends up being the target of the symlinks.

This will be fixed in the impending V9.5.2 (2022.5) point release.

Thanks So much!

@kshepherd The new builds are up with the changes. Let us know if this helps: