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
Hello, I was wondering if there is a way to open a stage in Maya with a population mask.
Right now I can't seem to see how one would do it.
I should clarify that this is not just for stage display as the "mayaUsdProxyShape" allows for solo/exclusive prim paths to be taken into account for display on the viewport, this is not what I'm looking for (unless I'm wrong on how that feature works). I'm looking for a way to reduce the load/overhead of the stage.
I know I can set the population mask after the "mayaUsdProxyShape" node is created and pointing to the layer I want to mask but I was hoping to be able to do it before I take the hit to load time.
I thought maybe if I opened the layer via the pxr API and then creating the "mayaUsdProxyShape" node to point to the same layer it would work but no luck.
For anyone interested in how it was tested:
frompxrimportUsd, Sdftest_shot_path="/PATH/TO/LAYER/shot.usda"test_prim_list= ["/world/prp/prp_bench01t_0001", "/world/prp/prp_axe_0001", "/world/prp/prp_accordion_0001", "/world/chr/chr_jon_0001"]
population_mask=Usd.StagePopulationMask()
# Add each test prim to the population maskforprimintest_prim_list:
population_mask.Add(Sdf.Path(prim))
# Open shot with maskshot_stage=Usd.Stage.OpenMasked(test_shot_path, population_mask)
# Create the "mayaUsdProxyShape" and point it to the root layer of the stage with the maskmaya_stage_node=cmds.createNode('mayaUsdProxyShape', name='shot_{0}_{1}Shape'.format("000992", "0010"), skipSelect=True)
cmds.connectAttr('time1.outTime', 'shot_{0}_{1}.time'.format("000992", "0010"))
cmds.setAttr('{0}.filePath'.format(maya_stage_node), shot_stage.GetRootLayer().identifier, type='string')
The goal is to provide an artist more granular control on what they are going to load into their scene on top of using things like payloads.
Masks are great and if I simply apply it after the stage is loaded via the "mayaUsdProxyShape" it will work but we've already had to take the loss in load time.
If this is not currently possible I'm happy to make an issue adding the feature.
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
-
Hello, I was wondering if there is a way to open a stage in Maya with a population mask.
Right now I can't seem to see how one would do it.
I should clarify that this is not just for stage display as the "mayaUsdProxyShape" allows for solo/exclusive prim paths to be taken into account for display on the viewport, this is not what I'm looking for (unless I'm wrong on how that feature works). I'm looking for a way to reduce the load/overhead of the stage.
I know I can set the population mask after the "mayaUsdProxyShape" node is created and pointing to the layer I want to mask but I was hoping to be able to do it before I take the hit to load time.
Example via the pxr API:
I thought maybe if I opened the layer via the pxr API and then creating the "mayaUsdProxyShape" node to point to the same layer it would work but no luck.
For anyone interested in how it was tested:
The goal is to provide an artist more granular control on what they are going to load into their scene on top of using things like payloads.
Masks are great and if I simply apply it after the stage is loaded via the "mayaUsdProxyShape" it will work but we've already had to take the loss in load time.
If this is not currently possible I'm happy to make an issue adding the feature.
Cheers,
Jason Coelho
Beta Was this translation helpful? Give feedback.
All reactions