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-09-18 02:40:32 +0300
committerCampbell Barton <ideasman42@gmail.com>2018-09-18 02:41:54 +0300
commit5b221f1a6e6fedfa1f74b28041839b443f550fc5 (patch)
treef4d6294199b7797fb21a39280473aa34f2a5f2e6 /source/blender/editors/mesh/editmesh_extrude_spin.c
parent683d0f0a7e8fcfa7632c3b75c2752dea823538ca (diff)
Gizmo: minor tweak to spin tool
Make main angle adjustment radius larger since it's the most useful.
Diffstat (limited to 'source/blender/editors/mesh/editmesh_extrude_spin.c')
-rw-r--r--source/blender/editors/mesh/editmesh_extrude_spin.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/source/blender/editors/mesh/editmesh_extrude_spin.c b/source/blender/editors/mesh/editmesh_extrude_spin.c
index 82ce498ea4e..ec15919ab4e 100644
--- a/source/blender/editors/mesh/editmesh_extrude_spin.c
+++ b/source/blender/editors/mesh/editmesh_extrude_spin.c
@@ -79,6 +79,7 @@ typedef struct GizmoSpinGroup {
/* We could store more vars here! */
struct {
bContext *context;
+ wmOperatorType *ot;
wmOperator *op;
PropertyRNA *prop_axis_co;
PropertyRNA *prop_axis_no;
@@ -331,9 +332,10 @@ static void gizmo_mesh_spin_redo_modal_from_setup(
static void gizmo_mesh_spin_setup(const bContext *C, wmGizmoGroup *gzgroup)
{
+ wmOperatorType *ot = WM_operatortype_find("MESH_OT_spin", true);
wmOperator *op = WM_operator_last_redo(C);
- if (op == NULL || !STREQ(op->type->idname, "MESH_OT_spin")) {
+ if ((op == NULL) || (op->type != ot)) {
return;
}
@@ -362,14 +364,15 @@ static void gizmo_mesh_spin_setup(const bContext *C, wmGizmoGroup *gzgroup)
WM_gizmo_set_flag(ggd->rotate_c, WM_GIZMO_DRAW_VALUE, true);
WM_gizmo_set_flag(ggd->angle_z, WM_GIZMO_DRAW_VALUE, true);
- WM_gizmo_set_scale(ggd->angle_z, 0.5f);
+ WM_gizmo_set_scale(ggd->rotate_c, 0.8f);
{
ggd->data.context = (bContext *)C;
+ ggd->data.ot = ot;
ggd->data.op = op;
- ggd->data.prop_axis_co = RNA_struct_find_property(op->ptr, "center");
- ggd->data.prop_axis_no = RNA_struct_find_property(op->ptr, "axis");
- ggd->data.prop_angle = RNA_struct_find_property(op->ptr, "angle");
+ ggd->data.prop_axis_co = RNA_struct_type_find_property(ot->srna, "center");
+ ggd->data.prop_axis_no = RNA_struct_type_find_property(ot->srna, "axis");
+ ggd->data.prop_angle = RNA_struct_type_find_property(ot->srna, "angle");
}
gizmo_mesh_spin_update_from_op(ggd);