Armature rigging:
authorTon Roosendaal <ton@blender.org>
Thu, 24 Jan 2013 11:21:40 +0000 (11:21 +0000)
committerTon Roosendaal <ton@blender.org>
Thu, 24 Jan 2013 11:21:40 +0000 (11:21 +0000)
Added more clear warning print for cases when a Proxy cannot be resolved.

source/blender/blenkernel/BKE_action.h
source/blender/blenkernel/intern/action.c
source/blender/blenkernel/intern/object.c

index 2d7030b2d42ae37762f2345a6c76afb30752e5a6..2d20672a0159a70e33f5f8c5aa0cf108330c4518 100644 (file)
@@ -220,7 +220,7 @@ void BKE_pose_remove_group(struct Object *ob);
 void what_does_obaction(struct Object *ob, struct Object *workob, struct bPose *pose, struct bAction *act, char groupname[], float cframe);
 
 /* for proxy */
-void BKE_pose_copy_result(struct bPose *to, struct bPose *from);
+int BKE_pose_copy_result(struct bPose *to, struct bPose *from);
 /* clear all transforms */
 void BKE_pose_rest(struct bPose *pose);
 
index 63e12dfb99dfabd5779edd50dcc382ddcc8311db..1aceca0bbd5b1223982888aff30b2fc7f5fcbb88 100644 (file)
@@ -1118,18 +1118,18 @@ void BKE_pose_rest(bPose *pose)
 }
 
 /* both poses should be in sync */
-void BKE_pose_copy_result(bPose *to, bPose *from)
+int BKE_pose_copy_result(bPose *to, bPose *from)
 {
        bPoseChannel *pchanto, *pchanfrom;
        
        if (to == NULL || from == NULL) {
-               printf("pose result copy error to:%p from:%p\n", (void *)to, (void *)from); /* debug temp */
-               return;
+               printf("Pose copy error, pose to:%p from:%p\n", (void *)to, (void *)from); /* debug temp */
+               return 0;
        }
 
        if (to == from) {
                printf("BKE_pose_copy_result source and target are the same\n");
-               return;
+               return 0;
        }
 
 
@@ -1153,6 +1153,7 @@ void BKE_pose_copy_result(bPose *to, bPose *from)
                        pchanto->protectflag = pchanfrom->protectflag;
                }
        }
+       return 1;
 }
 
 /* For the calculation of the effects of an Action at the given frame on an object 
index 0c1a23bf41da6e68c2cd8ded0b8d64273fbc3419..555fa0791fdb6c5d8d5f6572a6679e96f12f3bbf 100644 (file)
@@ -2711,8 +2711,8 @@ void BKE_object_handle_update(Scene *scene, Object *ob)
 
                                case OB_ARMATURE:
                                        if (ob->id.lib && ob->proxy_from) {
-                                               // printf("pose proxy copy, lib ob %s proxy %s\n", ob->id.name, ob->proxy_from->id.name);
-                                               BKE_pose_copy_result(ob->pose, ob->proxy_from->pose);
+                                               if (0 == BKE_pose_copy_result(ob->pose, ob->proxy_from->pose))
+                                                       printf("Proxy copy error, lib Object: %s proxy Object: %s\n", ob->id.name+2, ob->proxy_from->id.name+2);
                                        }
                                        else {
                                                BKE_pose_where_is(scene, ob);