[Bf-blender-cvs] [fc0f2bb] temp_widgets_files_refactor: Move widget geometry files to windowmanager/widgets/widget_library

Julian Eisel noreply at git.blender.org
Mon Feb 8 12:29:43 CET 2016


Commit: fc0f2bb8d86d39e2d43acf3a9840fa3b9c3e9e19
Author: Julian Eisel
Date:   Mon Feb 8 12:20:26 2016 +0100
Branches: temp_widgets_files_refactor
https://developer.blender.org/rBfc0f2bb8d86d39e2d43acf3a9840fa3b9c3e9e19

Move widget geometry files to windowmanager/widgets/widget_library

Moved files to new location, renamed them to geom_xxx_widget.c/widget_geometry.h, added license blocks, doxygen info, etc.

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

D	source/blender/windowmanager/3d_widgets/arrow_widget.c
D	source/blender/windowmanager/3d_widgets/cube_widget.c
D	source/blender/windowmanager/3d_widgets/dial_widget.c
D	source/blender/windowmanager/3d_widgets/ui_widget_library.h
M	source/blender/windowmanager/CMakeLists.txt
M	source/blender/windowmanager/intern/wm_generic_widgets.c
A	source/blender/windowmanager/widgets/widget_library/geom_arrow_widget.c
A	source/blender/windowmanager/widgets/widget_library/geom_cube_widget.c
A	source/blender/windowmanager/widgets/widget_library/geom_dial_widget.c
A	source/blender/windowmanager/widgets/widget_library/widget_geometry.h

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

diff --git a/source/blender/windowmanager/3d_widgets/cube_widget.c b/source/blender/windowmanager/3d_widgets/cube_widget.c
deleted file mode 100644
index 3673994..0000000
--- a/source/blender/windowmanager/3d_widgets/cube_widget.c
+++ /dev/null
@@ -1,39 +0,0 @@
-int _WIDGET_nverts_cube = 8;
-int _WIDGET_ntris_cube = 12;
-
-float _WIDGET_verts_cube[][3] = {
-    {1.000000, 1.000000, -1.000000},
-    {1.000000, -1.000000, -1.000000},
-    {-1.000000, -1.000000, -1.000000},
-    {-1.000000, 1.000000, -1.000000},
-    {1.000000, 1.000000, 1.000000},
-    {0.999999, -1.000001, 1.000000},
-    {-1.000000, -1.000000, 1.000000},
-    {-1.000000, 1.000000, 1.000000},
-};
-
-float _WIDGET_normals_cube[][3] = {
-    {0.577349, 0.577349, -0.577349},
-    {0.577349, -0.577349, -0.577349},
-    {-0.577349, -0.577349, -0.577349},
-    {-0.577349, 0.577349, -0.577349},
-    {0.577349, 0.577349, 0.577349},
-    {0.577349, -0.577349, 0.577349},
-    {-0.577349, -0.577349, 0.577349},
-    {-0.577349, 0.577349, 0.577349},
-};
-
-unsigned short _WIDGET_indices_cube[] = {
-    1, 2, 3,
-    7, 6, 5,
-    4, 5, 1,
-    5, 6, 2,
-    2, 6, 7,
-    0, 3, 7,
-    0, 1, 3,
-    4, 7, 5,
-    0, 4, 1,
-    1, 5, 2,
-    3, 2, 7,
-    4, 0, 7,
-};
diff --git a/source/blender/windowmanager/3d_widgets/ui_widget_library.h b/source/blender/windowmanager/3d_widgets/ui_widget_library.h
deleted file mode 100644
index 24dc8c9..0000000
--- a/source/blender/windowmanager/3d_widgets/ui_widget_library.h
+++ /dev/null
@@ -1,24 +0,0 @@
-
-/* arrow widget */
-extern int _WIDGET_nverts_arrow;
-extern int _WIDGET_ntris_arrow;
-
-extern float _WIDGET_verts_arrow[][3];
-extern float _WIDGET_normals_arrow[][3];
-extern unsigned short _WIDGET_indices_arrow[];
-
-/* cube widget */
-extern int _WIDGET_nverts_cube;
-extern int _WIDGET_ntris_cube;
-
-extern float _WIDGET_verts_cube[][3];
-extern float _WIDGET_normals_cube[][3];
-extern unsigned short _WIDGET_indices_cube[];
-
-/* dial widget */
-extern int _WIDGET_nverts_dial;
-extern int _WIDGET_ntris_dial;
-
-extern float _WIDGET_verts_dial[][3];
-extern float _WIDGET_normals_dial[][3];
-extern unsigned short _WIDGET_indices_dial[];
diff --git a/source/blender/windowmanager/CMakeLists.txt b/source/blender/windowmanager/CMakeLists.txt
index f1a551d..242bb2f 100644
--- a/source/blender/windowmanager/CMakeLists.txt
+++ b/source/blender/windowmanager/CMakeLists.txt
@@ -69,9 +69,9 @@ set(SRC
 	intern/wm_stereo.c
 	intern/wm_widgets.c
 	intern/wm_generic_widgets.c
-	3d_widgets/arrow_widget.c
-	3d_widgets/cube_widget.c
-	3d_widgets/dial_widget.c
+	widgets/widget_library/geom_arrow_widget.c
+	widgets/widget_library/geom_cube_widget
+	widgets/widget_library/geom_dial_widget.c
 
 	WM_api.h
 	WM_keymap.h
@@ -84,7 +84,7 @@ set(SRC
 	wm_files.h
 	wm_subwindow.h
 	wm_window.h
-	3d_widgets/ui_widget_library.h
+	widgets/widget_library/widget_geometry.h
 )
 
 if(WITH_AUDASPACE)
diff --git a/source/blender/windowmanager/intern/wm_generic_widgets.c b/source/blender/windowmanager/intern/wm_generic_widgets.c
index 45a5596..064bac2 100644
--- a/source/blender/windowmanager/intern/wm_generic_widgets.c
+++ b/source/blender/windowmanager/intern/wm_generic_widgets.c
@@ -68,7 +68,7 @@
 
 #include "UI_interface.h"
 
-#include "3d_widgets/ui_widget_library.h"
+#include "../widgets/widget_library/widget_geometry.h"
 
 #include "wm.h"
 #include "WM_types.h"
diff --git a/source/blender/windowmanager/3d_widgets/arrow_widget.c b/source/blender/windowmanager/widgets/widget_library/geom_arrow_widget.c
similarity index 72%
rename from source/blender/windowmanager/3d_widgets/arrow_widget.c
rename to source/blender/windowmanager/widgets/widget_library/geom_arrow_widget.c
index b8b6286..b7e144f 100644
--- a/source/blender/windowmanager/3d_widgets/arrow_widget.c
+++ b/source/blender/windowmanager/widgets/widget_library/geom_arrow_widget.c
@@ -1,3 +1,32 @@
+/*
+ * ***** BEGIN GPL LICENSE BLOCK *****
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * 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) 2016 Blender Foundation.
+ * All rights reserved.
+ *
+ * Contributor(s): none yet.
+ *
+ * ***** END GPL LICENSE BLOCK *****
+ */
+
+/** file blender/windowmanager/widgets/widget_library/geom_arrow_widget.c
+ *  ingroup wm
+ */
+
 int _WIDGET_nverts_arrow = 25;
 int _WIDGET_ntris_arrow = 46;
 
@@ -105,3 +134,4 @@ unsigned short _WIDGET_indices_arrow[] = {
     1, 15, 16,
     3, 1, 17,
 };
+
diff --git a/source/blender/windowmanager/widgets/widget_library/geom_cube_widget.c b/source/blender/windowmanager/widgets/widget_library/geom_cube_widget.c
new file mode 100644
index 0000000..e33b587
--- /dev/null
+++ b/source/blender/windowmanager/widgets/widget_library/geom_cube_widget.c
@@ -0,0 +1,69 @@
+/*
+ * ***** BEGIN GPL LICENSE BLOCK *****
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * 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) 2016 Blender Foundation.
+ * All rights reserved.
+ *
+ * Contributor(s): none yet.
+ *
+ * ***** END GPL LICENSE BLOCK *****
+ */
+
+/** file blender/windowmanager/widgets/widget_library/geom_cube_widget.c
+ *  ingroup wm
+ */
+
+int _WIDGET_nverts_cube = 8;
+int _WIDGET_ntris_cube = 12;
+
+float _WIDGET_verts_cube[][3] = {
+    {1.000000, 1.000000, -1.000000},
+    {1.000000, -1.000000, -1.000000},
+    {-1.000000, -1.000000, -1.000000},
+    {-1.000000, 1.000000, -1.000000},
+    {1.000000, 1.000000, 1.000000},
+    {0.999999, -1.000001, 1.000000},
+    {-1.000000, -1.000000, 1.000000},
+    {-1.000000, 1.000000, 1.000000},
+};
+
+float _WIDGET_normals_cube[][3] = {
+    {0.577349, 0.577349, -0.577349},
+    {0.577349, -0.577349, -0.577349},
+    {-0.577349, -0.577349, -0.577349},
+    {-0.577349, 0.577349, -0.577349},
+    {0.577349, 0.577349, 0.577349},
+    {0.577349, -0.577349, 0.577349},
+    {-0.577349, -0.577349, 0.577349},
+    {-0.577349, 0.577349, 0.577349},
+};
+
+unsigned short _WIDGET_indices_cube[] = {
+    1, 2, 3,
+    7, 6, 5,
+    4, 5, 1,
+    5, 6, 2,
+    2, 6, 7,
+    0, 3, 7,
+    0, 1, 3,
+    4, 7, 5,
+    0, 4, 1,
+    1, 5, 2,
+    3, 2, 7,
+    4, 0, 7,
+};
+
diff --git a/source/blender/windowmanager/3d_widgets/dial_widget.c b/source/blender/windowmanager/widgets/widget_library/geom_dial_widget.c
similarity index 95%
rename from source/blender/windowmanager/3d_widgets/dial_widget.c
rename to source/blender/windowmanager/widgets/widget_library/geom_dial_widget.c
index 002bd02..5b0ba6a 100644
--- a/source/blender/windowmanager/3d_widgets/dial_widget.c
+++ b/source/blender/windowmanager/widgets/widget_library/geom_dial_widget.c
@@ -1,3 +1,32 @@
+/*
+ * ***** BEGIN GPL LICENSE BLOCK *****
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * 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) 2016 Blender Foundation.
+ * All rights reserved.
+ *
+ * Contributor(s): none yet.
+ *
+ * ***** END GPL LICENSE BLOCK *****
+ */
+
+/** file blender/windowmanager/widgets/widget_library/geom_dial_widget.c
+ *  ingroup wm
+ */
+
 int _WIDGET_nverts_dial = 192;
 int _WIDGET_ntris_dial = 384;
 
@@ -777,3 +806,4 @@ unsigned short _WIDGET_indices_dial[] = {
     191, 190, 5,
     186, 191, 0,
 };
+
diff --git a/source/blender/windowmanager/widgets/widget_library/widget_geometry.h b/source/blender/windowmanager/widgets/widget_library/widget_geometry.h
new file mode 100644
index 0000000..bf690a9
--- /dev/null
+++ b/source/blender/windowmanager/widgets/widget_library/widget_geometry.h
@@ -0,0 +1,67 @@
+/*
+ * ***** BEGIN GPL LICENSE BLOCK *****
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA

@@ Diff output truncated at 10240 characters. @@




More information about the Bf-blender-cvs mailing list