[Bf-blender-cvs] [6b8b0024dbc] lanpr-under-gp: LineArt: Vertex group data structure changes.

YimingWu noreply at git.blender.org
Fri Oct 2 07:40:29 CEST 2020


Commit: 6b8b0024dbcb2f8cad625fd5f85a63a4cb4249b7
Author: YimingWu
Date:   Fri Oct 2 12:47:56 2020 +0800
Branches: lanpr-under-gp
https://developer.blender.org/rB6b8b0024dbcb2f8cad625fd5f85a63a4cb4249b7

LineArt: Vertex group data structure changes.

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

M	source/blender/editors/include/ED_lineart.h
M	source/blender/makesdna/DNA_gpencil_modifier_types.h
M	source/blender/makesrna/intern/rna_gpencil_modifier.c

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

diff --git a/source/blender/editors/include/ED_lineart.h b/source/blender/editors/include/ED_lineart.h
index 449b0bf94aa..11c3c2ac6b0 100644
--- a/source/blender/editors/include/ED_lineart.h
+++ b/source/blender/editors/include/ED_lineart.h
@@ -51,7 +51,6 @@ typedef struct LineartStaticMemPool {
 } LineartStaticMemPool;
 
 typedef struct LineartRenderTriangle {
-  struct LineartRenderTriangle *next, *prev;
   struct LineartRenderVert *v[3];
   struct LineartRenderLine *rl[3];
   double gn[3];
@@ -105,9 +104,11 @@ typedef struct LineartRenderLineSegment {
 } LineartRenderLineSegment;
 
 typedef struct LineartRenderVert {
-  struct LineartRenderVert *next, *prev;
   double gloc[3];
   double fbcoord[4];
+
+  size_t index;
+
   /**  Used as "r" when intersecting */
   struct BMVert *v;
   struct LineartRenderLine *intersecting_line;
diff --git a/source/blender/makesdna/DNA_gpencil_modifier_types.h b/source/blender/makesdna/DNA_gpencil_modifier_types.h
index 8c2512ff56a..387396442b4 100644
--- a/source/blender/makesdna/DNA_gpencil_modifier_types.h
+++ b/source/blender/makesdna/DNA_gpencil_modifier_types.h
@@ -826,6 +826,11 @@ typedef struct LineartGpencilModifierData {
   struct Material *target_material;
   char target_layer[64];
 
+  /** These two variables are to pass on vertex group information from mesh to strokes.
+   * vgname specifies which vertex groups our strokes from source_vertex_group will go to. */
+  char source_vertex_group[64];
+  char vgname[64];
+
   float opacity;
   short thickness;
 
diff --git a/source/blender/makesrna/intern/rna_gpencil_modifier.c b/source/blender/makesrna/intern/rna_gpencil_modifier.c
index 23297a61fa5..a094be52840 100644
--- a/source/blender/makesrna/intern/rna_gpencil_modifier.c
+++ b/source/blender/makesrna/intern/rna_gpencil_modifier.c
@@ -2398,6 +2398,17 @@ static void rna_def_modifier_gpencillineart(BlenderRNA *brna)
   RNA_def_property_ui_text(prop, "Target Layer", "Grease pencil layer that strokes goes into");
   RNA_def_property_update(prop, 0, "rna_GpencilModifier_update");
 
+  prop = RNA_def_property(srna, "source_vertex_group", PROP_STRING, PROP_NONE);
+  RNA_def_property_ui_text(prop,
+                           "Source Vertex Group",
+                           "Matches the beginning of names of vertex groups from mesh objects");
+  RNA_def_property_update(prop, 0, "rna_GpencilModifier_update");
+
+  prop = RNA_def_property(srna, "vertex_group", PROP_STRING, PROP_NONE);
+  RNA_def_property_string_sdna(prop, NULL, "vgname");
+  RNA_def_property_ui_text(prop, "Vertex Group", "Vertex group name for selected strokes");
+  RNA_def_property_update(prop, 0, "rna_GpencilModifier_update");
+
   prop = RNA_def_property(srna, "thickness", PROP_INT, PROP_NONE);
   RNA_def_property_int_default(prop, 20);
   RNA_def_property_ui_text(prop, "Thickness", "The thickness that are used to generate strokes");



More information about the Bf-blender-cvs mailing list