Change custom property to Empty
authorOscurart Eugenio Pignataro <info@oscurart.com.ar>
Fri, 25 May 2012 23:58:06 +0000 (23:58 +0000)
committerOscurart Eugenio Pignataro <info@oscurart.com.ar>
Fri, 25 May 2012 23:58:06 +0000 (23:58 +0000)
oscurart_futurism.py

index c3b95fb32727a6d2b82807c2fe4a5de207af25bd..dba248cb3746a67e8f460a0c8adcba82098b66af 100644 (file)
@@ -44,15 +44,18 @@ def object_osc_futurism (self, context,STEP, HOLD):
     
     OBACT = bpy.context.active_object
     
-    # SUMO PARAMETERS AL OBJECT
-    OBACT["FUTURISM_HOLDIN"] = 0
-    OBACT["FUTURISM_HOLDOUT"] = 0
+
     
     ## CREO EMPTY
     bpy.ops.object.add()
     bpy.context.active_object.name = "FuturismContainer"
     EMPTY = bpy.context.active_object
     
+    
+    # SUMO PARAMETERS AL OBJECT
+    EMPTY["FUTURISM_HOLDIN"] = 0
+    EMPTY["FUTURISM_HOLDOUT"] = 0    
+    
     bpy.context.scene.objects.active = OBACT  
     
     for OBJETO in range((FE+1)-FS):
@@ -75,10 +78,10 @@ def object_osc_futurism (self, context,STEP, HOLD):
             OBJECT.animation_data.drivers[0].driver.variables[0].targets[0].id= bpy.context.scene
             OBJECT.animation_data.drivers[0].driver.variables[0].targets[0].data_path = "current_frame"
             OBJECT.animation_data.drivers[0].driver.variables[1].targets[0].id_type = 'OBJECT'
-            OBJECT.animation_data.drivers[0].driver.variables[1].targets[0].id= OBACT
+            OBJECT.animation_data.drivers[0].driver.variables[1].targets[0].id= EMPTY
             OBJECT.animation_data.drivers[0].driver.variables[1].targets[0].data_path = '["FUTURISM_HOLDIN"]'  
             OBJECT.animation_data.drivers[0].driver.variables[2].targets[0].id_type = 'OBJECT'
-            OBJECT.animation_data.drivers[0].driver.variables[2].targets[0].id= OBACT
+            OBJECT.animation_data.drivers[0].driver.variables[2].targets[0].id= EMPTY
             OBJECT.animation_data.drivers[0].driver.variables[2].targets[0].data_path = '["FUTURISM_HOLDOUT"]'     
             
             # MARCO EXPRESIONES PARA RENDER
@@ -92,10 +95,10 @@ def object_osc_futurism (self, context,STEP, HOLD):
             OBJECT.animation_data.drivers[1].driver.variables[0].targets[0].id= bpy.context.scene
             OBJECT.animation_data.drivers[1].driver.variables[0].targets[0].data_path = "current_frame"   
             OBJECT.animation_data.drivers[0].driver.variables[1].targets[0].id_type = 'OBJECT'
-            OBJECT.animation_data.drivers[0].driver.variables[1].targets[0].id= OBACT
+            OBJECT.animation_data.drivers[0].driver.variables[1].targets[0].id= EMPTY
             OBJECT.animation_data.drivers[0].driver.variables[1].targets[0].data_path = '["FUTURISM_HOLDIN"]'  
             OBJECT.animation_data.drivers[0].driver.variables[2].targets[0].id_type = 'OBJECT'
-            OBJECT.animation_data.drivers[0].driver.variables[2].targets[0].id= OBACT
+            OBJECT.animation_data.drivers[0].driver.variables[2].targets[0].id= EMPTY
             OBJECT.animation_data.drivers[0].driver.variables[2].targets[0].data_path = '["FUTURISM_HOLDOUT"]'                       
             # RESETEO STEPINC
             STEPINC=0