diff options
Diffstat (limited to 'source/blender/makesrna')
-rw-r--r-- | source/blender/makesrna/RNA_access.h | 10 | ||||
-rw-r--r-- | source/blender/makesrna/intern/makesrna.c | 2 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_ID.c | 13 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_access_compare_override.c | 20 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_brush.c | 6 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_layer.c | 15 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_main_api.c | 2 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_pose.c | 3 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_rna.c | 76 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_scene_api.c | 2 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_userdef.c | 8 |
11 files changed, 83 insertions, 74 deletions
diff --git a/source/blender/makesrna/RNA_access.h b/source/blender/makesrna/RNA_access.h index e9c9b7e2815..54a2abdfa8c 100644 --- a/source/blender/makesrna/RNA_access.h +++ b/source/blender/makesrna/RNA_access.h @@ -260,7 +260,11 @@ extern StructRNA RNA_FileBrowserFSMenuEntry; extern StructRNA RNA_FileSelectParams; extern StructRNA RNA_FloatProperty; extern StructRNA RNA_FloorConstraint; +extern StructRNA RNA_FluidDomainSettings; +extern StructRNA RNA_FluidEffectorSettings; +extern StructRNA RNA_FluidFlowSettings; extern StructRNA RNA_FluidFluidSettings; +extern StructRNA RNA_FluidModifier; extern StructRNA RNA_FluidSettings; extern StructRNA RNA_FollowPathConstraint; extern StructRNA RNA_FreestyleLineSet; @@ -595,10 +599,6 @@ extern StructRNA RNA_ShrinkwrapModifier; extern StructRNA RNA_SimpleDeformModifier; extern StructRNA RNA_SimplifyGpencilModifier; extern StructRNA RNA_SkinModifier; -extern StructRNA RNA_FluidEffectorSettings; -extern StructRNA RNA_FluidDomainSettings; -extern StructRNA RNA_FluidFlowSettings; -extern StructRNA RNA_FluidModifier; extern StructRNA RNA_SmoothGpencilModifier; extern StructRNA RNA_SmoothModifier; extern StructRNA RNA_SoftBodyModifier; @@ -736,11 +736,11 @@ extern StructRNA RNA_WalkNavigation; extern StructRNA RNA_WarpModifier; extern StructRNA RNA_WaveModifier; extern StructRNA RNA_WeightedNormalModifier; +extern StructRNA RNA_WeldModifier; extern StructRNA RNA_Window; extern StructRNA RNA_WindowManager; extern StructRNA RNA_WipeSequence; extern StructRNA RNA_WireframeModifier; -extern StructRNA RNA_WeldModifier; extern StructRNA RNA_WoodTexture; extern StructRNA RNA_WorkSpace; extern StructRNA RNA_World; diff --git a/source/blender/makesrna/intern/makesrna.c b/source/blender/makesrna/intern/makesrna.c index 9b38ca8009c..2f5d9ae7a50 100644 --- a/source/blender/makesrna/intern/makesrna.c +++ b/source/blender/makesrna/intern/makesrna.c @@ -4309,7 +4309,7 @@ static void rna_generate(BlenderRNA *brna, FILE *f, const char *filename, const fprintf(f, "#include \"BLI_utildefines.h\"\n\n"); fprintf(f, "#include \"BKE_context.h\"\n"); - fprintf(f, "#include \"BKE_library.h\"\n"); + fprintf(f, "#include \"BKE_lib_id.h\"\n"); fprintf(f, "#include \"BKE_main.h\"\n"); fprintf(f, "#include \"BKE_report.h\"\n"); diff --git a/source/blender/makesrna/intern/rna_ID.c b/source/blender/makesrna/intern/rna_ID.c index 0b4ac400152..12fa8150d5f 100644 --- a/source/blender/makesrna/intern/rna_ID.c +++ b/source/blender/makesrna/intern/rna_ID.c @@ -29,7 +29,7 @@ #include "BLI_utildefines.h" #include "BKE_icons.h" -#include "BKE_library.h" +#include "BKE_lib_id.h" #include "BKE_object.h" #include "RNA_access.h" @@ -90,9 +90,10 @@ const EnumPropertyItem rna_enum_id_type_items[] = { # include "BKE_font.h" # include "BKE_idprop.h" -# include "BKE_library_query.h" -# include "BKE_library_override.h" -# include "BKE_library_remap.h" +# include "BKE_lib_query.h" +# include "BKE_lib_override.h" +# include "BKE_lib_remap.h" +# include "BKE_library.h" # include "BKE_animsys.h" # include "BKE_material.h" # include "BKE_global.h" /* XXX, remove me */ @@ -493,7 +494,7 @@ static ID *rna_ID_copy(ID *id, Main *bmain) static ID *rna_ID_override_create(ID *id, Main *bmain, bool remap_local_usages) { - if (!BKE_override_library_is_enabled() || !ID_IS_OVERRIDABLE_LIBRARY(id)) { + if (!BKE_lib_override_library_is_enabled() || !ID_IS_OVERRIDABLE_LIBRARY(id)) { return NULL; } @@ -501,7 +502,7 @@ static ID *rna_ID_override_create(ID *id, Main *bmain, bool remap_local_usages) BKE_main_id_tag_all(bmain, LIB_TAG_DOIT, true); } - ID *local_id = BKE_override_library_create_from_id(bmain, id, remap_local_usages); + ID *local_id = BKE_lib_override_library_create_from_id(bmain, id, remap_local_usages); if (remap_local_usages) { BKE_main_id_tag_all(bmain, LIB_TAG_DOIT, false); diff --git a/source/blender/makesrna/intern/rna_access_compare_override.c b/source/blender/makesrna/intern/rna_access_compare_override.c index 7c9b4254e4d..053a0765546 100644 --- a/source/blender/makesrna/intern/rna_access_compare_override.c +++ b/source/blender/makesrna/intern/rna_access_compare_override.c @@ -34,7 +34,7 @@ #endif #include "BKE_idprop.h" -#include "BKE_library_override.h" +#include "BKE_lib_override.h" #include "BKE_main.h" #include "RNA_access.h" @@ -109,7 +109,7 @@ bool RNA_property_overridden(PointerRNA *ptr, PropertyRNA *prop) return false; } - return (BKE_override_library_property_find(id->override_library, rna_path) != NULL); + return (BKE_lib_override_library_property_find(id->override_library, rna_path) != NULL); } bool RNA_property_comparable(PointerRNA *UNUSED(ptr), PropertyRNA *prop) @@ -691,7 +691,7 @@ bool RNA_struct_override_matches(Main *bmain, // printf("Override Checking %s\n", rna_path); - if (ignore_overridden && BKE_override_library_property_find(override, rna_path) != NULL) { + if (ignore_overridden && BKE_lib_override_library_property_find(override, rna_path) != NULL) { RNA_PATH_FREE; continue; } @@ -730,7 +730,7 @@ bool RNA_struct_override_matches(Main *bmain, if (diff != 0) { /* XXX TODO: refine this for per-item overriding of arrays... */ - IDOverrideLibraryProperty *op = BKE_override_library_property_find(override, rna_path); + IDOverrideLibraryProperty *op = BKE_lib_override_library_property_find(override, rna_path); IDOverrideLibraryPropertyOperation *opop = op ? op->operations.first : NULL; if (do_restore && (report_flags & RNA_OVERRIDE_MATCH_RESULT_CREATED) == 0) { @@ -1059,8 +1059,8 @@ IDOverrideLibraryProperty *RNA_property_override_property_find(PointerRNA *ptr, char *rna_path = RNA_path_from_ID_to_property(ptr, prop); if (rna_path) { - IDOverrideLibraryProperty *op = BKE_override_library_property_find(id->override_library, - rna_path); + IDOverrideLibraryProperty *op = BKE_lib_override_library_property_find(id->override_library, + rna_path); MEM_freeN(rna_path); return op; } @@ -1079,7 +1079,7 @@ IDOverrideLibraryProperty *RNA_property_override_property_get(PointerRNA *ptr, char *rna_path = RNA_path_from_ID_to_property(ptr, prop); if (rna_path) { - IDOverrideLibraryProperty *op = BKE_override_library_property_get( + IDOverrideLibraryProperty *op = BKE_lib_override_library_property_get( id->override_library, rna_path, r_created); MEM_freeN(rna_path); return op; @@ -1096,7 +1096,7 @@ IDOverrideLibraryPropertyOperation *RNA_property_override_property_operation_fin return NULL; } - return BKE_override_library_property_operation_find( + return BKE_lib_override_library_property_operation_find( op, NULL, NULL, index, index, strict, r_strict); } @@ -1115,7 +1115,7 @@ IDOverrideLibraryPropertyOperation *RNA_property_override_property_operation_get return NULL; } - return BKE_override_library_property_operation_get( + return BKE_lib_override_library_property_operation_get( op, operation, NULL, NULL, index, index, strict, r_strict, r_created); } @@ -1125,7 +1125,7 @@ eRNAOverrideStatus RNA_property_override_library_status(PointerRNA *ptr, { int override_status = 0; - if (!BKE_override_library_is_enabled()) { + if (!BKE_lib_override_library_is_enabled()) { return override_status; } diff --git a/source/blender/makesrna/intern/rna_brush.c b/source/blender/makesrna/intern/rna_brush.c index edbaa13f80c..3c9942f32c7 100644 --- a/source/blender/makesrna/intern/rna_brush.c +++ b/source/blender/makesrna/intern/rna_brush.c @@ -151,7 +151,11 @@ const EnumPropertyItem rna_enum_brush_gpencil_types_items[] = { #ifndef RNA_RUNTIME static EnumPropertyItem rna_enum_gpencil_brush_eraser_modes_items[] = { - {GP_BRUSH_ERASER_SOFT, "SOFT", 0, "Dissolve,", "Erase strokes, fading their points strength and thickness"}, + {GP_BRUSH_ERASER_SOFT, + "SOFT", + 0, + "Dissolve,", + "Erase strokes, fading their points strength and thickness"}, {GP_BRUSH_ERASER_HARD, "HARD", 0, "Point", "Erase stroke points"}, {GP_BRUSH_ERASER_STROKE, "STROKE", 0, "Stroke", "Erase entire strokes"}, {0, NULL, 0, NULL, NULL}, diff --git a/source/blender/makesrna/intern/rna_layer.c b/source/blender/makesrna/intern/rna_layer.c index 40c6229f9b1..da882959ef2 100644 --- a/source/blender/makesrna/intern/rna_layer.c +++ b/source/blender/makesrna/intern/rna_layer.c @@ -88,11 +88,22 @@ static PointerRNA rna_LayerObjects_active_object_get(PointerRNA *ptr) static void rna_LayerObjects_active_object_set(PointerRNA *ptr, PointerRNA value, - struct ReportList *UNUSED(reports)) + struct ReportList *reports) { ViewLayer *view_layer = (ViewLayer *)ptr->data; if (value.data) { - view_layer->basact = BKE_view_layer_base_find(view_layer, (Object *)value.data); + Object *ob = value.data; + Base *basact_test = BKE_view_layer_base_find(view_layer, ob); + if (basact_test != NULL) { + view_layer->basact = basact_test; + } + else { + BKE_reportf(reports, + RPT_ERROR, + "ViewLayer '%s' does not contain object '%s'", + view_layer->name, + ob->id.name + 2); + } } else { view_layer->basact = NULL; diff --git a/source/blender/makesrna/intern/rna_main_api.c b/source/blender/makesrna/intern/rna_main_api.c index 31e696534fe..bb851365997 100644 --- a/source/blender/makesrna/intern/rna_main_api.c +++ b/source/blender/makesrna/intern/rna_main_api.c @@ -54,7 +54,7 @@ # include "BKE_image.h" # include "BKE_light.h" # include "BKE_lattice.h" -# include "BKE_library_remap.h" +# include "BKE_lib_remap.h" # include "BKE_lightprobe.h" # include "BKE_linestyle.h" # include "BKE_mask.h" diff --git a/source/blender/makesrna/intern/rna_pose.c b/source/blender/makesrna/intern/rna_pose.c index 85c4352d277..c6175f85bd8 100644 --- a/source/blender/makesrna/intern/rna_pose.c +++ b/source/blender/makesrna/intern/rna_pose.c @@ -1313,7 +1313,8 @@ static void rna_def_pose_channel(BlenderRNA *brna) prop = RNA_def_property(srna, "use_custom_shape_bone_size", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_negative_sdna(prop, NULL, "drawflag", PCHAN_DRAW_NO_CUSTOM_BONE_SIZE); - RNA_def_property_ui_text(prop, "Use Bone Size", "Scale the custom object by the bone length"); + RNA_def_property_ui_text( + prop, "Scale to Bone Length", "Scale the custom object by the bone length"); RNA_def_property_update(prop, NC_OBJECT | ND_POSE, "rna_Pose_update"); prop = RNA_def_property(srna, "custom_shape_transform", PROP_POINTER, PROP_NONE); diff --git a/source/blender/makesrna/intern/rna_rna.c b/source/blender/makesrna/intern/rna_rna.c index 4db702b215f..484fac18c8e 100644 --- a/source/blender/makesrna/intern/rna_rna.c +++ b/source/blender/makesrna/intern/rna_rna.c @@ -127,7 +127,7 @@ const EnumPropertyItem rna_enum_property_unit_items[] = { # include "BLI_ghash.h" # include "BLI_string.h" -# include "BKE_library_override.h" +# include "BKE_lib_override.h" /* Struct */ @@ -1290,21 +1290,21 @@ static int rna_property_override_diff_propptr(Main *bmain, if (do_create && comp != 0) { bool created = false; - IDOverrideLibraryProperty *op = BKE_override_library_property_get( + IDOverrideLibraryProperty *op = BKE_lib_override_library_property_get( override, rna_path, &created); /* If not yet overridden, or if we are handling sub-items (inside a collection)... */ if (op != NULL && (created || rna_itemname_a != NULL || rna_itemname_b != NULL || rna_itemindex_a != -1 || rna_itemindex_b != -1)) { - BKE_override_library_property_operation_get(op, - IDOVERRIDE_LIBRARY_OP_REPLACE, - rna_itemname_b, - rna_itemname_a, - rna_itemindex_b, - rna_itemindex_a, - true, - NULL, - &created); + BKE_lib_override_library_property_operation_get(op, + IDOVERRIDE_LIBRARY_OP_REPLACE, + rna_itemname_b, + rna_itemname_a, + rna_itemindex_b, + rna_itemindex_a, + true, + NULL, + &created); if (r_override_changed) { *r_override_changed = created; } @@ -1421,11 +1421,11 @@ int rna_property_override_diff_default(Main *bmain, if (do_create && comp != 0) { /* XXX TODO this will have to be refined to handle array items */ bool created = false; - IDOverrideLibraryProperty *op = BKE_override_library_property_get( + IDOverrideLibraryProperty *op = BKE_lib_override_library_property_get( override, rna_path, &created); if (op != NULL && created) { - BKE_override_library_property_operation_get( + BKE_lib_override_library_property_operation_get( op, IDOVERRIDE_LIBRARY_OP_REPLACE, NULL, NULL, -1, -1, true, NULL, NULL); if (r_override_changed) { *r_override_changed = created; @@ -1452,11 +1452,11 @@ int rna_property_override_diff_default(Main *bmain, if (do_create && comp != 0) { bool created = false; - IDOverrideLibraryProperty *op = BKE_override_library_property_get( + IDOverrideLibraryProperty *op = BKE_lib_override_library_property_get( override, rna_path, &created); if (op != NULL && created) { /* If not yet overridden... */ - BKE_override_library_property_operation_get( + BKE_lib_override_library_property_operation_get( op, IDOVERRIDE_LIBRARY_OP_REPLACE, NULL, NULL, -1, -1, true, NULL, NULL); if (r_override_changed) { *r_override_changed = created; @@ -1486,11 +1486,11 @@ int rna_property_override_diff_default(Main *bmain, if (do_create && comp != 0) { /* XXX TODO this will have to be refined to handle array items */ bool created = false; - IDOverrideLibraryProperty *op = BKE_override_library_property_get( + IDOverrideLibraryProperty *op = BKE_lib_override_library_property_get( override, rna_path, &created); if (op != NULL && created) { - BKE_override_library_property_operation_get( + BKE_lib_override_library_property_operation_get( op, IDOVERRIDE_LIBRARY_OP_REPLACE, NULL, NULL, -1, -1, true, NULL, NULL); if (r_override_changed) { *r_override_changed = created; @@ -1517,11 +1517,11 @@ int rna_property_override_diff_default(Main *bmain, if (do_create && comp != 0) { bool created = false; - IDOverrideLibraryProperty *op = BKE_override_library_property_get( + IDOverrideLibraryProperty *op = BKE_lib_override_library_property_get( override, rna_path, &created); if (op != NULL && created) { /* If not yet overridden... */ - BKE_override_library_property_operation_get( + BKE_lib_override_library_property_operation_get( op, IDOVERRIDE_LIBRARY_OP_REPLACE, NULL, NULL, -1, -1, true, NULL, NULL); if (r_override_changed) { *r_override_changed = created; @@ -1551,11 +1551,11 @@ int rna_property_override_diff_default(Main *bmain, if (do_create && comp != 0) { /* XXX TODO this will have to be refined to handle array items */ bool created = false; - IDOverrideLibraryProperty *op = BKE_override_library_property_get( + IDOverrideLibraryProperty *op = BKE_lib_override_library_property_get( override, rna_path, &created); if (op != NULL && created) { - BKE_override_library_property_operation_get( + BKE_lib_override_library_property_operation_get( op, IDOVERRIDE_LIBRARY_OP_REPLACE, NULL, NULL, -1, -1, true, NULL, NULL); if (r_override_changed) { *r_override_changed = created; @@ -1582,11 +1582,11 @@ int rna_property_override_diff_default(Main *bmain, if (do_create && comp != 0) { bool created = false; - IDOverrideLibraryProperty *op = BKE_override_library_property_get( + IDOverrideLibraryProperty *op = BKE_lib_override_library_property_get( override, rna_path, &created); if (op != NULL && created) { /* If not yet overridden... */ - BKE_override_library_property_operation_get( + BKE_lib_override_library_property_operation_get( op, IDOVERRIDE_LIBRARY_OP_REPLACE, NULL, NULL, -1, -1, true, NULL, NULL); if (r_override_changed) { *r_override_changed = created; @@ -1605,11 +1605,11 @@ int rna_property_override_diff_default(Main *bmain, if (do_create && comp != 0) { bool created = false; - IDOverrideLibraryProperty *op = BKE_override_library_property_get( + IDOverrideLibraryProperty *op = BKE_lib_override_library_property_get( override, rna_path, &created); if (op != NULL && created) { /* If not yet overridden... */ - BKE_override_library_property_operation_get( + BKE_lib_override_library_property_operation_get( op, IDOVERRIDE_LIBRARY_OP_REPLACE, NULL, NULL, -1, -1, true, NULL, NULL); if (r_override_changed) { *r_override_changed = created; @@ -1639,11 +1639,11 @@ int rna_property_override_diff_default(Main *bmain, if (do_create && comp != 0) { bool created = false; - IDOverrideLibraryProperty *op = BKE_override_library_property_get( + IDOverrideLibraryProperty *op = BKE_lib_override_library_property_get( override, rna_path, &created); if (op != NULL && created) { /* If not yet overridden... */ - BKE_override_library_property_operation_get( + BKE_lib_override_library_property_operation_get( op, IDOVERRIDE_LIBRARY_OP_REPLACE, NULL, NULL, -1, -1, true, NULL, NULL); if (r_override_changed) { *r_override_changed = created; @@ -1794,7 +1794,7 @@ int rna_property_override_diff_default(Main *bmain, * also assume then that _a data is the one where things are inserted. */ if (is_valid_for_insertion && use_insertion) { bool created; - IDOverrideLibraryProperty *op = BKE_override_library_property_get( + IDOverrideLibraryProperty *op = BKE_lib_override_library_property_get( override, rna_path, &created); if (is_first_insert) { @@ -1806,22 +1806,22 @@ int rna_property_override_diff_default(Main *bmain, if (ELEM(opop->operation, IDOVERRIDE_LIBRARY_OP_INSERT_AFTER, IDOVERRIDE_LIBRARY_OP_INSERT_BEFORE)) { - BKE_override_library_property_operation_delete(op, opop); + BKE_lib_override_library_property_operation_delete(op, opop); } opop = opop_next; } is_first_insert = false; } - BKE_override_library_property_operation_get(op, - IDOVERRIDE_LIBRARY_OP_INSERT_AFTER, - NULL, - prev_propname_a, - -1, - idx_a - 1, - true, - NULL, - NULL); + BKE_lib_override_library_property_operation_get(op, + IDOVERRIDE_LIBRARY_OP_INSERT_AFTER, + NULL, + prev_propname_a, + -1, + idx_a - 1, + true, + NULL, + NULL); # if 0 printf("%s: Adding insertion op override after '%s'/%d\n", rna_path, diff --git a/source/blender/makesrna/intern/rna_scene_api.c b/source/blender/makesrna/intern/rna_scene_api.c index 3562569acec..ee697955ad4 100644 --- a/source/blender/makesrna/intern/rna_scene_api.c +++ b/source/blender/makesrna/intern/rna_scene_api.c @@ -365,7 +365,7 @@ void RNA_api_scene(StructRNA *srna) RNA_def_function_ui_description(func, "Clear sequence editor in this scene"); # ifdef WITH_ALEMBIC - /* XXX Deprecated, will be removed in 2.8 in favour of calling the export operator. */ + /* XXX Deprecated, will be removed in 2.8 in favor of calling the export operator. */ func = RNA_def_function(srna, "alembic_export", "rna_Scene_alembic_export"); RNA_def_function_ui_description( func, "Export to Alembic file (deprecated, use the Alembic export operator)"); diff --git a/source/blender/makesrna/intern/rna_userdef.c b/source/blender/makesrna/intern/rna_userdef.c index b9fb8638c49..43a9bbd2e36 100644 --- a/source/blender/makesrna/intern/rna_userdef.c +++ b/source/blender/makesrna/intern/rna_userdef.c @@ -5074,14 +5074,6 @@ static void rna_def_userdef_system(BlenderRNA *brna) /* Memory */ - prop = RNA_def_property(srna, "prefetch_frames", PROP_INT, PROP_NONE); - RNA_def_property_int_sdna(prop, NULL, "prefetchframes"); - RNA_def_property_range(prop, 0, INT_MAX); - RNA_def_property_ui_range(prop, 0, 500, 1, -1); - RNA_def_property_ui_text(prop, - "Prefetch Frames", - "Number of frames to render ahead during playback (sequencer only)"); - prop = RNA_def_property(srna, "memory_cache_limit", PROP_INT, PROP_NONE); RNA_def_property_int_sdna(prop, NULL, "memcachelimit"); RNA_def_property_range(prop, 0, max_memory_in_megabytes_int()); |