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:
authorBastien Montagne <montagne29@wanadoo.fr>2015-07-12 00:00:56 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2015-07-12 00:00:56 +0300
commit37a6a92f7694015bb7e16adffa1a58e913e5d391 (patch)
tree77557fe1a1959b326eed49148d3733264d3c234e /source/blender/makesrna
parent80acaa3009665f21e51494f121b3b43c13f4458e (diff)
parent5a16f297006b728f4e777f89fa73ee83d062ee1f (diff)
Merge branch 'asset-experiments' into asset-engine
Conflicts: source/blender/editors/space_file/file_ops.c
Diffstat (limited to 'source/blender/makesrna')
-rw-r--r--source/blender/makesrna/RNA_access.h13
-rw-r--r--source/blender/makesrna/intern/makesrna.c2
-rw-r--r--source/blender/makesrna/intern/rna_image_api.c1
-rw-r--r--source/blender/makesrna/intern/rna_linestyle.c264
-rw-r--r--source/blender/makesrna/intern/rna_material.c6
-rw-r--r--source/blender/makesrna/intern/rna_modifier.c6
-rw-r--r--source/blender/makesrna/intern/rna_object.c20
-rw-r--r--source/blender/makesrna/intern/rna_sequencer.c32
-rw-r--r--source/blender/makesrna/intern/rna_space.c2
9 files changed, 317 insertions, 29 deletions
diff --git a/source/blender/makesrna/RNA_access.h b/source/blender/makesrna/RNA_access.h
index 2067f1ae2a5..f683684d7f1 100644
--- a/source/blender/makesrna/RNA_access.h
+++ b/source/blender/makesrna/RNA_access.h
@@ -322,14 +322,22 @@ extern StructRNA RNA_LimitRotationConstraint;
extern StructRNA RNA_LimitScaleConstraint;
extern StructRNA RNA_LineStyleAlphaModifier;
extern StructRNA RNA_LineStyleAlphaModifier_AlongStroke;
+extern StructRNA RNA_LineStyleAlphaModifier_CreaseAngle;
+extern StructRNA RNA_LineStyleAlphaModifier_Curvature_3D;
extern StructRNA RNA_LineStyleAlphaModifier_DistanceFromCamera;
extern StructRNA RNA_LineStyleAlphaModifier_DistanceFromObject;
extern StructRNA RNA_LineStyleAlphaModifier_Material;
+extern StructRNA RNA_LineStyleAlphaModifier_Noise;
+extern StructRNA RNA_LineStyleAlphaModifier_Tangent;
extern StructRNA RNA_LineStyleColorModifier;
extern StructRNA RNA_LineStyleColorModifier_AlongStroke;
+extern StructRNA RNA_LineStyleColorModifier_CreaseAngle;
+extern StructRNA RNA_LineStyleColorModifier_Curvature_3D;
extern StructRNA RNA_LineStyleColorModifier_DistanceFromCamera;
extern StructRNA RNA_LineStyleColorModifier_DistanceFromObject;
extern StructRNA RNA_LineStyleColorModifier_Material;
+extern StructRNA RNA_LineStyleColorModifier_Noise;
+extern StructRNA RNA_LineStyleColorModifier_Tangent;
extern StructRNA RNA_LineStyleGeometryModifier;
extern StructRNA RNA_LineStyleGeometryModifier_2DOffset;
extern StructRNA RNA_LineStyleGeometryModifier_2DTransform;
@@ -341,6 +349,7 @@ extern StructRNA RNA_LineStyleGeometryModifier_PerlinNoise1D;
extern StructRNA RNA_LineStyleGeometryModifier_PerlinNoise2D;
extern StructRNA RNA_LineStyleGeometryModifier_Polygonalization;
extern StructRNA RNA_LineStyleGeometryModifier_Sampling;
+extern StructRNA RNA_LineStyleGeometryModifier_Simplification;
extern StructRNA RNA_LineStyleGeometryModifier_SinusDisplacement;
extern StructRNA RNA_LineStyleGeometryModifier_SpatialNoise;
extern StructRNA RNA_LineStyleGeometryModifier_TipRemover;
@@ -349,9 +358,13 @@ extern StructRNA RNA_LineStyleTextureSlot;
extern StructRNA RNA_LineStyleThicknessModifier;
extern StructRNA RNA_LineStyleThicknessModifier_AlongStroke;
extern StructRNA RNA_LineStyleThicknessModifier_Calligraphy;
+extern StructRNA RNA_LineStyleThicknessModifier_CreaseAngle;
+extern StructRNA RNA_LineStyleThicknessModifier_Curvature_3D;
extern StructRNA RNA_LineStyleThicknessModifier_DistanceFromCamera;
extern StructRNA RNA_LineStyleThicknessModifier_DistanceFromObject;
extern StructRNA RNA_LineStyleThicknessModifier_Material;
+extern StructRNA RNA_LineStyleThicknessModifier_Noise;
+extern StructRNA RNA_LineStyleThicknessModifier_Tangent;
extern StructRNA RNA_LockedTrackConstraint;
extern StructRNA RNA_Macro;
extern StructRNA RNA_MagicTexture;
diff --git a/source/blender/makesrna/intern/makesrna.c b/source/blender/makesrna/intern/makesrna.c
index 71430265d0e..b57841c38e3 100644
--- a/source/blender/makesrna/intern/makesrna.c
+++ b/source/blender/makesrna/intern/makesrna.c
@@ -503,7 +503,7 @@ static void rna_float_print(FILE *f, float num)
{
if (num == -FLT_MAX) fprintf(f, "-FLT_MAX");
else if (num == FLT_MAX) fprintf(f, "FLT_MAX");
- else if ((int)num == num) fprintf(f, "%.1ff", num);
+ else if ((int64_t)num == num) fprintf(f, "%.1ff", num);
else fprintf(f, "%.10ff", num);
}
diff --git a/source/blender/makesrna/intern/rna_image_api.c b/source/blender/makesrna/intern/rna_image_api.c
index c3c152a10b6..f187a0e1804 100644
--- a/source/blender/makesrna/intern/rna_image_api.c
+++ b/source/blender/makesrna/intern/rna_image_api.c
@@ -35,7 +35,6 @@
#include <time.h>
#include "DNA_packedFile_types.h"
-#include "DNA_userdef_types.h"
#include "BLI_utildefines.h"
#include "BLI_path_util.h"
diff --git a/source/blender/makesrna/intern/rna_linestyle.c b/source/blender/makesrna/intern/rna_linestyle.c
index 638bc7a17ea..81f3e149a71 100644
--- a/source/blender/makesrna/intern/rna_linestyle.c
+++ b/source/blender/makesrna/intern/rna_linestyle.c
@@ -41,26 +41,38 @@
EnumPropertyItem linestyle_color_modifier_type_items[] = {
{LS_MODIFIER_ALONG_STROKE, "ALONG_STROKE", ICON_MODIFIER, "Along Stroke", ""},
+ {LS_MODIFIER_CREASE_ANGLE, "CREASE_ANGLE", ICON_MODIFIER, "Crease Angle", ""},
+ {LS_MODIFIER_CURVATURE_3D, "CURVATURE_3D", ICON_MODIFIER, "Curvature 3D", ""},
{LS_MODIFIER_DISTANCE_FROM_CAMERA, "DISTANCE_FROM_CAMERA", ICON_MODIFIER, "Distance from Camera", ""},
{LS_MODIFIER_DISTANCE_FROM_OBJECT, "DISTANCE_FROM_OBJECT", ICON_MODIFIER, "Distance from Object", ""},
{LS_MODIFIER_MATERIAL, "MATERIAL", ICON_MODIFIER, "Material", ""},
+ {LS_MODIFIER_NOISE, "NOISE", ICON_MODIFIER, "Noise", ""},
+ {LS_MODIFIER_TANGENT, "TANGENT", ICON_MODIFIER, "Tangent", ""},
{0, NULL, 0, NULL, NULL}
};
EnumPropertyItem linestyle_alpha_modifier_type_items[] = {
{LS_MODIFIER_ALONG_STROKE, "ALONG_STROKE", ICON_MODIFIER, "Along Stroke", ""},
+ {LS_MODIFIER_CREASE_ANGLE, "CREASE_ANGLE", ICON_MODIFIER, "Crease Angle", ""},
+ {LS_MODIFIER_CURVATURE_3D, "CURVATURE_3D", ICON_MODIFIER, "Curvature 3D", ""},
{LS_MODIFIER_DISTANCE_FROM_CAMERA, "DISTANCE_FROM_CAMERA", ICON_MODIFIER, "Distance from Camera", ""},
{LS_MODIFIER_DISTANCE_FROM_OBJECT, "DISTANCE_FROM_OBJECT", ICON_MODIFIER, "Distance from Object", ""},
{LS_MODIFIER_MATERIAL, "MATERIAL", ICON_MODIFIER, "Material", ""},
+ {LS_MODIFIER_NOISE, "NOISE", ICON_MODIFIER, "Noise", ""},
+ {LS_MODIFIER_TANGENT, "TANGENT", ICON_MODIFIER, "Tangent", ""},
{0, NULL, 0, NULL, NULL}
};
EnumPropertyItem linestyle_thickness_modifier_type_items[] = {
{LS_MODIFIER_ALONG_STROKE, "ALONG_STROKE", ICON_MODIFIER, "Along Stroke", ""},
{LS_MODIFIER_CALLIGRAPHY, "CALLIGRAPHY", ICON_MODIFIER, "Calligraphy", ""},
+ {LS_MODIFIER_CREASE_ANGLE, "CREASE_ANGLE", ICON_MODIFIER, "Crease Angle", ""},
+ {LS_MODIFIER_CURVATURE_3D, "CURVATURE_3D", ICON_MODIFIER, "Curvature 3D", ""},
{LS_MODIFIER_DISTANCE_FROM_CAMERA, "DISTANCE_FROM_CAMERA", ICON_MODIFIER, "Distance from Camera", ""},
{LS_MODIFIER_DISTANCE_FROM_OBJECT, "DISTANCE_FROM_OBJECT", ICON_MODIFIER, "Distance from Object", ""},
{LS_MODIFIER_MATERIAL, "MATERIAL", ICON_MODIFIER, "Material", ""},
+ {LS_MODIFIER_NOISE, "NOISE", ICON_MODIFIER, "Noise", ""},
+ {LS_MODIFIER_TANGENT, "TANGENT", ICON_MODIFIER, "Tangent", ""},
{0, NULL, 0, NULL, NULL}
};
@@ -75,6 +87,7 @@ EnumPropertyItem linestyle_geometry_modifier_type_items[] = {
{LS_MODIFIER_PERLIN_NOISE_2D, "PERLIN_NOISE_2D", ICON_MODIFIER, "Perlin Noise 2D", ""},
{LS_MODIFIER_POLYGONIZATION, "POLYGONIZATION", ICON_MODIFIER, "Polygonization", ""},
{LS_MODIFIER_SAMPLING, "SAMPLING", ICON_MODIFIER, "Sampling", ""},
+ {LS_MODIFIER_SIMPLIFICATION, "SIMPLIFICATION", ICON_MODIFIER, "Simplification", ""},
{LS_MODIFIER_SINUS_DISPLACEMENT, "SINUS_DISPLACEMENT", ICON_MODIFIER, "Sinus Displacement", ""},
{LS_MODIFIER_SPATIAL_NOISE, "SPATIAL_NOISE", ICON_MODIFIER, "Spatial Noise", ""},
{LS_MODIFIER_TIP_REMOVER, "TIP_REMOVER", ICON_MODIFIER, "Tip Remover", ""},
@@ -104,6 +117,14 @@ static StructRNA *rna_LineStyle_color_modifier_refine(struct PointerRNA *ptr)
return &RNA_LineStyleColorModifier_DistanceFromObject;
case LS_MODIFIER_MATERIAL:
return &RNA_LineStyleColorModifier_Material;
+ case LS_MODIFIER_TANGENT:
+ return &RNA_LineStyleColorModifier_Tangent;
+ case LS_MODIFIER_NOISE:
+ return &RNA_LineStyleColorModifier_Noise;
+ case LS_MODIFIER_CREASE_ANGLE:
+ return &RNA_LineStyleColorModifier_CreaseAngle;
+ case LS_MODIFIER_CURVATURE_3D:
+ return &RNA_LineStyleColorModifier_Curvature_3D;
default:
return &RNA_LineStyleColorModifier;
}
@@ -122,6 +143,14 @@ static StructRNA *rna_LineStyle_alpha_modifier_refine(struct PointerRNA *ptr)
return &RNA_LineStyleAlphaModifier_DistanceFromObject;
case LS_MODIFIER_MATERIAL:
return &RNA_LineStyleAlphaModifier_Material;
+ case LS_MODIFIER_TANGENT:
+ return &RNA_LineStyleAlphaModifier_Tangent;
+ case LS_MODIFIER_NOISE:
+ return &RNA_LineStyleAlphaModifier_Noise;
+ case LS_MODIFIER_CREASE_ANGLE:
+ return &RNA_LineStyleAlphaModifier_CreaseAngle;
+ case LS_MODIFIER_CURVATURE_3D:
+ return &RNA_LineStyleAlphaModifier_Curvature_3D;
default:
return &RNA_LineStyleAlphaModifier;
}
@@ -142,6 +171,14 @@ static StructRNA *rna_LineStyle_thickness_modifier_refine(struct PointerRNA *ptr
return &RNA_LineStyleThicknessModifier_Material;
case LS_MODIFIER_CALLIGRAPHY:
return &RNA_LineStyleThicknessModifier_Calligraphy;
+ case LS_MODIFIER_TANGENT:
+ return &RNA_LineStyleThicknessModifier_Tangent;
+ case LS_MODIFIER_NOISE:
+ return &RNA_LineStyleThicknessModifier_Noise;
+ case LS_MODIFIER_CREASE_ANGLE:
+ return &RNA_LineStyleThicknessModifier_CreaseAngle;
+ case LS_MODIFIER_CURVATURE_3D:
+ return &RNA_LineStyleThicknessModifier_Curvature_3D;
default:
return &RNA_LineStyleThicknessModifier;
}
@@ -178,6 +215,8 @@ static StructRNA *rna_LineStyle_geometry_modifier_refine(struct PointerRNA *ptr)
return &RNA_LineStyleGeometryModifier_2DOffset;
case LS_MODIFIER_2D_TRANSFORM:
return &RNA_LineStyleGeometryModifier_2DTransform;
+ case LS_MODIFIER_SIMPLIFICATION:
+ return &RNA_LineStyleGeometryModifier_Simplification;
default:
return &RNA_LineStyleGeometryModifier;
}
@@ -785,6 +824,62 @@ static void rna_def_linestyle_modifiers(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Ramp", "Use color ramp to map the BW average into an RGB color");
RNA_def_property_update(prop, NC_LINESTYLE, "rna_LineStyle_update");
+ srna = RNA_def_struct(brna, "LineStyleColorModifier_Tangent", "LineStyleColorModifier");
+ RNA_def_struct_ui_text(srna, "Tangent", "Change line color based on the direction of a stroke");
+ rna_def_color_modifier(srna);
+ rna_def_modifier_color_ramp_common(srna, false);
+
+ srna = RNA_def_struct(brna, "LineStyleColorModifier_Noise", "LineStyleColorModifier");
+ RNA_def_struct_ui_text(srna, "Noise", "Change line color based on random noise");
+ rna_def_color_modifier(srna);
+ rna_def_modifier_color_ramp_common(srna, false);
+
+ prop = RNA_def_property(srna, "amplitude", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "amplitude");
+ RNA_def_property_ui_text(prop, "Amplitude", "Amplitude of the noise");
+ RNA_def_property_update(prop, NC_LINESTYLE, "rna_LineStyle_update");
+
+ prop = RNA_def_property(srna, "period", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "period");
+ RNA_def_property_ui_text(prop, "Period", "Period of the noise");
+ RNA_def_property_update(prop, NC_LINESTYLE, "rna_LineStyle_update");
+
+ prop = RNA_def_property(srna, "seed", PROP_INT, PROP_NONE);
+ RNA_def_property_int_sdna(prop, NULL, "seed");
+ RNA_def_property_ui_text(prop, "Seed", "Seed for the noise generation");
+ RNA_def_property_update(prop, NC_LINESTYLE, "rna_LineStyle_update");
+
+ srna = RNA_def_struct(brna, "LineStyleColorModifier_CreaseAngle", "LineStyleColorModifier");
+ RNA_def_struct_ui_text(srna, "Crease Angle", "Change line color based on the underlying crease angle");
+ rna_def_color_modifier(srna);
+ rna_def_modifier_color_ramp_common(srna, false);
+
+ prop = RNA_def_property(srna, "angle_min", PROP_FLOAT, PROP_ANGLE);
+ RNA_def_property_float_sdna(prop, NULL, "min_angle");
+ RNA_def_property_ui_text(prop, "Min Angle", "Minimum angle to modify thickness");
+ RNA_def_property_update(prop, NC_LINESTYLE, "rna_LineStyle_update");
+
+ prop = RNA_def_property(srna, "angle_max", PROP_FLOAT, PROP_ANGLE);
+ RNA_def_property_float_sdna(prop, NULL, "max_angle");
+ RNA_def_property_ui_text(prop, "Max Angle", "Maximum angle to modify thickness");
+ RNA_def_property_update(prop, NC_LINESTYLE, "rna_LineStyle_update");
+
+ srna = RNA_def_struct(brna, "LineStyleColorModifier_Curvature_3D", "LineStyleColorModifier");
+ RNA_def_struct_ui_text(srna, "Curvature 3D",
+ "Change line color based on the radial curvature of 3D mesh surfaces");
+ rna_def_color_modifier(srna);
+ rna_def_modifier_color_ramp_common(srna, false);
+
+ prop = RNA_def_property(srna, "curvature_min", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "min_curvature");
+ RNA_def_property_ui_text(prop, "Min Curvature", "Minimum Curvature");
+ RNA_def_property_update(prop, NC_LINESTYLE, "rna_LineStyle_update");
+
+ prop = RNA_def_property(srna, "curvature_max", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "max_curvature");
+ RNA_def_property_ui_text(prop, "Max Curvature", "Maximum Curvature");
+ RNA_def_property_update(prop, NC_LINESTYLE, "rna_LineStyle_update");
+
/* alpha transparency modifiers */
srna = RNA_def_struct(brna, "LineStyleAlphaModifier", "LineStyleModifier");
@@ -823,14 +918,90 @@ static void rna_def_linestyle_modifiers(BlenderRNA *brna)
rna_def_modifier_material_common(srna);
rna_def_modifier_curve_common(srna, false, false);
- /* line thickness modifiers */
+ srna = RNA_def_struct(brna, "LineStyleAlphaModifier_Tangent", "LineStyleAlphaModifier");
+ RNA_def_struct_ui_text(srna, "Tangent", "Alpha transparency based on the direction of the stroke");
+ rna_def_alpha_modifier(srna);
+ rna_def_modifier_curve_common(srna, false, false);
+
+ srna = RNA_def_struct(brna, "LineStyleAlphaModifier_Noise", "LineStyleAlphaModifier");
+ RNA_def_struct_ui_text(srna, "Noise", "Alpha transparency based on random noise");
+ rna_def_alpha_modifier(srna);
+ rna_def_modifier_curve_common(srna, false, false);
+
+ prop = RNA_def_property(srna, "amplitude", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "amplitude");
+ RNA_def_property_ui_text(prop, "Amplitude", "Amplitude of the noise");
+ RNA_def_property_update(prop, NC_LINESTYLE, "rna_LineStyle_update");
+
+ prop = RNA_def_property(srna, "period", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "period");
+ RNA_def_property_ui_text(prop, "Period", "Period of the noise");
+ RNA_def_property_update(prop, NC_LINESTYLE, "rna_LineStyle_update");
+
+ prop = RNA_def_property(srna, "seed", PROP_INT, PROP_NONE);
+ RNA_def_property_int_sdna(prop, NULL, "seed");
+ RNA_def_property_ui_text(prop, "Seed", "Seed for the noise generation");
+ RNA_def_property_update(prop, NC_LINESTYLE, "rna_LineStyle_update");
+
+ srna = RNA_def_struct(brna, "LineStyleAlphaModifier_CreaseAngle", "LineStyleAlphaModifier");
+ RNA_def_struct_ui_text(srna, "Crease Angle",
+ "Alpha transparency based on the angle between two adjacent faces");
+ rna_def_alpha_modifier(srna);
+ rna_def_modifier_curve_common(srna, false, false);
+
+ prop = RNA_def_property(srna, "angle_min", PROP_FLOAT, PROP_ANGLE);
+ RNA_def_property_float_sdna(prop, NULL, "min_angle");
+ RNA_def_property_ui_text(prop, "Min Angle", "Minimum angle to modify thickness");
+ RNA_def_property_update(prop, NC_LINESTYLE, "rna_LineStyle_update");
+
+ prop = RNA_def_property(srna, "angle_max", PROP_FLOAT, PROP_ANGLE);
+ RNA_def_property_float_sdna(prop, NULL, "max_angle");
+ RNA_def_property_ui_text(prop, "Max Angle", "Maximum angle to modify thickness");
+ RNA_def_property_update(prop, NC_LINESTYLE, "rna_LineStyle_update");
+
+ srna = RNA_def_struct(brna, "LineStyleAlphaModifier_Curvature_3D", "LineStyleAlphaModifier");
+ RNA_def_struct_ui_text(srna, "Curvature 3D",
+ "Alpha transparency based on the radial curvature of 3D mesh surfaces");
+ rna_def_alpha_modifier(srna);
+ rna_def_modifier_curve_common(srna, false, false);
+ prop = RNA_def_property(srna, "curvature_min", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "min_curvature");
+ RNA_def_property_range(prop, 0.0f, 10000.0f);
+ RNA_def_property_ui_text(prop, "Min Curvature", "Minimum Curvature");
+ RNA_def_property_update(prop, NC_LINESTYLE, "rna_LineStyle_update");
+
+ prop = RNA_def_property(srna, "curvature_max", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "max_curvature");
+ RNA_def_property_range(prop, 0.0f, 10000.0f);
+ RNA_def_property_ui_text(prop, "Max Curvature", "Maximum Curvature");
+ RNA_def_property_update(prop, NC_LINESTYLE, "rna_LineStyle_update");
+
+ /* line thickness modifiers */
srna = RNA_def_struct(brna, "LineStyleThicknessModifier", "LineStyleModifier");
RNA_def_struct_sdna(srna, "LineStyleModifier");
RNA_def_struct_refine_func(srna, "rna_LineStyle_thickness_modifier_refine");
RNA_def_struct_path_func(srna, "rna_LineStyle_thickness_modifier_path");
RNA_def_struct_ui_text(srna, "Line Style Thickness Modifier", "Base type to define line thickness modifiers");
+ srna = RNA_def_struct(brna, "LineStyleThicknessModifier_Tangent", "LineStyleThicknessModifier");
+ RNA_def_struct_ui_text(srna, "Tangent", "Thickness based on the direction of the stroke");
+ rna_def_thickness_modifier(srna);
+ rna_def_modifier_curve_common(srna, false, false);
+
+ prop = RNA_def_property(srna, "thickness_min", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "min_thickness");
+ RNA_def_property_range(prop, 0.0f, 10000.0f);
+ RNA_def_property_ui_text(prop, "Min Thickness",
+ "Minimum thickness");
+ RNA_def_property_update(prop, NC_LINESTYLE, "rna_LineStyle_update");
+
+ prop = RNA_def_property(srna, "thickness_max", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "max_thickness");
+ RNA_def_property_range(prop, 0.0f, 10000.0f);
+ RNA_def_property_ui_text(prop, "Max Thickness", "Maximum thickness");
+ RNA_def_property_update(prop, NC_LINESTYLE, "rna_LineStyle_update");
+
srna = RNA_def_struct(brna, "LineStyleThicknessModifier_AlongStroke", "LineStyleThicknessModifier");
RNA_def_struct_ui_text(srna, "Along Stroke", "Change line thickness along stroke");
rna_def_thickness_modifier(srna);
@@ -882,6 +1053,88 @@ static void rna_def_linestyle_modifiers(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Max Thickness", "Maximum thickness in the main direction");
RNA_def_property_update(prop, NC_LINESTYLE, "rna_LineStyle_update");
+ srna = RNA_def_struct(brna, "LineStyleThicknessModifier_Noise", "LineStyleThicknessModifier");
+ RNA_def_struct_ui_text(srna, "Noise", "Line thickness based on random noise");
+ rna_def_thickness_modifier(srna);
+
+ prop = RNA_def_property(srna, "amplitude", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "amplitude");
+ RNA_def_property_ui_text(prop, "Amplitude", "Amplitude of the noise");
+ RNA_def_property_update(prop, NC_LINESTYLE, "rna_LineStyle_update");
+
+ prop = RNA_def_property(srna, "period", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "period");
+ RNA_def_property_ui_text(prop, "Period", "Period of the noise");
+ RNA_def_property_update(prop, NC_LINESTYLE, "rna_LineStyle_update");
+
+ prop = RNA_def_property(srna, "seed", PROP_INT, PROP_NONE);
+ RNA_def_property_int_sdna(prop, NULL, "seed");
+ RNA_def_property_ui_text(prop, "Seed", "Seed for the noise generation");
+ RNA_def_property_update(prop, NC_LINESTYLE, "rna_LineStyle_update");
+
+ prop = RNA_def_property(srna, "use_asymmetric", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flags", LS_THICKNESS_ASYMMETRIC);
+ RNA_def_property_ui_text(prop, "Asymmetric", "Allow thickness to be assigned asymmetrically");
+ RNA_def_property_update(prop, NC_LINESTYLE, "rna_LineStyle_update");
+
+ srna = RNA_def_struct(brna, "LineStyleThicknessModifier_Curvature_3D", "LineStyleThicknessModifier");
+ RNA_def_struct_ui_text(srna, "Curvature 3D",
+ "Line thickness based on the radial curvature of 3D mesh surfaces");
+ rna_def_thickness_modifier(srna);
+ rna_def_modifier_curve_common(srna, false, false);
+
+ prop = RNA_def_property(srna, "thickness_min", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "min_thickness");
+ RNA_def_property_range(prop, 0.0f, 10000.0f);
+ RNA_def_property_ui_text(prop, "Min Thickness", "Minimum thickness");
+ RNA_def_property_update(prop, NC_LINESTYLE, "rna_LineStyle_update");
+
+ prop = RNA_def_property(srna, "thickness_max", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "max_thickness");
+ RNA_def_property_range(prop, 0.0f, 10000.0f);
+ RNA_def_property_ui_text(prop, "Max Thickness", "Maximum thickness");
+ RNA_def_property_update(prop, NC_LINESTYLE, "rna_LineStyle_update");
+
+ prop = RNA_def_property(srna, "curvature_min", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "min_curvature");
+ RNA_def_property_range(prop, 0.0f, 10000.0f);
+ RNA_def_property_ui_text(prop, "Min Curvature", "Minimum Curvature");
+ RNA_def_property_update(prop, NC_LINESTYLE, "rna_LineStyle_update");
+
+ prop = RNA_def_property(srna, "curvature_max", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "max_curvature");
+ RNA_def_property_range(prop, 0.0f, 10000.0f);
+ RNA_def_property_ui_text(prop, "Max Curvature", "Maximum Curvature");
+ RNA_def_property_update(prop, NC_LINESTYLE, "rna_LineStyle_update");
+
+ srna = RNA_def_struct(brna, "LineStyleThicknessModifier_CreaseAngle", "LineStyleThicknessModifier");
+ RNA_def_struct_ui_text(srna, "Crease Angle",
+ "Line thickness based on the angle between two adjacent faces");
+ rna_def_thickness_modifier(srna);
+ rna_def_modifier_curve_common(srna, false, false);
+
+ prop = RNA_def_property(srna, "angle_min", PROP_FLOAT, PROP_ANGLE);
+ RNA_def_property_float_sdna(prop, NULL, "min_angle");
+ RNA_def_property_ui_text(prop, "Min Angle", "Minimum angle to modify thickness");
+ RNA_def_property_update(prop, NC_LINESTYLE, "rna_LineStyle_update");
+
+ prop = RNA_def_property(srna, "angle_max", PROP_FLOAT, PROP_ANGLE);
+ RNA_def_property_float_sdna(prop, NULL, "max_angle");
+ RNA_def_property_ui_text(prop, "Max Angle", "Maximum angle to modify thickness");
+ RNA_def_property_update(prop, NC_LINESTYLE, "rna_LineStyle_update");
+
+ prop = RNA_def_property(srna, "thickness_min", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "min_thickness");
+ RNA_def_property_range(prop, 0.0f, 10000.0f);
+ RNA_def_property_ui_text(prop, "Min Thickness", "Minimum thickness");
+ RNA_def_property_update(prop, NC_LINESTYLE, "rna_LineStyle_update");
+
+ prop = RNA_def_property(srna, "thickness_max", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "max_thickness");
+ RNA_def_property_range(prop, 0.0f, 10000.0f);
+ RNA_def_property_ui_text(prop, "Max Thickness", "Maximum thickness");
+ RNA_def_property_update(prop, NC_LINESTYLE, "rna_LineStyle_update");
+
/* geometry modifiers */
srna = RNA_def_struct(brna, "LineStyleGeometryModifier", "LineStyleModifier");
@@ -1167,6 +1420,15 @@ static void rna_def_linestyle_modifiers(BlenderRNA *brna)
RNA_def_property_float_sdna(prop, NULL, "pivot_y");
RNA_def_property_ui_text(prop, "Pivot Y", "2D Y coordinate of the absolute pivot");
RNA_def_property_update(prop, NC_LINESTYLE, "rna_LineStyle_update");
+
+ srna = RNA_def_struct(brna, "LineStyleGeometryModifier_Simplification", "LineStyleGeometryModifier");
+ RNA_def_struct_ui_text(srna, "Simplification", "Simplify the stroke set");
+ rna_def_geometry_modifier(srna);
+
+ prop = RNA_def_property(srna, "tolerance", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "tolerance");
+ RNA_def_property_ui_text(prop, "Tolerance", "Distance below which segments will be merged");
+ RNA_def_property_update(prop, NC_LINESTYLE, "rna_LineStyle_update");
}
static void rna_def_freestyle_color_modifiers(BlenderRNA *brna, PropertyRNA *cprop)
diff --git a/source/blender/makesrna/intern/rna_material.c b/source/blender/makesrna/intern/rna_material.c
index e356c2e647a..a1fa6ab13be 100644
--- a/source/blender/makesrna/intern/rna_material.c
+++ b/source/blender/makesrna/intern/rna_material.c
@@ -834,11 +834,11 @@ static void rna_def_material_gamesettings(BlenderRNA *brna)
{GEMAT_ADD, "ADD", 0, "Add", "Render face transparent and add color of face"},
{GEMAT_CLIP, "CLIP", 0, "Alpha Clip", "Use the image alpha values clipped with no blending (binary alpha)"},
{GEMAT_ALPHA, "ALPHA", 0, "Alpha Blend",
- "Render polygon transparent, depending on alpha channel of the texture"},
+ "Render polygon transparent, depending on alpha channel of the texture"},
{GEMAT_ALPHA_SORT, "ALPHA_SORT", 0, "Alpha Sort",
- "Sort faces for correct alpha drawing (slow, use Alpha Clip instead when possible)"},
+ "Sort faces for correct alpha drawing (slow, use Alpha Clip instead when possible)"},
{GEMAT_ALPHA_TO_COVERAGE, "ALPHA_ANTIALIASING", 0, "Alpha Anti-Aliasing",
- "Use textures alpha as anti-aliasing mask, requires multi-sample OpenGL display"},
+ "Use textures alpha as anti-aliasing mask, requires multi-sample OpenGL display"},
{0, NULL, 0, NULL, NULL}
};
diff --git a/source/blender/makesrna/intern/rna_modifier.c b/source/blender/makesrna/intern/rna_modifier.c
index 087db2bedcd..affaef3aa7b 100644
--- a/source/blender/makesrna/intern/rna_modifier.c
+++ b/source/blender/makesrna/intern/rna_modifier.c
@@ -2824,7 +2824,11 @@ static void rna_def_modifier_bevel(BlenderRNA *brna)
RNA_def_property_range(prop, -1, SHRT_MAX);
RNA_def_property_ui_text(prop, "Material", "Material index of generated faces, -1 for automatic");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
-
+
+ prop = RNA_def_property(srna, "loop_slide", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_negative_sdna(prop, NULL, "flags", MOD_BEVEL_EVEN_WIDTHS);
+ RNA_def_property_ui_text(prop, "Loop Slide", "Prefer sliding along edges to having even widths");
+ RNA_def_property_update(prop, 0, "rna_Modifier_update");
}
static void rna_def_modifier_shrinkwrap(BlenderRNA *brna)
diff --git a/source/blender/makesrna/intern/rna_object.c b/source/blender/makesrna/intern/rna_object.c
index f433c2c36a8..de39c7bc554 100644
--- a/source/blender/makesrna/intern/rna_object.c
+++ b/source/blender/makesrna/intern/rna_object.c
@@ -1727,26 +1727,30 @@ static void rna_def_object_game_settings(BlenderRNA *brna)
RNA_def_property_float_default(prop, 0.1f);
RNA_def_property_ui_text(prop, "Rotation Damping", "General rotation damping");
- prop = RNA_def_property(srna, "velocity_min", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "velocity_min", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "min_vel");
RNA_def_property_range(prop, 0.0, 1000.0);
- RNA_def_property_ui_text(prop, "Velocity Min", "Clamp velocity to this minimum speed (except when totally still)");
+ RNA_def_property_ui_text(prop, "Velocity Min", "Clamp velocity to this minimum speed (except when totally still), "
+ "in distance per second");
- prop = RNA_def_property(srna, "velocity_max", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "velocity_max", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "max_vel");
RNA_def_property_range(prop, 0.0, 1000.0);
- RNA_def_property_ui_text(prop, "Velocity Max", "Clamp velocity to this maximum speed");
+ RNA_def_property_ui_text(prop, "Velocity Max", "Clamp velocity to this maximum speed, "
+ "in distance per second");
- prop = RNA_def_property(srna, "angular_velocity_min", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "angular_velocity_min", PROP_FLOAT, PROP_ANGLE);
RNA_def_property_float_sdna(prop, NULL, "min_angvel");
RNA_def_property_range(prop, 0.0, 1000.0);
RNA_def_property_ui_text(prop, "Angular Velocity Min",
- "Clamp angular velocity to this minimum speed (except when totally still)");
+ "Clamp angular velocity to this minimum speed (except when totally still), "
+ "in angle per second");
- prop = RNA_def_property(srna, "angular_velocity_max", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "angular_velocity_max", PROP_FLOAT, PROP_ANGLE);
RNA_def_property_float_sdna(prop, NULL, "max_angvel");
RNA_def_property_range(prop, 0.0, 1000.0);
- RNA_def_property_ui_text(prop, "Angular Velocity Max", "Clamp angular velocity to this maximum speed");
+ RNA_def_property_ui_text(prop, "Angular Velocity Max", "Clamp angular velocity to this maximum speed, "
+ "in angle per second");
/* Character physics */
prop = RNA_def_property(srna, "step_height", PROP_FLOAT, PROP_NONE);
diff --git a/source/blender/makesrna/intern/rna_sequencer.c b/source/blender/makesrna/intern/rna_sequencer.c
index d7311b93b2f..535428e7d6a 100644
--- a/source/blender/makesrna/intern/rna_sequencer.c
+++ b/source/blender/makesrna/intern/rna_sequencer.c
@@ -2307,23 +2307,34 @@ static void rna_def_gaussian_blur(StructRNA *srna)
static void rna_def_text(StructRNA *srna)
{
+ static EnumPropertyItem text_align_items[] = {
+ {SEQ_TEXT_ALIGN_LEFT, "LEFT", 0, "Left", ""},
+ {SEQ_TEXT_ALIGN_CENTER, "CENTER", 0, "Center", ""},
+ {SEQ_TEXT_ALIGN_RIGHT, "RIGHT", 0, "Right", ""},
+ {0, NULL, 0, NULL, NULL}
+ };
+
PropertyRNA *prop;
RNA_def_struct_sdna_from(srna, "TextVars", "effectdata");
- prop = RNA_def_property(srna, "text_size", PROP_INT, PROP_UNSIGNED);
+ prop = RNA_def_property(srna, "font_size", PROP_INT, PROP_UNSIGNED);
+ RNA_def_property_int_sdna(prop, NULL, "text_size");
RNA_def_property_ui_text(prop, "Size", "Size of the text");
RNA_def_property_ui_range(prop, 0.0f, 1000, 1, -1);
RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
- prop = RNA_def_property(srna, "xpos", PROP_INT, PROP_NONE);
- RNA_def_property_ui_text(prop, "X Position", "X position of the text");
- RNA_def_property_ui_range(prop, -1000, 1000, 1, -1);
+ prop = RNA_def_property(srna, "location", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "loc");
+ RNA_def_property_ui_text(prop, "Location", "Location of the text");
+ RNA_def_property_range(prop, -FLT_MAX, FLT_MAX);
+ RNA_def_property_ui_range(prop, 0.0, 1.0, 1, -1);
RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
- prop = RNA_def_property(srna, "ypos", PROP_INT, PROP_NONE);
- RNA_def_property_ui_text(prop, "Y Position", "Y position of the text");
- RNA_def_property_ui_range(prop, -1000, 1000, 1, -1);
+ prop = RNA_def_property(srna, "align", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_sdna(prop, NULL, "align");
+ RNA_def_property_enum_items(prop, text_align_items);
+ RNA_def_property_ui_text(prop, "Align", "");
RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
prop = RNA_def_property(srna, "text", PROP_STRING, PROP_NONE);
@@ -2331,14 +2342,9 @@ static void rna_def_text(StructRNA *srna)
RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
prop = RNA_def_property(srna, "use_shadow", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "flags", TEXT_SEQ_SHADOW);
+ RNA_def_property_boolean_sdna(prop, NULL, "flag", SEQ_TEXT_SHADOW);
RNA_def_property_ui_text(prop, "Shadow", "draw text with shadow");
RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
-
- prop = RNA_def_property(srna, "use_autocenter", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "flags", TEXT_SEQ_AUTO_CENTER);
- RNA_def_property_ui_text(prop, "Auto-Center", "draw text centered in x axis");
- RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
}
static EffectInfo def_effects[] = {
diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c
index 0cc6388600b..53737db7f1f 100644
--- a/source/blender/makesrna/intern/rna_space.c
+++ b/source/blender/makesrna/intern/rna_space.c
@@ -2441,7 +2441,7 @@ static void rna_def_space_view3d(BlenderRNA *brna)
RNA_def_property_float_funcs(prop, "rna_View3D_CursorLocation_get", "rna_View3D_CursorLocation_set", NULL);
RNA_def_property_ui_text(prop, "3D Cursor Location",
"3D cursor location for this view (dependent on local view setting)");
- RNA_def_property_ui_range(prop, -10000.0, 10000.0, 10, 4);
+ RNA_def_property_ui_range(prop, -10000.0, 10000.0, 1, RNA_TRANSLATION_PREC_DEFAULT);
RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL);
prop = RNA_def_property(srna, "lens", PROP_FLOAT, PROP_UNIT_CAMERA);