[Bf-blender-cvs] [cb676fa7daa] lanpr-under-gp: Refactor: All struct names changed to Lineart

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


Commit: cb676fa7daa29692738d384b0680a19e20c01738
Author: YimingWu
Date:   Sat Jun 27 15:58:01 2020 +0800
Branches: lanpr-under-gp
https://developer.blender.org/rBcb676fa7daa29692738d384b0680a19e20c01738

Refactor: All struct names changed to Lineart

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

M	CMakeLists.txt
M	release/scripts/startup/bl_ui/properties_collection.py
M	release/scripts/startup/bl_ui/properties_lineart.py
M	release/scripts/startup/bl_ui/properties_render.py
M	source/blender/blenkernel/intern/collection.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/include/ED_lanpr.h
M	source/blender/editors/lanpr/lanpr_chain.c
M	source/blender/editors/lanpr/lanpr_cpu.c
M	source/blender/editors/lanpr/lanpr_intern.h
M	source/blender/editors/lanpr/lanpr_util.c
M	source/blender/editors/render/render_update.c
M	source/blender/editors/space_buttons/buttons_context.c
M	source/blender/editors/space_buttons/space_buttons.c
M	source/blender/editors/util/ed_util.c
M	source/blender/gpencil_modifiers/MOD_gpencil_modifiertypes.h
M	source/blender/gpencil_modifiers/intern/MOD_gpencil_util.c
M	source/blender/gpencil_modifiers/intern/MOD_gpencillanpr.c
M	source/blender/makesdna/DNA_collection_types.h
M	source/blender/makesdna/DNA_gpencil_modifier_types.h
M	source/blender/makesdna/DNA_gpencil_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/makesdna/DNA_space_types.h
M	source/blender/makesrna/intern/rna_collection.c
M	source/blender/makesrna/intern/rna_gpencil_modifier.c
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/makesrna/intern/rna_space.c

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

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 1caeeebd97a..96d57c92858 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -321,8 +321,8 @@ mark_as_advanced(WITH_SYSTEM_GLOG)
 # Freestyle
 option(WITH_FREESTYLE     "Enable Freestyle (advanced edges rendering)" ON)
 
-# LANPR
-option(WITH_LINEART     "Enable LANPR (more advanced edges rendering)" ON)
+# LRT
+option(WITH_LINEART     "Enable LRT (more advanced edges rendering)" ON)
 
 # Misc
 if(WIN32)
diff --git a/release/scripts/startup/bl_ui/properties_collection.py b/release/scripts/startup/bl_ui/properties_collection.py
index bc68759066b..7a9929c032f 100644
--- a/release/scripts/startup/bl_ui/properties_collection.py
+++ b/release/scripts/startup/bl_ui/properties_collection.py
@@ -62,7 +62,7 @@ class COLLECTION_PT_collection_flags(CollectionButtonsPanel, Panel):
         col.prop(collection,"hide_render")
 
 class COLLECTION_PT_lineart_collection(CollectionButtonsPanel, Panel):
-    bl_label = "Collection LANPR"
+    bl_label = "Collection LRT"
     COMPAT_ENGINES =  { 'BLENDER_EEVEE', 'BLENDER_WORKBENCH', 'CYCLES' }
 
     @classmethod
diff --git a/release/scripts/startup/bl_ui/properties_lineart.py b/release/scripts/startup/bl_ui/properties_lineart.py
index c56705c7250..d30963648ec 100644
--- a/release/scripts/startup/bl_ui/properties_lineart.py
+++ b/release/scripts/startup/bl_ui/properties_lineart.py
@@ -31,7 +31,7 @@ def lineart_make_line_type_entry(col, line_type, text_disp, expand, search_from)
         col.prop_search(line_type, "material",  search_from, "materials", icon='SHADING_TEXTURE')
 
 class OBJECT_PT_lineart_settings(LanprButtonsPanel, Panel):
-    bl_label = "LANPR settings"
+    bl_label = "LRT settings"
 
     @classmethod
     def poll(cls, context):
diff --git a/release/scripts/startup/bl_ui/properties_render.py b/release/scripts/startup/bl_ui/properties_render.py
index 0f0f93b50db..afc6806c234 100644
--- a/release/scripts/startup/bl_ui/properties_render.py
+++ b/release/scripts/startup/bl_ui/properties_render.py
@@ -692,7 +692,7 @@ class RENDER_PT_simplify_greasepencil(RenderButtonsPanel, Panel, GreasePencilSim
     bl_options = {'DEFAULT_CLOSED'}
 
 
-class LANPR_UL_linesets(UIList):
+class LRT_UL_linesets(UIList):
     def draw_item(self, context, layout, data, item, icon, active_data, active_propname, index):
         layout.prop(item,"name", text="", emboss=False)
 
@@ -735,7 +735,7 @@ class RENDER_PT_lineart(RenderButtonsPanel, Panel):
 
         layout.operator("scene.lineart_auto_create_line_layer", text = "Default", icon = "ADD")
         row=layout.row()
-        row.template_list("LANPR_UL_linesets", "", lineart, "layers", lineart.layers, "active_layer_index", rows=4)
+        row.template_list("LRT_UL_linesets", "", lineart, "layers", lineart.layers, "active_layer_index", rows=4)
         col=row.column(align=True)
         if active_layer:
             col.operator("scene.lineart_add_line_layer", icon="ADD", text='')
@@ -903,7 +903,7 @@ classes = (
     RENDER_PT_lineart_gpencil,
     RENDER_PT_lineart_line_normal_effects,
     RENDER_PT_lineart_options,
-    LANPR_UL_linesets,
+    LRT_UL_linesets,
 )
 
 if __name__ == "__main__":  # only for live edit.
diff --git a/source/blender/blenkernel/intern/collection.c b/source/blender/blenkernel/intern/collection.c
index 587034a4e81..d78d0fe7f11 100644
--- a/source/blender/blenkernel/intern/collection.c
+++ b/source/blender/blenkernel/intern/collection.c
@@ -145,7 +145,7 @@ static void collection_free_data(ID *id)
 
   BKE_collection_object_cache_free(collection);
 
-  /* Remove LANPR configurations */
+  /* Remove Line Art configurations */
   MEM_SAFE_FREE(collection->lineart);
 }
 
@@ -277,7 +277,7 @@ void BKE_collection_free(Collection *collection)
 {
   collection_free_data(&collection->id);
 
-  /* Remove LANPR configurations */
+  /* Remove Line Art configurations */
   MEM_SAFE_FREE(collection->lineart);
 }
 
diff --git a/source/blender/blenkernel/intern/scene.c b/source/blender/blenkernel/intern/scene.c
index f8ba276bd7d..aab750bcfe5 100644
--- a/source/blender/blenkernel/intern/scene.c
+++ b/source/blender/blenkernel/intern/scene.c
@@ -224,7 +224,7 @@ static void scene_init_data(ID *id)
 static void BKE_lineart_free_everything(Scene *s)
 {
   SceneLineart *lineart = &s->lineart;
-  LANPR_LineLayer *ll;
+  LineartLineLayer *ll;
 
   while ((ll = BLI_pophead(&lineart->line_layers)) != NULL) {
     MEM_freeN(ll);
@@ -234,14 +234,14 @@ static void BKE_lineart_free_everything(Scene *s)
 static void BKE_lineart_copy_data(const Scene *from, Scene *to)
 {
   const SceneLineart *lineart = &from->lineart;
-  LANPR_LineLayer *ll, *new_ll;
+  LineartLineLayer *ll, *new_ll;
 
   to->lineart.line_layers.first = to->lineart.line_layers.last = NULL;
   memset(&to->lineart.line_layers, 0, sizeof(ListBase));
 
   for (ll = lineart->line_layers.first; ll; ll = ll->next) {
-    new_ll = MEM_callocN(sizeof(LANPR_LineLayer), "Copied Line Layer");
-    memcpy(new_ll, ll, sizeof(LANPR_LineLayer));
+    new_ll = MEM_callocN(sizeof(LineartLineLayer), "Copied Line Layer");
+    memcpy(new_ll, ll, sizeof(LineartLineLayer));
     new_ll->next = new_ll->prev = NULL;
     new_ll->batch = NULL;
     BLI_addtail(&to->lineart.line_layers, new_ll);
@@ -360,7 +360,7 @@ static void scene_copy_data(Main *bmain, ID *id_dst, const ID *id_src, const int
     scene_dst->preview = NULL;
   }
 
-  /*  LANPR  data */
+  /*  Line Art  data */
   BKE_lineart_copy_data(scene_src, scene_dst);
 
   BKE_scene_copy_data_eevee(scene_dst, scene_src);
@@ -449,7 +449,7 @@ static void scene_free_data(ID *id)
     scene->display.shading.prop = NULL;
   }
 
-  /* LANPR data */
+  /* Line Art data */
   BKE_lineart_free_everything(scene);
 
   /* These are freed on doversion. */
@@ -1048,9 +1048,9 @@ Scene *BKE_scene_duplicate(Main *bmain, Scene *sce, eSceneCopyMethod type)
       BKE_sequencer_editing_free(sce_copy, true);
     }
 
-    /*  LANPR  data */
+    /*  Line Art  data */
     BKE_lineart_copy_data(sce, sce_copy);
-    
+
     return sce_copy;
   }
 }
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c
index a5af78d3c3e..3d3af550dc7 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -6497,7 +6497,7 @@ static void lib_link_scene(BlendLibReader *reader, Scene *sce)
     }
   }
 
-  for (LANPR_LineLayer *ll = sce->lineart.line_layers.first; ll; ll = ll->next) {
+  for (LineartLineLayer *ll = sce->lineart.line_layers.first; ll; ll = ll->next) {
     BLO_read_id_address(reader, sce->id.lib, &ll->normal_control_object);
   }
 
@@ -6942,7 +6942,7 @@ static void direct_link_scene(BlendDataReader *reader, Scene *sce)
 
   BLO_read_data_address(reader, &sce->lineart.active_layer);
   BLO_read_list(reader, &(sce->lineart.line_layers));
-  for (LANPR_LineLayer *ll = sce->lineart.line_layers.first; ll; ll = ll->next) {
+  for (LineartLineLayer *ll = sce->lineart.line_layers.first; ll; ll = ll->next) {
     ll->batch = NULL;
     ll->shgrp = NULL;
   }
@@ -11175,7 +11175,7 @@ static void expand_scene(BlendExpander *expander, Scene *sce)
     }
   }
 
-  for (LANPR_LineLayer *ll = sce->lineart.line_layers.first; ll; ll = ll->next) {
+  for (LineartLineLayer *ll = sce->lineart.line_layers.first; ll; ll = ll->next) {
     if (ll->normal_control_object) {
       BLO_expand(expander, ll->normal_control_object);
     }
diff --git a/source/blender/blenloader/intern/versioning_280.c b/source/blender/blenloader/intern/versioning_280.c
index c14ca67f9de..3daf23e406d 100644
--- a/source/blender/blenloader/intern/versioning_280.c
+++ b/source/blender/blenloader/intern/versioning_280.c
@@ -5108,7 +5108,7 @@ void blo_do_versions_280(FileData *fd, Library *UNUSED(lib), Main *bmain)
 
           scene->lineart.crease_threshold = 0.7;
 
-          scene->lineart.flags |= (LANPR_USE_INTERSECTIONS);
+          scene->lineart.flags |= (LRT_USE_INTERSECTIONS);
 
           zero_v4(scene->lineart.line_color);
 
diff --git a/source/blender/blenloader/intern/writefile.c b/source/blender/blenloader/intern/writefile.c
index 546fb4d2f04..0596dee7565 100644
--- a/source/blender/blenloader/intern/writefile.c
+++ b/source/blender/blenloader/intern/writefile.c
@@ -2747,9 +2747,9 @@ static void write_scene(BlendWriter *writer, Scene *sce, const void *id_address)
     write_lightcache(writer, sce->eevee.light_cache_data);
   }
 
-  /* LANPR Line Layers */
-  for (LANPR_LineLayer *ll = sce->lineart.line_layers.first; ll; ll = ll->next) {
-    writestruct(writer->wd, DATA, LANPR_LineLayer, 1, ll);
+  /* Line Art Line Layers */
+  for (LineartLineLayer *ll = sce->lineart.line_layers.first; ll; ll = ll->next) {
+    writestruct(writer->wd, DATA, LineartLineLayer, 1, ll);
   }
   write_view3dshading(writer, &sce->display.shading);
 
diff --git a/source/blender/draw/DRW_engine.h b/source/blender/draw/DRW_engine.h
index 93e947806b9..b6f996226ec 100644
--- a/source/blender/draw/DRW_engine.h
+++ b/source/blender/draw/DRW_engine.h
@@ -133,7 +133,7 @@ void DRW_draw_select_id(struct Depsgraph *depsgraph,
 bool DRW_render_check_grease_pencil(struct Depsgraph *depsgraph);
 void DRW_render_gpencil(struct RenderEngine *engine, struct Depsgraph *depsgraph);
 
-/* LANPR calls */
+/* Line Art calls */
 #ifdef WITH_LINEART
 void DRW_scene_lineart_freecache(struct Scene *sce);
 #endif
diff --git a/source/blender/editors/include/ED_lanpr.h b/source/blender/editors/include/ED_lanpr.h
index 40b8dbaa67d..cafcdd14319 100644
--- a/source/blender/editors/include/ED_lanpr.h
+++ b/source/blender/editors/include/ED_lanpr.h
@@ -21,11 +21,11 @@
  * \ingroup editors
  */
 
-#ifndef __ED_LANPR_H__
-#define __ED_LANPR_H__
+#ifndef __ED_LRT_H__
+#define __ED_LRT_H__
 
 #ifndef WITH_LINEART
-#  error LANPR code included in non-LANPR-enabled build
+#  error LRT code included in non-LRT-enabled build
 #endif
 
 #include "BLI_linklist.h"
@@ -38,22 +38,22 @@
 #include <math.h>
 #include <string.h>
 
-typedef struct eLineArtStaticMemPoolNode {
+typedef struct LineartStaticMemPoolNode {
   Link item;
   int used_byte;
   /* User memory starts here */
-} eLineArtStaticMemPoolNode;
+} LineartStaticMemPoolNode;
 
-typedef struct eL

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list