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
It can be tricky to visualize exactly what the current edit target is when dealing with variants and e.g. editing nested variants.
Idea
I was thinking of maybe displaying these in a "breadcrumb" like way where one could also click to go up and pop off a variant of the edit target.
Like that image it can also have little drop down entries to "pick" from the current stage what additional targets could be appended to the current mapping, e.g. another variant set.
Here's some quick pseudocode:
frompxrimportUsd, Sdfdefget_edit_target_breadcrumbs(edit_target):
layer=edit_target.GetLayer()
ifnotedit_target.IsValid():
return []
layer_str=layer.GetDisplayName()
mapping=edit_target.GetMapFunction()
ifmapping.isIdentityPathMapping:
return [layer_str]
crumbs= [layer_str]
forsource, targetinmapping.sourceToTargetMap.items():
ifsource==target:
# Nothing special here?continuecrumbs.append(source.pathString)
returncrumbsedit_target=stage.GetEditTarget()
crumbs=get_edit_target_breadcrumbs(edit_target)
print(f"Edit Target: {' > '.join(crumbs)}")
# Targeting e.g. root layer this shows:# Edit Target: look.usda# Targeting the variant set `model` variant `main` on `/root` prim# Edit Target: look.usda > /asset/geo{model=main}# Then appending subtarget look = main# Edit Target: look.usda > /asset/geo{model=main}{look=main}
Which in breadcrumbds could be clickable blocks like:
Issue
It can be tricky to visualize exactly what the current edit target is when dealing with variants and e.g. editing nested variants.
Idea
I was thinking of maybe displaying these in a "breadcrumb" like way where one could also click to go up and pop off a variant of the edit target.
Like that image it can also have little drop down entries to "pick" from the current stage what additional targets could be appended to the current mapping, e.g. another variant set.
Here's some quick pseudocode:
Which in breadcrumbds could be clickable blocks like:
The text was updated successfully, but these errors were encountered: