original_docstring:  Converts a vox node to USD.
  
          Recursively traverses the vox data to convert all of the vox nodes. The vox transform
          nodes apply their data to their child group and shape nodes in order to reduce prim count.
          This function takes a stage in order to be reused for both mesh and points payloads.
  
          Args:
              stage (Usd.Stage): The payload stage to populate the data in.
              node: The node to convert.
              parent_prim: The prim to treat as the parent of the current node.
              voxel_convert_func: The function used to convert VoxShape nodes.
          
docstring: Converts a vox node to USD.
  Recursively traverses the vox data to convert all of the vox nodes. The vox transform
  nodes apply their data to their child group and shape nodes in order to reduce prim count.
  This function takes a stage in order to be reused for both mesh and points payloads.
docstring_tokens: Converts a vox node to USD . Recursively traverses the vox data to convert all of the vox nodes . The vox transform nodes apply their data to their child group and shape nodes in order to reduce prim count . This function takes a stage in order to be reused for both mesh and points payloads .
code: def _convert_node(self, stage, node, parent_prim, voxel_convert_func):
          """ Converts a vox node to USD.
  
          Recursively traverses the vox data to convert all of the vox nodes. The vox transform
          nodes apply their data to their child group and shape nodes in order to reduce prim count.
          This function takes a stage in order to be reused for both mesh and points payloads.
  
          Args:
              stage (Usd.Stage): The payload stage to populate the data in.
              node: The node to convert.
              parent_prim: The prim to treat as the parent of the current node.
              voxel_convert_func: The function used to convert VoxShape nodes.
          """
          if isinstance(node, VoxTransform):
              xform_child = node.get_child()
              if isinstance(xform_child, VoxGroup):
                  xform_path = parent_prim.GetPath().AppendPath("VoxelGroup_{}".format(xform_child.node_id))
                  xform = UsdGeom.Xform.Define(stage, xform_path)
                  xform.AddTransformOp().Set(Gf.Matrix4d(*node.transform))
                  for child in xform_child.children:
                      self._convert_node(stage, child, xform, voxel_convert_func)
              elif isinstance(xform_child, VoxShape):
                  voxel_convert_func(stage, node, xform_child, parent_prim)
          else:
              raise RuntimeError("Expected VoxTransform node. Got {}.".format(node.__class__))
code_tokens: def _convert_node ( self , stage , node , parent_prim , voxel_convert_func ) : if isinstance ( node , VoxTransform ) : xform_child = node . get_child ( ) if isinstance ( xform_child , VoxGroup ) : xform_path = parent_prim . GetPath ( ) . AppendPath ( "VoxelGroup_{}" . format ( xform_child . node_id ) ) xform = UsdGeom . Xform . Define ( stage , xform_path ) xform . AddTransformOp ( ) . Set ( Gf . Matrix4d ( * node . transform ) ) for child in xform_child . children : self . _convert_node ( stage , child , xform , voxel_convert_func ) elif isinstance ( xform_child , VoxShape ) : voxel_convert_func ( stage , node , xform_child , parent_prim ) else : raise RuntimeError ( "Expected VoxTransform node. Got {}." . format ( node . __class__ ) )
short_docstring: Converts a vox node to USD.
short_docstring_tokens: Converts a vox node to USD .
comment: """ Converts a vox node to USD.
  
          Recursively traverses the vox data to convert all of the vox nodes. The vox transform
          nodes apply their data to their child group and shape nodes in order to reduce prim count.
          This function takes a stage in order to be reused for both mesh and points payloads.
  
          Args:
              stage (Usd.Stage): The payload stage to populate the data in.
              node: The node to convert.
              parent_prim: The prim to treat as the parent of the current node.
              voxel_convert_func: The function used to convert VoxShape nodes.
          """