Beispiel #1
0
 def parametrize( self, parametric_hook ):
     """Adds parametric_hook, sets __call__ to call_parametrized."""
     if parametric_hook is None: return
     
     self.parametric_hook = parametric_hook
     insert_as_static_method( self.__class__, '__call__',
                              self.call_parametrized )
Beispiel #2
0
    def __init__(self,
                 filename,
                 watch=False,
                 animate=False,
                 anim_format=None,
                 ffmpeg_options=None,
                 output_dir='.',
                 offscreen=False,
                 auto_screenshot=True):
        Struct.__init__(self,
                        filename=filename,
                        watch=watch,
                        animate=animate,
                        anim_format=anim_format,
                        ffmpeg_options=ffmpeg_options,
                        output_dir=output_dir,
                        offscreen=offscreen,
                        auto_screenshot=auto_screenshot,
                        scene=None,
                        gui=None)
        self.options = get_arguments(omit=['self'])

        if mlab is None:
            output('mlab cannot be imported, check your installation!')
            insert_as_static_method(self.__class__, '__call__',
                                    self.call_empty)
        else:
            insert_as_static_method(self.__class__, '__call__', self.call_mlab)
Beispiel #3
0
 def restore(self):
     """
     Remove parametric_hook, restore __call__() to call_basic().
     """
     self.parametric_hook = None
     insert_as_static_method(self.__class__, '__call__',
                             self.call_basic)
Beispiel #4
0
    def parametrize(self, parametric_hook):
        """
        Add parametric_hook, set __call__() to call_parametrized().
        """
        if parametric_hook is None: return

        self.parametric_hook = parametric_hook
        insert_as_static_method(self.__class__, '__call__',
                                self.call_parametrized)
Beispiel #5
0
    def __init__(self, filename, watch=False, ffmpeg_options=None,
                 output_dir='.', offscreen=False):
        Struct.__init__(self,
                        filename=filename,
                        watch=watch,
                        ffmpeg_options=ffmpeg_options,
                        output_dir=output_dir,
                        offscreen=offscreen,
                        scene=None,
                        gui=None)
        self.options = get_arguments(omit=['self'])

        if mlab is None:
            output('mlab cannot be imported, check your installation!')
            insert_as_static_method(self.__class__, '__call__', self.call_empty)
        else:
            insert_as_static_method(self.__class__, '__call__', self.call_mlab)
Beispiel #6
0
 def restore(self):
     """
     Remove parametric_hook, restore __call__() to call_basic().
     """
     self.parametric_hook = None
     insert_as_static_method(self.__class__, '__call__', self.call_basic)