[Bf-blender-cvs] [e82b3a312dd] temp-lineart-contained: LineArt: naming change floating->loose

YimingWu noreply at git.blender.org
Tue Jun 29 10:59:49 CEST 2021


Commit: e82b3a312dd77352742c80e15c1e2a55f8cba1f9
Author: YimingWu
Date:   Tue Jun 29 11:04:45 2021 +0800
Branches: temp-lineart-contained
https://developer.blender.org/rBe82b3a312dd77352742c80e15c1e2a55f8cba1f9

LineArt: naming change floating->loose

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

M	source/blender/gpencil_modifiers/intern/MOD_gpencillineart.c
M	source/blender/gpencil_modifiers/intern/lineart/MOD_lineart.h
M	source/blender/gpencil_modifiers/intern/lineart/lineart_chain.c
M	source/blender/gpencil_modifiers/intern/lineart/lineart_cpu.c
M	source/blender/makesdna/DNA_lineart_types.h
M	source/blender/makesrna/intern/rna_gpencil_modifier.c

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

diff --git a/source/blender/gpencil_modifiers/intern/MOD_gpencillineart.c b/source/blender/gpencil_modifiers/intern/MOD_gpencillineart.c
index 12c0d121362..51df49c6f55 100644
--- a/source/blender/gpencil_modifiers/intern/MOD_gpencillineart.c
+++ b/source/blender/gpencil_modifiers/intern/MOD_gpencillineart.c
@@ -357,7 +357,7 @@ static void line_types_panel_draw(const bContext *UNUSED(C), Panel *panel)
   uiLayout *col = uiLayoutColumn(layout, false);
 
   uiItemR(col, ptr, "use_contour", 0, IFACE_("Contour"), ICON_NONE);
-  uiItemR(col, ptr, "use_floating", 0, IFACE_("Floating"), ICON_NONE);
+  uiItemR(col, ptr, "use_loose", 0, IFACE_("Loose"), ICON_NONE);
   uiItemR(col, ptr, "use_material", 0, IFACE_("Material Borders"), ICON_NONE);
   uiItemR(col, ptr, "use_edge_mark", 0, IFACE_("Edge Marks"), ICON_NONE);
   uiItemR(col, ptr, "use_intersection", 0, IFACE_("Intersections"), ICON_NONE);
@@ -416,7 +416,7 @@ static void options_panel_draw(const bContext *UNUSED(C), Panel *panel)
   uiItemR(layout, ptr, "use_edge_overlap", 0, IFACE_("Overlapping Edges As Contour"), ICON_NONE);
   uiItemR(layout, ptr, "use_object_instances", 0, NULL, ICON_NONE);
   uiItemR(layout, ptr, "use_clip_plane_boundaries", 0, NULL, ICON_NONE);
-  uiItemR(layout, ptr, "allow_overlap_edge_types", 0, NULL, ICON_NONE);
+  uiItemR(layout, ptr, "use_overlap_edge_type_support", 0, NULL, ICON_NONE);
   uiItemR(layout, ptr, "use_crease_on_smooth", 0, IFACE_("Crease On Smooth"), ICON_NONE);
   uiItemR(layout, ptr, "use_crease_on_sharp", 0, IFACE_("Crease On Sharp"), ICON_NONE);
 }
@@ -610,7 +610,7 @@ static void chaining_panel_draw(const bContext *UNUSED(C), Panel *panel)
   const bool is_baked = RNA_boolean_get(ptr, "is_baked");
   const bool use_cache = RNA_boolean_get(ptr, "use_cache");
   const bool is_first = BKE_gpencil_is_first_lineart_in_stack(ob_ptr.data, ptr->data);
-  const bool is_geom = RNA_boolean_get(ptr, "chain_geometry_space");
+  const bool is_geom = RNA_boolean_get(ptr, "use_geometry_space_chain");
 
   uiLayoutSetPropSep(layout, true);
   uiLayoutSetEnabled(layout, !is_baked);
@@ -624,8 +624,8 @@ static void chaining_panel_draw(const bContext *UNUSED(C), Panel *panel)
   uiItemR(col, ptr, "use_fuzzy_intersections", 0, NULL, ICON_NONE);
   uiItemR(col, ptr, "use_fuzzy_all", 0, NULL, ICON_NONE);
 
-  uiItemR(col, ptr, "chain_floating_edges", 0, IFACE_("Floating Edges"), ICON_NONE);
-  uiItemR(col, ptr, "chain_geometry_space", 0, NULL, ICON_NONE);
+  uiItemR(col, ptr, "use_loose_edge_chain", 0, IFACE_("Loose Edges"), ICON_NONE);
+  uiItemR(col, ptr, "use_geometry_space_chain", 0, NULL, ICON_NONE);
 
   uiItemR(layout,
           ptr,
diff --git a/source/blender/gpencil_modifiers/intern/lineart/MOD_lineart.h b/source/blender/gpencil_modifiers/intern/lineart/MOD_lineart.h
index 48f79e9c629..3f6e7ba717a 100644
--- a/source/blender/gpencil_modifiers/intern/lineart/MOD_lineart.h
+++ b/source/blender/gpencil_modifiers/intern/lineart/MOD_lineart.h
@@ -289,7 +289,7 @@ typedef struct LineartRenderBuffer {
   bool use_material;
   bool use_edge_marks;
   bool use_intersections;
-  bool use_floating;
+  bool use_loose;
   bool use_light_contour;
   bool fuzzy_intersections;
   bool fuzzy_everything;
@@ -297,9 +297,9 @@ typedef struct LineartRenderBuffer {
   bool allow_overlapping_edges;
   bool allow_duplicated_types;
   bool remove_doubles;
-  bool floating_as_contour;
-  bool chain_floating_edges;
-  bool chain_geometry_space;
+  bool use_loose_as_contour;
+  bool use_loose_edge_chain;
+  bool use_geometry_space_chain;
 
   bool filter_face_mark;
   bool filter_face_mark_invert;
diff --git a/source/blender/gpencil_modifiers/intern/lineart/lineart_chain.c b/source/blender/gpencil_modifiers/intern/lineart/lineart_chain.c
index 321e4a2b47b..d8369a15aac 100644
--- a/source/blender/gpencil_modifiers/intern/lineart/lineart_chain.c
+++ b/source/blender/gpencil_modifiers/intern/lineart/lineart_chain.c
@@ -739,8 +739,8 @@ static LineartChainRegisterEntry *lineart_chain_get_closest_cre(LineartRenderBuf
       }
     }
 
-    float new_len = rb->chain_geometry_space ? len_v3v3(cre->eci->gpos, eci->gpos) :
-                                               len_v2v2(cre->eci->pos, eci->pos);
+    float new_len = rb->use_geometry_space_chain ? len_v3v3(cre->eci->gpos, eci->gpos) :
+                                                   len_v2v2(cre->eci->pos, eci->pos);
     if (new_len < dist) {
       closest_cre = cre;
       dist = new_len;
@@ -811,7 +811,7 @@ void MOD_lineart_chain_connect(LineartRenderBuffer *rb)
     }
     BLI_addtail(&rb->chains, ec);
 
-    if (ec->type == LRT_EDGE_FLAG_FLOATING && (!rb->chain_floating_edges)) {
+    if (ec->type == LRT_EDGE_FLAG_LOOSE && (!rb->use_loose_edge_chain)) {
       continue;
     }
 
diff --git a/source/blender/gpencil_modifiers/intern/lineart/lineart_cpu.c b/source/blender/gpencil_modifiers/intern/lineart/lineart_cpu.c
index 4cb29cfbb62..ed54c4a879c 100644
--- a/source/blender/gpencil_modifiers/intern/lineart/lineart_cpu.c
+++ b/source/blender/gpencil_modifiers/intern/lineart/lineart_cpu.c
@@ -1471,14 +1471,14 @@ static uint16_t lineart_identify_feature_line(LineartRenderBuffer *rb,
   }
 
   if (!ll && !lr) {
-    if (!rb->floating_as_contour) {
+    if (!rb->use_loose_as_contour) {
       if (use_freestyle_face && rb->filter_face_mark) {
         if (rb->filter_face_mark_invert) {
-          return LRT_EDGE_FLAG_FLOATING;
+          return LRT_EDGE_FLAG_LOOSE;
         }
         return 0;
       }
-      return LRT_EDGE_FLAG_FLOATING;
+      return LRT_EDGE_FLAG_LOOSE;
     }
   }
 
@@ -1628,7 +1628,7 @@ static void lineart_add_edge_to_list(LineartRenderBuffer *rb, LineartEdge *e)
     case LRT_EDGE_FLAG_INTERSECTION:
       lineart_prepend_edge_direct(&rb->intersection.first, e);
       break;
-    case LRT_EDGE_FLAG_FLOATING:
+    case LRT_EDGE_FLAG_LOOSE:
       lineart_prepend_edge_direct(&rb->floating.first, e);
       break;
     case LRT_EDGE_FLAG_LIGHT_CONTOUR:
@@ -1661,7 +1661,7 @@ static void lineart_add_edge_to_list_thread(LineartObjectInfo *obi, LineartEdge
     case LRT_EDGE_FLAG_INTERSECTION:
       LRT_ASSIGN_EDGE(intersection);
       break;
-    case LRT_EDGE_FLAG_FLOATING:
+    case LRT_EDGE_FLAG_LOOSE:
       LRT_ASSIGN_EDGE(floating);
       break;
     case LRT_EDGE_FLAG_LIGHT_CONTOUR:
@@ -3138,9 +3138,9 @@ static LineartRenderBuffer *lineart_create_render_buffer(Scene *scene,
   rb->fuzzy_everything = (lmd->calculation_flags & LRT_EVERYTHING_AS_CONTOUR) != 0;
   rb->allow_boundaries = (lmd->calculation_flags & LRT_ALLOW_CLIPPING_BOUNDARIES) != 0;
   rb->remove_doubles = (lmd->calculation_flags & LRT_REMOVE_DOUBLES) != 0;
-  rb->floating_as_contour = (lmd->calculation_flags & LRT_FLOATING_AS_CONTOUR) != 0;
-  rb->chain_floating_edges = (lmd->calculation_flags & LRT_CHAIN_FLOATING_EDGES) != 0;
-  rb->chain_geometry_space = (lmd->calculation_flags & LRT_CHAIN_GEOMETRY_SPACE) != 0;
+  rb->use_loose_as_contour = (lmd->calculation_flags & LRT_LOOSE_AS_CONTOUR) != 0;
+  rb->use_loose_edge_chain = (lmd->calculation_flags & LRT_CHAIN_LOOSE_EDGES) != 0;
+  rb->use_geometry_space_chain = (lmd->calculation_flags & LRT_CHAIN_GEOMETRY_SPACE) != 0;
 
   /* See lineart_edge_from_triangle() for how this option may impact performance. */
   rb->allow_overlapping_edges = (lmd->calculation_flags & LRT_ALLOW_OVERLAPPING_EDGES) != 0;
@@ -3158,7 +3158,7 @@ static LineartRenderBuffer *lineart_create_render_buffer(Scene *scene,
   rb->use_material = (edge_types & LRT_EDGE_FLAG_MATERIAL) != 0;
   rb->use_edge_marks = (edge_types & LRT_EDGE_FLAG_EDGE_MARK) != 0;
   rb->use_intersections = (edge_types & LRT_EDGE_FLAG_INTERSECTION) != 0;
-  rb->use_floating = (edge_types & LRT_EDGE_FLAG_FLOATING) != 0;
+  rb->use_loose = (edge_types & LRT_EDGE_FLAG_LOOSE) != 0;
   rb->use_light_contour = ((edge_types & LRT_EDGE_FLAG_LIGHT_CONTOUR) != 0 &&
                            (lmd->light_contour_object != NULL));
 
@@ -4304,7 +4304,7 @@ static int UNUSED_FUNCTION(lineart_rb_edge_types)(LineartRenderBuffer *rb)
   types |= rb->use_material ? LRT_EDGE_FLAG_MATERIAL : 0;
   types |= rb->use_edge_marks ? LRT_EDGE_FLAG_EDGE_MARK : 0;
   types |= rb->use_intersections ? LRT_EDGE_FLAG_INTERSECTION : 0;
-  types |= rb->use_floating ? LRT_EDGE_FLAG_FLOATING : 0;
+  types |= rb->use_loose ? LRT_EDGE_FLAG_LOOSE : 0;
   types |= rb->use_light_contour ? LRT_EDGE_FLAG_LIGHT_CONTOUR : 0;
   return types;
 }
diff --git a/source/blender/makesdna/DNA_lineart_types.h b/source/blender/makesdna/DNA_lineart_types.h
index 125d6979deb..3031a021487 100644
--- a/source/blender/makesdna/DNA_lineart_types.h
+++ b/source/blender/makesdna/DNA_lineart_types.h
@@ -47,13 +47,13 @@ typedef enum eLineartMainFlags {
   LRT_ALLOW_OVERLAPPING_EDGES = (1 << 3),
   LRT_ALLOW_CLIPPING_BOUNDARIES = (1 << 4),
   LRT_REMOVE_DOUBLES = (1 << 5),
-  LRT_FLOATING_AS_CONTOUR = (1 << 6),
+  LRT_LOOSE_AS_CONTOUR = (1 << 6),
   LRT_GPENCIL_INVERT_SOURCE_VGROUP = (1 << 7),
   LRT_GPENCIL_MATCH_OUTPUT_VGROUP = (1 << 8),
   LRT_FILTER_FACE_MARK = (1 << 9),
   LRT_FILTER_FACE_MARK_INVERT = (1 << 10),
   LRT_FILTER_FACE_MARK_BOUNDARIES = (1 << 11),
-  LRT_CHAIN_FLOATING_EDGES = (1 << 12),
+  LRT_CHAIN_LOOSE_EDGES = (1 << 12),
   LRT_CHAIN_GEOMETRY_SPACE = (1 << 13),
   LRT_ALLOW_OVERLAP_EDGE_TYPES = (1 << 14),
   LRT_USE_CUSTOM_CAMERA = (1 << 15),
@@ -68,7 +68,7 @@ typedef enum eLineartEdgeFlag {
   LRT_EDGE_FLAG_CREASE = (1 << 2),
   LRT_EDGE_FLAG_MATERIAL = (1 << 3),
   LRT_EDGE_FLAG_INTERSECTION = (1 << 4),
-  LRT_EDGE_FLAG_FLOATING = (1 << 5),
+  LRT_EDGE_FLAG_LOOSE = (1 << 5),
   LRT_EDGE_FLAG_LIGHT_CONTOUR = (1 << 6),
   /* LRT_EDGE_FLAG_FOR_FUTURE = (1 << 7), */
   /* Limited to 8 bits for edge type flag, don't add anymore because BMEdge->head.eflag only has 8
diff --git a/source/blender/makesrna/intern/rna_gpencil_modifier.c b/source/blender/makesrna/intern/rna_gpencil_modifier.c
index 0daafba51ed..211a2639265 100644
--- a/source/blender/makesrna/intern/rna_gpencil_modifier.c
+++ b/source/blender/makesrna/intern/rna_gpencil_modifier.c
@@ -2825,9 +2825,9 @@ static void rna_def_modifier_gpencillineart(BlenderRNA *brna)
       prop, "Remove Doubles", "Remove doubles from the source geometry before generat

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list