parameters: (self, file_path, scene_path, bound_prims=None, time=None,
                       texture_dir='', texture_file_prefix='', shader='UsdPreviewSurface')
return_statement: return writer(stage, scene_path, bound_prims, time, texture_dir, texture_file_prefix)
docstring: r"""Write material to USD.
          Textures will be written to disk in with filename in the form:
          `{usd_file_path}/{texture_dir}/{texture_file_prefix}{attr}.png` where `attr` is one of
          [`diffuse`, `roughness`, `metallic`, `specular`, `normals`].
  
          Args:
              file_path (str): Path to usd file (\*.usd, \*.usda).
              scene_path (str): Absolute path of material within the USD file scene. Must be a valid ``Sdf.Path``.
              bound_prims (list of Usd.Prim, optional): If provided, bind material to each prim.
              time (convertible to float, optional): Positive integer defining the time at which the supplied parameters
                  correspond to.
              texture_dir (str, optional): Subdirectory to store texture files. If not provided, texture files will be
                  saved in the same directory as the USD file specified by `file_path`.
              texture_file_prefix (str, optional): String to be prepended to the filename of each texture file.
              shader (str, optional): Name of shader to write. If not provided, use UsdPreviewSurface.
docstring_summary: r"""Write material to USD.
          Textures will be written to disk in with filename in the form:
          `{usd_file_path}/{texture_dir}/{texture_file_prefix}{attr}.png` where `attr` is one of
          [`diffuse`, `roughness`, `metallic`, `specular`, `normals`].
docstring_tokens: r Write material to USD . Textures will be written to disk in with filename in the form : { usd_file_path } / { texture_dir } / { texture_file_prefix } { attr } . png where attr is one of [ diffuse roughness metallic specular normals ] .
function: def write_to_usd(self, file_path, scene_path, bound_prims=None, time=None,
                       texture_dir='', texture_file_prefix='', shader='UsdPreviewSurface'):
          r"""Write material to USD.
          Textures will be written to disk in with filename in the form:
          `{usd_file_path}/{texture_dir}/{texture_file_prefix}{attr}.png` where `attr` is one of
          [`diffuse`, `roughness`, `metallic`, `specular`, `normals`].
  
          Args:
              file_path (str): Path to usd file (\*.usd, \*.usda).
              scene_path (str): Absolute path of material within the USD file scene. Must be a valid ``Sdf.Path``.
              bound_prims (list of Usd.Prim, optional): If provided, bind material to each prim.
              time (convertible to float, optional): Positive integer defining the time at which the supplied parameters
                  correspond to.
              texture_dir (str, optional): Subdirectory to store texture files. If not provided, texture files will be
                  saved in the same directory as the USD file specified by `file_path`.
              texture_file_prefix (str, optional): String to be prepended to the filename of each texture file.
              shader (str, optional): Name of shader to write. If not provided, use UsdPreviewSurface.
          """
          assert os.path.splitext(file_path)[1] in ['.usd', '.usda'], f'Invalid file path "{file_path}".'
          assert shader in self.shaders, f'Shader {shader} is not support. Choose from {list(self.shaders.keys())}.'
          if os.path.exists(file_path):
              stage = Usd.Stage.Open(file_path)
          else:
              stage = usd.create_stage(file_path)
          if time is None:
              time = Usd.TimeCode.Default()
  
          writer = self.shaders[shader]['writer']
          return writer(stage, scene_path, bound_prims, time, texture_dir, texture_file_prefix)
function_tokens: def write_to_usd ( self , file_path , scene_path , bound_prims = None , time = None , texture_dir = '' , texture_file_prefix = '' , shader = 'UsdPreviewSurface' ) : assert os . path . splitext ( file_path ) [ 1 ] in [ '.usd' , '.usda' ] , f'Invalid file path "{file_path}".' assert shader in self . shaders , f'Shader {shader} is not support. Choose from {list(self.shaders.keys())}.' if os . path . exists ( file_path ) : stage = Usd . Stage . Open ( file_path ) else : stage = usd . create_stage ( file_path ) if time is None : time = Usd . TimeCode . Default ( ) writer = self . shaders [ shader ] [ 'writer' ] return writer ( stage , scene_path , bound_prims , time , texture_dir , texture_file_prefix )