You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So creating stages with python and giving them names. There are two methods as I see it
import maya.cmds as cmds
import mayaUsd
#method one
createStage = cmds.createNode('mayaUsdProxyShape', name='stageShape1')
stageShape = cmds.ls(createStage, long=True)[0]
stage = mayaUsd.ufe.getStage(stageShape)
#method two
stageShape = mayaUsd.ufe.createStageWithNewLayer("|world")
stage = mayaUsd.ufe.getStage(stageShape)
With the above you can see that using createNode() you can easily add in a name. But you can also see that it would have been really easy to insert a name in method two aka mayaUsd.ufe.createStageWithNewLayer("|world", "myname")
Using mayaUsd.ufe now becomes cumbersome in code and it would be a lot nicer if we could name it directly in the createStageWithNewLayer() method
Below is the steps I have seen that you need to take to name a stage on creation.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
So creating stages with python and giving them names. There are two methods as I see it
With the above you can see that using createNode() you can easily add in a name. But you can also see that it would have been really easy to insert a name in method two aka
mayaUsd.ufe.createStageWithNewLayer("|world", "myname")Using mayaUsd.ufe now becomes cumbersome in code and it would be a lot nicer if we could name it directly in the
createStageWithNewLayer()methodBelow is the steps I have seen that you need to take to name a stage on creation.
Or is there yet another way of doing this?
regards
stefan
Beta Was this translation helpful? Give feedback.
All reactions