Author Topic: preference dialog error  (Read 11140 times)


Hi there

I am testing the 2.0.1 (build 7098) plugin in M2019.2 on OSX 10.13.6 to make it work better with RenderMan.
Your preference dialog errors on opening with the following stack trace:
Code: [Select]
# Error: file: /Applications/Substance in Maya/2019/scripts/SubstancePluginSettingsWindow.mel line 21: Invalid argument 1, 'Arnold'. Expected arguments of type int
# Traceback (most recent call last):
#   File "<maya console>", line 1, in <module>
#   File "/Applications/Substance in Maya/2019/plug-ins/substance/maya/ui/", line 217, in open_menu
#     _build_workflow_section(module)
#   File "/Applications/Substance in Maya/2019/plug-ins/substance/maya/ui/", line 65, in _build_workflow_section
#     cmds.substanceSetWorkflow(workflow)
#   File "<string>", line 2, in substanceSetWorkflow
# TypeError: Invalid argument 1, 'Arnold'. Expected arguments of type int #

I took the liberty to look at the code in /Applications/Substance in Maya/2019/plug-ins/substance/maya/ui/ and the problems happens here in _build_workflow_section():
Code: [Select]
    for renderer in renderers:
    workflow = cmds.substanceGetWorkflow()

    # Default the workflow to Arnold
    if not workflow in renderers:
        workflow = 'Arnold'

    cmds.optionMenuGrp(CmdSettingsMenu.renderer_menu_group, e=True, value=workflow)

This code assumes that substanceGetWorkflow() returns a str and substanceSetWorkflow() takes a str, but when I check the signature of substanceSetWorkflow() it seems to take an int !
Code: [Select]
help substanceSetWorkflow;
// Result:

Synopsis: substanceSetWorkflow UnsignedInt
No Flags.

Command Type: Command

It looks like something is wrong with my particular setup, although I made sure only the 2.0.1 plugins are loaded and that substanceSetWorkflow actually comes from substancemaya.bundle.

Any idea ? Thanks :-)

Yes, that's a small misconfiguration on the command. Thanks for reporting it, it will be fixed in the next release.
Software Engineer, Integrations
Maya, 3ds Max and Core Libraries


Thanks  :)