示例#1
0
文件: previs.py 项目: eoyilmaz/anima
    def set_sequencer_name(self):
        """set sequencer name for publish
        """
        from anima.exc import PublishError
        import anima.env.mayaEnv.publish as oy_publish

        try:
            oy_publish.check_sequence_name()
            oy_publish.check_sequence_name_format()
        except:
            seq_name = None
            if self.current_type == self.prev_type:
                seq_name = '_'.join(self.current_version.nice_name.split('_Previs')[0].split('_')[-3:]).upper()
            if self.current_type == self.anim_type:
                seq_name = '_'.join(self.current_version.nice_name.split('_')[:3]).upper()
            self.sequencer.set_sequence_name(seq_name)

            message = 'Scene Task name is Wrong.\n'
            # message += '%s\n' % seq_name
            message += '\n'
            message += 'Enter Seq Name Manually below like:\n'
            message += 'EP001_001_TEMP  or SEQ001_001_TEMP\n'
            message += '<Episode Num>_<Scene Num>_<Env>'
            pd = pm.promptDialog(title='Error', message=message, button='SET Seq Name')

            if pd == 'SET Seq Name':
                seq_name = pm.promptDialog(q=1, text=1)
                self.sequencer.set_sequence_name(seq_name)

            try:
                oy_publish.check_sequence_name_format()
            except PublishError as e:
                raise RuntimeError(e)
示例#2
0
    def set_sequencer_name(self):
        """set sequencer name for publish
        """
        from anima.exc import PublishError
        import anima.env.mayaEnv.publish as oy_publish

        try:
            oy_publish.check_sequence_name()
            oy_publish.check_sequence_name_format()
        except:
            oy_publish.check_sequence_name___fix()
示例#3
0
    def pre_publish_previs(self):
        """checks if all necessities are met for exporting previs to animation shots
        """
        if not pm.ls(type='shot'):
            message = 'No Shots exist in this scene.\r\n'
            message += '\r'
            pm.confirmDialog(title='Error', message=message, button='OK')
            raise RuntimeError('Non-Existing Shots.')

        self.set_sequencer_name()
        self.set_range_from_seq()

        self.check_camera_assignment()
        self.check_shot_attributes()
        self.check_wrong_shot_names()
        self.check_unique_shot_names()
        self.check_shot_seq_ranges()
        self.check_shot_overlapping()
        self.check_shot_order()
        self.check_shot_gaps()
        self.check_stalker_tasks()

        # from anima.publish import run_publishers
        # run_publishers('previs') # DetachedInstanceError: attribute refresh operation cannot proceed

        import anima.env.mayaEnv.publish as oy_publish

        oy_publish.check_sequencer()
        oy_publish.check_shot_nodes()
        oy_publish.check_sequence_name()
        oy_publish.check_sequence_name_format()
        oy_publish.check_shot_name_format()
        oy_publish.check_unique_shot_names()
        oy_publish.check_frame_range_selection()

        message = 'Publish Check SUCCESSFUL.\r\n'
        message += '\r'
        ok = pm.confirmDialog(title='Info',
                              message=message,
                              button='OK, Continue')
        if ok == 'OK, Continue':
            pass
示例#4
0
文件: previs.py 项目: eoyilmaz/anima
    def pre_publish_previs(self):
        """checks if all necessities are met for exporting previs to animation shots
        """
        if not pm.ls(type='shot'):
            message = 'No Shots exist in this scene.\r\n'
            message += '\r'
            pm.confirmDialog(title='Error', message=message, button='OK')
            raise RuntimeError('Non-Existing Shots.')

        self.set_sequencer_name()
        self.set_range_from_seq()

        self.check_camera_assignment()
        self.check_shot_attributes()
        self.check_wrong_shot_names()
        self.check_unique_shot_names()
        self.check_shot_seq_ranges()
        self.check_shot_overlapping()
        self.check_shot_order()
        self.check_shot_gaps()
        self.check_stalker_tasks()

        # from anima.publish import run_publishers
        # run_publishers('previs') # DetachedInstanceError: attribute refresh operation cannot proceed

        import anima.env.mayaEnv.publish as oy_publish

        oy_publish.check_sequencer()
        oy_publish.check_shot_nodes()
        oy_publish.check_sequence_name()
        oy_publish.check_sequence_name_format()
        oy_publish.check_shot_name_format()
        oy_publish.check_unique_shot_names()
        oy_publish.check_frame_range_selection()

        message = 'Publish Check SUCCESSFUL.\r\n'
        message += '\r'
        ok = pm.confirmDialog(title='Info', message=message, button='OK, Continue')
        if ok == 'OK, Continue':
            pass
示例#5
0
    def set_sequencer_name(self):
        """set sequencer name for publish
        """
        from anima.exc import PublishError
        import anima.env.mayaEnv.publish as oy_publish

        try:
            oy_publish.check_sequence_name()
            oy_publish.check_sequence_name_format()
        except:
            seq_name = None
            if self.current_type == self.prev_type:
                seq_name = '_'.join(
                    self.current_version.nice_name.split('_Previs')[0].split(
                        '_')[-3:]).upper()
            if self.current_type == self.anim_type:
                seq_name = '_'.join(
                    self.current_version.nice_name.split('_')[:3]).upper()
            self.sequencer.set_sequence_name(seq_name)

            message = 'Scene Task name is Wrong.\n'
            # message += '%s\n' % seq_name
            message += '\n'
            message += 'Enter Seq Name Manually below like:\n'
            message += 'EP001_001_TEMP  or SEQ001_001_TEMP\n'
            message += '<Episode Num>_<Scene Num>_<Env>'
            pd = pm.promptDialog(title='Error',
                                 message=message,
                                 button='SET Seq Name')

            if pd == 'SET Seq Name':
                seq_name = pm.promptDialog(q=1, text=1)
                self.sequencer.set_sequence_name(seq_name)

            try:
                oy_publish.check_sequence_name_format()
            except PublishError as e:
                raise RuntimeError(e)