[Bf-blender-cvs] [d3a75c48fdb] blender2.8: Cleanup: move extrude gizmo to transform module

Campbell Barton noreply at git.blender.org
Tue Nov 20 23:21:16 CET 2018


Commit: d3a75c48fdb06f7c127fd25544b641dfe44d9f01
Author: Campbell Barton
Date:   Wed Nov 21 09:20:19 2018 +1100
Branches: blender2.8
https://developer.blender.org/rBd3a75c48fdb06f7c127fd25544b641dfe44d9f01

Cleanup: move extrude gizmo to transform module

Since this is no longer mesh only, move out of mesh,
rename next.

===================================================================

M	source/blender/editors/include/ED_transform.h
M	source/blender/editors/mesh/CMakeLists.txt
M	source/blender/editors/mesh/editmesh_extrude.c
M	source/blender/editors/mesh/mesh_intern.h
M	source/blender/editors/space_view3d/space_view3d.c
M	source/blender/editors/transform/CMakeLists.txt
R097	source/blender/editors/mesh/editmesh_extrude_gizmo.c	source/blender/editors/transform/transform_gizmo_extrude_3d.c

===================================================================

diff --git a/source/blender/editors/include/ED_transform.h b/source/blender/editors/include/ED_transform.h
index 7adc2d99879..c53dd2a8e96 100644
--- a/source/blender/editors/include/ED_transform.h
+++ b/source/blender/editors/include/ED_transform.h
@@ -166,6 +166,9 @@ void TRANSFORM_GGT_gizmo(struct wmGizmoGroupType *gzgt);
 void VIEW3D_GGT_xform_cage(struct wmGizmoGroupType *gzgt);
 void VIEW3D_GGT_xform_shear(struct wmGizmoGroupType *gzgt);
 
+/* *** transform_gizmo_extrude_3d.c *** */
+void MESH_GGT_extrude(struct wmGizmoGroupType *gzgt);
+
 bool ED_widgetgroup_gizmo2d_poll(const struct bContext *C, struct wmGizmoGroupType *gzgt);
 void ED_widgetgroup_gizmo2d_setup(const struct bContext *C, struct wmGizmoGroup *gzgroup);
 void ED_widgetgroup_gizmo2d_refresh(const struct bContext *C, struct wmGizmoGroup *gzgroup);
diff --git a/source/blender/editors/mesh/CMakeLists.txt b/source/blender/editors/mesh/CMakeLists.txt
index 5e014d3ef25..4cefbf21c24 100644
--- a/source/blender/editors/mesh/CMakeLists.txt
+++ b/source/blender/editors/mesh/CMakeLists.txt
@@ -48,7 +48,6 @@ set(SRC
 	editmesh_bevel.c
 	editmesh_bisect.c
 	editmesh_extrude.c
-	editmesh_extrude_gizmo.c
 	editmesh_extrude_screw.c
 	editmesh_extrude_spin.c
 	editmesh_extrude_spin_gizmo.c
diff --git a/source/blender/editors/mesh/editmesh_extrude.c b/source/blender/editors/mesh/editmesh_extrude.c
index 714ff10f6ca..a25b296830a 100644
--- a/source/blender/editors/mesh/editmesh_extrude.c
+++ b/source/blender/editors/mesh/editmesh_extrude.c
@@ -54,8 +54,6 @@
 
 #include "mesh_intern.h"  /* own include */
 
-#define USE_GIZMO
-
 /* -------------------------------------------------------------------- */
 /** \name Extrude Internal Utilities
  * \{ */
@@ -502,10 +500,6 @@ void MESH_OT_extrude_context(wmOperatorType *ot)
 
 	RNA_def_boolean(ot->srna, "use_normal_flip", false, "Flip Normals", "");
 	Transform_Properties(ot, P_NO_DEFAULTS | P_MIRROR_DUMMY);
-
-#ifdef USE_GIZMO
-	WM_gizmogrouptype_append(MESH_GGT_extrude);
-#endif
 }
 
 /** \} */
diff --git a/source/blender/editors/mesh/mesh_intern.h b/source/blender/editors/mesh/mesh_intern.h
index 25a477546cc..9c70fdceb8d 100644
--- a/source/blender/editors/mesh/mesh_intern.h
+++ b/source/blender/editors/mesh/mesh_intern.h
@@ -110,9 +110,6 @@ void MESH_OT_extrude_edges_indiv(struct wmOperatorType *ot);
 void MESH_OT_extrude_faces_indiv(struct wmOperatorType *ot);
 void MESH_OT_dupli_extrude_cursor(struct wmOperatorType *ot);
 
-/* *** editmesh_extrude_gizmo.c *** */
-void MESH_GGT_extrude(struct wmGizmoGroupType *gzgt);
-
 /* *** editmesh_extrude_screw.c *** */
 void MESH_OT_screw(struct wmOperatorType *ot);
 
diff --git a/source/blender/editors/space_view3d/space_view3d.c b/source/blender/editors/space_view3d/space_view3d.c
index 4fe2fe08fc9..e7c1a0a3105 100644
--- a/source/blender/editors/space_view3d/space_view3d.c
+++ b/source/blender/editors/space_view3d/space_view3d.c
@@ -706,6 +706,7 @@ static void view3d_widgets(void)
 	WM_gizmogrouptype_append(VIEW3D_GGT_xform_shear);
 	WM_gizmogrouptype_append(VIEW3D_GGT_mesh_preselect_elem);
 	WM_gizmogrouptype_append(VIEW3D_GGT_mesh_preselect_edgering);
+	WM_gizmogrouptype_append(MESH_GGT_extrude);
 
 	WM_gizmogrouptype_append(VIEW3D_GGT_ruler);
 	WM_gizmotype_append(VIEW3D_GT_ruler_item);
diff --git a/source/blender/editors/transform/CMakeLists.txt b/source/blender/editors/transform/CMakeLists.txt
index 45055eb1225..ccc143af18f 100644
--- a/source/blender/editors/transform/CMakeLists.txt
+++ b/source/blender/editors/transform/CMakeLists.txt
@@ -45,9 +45,10 @@ set(SRC
 	transform_constraints.c
 	transform_conversions.c
 	transform_generics.c
-	transform_input.c
 	transform_gizmo_2d.c
 	transform_gizmo_3d.c
+	transform_gizmo_extrude_3d.c
+	transform_input.c
 	transform_ops.c
 	transform_orientations.c
 	transform_snap.c
diff --git a/source/blender/editors/mesh/editmesh_extrude_gizmo.c b/source/blender/editors/transform/transform_gizmo_extrude_3d.c
similarity index 97%
rename from source/blender/editors/mesh/editmesh_extrude_gizmo.c
rename to source/blender/editors/transform/transform_gizmo_extrude_3d.c
index 6d3bf1f5104..171f7d77653 100644
--- a/source/blender/editors/mesh/editmesh_extrude_gizmo.c
+++ b/source/blender/editors/transform/transform_gizmo_extrude_3d.c
@@ -15,17 +15,10 @@
  * along with this program; if not, write to the Free Software Foundation,
  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  *
- * The Original Code is Copyright (C) 2004 by Blender Foundation.
- * All rights reserved.
- *
- * The Original Code is: all of this file.
- *
- * Contributor(s): Joseph Eagar
- *
  * ***** END GPL LICENSE BLOCK *****
  */
 
-/** \file blender/editors/mesh/editmesh_extrude_gizmo.c
+/** \file blender/editors/transform/transform_gizmo_extrude_3d.c
  *  \ingroup edmesh
  */
 
@@ -53,8 +46,6 @@
 
 #include "MEM_guardedalloc.h"
 
-#include "mesh_intern.h"  /* own include */
-
 /* -------------------------------------------------------------------- */
 /** \name Extrude Gizmo
  * \{ */



More information about the Bf-blender-cvs mailing list