diff options
author | OmarSquircleArt <omar.squircleart@gmail.com> | 2019-08-10 16:18:12 +0300 |
---|---|---|
committer | OmarSquircleArt <omar.squircleart@gmail.com> | 2019-08-10 16:18:12 +0300 |
commit | 67474a7e622957044bc708119a7cfa49a82790fd (patch) | |
tree | 1689263da79f08b1c3c9725ac56c3da8b5d91fbb /source/blender/makesrna/intern | |
parent | b091542fe91353c15dd7240ba7ce8ecf72d4011b (diff) | |
parent | 553b581f25c1782c4231816965cd3f6ce58a449a (diff) |
Merge master to soc-2019-cycles-procedural.soc-2019-cycles-procedural
Diffstat (limited to 'source/blender/makesrna/intern')
-rw-r--r-- | source/blender/makesrna/intern/rna_brush.c | 2 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_color.c | 20 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_gpencil_modifier.c | 17 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_material.c | 6 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_particle.c | 3 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_scene.c | 2 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_sequencer.c | 5 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_userdef.c | 6 |
8 files changed, 41 insertions, 20 deletions
diff --git a/source/blender/makesrna/intern/rna_brush.c b/source/blender/makesrna/intern/rna_brush.c index 2484e432795..713ddfa0067 100644 --- a/source/blender/makesrna/intern/rna_brush.c +++ b/source/blender/makesrna/intern/rna_brush.c @@ -1565,7 +1565,7 @@ static void rna_def_brush(BlenderRNA *brna) {0, NULL, 0, NULL, NULL}, }; -static const EnumPropertyItem color_gradient_items[] = { + 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}, diff --git a/source/blender/makesrna/intern/rna_color.c b/source/blender/makesrna/intern/rna_color.c index d221b7005f6..6bfd2b9f63b 100644 --- a/source/blender/makesrna/intern/rna_color.c +++ b/source/blender/makesrna/intern/rna_color.c @@ -94,7 +94,7 @@ static void rna_CurveMapping_clip_set(PointerRNA *ptr, bool value) cumap->flag &= ~CUMA_DO_CLIP; } - curvemapping_changed(cumap, false); + BKE_curvemapping_changed(cumap, false); } static void rna_CurveMapping_black_level_set(PointerRNA *ptr, const float *values) @@ -103,7 +103,7 @@ static void rna_CurveMapping_black_level_set(PointerRNA *ptr, const float *value cumap->black[0] = values[0]; cumap->black[1] = values[1]; cumap->black[2] = values[2]; - curvemapping_set_black_white(cumap, NULL, NULL); + BKE_curvemapping_set_black_white(cumap, NULL, NULL); } static void rna_CurveMapping_white_level_set(PointerRNA *ptr, const float *values) @@ -112,7 +112,7 @@ static void rna_CurveMapping_white_level_set(PointerRNA *ptr, const float *value cumap->white[0] = values[0]; cumap->white[1] = values[1]; cumap->white[2] = values[2]; - curvemapping_set_black_white(cumap, NULL, NULL); + BKE_curvemapping_set_black_white(cumap, NULL, NULL); } static void rna_CurveMapping_tone_update(Main *UNUSED(bmain), @@ -368,7 +368,7 @@ static void rna_ColorRampElement_remove(struct ColorBand *coba, static void rna_CurveMap_remove_point(CurveMap *cuma, ReportList *reports, PointerRNA *point_ptr) { CurveMapPoint *point = point_ptr->data; - if (curvemap_remove_point(cuma, point) == false) { + if (BKE_curvemap_remove_point(cuma, point) == false) { BKE_report(reports, RPT_ERROR, "Unable to remove curve point"); return; } @@ -518,7 +518,7 @@ static void rna_ColorManagedViewSettings_use_curves_set(PointerRNA *ptr, bool va view_settings->flag |= COLORMANAGE_VIEW_USE_CURVES; if (view_settings->curve_mapping == NULL) { - view_settings->curve_mapping = curvemapping_add(4, 0.0f, 0.0f, 1.0f, 1.0f); + view_settings->curve_mapping = BKE_curvemapping_add(4, 0.0f, 0.0f, 1.0f, 1.0f); } } else { @@ -669,7 +669,7 @@ static void rna_ColorManagement_update(Main *UNUSED(bmain), Scene *UNUSED(scene) } } -/* this function only exists because #curvemap_evaluateF uses a 'const' qualifier */ +/* this function only exists because #BKE_curvemap_evaluateF uses a 'const' qualifier */ static float rna_CurveMap_evaluateF(struct CurveMap *cuma, ReportList *reports, float value) { if (!cuma->table) { @@ -679,12 +679,12 @@ static float rna_CurveMap_evaluateF(struct CurveMap *cuma, ReportList *reports, "CurveMap table not initialized, call initialize() on CurveMapping owner of the CurveMap"); return 0.0f; } - return curvemap_evaluateF(cuma, value); + return BKE_curvemap_evaluateF(cuma, value); } static void rna_CurveMap_initialize(struct CurveMapping *cumap) { - curvemapping_initialize(cumap); + BKE_curvemapping_initialize(cumap); } #else @@ -729,7 +729,7 @@ static void rna_def_curvemap_points_api(BlenderRNA *brna, PropertyRNA *cprop) RNA_def_struct_sdna(srna, "CurveMap"); RNA_def_struct_ui_text(srna, "Curve Map Point", "Collection of Curve Map Points"); - func = RNA_def_function(srna, "new", "curvemap_insert"); + func = RNA_def_function(srna, "new", "BKE_curvemap_insert"); RNA_def_function_ui_description(func, "Add point to CurveMap"); parm = RNA_def_float(func, "position", @@ -889,7 +889,7 @@ static void rna_def_curvemapping(BlenderRNA *brna) prop, "White Level", "For RGB curves, the color that white is mapped to"); RNA_def_property_float_funcs(prop, NULL, "rna_CurveMapping_white_level_set", NULL); - func = RNA_def_function(srna, "update", "curvemapping_changed_all"); + func = RNA_def_function(srna, "update", "BKE_curvemapping_changed_all"); RNA_def_function_ui_description(func, "Update curve mapping after making changes"); func = RNA_def_function(srna, "initialize", "rna_CurveMap_initialize"); diff --git a/source/blender/makesrna/intern/rna_gpencil_modifier.c b/source/blender/makesrna/intern/rna_gpencil_modifier.c index 754c443e7e6..dfe9e018e94 100644 --- a/source/blender/makesrna/intern/rna_gpencil_modifier.c +++ b/source/blender/makesrna/intern/rna_gpencil_modifier.c @@ -617,6 +617,16 @@ static void rna_def_modifier_gpencilsimplify(BlenderRNA *brna) ICON_IPO_EASE_IN_OUT, "Adaptive", "Use a RDP algorithm to simplify"}, + {GP_SIMPLIFY_SAMPLE, + "SAMPLE", + ICON_IPO_EASE_IN_OUT, + "Sample", + "Sample a curve using a fixed length"}, + {GP_SIMPLIFY_MERGE, + "MERGE", + ICON_IPO_EASE_IN_OUT, + "Merge", + "Sample a curve using doing merge of vertex"}, {0, NULL, 0, NULL, NULL}, }; @@ -675,6 +685,13 @@ static void rna_def_modifier_gpencilsimplify(BlenderRNA *brna) RNA_def_property_range(prop, 1, 50); RNA_def_property_ui_text(prop, "Iterations", "Number of times to apply simplify"); RNA_def_property_update(prop, 0, "rna_GpencilModifier_update"); + + /* Sample */ + prop = RNA_def_property(srna, "length", PROP_FLOAT, PROP_NONE); + RNA_def_property_float_sdna(prop, NULL, "length"); + RNA_def_property_range(prop, 0, 10); + RNA_def_property_ui_text(prop, "Length", "Length of each segment"); + RNA_def_property_update(prop, 0, "rna_GpencilModifier_update"); } static void rna_def_modifier_gpencilthick(BlenderRNA *brna) diff --git a/source/blender/makesrna/intern/rna_material.c b/source/blender/makesrna/intern/rna_material.c index 162ba6be834..6378ee15279 100644 --- a/source/blender/makesrna/intern/rna_material.c +++ b/source/blender/makesrna/intern/rna_material.c @@ -612,6 +612,12 @@ static void rna_def_material_greasepencil(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Pattern", "Use Fill Texture as a pattern to apply color"); RNA_def_property_update(prop, NC_GPENCIL | ND_SHADING, "rna_MaterialGpencil_update"); + prop = RNA_def_property(srna, "use_overlap_strokes", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "flag", GP_STYLE_DISABLE_STENCIL); + RNA_def_property_ui_text( + prop, "Self Overlap", "Disable stencil and overlap self intersections with alpha materials"); + RNA_def_property_update(prop, NC_GPENCIL | ND_SHADING, "rna_MaterialGpencil_update"); + prop = RNA_def_property(srna, "show_stroke", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", GP_STYLE_STROKE_SHOW); RNA_def_property_ui_text(prop, "Show Stroke", "Show stroke lines of this material"); diff --git a/source/blender/makesrna/intern/rna_particle.c b/source/blender/makesrna/intern/rna_particle.c index a96e85473a2..4c50e0c19ae 100644 --- a/source/blender/makesrna/intern/rna_particle.c +++ b/source/blender/makesrna/intern/rna_particle.c @@ -3050,7 +3050,8 @@ static void rna_def_particle_settings(BlenderRNA *brna) prop = RNA_def_property(srna, "child_radius", PROP_FLOAT, PROP_DISTANCE); RNA_def_property_float_sdna(prop, NULL, "childrad"); - RNA_def_property_range(prop, 0.0f, 10.0f); + RNA_def_property_range(prop, 0.0f, 100000.0f); + RNA_def_property_ui_range(prop, 0.0f, 10.0f, 0.1, 3); RNA_def_property_ui_text(prop, "Child Radius", "Radius of children around parent"); RNA_def_property_update(prop, 0, "rna_Particle_redo_child"); diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c index ef8b671116a..531ff27798d 100644 --- a/source/blender/makesrna/intern/rna_scene.c +++ b/source/blender/makesrna/intern/rna_scene.c @@ -735,7 +735,7 @@ static void rna_GPencilInterpolateSettings_type_set(PointerRNA *ptr, int value) /* init custom interpolation curve here now the first time it's used */ if ((settings->type == GP_IPO_CURVEMAP) && (settings->custom_ipo == NULL)) { - settings->custom_ipo = curvemapping_add(1, 0.0f, 0.0f, 1.0f, 1.0f); + settings->custom_ipo = BKE_curvemapping_add(1, 0.0f, 0.0f, 1.0f, 1.0f); } } diff --git a/source/blender/makesrna/intern/rna_sequencer.c b/source/blender/makesrna/intern/rna_sequencer.c index c1ef31a80cd..80a4defba00 100644 --- a/source/blender/makesrna/intern/rna_sequencer.c +++ b/source/blender/makesrna/intern/rna_sequencer.c @@ -1853,7 +1853,8 @@ static void rna_def_editor(BlenderRNA *brna) prop = RNA_def_property(srna, "show_overlay", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "over_flag", SEQ_EDIT_OVERLAY_SHOW); - RNA_def_property_ui_text(prop, "Draw Axes", "Partial overlay on top of the sequencer"); + RNA_def_property_ui_text( + prop, "Show Overlay", "Partial overlay on top of the sequencer with a frame offset"); RNA_def_property_update(prop, NC_SPACE | ND_SPACE_SEQUENCER, NULL); prop = RNA_def_property(srna, "use_overlay_lock", PROP_BOOLEAN, PROP_NONE); @@ -1864,7 +1865,7 @@ static void rna_def_editor(BlenderRNA *brna) /* access to fixed and relative frame */ prop = RNA_def_property(srna, "overlay_frame", PROP_INT, PROP_NONE); - RNA_def_property_ui_text(prop, "Overlay Offset", ""); + RNA_def_property_ui_text(prop, "Overlay Offset", "Number of frames to offset"); RNA_def_property_int_funcs( prop, "rna_SequenceEditor_overlay_frame_get", "rna_SequenceEditor_overlay_frame_set", NULL); RNA_def_property_update(prop, NC_SPACE | ND_SPACE_SEQUENCER, NULL); diff --git a/source/blender/makesrna/intern/rna_userdef.c b/source/blender/makesrna/intern/rna_userdef.c index bed06171cbf..48eee713fc9 100644 --- a/source/blender/makesrna/intern/rna_userdef.c +++ b/source/blender/makesrna/intern/rna_userdef.c @@ -4590,10 +4590,6 @@ static void rna_def_userdef_edit(BlenderRNA *brna) "Grease Pencil Euclidean Distance", "Distance moved by mouse when drawing stroke to include"); - prop = RNA_def_property(srna, "use_grease_pencil_simplify_stroke", PROP_BOOLEAN, PROP_NONE); - RNA_def_property_boolean_sdna(prop, NULL, "gp_settings", GP_PAINT_DOSIMPLIFY); - RNA_def_property_ui_text(prop, "Grease Pencil Simplify Stroke", "Simplify the final stroke"); - prop = RNA_def_property(srna, "grease_pencil_eraser_radius", PROP_INT, PROP_PIXEL); RNA_def_property_int_sdna(prop, NULL, "gp_eraser"); RNA_def_property_range(prop, 1, 500); @@ -5824,7 +5820,7 @@ void RNA_def_userdef(BlenderRNA *brna) /* Preferences Flags */ prop = RNA_def_property(srna, "use_preferences_save", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "pref_flag", USER_PREF_FLAG_SAVE); - RNA_def_property_ui_text(prop, "Save on Exit", "Save modified preferences on exit"); + RNA_def_property_ui_text(prop, "Save on Exit", "Save preferences on exit when modified"); prop = RNA_def_property(srna, "is_dirty", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "runtime.is_dirty", 0); |