diff options
author | OmarSquircleArt <omar.squircleart@gmail.com> | 2019-08-04 15:56:55 +0300 |
---|---|---|
committer | OmarSquircleArt <omar.squircleart@gmail.com> | 2019-08-04 15:56:55 +0300 |
commit | fa622f66ee00549f9ccd43d4f335b9643156c55f (patch) | |
tree | afbaa77222344a24c244907e422d0db444b83843 /source/blender/makesrna/intern | |
parent | 9c146a9450379679e067153ef60ae7acd310865d (diff) | |
parent | 47335b4e61db11e1ee2e38f421dc86fa3c3dd375 (diff) |
Merge remote-tracking branch 'origin/master' into soc-2019-cycles-procedural
Diffstat (limited to 'source/blender/makesrna/intern')
-rw-r--r-- | source/blender/makesrna/intern/rna_brush.c | 19 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_pose.c | 2 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_rna.c | 5 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_scene.c | 4 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_text.c | 15 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_userdef.c | 15 |
6 files changed, 45 insertions, 15 deletions
diff --git a/source/blender/makesrna/intern/rna_brush.c b/source/blender/makesrna/intern/rna_brush.c index eeba7161309..2484e432795 100644 --- a/source/blender/makesrna/intern/rna_brush.c +++ b/source/blender/makesrna/intern/rna_brush.c @@ -1565,6 +1565,12 @@ static void rna_def_brush(BlenderRNA *brna) {0, NULL, 0, NULL, NULL}, }; +static const EnumPropertyItem color_gradient_items[] = { + {0, "COLOR", 0, "Color", "Paint with a single color"}, + {BRUSH_USE_GRADIENT, "GRADIENT", 0, "Gradient", "Paint with a gradient"}, + {0, NULL, 0, NULL, NULL}, + }; + static const EnumPropertyItem brush_curve_preset_items[] = { {BRUSH_CURVE_CUSTOM, "CUSTOM", ICON_RNDCURVE, "Custom", ""}, {BRUSH_CURVE_SMOOTH, "SMOOTH", ICON_SMOOTHCURVE, "Smooth", ""}, @@ -1934,12 +1940,6 @@ static void rna_def_brush(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Size Pressure", "Enable tablet pressure sensitivity for size"); RNA_def_property_update(prop, 0, "rna_Brush_update"); - prop = RNA_def_property(srna, "use_gradient", PROP_BOOLEAN, PROP_NONE); - RNA_def_property_boolean_sdna(prop, NULL, "flag", BRUSH_USE_GRADIENT); - RNA_def_property_boolean_funcs(prop, NULL, "rna_Brush_use_gradient_set"); - RNA_def_property_ui_text(prop, "Use Gradient", "Use Gradient by utilizing a sampling method"); - RNA_def_property_update(prop, 0, "rna_Brush_update"); - prop = RNA_def_property(srna, "use_pressure_jitter", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", BRUSH_JITTER_PRESSURE); RNA_def_property_ui_icon(prop, ICON_STYLUS_PRESSURE, 0); @@ -2055,6 +2055,13 @@ static void rna_def_brush(BlenderRNA *brna) prop, "Radius Unit", "Measure brush size relative to the view or the scene"); RNA_def_property_update(prop, 0, "rna_Brush_update"); + prop = RNA_def_property(srna, "color_type", PROP_ENUM, PROP_NONE); /* as an enum */ + RNA_def_property_enum_bitflag_sdna(prop, NULL, "flag"); + RNA_def_property_enum_items(prop, color_gradient_items); + RNA_def_property_enum_funcs(prop, NULL, "rna_Brush_use_gradient_set", NULL); + RNA_def_property_ui_text(prop, "Color Type", "Use single color or gradient when painting"); + RNA_def_property_update(prop, 0, "rna_Brush_update"); + prop = RNA_def_property(srna, "use_edge_to_edge", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", BRUSH_EDGE_TO_EDGE); RNA_def_property_ui_text(prop, "Edge-to-edge", "Drag anchor brush from edge-to-edge"); diff --git a/source/blender/makesrna/intern/rna_pose.c b/source/blender/makesrna/intern/rna_pose.c index 8546702c377..d359726b3bd 100644 --- a/source/blender/makesrna/intern/rna_pose.c +++ b/source/blender/makesrna/intern/rna_pose.c @@ -623,7 +623,7 @@ bool rna_PoseChannel_constraints_override_apply(Main *UNUSED(bmain), bPoseChannel *pchan_src = (bPoseChannel *)ptr_src->data; /* Remember that insertion operations are defined and stored in correct order, which means that - * even if we insert several items in a row, we alays insert first one, then second one, etc. + * even if we insert several items in a row, we always insert first one, then second one, etc. * So we should always find 'anchor' constraint in both _src *and* _dst> */ bConstraint *con_anchor = NULL; if (opop->subitem_local_name && opop->subitem_local_name[0]) { diff --git a/source/blender/makesrna/intern/rna_rna.c b/source/blender/makesrna/intern/rna_rna.c index 3ca4792f9b4..f17e9ce28fe 100644 --- a/source/blender/makesrna/intern/rna_rna.c +++ b/source/blender/makesrna/intern/rna_rna.c @@ -3076,8 +3076,9 @@ void RNA_def_rna(BlenderRNA *brna) /* FloatProperty */ srna = RNA_def_struct(brna, "FloatProperty", "Property"); - RNA_def_struct_ui_text( - srna, "Float Definition", "RNA floating point number (single precision) property definition"); + RNA_def_struct_ui_text(srna, + "Float Definition", + "RNA floating point number (single precision) property definition"); rna_def_number_property(srna, PROP_FLOAT); /* StringProperty */ diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c index fd8791cf193..ef8b671116a 100644 --- a/source/blender/makesrna/intern/rna_scene.c +++ b/source/blender/makesrna/intern/rna_scene.c @@ -877,7 +877,7 @@ static float rna_Scene_frame_current_final_get(PointerRNA *ptr) { Scene *scene = (Scene *)ptr->data; - return BKE_scene_frame_get_from_ctime(scene, (float)scene->r.cfra); + return BKE_scene_frame_to_ctime(scene, (float)scene->r.cfra); } static void rna_Scene_start_frame_set(PointerRNA *ptr, int value) @@ -6276,7 +6276,7 @@ static void rna_def_scene_objects(BlenderRNA *brna, PropertyRNA *cprop) RNA_def_property_srna(cprop, "SceneObjects"); srna = RNA_def_struct(brna, "SceneObjects", NULL); RNA_def_struct_sdna(srna, "Scene"); - RNA_def_struct_ui_text(srna, "Scene Objects", "All the of scene objects"); + RNA_def_struct_ui_text(srna, "Scene Objects", "All of the scene objects"); } /* scene.timeline_markers */ diff --git a/source/blender/makesrna/intern/rna_text.c b/source/blender/makesrna/intern/rna_text.c index 454367b5233..b09b5327f57 100644 --- a/source/blender/makesrna/intern/rna_text.c +++ b/source/blender/makesrna/intern/rna_text.c @@ -146,6 +146,13 @@ static void rna_def_text_line(BlenderRNA *brna) static void rna_def_text(BlenderRNA *brna) { + + static const EnumPropertyItem indentation_items[] = { + {0, "TABS", 0, "Tabs", "Indent using tabs"}, + {TXT_TABSTOSPACES, "SPACES", 0, "Spaces", "Indent using spaces"}, + {0, NULL, 0, NULL, NULL}, + }; + StructRNA *srna; PropertyRNA *prop; @@ -182,10 +189,10 @@ static void rna_def_text(BlenderRNA *brna) RNA_def_property_ui_text( prop, "Register", "Run this text as a script on loading, Text name must end with \".py\""); - prop = RNA_def_property(srna, "use_tabs_as_spaces", PROP_BOOLEAN, PROP_NONE); - RNA_def_property_boolean_sdna(prop, NULL, "flags", TXT_TABSTOSPACES); - RNA_def_property_ui_text( - prop, "Tabs as Spaces", "Automatically converts all new tabs into spaces"); + prop = RNA_def_property(srna, "indentation", PROP_ENUM, PROP_NONE); /* as an enum */ + RNA_def_property_enum_bitflag_sdna(prop, NULL, "flags"); + RNA_def_property_enum_items(prop, indentation_items); + RNA_def_property_ui_text(prop, "Indentation", "Use tabs or spaces for indentation"); prop = RNA_def_property(srna, "lines", PROP_COLLECTION, PROP_NONE); RNA_def_property_struct_type(prop, "TextLine"); diff --git a/source/blender/makesrna/intern/rna_userdef.c b/source/blender/makesrna/intern/rna_userdef.c index 7b7d9e71cd2..e649a95fb06 100644 --- a/source/blender/makesrna/intern/rna_userdef.c +++ b/source/blender/makesrna/intern/rna_userdef.c @@ -30,6 +30,7 @@ #include "BLI_utildefines.h" #include "BLI_math_base.h" +#include "BLI_math_rotation.h" #include "BLT_translation.h" @@ -5230,6 +5231,20 @@ static void rna_def_userdef_input(BlenderRNA *brna) RNA_def_property_struct_type(prop, "WalkNavigation"); RNA_def_property_ui_text(prop, "Walk Navigation", "Settings for walk navigation mode"); + prop = RNA_def_property(srna, "view_rotate_sensitivity_turntable", PROP_FLOAT, PROP_ANGLE); + RNA_def_property_range(prop, DEG2RADF(0.001f), DEG2RADF(15.0f)); + RNA_def_property_float_default(prop, DEG2RADF(0.4f)); + RNA_def_property_ui_range(prop, DEG2RADF(0.001f), DEG2RADF(15.0f), 1.0f, 2); + RNA_def_property_ui_text(prop, + "Rotate Sensitivity", + "Rotation amount per-pixel to control how fast the viewport rotates"); + + prop = RNA_def_property(srna, "view_rotate_sensitivity_trackball", PROP_FLOAT, PROP_FACTOR); + RNA_def_property_range(prop, 0.1f, 10.0f); + RNA_def_property_float_default(prop, 1.0f); + RNA_def_property_ui_range(prop, 0.1f, 2.0f, 0.01f, 2); + RNA_def_property_ui_text(prop, "Rotate Sensitivity", "Scale trackball rotation sensitivity"); + /* tweak tablet & mouse preset */ prop = RNA_def_property(srna, "drag_threshold_mouse", PROP_INT, PROP_PIXEL); RNA_def_property_range(prop, 1, 255); |