edits to the bone copy metarig type from Cessen, pointcache warning fix
authorCampbell Barton <ideasman42@gmail.com>
Mon, 14 Dec 2009 14:42:46 +0000 (14:42 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Mon, 14 Dec 2009 14:42:46 +0000 (14:42 +0000)
release/scripts/modules/rigify/copy.py
source/blender/editors/physics/physics_pointcache.c
source/blender/makesrna/intern/rna_ID.c

index d388ee183164888b56dd9ab4d96aa733c9acad3f..5fda9bd7ba897ff07462354305e7cfc3b056edfa 100644 (file)
@@ -50,7 +50,10 @@ def main(obj, bone_definition, base_names, options):
     mt = bone_class_instance(obj, METARIG_NAMES)
     mt.cpy = bone_definition[0]
     mt.update()
-    cp = mt.copy(to_fmt="%s_cpy")
+    cp = bone_class_instance(obj, ["cpy"])
+    cp.cpy_e = copy_bone_simple(arm, mt.cpy, base_names[mt.cpy], parent=True)
+    cp.cpy = cp.cpy_e.name
+    
     bpy.ops.object.mode_set(mode='OBJECT')
 
     cp.update()
@@ -63,7 +66,19 @@ def main(obj, bone_definition, base_names, options):
 
     con = cp.cpy_p.constraints.new('COPY_ROTATION')
     con.target = obj
-    con.subtarget = mt.cpy
+    con.subtarget = cp.cpy
+
+    con = mt.cpy_p.constraints.new('COPY_SCALE')
+    con.target = obj
+    con.subtarget = cp.cpy
+    
+    # Rotation mode and axis locks
+    cp.cpy_p.rotation_mode = mt.cpy_p.rotation_mode
+    cp.cpy_p.lock_location = tuple(mt.cpy_p.lock_location)
+    cp.cpy_p.lock_rotations_4d = mt.cpy_p.lock_rotations_4d
+    cp.cpy_p.lock_rotation = tuple(mt.cpy_p.lock_rotation)
+    cp.cpy_p.lock_rotation_w = mt.cpy_p.lock_rotation_w
+    cp.cpy_p.lock_scale = tuple(mt.cpy_p.lock_scale)
 
     # setup layers last
     layers = get_layer_dict(options)
index 858ff3637b1b413da3ce2f6b4731a342f00ef721..0cd4c2e6ce822991c04f54bc1058492ab7051f26 100644 (file)
@@ -86,7 +86,7 @@ void bake_console_progress(void *arg, int nr)
        fflush(stdout);
 }
 
-void bake_console_progress_end(void *arg, int nr)
+void bake_console_progress_end(void *arg)
 {
        printf("\n");
 }
index 32b6de40a030308d644ae93abcc2ee4627a7da31..2aeb600bc423e8142d76d0334427d5669e425374 100644 (file)
@@ -246,7 +246,7 @@ static void rna_IDPropertyGroup_name_get(PointerRNA *ptr, char *str)
        if(idprop && idprop->type == IDP_STRING)
                strcpy(str, idprop->data.pointer);
        else
-               strcpy(str, "");
+               str[0]= '\0';
 }
 
 void rna_IDPropertyGroup_name_set(PointerRNA *ptr, const char *value)