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:
authorCampbell Barton <ideasman42@gmail.com>2018-12-19 12:51:04 +0300
committerCampbell Barton <ideasman42@gmail.com>2018-12-19 12:57:51 +0300
commitf7dc6a63fb5a62eb6141fee375e30d94c1d83fa8 (patch)
treecdf3a5c3d50bc893a98e52c48a7a71a9a70a7c72 /source/blender/editors/mesh/editmesh_extrude_spin_gizmo.c
parent231ea39ed154b8284f45e97b10fbb699e79358c3 (diff)
Gizmo: optional custom orientations for transform
This aims to resolve a conflict where some users want to keep keyboard axis setting global, even when the orientation is set to something else. Move/rotate/scale can optionally each have a separate orientation. Some UI changes will be made next.
Diffstat (limited to 'source/blender/editors/mesh/editmesh_extrude_spin_gizmo.c')
-rw-r--r--source/blender/editors/mesh/editmesh_extrude_spin_gizmo.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/editors/mesh/editmesh_extrude_spin_gizmo.c b/source/blender/editors/mesh/editmesh_extrude_spin_gizmo.c
index 92b655b6d8d..dd5f97cd010 100644
--- a/source/blender/editors/mesh/editmesh_extrude_spin_gizmo.c
+++ b/source/blender/editors/mesh/editmesh_extrude_spin_gizmo.c
@@ -25,6 +25,7 @@
#include "BLI_math.h"
#include "BKE_context.h"
+#include "BKE_scene.h"
#include "RNA_define.h"
#include "RNA_access.h"
@@ -244,7 +245,8 @@ static void gizmo_mesh_spin_init_draw_prepare(
{
Scene *scene = CTX_data_scene(C);
- switch (scene->orientation_type) {
+ const TransformOrientationSlot *orient_slot = BKE_scene_orientation_slot_get(scene, SCE_GIZMO_SHOW_ROTATE);
+ switch (orient_slot->type) {
case V3D_MANIP_VIEW:
{
if (!equals_m3m3(viewinv_m3, ggd->prev.viewinv_m3)) {
@@ -444,10 +446,8 @@ static void gizmo_mesh_spin_init_message_subscribe(
RNA_id_pointer_create(&scene->id, &scene_ptr);
{
- extern PropertyRNA rna_Scene_transform_orientation;
extern PropertyRNA rna_Scene_cursor_location;
const PropertyRNA *props[] = {
- &rna_Scene_transform_orientation,
&rna_Scene_cursor_location,
};
for (int i = 0; i < ARRAY_SIZE(props); i++) {