diff options
author | Tamito Kajiyama <rd6t-kjym@asahi-net.or.jp> | 2012-12-10 03:19:46 +0400 |
---|---|---|
committer | Tamito Kajiyama <rd6t-kjym@asahi-net.or.jp> | 2012-12-10 03:19:46 +0400 |
commit | 5083e0737f6413c63ab49b82735333534181d9b4 (patch) | |
tree | b21a7977e79ff5db7bc2c7f53471cc2f5ccf76bd /source/blender/makesrna/intern/rna_linestyle.c | |
parent | 3c4987f98378d44eda133311c65aa19412e4cd38 (diff) |
All angle properties were switched from degrees to radians (using PROP_ANGLE
RNA subtype), since Freestyle internally use angles in radians.
A patch set by Bastien Montagne (many thanks!)
NOTICE FOR BRANCH USERS:
This commit may break line drawing settings of already saved Freestyle files.
All angles are now treated as radians instead of degrees, so collections of
angle values might be necessary in order to recover previous visual results.
Affected properties are:
- Crease Angle in the edge detection options
- Min 2D Angle in the 'Splitting' section of a line style
- Max 2D Angle in the 'Splitting' section of a line style
- 'orientation' parameter of the Calligraphy thickness modifier
- 'angle' parameter of the PerlinNoise1D geometry modifier
- 'angle' parameter of the PerlinNoise2D geometry modifier
- 'angle' parameter of the 2DTransform geometry modifier
Diffstat (limited to 'source/blender/makesrna/intern/rna_linestyle.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_linestyle.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/source/blender/makesrna/intern/rna_linestyle.c b/source/blender/makesrna/intern/rna_linestyle.c index fbe8eae31b3..809603d5ddf 100644 --- a/source/blender/makesrna/intern/rna_linestyle.c +++ b/source/blender/makesrna/intern/rna_linestyle.c @@ -565,7 +565,7 @@ static void rna_def_linestyle_modifiers(BlenderRNA *brna) RNA_def_struct_ui_text(srna, "Calligraphy", "Change line thickness so that stroke looks like made with a calligraphic pen"); rna_def_thickness_modifier(srna); - prop= RNA_def_property(srna, "orientation", PROP_FLOAT, PROP_NONE); + prop= RNA_def_property(srna, "orientation", PROP_FLOAT, PROP_ANGLE); RNA_def_property_float_sdna(prop, NULL, "orientation"); RNA_def_property_ui_text(prop, "Orientation", "Angle of the main direction"); RNA_def_property_update(prop, NC_LINESTYLE, NULL); @@ -675,9 +675,9 @@ static void rna_def_linestyle_modifiers(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Octaves", "Number of octaves (i.e., the amount of detail of the Perlin noise)"); RNA_def_property_update(prop, NC_LINESTYLE, NULL); - prop= RNA_def_property(srna, "angle", PROP_FLOAT, PROP_NONE); + prop= RNA_def_property(srna, "angle", PROP_FLOAT, PROP_ANGLE); RNA_def_property_float_sdna(prop, NULL, "angle"); - RNA_def_property_ui_text(prop, "Angle", "Displacement direction in degrees"); + RNA_def_property_ui_text(prop, "Angle", "Displacement direction"); RNA_def_property_update(prop, NC_LINESTYLE, NULL); prop= RNA_def_property(srna, "seed", PROP_INT, PROP_NONE); @@ -704,9 +704,9 @@ static void rna_def_linestyle_modifiers(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Octaves", "Number of octaves (i.e., the amount of detail of the Perlin noise)"); RNA_def_property_update(prop, NC_LINESTYLE, NULL); - prop= RNA_def_property(srna, "angle", PROP_FLOAT, PROP_NONE); + prop= RNA_def_property(srna, "angle", PROP_FLOAT, PROP_ANGLE); RNA_def_property_float_sdna(prop, NULL, "angle"); - RNA_def_property_ui_text(prop, "Angle", "Displacement direction in degrees"); + RNA_def_property_ui_text(prop, "Angle", "Displacement direction"); RNA_def_property_update(prop, NC_LINESTYLE, NULL); prop= RNA_def_property(srna, "seed", PROP_INT, PROP_NONE); @@ -830,9 +830,9 @@ static void rna_def_linestyle_modifiers(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Scale Y", "Scaling factor that is applied along the Y axis"); RNA_def_property_update(prop, NC_LINESTYLE, NULL); - prop= RNA_def_property(srna, "angle", PROP_FLOAT, PROP_NONE); + prop= RNA_def_property(srna, "angle", PROP_FLOAT, PROP_ANGLE); RNA_def_property_float_sdna(prop, NULL, "angle"); - RNA_def_property_ui_text(prop, "Rotation Angle", "Rotation angle in degrees"); + RNA_def_property_ui_text(prop, "Rotation Angle", "Rotation angle"); RNA_def_property_update(prop, NC_LINESTYLE, NULL); prop= RNA_def_property(srna, "pivot_u", PROP_FLOAT, PROP_FACTOR); @@ -982,7 +982,7 @@ static void rna_def_linestyle(BlenderRNA *brna) prop= RNA_def_property(srna, "min_angle", PROP_FLOAT, PROP_ANGLE); RNA_def_property_float_sdna(prop, NULL, "min_angle"); - RNA_def_property_range(prop, 0.0f, (float)M_PI); + RNA_def_property_range(prop, 0.0f, DEG2RADF(180.0f)); RNA_def_property_ui_text(prop, "Min 2D Angle", "Minimum 2D angle for splitting chains"); RNA_def_property_update(prop, NC_LINESTYLE, NULL); @@ -993,7 +993,7 @@ static void rna_def_linestyle(BlenderRNA *brna) prop= RNA_def_property(srna, "max_angle", PROP_FLOAT, PROP_ANGLE); RNA_def_property_float_sdna(prop, NULL, "max_angle"); - RNA_def_property_range(prop, 0.0f, (float)M_PI); + RNA_def_property_range(prop, 0.0f, DEG2RADF(180.0f)); RNA_def_property_ui_text(prop, "Max 2D Angle", "Maximum 2D angle for splitting chains"); RNA_def_property_update(prop, NC_LINESTYLE, NULL); |