[Bf-blender-cvs] [0abac430196] lanpr-under-gp: Refactor: Rename LANPR to LineArt in DNA and compiler options

YimingWu noreply at git.blender.org
Sat Jun 27 09:27:53 CEST 2020


Commit: 0abac430196308b1389017b3f996b6dbe3749e87
Author: YimingWu
Date:   Sat Jun 27 14:50:53 2020 +0800
Branches: lanpr-under-gp
https://developer.blender.org/rB0abac430196308b1389017b3f996b6dbe3749e87

Refactor: Rename LANPR to LineArt in DNA and compiler options

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

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	release/scripts/startup/bl_ui/__init__.py
M	release/scripts/startup/bl_ui/properties_collection.py
M	release/scripts/startup/bl_ui/properties_lanpr.py
M	release/scripts/startup/bl_ui/properties_render.py
M	release/scripts/startup/bl_ui/space_view3d.py
M	source/blender/blenkernel/CMakeLists.txt
M	source/blender/blenkernel/intern/collection.c
M	source/blender/blenkernel/intern/object.c
M	source/blender/blenkernel/intern/scene.c
M	source/blender/blenloader/intern/readfile.c
M	source/blender/blenloader/intern/versioning_280.c
M	source/blender/blenloader/intern/writefile.c
M	source/blender/draw/DRW_engine.h
M	source/blender/editors/CMakeLists.txt
M	source/blender/editors/include/ED_lanpr.h
M	source/blender/editors/lanpr/lanpr_cpu.c
M	source/blender/editors/lanpr/lanpr_ops.c
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
M	source/blender/editors/render/CMakeLists.txt
M	source/blender/editors/render/render_update.c
M	source/blender/editors/space_api/CMakeLists.txt
M	source/blender/editors/space_api/spacetypes.c
M	source/blender/editors/space_buttons/CMakeLists.txt
M	source/blender/editors/space_buttons/buttons_context.c
M	source/blender/editors/space_buttons/space_buttons.c
M	source/blender/editors/space_view3d/CMakeLists.txt
M	source/blender/editors/space_view3d/space_view3d.c
M	source/blender/editors/util/CMakeLists.txt
M	source/blender/editors/util/ed_util.c
M	source/blender/gpencil_modifiers/CMakeLists.txt
M	source/blender/makesdna/DNA_collection_types.h
M	source/blender/makesdna/DNA_lanpr_types.h
M	source/blender/makesdna/DNA_object_types.h
M	source/blender/makesdna/DNA_scene_types.h
M	source/blender/makesrna/intern/CMakeLists.txt
M	source/blender/makesrna/intern/makesrna.c
M	source/blender/makesrna/intern/rna_collection.c
M	source/blender/makesrna/intern/rna_gpencil_modifier.c
M	source/blender/makesrna/intern/rna_internal.h
M	source/blender/makesrna/intern/rna_lanpr.c
M	source/blender/makesrna/intern/rna_object.c
M	source/blender/makesrna/intern/rna_scene.c
M	source/blender/python/intern/CMakeLists.txt
M	source/blender/python/intern/bpy_app_build_options.c

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

diff --git a/CMakeLists.txt b/CMakeLists.txt
index cb783c4acb5..1caeeebd97a 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -322,7 +322,7 @@ mark_as_advanced(WITH_SYSTEM_GLOG)
 option(WITH_FREESTYLE     "Enable Freestyle (advanced edges rendering)" ON)
 
 # LANPR
-option(WITH_LANPR     "Enable LANPR (more advanced edges rendering)" ON)
+option(WITH_LINEART     "Enable LANPR (more advanced edges rendering)" ON)
 
 # Misc
 if(WIN32)
@@ -1716,7 +1716,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_LINEART)
   info_cfg_option(WITH_OPENCOLORIO)
   info_cfg_option(WITH_XR_OPENXR)
   info_cfg_option(WITH_OPENIMAGEDENOISE)
diff --git a/build_files/cmake/config/blender_full.cmake b/build_files/cmake/config/blender_full.cmake
index 7c9b336dc76..ecbc8eddb67 100644
--- a/build_files/cmake/config/blender_full.cmake
+++ b/build_files/cmake/config/blender_full.cmake
@@ -19,7 +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_LINEART               ON  CACHE BOOL "" FORCE)
 set(WITH_IK_SOLVER           ON  CACHE BOOL "" FORCE)
 set(WITH_IK_ITASC            ON  CACHE BOOL "" FORCE)
 set(WITH_IMAGE_CINEON        ON  CACHE BOOL "" FORCE)
diff --git a/build_files/cmake/config/blender_lite.cmake b/build_files/cmake/config/blender_lite.cmake
index 31758f07109..675a68a1060 100644
--- a/build_files/cmake/config/blender_lite.cmake
+++ b/build_files/cmake/config/blender_lite.cmake
@@ -24,7 +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_LINEART               OFF CACHE BOOL "" FORCE)
 set(WITH_IK_SOLVER           OFF CACHE BOOL "" FORCE)
 set(WITH_IK_ITASC            OFF CACHE BOOL "" FORCE)
 set(WITH_IMAGE_CINEON        OFF CACHE BOOL "" FORCE)
diff --git a/build_files/cmake/config/blender_release.cmake b/build_files/cmake/config/blender_release.cmake
index f7f2abeab7d..49e4cd2057c 100644
--- a/build_files/cmake/config/blender_release.cmake
+++ b/build_files/cmake/config/blender_release.cmake
@@ -20,7 +20,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_LINEART               ON  CACHE BOOL "" FORCE)
 set(WITH_IK_SOLVER           ON  CACHE BOOL "" FORCE)
 set(WITH_IK_ITASC            ON  CACHE BOOL "" FORCE)
 set(WITH_IMAGE_CINEON        ON  CACHE BOOL "" FORCE)
diff --git a/release/scripts/startup/bl_ui/__init__.py b/release/scripts/startup/bl_ui/__init__.py
index 36df0256c3d..7af6df18724 100644
--- a/release/scripts/startup/bl_ui/__init__.py
+++ b/release/scripts/startup/bl_ui/__init__.py
@@ -104,8 +104,8 @@ import bpy
 if bpy.app.build_options.freestyle:
     _modules.append("properties_freestyle")
 
-if bpy.app.build_options.lanpr:
-    _modules.append("properties_lanpr")
+if bpy.app.build_options.lineart:
+    _modules.append("properties_lineart")
 
 __import__(name=__name__, fromlist=_modules)
 _namespace = globals()
diff --git a/release/scripts/startup/bl_ui/properties_collection.py b/release/scripts/startup/bl_ui/properties_collection.py
index 84310b68086..033436186ac 100644
--- a/release/scripts/startup/bl_ui/properties_collection.py
+++ b/release/scripts/startup/bl_ui/properties_collection.py
@@ -61,62 +61,62 @@ class COLLECTION_PT_collection_flags(CollectionButtonsPanel, Panel):
         col.prop(collection,"hide_viewport")
         col.prop(collection,"hide_render")
 
-class COLLECTION_PT_lanpr_collection(CollectionButtonsPanel, Panel):
+class COLLECTION_PT_lineart_collection(CollectionButtonsPanel, Panel):
     bl_label = "Collection LANPR"
     COMPAT_ENGINES = { 'BLENDER_LANPR' }
 
     @classmethod
     def poll(cls, context):
-        return context.scene.render.engine == 'BLENDER_LANPR' or context.scene.lanpr.enabled
+        return context.scene.render.engine == 'BLENDER_LANPR' or context.scene.lineart.enabled
 
     def draw_header(self, context):
         layout = self.layout
         collection = context.collection
-        layout.prop(collection, "configure_lanpr", text="")
+        layout.prop(collection, "configure_lineart", text="")
 
     def draw(self,context):
         layout = self.layout
         layout.use_property_split = True
         layout.use_property_decorate = False
         collection = context.collection
-        if not collection.configure_lanpr:
+        if not collection.configure_lineart:
             return
         
-        lanpr = collection.lanpr
+        lineart = collection.lineart
         row = layout.row()
-        row.prop(lanpr,"usage")
-        if lanpr.usage!='INCLUDE':
-            layout.prop(lanpr,"force")
+        row.prop(lineart,"usage")
+        if lineart.usage!='INCLUDE':
+            layout.prop(lineart,"force")
         else:
-            layout.prop(lanpr,"target")
+            layout.prop(lineart,"target")
             
-            if lanpr.target:
+            if lineart.target:
 
-                layout.prop(lanpr,'use_multiple_levels', text="Multiple Levels")
+                layout.prop(lineart,'use_multiple_levels', text="Multiple Levels")
                 
-                if lanpr.use_multiple_levels:
+                if lineart.use_multiple_levels:
                     col = layout.column(align=True)
-                    col.prop(lanpr,'level_start',text="Level Begin")
-                    col.prop(lanpr,'level_end',text="End")
+                    col.prop(lineart,'level_start',text="Level Begin")
+                    col.prop(lineart,'level_end',text="End")
                 else:
-                    layout.prop(lanpr,'level_start',text="Level")
+                    layout.prop(lineart,'level_start',text="Level")
                 
-                layout.prop(lanpr, "use_same_style")
+                layout.prop(lineart, "use_same_style")
 
-                if lanpr.use_same_style:
-                    layout.prop_search(lanpr, 'target_layer', lanpr.target.data, "layers", icon='GREASEPENCIL')
-                    layout.prop_search(lanpr, 'target_material', lanpr.target.data, "materials", icon='SHADING_TEXTURE')
+                if lineart.use_same_style:
+                    layout.prop_search(lineart, 'target_layer', lineart.target.data, "layers", icon='GREASEPENCIL')
+                    layout.prop_search(lineart, 'target_material', lineart.target.data, "materials", icon='SHADING_TEXTURE')
 
-                expand = not lanpr.use_same_style
-                lineart_make_line_type_entry(layout, lanpr.contour, "Contour", expand, lanpr.target.data)
-                lineart_make_line_type_entry(layout, lanpr.crease, "Crease", expand, lanpr.target.data)
-                lineart_make_line_type_entry(layout, lanpr.material, "Material", expand, lanpr.target.data)
-                lineart_make_line_type_entry(layout, lanpr.edge_mark, "Edge Mark", expand, lanpr.target.data)
-                lineart_make_line_type_entry(layout, lanpr.intersection, "Intersection", expand, lanpr.target.data)
+                expand = not lineart.use_same_style
+                lineart_make_line_type_entry(layout, lineart.contour, "Contour", expand, lineart.target.data)
+                lineart_make_line_type_entry(layout, lineart.crease, "Crease", expand, lineart.target.data)
+                lineart_make_line_type_entry(layout, lineart.material, "Material", expand, lineart.target.data)
+                lineart_make_line_type_entry(layout, lineart.edge_mark, "Edge Mark", expand, lineart.target.data)
+                lineart_make_line_type_entry(layout, lineart.intersection, "Intersection", expand, lineart.target.data)
 
 classes = (
     COLLECTION_PT_collection_flags,
-    COLLECTION_PT_lanpr_collection,
+    COLLECTION_PT_lineart_collection,
 )
 
 if __name__ == "__main__":  # only for live edit.
diff --git a/release/scripts/startup/bl_ui/properties_lanpr.py b/release/scripts/startup/bl_ui/properties_lanpr.py
index e6d253418d5..1995c568874 100644
--- a/release/scripts/startup/bl_ui/properties_lanpr.py
+++ b/release/scripts/startup/bl_ui/properties_lanpr.py
@@ -22,7 +22,7 @@ from bpy.types import Panel
 class LanprButtonsPanel:
     bl_space_type = 'PROPERTIES'
     bl_region_type = 'WINDOW'
-    bl_context = "lanpr"
+    bl_context = "lineart"
     COMPAT_ENGINES = { 'BLENDER_LANPR' }
 
 def lineart_make_line_type_entry(col, line_type, text_disp, expand, search_from):
@@ -31,22 +31,22 @@ def lineart_make_line_type_entry(col, line_type, text_disp, expand, search_from)
         col.prop_search(line_type, "layer", search_from, "layers", icon='GREASEPENCIL')
         col.prop_search(line_type, "material",  search_from, "materials", icon='SHADING_TEXTURE')
 
-class OBJECT_PT_lanpr_settings(LanprButtonsPanel, Panel):
+class OBJECT_PT_lineart_settings(LanprButtonsPanel, Panel):
     bl_label = "LANPR settings"
     COMPAT_ENGINES = { 'BLENDER_LANPR' }
 
     @classmethod
     def poll(cls, context):
         ob = context.object
-        obl = ob.lanpr
-        return (context.scene.render.engine == 'BLENDER_LANPR' or context.scene.lanpr.enabled) and\
+        obl = ob.lineart
+        return (context.scene.render.engine == 'BLENDER_LANPR' or context.scene.lineart.enabled) and\
             obl.usage == 'INCLUDE' and obl.target
 
     def draw(self,context):
         collection = context.collection
-        lanpr = collection.lanpr
+        lineart = collection.lineart
         ob = context.object
-        obl = ob.lanpr
+        obl = ob.lineart
 
         layout = self.layout
         layout.use_property_split = True
@@ -72,26 +72,26 @@ class OBJECT_PT_lanpr_set

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list