diff options
author | Jacques Lucke <jacques@blender.org> | 2021-06-14 13:44:13 +0300 |
---|---|---|
committer | Jacques Lucke <jacques@blender.org> | 2021-06-14 13:44:13 +0300 |
commit | dddcf1e9bbf4a6d1f4ff03eaf0cb7e9228b18ec5 (patch) | |
tree | c20defa7efd54c933d20a296abefe567909bb6c0 /source/blender/makesrna/intern/rna_scene.c | |
parent | 3b162b7c185d089e93d892169a458d552196b7b6 (diff) | |
parent | c9dc55301cd7903b7ef7c045d337ada29aa809a1 (diff) |
Merge branch 'master' into temp-compact-node-prototypetemp-compact-node-prototype
Diffstat (limited to 'source/blender/makesrna/intern/rna_scene.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_scene.c | 35 |
1 files changed, 22 insertions, 13 deletions
diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c index 3344b8c286d..2ccc8fe949c 100644 --- a/source/blender/makesrna/intern/rna_scene.c +++ b/source/blender/makesrna/intern/rna_scene.c @@ -778,7 +778,6 @@ static void rna_Scene_objects_begin(CollectionPropertyIterator *iter, PointerRNA Scene *scene = (Scene *)ptr->data; iter->internal.custom = MEM_callocN(sizeof(BLI_Iterator), __func__); - ((BLI_Iterator *)iter->internal.custom)->valid = true; BKE_scene_objects_iterator_begin(iter->internal.custom, (void *)scene); iter->valid = ((BLI_Iterator *)iter->internal.custom)->valid; } @@ -1896,10 +1895,10 @@ static void rna_Scene_use_persistent_data_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr) { - Scene *sce = (Scene *)ptr->owner_id; + Scene *scene = (Scene *)ptr->owner_id; - if (!(sce->r.mode & R_PERSISTENT_DATA)) { - RE_FreePersistentData(); + if (!(scene->r.mode & R_PERSISTENT_DATA)) { + RE_FreePersistentData(scene); } } @@ -1913,10 +1912,9 @@ static void rna_Scene_transform_orientation_slots_begin(CollectionPropertyIterat iter, orient_slot, sizeof(*orient_slot), ARRAY_SIZE(scene->orientation_slots), 0, NULL); } -static int rna_Scene_transform_orientation_slots_length(PointerRNA *ptr) +static int rna_Scene_transform_orientation_slots_length(PointerRNA *UNUSED(ptr)) { - Scene *scene = (Scene *)ptr->owner_id; - return ARRAY_SIZE(scene->orientation_slots); + return ARRAY_SIZE(((Scene *)NULL)->orientation_slots); } static bool rna_Scene_use_audio_get(PointerRNA *ptr) @@ -2484,6 +2482,10 @@ const EnumPropertyItem *rna_TransformOrientation_itemf(bContext *C, PropertyRNA *UNUSED(prop), bool *r_free) { + if (C == NULL) { + return rna_enum_transform_orientation_items; + } + Scene *scene; if (ptr->owner_id && (GS(ptr->owner_id->name) == ID_SCE)) { scene = (Scene *)ptr->owner_id; @@ -2494,11 +2496,15 @@ const EnumPropertyItem *rna_TransformOrientation_itemf(bContext *C, return rna_TransformOrientation_impl_itemf(scene, false, r_free); } -const EnumPropertyItem *rna_TransformOrientation_with_scene_itemf(bContext *UNUSED(C), +const EnumPropertyItem *rna_TransformOrientation_with_scene_itemf(bContext *C, PointerRNA *ptr, PropertyRNA *UNUSED(prop), bool *r_free) { + if (C == NULL) { + return rna_enum_transform_orientation_items; + } + Scene *scene = (Scene *)ptr->owner_id; TransformOrientationSlot *orient_slot = ptr->data; bool include_default = (orient_slot != &scene->orientation_slots[SCE_ORIENT_DEFAULT]); @@ -2685,6 +2691,7 @@ static void rna_def_view3d_cursor(BlenderRNA *brna) RNA_def_struct_path_func(srna, "rna_View3DCursor_path"); RNA_def_struct_ui_text(srna, "3D Cursor", ""); RNA_def_struct_ui_icon(srna, ICON_CURSOR); + RNA_def_struct_clear_flag(srna, STRUCT_UNDO); prop = RNA_def_property(srna, "location", PROP_FLOAT, PROP_XYZ_LENGTH); RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); @@ -2855,7 +2862,7 @@ static void rna_def_tool_settings(BlenderRNA *brna) RNA_def_property_flag(prop, PROP_CONTEXT_UPDATE); RNA_def_property_boolean_sdna(prop, NULL, "auto_normalize", 1); RNA_def_property_ui_text(prop, - "WPaint Auto-Normalize", + "Weight Paint Auto-Normalize", "Ensure all bone-deforming vertex groups add up " "to 1.0 while weight painting"); RNA_def_property_update(prop, 0, "rna_Scene_update_active_object_data"); @@ -2864,7 +2871,7 @@ static void rna_def_tool_settings(BlenderRNA *brna) RNA_def_property_flag(prop, PROP_CONTEXT_UPDATE); RNA_def_property_boolean_sdna(prop, NULL, "wpaint_lock_relative", 1); RNA_def_property_ui_text(prop, - "WPaint Lock-Relative", + "Weight Paint Lock-Relative", "Display bone-deforming groups as if all locked deform groups " "were deleted, and the remaining ones were re-normalized"); RNA_def_property_update(prop, 0, "rna_Scene_update_active_object_data"); @@ -2873,7 +2880,7 @@ static void rna_def_tool_settings(BlenderRNA *brna) RNA_def_property_flag(prop, PROP_CONTEXT_UPDATE); RNA_def_property_boolean_sdna(prop, NULL, "multipaint", 1); RNA_def_property_ui_text(prop, - "WPaint Multi-Paint", + "Weight Paint Multi-Paint", "Paint across the weights of all selected bones, " "maintaining their relative influence"); RNA_def_property_update(prop, 0, "rna_Scene_update_active_object_data"); @@ -6605,8 +6612,10 @@ static void rna_def_scene_render_data(BlenderRNA *brna) /* persistent data */ prop = RNA_def_property(srna, "use_persistent_data", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "mode", R_PERSISTENT_DATA); - RNA_def_property_ui_text( - prop, "Persistent Data", "Keep render data around for faster re-renders"); + RNA_def_property_ui_text(prop, + "Persistent Data", + "Keep render data around for faster re-renders and animation renders, " + "at the cost of increased memory usage"); RNA_def_property_update(prop, 0, "rna_Scene_use_persistent_data_update"); /* Freestyle line thickness options */ |