move ED_object_pose_armature --> object_pose_armature_get to so we dont get bad level...
authorCampbell Barton <ideasman42@gmail.com>
Wed, 14 Sep 2011 01:48:55 +0000 (01:48 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Wed, 14 Sep 2011 01:48:55 +0000 (01:48 +0000)
12 files changed:
source/blender/blenkernel/BKE_object.h
source/blender/blenkernel/intern/object.c
source/blender/editors/armature/editarmature.c
source/blender/editors/armature/poseSlide.c
source/blender/editors/armature/poselib.c
source/blender/editors/armature/poseobject.c
source/blender/editors/include/ED_armature.h
source/blender/editors/interface/interface_widgets.c
source/blender/editors/object/object_constraint.c
source/blender/editors/screen/screen_context.c
source/blender/editors/screen/screen_ops.c
source/blenderplayer/bad_level_call_stubs/stubs.c

index 7f2a133d27aa98ad137fb78a21452808bcf2f371..7e39461a032a5f1abadbeaee66cf0b6cef4ccf54 100644 (file)
@@ -108,6 +108,7 @@ void object_to_mat4(struct Object *ob, float mat[][4]);
 void object_apply_mat4(struct Object *ob, float mat[][4], const short use_compat, const short use_parent);
 
 void set_no_parent_ipo(int val);
+struct Object *object_pose_armature_get(struct Object *ob);
 
 void where_is_object_time(struct Scene *scene, struct Object *ob, float ctime);
 void where_is_object(struct Scene *scene, struct Object *ob);
index 1c326efe3ec4a9886018556c1e0b6875e8d56fbf..c2b561b122a167dc3902efd9965ff1223bc1ff64 100644 (file)
@@ -1310,6 +1310,37 @@ static void copy_object_pose(Object *obn, Object *ob)
        }
 }
 
+static int object_pose_context(Object *ob)
+{
+       if(     (ob) &&
+               (ob->type == OB_ARMATURE) &&
+               (ob->pose) &&
+               (ob->mode & OB_MODE_POSE)
+       ) {
+               return 1;
+       }
+       else {
+               return 0;
+       }
+}
+
+//Object *object_pose_armature_get(Object *ob)
+Object *object_pose_armature_get(struct Object *ob)
+{
+       if(ob==NULL)
+               return NULL;
+
+       if(object_pose_context(ob))
+               return ob;
+
+       ob= modifiers_isDeformedByArmature(ob);
+
+       if(object_pose_context(ob))
+               return ob;
+
+       return NULL;
+}
+
 static void copy_object_transform(Object *ob_tar, Object *ob_src)
 {
        copy_v3_v3(ob_tar->loc, ob_src->loc);
index eaaaa12eca17e9a540dbbb0ff67c05eaec6be896..a4b1e9a6e2cce14e046a17f8a901cc87685a4ada 100644 (file)
@@ -643,7 +643,7 @@ static void applyarmature_fix_boneparents (Scene *scene, Object *armob)
 static int apply_armature_pose2bones_exec (bContext *C, wmOperator *op)
 {
        Scene *scene= CTX_data_scene(C);
-       Object *ob= ED_object_pose_armature(CTX_data_active_object(C)); // must be active object, not edit-object
+       Object *ob= object_pose_armature_get(CTX_data_active_object(C)); // must be active object, not edit-object
        bArmature *arm= get_armature(ob);
        bPose *pose;
        bPoseChannel *pchan;
@@ -745,7 +745,7 @@ void POSE_OT_armature_apply (wmOperatorType *ot)
 /* set the current pose as the restpose */
 static int pose_visual_transform_apply_exec (bContext *C, wmOperator *UNUSED(op))
 {
-       Object *ob= ED_object_pose_armature(CTX_data_active_object(C)); // must be active object, not edit-object
+       Object *ob= object_pose_armature_get(CTX_data_active_object(C)); // must be active object, not edit-object
 
        /* don't check if editmode (should be done by caller) */
        if (ob->type!=OB_ARMATURE)
@@ -4886,7 +4886,7 @@ static int pose_clear_transform_generic_exec(bContext *C, wmOperator *op,
                void (*clear_func)(bPoseChannel*), const char default_ksName[])
 {
        Scene *scene= CTX_data_scene(C);
-       Object *ob= ED_object_pose_armature(CTX_data_active_object(C));
+       Object *ob= object_pose_armature_get(CTX_data_active_object(C));
        short autokey = 0;
        
        /* sanity checks */
@@ -5113,7 +5113,7 @@ void POSE_OT_select_all(wmOperatorType *ot)
 
 static int pose_select_parent_exec(bContext *C, wmOperator *UNUSED(op))
 {
-       Object *ob= ED_object_pose_armature(CTX_data_active_object(C));
+       Object *ob= object_pose_armature_get(CTX_data_active_object(C));
        bPoseChannel *pchan,*parent;
 
        /*      Determine if there is an active bone */
@@ -5189,7 +5189,7 @@ static int hide_unselected_pose_bone_cb(Object *ob, Bone *bone, void *UNUSED(ptr
 /* active object is armature in posemode, poll checked */
 static int pose_hide_exec(bContext *C, wmOperator *op) 
 {
-       Object *ob= ED_object_pose_armature(CTX_data_active_object(C));
+       Object *ob= object_pose_armature_get(CTX_data_active_object(C));
        bArmature *arm= ob->data;
 
        if(RNA_boolean_get(op->ptr, "unselected"))
@@ -5238,7 +5238,7 @@ static int show_pose_bone_cb(Object *ob, Bone *bone, void *UNUSED(ptr))
 /* active object is armature in posemode, poll checked */
 static int pose_reveal_exec(bContext *C, wmOperator *UNUSED(op)) 
 {
-       Object *ob= ED_object_pose_armature(CTX_data_active_object(C));
+       Object *ob= object_pose_armature_get(CTX_data_active_object(C));
        bArmature *arm= ob->data;
        
        bone_looper(ob, arm->bonebase.first, NULL, show_pose_bone_cb);
index b0ff60455cf020a1ee44aa2696e19b43d6de2c9e..16888908bab0f17bc0a9bb1d6e8616371068ec5a 100644 (file)
@@ -51,6 +51,7 @@
 #include "BKE_fcurve.h"
 
 #include "BKE_context.h"
+#include "BKE_object.h"
 #include "BKE_report.h"
 
 #include "RNA_access.h"
@@ -129,7 +130,7 @@ static int pose_slide_init (bContext *C, wmOperator *op, short mode)
        
        /* get info from context */
        pso->scene= CTX_data_scene(C);
-       pso->ob= ED_object_pose_armature(CTX_data_active_object(C));
+       pso->ob= object_pose_armature_get(CTX_data_active_object(C));
        pso->arm= (pso->ob)? pso->ob->data : NULL;
        pso->sa= CTX_wm_area(C); /* only really needed when doing modal() */
        pso->ar= CTX_wm_region(C); /* only really needed when doing modal() */
@@ -1164,7 +1165,7 @@ static void pose_propagate_fcurve (wmOperator *op, Object *ob, FCurve *fcu,
 static int pose_propagate_exec (bContext *C, wmOperator *op)
 {
        Scene *scene = CTX_data_scene(C);
-       Object *ob= ED_object_pose_armature(CTX_data_active_object(C));
+       Object *ob= object_pose_armature_get(CTX_data_active_object(C));
        bAction *act= (ob && ob->adt)? ob->adt->action : NULL;
        
        ListBase pflinks = {NULL, NULL};
index 864eaa3bdbdb5438039d9793539cefe5433caf0a..6e64d332cfd98cc7b83f1fcc084d0af6fd1a4588 100644 (file)
@@ -54,6 +54,7 @@
 #include "BKE_depsgraph.h"
 #include "BKE_idprop.h"
 #include "BKE_library.h"
+#include "BKE_object.h"
 
 #include "BKE_context.h"
 #include "BKE_report.h"
@@ -170,7 +171,7 @@ static Object *get_poselib_object (bContext *C)
        if (sa && (sa->spacetype == SPACE_BUTS)) 
                return CTX_data_pointer_get_type(C, "object", &RNA_Object).data;
        else
-               return ED_object_pose_armature(CTX_data_active_object(C));
+               return object_pose_armature_get(CTX_data_active_object(C));
 }
 
 /* Poll callback for operators that require existing PoseLib data (with poses) to work */
@@ -632,7 +633,7 @@ static int poselib_rename_invoke (bContext *C, wmOperator *op, wmEvent *evt)
 
 static int poselib_rename_exec (bContext *C, wmOperator *op)
 {
-       Object *ob= ED_object_pose_armature(CTX_data_active_object(C));
+       Object *ob= object_pose_armature_get(CTX_data_active_object(C));
        bAction *act= (ob) ? ob->poselib : NULL;
        TimeMarker *marker;
        char newname[64];
index 3911be02fe72d9d3951230e2e5b58e933cf261ad..83285d3634abe874151685fcf25f7fb32669e92d 100644 (file)
@@ -58,6 +58,7 @@
 #include "BKE_depsgraph.h"
 #include "BKE_fcurve.h"
 #include "BKE_modifier.h"
+#include "BKE_object.h"
 #include "BKE_report.h"
 
 
 
 #include "armature_intern.h"
 
-static int object_pose_context(Object *ob)
-{
-       if(     (ob) && 
-               (ob->type == OB_ARMATURE) &&
-               (ob->pose) &&
-               (ob->mode & OB_MODE_POSE)
-       ) {
-               return 1;
-       }
-       else {
-               return 0;
-       }
-}
-
-Object *ED_object_pose_armature(Object *ob)
-{
-       if(ob==NULL)
-               return NULL;
-       
-       if(object_pose_context(ob))
-               return ob;
-
-       ob= modifiers_isDeformedByArmature(ob);
-
-       if(object_pose_context(ob))
-               return ob;
-
-       return NULL;
-}
-
 /* This function is used to process the necessary updates for */
 void ED_armature_enter_posemode(bContext *C, Base *base)
 {
@@ -238,7 +209,7 @@ static int pose_calculate_paths_exec (bContext *C, wmOperator *UNUSED(op))
        if (sa->spacetype == SPACE_BUTS) 
                ob= CTX_data_pointer_get_type(C, "object", &RNA_Object).data;
        else
-               ob= ED_object_pose_armature(CTX_data_active_object(C));
+               ob= object_pose_armature_get(CTX_data_active_object(C));
                
        if (ELEM(NULL, ob, ob->pose))
                return OPERATOR_CANCELLED;
@@ -314,7 +285,7 @@ static int pose_clear_paths_exec (bContext *C, wmOperator *UNUSED(op))
        if (sa->spacetype == SPACE_BUTS) 
                ob= CTX_data_pointer_get_type(C, "object", &RNA_Object).data;
        else
-               ob= ED_object_pose_armature(CTX_data_active_object(C));
+               ob= object_pose_armature_get(CTX_data_active_object(C));
                
        /* only continue if there's an object */
        if ELEM(NULL, ob, ob->pose)
@@ -348,7 +319,7 @@ void POSE_OT_paths_clear (wmOperatorType *ot)
 
 static int pose_select_constraint_target_exec(bContext *C, wmOperator *UNUSED(op))
 {
-       Object *ob= ED_object_pose_armature(CTX_data_active_object(C));
+       Object *ob= object_pose_armature_get(CTX_data_active_object(C));
        bConstraint *con;
        int found= 0;
        
@@ -408,7 +379,7 @@ void POSE_OT_select_constraint_target(wmOperatorType *ot)
 
 static int pose_select_hierarchy_exec(bContext *C, wmOperator *op)
 {
-       Object *ob= ED_object_pose_armature(CTX_data_active_object(C));
+       Object *ob= object_pose_armature_get(CTX_data_active_object(C));
        bArmature *arm= ob->data;
        Bone *curbone, *pabone, *chbone;
        int direction = RNA_enum_get(op->ptr, "direction");
@@ -646,7 +617,7 @@ static int pose_select_same_keyingset(bContext *C, Object *ob, short extend)
 
 static int pose_select_grouped_exec (bContext *C, wmOperator *op)
 {
-       Object *ob= ED_object_pose_armature(CTX_data_active_object(C));
+       Object *ob= object_pose_armature_get(CTX_data_active_object(C));
        short extend= RNA_boolean_get(op->ptr, "extend");
        short changed = 0;
        
@@ -713,7 +684,7 @@ void POSE_OT_select_grouped (wmOperatorType *ot)
 static int pose_bone_flip_active_exec (bContext *C, wmOperator *UNUSED(op))
 {
        Object *ob_act= CTX_data_active_object(C);
-       Object *ob= ED_object_pose_armature(ob_act);
+       Object *ob= object_pose_armature_get(ob_act);
 
        if(ob && (ob->mode & OB_MODE_POSE)) {
                bArmature *arm= ob->data;
@@ -1135,7 +1106,7 @@ static bPoseChannel *pose_bone_do_paste (Object *ob, bPoseChannel *chan, short s
 
 static int pose_copy_exec (bContext *C, wmOperator *op)
 {
-       Object *ob= ED_object_pose_armature(CTX_data_active_object(C));
+       Object *ob= object_pose_armature_get(CTX_data_active_object(C));
        
        /* sanity checking */
        if ELEM(NULL, ob, ob->pose) {
@@ -1173,7 +1144,7 @@ void POSE_OT_copy (wmOperatorType *ot)
 
 static int pose_paste_exec (bContext *C, wmOperator *op)
 {
-       Object *ob= ED_object_pose_armature(CTX_data_active_object(C));
+       Object *ob= object_pose_armature_get(CTX_data_active_object(C));
        Scene *scene= CTX_data_scene(C);
        bPoseChannel *chan;
        int flip= RNA_boolean_get(op->ptr, "flipped");
@@ -1272,7 +1243,7 @@ static int pose_group_add_exec (bContext *C, wmOperator *UNUSED(op))
        if (sa->spacetype == SPACE_BUTS) 
                ob= CTX_data_pointer_get_type(C, "object", &RNA_Object).data;
        else
-               ob= ED_object_pose_armature(CTX_data_active_object(C));
+               ob= object_pose_armature_get(CTX_data_active_object(C));
                
        /* only continue if there's an object */
        if (ob == NULL)
@@ -1312,7 +1283,7 @@ static int pose_group_remove_exec (bContext *C, wmOperator *UNUSED(op))
        if (sa->spacetype == SPACE_BUTS) 
                ob= CTX_data_pointer_get_type(C, "object", &RNA_Object).data;
        else
-               ob= ED_object_pose_armature(CTX_data_active_object(C));
+               ob= object_pose_armature_get(CTX_data_active_object(C));
        
        /* only continue if there's an object */
        if (ob == NULL)
@@ -1360,7 +1331,7 @@ static int pose_groups_menu_invoke (bContext *C, wmOperator *op, wmEvent *UNUSED
        if (sa->spacetype == SPACE_BUTS) 
                ob= CTX_data_pointer_get_type(C, "object", &RNA_Object).data;
        else
-               ob= ED_object_pose_armature(CTX_data_active_object(C));
+               ob= object_pose_armature_get(CTX_data_active_object(C));
        
        /* only continue if there's an object, and a pose there too */
        if (ELEM(NULL, ob, ob->pose)) 
@@ -1409,7 +1380,7 @@ static int pose_group_assign_exec (bContext *C, wmOperator *op)
        if (sa->spacetype == SPACE_BUTS) 
                ob= CTX_data_pointer_get_type(C, "object", &RNA_Object).data;
        else
-               ob= ED_object_pose_armature(CTX_data_active_object(C));
+               ob= object_pose_armature_get(CTX_data_active_object(C));
        
        /* only continue if there's an object, and a pose there too */
        if (ELEM(NULL, ob, ob->pose))
@@ -1472,7 +1443,7 @@ static int pose_group_unassign_exec (bContext *C, wmOperator *UNUSED(op))
        if (sa->spacetype == SPACE_BUTS) 
                ob= CTX_data_pointer_get_type(C, "object", &RNA_Object).data;
        else
-               ob= ED_object_pose_armature(CTX_data_active_object(C));
+               ob= object_pose_armature_get(CTX_data_active_object(C));
        
        /* only continue if there's an object, and a pose there too */
        if (ELEM(NULL, ob, ob->pose))
@@ -1707,7 +1678,7 @@ static int pose_group_select_exec (bContext *C, wmOperator *UNUSED(op))
        if (sa->spacetype == SPACE_BUTS) 
                ob= CTX_data_pointer_get_type(C, "object", &RNA_Object).data;
        else
-               ob= ED_object_pose_armature(CTX_data_active_object(C));
+               ob= object_pose_armature_get(CTX_data_active_object(C));
        
        /* only continue if there's an object, and a pose there too */
        if (ELEM(NULL, ob, ob->pose))
@@ -1745,7 +1716,7 @@ static int pose_group_deselect_exec (bContext *C, wmOperator *UNUSED(op))
        if (sa->spacetype == SPACE_BUTS) 
                ob= CTX_data_pointer_get_type(C, "object", &RNA_Object).data;
        else
-               ob= ED_object_pose_armature(CTX_data_active_object(C));
+               ob= object_pose_armature_get(CTX_data_active_object(C));
        
        /* only continue if there's an object, and a pose there too */
        if (ELEM(NULL, ob, ob->pose))
@@ -1778,7 +1749,7 @@ void POSE_OT_group_deselect (wmOperatorType *ot)
 
 static int pose_flip_names_exec (bContext *C, wmOperator *UNUSED(op))
 {
-       Object *ob= ED_object_pose_armature(CTX_data_active_object(C));
+       Object *ob= object_pose_armature_get(CTX_data_active_object(C));
        bArmature *arm;
        
        /* paranoia checks */
@@ -1823,7 +1794,7 @@ void POSE_OT_flip_names (wmOperatorType *ot)
 
 static int pose_autoside_names_exec (bContext *C, wmOperator *op)
 {
-       Object *ob= ED_object_pose_armature(CTX_data_active_object(C));
+       Object *ob= object_pose_armature_get(CTX_data_active_object(C));
        bArmature *arm;
        char newname[32];
        short axis= RNA_enum_get(op->ptr, "axis");
@@ -1927,7 +1898,7 @@ static int pose_armature_layers_showall_poll (bContext *C)
 
 static int pose_armature_layers_showall_exec (bContext *C, wmOperator *op)
 {
-       Object *ob= ED_object_pose_armature(CTX_data_active_object(C));
+       Object *ob= object_pose_armature_get(CTX_data_active_object(C));
        bArmature *arm = (ob)? ob->data : NULL;
        PointerRNA ptr;
        int maxLayers = (RNA_boolean_get(op->ptr, "all"))? 32 : 16;
@@ -1979,7 +1950,7 @@ void ARMATURE_OT_layers_show_all (wmOperatorType *ot)
 /* Present a popup to get the layers that should be used */
 static int pose_armature_layers_invoke (bContext *C, wmOperator *op, wmEvent *evt)
 {
-       Object *ob= ED_object_pose_armature(CTX_data_active_object(C));
+       Object *ob= object_pose_armature_get(CTX_data_active_object(C));
        bArmature *arm= (ob)? ob->data : NULL;
        PointerRNA ptr;
        int layers[32]; /* hardcoded for now - we can only have 32 armature layers, so this should be fine... */
@@ -2000,7 +1971,7 @@ static int pose_armature_layers_invoke (bContext *C, wmOperator *op, wmEvent *ev
 /* Set the visible layers for the active armature (edit and pose modes) */
 static int pose_armature_layers_exec (bContext *C, wmOperator *op)
 {
-       Object *ob= ED_object_pose_armature(CTX_data_active_object(C));
+       Object *ob= object_pose_armature_get(CTX_data_active_object(C));
        PointerRNA ptr;
        int layers[32]; /* hardcoded for now - we can only have 32 armature layers, so this should be fine... */
 
@@ -2090,7 +2061,7 @@ static int pose_bone_layers_invoke (bContext *C, wmOperator *op, wmEvent *evt)
 /* Set the visible layers for the active armature (edit and pose modes) */
 static int pose_bone_layers_exec (bContext *C, wmOperator *op)
 {
-       Object *ob= ED_object_pose_armature(CTX_data_active_object(C));
+       Object *ob= object_pose_armature_get(CTX_data_active_object(C));
        PointerRNA ptr;
        int layers[32]; /* hardcoded for now - we can only have 32 armature layers, so this should be fine... */
 
@@ -2213,7 +2184,7 @@ void ARMATURE_OT_bone_layers (wmOperatorType *ot)
 static int pose_flip_quats_exec (bContext *C, wmOperator *UNUSED(op))
 {
        Scene *scene= CTX_data_scene(C);
-       Object *ob= ED_object_pose_armature(CTX_data_active_object(C));
+       Object *ob= object_pose_armature_get(CTX_data_active_object(C));
        KeyingSet *ks = ANIM_builtin_keyingset_get_named(NULL, "LocRotScale");
        
        /* loop through all selected pchans, flipping and keying (as needed) */
index a029c5c1f12211b2386ee56f1552386103b7bd5f..b73684d43d8145801c1ef8032bf89848a5dd53a3 100644 (file)
@@ -148,7 +148,6 @@ void ED_armature_bone_rename(struct bArmature *arm, char *oldnamep, char *newnam
 void undo_push_armature(struct bContext *C, const char *name);
 
 /* poseobject.c */
-struct Object *ED_object_pose_armature(struct Object *ob);
 void ED_armature_exit_posemode(struct bContext *C, struct Base *base);
 void ED_armature_enter_posemode(struct bContext *C, struct Base *base);
 int ED_pose_channel_in_IK_chain(struct Object *ob, struct bPoseChannel *pchan);
index c36742f7c4d5019ff21ef75643ab22017ec55974..4582964614500f18335f0cb6aec2ad4c463adea1 100644 (file)
@@ -588,20 +588,6 @@ static void shadecolors4(char *coltop, char *coldown, const char *color, short s
        coldown[3]= color[3];   
 }
 
-static void round_box_shade_col4(const char col1[4], const char col2[4], const float fac)
-{
-       unsigned char col[4];
-       const int faci= FTOCHAR(fac);
-       const int facm= 255-faci;
-
-       col[0]= (faci*col1[0] + facm*col2[0])>>8;
-       col[1]= (faci*col1[1] + facm*col2[1])>>8;
-       col[2]= (faci*col1[2] + facm*col2[2])>>8;
-       col[3]= (faci*col1[3] + facm*col2[3])>>8;
-
-       glColor4ubv(col);
-}
-
 static void round_box_shade_col4_r(unsigned char col_r[4], const char col1[4], const char col2[4], const float fac)
 {
        const int faci= FTOCHAR(fac);
index 2055c906b41871eda61b18c79fa42300b91a3762..66db7db5171d898ba96465f0ad9ceca5ca27079e 100644 (file)
@@ -987,7 +987,7 @@ static int pose_constraints_clear_exec(bContext *C, wmOperator *UNUSED(op))
 {
        Main *bmain= CTX_data_main(C);
        Scene *scene= CTX_data_scene(C);
-       Object *ob= ED_object_pose_armature(CTX_data_active_object(C));
+       Object *ob= object_pose_armature_get(CTX_data_active_object(C));
        
        /* free constraints for all selected bones */
        CTX_DATA_BEGIN(C, bPoseChannel*, pchan, selected_pose_bones)
@@ -1423,7 +1423,7 @@ static int object_constraint_add_exec(bContext *C, wmOperator *op)
 /* dummy operator callback */
 static int pose_constraint_add_exec(bContext *C, wmOperator *op)
 {
-       Object *ob= ED_object_pose_armature(ED_object_active_context(C));
+       Object *ob= object_pose_armature_get(ED_object_active_context(C));
        int type= RNA_enum_get(op->ptr, "type");
        short with_targets= 0;
        
@@ -1526,7 +1526,7 @@ void POSE_OT_constraint_add_with_targets(wmOperatorType *ot)
 /* present menu with options + validation for targets to use */
 static int pose_ik_add_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(evt))
 {
-       Object *ob= ED_object_pose_armature(CTX_data_active_object(C));
+       Object *ob= object_pose_armature_get(CTX_data_active_object(C));
        bPoseChannel *pchan= get_active_posechannel(ob);
        bConstraint *con= NULL;
        
@@ -1610,7 +1610,7 @@ void POSE_OT_ik_add(wmOperatorType *ot)
 /* remove IK constraints from selected bones */
 static int pose_ik_clear_exec(bContext *C, wmOperator *UNUSED(op))
 {
-       Object *ob= ED_object_pose_armature(CTX_data_active_object(C));
+       Object *ob= object_pose_armature_get(CTX_data_active_object(C));
        
        /* only remove IK Constraints */
        CTX_DATA_BEGIN(C, bPoseChannel*, pchan, selected_pose_bones) 
index f73ede197240102cd14edc4a6d3537af76282e3a..2e8dc32ad6d591c794de4042098560ae4a4e69d2 100644 (file)
@@ -238,7 +238,7 @@ int ed_screen_context(const bContext *C, const char *member, bContextDataResult
                }
        }
        else if(CTX_data_equals(member, "visible_pose_bones")) {
-               Object *obpose= ED_object_pose_armature(obact);
+               Object *obpose= object_pose_armature_get(obact);
                bArmature *arm= (obpose) ? obpose->data : NULL;
                bPoseChannel *pchan;
                
@@ -254,7 +254,7 @@ int ed_screen_context(const bContext *C, const char *member, bContextDataResult
                }
        }
        else if(CTX_data_equals(member, "selected_pose_bones")) {
-               Object *obpose= ED_object_pose_armature(obact);
+               Object *obpose= object_pose_armature_get(obact);
                bArmature *arm= (obpose) ? obpose->data : NULL;
                bPoseChannel *pchan;
                
@@ -289,7 +289,7 @@ int ed_screen_context(const bContext *C, const char *member, bContextDataResult
        }
        else if(CTX_data_equals(member, "active_pose_bone")) {
                bPoseChannel *pchan;
-               Object *obpose= ED_object_pose_armature(obact);
+               Object *obpose= object_pose_armature_get(obact);
                
                pchan= get_active_posechannel(obpose);
                if (pchan) {
index 62fdfc140dfe8500006aba88efbbaa2ee8f08738..5cc42e2b6cf348f26e079fa0b06ae4b358ba1769 100644 (file)
@@ -52,6 +52,7 @@
 #include "BKE_global.h"
 #include "BKE_main.h"
 #include "BKE_mesh.h"
+#include "BKE_object.h"
 #include "BKE_report.h"
 #include "BKE_scene.h"
 #include "BKE_screen.h"
@@ -346,7 +347,7 @@ int ED_operator_posemode(bContext *C)
 
        if (obact && !(obact->mode & OB_MODE_EDIT)) {
                Object *obpose;
-               if((obpose= ED_object_pose_armature(obact))) {
+               if((obpose= object_pose_armature_get(obact))) {
                        if((obact == obpose) || (obact->mode & OB_MODE_WEIGHT_PAINT)) {
                                return 1;
                        }
index 5609f05fb9332a62c523e3be27bcbe407ef5ae26..a75668280cd7caf1018fad5bc103153c777e9ffe 100644 (file)
@@ -184,7 +184,6 @@ void        ED_area_headerprint(struct ScrArea *sa, char *str){}
 
 struct EditBone *ED_armature_bone_get_mirrored(struct ListBase *edbo, struct EditBone *ebo){return (struct EditBone *) NULL;}
 struct EditBone *ED_armature_edit_bone_add(struct bArmature *arm, char *name){return (struct EditBone*) NULL;}
-struct Object *ED_object_pose_armature(struct Object *ob){ return (struct Object *)NULL; }
 struct ListBase *get_active_constraints (struct Object *ob){return (struct ListBase *) NULL;}
 struct ListBase *get_constraint_lb(struct Object *ob, struct bConstraint *con, struct bPoseChannel **pchan_r){return (struct ListBase *) NULL;}
 int ED_pose_channel_in_IK_chain(struct Object *ob, struct bPoseChannel *pchan){return 0;}