diff options
author | Campbell Barton <ideasman42@gmail.com> | 2020-02-19 07:06:14 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2020-02-19 07:07:32 +0300 |
commit | 3afe218a7d71ce4bb5d9b661bc966e8c99541184 (patch) | |
tree | 4834aea5f3a08fac6aba2debbf491992ccfa414e /source/blender/editors/object/object_select.c | |
parent | 9f8dd4f9e5c0a397485262ec815a88de4fa6cee4 (diff) |
Cleanup: assign Main, use existing assignments
Avoid accessing inline since it's often used multiple times.
In some cases it was already defined.
Diffstat (limited to 'source/blender/editors/object/object_select.c')
-rw-r--r-- | source/blender/editors/object/object_select.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/source/blender/editors/object/object_select.c b/source/blender/editors/object/object_select.c index 43e46f6bef2..29b2ba59ee9 100644 --- a/source/blender/editors/object/object_select.c +++ b/source/blender/editors/object/object_select.c @@ -836,14 +836,15 @@ static bool select_grouped_parent(bContext *C) /* Makes parent active and de-sel /* Select objects in the same group as the active */ static bool select_grouped_collection(bContext *C, Object *ob) { + Main *bmain = CTX_data_main(C); bool changed = false; Collection *collection, *ob_collections[COLLECTION_MENU_MAX]; int collection_count = 0, i; uiPopupMenu *pup; uiLayout *layout; - for (collection = CTX_data_main(C)->collections.first; - collection && collection_count < COLLECTION_MENU_MAX; + for (collection = bmain->collections.first; + collection && (collection_count < COLLECTION_MENU_MAX); collection = collection->id.next) { if (BKE_collection_has_object(collection, ob)) { ob_collections[collection_count] = collection; |