diff options
author | Campbell Barton <ideasman42@gmail.com> | 2019-03-05 04:51:05 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2019-03-05 04:59:46 +0300 |
commit | 51e743c7fa0f0bddac45066bc162b5ca99586031 (patch) | |
tree | be70bc027da449175aca30fe47c11f3a71063f33 | |
parent | 1df6a98b176f8023a26c8cd5c9680ff0b37aa0d0 (diff) |
Fix T62199: Incorrect bpy.data.screens behavior
The screen identifier was set to the "layout_name" which isn't
guaranteed to be unique or even exist.
This meant `bpy.data.screens.keys()` could have duplicate keys,
even when not duplicated, these keys couldn't be used for
`bpy.data.screen[key]` access because internally ID's use names for
collection look-ups.
Make screens match other ID's, using the ID.name as the identifier.
Note: this change was from the initial workspace commit 7f564d74f9edaaa
Since then the layout selector has been removed so this isn't needed.
-rw-r--r-- | source/blender/makesrna/intern/rna_screen.c | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/source/blender/makesrna/intern/rna_screen.c b/source/blender/makesrna/intern/rna_screen.c index 0f40c6adb51..095aab53c10 100644 --- a/source/blender/makesrna/intern/rna_screen.c +++ b/source/blender/makesrna/intern/rna_screen.c @@ -524,7 +524,6 @@ static void rna_def_screen(BlenderRNA *brna) RNA_def_property_string_funcs(prop, "rna_Screen_layout_name_get", "rna_Screen_layout_name_length", "rna_Screen_layout_name_set"); RNA_def_property_ui_text(prop, "Layout Name", "The name of the layout that refers to the screen"); - RNA_def_struct_name_property(srna, prop); /* collections */ prop = RNA_def_property(srna, "areas", PROP_COLLECTION, PROP_NONE); |