Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYimingWu <xp8110@outlook.com>2021-06-09 17:42:55 +0300
committerYimingWu <xp8110@outlook.com>2021-06-09 17:46:08 +0300
commitf546b0800b9121b24b1292f1ec602ed9964d1848 (patch)
treeffeb84136b2197b92512922db0fce455190af5d5 /source/blender/makesrna/intern/rna_gpencil.c
parent92ae3ff84ca90973efcb3372b1102ee2aaf7c14f (diff)
GPencil: Add custom normal entry to bGPDspoint.
Also modified existing utility functions to take care of the new surface normal interpolation and so on. Reviewed By: Antonio Vazquez (antoniov) Differential Revision: https://developer.blender.org/D11543
Diffstat (limited to 'source/blender/makesrna/intern/rna_gpencil.c')
-rw-r--r--source/blender/makesrna/intern/rna_gpencil.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_gpencil.c b/source/blender/makesrna/intern/rna_gpencil.c
index 19ed5f960cf..a2d6bbed70c 100644
--- a/source/blender/makesrna/intern/rna_gpencil.c
+++ b/source/blender/makesrna/intern/rna_gpencil.c
@@ -1288,6 +1288,14 @@ static void rna_def_gpencil_stroke_point(BlenderRNA *brna)
RNA_def_property_ui_text(
prop, "Vertex Color", "Color used to mix with point color to get final color");
RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, "rna_GPencil_update");
+
+ /* Surface normal. */
+ prop = RNA_def_property(srna, "custom_vector", PROP_FLOAT, PROP_COLOR);
+ RNA_def_property_array(prop, 3);
+ RNA_def_property_range(prop, 0.0f, 1.0f);
+ RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
+ RNA_def_property_ui_text(prop, "Custom Vector", "Generic custom vector for various use cases");
+ RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, "rna_GPencil_update");
}
static void rna_def_gpencil_stroke_points_api(BlenderRNA *brna, PropertyRNA *cprop)