ID 586898 - Cattery Gizmos are not recursively loaded in Terminal mode from /Cattery directories in the plugin path

Follow

Problem summary:
Cattery Gizmos are not recursively loaded in Terminal mode from /Cattery directories in the plugin path

 

This issue does not occur when launching Nuke in GUI mode.

 

Customer reported version:
Nuke 14.1v4

 

Customer reported platform:
N/A

 

Steps to reproduce:
1) Download a Cattery model, such as MODNet, and extract the .zip archive. 

2) Add the following lines of code to the ~/.nuke/init.py file:

import nukenuke.pluginAppendPath('replace/with/path/to/the/folder/containing/cattery')

3) Launch Nuke in Terminal mode with the -t or -ti flags.
4) Enter the following command:

nuke.createNode("MODNet.gizmo")

5) Observe the error message: RuntimeError: MODNet.gizmo: Unknown command

 

Expected behavior:
Loading a Cattery Gizmo in Terminal mode should not fail when it can be loaded successfully in GUI mode.

 

Actual behavior:
When using nuke.pluginAddPath() or nuke.pluginAppendPath(), the cattery Python module does not recursively search for the files within the nuke.pluginPath.

For example, if a Cattery Gizmo is located at /User/workspace/models/cattery/modnet/modnet.gizmo and /User/workspace/models is added to the plugin path in the ~/.nuke/init.py, the cattery module will not load the models in Terminal mode.

 

Workaround:
To work around this issue, please add the specific path of each Cattery folder to Nuke's plugin path, like with the following code or similar:

import nukefrom pathlib import Pathcattery_path = Path('path/to/cattery/gizmos')nuke.pluginAppendPath(str(cattery_path.absolute().parent))for gizmo in cattery_path.glob('*/*.gizmo'):    nuke.pluginAppendPath(str(gizmo.parent))

 

Reproduced by Development team in:

Nuke 15.0v1 on all platforms

Nuke 14.1v1 on all platforms

Nuke 14.0v6 on all platforms

 

Earliest version tested:
Nuke 14.0v6 - A related issue existed before this version, and this problem appears to be in all tested versions of the product since it was resolved.

    We're sorry to hear that

    Please tell us why