def createShotHip(self, fileType): # Get E S from SHOT properties window sequenceNumber = self.ui_shot.com_shotSequence.currentText() shotNumber = self.ui_shot.lin_shotName.text() print '>> Creating {0} E{1}_S{2} shot scene...'.format(fileType, sequenceNumber, shotNumber) # If shot exists in database run scene creation if not dna.checkGenes(sequenceNumber, shotNumber, genesShots): return if dna.createHip(fileType, sequenceNumber=sequenceNumber, shotNumber=shotNumber): dna.buildShotContent(fileType, sequenceNumber, shotNumber, genesShots, genesAssets) print '>> Shot scene created!'
def createScene(self, fileType): ''' Create hip scene and build all content (bring assets and camera) :param fileType: :return: ''' sequenceNumber = self.ui.lin_episode.text() shotNumber = self.ui.lin_shot.text() # If shot exists in database run scene creation if not dna.checkGenes(sequenceNumber, shotNumber, genesShots): return if dna.createHip(fileType, sequenceNumber=sequenceNumber, shotNumber=shotNumber): dna.buildSceneContent(fileType, sequenceNumber, shotNumber, genesShots)
def createAssetHip(self): ''' Create Houdini scenes for asset entities of database. TBD when create hip: - Character: ask if its GEO, RIG or FUR scene - FX: ask if its asset (char, env, prop) or shot (E### S###) FX :return: ''' assets = self.ui.lis_assets.selectedItems() for asset in assets: assetName = asset.text() print '>> Creating {} asset scene...'.format(assetName) # Get asset data assetData = dna.getAssetDataByName(genesAssets, assetName) assetType = assetData['sg_asset_type'] fileType = dna.fileTypes[assetType] # Create HIP file with content if dna.createHip(fileType, assetName=assetName): # CHARACTER if fileType == dna.fileTypes['character']: pass # ENVIRONMENT elif fileType == dna.fileTypes['environment']: # Create ENV asset HDA dna.exportHDA(assetType, assetName, assetName) # FX elif fileType == dna.fileTypes['FX']: # Create ENV asset HDA dna.exportHDA(assetType, assetName, assetName) print '>> Asset scene created!'