diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-05-08 15:18:09 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-05-08 16:35:04 +0300 |
commit | a48186c5d74b3d353c5c65cd4a930dd98cc9a603 (patch) | |
tree | c49fd2af2aaac151c5fd1265e414392617043253 /source/blender/editors/object | |
parent | 53a56b7b6c169b21df475ae94795208501581489 (diff) |
Orientation for 3D cursor
Currently set when setting the cursor location,
optionally used as an orientation type.
Intended for use by tools too.
See: D3208
Diffstat (limited to 'source/blender/editors/object')
-rw-r--r-- | source/blender/editors/object/object_add.c | 2 | ||||
-rw-r--r-- | source/blender/editors/object/object_hook.c | 2 | ||||
-rw-r--r-- | source/blender/editors/object/object_transform.c | 2 | ||||
-rw-r--r-- | source/blender/editors/object/object_warp.c | 2 |
4 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/editors/object/object_add.c b/source/blender/editors/object/object_add.c index c2934b916d0..7a0bd44411e 100644 --- a/source/blender/editors/object/object_add.c +++ b/source/blender/editors/object/object_add.c @@ -165,7 +165,7 @@ void ED_object_location_from_view(bContext *C, float loc[3]) Scene *scene = CTX_data_scene(C); const float *cursor; - cursor = ED_view3d_cursor3d_get(scene, v3d); + cursor = ED_view3d_cursor3d_get(scene, v3d)->location; copy_v3_v3(loc, cursor); } diff --git a/source/blender/editors/object/object_hook.c b/source/blender/editors/object/object_hook.c index b5a71bb7a35..8c68431c19a 100644 --- a/source/blender/editors/object/object_hook.c +++ b/source/blender/editors/object/object_hook.c @@ -781,7 +781,7 @@ static int object_hook_recenter_exec(bContext *C, wmOperator *op) copy_m3_m4(bmat, ob->obmat); invert_m3_m3(imat, bmat); - sub_v3_v3v3(hmd->cent, scene->cursor, ob->obmat[3]); + sub_v3_v3v3(hmd->cent, scene->cursor.location, ob->obmat[3]); mul_m3_v3(imat, hmd->cent); DEG_id_tag_update(&ob->id, OB_RECALC_DATA); diff --git a/source/blender/editors/object/object_transform.c b/source/blender/editors/object/object_transform.c index f3045d44826..0db880a22c6 100644 --- a/source/blender/editors/object/object_transform.c +++ b/source/blender/editors/object/object_transform.c @@ -787,7 +787,7 @@ static int object_origin_set_exec(bContext *C, wmOperator *op) else { /* get the view settings if 'around' isn't set and the view is available */ View3D *v3d = CTX_wm_view3d(C); - copy_v3_v3(cursor, ED_view3d_cursor3d_get(scene, v3d)); + copy_v3_v3(cursor, ED_view3d_cursor3d_get(scene, v3d)->location); if (v3d && !RNA_struct_property_is_set(op->ptr, "center")) around = v3d->around; } diff --git a/source/blender/editors/object/object_warp.c b/source/blender/editors/object/object_warp.c index 92b82e2a31b..008593739ba 100644 --- a/source/blender/editors/object/object_warp.c +++ b/source/blender/editors/object/object_warp.c @@ -227,7 +227,7 @@ static int object_warp_verts_exec(bContext *C, wmOperator *op) View3D *v3d = CTX_wm_view3d(C); const float *cursor; - cursor = ED_view3d_cursor3d_get(scene, v3d); + cursor = ED_view3d_cursor3d_get(scene, v3d)->location; copy_v3_v3(center, cursor); RNA_property_float_set_array(op->ptr, prop_center, center); |