def get_scene_pipe_ids(self): if not self.standalone: id_data = maya_scene.get_scene_pipe_ids() return id_data script_path = os.path.join(resource.getScriptPath(), 'maya/find_sceneids.py') maya_path = self.environ.get_show_appication_path(self.application) application_module_path = resource.getModuleApplicationsPath() module = common.get_subprocess_code(application_module_path, self.application) id_data, message = module.execute(maya_path, self.source_maya, script_path) return id_data
def get_asset_ids(self): if not self.standalone: id_data = maya_asset.get_pipe_ids() return id_data script_path = os.path.join(resource.getScriptPath(), 'maya/find_pipeids.py') maya_path, valid = self.environ.get_specific_environ_value( 'show_applications', self.application, 'path') application_module_path = resource.getModuleApplicationsPath() module = common.get_subprocess_code(application_module_path, self.application) id_data, message = module.execute(maya_path, self.source_maya, script_path) return id_data
def do_standalone_publish(self, repair=True, **kwargs): application_module_path = resource.getModuleApplicationsPath() module = common.get_subprocess_code(application_module_path, kwargs['application']) if not module: print '#warnings not found subprocess script for %s' % kwargs[ 'application'] return False, 'not found subprocess script' environ = studioEnviron.Environ(self.current_show) application_path, valid = environ.get_specific_environ_value( 'show_applications', kwargs['application'], 'path') script_path = os.path.join(resource.getScriptPath(), 'maya/maya_release.py') kwargs['reapir'] = repair valid, message = module.execute(application_path, kwargs['source'], script_path, **kwargs) return valid, message
from studio_usd_pipe import resource from studio_usd_pipe.core import mayaread inputs = { "description": "aaaaaaaa", "dependency": "None", "source_maya": "/venture/shows/batman/batman_0.0.3.mb", "subfield": "model", "caption": "batman", "tag": "character", "user": "******", "version": "9.0.0", "type": "interactive", "thumbnail": "/venture/shows/batman/my_super_hero.png", "pipe": "assets" } maya = '/venture/shows/batman/batman.ma' script = resource.getScriptPath() + '/maya_release.py' data = mayaread.read(maya, script, **inputs) import json print json.dumps(data, indent=4)