Well, no answer... perhaps I'll need to give a more practical use case.
For example, I'd like to create an Edit SOP, get into its state, and automatically set
updatenmlsparm:
import soptoolutils
node = soptoolutils.customStateTool(kwargs, 'edit')
node.parm("updatenmls").set(False)
However, it doesn't work!
nodeis
Nonehere. It makes sense because the Edit SOP node is only created after the user exits the custom state. But how could I run
node.parm("updatenmls").set(False)after it's created?
Edit:I've noticed that for generic tool (non-custom state tool), I can set parms like this:
kwargs['parms'] = {
'updatenmls': False,
'xformspace': 1,
}
node = soptoolutils.genericTool(kwargs, 'edit', isreusable=True)
This solves the above particular use case, but I still don't know how to "do something after the user exits a custom state" in general.