def version_creator(logging_level=logging.WARNING): """Helper function for version_creator UI for MotionBuilder """ # connect to db from anima.utils import do_db_setup do_db_setup() # set Qt library set_qt_lib() from anima.ui import version_creator from anima.env import motion_builder mb = motion_builder.MotionBuilder() logger.setLevel(logging_level) version_creator.UI(environment=mb)
def create_shots(self): """creates shots """ clip_data = [] from anima.env.motion_builder import ClipData for clip_field in self.clip_fields: assert isinstance(clip_field, ClipFieldGrp) shot_name = clip_field.shot_name_field.text() fbx_path = clip_field.fbx_file_field.text() video_path = clip_field.video_file_field.text() cut_in = clip_field.cut_in_field.value() cut_out = clip_field.cut_out_field.value() fps = clip_field.fps_field.value() clip_data.append( ClipData(shot_name, fbx_path, video_path, cut_in, cut_out, fps)) from anima.env import motion_builder mb = motion_builder.MotionBuilder() mb.create_story(clip_data)