Skip to content
Discussion options

You must be logged in to vote

Hi, I just stumbled on this discussion while researching the same topic... Following along the example above (and looking at the test suite), the PrimReader was erroring before completing until I parented the sphere directly:

class LodGroupReader(mayaUsdLib.PrimReader):
    def Read(self, context):
        usdPrim = self._GetArgs().GetUsdPrim()
        print(f'Read {usdPrim.GetName()}')
        sphere = cmds.polySphere(r=7, name=usdPrim.GetName())[0]
        parent = context.GetMayaNode(usdPrim.GetPath().GetParentPath(), True)
        parentDagPath = OpenMaya.MFnDagNode(parent).fullPathName()
        cmds.parent(sphere, parentDagPath)
       # ...

The reader seems to produce the expected …

Replies: 4 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@daniele-niero
Comment options

@ilpoldo
Comment options

Answer selected by daniele-niero
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants