diff options
Diffstat (limited to 'source/blender/editors')
5 files changed, 43 insertions, 43 deletions
diff --git a/source/blender/editors/interface/interface_region_tooltip.c b/source/blender/editors/interface/interface_region_tooltip.c index 0645d58cc5f..e410421479c 100644 --- a/source/blender/editors/interface/interface_region_tooltip.c +++ b/source/blender/editors/interface/interface_region_tooltip.c @@ -872,7 +872,7 @@ static uiTooltipData *ui_tooltip_data_from_gizmo(bContext *C, wmGizmo *gz) const struct { int part; const char *prefix; - } mpop_actions[] = { + } gzop_actions[] = { { .part = gz->highlight_part, .prefix = use_drag ? TIP_("Click") : NULL, @@ -882,19 +882,19 @@ static uiTooltipData *ui_tooltip_data_from_gizmo(bContext *C, wmGizmo *gz) }, }; - for (int i = 0; i < ARRAY_SIZE(mpop_actions); i++) { - wmGizmoOpElem *mpop = (mpop_actions[i].part != -1) ? WM_gizmo_operator_get(gz, mpop_actions[i].part) : NULL; - if (mpop != NULL) { + for (int i = 0; i < ARRAY_SIZE(gzop_actions); i++) { + wmGizmoOpElem *gzop = (gzop_actions[i].part != -1) ? WM_gizmo_operator_get(gz, gzop_actions[i].part) : NULL; + if (gzop != NULL) { /* Description */ - const char *info = RNA_struct_ui_description(mpop->type->srna); + const char *info = RNA_struct_ui_description(gzop->type->srna); if (!(info && info[0])) { - info = RNA_struct_ui_name(mpop->type->srna); + info = RNA_struct_ui_name(gzop->type->srna); } if (info && info[0]) { char *text = NULL; - if (mpop_actions[i].prefix != NULL) { - text = BLI_sprintfN("%s: %s", mpop_actions[i].prefix, info); + if (gzop_actions[i].prefix != NULL) { + text = BLI_sprintfN("%s: %s", gzop_actions[i].prefix, info); } else { text = BLI_strdup(info); @@ -914,10 +914,10 @@ static uiTooltipData *ui_tooltip_data_from_gizmo(bContext *C, wmGizmo *gz) /* Shortcut */ { bool found = false; - IDProperty *prop = mpop->ptr.data; + IDProperty *prop = gzop->ptr.data; char buf[128]; if (WM_key_event_operator_string( - C, mpop->type->idname, WM_OP_INVOKE_DEFAULT, prop, true, + C, gzop->type->idname, WM_OP_INVOKE_DEFAULT, prop, true, buf, ARRAY_SIZE(buf))) { found = true; diff --git a/source/blender/editors/mesh/editmesh_extrude_gizmo.c b/source/blender/editors/mesh/editmesh_extrude_gizmo.c index b934a8d27bc..e0b1f5e9916 100644 --- a/source/blender/editors/mesh/editmesh_extrude_gizmo.c +++ b/source/blender/editors/mesh/editmesh_extrude_gizmo.c @@ -187,8 +187,8 @@ static void gizmo_mesh_extrude_setup(const bContext *UNUSED(C), wmGizmoGroup *gz RNA_boolean_set(¯optr, "release_confirm", true); RNA_boolean_set_array(¯optr, "constraint_axis", constraint); } - wmGizmoOpElem *mpop = WM_gizmo_operator_get(ggd->adjust_xyz_no[i], 0); - mpop->is_redo = true; + wmGizmoOpElem *gzop = WM_gizmo_operator_get(ggd->adjust_xyz_no[i], 0); + gzop->is_redo = true; } } @@ -280,8 +280,8 @@ static void gizmo_mesh_extrude_refresh(const bContext *C, wmGizmoGroup *gzgroup) /* Operator properties. */ if (use_normal) { - wmGizmoOpElem *mpop = WM_gizmo_operator_get(ggd->invoke_xyz_no[3], 0); - PointerRNA macroptr = RNA_pointer_get(&mpop->ptr, "TRANSFORM_OT_translate"); + wmGizmoOpElem *gzop = WM_gizmo_operator_get(ggd->invoke_xyz_no[3], 0); + PointerRNA macroptr = RNA_pointer_get(&gzop->ptr, "TRANSFORM_OT_translate"); RNA_enum_set(¯optr, "constraint_orientation", V3D_MANIP_NORMAL); } @@ -300,9 +300,9 @@ static void gizmo_mesh_extrude_refresh(const bContext *C, wmGizmoGroup *gzgroup) (orientation_type == ggd->data.orientation_type && constraint_axis[i]) : (orientation_type == V3D_MANIP_NORMAL && constraint_axis[2])) { - wmGizmoOpElem *mpop = WM_gizmo_operator_get(ggd->adjust_xyz_no[i], 0); + wmGizmoOpElem *gzop = WM_gizmo_operator_get(ggd->adjust_xyz_no[i], 0); - PointerRNA macroptr = RNA_pointer_get(&mpop->ptr, "TRANSFORM_OT_translate"); + PointerRNA macroptr = RNA_pointer_get(&gzop->ptr, "TRANSFORM_OT_translate"); RNA_float_set_array(¯optr, "value", value); RNA_boolean_set_array(¯optr, "constraint_axis", constraint_axis); diff --git a/source/blender/editors/space_view3d/view3d_gizmo_navigate.c b/source/blender/editors/space_view3d/view3d_gizmo_navigate.c index 63c15c7fe5d..d17f0df0c20 100644 --- a/source/blender/editors/space_view3d/view3d_gizmo_navigate.c +++ b/source/blender/editors/space_view3d/view3d_gizmo_navigate.c @@ -192,8 +192,8 @@ static void WIDGETGROUP_navigate_setup(const bContext *UNUSED(C), wmGizmoGroup * int gz_ids[] = {MPR_MOVE, MPR_ROTATE, MPR_ZOOM}; for (int i = 0; i < ARRAY_SIZE(gz_ids); i++) { wmGizmo *gz = navgroup->gz_array[gz_ids[i]]; - wmGizmoOpElem *mpop = WM_gizmo_operator_get(gz, 0); - RNA_boolean_set(&mpop->ptr, "use_mouse_init", false); + wmGizmoOpElem *gzop = WM_gizmo_operator_get(gz, 0); + RNA_boolean_set(&gzop->ptr, "use_mouse_init", false); } } diff --git a/source/blender/editors/transform/transform_gizmo_2d.c b/source/blender/editors/transform/transform_gizmo_2d.c index 708b74086b5..48c18ef2d8a 100644 --- a/source/blender/editors/transform/transform_gizmo_2d.c +++ b/source/blender/editors/transform/transform_gizmo_2d.c @@ -303,33 +303,33 @@ void ED_widgetgroup_gizmo2d_refresh(const bContext *C, wmGizmoGroup *gzgroup) } if (show_cage) { - wmGizmoOpElem *mpop; + wmGizmoOpElem *gzop; float mid[2]; const float *min = ggd->min; const float *max = ggd->max; mid_v2_v2v2(mid, min, max); - mpop = WM_gizmo_operator_get(ggd->cage, ED_GIZMO_CAGE2D_PART_SCALE_MIN_X); - PropertyRNA *prop_center_override = RNA_struct_find_property(&mpop->ptr, "center_override"); - RNA_property_float_set_array(&mpop->ptr, prop_center_override, (float[3]){max[0], mid[1], 0.0f}); - mpop = WM_gizmo_operator_get(ggd->cage, ED_GIZMO_CAGE2D_PART_SCALE_MAX_X); - RNA_property_float_set_array(&mpop->ptr, prop_center_override, (float[3]){min[0], mid[1], 0.0f}); - mpop = WM_gizmo_operator_get(ggd->cage, ED_GIZMO_CAGE2D_PART_SCALE_MIN_Y); - RNA_property_float_set_array(&mpop->ptr, prop_center_override, (float[3]){mid[0], max[1], 0.0f}); - mpop = WM_gizmo_operator_get(ggd->cage, ED_GIZMO_CAGE2D_PART_SCALE_MAX_Y); - RNA_property_float_set_array(&mpop->ptr, prop_center_override, (float[3]){mid[0], min[1], 0.0f}); - - mpop = WM_gizmo_operator_get(ggd->cage, ED_GIZMO_CAGE2D_PART_SCALE_MIN_X_MIN_Y); - RNA_property_float_set_array(&mpop->ptr, prop_center_override, (float[3]){max[0], max[1], 0.0f}); - mpop = WM_gizmo_operator_get(ggd->cage, ED_GIZMO_CAGE2D_PART_SCALE_MIN_X_MAX_Y); - RNA_property_float_set_array(&mpop->ptr, prop_center_override, (float[3]){max[0], min[1], 0.0f}); - mpop = WM_gizmo_operator_get(ggd->cage, ED_GIZMO_CAGE2D_PART_SCALE_MAX_X_MIN_Y); - RNA_property_float_set_array(&mpop->ptr, prop_center_override, (float[3]){min[0], max[1], 0.0f}); - mpop = WM_gizmo_operator_get(ggd->cage, ED_GIZMO_CAGE2D_PART_SCALE_MAX_X_MAX_Y); - RNA_property_float_set_array(&mpop->ptr, prop_center_override, (float[3]){min[0], min[1], 0.0f}); - - mpop = WM_gizmo_operator_get(ggd->cage, ED_GIZMO_CAGE2D_PART_ROTATE); - RNA_property_float_set_array(&mpop->ptr, prop_center_override, (float[3]){mid[0], mid[1], 0.0f}); + gzop = WM_gizmo_operator_get(ggd->cage, ED_GIZMO_CAGE2D_PART_SCALE_MIN_X); + PropertyRNA *prop_center_override = RNA_struct_find_property(&gzop->ptr, "center_override"); + RNA_property_float_set_array(&gzop->ptr, prop_center_override, (float[3]){max[0], mid[1], 0.0f}); + gzop = WM_gizmo_operator_get(ggd->cage, ED_GIZMO_CAGE2D_PART_SCALE_MAX_X); + RNA_property_float_set_array(&gzop->ptr, prop_center_override, (float[3]){min[0], mid[1], 0.0f}); + gzop = WM_gizmo_operator_get(ggd->cage, ED_GIZMO_CAGE2D_PART_SCALE_MIN_Y); + RNA_property_float_set_array(&gzop->ptr, prop_center_override, (float[3]){mid[0], max[1], 0.0f}); + gzop = WM_gizmo_operator_get(ggd->cage, ED_GIZMO_CAGE2D_PART_SCALE_MAX_Y); + RNA_property_float_set_array(&gzop->ptr, prop_center_override, (float[3]){mid[0], min[1], 0.0f}); + + gzop = WM_gizmo_operator_get(ggd->cage, ED_GIZMO_CAGE2D_PART_SCALE_MIN_X_MIN_Y); + RNA_property_float_set_array(&gzop->ptr, prop_center_override, (float[3]){max[0], max[1], 0.0f}); + gzop = WM_gizmo_operator_get(ggd->cage, ED_GIZMO_CAGE2D_PART_SCALE_MIN_X_MAX_Y); + RNA_property_float_set_array(&gzop->ptr, prop_center_override, (float[3]){max[0], min[1], 0.0f}); + gzop = WM_gizmo_operator_get(ggd->cage, ED_GIZMO_CAGE2D_PART_SCALE_MAX_X_MIN_Y); + RNA_property_float_set_array(&gzop->ptr, prop_center_override, (float[3]){min[0], max[1], 0.0f}); + gzop = WM_gizmo_operator_get(ggd->cage, ED_GIZMO_CAGE2D_PART_SCALE_MAX_X_MAX_Y); + RNA_property_float_set_array(&gzop->ptr, prop_center_override, (float[3]){min[0], min[1], 0.0f}); + + gzop = WM_gizmo_operator_get(ggd->cage, ED_GIZMO_CAGE2D_PART_ROTATE); + RNA_property_float_set_array(&gzop->ptr, prop_center_override, (float[3]){mid[0], mid[1], 0.0f}); } } diff --git a/source/blender/editors/transform/transform_gizmo_3d.c b/source/blender/editors/transform/transform_gizmo_3d.c index 11a93843939..98a0e880ef6 100644 --- a/source/blender/editors/transform/transform_gizmo_3d.c +++ b/source/blender/editors/transform/transform_gizmo_3d.c @@ -1919,12 +1919,12 @@ static void WIDGETGROUP_xform_cage_refresh(const bContext *C, wmGizmoGroup *gzgr center[1] = (float)(1 - y) * dims[1]; for (int z = 0; z < 3; z++) { center[2] = (float)(1 - z) * dims[2]; - struct wmGizmoOpElem *mpop = WM_gizmo_operator_get(gz, i); + struct wmGizmoOpElem *gzop = WM_gizmo_operator_get(gz, i); if (prop_center_override == NULL) { - prop_center_override = RNA_struct_find_property(&mpop->ptr, "center_override"); + prop_center_override = RNA_struct_find_property(&gzop->ptr, "center_override"); } mul_v3_m4v3(center_global, matrix_offset_global, center); - RNA_property_float_set_array(&mpop->ptr, prop_center_override, center_global); + RNA_property_float_set_array(&gzop->ptr, prop_center_override, center_global); i++; } } |