Lock the shape after creating to avoid deletion.

This commit is contained in:
DMO 2022-03-25 18:07:28 +09:00
parent 5adf396610
commit deedc893bf

View file

@ -47,6 +47,9 @@ class MultiverseUsdLoader(load.LoaderPlugin):
transform = cmds.listRelatives(
shape, parent=True, fullPath=True)[0]
# Lock the shape node so the user cannot delete it.
cmds.lockNode(shape, lock=True)
nodes = [transform, shape]
self[:] = nodes