Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/editors/space_view3d/view3d_snap.c')
-rw-r--r--source/blender/editors/space_view3d/view3d_snap.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/source/blender/editors/space_view3d/view3d_snap.c b/source/blender/editors/space_view3d/view3d_snap.c
index 40dd2f0f428..1df29201bf6 100644
--- a/source/blender/editors/space_view3d/view3d_snap.c
+++ b/source/blender/editors/space_view3d/view3d_snap.c
@@ -113,7 +113,7 @@ static int snap_sel_to_grid_exec(bContext *C, wmOperator *UNUSED(op))
CTX_DATA_BEGIN (C, Object *, ob, selected_editable_objects)
{
- if (eval_ctx.object_mode & OB_MODE_POSE) {
+ if (ob->mode & OB_MODE_POSE) {
bPoseChannel *pchan;
bArmature *arm = ob->data;
@@ -272,7 +272,7 @@ static int snap_selected_to_location(bContext *C, const float snap_target_global
ED_transverts_update_obedit(&tvs, obedit);
ED_transverts_free(&tvs);
}
- else if (obact && (eval_ctx.object_mode & OB_MODE_POSE)) {
+ else if (obact && (obact->mode & OB_MODE_POSE)) {
struct KeyingSet *ks = ANIM_get_keyingset_for_autokeying(scene, ANIM_KS_LOCATION_ID);
bPoseChannel *pchan;
@@ -554,8 +554,6 @@ static void bundle_midpoint(Scene *scene, Object *ob, float vec[3])
static bool snap_curs_to_sel_ex(bContext *C, float cursor[3])
{
- EvaluationContext eval_ctx;
- CTX_data_eval_ctx(C, &eval_ctx);
Object *obedit = CTX_data_edit_object(C);
Scene *scene = CTX_data_scene(C);
View3D *v3d = CTX_wm_view3d(C);
@@ -601,7 +599,7 @@ static bool snap_curs_to_sel_ex(bContext *C, float cursor[3])
else {
Object *obact = CTX_data_active_object(C);
- if (obact && (eval_ctx.object_mode & OB_MODE_POSE)) {
+ if (obact && (obact->mode & OB_MODE_POSE)) {
bArmature *arm = obact->data;
bPoseChannel *pchan;
for (pchan = obact->pose->chanbase.first; pchan; pchan = pchan->next) {
@@ -703,8 +701,7 @@ static bool snap_calc_active_center(bContext *C, const bool select_only, float r
Object *ob = CTX_data_active_object(C);
if (ob) {
- const WorkSpace *workspace = CTX_wm_workspace(C);
- if (workspace->object_mode & OB_MODE_POSE) {
+ if (ob->mode & OB_MODE_POSE) {
bPoseChannel *pchan = BKE_pose_channel_active(ob);
if (pchan) {
if (!select_only || (pchan->bone->flag & BONE_SELECTED)) {