diff options
author | Antonio Vazquez <blendergit@gmail.com> | 2020-10-30 17:41:52 +0300 |
---|---|---|
committer | Antonio Vazquez <blendergit@gmail.com> | 2020-10-30 17:45:00 +0300 |
commit | e6f61a4a379bbb80296131fae0cef178e2145e52 (patch) | |
tree | ef7827aaaedbde2b27bda982e66f5c917cdf7157 /source/blender/makesrna | |
parent | aacdc3995886b4aad93044c4cec5e05f3dfc6cae (diff) |
GPencil: New material parameter to rotate texture
Add a parameter to rotate the texture for Dots and Squares
Differential Revision: https://developer.blender.org/D9369
Diffstat (limited to 'source/blender/makesrna')
-rw-r--r-- | source/blender/makesrna/intern/rna_material.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_material.c b/source/blender/makesrna/intern/rna_material.c index 5e16f1187fb..086a182e085 100644 --- a/source/blender/makesrna/intern/rna_material.c +++ b/source/blender/makesrna/intern/rna_material.c @@ -24,6 +24,8 @@ #include "DNA_material_types.h" #include "DNA_texture_types.h" +#include "BLI_math.h" + #include "RNA_define.h" #include "RNA_enum_types.h" @@ -594,6 +596,16 @@ static void rna_def_material_greasepencil(BlenderRNA *brna) prop, "Alignment", "Defines how align Dots and Boxes with drawing path and object rotation"); RNA_def_property_update(prop, NC_GPENCIL | ND_SHADING, "rna_MaterialGpencil_update"); + /* Rotation of texture for Dots or Strokes. */ + prop = RNA_def_property(srna, "alignment_rotation", PROP_FLOAT, PROP_ANGLE); + RNA_def_property_float_sdna(prop, NULL, "alignment_rotation"); + RNA_def_property_float_default(prop, 0.0f); + RNA_def_property_range(prop, -DEG2RADF(90.0f), DEG2RADF(90.0f)); + RNA_def_property_ui_range(prop, -DEG2RADF(90.0f), DEG2RADF(90.0f), 10, 3); + RNA_def_property_ui_text( + prop, "Rotation", "Additional rotation applied to dots and square strokes"); + RNA_def_property_update(prop, NC_GPENCIL | ND_SHADING, "rna_MaterialGpencil_update"); + /* pass index for future compositing and editing tools */ prop = RNA_def_property(srna, "pass_index", PROP_INT, PROP_UNSIGNED); RNA_def_property_int_sdna(prop, NULL, "index"); |