[Bf-blender-cvs] [a091551a5f3] temp-lanpr-cleanup2: LANPR: Add LANPR compile options in freestyle edge mark functions.

YimingWu noreply at git.blender.org
Sun Nov 3 13:30:23 CET 2019


Commit: a091551a5f3c6cbab0190d859c1d64b24df5d4fa
Author: YimingWu
Date:   Sun Nov 3 20:15:59 2019 +0800
Branches: temp-lanpr-cleanup2
https://developer.blender.org/rBa091551a5f3c6cbab0190d859c1d64b24df5d4fa

LANPR: Add LANPR compile options in freestyle edge mark functions.

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

M	CMakeLists.txt
M	build_files/cmake/config/blender_full.cmake
M	build_files/cmake/config/blender_lite.cmake
M	build_files/cmake/config/blender_release.cmake
M	source/blender/editors/mesh/CMakeLists.txt
M	source/blender/editors/mesh/editmesh_tools.c
M	source/blender/editors/mesh/mesh_intern.h
M	source/blender/editors/mesh/mesh_ops.c

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

diff --git a/CMakeLists.txt b/CMakeLists.txt
index e468ae36906..91ae4e4e523 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -366,6 +366,9 @@ mark_as_advanced(WITH_SYSTEM_GLOG)
 # Freestyle
 option(WITH_FREESTYLE     "Enable Freestyle (advanced edges rendering)" ON)
 
+# LANPR
+option(WITH_LANPR     "Enable LANPR (more advanced edges rendering)" ON)
+
 # Misc
 if(WIN32)
   option(WITH_INPUT_IME "Enable Input Method Editor (IME) for complex Asian character input" ON)
@@ -1784,6 +1787,7 @@ if(FIRST_RUN)
   info_cfg_option(WITH_INPUT_NDOF)
   info_cfg_option(WITH_CYCLES)
   info_cfg_option(WITH_FREESTYLE)
+  info_cfg_option(WITH_LANPR)
   info_cfg_option(WITH_OPENCOLORIO)
   info_cfg_option(WITH_OPENIMAGEDENOISE)
   info_cfg_option(WITH_OPENVDB)
diff --git a/build_files/cmake/config/blender_full.cmake b/build_files/cmake/config/blender_full.cmake
index 4c47c4c4dba..a9d50158b75 100644
--- a/build_files/cmake/config/blender_full.cmake
+++ b/build_files/cmake/config/blender_full.cmake
@@ -18,6 +18,7 @@ set(WITH_LIBMV               ON  CACHE BOOL "" FORCE)
 set(WITH_LIBMV_SCHUR_SPECIALIZATIONS ON CACHE BOOL "" FORCE)
 set(WITH_COMPOSITOR          ON  CACHE BOOL "" FORCE)
 set(WITH_FREESTYLE           ON  CACHE BOOL "" FORCE)
+set(WITH_LANPR               ON  CACHE BOOL "" FORCE)
 set(WITH_GHOST_XDND          ON  CACHE BOOL "" FORCE)
 set(WITH_IK_SOLVER           ON  CACHE BOOL "" FORCE)
 set(WITH_IK_ITASC            ON  CACHE BOOL "" FORCE)
diff --git a/build_files/cmake/config/blender_lite.cmake b/build_files/cmake/config/blender_lite.cmake
index 6d0f160c764..3aa54f97592 100644
--- a/build_files/cmake/config/blender_lite.cmake
+++ b/build_files/cmake/config/blender_lite.cmake
@@ -24,6 +24,7 @@ set(WITH_LIBMV               OFF CACHE BOOL "" FORCE)
 set(WITH_LLVM                OFF CACHE BOOL "" FORCE)
 set(WITH_COMPOSITOR          OFF CACHE BOOL "" FORCE)
 set(WITH_FREESTYLE           OFF CACHE BOOL "" FORCE)
+set(WITH_LANPR               OFF CACHE BOOL "" FORCE)
 set(WITH_GHOST_XDND          OFF CACHE BOOL "" FORCE)
 set(WITH_IK_SOLVER           OFF CACHE BOOL "" FORCE)
 set(WITH_IK_ITASC            OFF CACHE BOOL "" FORCE)
diff --git a/build_files/cmake/config/blender_release.cmake b/build_files/cmake/config/blender_release.cmake
index cf849519c83..2ef629a2ecc 100644
--- a/build_files/cmake/config/blender_release.cmake
+++ b/build_files/cmake/config/blender_release.cmake
@@ -19,6 +19,7 @@ set(WITH_LIBMV               ON  CACHE BOOL "" FORCE)
 set(WITH_LIBMV_SCHUR_SPECIALIZATIONS ON CACHE BOOL "" FORCE)
 set(WITH_COMPOSITOR          ON  CACHE BOOL "" FORCE)
 set(WITH_FREESTYLE           ON  CACHE BOOL "" FORCE)
+set(WITH_LANPR               ON  CACHE BOOL "" FORCE)
 set(WITH_GHOST_XDND          ON  CACHE BOOL "" FORCE)
 set(WITH_IK_SOLVER           ON  CACHE BOOL "" FORCE)
 set(WITH_IK_ITASC            ON  CACHE BOOL "" FORCE)
diff --git a/source/blender/editors/mesh/CMakeLists.txt b/source/blender/editors/mesh/CMakeLists.txt
index 88da40b947f..5c66651b9a3 100644
--- a/source/blender/editors/mesh/CMakeLists.txt
+++ b/source/blender/editors/mesh/CMakeLists.txt
@@ -88,6 +88,10 @@ if(WITH_FREESTYLE)
   add_definitions(-DWITH_FREESTYLE)
 endif()
 
+if(WITH_LANPR)
+  add_definitions(-DWITH_LANPR)
+endif()
+
 if(WITH_BULLET)
   add_definitions(-DWITH_BULLET)
 endif()
diff --git a/source/blender/editors/mesh/editmesh_tools.c b/source/blender/editors/mesh/editmesh_tools.c
index a1232347516..c98c1077a84 100644
--- a/source/blender/editors/mesh/editmesh_tools.c
+++ b/source/blender/editors/mesh/editmesh_tools.c
@@ -7424,7 +7424,7 @@ void MESH_OT_symmetry_snap(struct wmOperatorType *ot)
 
 /** \} */
 
-#ifdef WITH_FREESTYLE
+#if (defined(WITH_FREESTYLE) || defined(WITH_LANPR))
 
 /* -------------------------------------------------------------------- */
 /** \name Mark Edge (Freestyle) Operator
@@ -7584,7 +7584,7 @@ void MESH_OT_mark_freestyle_face(wmOperatorType *ot)
 
 /** \} */
 
-#endif /* WITH_FREESTYLE */
+#endif /* WITH_FREESTYLE || WITH_LANPR */
 
 /* -------------------------------------------------------------------- */
 /** \name Loop Normals Editing Tools Modal Map
diff --git a/source/blender/editors/mesh/mesh_intern.h b/source/blender/editors/mesh/mesh_intern.h
index 8d340d93c0a..b5e72bffb39 100644
--- a/source/blender/editors/mesh/mesh_intern.h
+++ b/source/blender/editors/mesh/mesh_intern.h
@@ -256,7 +256,7 @@ void MESH_OT_paint_mask_extract(struct wmOperatorType *ot);
 
 struct wmKeyMap *point_normals_modal_keymap(wmKeyConfig *keyconf);
 
-#ifdef WITH_FREESTYLE
+#if (defined(WITH_FREESTYLE) || defined(WITH_LANPR))
 void MESH_OT_mark_freestyle_edge(struct wmOperatorType *ot);
 void MESH_OT_mark_freestyle_face(struct wmOperatorType *ot);
 #endif
diff --git a/source/blender/editors/mesh/mesh_ops.c b/source/blender/editors/mesh/mesh_ops.c
index 4105f853868..0d6976dafc1 100644
--- a/source/blender/editors/mesh/mesh_ops.c
+++ b/source/blender/editors/mesh/mesh_ops.c
@@ -133,7 +133,7 @@ void ED_operatortypes_mesh(void)
   WM_operatortype_append(MESH_OT_loop_multi_select);
   WM_operatortype_append(MESH_OT_mark_seam);
   WM_operatortype_append(MESH_OT_mark_sharp);
-#ifdef WITH_FREESTYLE
+#if (defined(WITH_FREESTYLE) || defined(WITH_LANPR))
   WM_operatortype_append(MESH_OT_mark_freestyle_edge);
 #endif
   WM_operatortype_append(MESH_OT_vertices_smooth);



More information about the Bf-blender-cvs mailing list