diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-05-05 18:03:12 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-05-05 18:03:12 +0400 |
commit | a731e130432a98ab8228112027cd3eaa8ed700b1 (patch) | |
tree | e71dad8f907ccd4a73b7bbc1ad166eda2dfba9cf /source/blender/editors/armature | |
parent | a30dec8e5968ae6568184cfdc2e1a69bad0e39d6 (diff) |
code cleanup: function naming, use BKE_*type* prefix.
Diffstat (limited to 'source/blender/editors/armature')
-rw-r--r-- | source/blender/editors/armature/editarmature.c | 22 | ||||
-rw-r--r-- | source/blender/editors/armature/poseSlide.c | 4 | ||||
-rw-r--r-- | source/blender/editors/armature/poselib.c | 4 | ||||
-rw-r--r-- | source/blender/editors/armature/poseobject.c | 46 |
4 files changed, 38 insertions, 38 deletions
diff --git a/source/blender/editors/armature/editarmature.c b/source/blender/editors/armature/editarmature.c index a2e95622bcf..5c43ba6e67f 100644 --- a/source/blender/editors/armature/editarmature.c +++ b/source/blender/editors/armature/editarmature.c @@ -632,9 +632,9 @@ static void applyarmature_fix_boneparents (Scene *scene, Object *armob) /* apply current transform from parent (not yet destroyed), * then calculate new parent inverse matrix */ - object_apply_mat4(ob, ob->obmat, FALSE, FALSE); + BKE_object_apply_mat4(ob, ob->obmat, FALSE, FALSE); - what_does_parent(scene, ob, &workob); + BKE_object_workob_calc_parent(scene, ob, &workob); invert_m4_m4(ob->parentinv, workob.obmat); } } @@ -644,7 +644,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= object_pose_armature_get(CTX_data_active_object(C)); // must be active object, not edit-object + Object *ob= BKE_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; @@ -653,7 +653,7 @@ static int apply_armature_pose2bones_exec (bContext *C, wmOperator *op) /* don't check if editmode (should be done by caller) */ if (ob->type!=OB_ARMATURE) return OPERATOR_CANCELLED; - if (object_data_is_libdata(ob)) { + if (BKE_object_obdata_is_libdata(ob)) { BKE_report(op->reports, RPT_ERROR, "Cannot apply pose to lib-linked armature"); //error_libdata(); return OPERATOR_CANCELLED; } @@ -746,7 +746,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= object_pose_armature_get(CTX_data_active_object(C)); // must be active object, not edit-object + Object *ob= BKE_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) @@ -5088,7 +5088,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= object_pose_armature_get(CTX_data_active_object(C)); + Object *ob= BKE_object_pose_armature_get(CTX_data_active_object(C)); short autokey = 0; /* sanity checks */ @@ -5292,7 +5292,7 @@ void POSE_OT_select_all(wmOperatorType *ot) static int pose_select_parent_exec(bContext *C, wmOperator *UNUSED(op)) { - Object *ob= object_pose_armature_get(CTX_data_active_object(C)); + Object *ob= BKE_object_pose_armature_get(CTX_data_active_object(C)); bPoseChannel *pchan, *parent; /* Determine if there is an active bone */ @@ -5368,7 +5368,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= object_pose_armature_get(CTX_data_active_object(C)); + Object *ob= BKE_object_pose_armature_get(CTX_data_active_object(C)); bArmature *arm= ob->data; if (RNA_boolean_get(op->ptr, "unselected")) @@ -5417,7 +5417,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= object_pose_armature_get(CTX_data_active_object(C)); + Object *ob= BKE_object_pose_armature_get(CTX_data_active_object(C)); bArmature *arm= ob->data; bone_looper(ob, arm->bonebase.first, NULL, show_pose_bone_cb); @@ -5932,7 +5932,7 @@ void generateSkeletonFromReebGraph(Scene *scene, ReebGraph *rg) ED_armature_edit_free(obedit); } - dst = add_object(scene, OB_ARMATURE); + dst = BKE_object_add(scene, OB_ARMATURE); ED_object_base_init_transform(NULL, scene->basact, NULL, NULL); // XXX NULL is C, loc, rot obedit= scene->basact->object; @@ -5941,7 +5941,7 @@ void generateSkeletonFromReebGraph(Scene *scene, ReebGraph *rg) mat4_to_eul(dst->rot, src->obmat); mat4_to_size(dst->size, src->obmat); - where_is_object(scene, obedit); + BKE_object_where_is_calc(scene, obedit); ED_armature_to_edit(obedit); diff --git a/source/blender/editors/armature/poseSlide.c b/source/blender/editors/armature/poseSlide.c index 40dc0a7cd36..f33dce00f8d 100644 --- a/source/blender/editors/armature/poseSlide.c +++ b/source/blender/editors/armature/poseSlide.c @@ -130,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= object_pose_armature_get(CTX_data_active_object(C)); + pso->ob= BKE_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() */ @@ -1165,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= object_pose_armature_get(CTX_data_active_object(C)); + Object *ob= BKE_object_pose_armature_get(CTX_data_active_object(C)); bAction *act= (ob && ob->adt)? ob->adt->action : NULL; ListBase pflinks = {NULL, NULL}; diff --git a/source/blender/editors/armature/poselib.c b/source/blender/editors/armature/poselib.c index 8791a345489..3b01ba20dd5 100644 --- a/source/blender/editors/armature/poselib.c +++ b/source/blender/editors/armature/poselib.c @@ -174,7 +174,7 @@ static Object *get_poselib_object (bContext *C) if (sa && (sa->spacetype == SPACE_BUTS)) return ED_object_context(C); else - return object_pose_armature_get(CTX_data_active_object(C)); + return BKE_object_pose_armature_get(CTX_data_active_object(C)); } /* Poll callback for operators that require existing PoseLib data (with poses) to work */ @@ -650,7 +650,7 @@ static int poselib_rename_invoke (bContext *C, wmOperator *op, wmEvent *evt) static int poselib_rename_exec (bContext *C, wmOperator *op) { - Object *ob= object_pose_armature_get(CTX_data_active_object(C)); + Object *ob= BKE_object_pose_armature_get(CTX_data_active_object(C)); bAction *act= (ob) ? ob->poselib : NULL; TimeMarker *marker; char newname[64]; diff --git a/source/blender/editors/armature/poseobject.c b/source/blender/editors/armature/poseobject.c index 8a2af14e6f3..95e7a845a78 100644 --- a/source/blender/editors/armature/poseobject.c +++ b/source/blender/editors/armature/poseobject.c @@ -200,7 +200,7 @@ void ED_pose_recalculate_paths(Scene *scene, Object *ob) /* show popup to determine settings */ static int pose_calculate_paths_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event)) { - Object *ob = object_pose_armature_get(CTX_data_active_object(C)); + Object *ob = BKE_object_pose_armature_get(CTX_data_active_object(C)); if (ELEM(NULL, ob, ob->pose)) return OPERATOR_CANCELLED; @@ -227,7 +227,7 @@ static int pose_calculate_paths_invoke(bContext *C, wmOperator *op, wmEvent *UNU */ static int pose_calculate_paths_exec(bContext *C, wmOperator *op) { - Object *ob = object_pose_armature_get(CTX_data_active_object(C)); + Object *ob = BKE_object_pose_armature_get(CTX_data_active_object(C)); Scene *scene= CTX_data_scene(C); if (ELEM(NULL, ob, ob->pose)) @@ -320,7 +320,7 @@ static void ED_pose_clear_paths(Object *ob) /* operator callback for this */ static int pose_clear_paths_exec (bContext *C, wmOperator *UNUSED(op)) { - Object *ob = object_pose_armature_get(CTX_data_active_object(C)); + Object *ob = BKE_object_pose_armature_get(CTX_data_active_object(C)); /* only continue if there's an object */ if (ELEM(NULL, ob, ob->pose)) @@ -354,7 +354,7 @@ void POSE_OT_paths_clear(wmOperatorType *ot) static int pose_select_constraint_target_exec(bContext *C, wmOperator *UNUSED(op)) { - Object *ob= object_pose_armature_get(CTX_data_active_object(C)); + Object *ob= BKE_object_pose_armature_get(CTX_data_active_object(C)); bConstraint *con; int found= 0; @@ -414,7 +414,7 @@ void POSE_OT_select_constraint_target(wmOperatorType *ot) static int pose_select_hierarchy_exec(bContext *C, wmOperator *op) { - Object *ob= object_pose_armature_get(CTX_data_active_object(C)); + Object *ob= BKE_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"); @@ -674,7 +674,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= object_pose_armature_get(CTX_data_active_object(C)); + Object *ob= BKE_object_pose_armature_get(CTX_data_active_object(C)); short extend= RNA_boolean_get(op->ptr, "extend"); short changed = 0; @@ -741,7 +741,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= object_pose_armature_get(ob_act); + Object *ob= BKE_object_pose_armature_get(ob_act); if (ob && (ob->mode & OB_MODE_POSE)) { bArmature *arm= ob->data; @@ -1163,7 +1163,7 @@ static bPoseChannel *pose_bone_do_paste (Object *ob, bPoseChannel *chan, short s static int pose_copy_exec (bContext *C, wmOperator *op) { - Object *ob= object_pose_armature_get(CTX_data_active_object(C)); + Object *ob= BKE_object_pose_armature_get(CTX_data_active_object(C)); /* sanity checking */ if (ELEM(NULL, ob, ob->pose)) { @@ -1201,7 +1201,7 @@ void POSE_OT_copy(wmOperatorType *ot) static int pose_paste_exec (bContext *C, wmOperator *op) { - Object *ob= object_pose_armature_get(CTX_data_active_object(C)); + Object *ob= BKE_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"); @@ -1284,7 +1284,7 @@ static int pose_group_add_exec (bContext *C, wmOperator *UNUSED(op)) if (sa->spacetype == SPACE_BUTS) ob= ED_object_context(C); else - ob= object_pose_armature_get(CTX_data_active_object(C)); + ob= BKE_object_pose_armature_get(CTX_data_active_object(C)); /* only continue if there's an object */ if (ob == NULL) @@ -1324,7 +1324,7 @@ static int pose_group_remove_exec (bContext *C, wmOperator *UNUSED(op)) if (sa->spacetype == SPACE_BUTS) ob= ED_object_context(C); else - ob= object_pose_armature_get(CTX_data_active_object(C)); + ob= BKE_object_pose_armature_get(CTX_data_active_object(C)); /* only continue if there's an object */ if (ob == NULL) @@ -1372,7 +1372,7 @@ static int pose_groups_menu_invoke (bContext *C, wmOperator *op, wmEvent *UNUSED if (sa->spacetype == SPACE_BUTS) ob= ED_object_context(C); else - ob= object_pose_armature_get(CTX_data_active_object(C)); + ob= BKE_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)) @@ -1421,7 +1421,7 @@ static int pose_group_assign_exec (bContext *C, wmOperator *op) if (sa->spacetype == SPACE_BUTS) ob= ED_object_context(C); else - ob= object_pose_armature_get(CTX_data_active_object(C)); + ob= BKE_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)) @@ -1484,7 +1484,7 @@ static int pose_group_unassign_exec (bContext *C, wmOperator *UNUSED(op)) if (sa->spacetype == SPACE_BUTS) ob= ED_object_context(C); else - ob= object_pose_armature_get(CTX_data_active_object(C)); + ob= BKE_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)) @@ -1719,7 +1719,7 @@ static int pose_group_select_exec (bContext *C, wmOperator *UNUSED(op)) if (sa->spacetype == SPACE_BUTS) ob= ED_object_context(C); else - ob= object_pose_armature_get(CTX_data_active_object(C)); + ob= BKE_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)) @@ -1757,7 +1757,7 @@ static int pose_group_deselect_exec (bContext *C, wmOperator *UNUSED(op)) if (sa->spacetype == SPACE_BUTS) ob= ED_object_context(C); else - ob= object_pose_armature_get(CTX_data_active_object(C)); + ob= BKE_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)) @@ -1790,7 +1790,7 @@ void POSE_OT_group_deselect(wmOperatorType *ot) static int pose_flip_names_exec (bContext *C, wmOperator *UNUSED(op)) { - Object *ob= object_pose_armature_get(CTX_data_active_object(C)); + Object *ob= BKE_object_pose_armature_get(CTX_data_active_object(C)); bArmature *arm; /* paranoia checks */ @@ -1835,7 +1835,7 @@ void POSE_OT_flip_names(wmOperatorType *ot) static int pose_autoside_names_exec (bContext *C, wmOperator *op) { - Object *ob= object_pose_armature_get(CTX_data_active_object(C)); + Object *ob= BKE_object_pose_armature_get(CTX_data_active_object(C)); bArmature *arm; char newname[MAXBONENAME]; short axis= RNA_enum_get(op->ptr, "axis"); @@ -1939,7 +1939,7 @@ static int pose_armature_layers_showall_poll (bContext *C) static int pose_armature_layers_showall_exec (bContext *C, wmOperator *op) { - Object *ob= object_pose_armature_get(CTX_data_active_object(C)); + Object *ob= BKE_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; @@ -1991,7 +1991,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= object_pose_armature_get(CTX_data_active_object(C)); + Object *ob= BKE_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... */ @@ -2012,7 +2012,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= object_pose_armature_get(CTX_data_active_object(C)); + Object *ob= BKE_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... */ @@ -2102,7 +2102,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= object_pose_armature_get(CTX_data_active_object(C)); + Object *ob= BKE_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... */ @@ -2225,7 +2225,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= object_pose_armature_get(CTX_data_active_object(C)); + Object *ob= BKE_object_pose_armature_get(CTX_data_active_object(C)); KeyingSet *ks = ANIM_builtin_keyingset_get_named(NULL, ANIM_KS_LOC_ROT_SCALE_ID); /* loop through all selected pchans, flipping and keying (as needed) */ |