[Bf-blender-cvs] [3abb56792d4] lanpr-under-gp: Merge remote-tracking branch 'origin/master' into lanpr-under-gp
YimingWu
noreply at git.blender.org
Wed Jul 29 06:11:52 CEST 2020
Commit: 3abb56792d4fc8ddac711cda2d1e7ca000b4da61
Author: YimingWu
Date: Wed Jul 29 11:18:58 2020 +0800
Branches: lanpr-under-gp
https://developer.blender.org/rB3abb56792d4fc8ddac711cda2d1e7ca000b4da61
Merge remote-tracking branch 'origin/master' into lanpr-under-gp
# Conflicts:
# source/blender/editors/space_buttons/buttons_context.c
===================================================================
===================================================================
diff --cc source/blender/editors/space_buttons/buttons_context.c
index 6edd517ce06,9e5c630ec60..fb726dfb7d5
--- a/source/blender/editors/space_buttons/buttons_context.c
+++ b/source/blender/editors/space_buttons/buttons_context.c
@@@ -163,30 -163,7 +163,30 @@@ static int buttons_context_path_world(B
return 0;
}
+static int buttons_context_path_collection(ButsContextPath *path, wmWindow *window)
+{
+ PointerRNA *ptr = &path->ptr[path->len - 1];
+
+ /* if we already have a (pinned) collection, we're done */
+ if (RNA_struct_is_a(ptr->type, &RNA_Collection)) {
+ return 1;
+ }
+ /* if we have a view layer, use the view layer's active collection */
+ else if (buttons_context_path_view_layer(path, window)) {
+ ViewLayer *view_layer = path->ptr[path->len - 1].data;
+ Collection *c = view_layer->active_collection->collection;
+ if (c) {
+ RNA_id_pointer_create(&c->id, &path->ptr[path->len]);
+ path->len++;
+ return 1;
+ }
+ }
+
+ /* no path to a collection possible */
+ return 0;
+}
+
- static int buttons_context_path_linestyle(ButsContextPath *path, wmWindow *window)
+ static bool buttons_context_path_linestyle(ButsContextPath *path, wmWindow *window)
{
FreestyleLineStyle *linestyle;
PointerRNA *ptr = &path->ptr[path->len - 1];
More information about the Bf-blender-cvs
mailing list