Esempio n. 1
0
 def register(self,classObject,Object=None,**kw):
     blenderUIDialog._store("upy_plugin",{self.plugin_name:Object})
     prefdir = Blender.Get('uscriptsdir')
     if prefdir is None:
         prefdir = Blender.Get('scriptsdir')    
     #need to wrote the script as a text file that will be link to the object/scene
     blenderHelper.addTextFile(name=Object.plugin_name,
                             text=self.string_representation)
     scene = blenderHelper.getCurrentScene()
     #should load the script for scene update...
     scene.addScriptLink(Object.plugin_name, "FrameChanged")
Esempio n. 2
0
 def unregister(self,):
     scene = blenderHelper.getCurrentScene()
     scene.clearScriptLinks()