diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2016-09-04 17:41:06 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2016-09-04 17:41:06 +0300 |
commit | 3c29aad787f636167319950636f1497442075df8 (patch) | |
tree | 3a993cc25296ce987893b9f58b7c794b51e77f85 /source/blender/makesrna/intern | |
parent | 498583844fb7d0adbbc91d512f98885800cdf46e (diff) | |
parent | e76e8fcdcc53455a52a6a73495881eddd346472c (diff) |
Merge branch 'master' into blender2.8
Conflicts:
intern/cycles/blender/blender_particles.cpp
source/blender/blenkernel/intern/particle.c
source/blender/gpu/intern/gpu_shader.c
Diffstat (limited to 'source/blender/makesrna/intern')
-rw-r--r-- | source/blender/makesrna/intern/rna_curve.c | 2 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_gpencil.c | 17 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_lamp.c | 2 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_linestyle.c | 10 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_material.c | 2 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_movieclip.c | 2 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_nodetree.c | 4 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_object.c | 2 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_scene.c | 7 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_tracking.c | 12 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_wm.c | 6 |
11 files changed, 43 insertions, 23 deletions
diff --git a/source/blender/makesrna/intern/rna_curve.c b/source/blender/makesrna/intern/rna_curve.c index fb4ff6f4856..f4fb30e0793 100644 --- a/source/blender/makesrna/intern/rna_curve.c +++ b/source/blender/makesrna/intern/rna_curve.c @@ -1273,7 +1273,7 @@ static void rna_def_curve_spline_bezpoints(BlenderRNA *brna, PropertyRNA *cprop) RNA_def_property_srna(cprop, "SplineBezierPoints"); srna = RNA_def_struct(brna, "SplineBezierPoints", NULL); RNA_def_struct_sdna(srna, "Nurb"); - RNA_def_struct_ui_text(srna, "Spline Bezier Points", "Collection of spline bezirt points"); + RNA_def_struct_ui_text(srna, "Spline Bezier Points", "Collection of spline Bezier points"); func = RNA_def_function(srna, "add", "rna_Curve_spline_bezpoints_add"); RNA_def_function_ui_description(func, "Add a number of points to this spline"); diff --git a/source/blender/makesrna/intern/rna_gpencil.c b/source/blender/makesrna/intern/rna_gpencil.c index 3ecaec75c77..7eaf8b65902 100644 --- a/source/blender/makesrna/intern/rna_gpencil.c +++ b/source/blender/makesrna/intern/rna_gpencil.c @@ -439,12 +439,23 @@ static void rna_GPencil_stroke_point_select_set(PointerRNA *ptr, const int value } } -static void rna_GPencil_stroke_point_add(bGPDstroke *stroke, int count) +static void rna_GPencil_stroke_point_add(bGPDstroke *stroke, int count, float pressure, float strength) { if (count > 0) { + /* create space at the end of the array for extra points */ stroke->points = MEM_recallocN_id(stroke->points, sizeof(bGPDspoint) * (stroke->totpoints + count), "gp_stroke_points"); + + /* init the pressure and strength values so that old scripts won't need to + * be modified to give these initial values... + */ + for (int i = 0; i < count; i++) { + bGPDspoint *pt = stroke->points + (stroke->totpoints + i); + pt->pressure = pressure; + pt->strength = strength; + } + stroke->totpoints += count; } } @@ -888,9 +899,7 @@ static void rna_def_gpencil_stroke_point(BlenderRNA *brna) static void rna_def_gpencil_stroke_points_api(BlenderRNA *brna, PropertyRNA *cprop) { StructRNA *srna; - FunctionRNA *func; - /* PropertyRNA *parm; */ RNA_def_property_srna(cprop, "GPencilStrokePoints"); srna = RNA_def_struct(brna, "GPencilStrokePoints", NULL); @@ -900,6 +909,8 @@ static void rna_def_gpencil_stroke_points_api(BlenderRNA *brna, PropertyRNA *cpr func = RNA_def_function(srna, "add", "rna_GPencil_stroke_point_add"); RNA_def_function_ui_description(func, "Add a new grease pencil stroke point"); RNA_def_int(func, "count", 1, 0, INT_MAX, "Number", "Number of points to add to the stroke", 0, INT_MAX); + RNA_def_float(func, "pressure", 1.0f, 0.0f, 1.0f, "Pressure", "Pressure for newly created points", 0.0f, 1.0f); + RNA_def_float(func, "strength", 1.0f, 0.0f, 1.0f, "Strength", "Color intensity (alpha factor) for newly created points", 0.0f, 1.0f); func = RNA_def_function(srna, "pop", "rna_GPencil_stroke_point_pop"); RNA_def_function_ui_description(func, "Remove a grease pencil stroke point"); diff --git a/source/blender/makesrna/intern/rna_lamp.c b/source/blender/makesrna/intern/rna_lamp.c index e4e3699f301..51709d3137c 100644 --- a/source/blender/makesrna/intern/rna_lamp.c +++ b/source/blender/makesrna/intern/rna_lamp.c @@ -546,7 +546,7 @@ static void rna_def_lamp_shadow(StructRNA *srna, int spot, int area) prop = RNA_def_property(srna, "shadow_method", PROP_ENUM, PROP_NONE); RNA_def_property_enum_bitflag_sdna(prop, NULL, "mode"); RNA_def_property_enum_items(prop, (spot) ? prop_spot_shadow_items : prop_shadow_items); - RNA_def_property_update(prop, 0, "rna_Lamp_update"); + RNA_def_property_update(prop, 0, "rna_Lamp_draw_update"); prop = RNA_def_property(srna, "shadow_buffer_size", PROP_INT, PROP_NONE); RNA_def_property_int_sdna(prop, NULL, "bufsize"); diff --git a/source/blender/makesrna/intern/rna_linestyle.c b/source/blender/makesrna/intern/rna_linestyle.c index d8cc61bf906..9b28009d161 100644 --- a/source/blender/makesrna/intern/rna_linestyle.c +++ b/source/blender/makesrna/intern/rna_linestyle.c @@ -1499,14 +1499,15 @@ static void rna_def_freestyle_thickness_modifiers(BlenderRNA *brna, PropertyRNA RNA_def_property_srna(cprop, "LineStyleThicknessModifiers"); srna = RNA_def_struct(brna, "LineStyleThicknessModifiers", NULL); RNA_def_struct_sdna(srna, "FreestyleLineStyle"); - RNA_def_struct_ui_text(srna, "Thickness Modifiers", "Thickness modifiers for changing line thicknesss"); + RNA_def_struct_ui_text(srna, "Thickness Modifiers", "Thickness modifiers for changing line thickness"); func = RNA_def_function(srna, "new", "rna_LineStyle_thickness_modifier_add"); RNA_def_function_ui_description(func, "Add a thickness modifier to line style"); RNA_def_function_flag(func, FUNC_USE_REPORTS); parm = RNA_def_string(func, "name", "ThicknessModifier", 0, "", "New name for the thickness modifier (not unique)"); RNA_def_property_flag(parm, PROP_REQUIRED); - parm = RNA_def_enum(func, "type", rna_enum_linestyle_thickness_modifier_type_items, 0, "", "Thickness modifier type to add"); + parm = RNA_def_enum(func, "type", rna_enum_linestyle_thickness_modifier_type_items, 0, + "", "Thickness modifier type to add"); RNA_def_property_flag(parm, PROP_REQUIRED); parm = RNA_def_pointer(func, "modifier", "LineStyleThicknessModifier", "", "Newly added thickness modifier"); RNA_def_function_return(func, parm); @@ -1528,14 +1529,15 @@ static void rna_def_freestyle_geometry_modifiers(BlenderRNA *brna, PropertyRNA * RNA_def_property_srna(cprop, "LineStyleGeometryModifiers"); srna = RNA_def_struct(brna, "LineStyleGeometryModifiers", NULL); RNA_def_struct_sdna(srna, "FreestyleLineStyle"); - RNA_def_struct_ui_text(srna, "Geometry Modifiers", "Geometry modifiers for changing line geometrys"); + RNA_def_struct_ui_text(srna, "Geometry Modifiers", "Geometry modifiers for changing line geometries"); func = RNA_def_function(srna, "new", "rna_LineStyle_geometry_modifier_add"); RNA_def_function_ui_description(func, "Add a geometry modifier to line style"); RNA_def_function_flag(func, FUNC_USE_REPORTS); parm = RNA_def_string(func, "name", "GeometryModifier", 0, "", "New name for the geometry modifier (not unique)"); RNA_def_property_flag(parm, PROP_REQUIRED); - parm = RNA_def_enum(func, "type", rna_enum_linestyle_geometry_modifier_type_items, 0, "", "Geometry modifier type to add"); + parm = RNA_def_enum(func, "type", rna_enum_linestyle_geometry_modifier_type_items, 0, + "", "Geometry modifier type to add"); RNA_def_property_flag(parm, PROP_REQUIRED); parm = RNA_def_pointer(func, "modifier", "LineStyleGeometryModifier", "", "Newly added geometry modifier"); RNA_def_function_return(func, parm); diff --git a/source/blender/makesrna/intern/rna_material.c b/source/blender/makesrna/intern/rna_material.c index e4f9f856db7..2a8cc073e22 100644 --- a/source/blender/makesrna/intern/rna_material.c +++ b/source/blender/makesrna/intern/rna_material.c @@ -1889,7 +1889,7 @@ void RNA_def_material(BlenderRNA *brna) prop = RNA_def_property(srna, "pass_index", PROP_INT, PROP_UNSIGNED); RNA_def_property_int_sdna(prop, NULL, "index"); - RNA_def_property_ui_text(prop, "Pass Index", "Index number for the IndexMA render pass"); + RNA_def_property_ui_text(prop, "Pass Index", "Index number for the \"Material Index\" render pass"); RNA_def_property_update(prop, NC_OBJECT, "rna_Material_update"); /* flags */ diff --git a/source/blender/makesrna/intern/rna_movieclip.c b/source/blender/makesrna/intern/rna_movieclip.c index 19d78361019..15411f85ba3 100644 --- a/source/blender/makesrna/intern/rna_movieclip.c +++ b/source/blender/makesrna/intern/rna_movieclip.c @@ -347,6 +347,8 @@ static void rna_def_movieclip(BlenderRNA *brna) RNA_def_property_pointer_sdna(prop, NULL, "colorspace_settings"); RNA_def_property_struct_type(prop, "ColorManagedInputColorspaceSettings"); RNA_def_property_ui_text(prop, "Color Space Settings", "Input color space settings"); + + rna_def_animdata_common(srna); } void RNA_def_movieclip(BlenderRNA *brna) diff --git a/source/blender/makesrna/intern/rna_nodetree.c b/source/blender/makesrna/intern/rna_nodetree.c index 72ecebdb7df..1e58b6421f2 100644 --- a/source/blender/makesrna/intern/rna_nodetree.c +++ b/source/blender/makesrna/intern/rna_nodetree.c @@ -5352,13 +5352,13 @@ static void def_cmp_double_edge_mask(StructRNA *srna) }; prop = RNA_def_property(srna, "inner_mode", PROP_ENUM, PROP_NONE); - RNA_def_property_enum_sdna(prop, NULL, "custom2"); + RNA_def_property_enum_sdna(prop, NULL, "custom1"); RNA_def_property_enum_items(prop, InnerEdgeMode_items); RNA_def_property_ui_text(prop, "Inner Edge Mode", ""); RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update"); prop = RNA_def_property(srna, "edge_mode", PROP_ENUM, PROP_NONE); - RNA_def_property_enum_sdna(prop, NULL, "custom1"); + RNA_def_property_enum_sdna(prop, NULL, "custom2"); RNA_def_property_enum_items(prop, BufEdgeMode_items); RNA_def_property_ui_text(prop, "Buffer Edge Mode", ""); RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update"); diff --git a/source/blender/makesrna/intern/rna_object.c b/source/blender/makesrna/intern/rna_object.c index 127c6d4d95e..74e9df1889a 100644 --- a/source/blender/makesrna/intern/rna_object.c +++ b/source/blender/makesrna/intern/rna_object.c @@ -2490,7 +2490,7 @@ static void rna_def_object(BlenderRNA *brna) /* render */ prop = RNA_def_property(srna, "pass_index", PROP_INT, PROP_UNSIGNED); RNA_def_property_int_sdna(prop, NULL, "index"); - RNA_def_property_ui_text(prop, "Pass Index", "Index number for the IndexOB render pass"); + RNA_def_property_ui_text(prop, "Pass Index", "Index number for the \"Object Index\" render pass"); RNA_def_property_update(prop, NC_OBJECT, "rna_Object_internal_update"); prop = RNA_def_property(srna, "color", PROP_FLOAT, PROP_COLOR); diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c index be42f3c538f..dfe319dd87d 100644 --- a/source/blender/makesrna/intern/rna_scene.c +++ b/source/blender/makesrna/intern/rna_scene.c @@ -2276,7 +2276,7 @@ static void rna_def_gpencil_brushes(BlenderRNA *brna, PropertyRNA *cprop) "rna_GPencilBrushes_index_get", "rna_GPencilBrushes_index_set", "rna_GPencilBrushes_index_range"); - RNA_def_property_ui_text(prop, "Active brush Index", "Index of active brush"); + RNA_def_property_ui_text(prop, "Active Brush Index", "Index of active brush"); } static void rna_def_transform_orientation(BlenderRNA *brna) @@ -6270,6 +6270,11 @@ static void rna_def_scene_render_data(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Stamp Output", "Render the stamp info text in the rendered image"); RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); + prop = RNA_def_property(srna, "use_stamp_labels", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_negative_sdna(prop, NULL, "stamp", R_STAMP_HIDE_LABELS); + RNA_def_property_ui_text(prop, "Stamp Labels", "Draw stamp labels (\"Camera\" in front of camera name, etc.)"); + RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); + prop = RNA_def_property(srna, "use_stamp_strip_meta", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "stamp", R_STAMP_STRIPMETA); RNA_def_property_ui_text(prop, "Strip Metadata", "Use metadata from the strips in the sequencer"); diff --git a/source/blender/makesrna/intern/rna_tracking.c b/source/blender/makesrna/intern/rna_tracking.c index cbfebe5efc4..2340345c1c6 100644 --- a/source/blender/makesrna/intern/rna_tracking.c +++ b/source/blender/makesrna/intern/rna_tracking.c @@ -1768,17 +1768,17 @@ static void rna_def_trackingStabilization(BlenderRNA *brna) prop = RNA_def_property(srna, "target_rotation", PROP_FLOAT, PROP_ANGLE); RNA_def_property_float_sdna(prop, NULL, "target_rot"); RNA_def_property_range(prop, -FLT_MAX, FLT_MAX); - RNA_def_property_ui_range(prop, -FLT_MAX, FLT_MAX, 1, 3); + RNA_def_property_ui_range(prop, -FLT_MAX, FLT_MAX, 10.0f, 3); RNA_def_property_ui_text(prop, "Expected Rotation", "Rotation present on original shot, will be compensated (e.g. for deliberate tilting)"); RNA_def_property_update(prop, NC_MOVIECLIP | ND_DISPLAY, NULL); /* target scale */ - prop = RNA_def_property(srna, "target_zoom", PROP_FLOAT, PROP_FACTOR); + prop = RNA_def_property(srna, "target_scale", PROP_FLOAT, PROP_FACTOR); RNA_def_property_float_sdna(prop, NULL, "scale"); - RNA_def_property_range(prop, FLT_EPSILON, 100.0f); - RNA_def_property_ui_range(prop, 0.1f, 10.0f, 1, 3); /* increment in steps of 0.01. Show 3 digit after point */ - RNA_def_property_ui_text(prop, "Expected Zoom", + RNA_def_property_range(prop, FLT_EPSILON, FLT_MAX); + RNA_def_property_ui_range(prop, 0.01f, 10.0f, 0.001f, 3); /* increment in steps of 0.001. Show 3 digit after point */ + RNA_def_property_ui_text(prop, "Expected Scale", "Explicitly scale resulting frame to compensate zoom of original shot"); RNA_def_property_update(prop, NC_MOVIECLIP | ND_DISPLAY, "rna_tracking_flushUpdate"); @@ -2094,7 +2094,7 @@ static void rna_def_trackingObjects(BlenderRNA *brna, PropertyRNA *cprop) RNA_def_property_srna(cprop, "MovieTrackingObjects"); srna = RNA_def_struct(brna, "MovieTrackingObjects", NULL); RNA_def_struct_sdna(srna, "MovieTracking"); - RNA_def_struct_ui_text(srna, "Movie Objects", "Collection of movie trackingobjects"); + RNA_def_struct_ui_text(srna, "Movie Objects", "Collection of movie tracking objects"); func = RNA_def_function(srna, "new", "rna_trackingObject_new"); RNA_def_function_ui_description(func, "Add tracking object to this movie clip"); diff --git a/source/blender/makesrna/intern/rna_wm.c b/source/blender/makesrna/intern/rna_wm.c index f97f194033c..90081a93188 100644 --- a/source/blender/makesrna/intern/rna_wm.c +++ b/source/blender/makesrna/intern/rna_wm.c @@ -1935,15 +1935,15 @@ static void rna_def_wm_keyconfigs(BlenderRNA *brna, PropertyRNA *cprop) prop = RNA_def_property(srna, "addon", PROP_POINTER, PROP_NEVER_NULL); RNA_def_property_pointer_sdna(prop, NULL, "addonconf"); RNA_def_property_struct_type(prop, "KeyConfig"); - RNA_def_property_ui_text(prop, "Addon Key Configuration", - "Key configuration that can be extended by addons, and is added to the active " + RNA_def_property_ui_text(prop, "Add-on Key Configuration", + "Key configuration that can be extended by add-ons, and is added to the active " "configuration when handling events"); prop = RNA_def_property(srna, "user", PROP_POINTER, PROP_NEVER_NULL); RNA_def_property_pointer_sdna(prop, NULL, "userconf"); RNA_def_property_struct_type(prop, "KeyConfig"); RNA_def_property_ui_text(prop, "User Key Configuration", - "Final key configuration that combines keymaps from the active and addon configurations, " + "Final key configuration that combines keymaps from the active and add-on configurations, " "and can be edited by the user"); RNA_api_keyconfigs(srna); |