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:
authorDalai Felinto <dfelinto@gmail.com>2017-02-12 22:43:06 +0300
committerDalai Felinto <dfelinto@gmail.com>2017-02-12 22:47:34 +0300
commitadf355849f5c68bf504ba435cc54872b2e2ee87a (patch)
treef625dea79bf5e5a04cd9f0b0cb1b035e10fa8167 /source/blender/editors/space_buttons/buttons_context.c
parentb104057d001d2472cc55c7fa51cff3275e331523 (diff)
Layers: Per-Collection edit mode settings
I didn't manage to get the proper object context in the collection properties editor. That said I got it working for now in a temporary way since this will change once we get workspaces anyways (see changes in buttons_context.c and rna_scene.c::rna_LayerCollection_mode_settings_get) I still need to handle the merging of the settings. I will find a provisory solution while we wait for depsgraph. (also layer_collection_create_mode_settings_object and layer_collection_create_mode_settings_edit could probably be elsewhere - under draw/engines likely)
Diffstat (limited to 'source/blender/editors/space_buttons/buttons_context.c')
-rw-r--r--source/blender/editors/space_buttons/buttons_context.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/source/blender/editors/space_buttons/buttons_context.c b/source/blender/editors/space_buttons/buttons_context.c
index f53d98a1b59..34213d3d565 100644
--- a/source/blender/editors/space_buttons/buttons_context.c
+++ b/source/blender/editors/space_buttons/buttons_context.c
@@ -571,6 +571,14 @@ static int buttons_context_path_collection(const bContext *C, ButsContextPath *p
if (sc) {
RNA_pointer_create(NULL, &RNA_LayerCollection, sc, &path->ptr[path->len]);
path->len++;
+
+ /* temporary object in context path to get edit mode */
+ Object *ob = CTX_data_active_object(C);
+ if (ob) {
+ RNA_id_pointer_create(&ob->id, &path->ptr[path->len]);
+ path->len++;
+ }
+
return 1;
}