diff options
author | Campbell Barton <campbell@blender.org> | 2022-11-08 09:00:46 +0300 |
---|---|---|
committer | Campbell Barton <campbell@blender.org> | 2022-11-08 09:00:46 +0300 |
commit | 8b151982fe6b9e9ed698282d4f1ab625de87c175 (patch) | |
tree | 2400bce9909015e063f58d67618d1e3ce9a8f3dc | |
parent | fddcdcc20c5a2b761a2becccc0a07f5fd8d43e54 (diff) | |
parent | 642ff82f749dc480875e2047eb5e9a9227f59093 (diff) |
Merge branch 'blender-v3.4-release'
-rw-r--r-- | release/scripts/modules/rna_info.py | 6 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/displist.cc | 3 | ||||
-rw-r--r-- | source/blender/editors/object/object_remesh.cc | 2 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_color.c | 9 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_nodetree.c | 9 | ||||
-rw-r--r-- | source/blender/modifiers/intern/MOD_ui_common.c | 3 |
6 files changed, 12 insertions, 20 deletions
diff --git a/release/scripts/modules/rna_info.py b/release/scripts/modules/rna_info.py index e2bbc4077a1..07daf7c55eb 100644 --- a/release/scripts/modules/rna_info.py +++ b/release/scripts/modules/rna_info.py @@ -286,7 +286,10 @@ class InfoPropertyRNA: self.enum_pointer = 0 if self.type == "enum": - items = tuple(rna_prop.enum_items) + # WARNING: don't convert to a tuple as this causes dynamically allocated enums to access freed memory + # since freeing the iterator may free the memory used to store the internal `EnumPropertyItem` array. + # To support this properly RNA would have to support owning the dynamically allocated memory. + items = rna_prop.enum_items items_static = tuple(rna_prop.enum_items_static) self.enum_items[:] = [(item.identifier, item.name, item.description) for item in items] self.is_enum_flag = rna_prop.is_enum_flag @@ -295,6 +298,7 @@ class InfoPropertyRNA: item = (items_static or items) if item: self.enum_pointer = item[0].as_pointer() + del items, items_static, item else: self.is_enum_flag = False diff --git a/source/blender/blenkernel/intern/displist.cc b/source/blender/blenkernel/intern/displist.cc index f8117a89198..2e285170b93 100644 --- a/source/blender/blenkernel/intern/displist.cc +++ b/source/blender/blenkernel/intern/displist.cc @@ -533,7 +533,8 @@ static ModifierData *curve_get_tessellate_point(const Scene *scene, } if (md->type == eModifierType_Smooth) { - /* Smooth modifier works with mesh edges explicitly (so needs tesselation, thus cannnot work on control points). */ + /* Smooth modifier works with mesh edges explicitly + * (so needs tessellation, thus cannot work on control points). */ md->mode &= ~eModifierMode_ApplyOnSpline; return pretessellatePoint; } diff --git a/source/blender/editors/object/object_remesh.cc b/source/blender/editors/object/object_remesh.cc index a50fb28805e..b9acf5ae27b 100644 --- a/source/blender/editors/object/object_remesh.cc +++ b/source/blender/editors/object/object_remesh.cc @@ -286,7 +286,7 @@ static void voxel_size_parallel_lines_draw(uint pos3d, immEnd(); } -static void voxel_size_edit_draw(const bContext *C, ARegion * /*ar*/, void *arg) +static void voxel_size_edit_draw(const bContext *C, ARegion * /*region*/, void *arg) { VoxelSizeEditCustomData *cd = static_cast<VoxelSizeEditCustomData *>(arg); diff --git a/source/blender/makesrna/intern/rna_color.c b/source/blender/makesrna/intern/rna_color.c index fe4d51bafb9..2ba82da09bb 100644 --- a/source/blender/makesrna/intern/rna_color.c +++ b/source/blender/makesrna/intern/rna_color.c @@ -577,15 +577,8 @@ static void rna_ColorManagedColorspaceSettings_colorspace_set(struct PointerRNA } static const EnumPropertyItem *rna_ColorManagedColorspaceSettings_colorspace_itemf( - bContext *C, PointerRNA *UNUSED(ptr), PropertyRNA *UNUSED(prop), bool *r_free) + bContext *UNUSED(C), PointerRNA *UNUSED(ptr), PropertyRNA *UNUSED(prop), bool *r_free) { -# if 0 /* FIXME: Causes blank drop-down, see T102316. */ - if (C == NULL) { - return rna_enum_color_space_convert_default_items; - } -# else - UNUSED_VARS(C); -# endif EnumPropertyItem *items = NULL; int totitem = 0; diff --git a/source/blender/makesrna/intern/rna_nodetree.c b/source/blender/makesrna/intern/rna_nodetree.c index 9dc940059dd..cfec020c739 100644 --- a/source/blender/makesrna/intern/rna_nodetree.c +++ b/source/blender/makesrna/intern/rna_nodetree.c @@ -4512,15 +4512,8 @@ static void rna_NodeConvertColorSpace_to_color_space_set(struct PointerRNA *ptr, } static const EnumPropertyItem *rna_NodeConvertColorSpace_color_space_itemf( - bContext *C, PointerRNA *UNUSED(ptr), PropertyRNA *UNUSED(prop), bool *r_free) + bContext *UNUSED(C), PointerRNA *UNUSED(ptr), PropertyRNA *UNUSED(prop), bool *r_free) { -# if 0 /* FIXME: Causes blank drop-down, see T102316. */ - if (C == NULL) { - return rna_enum_color_space_convert_default_items; - } -# else - UNUSED_VARS(C); -# endif EnumPropertyItem *items = NULL; int totitem = 0; diff --git a/source/blender/modifiers/intern/MOD_ui_common.c b/source/blender/modifiers/intern/MOD_ui_common.c index e882435077a..0f6c40610a0 100644 --- a/source/blender/modifiers/intern/MOD_ui_common.c +++ b/source/blender/modifiers/intern/MOD_ui_common.c @@ -352,7 +352,8 @@ static void modifier_panel_header(const bContext *C, Panel *panel) buttons_number++; } /* Some modifiers can work with pre-tessellated curves only. */ - else if (ELEM(md->type, eModifierType_Hook, eModifierType_Softbody, eModifierType_MeshDeform)) { + else if (ELEM( + md->type, eModifierType_Hook, eModifierType_Softbody, eModifierType_MeshDeform)) { /* Add button (appearing to be ON) and add tip why this can't be changed. */ sub = uiLayoutRow(row, true); uiBlock *block = uiLayoutGetBlock(sub); |