def playblast_shot(submit=True): logger = logging.getLogger(__name__) valid_camera = get_valid_camera.get_valid_camera() if not valid_camera: raise Exception("No valid camera found.") frame_range = get_frame_range.get_frame_range() context = pipeFile.PathDetails.parse_path() current_project = context.project resolution = Project(current_project).resolution percent = Project(current_project).playblast_percent set_image_size.set_image_size(*resolution) local_video_path = context.local_video_path video_path = context.work_video_path create_parent_dir.create_parent_dir(local_video_path) playblaster.playblaster(local_video_path, valid_camera, frame_range[0], frame_range[1], resolution, percent, open_it=True) logger.info("Playblast to %s" % local_video_path) # backup video path if submit: Copy.copy(local_video_path, video_path) logger.info("Copy %s >> %s" % (local_video_path, video_path)) return video_path else: return local_video_path
def main(file_name, local): logger = logging.getLogger("LgtLay start") new_file.new_file() context = pipeFile.PathDetails.parse_path(file_name) save_as.save_as(file_name) # create Light group import_lights(context) logger.info("Import light done.") # AR set rebuild_scene() logger.info("Rebuild scene done.") # switch to midmdl assemb = Assembly.Assembly() assemb.set_active("MidMdl") # get the AnimLay cache abc_files = get_cache_files(context) if abc_files: for abc_file in abc_files: if abc_file.endswith("env.abc"): continue namespace = os.path.splitext(os.path.basename(abc_file))[0] create_reference.create_reference(abc_file, namespace) logger.info("Reference cache done.") # fix frame range fix_frame_range.fix_frame_range(context) logger.info("Fix frame range done.") # set resolution resolution = Project(context.project).resolution set_image_size.set_image_size(*resolution) save_as.save_as(file_name) logger.info("%s publish successful!" % file_name) if not local: quit_maya.quit_maya()
def playblast_turntable(submit=True): logger = logging.getLogger(__name__) # get path obj = pipeFile.PathDetails.parse_path() local_video_path = obj.local_video_path work_video_path = obj.work_video_path current_project = obj.project # playblast model_name = get_model_name.get_model_name() resolution = Project(current_project).resolution percent = Project(current_project).playblast_percent set_image_size.set_image_size(*resolution) mc.select(model_name, r=1) create_turntable.create_turntable() create_parent_dir.create_parent_dir(local_video_path) playblaster.playblaster(local_video_path, "tt_camera", 1, 120, resolution, percent, False, None, True) remove_turntable.remove_turntable() logger.info("playblast done.") mc.lookThru("persp") if submit: Copy.copy(local_video_path, work_video_path) logger.info("Copy %s >> %s" % (local_video_path, work_video_path)) return work_video_path else: return local_video_path
def __init__(self): self.logger = logging.getLogger("Playblast Lay") self.obj = pipeFile.PathDetails.parse_path() self.current_project = self.obj.project self.resolution = Project(self.current_project).resolution set_image_size.set_image_size(*self.resolution) self.percent = Project(self.current_project).playblast_percent self.local_dir = Project(self.current_project).local_root_dir
def main(file_name, local): logger = logging.getLogger("Lgt start") load_plugin.load_plugin("AbcImport.mll") load_plugin.load_plugin("MayaExocortexAlembic.mll") new_file.new_file() context = pipeFile.PathDetails.parse_path(file_name) save_as.save_as(file_name) # create Light group import_lights(context) logger.info("Import light done.") # rebuild scene rebuild_scene() logger.info("Rebuild scene done.") # edit shd edit_shd(context) logger.info("Edit shd done.") # rebuild asset rebuild_asset(context) logger.info("Rebuild asset done.") # transfer attribute transfer_attribute.transfer_attribute() logger.info("Transfer attribute done.") # break visibility connections break_visibility_connections.break_visibility_connections() # reference camera reference_in_camera(context) # group assets group_assets() group_camera(file_name) # # assembly switch to shd # assembly = Assembly.Assembly() # assembly.set_active("Shd") # fix frame range fix_frame_range.fix_frame_range(context) logger.info("Fix frame range done.") # set resolution resolution = Project(context.project).resolution set_image_size.set_image_size(*resolution) save_as.save_as(file_name) logger.info("Publish done.") if not local: quit_maya.quit_maya()