Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2019-03-05 04:51:05 +0300
committerCampbell Barton <ideasman42@gmail.com>2019-03-05 04:59:46 +0300
commit51e743c7fa0f0bddac45066bc162b5ca99586031 (patch)
treebe70bc027da449175aca30fe47c11f3a71063f33 /source/blender/makesrna/intern/rna_screen.c
parent1df6a98b176f8023a26c8cd5c9680ff0b37aa0d0 (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.
Diffstat (limited to 'source/blender/makesrna/intern/rna_screen.c')
-rw-r--r--source/blender/makesrna/intern/rna_screen.c1
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);