diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-09-23 06:31:30 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-09-23 06:31:30 +0400 |
commit | 3b487a6944892204afbdc920ac839a266f54aff5 (patch) | |
tree | 7834f1b3cc26f797541ecde21f46f16fd2758c7d /source/blender/blenkernel/intern/object.c | |
parent | 89d6cc7e23a26a3036bfa52592303e6d745edd09 (diff) |
fix for all pose-group editing functions crashing when the context didnt have an area (in background mode),
fix pose-group-sort and pose-group-moving being disabled for pinned poses.
also fix for own missing NULL check for pose mask clear which would crash when run without an active object
Diffstat (limited to 'source/blender/blenkernel/intern/object.c')
-rw-r--r-- | source/blender/blenkernel/intern/object.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/source/blender/blenkernel/intern/object.c b/source/blender/blenkernel/intern/object.c index 958e488f748..e659441abfe 100644 --- a/source/blender/blenkernel/intern/object.c +++ b/source/blender/blenkernel/intern/object.c @@ -1079,12 +1079,12 @@ static void copy_object_pose(Object *obn, Object *ob) } } -static int object_pose_context(Object *ob) +int BKE_object_pose_context_check(Object *ob) { - if ( (ob) && - (ob->type == OB_ARMATURE) && - (ob->pose) && - (ob->mode & OB_MODE_POSE)) + if ((ob) && + (ob->type == OB_ARMATURE) && + (ob->pose) && + (ob->mode & OB_MODE_POSE)) { return 1; } @@ -1098,12 +1098,12 @@ Object *BKE_object_pose_armature_get(Object *ob) if (ob == NULL) return NULL; - if (object_pose_context(ob)) + if (BKE_object_pose_context_check(ob)) return ob; ob = modifiers_isDeformedByArmature(ob); - if (object_pose_context(ob)) + if (BKE_object_pose_context_check(ob)) return ob; return NULL; |