parameters: (self, stagePath, defcamName='usdviewCam',
                        imgWidth=None, imgHeight=None)
docstring: Export the free camera (if currently active) and session layer to a
          USD file at the specified stagePath that references the current-viewed
          stage.
docstring_summary: Export the free camera (if currently active) and session layer to a
          USD file at the specified stagePath that references the current-viewed
          stage.
docstring_tokens: Export the free camera ( if currently active ) and session layer to a USD file at the specified stagePath that references the current - viewed stage .
function: def ExportSession(self, stagePath, defcamName='usdviewCam',
                        imgWidth=None, imgHeight=None):
          '''
          Export the free camera (if currently active) and session layer to a
          USD file at the specified stagePath that references the current-viewed
          stage.
          '''
  
          tmpStage = Usd.Stage.CreateNew(stagePath)
          if self._dataModel.stage:
              tmpStage.GetRootLayer().TransferContent(
                  self._dataModel.stage.GetSessionLayer())
  
          if not self.cameraPrim:
              # Export the free camera if it's the currently-visible camera
              self.ExportFreeCameraToStage(tmpStage, defcamName, imgWidth,
                  imgHeight)
  
          tmpStage.GetRootLayer().Save()
          del tmpStage
  
          # Reopen just the tmp layer, to sublayer in the pose cache without
          # incurring Usd composition cost.
          if self._dataModel.stage:
              from pxr import Sdf
              sdfLayer = Sdf.Layer.FindOrOpen(stagePath)
              sdfLayer.subLayerPaths.append(
                  os.path.abspath(
                      self._dataModel.stage.GetRootLayer().realPath))
              sdfLayer.Save()
function_tokens: def ExportSession ( self , stagePath , defcamName = 'usdviewCam' , imgWidth = None , imgHeight = None ) : tmpStage = Usd . Stage . CreateNew ( stagePath ) if self . _dataModel . stage : tmpStage . GetRootLayer ( ) . TransferContent ( self . _dataModel . stage . GetSessionLayer ( ) ) if not self . cameraPrim : # Export the free camera if it's the currently-visible camera self . ExportFreeCameraToStage ( tmpStage , defcamName , imgWidth , imgHeight ) tmpStage . GetRootLayer ( ) . Save ( ) del tmpStage # Reopen just the tmp layer, to sublayer in the pose cache without # incurring Usd composition cost. if self . _dataModel . stage : from pxr import Sdf sdfLayer = Sdf . Layer . FindOrOpen ( stagePath ) sdfLayer . subLayerPaths . append ( os . path . abspath ( self . _dataModel . stage . GetRootLayer ( ) . realPath ) ) sdfLayer . Save ( )