Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/mesh/editmesh_extrude_spin_gizmo.c
| Show All 12 Lines | |||||
| * along with this program; if not, write to the Free Software Foundation, | * along with this program; if not, write to the Free Software Foundation, | ||||
| * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | ||||
| */ | */ | ||||
| /** \file | /** \file | ||||
| * \ingroup edmesh | * \ingroup edmesh | ||||
| */ | */ | ||||
| #include "BLI_blenlib.h" | |||||
| #include "BLI_math.h" | #include "BLI_math.h" | ||||
| #include "BKE_context.h" | #include "BKE_context.h" | ||||
| #include "BKE_scene.h" | #include "BKE_scene.h" | ||||
| #include "RNA_access.h" | #include "RNA_access.h" | ||||
| #include "RNA_define.h" | #include "RNA_define.h" | ||||
| #include "RNA_enum_types.h" | #include "RNA_enum_types.h" | ||||
| ▲ Show 20 Lines • Show All 996 Lines • ▼ Show 20 Lines | static void gizmo_mesh_spin_redo_draw_prepare(const bContext *UNUSED(C), wmGizmoGroup *gzgroup) | ||||
| if (ggd->data.op->next) { | if (ggd->data.op->next) { | ||||
| ggd->data.op = WM_operator_last_redo((bContext *)ggd->data.context); | ggd->data.op = WM_operator_last_redo((bContext *)ggd->data.context); | ||||
| } | } | ||||
| /* Not essential, just avoids feedback loop where matrices | /* Not essential, just avoids feedback loop where matrices | ||||
| * could shift because of float precision. | * could shift because of float precision. | ||||
| * Updates in this case are also redundant. */ | * Updates in this case are also redundant. */ | ||||
| bool is_modal = false; | bool is_modal = false; | ||||
| for (wmGizmo *gz = gzgroup->gizmos.first; gz; gz = gz->next) { | LISTBASE_FOREACH (wmGizmo *, gz, &gzgroup->gizmos) { | ||||
| if (gz->state & WM_GIZMO_STATE_MODAL) { | if (gz->state & WM_GIZMO_STATE_MODAL) { | ||||
| is_modal = true; | is_modal = true; | ||||
| break; | break; | ||||
| } | } | ||||
| } | } | ||||
| if (!is_modal) { | if (!is_modal) { | ||||
| gizmo_mesh_spin_redo_update_from_op(ggd); | gizmo_mesh_spin_redo_update_from_op(ggd); | ||||
| } | } | ||||
| Show All 31 Lines | |||||