diff options
author | Antonio Vazquez <blendergit@gmail.com> | 2021-08-31 15:59:44 +0300 |
---|---|---|
committer | Antonio Vazquez <blendergit@gmail.com> | 2021-08-31 15:59:55 +0300 |
commit | 84f826ff2316de610a6545b27071b0fd6e67e16d (patch) | |
tree | c94a63ee772fb1dbe6450ce9ddc7c994868f564c /source | |
parent | 1be598ba680657682b42005c709704425d306049 (diff) |
Fix T90989: Annotation opacity must not be animatable
All props of annotations are not animatable by design and opacity must be equal.
As the opacity is reused by gpencil objects, a new prop has been created in order to use different props for annotations and GP objects.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/makesrna/intern/rna_gpencil.c | 8 |
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 3e5dce64c7b..f06c8a5325c 100644 --- a/source/blender/makesrna/intern/rna_gpencil.c +++ b/source/blender/makesrna/intern/rna_gpencil.c @@ -2005,6 +2005,14 @@ static void rna_def_gpencil_layer(BlenderRNA *brna) prop, "Custom Channel Color", "Custom color for animation channel in Dopesheet"); RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, "rna_GPencil_update"); + /* Layer Opacity (Annotations). */ + prop = RNA_def_property(srna, "annotation_opacity", PROP_FLOAT, PROP_NONE); + RNA_def_property_float_sdna(prop, NULL, "opacity"); + RNA_def_property_range(prop, 0.0, 1.0f); + RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); + RNA_def_property_ui_text(prop, "Opacity", "Annotation Layer Opacity"); + RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, "rna_GPencil_update"); + /* Stroke Drawing Color (Annotations) */ prop = RNA_def_property(srna, "color", PROP_FLOAT, PROP_COLOR_GAMMA); RNA_def_property_array(prop, 3); |