diff options
author | Tamito Kajiyama <rd6t-kjym@asahi-net.or.jp> | 2012-07-03 04:02:45 +0400 |
---|---|---|
committer | Tamito Kajiyama <rd6t-kjym@asahi-net.or.jp> | 2012-07-03 04:02:45 +0400 |
commit | 98a7ca61fa905792bd3fdfa6c29f44691c9582ac (patch) | |
tree | 47455f2482f6eca0352c10c57482641eec6afb57 /source/blender/makesrna | |
parent | 4e39a854b4589cddff484649d95cce4c71d4e9f4 (diff) | |
parent | 2ed69a95f499081aacc15c0295f3461c38430554 (diff) |
Merged changes in the trunk up to revision 48505.
Diffstat (limited to 'source/blender/makesrna')
20 files changed, 150 insertions, 78 deletions
diff --git a/source/blender/makesrna/RNA_enum_types.h b/source/blender/makesrna/RNA_enum_types.h index 7151c260942..6f024cde1d0 100644 --- a/source/blender/makesrna/RNA_enum_types.h +++ b/source/blender/makesrna/RNA_enum_types.h @@ -45,6 +45,7 @@ extern EnumPropertyItem proportional_falloff_curve_only_items[]; extern EnumPropertyItem proportional_editing_items[]; extern EnumPropertyItem snap_target_items[]; extern EnumPropertyItem snap_element_items[]; +extern EnumPropertyItem snap_node_element_items[]; extern EnumPropertyItem mesh_select_mode_items[]; extern EnumPropertyItem space_type_items[]; extern EnumPropertyItem region_type_items[]; diff --git a/source/blender/makesrna/intern/makesrna.c b/source/blender/makesrna/intern/makesrna.c index 2b3df4e0e3a..285cd41158b 100644 --- a/source/blender/makesrna/intern/makesrna.c +++ b/source/blender/makesrna/intern/makesrna.c @@ -51,6 +51,13 @@ # define __func__ __FUNCTION__ #endif +/* copied from BKE_utildefines.h ugh */ +#ifdef __GNUC__ +# define UNUSED(x) UNUSED_ ## x __attribute__((__unused__)) +#else +# define UNUSED(x) x +#endif + /* Replace if different */ #define TMP_EXT ".tmp" @@ -310,7 +317,7 @@ static void rna_print_data_get(FILE *f, PropertyDefRNA *dp) fprintf(f, " %s *data= (%s*)(ptr->data);\n", dp->dnastructname, dp->dnastructname); } -static void rna_print_id_get(FILE *f, PropertyDefRNA *dp) +static void rna_print_id_get(FILE *f, PropertyDefRNA *UNUSED(dp)) { fprintf(f, " ID *id= ptr->id.data;\n"); } @@ -1179,7 +1186,7 @@ static char *rna_def_property_lookup_int_func(FILE *f, StructRNA *srna, Property return func; } -static char *rna_def_property_next_func(FILE *f, StructRNA *srna, PropertyRNA *prop, PropertyDefRNA *dp, +static char *rna_def_property_next_func(FILE *f, StructRNA *srna, PropertyRNA *prop, PropertyDefRNA *UNUSED(dp), const char *manualfunc) { char *func, *getfunc; @@ -1206,7 +1213,7 @@ static char *rna_def_property_next_func(FILE *f, StructRNA *srna, PropertyRNA *p return func; } -static char *rna_def_property_end_func(FILE *f, StructRNA *srna, PropertyRNA *prop, PropertyDefRNA *dp, +static char *rna_def_property_end_func(FILE *f, StructRNA *srna, PropertyRNA *prop, PropertyDefRNA *UNUSED(dp), const char *manualfunc) { char *func; @@ -2006,7 +2013,7 @@ static void rna_generate_blender(BlenderRNA *brna, FILE *f) fprintf(f, "};\n\n"); } -static void rna_generate_property_prototypes(BlenderRNA *brna, StructRNA *srna, FILE *f) +static void rna_generate_property_prototypes(BlenderRNA *UNUSED(brna), StructRNA *srna, FILE *f) { PropertyRNA *prop; StructRNA *base; @@ -2029,7 +2036,7 @@ static void rna_generate_property_prototypes(BlenderRNA *brna, StructRNA *srna, fprintf(f, "\n"); } -static void rna_generate_parameter_prototypes(BlenderRNA *brna, StructRNA *srna, FunctionRNA *func, FILE *f) +static void rna_generate_parameter_prototypes(BlenderRNA *UNUSED(brna), StructRNA *srna, FunctionRNA *func, FILE *f) { PropertyRNA *parm; @@ -2068,7 +2075,7 @@ static void rna_generate_function_prototypes(BlenderRNA *brna, StructRNA *srna, fprintf(f, "\n"); } -static void rna_generate_static_parameter_prototypes(BlenderRNA *brna, StructRNA *srna, FunctionDefRNA *dfunc, FILE *f) +static void rna_generate_static_parameter_prototypes(BlenderRNA *UNUSED(brna), StructRNA *srna, FunctionDefRNA *dfunc, FILE *f) { FunctionRNA *func; PropertyDefRNA *dparm; @@ -2483,7 +2490,7 @@ static void rna_generate_property(FILE *f, StructRNA *srna, const char *nest, Pr } } -static void rna_generate_struct(BlenderRNA *brna, StructRNA *srna, FILE *f) +static void rna_generate_struct(BlenderRNA *UNUSED(brna), StructRNA *srna, FILE *f) { FunctionRNA *func; FunctionDefRNA *dfunc; @@ -2762,7 +2769,7 @@ static void rna_generate(BlenderRNA *brna, FILE *f, const char *filename, const } } -static void rna_generate_header(BlenderRNA *brna, FILE *f) +static void rna_generate_header(BlenderRNA *UNUSED(brna), FILE *f) { StructDefRNA *ds; PropertyDefRNA *dp; @@ -2930,7 +2937,7 @@ static const char *cpp_classes = "" "};\n" "\n"; -static void rna_generate_header_cpp(BlenderRNA *brna, FILE *f) +static void rna_generate_header_cpp(BlenderRNA *UNUSED(brna), FILE *f) { StructDefRNA *ds; PropertyDefRNA *dp; diff --git a/source/blender/makesrna/intern/rna_animation.c b/source/blender/makesrna/intern/rna_animation.c index 459482063b1..69f785c32de 100644 --- a/source/blender/makesrna/intern/rna_animation.c +++ b/source/blender/makesrna/intern/rna_animation.c @@ -24,7 +24,6 @@ * \ingroup RNA */ - #include <stdlib.h> #include "RNA_access.h" @@ -37,6 +36,8 @@ #include "DNA_action_types.h" #include "DNA_scene_types.h" +#include "BLI_utildefines.h" + #include "MEM_guardedalloc.h" #include "ED_keyframing.h" @@ -463,7 +464,8 @@ static FCurve *rna_Driver_from_existing(AnimData *adt, bContext *C, FCurve *src_ #else /* helper function for Keying Set -> keying settings */ -static void rna_def_common_keying_flags(StructRNA *srna, short reg) +/* TODO: use reg option! */ +static void rna_def_common_keying_flags(StructRNA *srna, short UNUSED(reg)) { PropertyRNA *prop; diff --git a/source/blender/makesrna/intern/rna_constraint.c b/source/blender/makesrna/intern/rna_constraint.c index ae8b0c51544..e44d6a11136 100644 --- a/source/blender/makesrna/intern/rna_constraint.c +++ b/source/blender/makesrna/intern/rna_constraint.c @@ -1116,7 +1116,7 @@ static void rna_def_constraint_action(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Object Action", "Bones only: apply the object's transformation channels of the action " "to the constrained bone, instead of bone's channels"); - RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update"); + RNA_def_property_update(prop, NC_OBJECT | ND_CONSTRAINT, "rna_Constraint_update"); prop = RNA_def_property(srna, "frame_start", PROP_INT, PROP_TIME); RNA_def_property_int_sdna(prop, NULL, "start"); diff --git a/source/blender/makesrna/intern/rna_curve.c b/source/blender/makesrna/intern/rna_curve.c index f70fe9082af..e74d192b13f 100644 --- a/source/blender/makesrna/intern/rna_curve.c +++ b/source/blender/makesrna/intern/rna_curve.c @@ -24,7 +24,6 @@ * \ingroup RNA */ - #include <stdlib.h> #include "RNA_define.h" @@ -36,6 +35,8 @@ #include "DNA_material_types.h" #include "DNA_scene_types.h" +#include "BLI_utildefines.h" + #include "BKE_font.h" #include "WM_types.h" @@ -845,7 +846,7 @@ static void rna_def_beztriple(BlenderRNA *brna) RNA_def_struct_path_func(srna, "rna_Curve_spline_point_path"); } -static void rna_def_path(BlenderRNA *brna, StructRNA *srna) +static void rna_def_path(BlenderRNA *UNUSED(brna), StructRNA *srna) { PropertyRNA *prop; @@ -894,7 +895,7 @@ static void rna_def_path(BlenderRNA *brna, StructRNA *srna) RNA_def_property_update(prop, 0, "rna_Curve_update_data"); } -static void rna_def_nurbs(BlenderRNA *brna, StructRNA *srna) +static void rna_def_nurbs(BlenderRNA *UNUSED(brna), StructRNA *srna) { PropertyRNA *prop; @@ -905,7 +906,7 @@ static void rna_def_nurbs(BlenderRNA *brna, StructRNA *srna) RNA_def_property_update(prop, 0, "rna_Curve_update_data"); } -static void rna_def_font(BlenderRNA *brna, StructRNA *srna) +static void rna_def_font(BlenderRNA *UNUSED(brna), StructRNA *srna) { PropertyRNA *prop; @@ -1187,7 +1188,7 @@ static void rna_def_curve_spline_points(BlenderRNA *brna, PropertyRNA *cprop) RNA_def_function_ui_description(func, "Remove a spline from a curve"); RNA_def_function_flag(func, FUNC_USE_REPORTS); parm= RNA_def_pointer(func, "spline", "Spline", "", "The spline to remove"); - RNA_def_property_flag(parm, PROP_REQUIRED|PROP_NEVER_NULL); + RNA_def_property_flag(parm, PROP_REQUIRED | PROP_NEVER_NULL); #endif } diff --git a/source/blender/makesrna/intern/rna_define.c b/source/blender/makesrna/intern/rna_define.c index 02d8cbef4a3..0320c0d7142 100644 --- a/source/blender/makesrna/intern/rna_define.c +++ b/source/blender/makesrna/intern/rna_define.c @@ -497,6 +497,9 @@ void RNA_struct_free_extension(StructRNA *srna, ExtensionRNA *ext) ext->free(ext->data); /* decref's the PyObject that the srna owns */ RNA_struct_blender_type_set(srna, NULL); /* this gets accessed again - XXX fixme */ RNA_struct_py_type_set(srna, NULL); /* NULL the srna's value so RNA_struct_free wont complain of a leak */ +#else + (void)srna; + (void)ext; #endif } @@ -546,7 +549,8 @@ void RNA_struct_free(BlenderRNA *brna, StructRNA *srna) if (srna->flag & STRUCT_RUNTIME) rna_freelinkN(&brna->structs, srna); - +#else + (void)brna, (void)srna; #endif } diff --git a/source/blender/makesrna/intern/rna_fcurve.c b/source/blender/makesrna/intern/rna_fcurve.c index 333f6878413..144b8a7f90c 100644 --- a/source/blender/makesrna/intern/rna_fcurve.c +++ b/source/blender/makesrna/intern/rna_fcurve.c @@ -1136,9 +1136,9 @@ static void rna_def_drivertarget(BlenderRNA *brna) {0, "WORLD_SPACE", 0, "World Space", "Transforms include effects of parenting/restpose and constraints"}, {DTAR_FLAG_LOCALSPACE, "TRANSFORM_SPACE", 0, "Transform Space", "Transforms don't include parenting/restpose or constraints"}, - {DTAR_FLAG_LOCALSPACE|DTAR_FLAG_LOCAL_CONSTS, "LOCAL_SPACE", 0, "Local Space", - "Transforms include effects of constraints but not " - "parenting/restpose"}, + {DTAR_FLAG_LOCALSPACE | DTAR_FLAG_LOCAL_CONSTS, "LOCAL_SPACE", 0, "Local Space", + "Transforms include effects of constraints but not " + "parenting/restpose"}, {0, NULL, 0, NULL, NULL} }; diff --git a/source/blender/makesrna/intern/rna_image_api.c b/source/blender/makesrna/intern/rna_image_api.c index 14d01444681..fa3f8d69c47 100644 --- a/source/blender/makesrna/intern/rna_image_api.c +++ b/source/blender/makesrna/intern/rna_image_api.c @@ -178,9 +178,11 @@ static void rna_Image_update(Image *image, ReportList *reports) IMB_rect_from_float(ibuf); } -static void rna_Image_scale(Image *image, int width, int height) +static void rna_Image_scale(Image *image, ReportList *reports, int width, int height) { - BKE_image_scale(image, width, height); + if (!BKE_image_scale(image, width, height)) { + BKE_reportf(reports, RPT_ERROR, "Image \"%s\" does not have any image data", image->id.name + 2); + } } static int rna_Image_gl_load(Image *image, ReportList *reports, int filter, int mag) @@ -285,6 +287,7 @@ void RNA_api_image(StructRNA *srna) func = RNA_def_function(srna, "scale", "rna_Image_scale"); RNA_def_function_ui_description(func, "Scale the image in pixels"); + RNA_def_function_flag(func, FUNC_USE_REPORTS); parm = RNA_def_int(func, "width", 0, 1, 10000, "", "Width", 1, 10000); RNA_def_property_flag(parm, PROP_REQUIRED); parm = RNA_def_int(func, "height", 0, 1, 10000, "", "Height", 1, 10000); diff --git a/source/blender/makesrna/intern/rna_main.c b/source/blender/makesrna/intern/rna_main.c index 6f8545099ea..69813172de7 100644 --- a/source/blender/makesrna/intern/rna_main.c +++ b/source/blender/makesrna/intern/rna_main.c @@ -255,7 +255,7 @@ static void rna_Main_movieclips_begin(CollectionPropertyIterator *iter, PointerR static void rna_Main_masks_begin(CollectionPropertyIterator *iter, PointerRNA *ptr) { - Main *bmain= (Main*)ptr->data; + Main *bmain = (Main*)ptr->data; rna_iterator_listbase_begin(iter, &bmain->mask, NULL); } diff --git a/source/blender/makesrna/intern/rna_main_api.c b/source/blender/makesrna/intern/rna_main_api.c index ed45b378228..62af5cbad21 100644 --- a/source/blender/makesrna/intern/rna_main_api.c +++ b/source/blender/makesrna/intern/rna_main_api.c @@ -1567,12 +1567,12 @@ void RNA_def_main_masks(BlenderRNA *brna, PropertyRNA *cprop) PropertyRNA *parm; RNA_def_property_srna(cprop, "BlendDataMasks"); - srna= RNA_def_struct(brna, "BlendDataMasks", NULL); + srna = RNA_def_struct(brna, "BlendDataMasks", NULL); RNA_def_struct_sdna(srna, "Main"); RNA_def_struct_ui_text(srna, "Main Masks", "Collection of masks"); - func= RNA_def_function(srna, "tag", "rna_Main_masks_tag"); - parm= RNA_def_boolean(func, "value", 0, "Value", ""); + func = RNA_def_function(srna, "tag", "rna_Main_masks_tag"); + parm = RNA_def_boolean(func, "value", 0, "Value", ""); RNA_def_property_flag(parm, PROP_REQUIRED); /* new func */ @@ -1584,10 +1584,10 @@ void RNA_def_main_masks(BlenderRNA *brna, PropertyRNA *cprop) RNA_def_function_return(func, parm); /* remove func */ - func= RNA_def_function(srna, "remove", "rna_Main_masks_remove"); + func = RNA_def_function(srna, "remove", "rna_Main_masks_remove"); RNA_def_function_ui_description(func, "Remove a masks from the current blendfile."); - parm= RNA_def_pointer(func, "mask", "Mask", "", "Mask to remove"); - RNA_def_property_flag(parm, PROP_REQUIRED|PROP_NEVER_NULL); + parm = RNA_def_pointer(func, "mask", "Mask", "", "Mask to remove"); + RNA_def_property_flag(parm, PROP_REQUIRED | PROP_NEVER_NULL); } void RNA_def_main_linestyles(BlenderRNA *brna, PropertyRNA *cprop) diff --git a/source/blender/makesrna/intern/rna_mask.c b/source/blender/makesrna/intern/rna_mask.c index 51dfa020bea..b879d2b19f7 100644 --- a/source/blender/makesrna/intern/rna_mask.c +++ b/source/blender/makesrna/intern/rna_mask.c @@ -66,7 +66,7 @@ static void rna_Mask_update_data(Main *UNUSED(bmain), Scene *UNUSED(scene), Poin { Mask *mask = ptr->id.data; - WM_main_add_notifier(NC_MASK|ND_DATA, mask); + WM_main_add_notifier(NC_MASK | ND_DATA, mask); DAG_id_tag_update( &mask->id, 0); } @@ -327,7 +327,7 @@ static MaskLayer *rna_Mask_layer_new(Mask *mask, const char *name) { MaskLayer *masklay = BKE_mask_layer_new(mask, name); - WM_main_add_notifier(NC_MASK|NA_EDITED, mask); + WM_main_add_notifier(NC_MASK | NA_EDITED, mask); return masklay; } @@ -336,7 +336,7 @@ void rna_Mask_layer_remove(Mask *mask, MaskLayer *masklay) { BKE_mask_layer_remove(mask, masklay); - WM_main_add_notifier(NC_MASK|NA_EDITED, mask); + WM_main_add_notifier(NC_MASK | NA_EDITED, mask); } static void rna_MaskLayer_spline_add(ID *id, MaskLayer *masklay, int number) @@ -347,7 +347,7 @@ static void rna_MaskLayer_spline_add(ID *id, MaskLayer *masklay, int number) for (i = 0; i < number; i++) BKE_mask_spline_add(masklay); - WM_main_add_notifier(NC_MASK|NA_EDITED, mask); + WM_main_add_notifier(NC_MASK | NA_EDITED, mask); } static void rna_Mask_start_frame_set(PointerRNA *ptr, int value) @@ -526,14 +526,14 @@ static void rna_def_mask_splines(BlenderRNA *brna) prop = RNA_def_property(srna, "active", PROP_POINTER, PROP_NONE); RNA_def_property_struct_type(prop, "MaskSpline"); RNA_def_property_pointer_funcs(prop, "rna_MaskLayer_active_spline_get", "rna_MaskLayer_active_spline_set", NULL, NULL); - RNA_def_property_flag(prop, PROP_EDITABLE|PROP_NEVER_UNLINK); + RNA_def_property_flag(prop, PROP_EDITABLE | PROP_NEVER_UNLINK); RNA_def_property_ui_text(prop, "Active Spline", "Active spline of masking layer"); /* active point */ prop = RNA_def_property(srna, "active_point", PROP_POINTER, PROP_NONE); RNA_def_property_struct_type(prop, "MaskSplinePoint"); RNA_def_property_pointer_funcs(prop, "rna_MaskLayer_active_spline_point_get", "rna_MaskLayer_active_spline_point_set", NULL, NULL); - RNA_def_property_flag(prop, PROP_EDITABLE|PROP_NEVER_UNLINK); + RNA_def_property_flag(prop, PROP_EDITABLE | PROP_NEVER_UNLINK); RNA_def_property_ui_text(prop, "Active Spline", "Active spline of masking layer"); } @@ -675,7 +675,7 @@ static void rna_def_masklayers(BlenderRNA *brna, PropertyRNA *cprop) prop = RNA_def_property(srna, "active", PROP_POINTER, PROP_NONE); RNA_def_property_struct_type(prop, "MaskLayer"); RNA_def_property_pointer_funcs(prop, "rna_Mask_layer_active_get", "rna_Mask_layer_active_set", NULL, NULL); - RNA_def_property_flag(prop, PROP_EDITABLE|PROP_NEVER_UNLINK); + RNA_def_property_flag(prop, PROP_EDITABLE | PROP_NEVER_UNLINK); RNA_def_property_ui_text(prop, "Active Shape", "Active layer in this mask"); } diff --git a/source/blender/makesrna/intern/rna_mesh.c b/source/blender/makesrna/intern/rna_mesh.c index 8b8d085b2a4..9dd58dd780e 100644 --- a/source/blender/makesrna/intern/rna_mesh.c +++ b/source/blender/makesrna/intern/rna_mesh.c @@ -2389,7 +2389,7 @@ static void rna_def_loop_colors(BlenderRNA *brna, PropertyRNA *cprop) RNA_def_function_ui_description(func, "Remove a vertex color layer"); RNA_def_function_flag(func, FUNC_USE_REPORTS); parm = RNA_def_pointer(func, "layer", "Layer", "", "The layer to remove"); - RNA_def_property_flag(parm, PROP_REQUIRED|PROP_NEVER_NULL); + RNA_def_property_flag(parm, PROP_REQUIRED | PROP_NEVER_NULL); #endif prop = RNA_def_property(srna, "active", PROP_POINTER, PROP_UNSIGNED); @@ -2566,7 +2566,7 @@ static void rna_def_uv_textures(BlenderRNA *brna, PropertyRNA *cprop) RNA_def_function_ui_description(func, "Remove a vertex color layer"); RNA_def_function_flag(func, FUNC_USE_REPORTS); parm = RNA_def_pointer(func, "layer", "Layer", "", "The layer to remove"); - RNA_def_property_flag(parm, PROP_REQUIRED|PROP_NEVER_NULL); + RNA_def_property_flag(parm, PROP_REQUIRED | PROP_NEVER_NULL); #endif prop = RNA_def_property(srna, "active", PROP_POINTER, PROP_UNSIGNED); diff --git a/source/blender/makesrna/intern/rna_nodetree.c b/source/blender/makesrna/intern/rna_nodetree.c index baf3ccf35e1..cb1a45ed971 100644 --- a/source/blender/makesrna/intern/rna_nodetree.c +++ b/source/blender/makesrna/intern/rna_nodetree.c @@ -1944,6 +1944,10 @@ static void def_cmp_image(StructRNA *srna) RNA_def_property_ui_text(prop, "Image", ""); RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update"); + /* NB: image user properties used in the UI are redefined in def_node_image_user, + * to trigger correct updates of the node editor. RNA design problem that prevents + * updates from nested structs ... + */ RNA_def_struct_sdna_from(srna, "ImageUser", "storage"); def_node_image_user(srna); } @@ -2049,10 +2053,10 @@ static void def_cmp_dilate_erode(StructRNA *srna) PropertyRNA *prop; static EnumPropertyItem type_items[] = { - {CMP_NODE_DILATEERODE_STEP, "STEP", 0, "Step", ""}, - {CMP_NODE_DILATEERODE_DISTANCE_THRESH, "THRESHOLD", 0, "Threshold", ""}, - {CMP_NODE_DILATEERODE_DISTANCE, "DISTANCE", 0, "Distance", ""}, - {CMP_NODE_DILATEERODE_DISTANCE_FEATHER,"FEATHER", 0, "Feather", ""}, + {CMP_NODE_DILATEERODE_STEP, "STEP", 0, "Step", ""}, + {CMP_NODE_DILATEERODE_DISTANCE_THRESH, "THRESHOLD", 0, "Threshold", ""}, + {CMP_NODE_DILATEERODE_DISTANCE, "DISTANCE", 0, "Distance", ""}, + {CMP_NODE_DILATEERODE_DISTANCE_FEATHER, "FEATHER", 0, "Feather", ""}, {0, NULL, 0, NULL, NULL} }; @@ -3551,14 +3555,14 @@ static void def_cmp_keyingscreen(StructRNA *srna) RNA_def_property_struct_type(prop, "MovieClip"); RNA_def_property_flag(prop, PROP_EDITABLE); RNA_def_property_ui_text(prop, "Movie Clip", ""); - RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update"); + RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update"); RNA_def_struct_sdna_from(srna, "NodeKeyingScreenData", "storage"); prop = RNA_def_property(srna, "tracking_object", PROP_STRING, PROP_NONE); RNA_def_property_string_sdna(prop, NULL, "tracking_object"); RNA_def_property_ui_text(prop, "Tracking Object", ""); - RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update"); + RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update"); } static void def_cmp_keying(StructRNA *srna) @@ -3571,55 +3575,67 @@ static void def_cmp_keying(StructRNA *srna) RNA_def_property_float_sdna(prop, NULL, "screen_balance"); RNA_def_property_range(prop, 0.0f, 1.0f); RNA_def_property_ui_text(prop, "Screen Balance", "Balance between two non-primary channels primary channel is comparing against"); - RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update"); + RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update"); prop = RNA_def_property(srna, "despill_factor", PROP_FLOAT, PROP_FACTOR); RNA_def_property_float_sdna(prop, NULL, "despill_factor"); RNA_def_property_range(prop, 0.0f, 1.0f); RNA_def_property_ui_text(prop, "Despill", "Factor of despilling screen color from image"); - RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update"); + RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update"); prop = RNA_def_property(srna, "clip_black", PROP_FLOAT, PROP_FACTOR); RNA_def_property_float_sdna(prop, NULL, "clip_black"); RNA_def_property_range(prop, 0.0f, 1.0f); - RNA_def_property_ui_text(prop, "Clip Black", "Value of on-scaled matte pixel which considers as fully background pixel"); - RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update"); + RNA_def_property_ui_text(prop, "Clip Black", "Value of non-scaled matte pixel which considers as fully background pixel"); + RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update"); prop = RNA_def_property(srna, "clip_white", PROP_FLOAT, PROP_FACTOR); RNA_def_property_float_sdna(prop, NULL, "clip_white"); RNA_def_property_range(prop, 0.0f, 1.0f); - RNA_def_property_ui_text(prop, "Clip White", "Value of on-scaled matte pixel which considers as fully foreground pixel"); + RNA_def_property_ui_text(prop, "Clip White", "Value of non-scaled matte pixel which considers as fully foreground pixel"); RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update"); prop = RNA_def_property(srna, "blur_pre", PROP_INT, PROP_NONE); RNA_def_property_int_sdna(prop, NULL, "blur_pre"); RNA_def_property_range(prop, 0, 2048); RNA_def_property_ui_text(prop, "Pre Blur", "Chroma pre-blur size which applies before running keyer"); - RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update"); + RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update"); prop = RNA_def_property(srna, "blur_post", PROP_INT, PROP_NONE); RNA_def_property_int_sdna(prop, NULL, "blur_post"); RNA_def_property_range(prop, 0, 2048); RNA_def_property_ui_text(prop, "Post Blur", "Matte blur size which applies after clipping and dilate/eroding"); - RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update"); + RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update"); prop = RNA_def_property(srna, "dilate_distance", PROP_INT, PROP_NONE); RNA_def_property_int_sdna(prop, NULL, "dilate_distance"); RNA_def_property_range(prop, -100, 100); RNA_def_property_ui_text(prop, "Dilate/Erode", "Matte dilate/erode side"); - RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update"); + RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update"); prop = RNA_def_property(srna, "edge_kernel_radius", PROP_INT, PROP_NONE); RNA_def_property_int_sdna(prop, NULL, "edge_kernel_radius"); RNA_def_property_range(prop, 0, 100); RNA_def_property_ui_text(prop, "Edge Kernel Radius", "Radius of kernel used to detect whether pixel belongs to edge"); - RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update"); + RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update"); prop = RNA_def_property(srna, "edge_kernel_tolerance", PROP_FLOAT, PROP_FACTOR); RNA_def_property_float_sdna(prop, NULL, "edge_kernel_tolerance"); RNA_def_property_range(prop, 0.0f, 1.0f); RNA_def_property_ui_text(prop, "Edge Kernel Tolerance", "Tolerance to pixels inside kernel which are treating as belonging to the same plane"); - RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update"); + RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update"); + + prop = RNA_def_property(srna, "feather_falloff", PROP_ENUM, PROP_NONE); + RNA_def_property_enum_sdna(prop, NULL, "feather_falloff"); + RNA_def_property_enum_items(prop, proportional_falloff_curve_only_items); + RNA_def_property_ui_text(prop, "Feather Falloff", "Falloff type the feather"); + RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update"); + + prop = RNA_def_property(srna, "feather_distance", PROP_INT, PROP_NONE); + RNA_def_property_int_sdna(prop, NULL, "feather_distance"); + RNA_def_property_range(prop, -100, 100); + RNA_def_property_ui_text(prop, "Feather Distance", "Distance to grow/shrink the feather"); + RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update"); } /* -- Texture Nodes --------------------------------------------------------- */ diff --git a/source/blender/makesrna/intern/rna_nodetree_types.h b/source/blender/makesrna/intern/rna_nodetree_types.h index 20f58f4d16e..5ebaddda043 100644 --- a/source/blender/makesrna/intern/rna_nodetree_types.h +++ b/source/blender/makesrna/intern/rna_nodetree_types.h @@ -37,7 +37,7 @@ DefNode( ShaderNode, SH_NODE_MATERIAL, def_sh_material, "MATER DefNode( ShaderNode, SH_NODE_RGB, 0, "RGB", RGB, "RGB", "" ) DefNode( ShaderNode, SH_NODE_VALUE, 0, "VALUE", Value, "Value", "" ) DefNode( ShaderNode, SH_NODE_MIX_RGB, def_mix_rgb, "MIX_RGB", MixRGB, "MixRGB", "" ) -DefNode( ShaderNode, SH_NODE_VALTORGB, def_colorramp, "VALTORGB", ValToRGB, "ColorRamp", "" ) +DefNode( ShaderNode, SH_NODE_VALTORGB, def_colorramp, "VALTORGB", ValToRGB, "ColorRamp", "" ) DefNode( ShaderNode, SH_NODE_RGBTOBW, 0, "RGBTOBW", RGBToBW, "RGB to BW", "" ) DefNode( ShaderNode, SH_NODE_TEXTURE, def_texture, "TEXTURE", Texture, "Texture", "" ) DefNode( ShaderNode, SH_NODE_NORMAL, 0, "NORMAL", Normal, "Normal", "" ) @@ -91,13 +91,13 @@ DefNode( ShaderNode, SH_NODE_TEX_WAVE, def_sh_tex_wave, "TE DefNode( ShaderNode, SH_NODE_TEX_MUSGRAVE, def_sh_tex_musgrave, "TEX_MUSGRAVE", TexMusgrave, "Musgrave Texture", "" ) DefNode( ShaderNode, SH_NODE_TEX_VORONOI, def_sh_tex_voronoi, "TEX_VORONOI", TexVoronoi, "Voronoi Texture", "" ) DefNode( ShaderNode, SH_NODE_TEX_CHECKER, def_sh_tex_checker, "TEX_CHECKER", TexChecker, "Checker Texture", "" ) -DefNode( ShaderNode, SH_NODE_TEX_COORD, 0, "TEX_COORD", TexCoord, "Texture Coordinate","") +DefNode( ShaderNode, SH_NODE_TEX_COORD, 0, "TEX_COORD", TexCoord, "Texture Coordinate","" ) DefNode( CompositorNode, CMP_NODE_VIEWER, def_cmp_viewer, "VIEWER", Viewer, "Viewer", "" ) DefNode( CompositorNode, CMP_NODE_RGB, 0, "RGB", RGB, "RGB", "" ) DefNode( CompositorNode, CMP_NODE_VALUE, 0, "VALUE", Value, "Value", "" ) DefNode( CompositorNode, CMP_NODE_MIX_RGB, def_mix_rgb, "MIX_RGB", MixRGB, "Mix RGB", "" ) -DefNode( CompositorNode, CMP_NODE_VALTORGB, def_colorramp, "VALTORGB", ValToRGB, "ColorRamp", "" ) +DefNode( CompositorNode, CMP_NODE_VALTORGB, def_colorramp, "VALTORGB", ValToRGB, "ColorRamp", "" ) DefNode( CompositorNode, CMP_NODE_RGBTOBW, 0, "RGBTOBW", RGBToBW, "RGB to BW", "" ) DefNode( CompositorNode, CMP_NODE_NORMAL, 0, "NORMAL", Normal, "Normal", "" ) DefNode( CompositorNode, CMP_NODE_CURVE_VEC, def_vector_curve, "CURVE_VEC", CurveVec, "Vector Curve", "" ) @@ -118,7 +118,7 @@ DefNode( CompositorNode, CMP_NODE_COMPOSITE, 0, "COMPO DefNode( CompositorNode, CMP_NODE_OUTPUT_FILE, def_cmp_output_file, "OUTPUT_FILE", OutputFile, "Output File", "" ) DefNode( CompositorNode, CMP_NODE_TEXTURE, def_texture, "TEXTURE", Texture, "Texture", "" ) DefNode( CompositorNode, CMP_NODE_TRANSLATE, 0, "TRANSLATE", Translate, "Translate", "" ) -DefNode( CompositorNode, CMP_NODE_ZCOMBINE, def_cmp_zcombine, "ZCOMBINE", Zcombine, "Z Combine", "" ) +DefNode( CompositorNode, CMP_NODE_ZCOMBINE, def_cmp_zcombine, "ZCOMBINE", Zcombine, "Z Combine", "" ) DefNode( CompositorNode, CMP_NODE_COMBRGBA, 0, "COMBRGBA", CombRGBA, "Combine RGBA", "" ) DefNode( CompositorNode, CMP_NODE_DILATEERODE, def_cmp_dilate_erode, "DILATEERODE", DilateErode, "Dilate/Erode", "" ) DefNode( CompositorNode, CMP_NODE_ROTATE, def_cmp_rotate, "ROTATE", Rotate, "Rotate", "" ) @@ -178,7 +178,7 @@ DefNode( TextureNode, TEX_NODE_BRICKS, def_tex_bricks, "BRICK DefNode( TextureNode, TEX_NODE_MATH, def_math, "MATH", Math, "Math", "" ) DefNode( TextureNode, TEX_NODE_MIX_RGB, def_mix_rgb, "MIX_RGB", MixRGB, "Mix RGB", "" ) DefNode( TextureNode, TEX_NODE_RGBTOBW, 0, "RGBTOBW", RGBToBW, "RGB to BW", "" ) -DefNode( TextureNode, TEX_NODE_VALTORGB, def_colorramp, "VALTORGB", ValToRGB, "ColorRamp", "" ) +DefNode( TextureNode, TEX_NODE_VALTORGB, def_colorramp, "VALTORGB", ValToRGB, "ColorRamp", "" ) DefNode( TextureNode, TEX_NODE_IMAGE, def_tex_image, "IMAGE", Image, "Image", "" ) DefNode( TextureNode, TEX_NODE_CURVE_RGB, def_rgb_curve, "CURVE_RGB", CurveRGB, "RGB Curve", "" ) DefNode( TextureNode, TEX_NODE_INVERT, 0, "INVERT", Invert, "Invert", "" ) diff --git a/source/blender/makesrna/intern/rna_object.c b/source/blender/makesrna/intern/rna_object.c index 0399a8ee60d..51c49cf9e53 100644 --- a/source/blender/makesrna/intern/rna_object.c +++ b/source/blender/makesrna/intern/rna_object.c @@ -174,6 +174,11 @@ static void rna_Object_matrix_world_update(Main *bmain, Scene *scene, PointerRNA rna_Object_internal_update(bmain, scene, ptr); } +static void rna_Object_hide_update(Main *bmain, Scene *UNUSED(scene), PointerRNA *UNUSED(ptr)) +{ + DAG_id_type_tag(bmain, ID_OB); +} + static void rna_Object_matrix_local_get(PointerRNA *ptr, float values[16]) { Object *ob = ptr->id.data; @@ -947,8 +952,8 @@ static void rna_GameObjectSettings_physics_type_set(PointerRNA *ptr, int value) break; case OB_BODY_TYPE_CHARACTER: ob->gameflag |= OB_COLLISION | OB_GHOST | OB_CHARACTER; - ob->gameflag &= ~(OB_SENSOR | OB_OCCLUDER | OB_DYNAMIC | OB_RIGID_BODY | OB_SOFT_BODY | OB_ACTOR - | OB_ANISOTROPIC_FRICTION | OB_DO_FH | OB_ROT_FH | OB_COLLISION_RESPONSE | OB_NAVMESH); + ob->gameflag &= ~(OB_SENSOR | OB_OCCLUDER | OB_DYNAMIC | OB_RIGID_BODY | OB_SOFT_BODY | OB_ACTOR | + OB_ANISOTROPIC_FRICTION | OB_DO_FH | OB_ROT_FH | OB_COLLISION_RESPONSE | OB_NAVMESH); break; case OB_BODY_TYPE_STATIC: ob->gameflag |= OB_COLLISION; @@ -1539,17 +1544,17 @@ static void rna_def_object_game_settings(BlenderRNA *brna) RNA_def_property_range(prop, 0.0, 1000.0); RNA_def_property_ui_text(prop, "Velocity Max", "Clamp velocity to this maximum speed"); - prop= RNA_def_property(srna, "step_height", PROP_FLOAT, PROP_NONE); + prop = RNA_def_property(srna, "step_height", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "step_height"); RNA_def_property_range(prop, 0.0, 1.0); RNA_def_property_ui_text(prop, "Step Height", "Maximum height of steps the character can run over"); - prop= RNA_def_property(srna, "jump_speed", PROP_FLOAT, PROP_NONE); + prop = RNA_def_property(srna, "jump_speed", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "jump_speed"); RNA_def_property_range(prop, 0.0, 1000.0); RNA_def_property_ui_text(prop, "Jump Force", "Upward velocity applied to the character when jumping (with the Motion actuator)"); - prop= RNA_def_property(srna, "fall_speed", PROP_FLOAT, PROP_NONE); + prop = RNA_def_property(srna, "fall_speed", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "fall_speed"); RNA_def_property_range(prop, 0.0, 1000.0); RNA_def_property_ui_text(prop, "Fall Speed Max", "Maximum speed at which the character will fall"); @@ -1971,6 +1976,12 @@ static void rna_def_object(BlenderRNA *brna) RNA_def_property_flag(prop, PROP_LIB_EXCEPTION); RNA_def_property_update(prop, NC_OBJECT | ND_DRAW, "rna_Object_layer_update"); + prop = RNA_def_property(srna, "layers_local_view", PROP_BOOLEAN, PROP_LAYER_MEMBER); + RNA_def_property_boolean_sdna(prop, NULL, "lay", 0x01000000); + RNA_def_property_array(prop, 8); + RNA_def_property_clear_flag(prop, PROP_EDITABLE); + RNA_def_property_ui_text(prop, "Local View Layers", "3D local view layers the object is on"); + prop = RNA_def_property(srna, "select", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", SELECT); RNA_def_property_ui_text(prop, "Select", "Object selection state"); @@ -2308,7 +2319,7 @@ static void rna_def_object(BlenderRNA *brna) RNA_def_property_boolean_sdna(prop, NULL, "restrictflag", OB_RESTRICT_VIEW); RNA_def_property_ui_text(prop, "Restrict View", "Restrict visibility in the viewport"); RNA_def_property_ui_icon(prop, ICON_RESTRICT_VIEW_OFF, 1); - RNA_def_property_update(prop, NC_OBJECT | ND_DRAW, NULL); + RNA_def_property_update(prop, NC_OBJECT | ND_DRAW, "rna_Object_hide_update"); prop = RNA_def_property(srna, "hide_select", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "restrictflag", OB_RESTRICT_SELECT); @@ -2320,7 +2331,7 @@ static void rna_def_object(BlenderRNA *brna) RNA_def_property_boolean_sdna(prop, NULL, "restrictflag", OB_RESTRICT_RENDER); RNA_def_property_ui_text(prop, "Restrict Render", "Restrict renderability"); RNA_def_property_ui_icon(prop, ICON_RESTRICT_RENDER_OFF, 1); - RNA_def_property_update(prop, NC_OBJECT | ND_DRAW, NULL); + RNA_def_property_update(prop, NC_OBJECT | ND_DRAW, "rna_Object_hide_update"); /* anim */ rna_def_animdata_common(srna); @@ -2579,6 +2590,12 @@ static void rna_def_object_base(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Layers", "Layers the object base is on"); RNA_def_property_boolean_funcs(prop, NULL, "rna_Base_layer_set"); RNA_def_property_update(prop, NC_OBJECT | ND_DRAW, "rna_Base_layer_update"); + + prop = RNA_def_property(srna, "layers_local_view", PROP_BOOLEAN, PROP_LAYER_MEMBER); + RNA_def_property_boolean_sdna(prop, NULL, "lay", 0x01000000); + RNA_def_property_array(prop, 8); + RNA_def_property_clear_flag(prop, PROP_EDITABLE); + RNA_def_property_ui_text(prop, "Local View Layers", "3D local view layers the object base is on"); prop = RNA_def_property(srna, "select", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", BA_SELECT); diff --git a/source/blender/makesrna/intern/rna_pose.c b/source/blender/makesrna/intern/rna_pose.c index eaf1ae09524..bb8a29f8fe4 100644 --- a/source/blender/makesrna/intern/rna_pose.c +++ b/source/blender/makesrna/intern/rna_pose.c @@ -1118,8 +1118,8 @@ static void rna_def_pose_itasc(BlenderRNA *brna) {ITASC_INITIAL_REITERATION, "INITIAL", 0, "Initial", "The solver reiterates (converges) on the first frame but not on " "subsequent frame"}, - {ITASC_INITIAL_REITERATION|ITASC_REITERATION, "ALWAYS", 0, "Always", - "The solver reiterates (converges) on all frames"}, + {ITASC_INITIAL_REITERATION | ITASC_REITERATION, "ALWAYS", 0, "Always", + "The solver reiterates (converges) on all frames"}, {0, NULL, 0, NULL, NULL} }; diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c index f3454285682..550463a947a 100644 --- a/source/blender/makesrna/intern/rna_scene.c +++ b/source/blender/makesrna/intern/rna_scene.c @@ -137,6 +137,14 @@ EnumPropertyItem snap_element_items[] = { {0, NULL, 0, NULL, NULL} }; +EnumPropertyItem snap_node_element_items[] = { + {SCE_SNAP_MODE_INCREMENT, "INCREMENT", ICON_SNAP_INCREMENT, "Increment", "Snap to increments of grid"}, + {SCE_SNAP_MODE_NODE_X, "NODE_X", ICON_SNAP_EDGE, "Node X", "Snap to left/right node border"}, + {SCE_SNAP_MODE_NODE_Y, "NODE_Y", ICON_SNAP_EDGE, "Node Y", "Snap to top/bottom node border"}, + {SCE_SNAP_MODE_NODE_XY, "NODE_XY", ICON_SNAP_EDGE, "Node X / Y", "Snap to any node border"}, + {0, NULL, 0, NULL, NULL} +}; + /* workaround for duplice enums, * have each enum line as a defne then conditionally set it or not @@ -739,7 +747,7 @@ static void rna_ImageFormatSettings_file_format_set(PointerRNA *ptr, int value) } static EnumPropertyItem *rna_ImageFormatSettings_file_format_itemf(bContext *C, PointerRNA *ptr, - PropertyRNA *UNUSED(prop), int *free) + PropertyRNA *UNUSED(prop), int *UNUSED(free)) { ID *id = ptr->id.data; if (id && GS(id->name) == ID_SCE) { @@ -1673,6 +1681,13 @@ static void rna_def_tool_settings(BlenderRNA *brna) RNA_def_property_enum_items(prop, snap_element_items); RNA_def_property_ui_text(prop, "Snap Element", "Type of element to snap to"); RNA_def_property_update(prop, NC_SCENE | ND_TOOLSETTINGS, NULL); /* header redraw */ + + /* node editor uses own set of snap modes */ + prop = RNA_def_property(srna, "snap_node_element", PROP_ENUM, PROP_NONE); + RNA_def_property_enum_sdna(prop, NULL, "snap_node_mode"); + RNA_def_property_enum_items(prop, snap_node_element_items); + RNA_def_property_ui_text(prop, "Snap Node Element", "Type of element to snap to"); + RNA_def_property_update(prop, NC_SCENE | ND_TOOLSETTINGS, NULL); /* header redraw */ prop = RNA_def_property(srna, "snap_target", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "snap_target"); @@ -1698,7 +1713,7 @@ static void rna_def_tool_settings(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Project to Self", "Snap onto itself (editmode)"); RNA_def_property_ui_icon(prop, ICON_ORTHO, 0); RNA_def_property_update(prop, NC_SCENE | ND_TOOLSETTINGS, NULL); /* header redraw */ - + /* Grease Pencil */ prop = RNA_def_property(srna, "use_grease_pencil_sessions", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "gpencil_flags", GP_TOOL_FLAG_PAINTSESSIONS_ON); diff --git a/source/blender/makesrna/intern/rna_sensor.c b/source/blender/makesrna/intern/rna_sensor.c index cce0612bd68..00e8ed5289f 100644 --- a/source/blender/makesrna/intern/rna_sensor.c +++ b/source/blender/makesrna/intern/rna_sensor.c @@ -231,7 +231,7 @@ static void rna_Sensor_level_set(struct PointerRNA *ptr, int value) sens->tap = 0; } -static void rna_Sensor_Armature_update(Main *bmain, Scene *scene, PointerRNA *ptr) +static void rna_Sensor_Armature_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr) { bSensor *sens = (bSensor *)ptr->data; bArmatureSensor *as = sens->data; diff --git a/source/blender/makesrna/intern/rna_sequencer_api.c b/source/blender/makesrna/intern/rna_sequencer_api.c index 3a534cd22b4..6c54b7c2cf3 100644 --- a/source/blender/makesrna/intern/rna_sequencer_api.c +++ b/source/blender/makesrna/intern/rna_sequencer_api.c @@ -99,7 +99,7 @@ static Sequence *alloc_generic_sequence(Editing *ed, const char *name, int start return seq; } -static Sequence *rna_Sequences_new_clip(ID *id, Editing *ed, ReportList *reports, +static Sequence *rna_Sequences_new_clip(ID *id, Editing *ed, const char *name, MovieClip *clip, int channel, int start_frame) { @@ -118,7 +118,7 @@ static Sequence *rna_Sequences_new_clip(ID *id, Editing *ed, ReportList *reports return seq; } -static Sequence *rna_Sequences_new_mask(ID *id, Editing *ed, ReportList *reports, +static Sequence *rna_Sequences_new_mask(ID *id, Editing *ed, const char *name, Mask *mask, int channel, int start_frame) { @@ -137,7 +137,7 @@ static Sequence *rna_Sequences_new_mask(ID *id, Editing *ed, ReportList *reports return seq; } -static Sequence *rna_Sequences_new_scene(ID *id, Editing *ed, ReportList *reports, +static Sequence *rna_Sequences_new_scene(ID *id, Editing *ed, const char *name, Scene *sce_seq, int channel, int start_frame) { @@ -455,7 +455,7 @@ void RNA_api_sequences(BlenderRNA *brna, PropertyRNA *cprop) RNA_def_struct_ui_text(srna, "Sequences", "Collection of Sequences"); func = RNA_def_function(srna, "new_clip", "rna_Sequences_new_clip"); - RNA_def_function_flag(func, FUNC_USE_REPORTS | FUNC_USE_SELF_ID); + RNA_def_function_flag(func, FUNC_USE_SELF_ID); RNA_def_function_ui_description(func, "Add a new movie clip sequence"); parm = RNA_def_string(func, "name", "Name", 0, "", "New name for the sequence"); RNA_def_property_flag(parm, PROP_REQUIRED); @@ -472,7 +472,7 @@ void RNA_api_sequences(BlenderRNA *brna, PropertyRNA *cprop) RNA_def_function_return(func, parm); func = RNA_def_function(srna, "new_mask", "rna_Sequences_new_mask"); - RNA_def_function_flag(func, FUNC_USE_REPORTS | FUNC_USE_SELF_ID); + RNA_def_function_flag(func, FUNC_USE_SELF_ID); RNA_def_function_ui_description(func, "Add a new movie clip sequence"); parm = RNA_def_string(func, "name", "Name", 0, "", "New name for the sequence"); RNA_def_property_flag(parm, PROP_REQUIRED); @@ -489,7 +489,7 @@ void RNA_api_sequences(BlenderRNA *brna, PropertyRNA *cprop) RNA_def_function_return(func, parm); func = RNA_def_function(srna, "new_scene", "rna_Sequences_new_scene"); - RNA_def_function_flag(func, FUNC_USE_REPORTS | FUNC_USE_SELF_ID); + RNA_def_function_flag(func, FUNC_USE_SELF_ID); RNA_def_function_ui_description(func, "Add a new scene sequence"); parm = RNA_def_string(func, "name", "Name", 0, "", "New name for the sequence"); RNA_def_property_flag(parm, PROP_REQUIRED); diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c index 661c7ba878c..e4af06a5012 100644 --- a/source/blender/makesrna/intern/rna_space.c +++ b/source/blender/makesrna/intern/rna_space.c @@ -1699,6 +1699,12 @@ static void rna_def_space_view3d(BlenderRNA *brna) RNA_def_property_boolean_funcs(prop, NULL, "rna_SpaceView3D_layer_set"); RNA_def_property_ui_text(prop, "Visible Layers", "Layers visible in this 3D View"); RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, "rna_SpaceView3D_layer_update"); + + prop = RNA_def_property(srna, "layers_local_view", PROP_BOOLEAN, PROP_LAYER_MEMBER); + RNA_def_property_boolean_sdna(prop, NULL, "lay", 0x01000000); + RNA_def_property_array(prop, 8); + RNA_def_property_clear_flag(prop, PROP_EDITABLE); + RNA_def_property_ui_text(prop, "Local View Layers", "Local view layers visible in this 3D View"); prop = RNA_def_property(srna, "layers_used", PROP_BOOLEAN, PROP_LAYER_MEMBER); RNA_def_property_boolean_sdna(prop, NULL, "lay_used", 1); |