[Bf-blender-cvs] [eeff1f7] temp_localview_split: Move local view macros into own file (BKE_localview.h)

Julian Eisel noreply at git.blender.org
Thu Aug 4 16:54:27 CEST 2016


Commit: eeff1f7fef9d1a58875d760bf6d1a71a72cd0e33
Author: Julian Eisel
Date:   Thu Aug 4 16:52:22 2016 +0200
Branches: temp_localview_split
https://developer.blender.org/rBeeff1f7fef9d1a58875d760bf6d1a71a72cd0e33

Move local view macros into own file (BKE_localview.h)

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

A	source/blender/blenkernel/BKE_localview.h
M	source/blender/blenkernel/BKE_utildefines.h
M	source/blender/blenkernel/CMakeLists.txt
M	source/blender/blenloader/intern/readfile.c
M	source/blender/editors/gpencil/gpencil_convert.c
M	source/blender/editors/object/object_add.c
M	source/blender/editors/object/object_edit.c
M	source/blender/editors/object/object_relations.c
M	source/blender/editors/render/render_internal.c
M	source/blender/editors/screen/screen_context.c
M	source/blender/editors/sculpt_paint/paint_image_proj.c
M	source/blender/editors/space_view3d/drawobject.c
M	source/blender/editors/space_view3d/space_view3d.c
M	source/blender/editors/space_view3d/view3d_draw.c
M	source/blender/editors/space_view3d/view3d_view.c
M	source/blender/gpu/intern/gpu_draw.c
M	source/blender/render/intern/source/convertblender.c
M	source/blender/render/intern/source/envmap.c

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

diff --git a/source/blender/blenkernel/BKE_utildefines.h b/source/blender/blenkernel/BKE_localview.h
similarity index 77%
copy from source/blender/blenkernel/BKE_utildefines.h
copy to source/blender/blenkernel/BKE_localview.h
index a6587d7..9cd5352 100644
--- a/source/blender/blenkernel/BKE_utildefines.h
+++ b/source/blender/blenkernel/BKE_localview.h
@@ -18,28 +18,12 @@
  * ***** END GPL LICENSE BLOCK *****
  */
 
-/** \file BKE_utildefines.h
- *  \ingroup bke
- *  \brief blender format specific macros
- *  \note generic defines should go in BLI_utildefines.h
- */
-
-
-#ifndef __BKE_UTILDEFINES_H__
-#define __BKE_UTILDEFINES_H__
+#ifndef __BKE_LOCALVIEW_H__
+#define __BKE_LOCALVIEW_H__
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#define BKE_BIT_TEST_SET(value, test, flag) \
-{                                           \
-	if (test) (value) |=  flag;             \
-	else      (value) &= ~flag;             \
-} (void)0
-
-/**
- * Local view utility macros.
+/** \file BKE_localview.h
+ *  \ingroup bke
+ *  \brief Local view utility macros
  *
  * Even though it's possible to access LocalView DNA structs directly,
  * please only access using these macros (or extend it if needed).
@@ -66,8 +50,4 @@ extern "C" {
 		(ob)->localview.viewbits &= ~(v3d)->localviewd->info.viewbits; \
 	} (void)0
 
-#ifdef __cplusplus
-}
-#endif
-
-#endif  /* __BKE_UTILDEFINES_H__ */
+#endif // __BKE_LOCALVIEW_H__
diff --git a/source/blender/blenkernel/BKE_utildefines.h b/source/blender/blenkernel/BKE_utildefines.h
index a6587d7..7c1e0e9 100644
--- a/source/blender/blenkernel/BKE_utildefines.h
+++ b/source/blender/blenkernel/BKE_utildefines.h
@@ -38,34 +38,6 @@ extern "C" {
 	else      (value) &= ~flag;             \
 } (void)0
 
-/**
- * Local view utility macros.
- *
- * Even though it's possible to access LocalView DNA structs directly,
- * please only access using these macros (or extend it if needed).
- */
-
-/* visibility checks */
-#define BKE_LOCALVIEW_INFO_CMP(a, b) \
-	((a).viewbits & (b).viewbits)
-#define BKE_LOCALVIEW_IS_OBJECT_VISIBLE(v3d, ob) \
-	(((v3d)->localviewd == NULL) || BKE_LOCALVIEW_INFO_CMP((v3d)->localviewd->info, (ob)->localview))
-
-/* Check if info defines a visible local view */
-#define BKE_LOCALVIEW_IS_VALID(info) \
-	((info).viewbits != 0)
-
-/* Adjust local view info of ob to be visible if v3d is in local view */
-#define BKE_LOCALVIEW_OBJECT_ASSIGN(v3d, ob) \
-	if ((v3d)->localviewd) { \
-		(ob)->localview.viewbits |= (v3d)->localviewd->info.viewbits; \
-	} (void)0
-/* Remove object from local view */
-#define BKE_LOCALVIEW_OBJECT_UNASSIGN(v3d, ob) \
-	if ((v3d)->localviewd) { \
-		(ob)->localview.viewbits &= ~(v3d)->localviewd->info.viewbits; \
-	} (void)0
-
 #ifdef __cplusplus
 }
 #endif
diff --git a/source/blender/blenkernel/CMakeLists.txt b/source/blender/blenkernel/CMakeLists.txt
index b7ff81d..46bd430 100644
--- a/source/blender/blenkernel/CMakeLists.txt
+++ b/source/blender/blenkernel/CMakeLists.txt
@@ -247,6 +247,7 @@ set(SRC
 	BKE_library_query.h
 	BKE_library_remap.h
 	BKE_linestyle.h
+	BKE_localview.h
 	BKE_main.h
 	BKE_mask.h
 	BKE_material.h
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c
index 1049f5a..2a25123 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -126,6 +126,7 @@
 #include "BKE_library.h" // for which_libbase
 #include "BKE_library_idmap.h"
 #include "BKE_library_query.h"
+#include "BKE_localview.h"
 #include "BKE_idcode.h"
 #include "BKE_material.h"
 #include "BKE_main.h" // for Main
@@ -145,7 +146,6 @@
 #include "BKE_outliner_treehash.h"
 #include "BKE_sound.h"
 #include "BKE_colortools.h"
-#include "BKE_utildefines.h"
 
 #include "NOD_common.h"
 #include "NOD_socket.h"
diff --git a/source/blender/editors/gpencil/gpencil_convert.c b/source/blender/editors/gpencil/gpencil_convert.c
index d369d6d..5357991 100644
--- a/source/blender/editors/gpencil/gpencil_convert.c
+++ b/source/blender/editors/gpencil/gpencil_convert.c
@@ -63,12 +63,12 @@
 #include "BKE_global.h"
 #include "BKE_gpencil.h"
 #include "BKE_library.h"
+#include "BKE_localview.h"
 #include "BKE_object.h"
 #include "BKE_report.h"
 #include "BKE_scene.h"
 #include "BKE_screen.h"
 #include "BKE_tracking.h"
-#include "BKE_utildefines.h"
 
 #include "UI_interface.h"
 
diff --git a/source/blender/editors/object/object_add.c b/source/blender/editors/object/object_add.c
index fcb3df5..1096e3b 100644
--- a/source/blender/editors/object/object_add.c
+++ b/source/blender/editors/object/object_add.c
@@ -75,6 +75,7 @@
 #include "BKE_lattice.h"
 #include "BKE_library.h"
 #include "BKE_library_query.h"
+#include "BKE_localview.h"
 #include "BKE_key.h"
 #include "BKE_main.h"
 #include "BKE_material.h"
@@ -89,7 +90,6 @@
 #include "BKE_screen.h"
 #include "BKE_speaker.h"
 #include "BKE_texture.h"
-#include "BKE_utildefines.h"
 
 #include "RNA_access.h"
 #include "RNA_define.h"
diff --git a/source/blender/editors/object/object_edit.c b/source/blender/editors/object/object_edit.c
index d884bbb..e48c1d6 100644
--- a/source/blender/editors/object/object_edit.c
+++ b/source/blender/editors/object/object_edit.c
@@ -70,6 +70,7 @@
 #include "BKE_image.h"
 #include "BKE_lattice.h"
 #include "BKE_library.h"
+#include "BKE_localview.h"
 #include "BKE_main.h"
 #include "BKE_material.h"
 #include "BKE_mball.h"
@@ -82,7 +83,6 @@
 #include "BKE_modifier.h"
 #include "BKE_editmesh.h"
 #include "BKE_report.h"
-#include "BKE_utildefines.h"
 
 #include "ED_armature.h"
 #include "ED_curve.h"
diff --git a/source/blender/editors/object/object_relations.c b/source/blender/editors/object/object_relations.c
index 827954b..38dff0f 100644
--- a/source/blender/editors/object/object_relations.c
+++ b/source/blender/editors/object/object_relations.c
@@ -76,6 +76,7 @@
 #include "BKE_lattice.h"
 #include "BKE_library.h"
 #include "BKE_library_query.h"
+#include "BKE_localview.h"
 #include "BKE_main.h"
 #include "BKE_material.h"
 #include "BKE_mball.h"
@@ -88,7 +89,6 @@
 #include "BKE_speaker.h"
 #include "BKE_texture.h"
 #include "BKE_editmesh.h"
-#include "BKE_utildefines.h"
 
 #include "WM_api.h"
 #include "WM_types.h"
diff --git a/source/blender/editors/render/render_internal.c b/source/blender/editors/render/render_internal.c
index 1bb5270..2ad65df 100644
--- a/source/blender/editors/render/render_internal.c
+++ b/source/blender/editors/render/render_internal.c
@@ -58,6 +58,7 @@
 #include "BKE_global.h"
 #include "BKE_image.h"
 #include "BKE_library.h"
+#include "BKE_localview.h"
 #include "BKE_main.h"
 #include "BKE_node.h"
 #include "BKE_object.h"
@@ -65,7 +66,6 @@
 #include "BKE_sequencer.h"
 #include "BKE_screen.h"
 #include "BKE_scene.h"
-#include "BKE_utildefines.h"
 
 #include "WM_api.h"
 #include "WM_types.h"
diff --git a/source/blender/editors/screen/screen_context.c b/source/blender/editors/screen/screen_context.c
index c4f19aa..04b22ca 100644
--- a/source/blender/editors/screen/screen_context.c
+++ b/source/blender/editors/screen/screen_context.c
@@ -47,9 +47,9 @@
 #include "BKE_action.h"
 #include "BKE_armature.h"
 #include "BKE_gpencil.h"
+#include "BKE_localview.h"
 #include "BKE_screen.h"
 #include "BKE_sequencer.h"
-#include "BKE_utildefines.h"
 
 #include "RNA_access.h"
 
diff --git a/source/blender/editors/sculpt_paint/paint_image_proj.c b/source/blender/editors/sculpt_paint/paint_image_proj.c
index b1774df..a5d3b22 100644
--- a/source/blender/editors/sculpt_paint/paint_image_proj.c
+++ b/source/blender/editors/sculpt_paint/paint_image_proj.c
@@ -70,6 +70,7 @@
 #include "BKE_brush.h"
 #include "BKE_image.h"
 #include "BKE_library.h"
+#include "BKE_localview.h"
 #include "BKE_main.h"
 #include "BKE_material.h"
 #include "BKE_mesh.h"
@@ -79,7 +80,6 @@
 #include "BKE_report.h"
 #include "BKE_scene.h"
 #include "BKE_texture.h"
-#include "BKE_utildefines.h"
 
 #include "UI_interface.h"
 
diff --git a/source/blender/editors/space_view3d/drawobject.c b/source/blender/editors/space_view3d/drawobject.c
index 102befb..3d77baa 100644
--- a/source/blender/editors/space_view3d/drawobject.c
+++ b/source/blender/editors/space_view3d/drawobject.c
@@ -63,6 +63,7 @@
 #include "BKE_image.h"
 #include "BKE_key.h"
 #include "BKE_lattice.h"
+#include "BKE_localview.h"
 #include "BKE_main.h"
 #include "BKE_mesh.h"
 #include "BKE_material.h"
@@ -77,7 +78,6 @@
 #include "BKE_subsurf.h"
 #include "BKE_unit.h"
 #include "BKE_tracking.h"
-#include "BKE_utildefines.h"
 
 #include "BKE_editmesh.h"
 
diff --git a/source/blender/editors/space_view3d/space_view3d.c b/source/blender/editors/space_view3d/space_view3d.c
index c9d4ba4..2cc65f4 100644
--- a/source/blender/editors/space_view3d/space_view3d.c
+++ b/source/blender/editors/space_view3d/space_view3d.c
@@ -46,11 +46,11 @@
 #include "BKE_depsgraph.h"
 #include "BKE_icons.h"
 #include "BKE_library.h"
+#include "BKE_localview.h"
 #include "BKE_main.h"
 #include "BKE_object.h"
 #include "BKE_scene.h"
 #include "BKE_screen.h"
-#include "BKE_utildefines.h"
 
 #include "ED_space_api.h"
 #include "ED_screen.h"
diff --git a/source/blender/editors/space_view3d/view3d_draw.c b/source/blender/editors/space_view3d/view3d_draw.c
index f0f2b45..eb60269 100644
--- a/source/blender/editors/space_view3d/view3d_draw.c
+++ b/source/blender/editors/space_view3d/view3d_draw.c
@@ -60,6 +60,7 @@
 #include "BKE_DerivedMesh.h"
 #include "BKE_image.h"
 #include "BKE_key.h"
+#include "BKE_localview.h"
 #include "BKE_main.h"
 #include "BKE_object.h"
 #include "BKE_global.h"
@@ -67,7 +68,6 @@
 #include "BKE_scene.h"
 #include "BKE_screen.h"
 #include "BKE_unit.h"
-#include "BKE_utildefines.h"
 #include "BKE_movieclip.h"
 
 #include "RE_engine.h"
diff --git a/source/blender/editors/space_view3d/view3d_view.c b/source/blender/editors/space_view3d/view3d_view.c
index e8ed3e3..e510fdf 100644
--- a/source/blender/editors/space_view3d/view3d_view.c
+++ b/source/blender/editors/space_view3d/view3d_view.c
@@ -46,11 +46,11 @@
 #include "BKE_depsgraph.h"
 #include "BKE_object.h"
 #include "BKE_global.h"
+#include "BKE_localview.h"
 #include "BKE_main.h"
 #include "BKE_report.h"
 #include "BKE_scene.h"
 #include "BKE_screen.h"
-#include "BKE_utildefines.h"
 
 #include "BIF_gl

@@ Diff output truncated at 10240 characters. @@




More information about the Bf-blender-cvs mailing list