[Bf-blender-cvs] [367108d9ec2] temp-lanpr-cleanup2: LANPR: Compile option for other parts of the code.

YimingWu noreply at git.blender.org
Sun Nov 3 13:50:00 CET 2019


Commit: 367108d9ec255c7881433f1c8dbd206ab75a5ecd
Author: YimingWu
Date:   Sun Nov 3 20:49:32 2019 +0800
Branches: temp-lanpr-cleanup2
https://developer.blender.org/rB367108d9ec255c7881433f1c8dbd206ab75a5ecd

LANPR: Compile option for other parts of the code.

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

M	source/blender/blenkernel/intern/scene.c
M	source/blender/editors/render/render_update.c
M	source/blender/editors/space_api/spacetypes.c
M	source/blender/makesrna/intern/CMakeLists.txt
M	source/blender/makesrna/intern/rna_scene.c

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

diff --git a/source/blender/blenkernel/intern/scene.c b/source/blender/blenkernel/intern/scene.c
index 4d5be3a5d2a..f647732fcfa 100644
--- a/source/blender/blenkernel/intern/scene.c
+++ b/source/blender/blenkernel/intern/scene.c
@@ -523,7 +523,9 @@ void BKE_lanpr_free_everything(Scene *s)
   LANPR_LineLayer *ll;
   LANPR_LineLayerComponent *llc;
 
+#ifdef WITH_LANPR
   DRW_scene_freecache(s);
+#endif
 
   while ((ll = BLI_pophead(&lanpr->line_layers)) != NULL) {
     while ((llc = BLI_pophead(&ll->components)) != NULL) {
diff --git a/source/blender/editors/render/render_update.c b/source/blender/editors/render/render_update.c
index 67b7502d426..1c6e6926c21 100644
--- a/source/blender/editors/render/render_update.c
+++ b/source/blender/editors/render/render_update.c
@@ -97,9 +97,10 @@ void ED_render_scene_update(const DEGEditorUpdateContext *update_ctx, int update
     return;
   }
 
+#ifdef WITH_LANPR
   /* Temporary solution for updating LANPR GPencil targets. */
   ED_lanpr_post_frame_update_external(scene, update_ctx->depsgraph);
-
+#endif
   recursive_check = true;
 
   C = CTX_create();
diff --git a/source/blender/editors/space_api/spacetypes.c b/source/blender/editors/space_api/spacetypes.c
index a2f4ca37c08..bd1af884068 100644
--- a/source/blender/editors/space_api/spacetypes.c
+++ b/source/blender/editors/space_api/spacetypes.c
@@ -125,7 +125,9 @@ void ED_spacetypes_init(void)
   ED_operatortypes_view2d();
   ED_operatortypes_ui();
 
+#ifdef WITH_LANPR
   ED_operatortypes_lanpr();
+#endif
 
   ED_screen_user_menu_register();
 
diff --git a/source/blender/makesrna/intern/CMakeLists.txt b/source/blender/makesrna/intern/CMakeLists.txt
index 7153c370611..cbc5c4b41b5 100644
--- a/source/blender/makesrna/intern/CMakeLists.txt
+++ b/source/blender/makesrna/intern/CMakeLists.txt
@@ -394,7 +394,6 @@ set(LIB
   bf_editor_object
   bf_editor_physics
   bf_editor_render
-  bf_editor_lanpr
   bf_editor_scene
   bf_editor_sculpt_paint
   bf_editor_space_clip
@@ -406,6 +405,12 @@ set(LIB
   bf_editor_transform
 )
 
+if(WITH_LANPR)
+  list(APPEND LIB
+    bf_editor_lanpr
+  )
+endif()
+
 add_definitions(${GL_DEFINITIONS})
 
 blender_add_lib(bf_rna "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c
index 30c7a309259..0866c3b4ca3 100644
--- a/source/blender/makesrna/intern/rna_scene.c
+++ b/source/blender/makesrna/intern/rna_scene.c
@@ -2548,7 +2548,11 @@ extern bool ED_lanpr_dpix_shader_error(void);
 
 static bool rna_lanpr_shader_error_get(PointerRNA *UNUSED(ptr))
 {
+#  ifdef WITH_LANPR
   return ED_lanpr_dpix_shader_error();
+#  else
+  return false;
+#  endif
 }
 
 #else



More information about the Bf-blender-cvs mailing list