Changeset View
Changeset View
Standalone View
Standalone View
source/blender/blenkernel/intern/collection.c
| Show All 24 Lines | |||||
| #include "BLI_iterator.h" | #include "BLI_iterator.h" | ||||
| #include "BLI_listbase.h" | #include "BLI_listbase.h" | ||||
| #include "BLI_math_base.h" | #include "BLI_math_base.h" | ||||
| #include "BLI_threads.h" | #include "BLI_threads.h" | ||||
| #include "BLT_translation.h" | #include "BLT_translation.h" | ||||
| #include "BKE_anim_data.h" | #include "BKE_anim_data.h" | ||||
| #include "BKE_collection.h" | #include "BKE_collection.h" | ||||
| #include "BKE_icons.h" | #include "BKE_icons.h" | ||||
ankitm: Run `make format` or use extensions (VSCode, Sublime Text) for `clang-format`.
Alphabetical… | |||||
| #include "BKE_idprop.h" | #include "BKE_idprop.h" | ||||
| #include "BKE_idtype.h" | #include "BKE_idtype.h" | ||||
| #include "BKE_layer.h" | #include "BKE_layer.h" | ||||
| #include "BKE_lib_id.h" | #include "BKE_lib_id.h" | ||||
| #include "BKE_lib_query.h" | #include "BKE_lib_query.h" | ||||
| #include "BKE_lib_remap.h" | #include "BKE_lib_remap.h" | ||||
| #include "BKE_main.h" | #include "BKE_main.h" | ||||
| #include "BKE_object.h" | #include "BKE_object.h" | ||||
| ▲ Show 20 Lines • Show All 1,075 Lines • ▼ Show 20 Lines | if (collection_src != NULL) { | ||||
| } | } | ||||
| } | } | ||||
| else { | else { | ||||
| /* Adding will fail if object is already in collection. | /* Adding will fail if object is already in collection. | ||||
| * However we still need to remove it from the other collections. */ | * However we still need to remove it from the other collections. */ | ||||
| BKE_collection_object_add(bmain, collection_dst, ob); | BKE_collection_object_add(bmain, collection_dst, ob); | ||||
| scene_collections_object_remove(bmain, scene, ob, false, collection_dst); | scene_collections_object_remove(bmain, scene, ob, false, collection_dst); | ||||
| } | } | ||||
Done Inline ActionsThe first view layer is not special, it may not be the active one dfelinto: The first view layer is not special, it may not be the active one | |||||
| BKE_layer_collection_local_sync_all(bmain); | |||||
| } | } | ||||
| /** \} */ | /** \} */ | ||||
Done Inline ActionsUse LISTBASE_FOREACH. wmWindow *window = wm->windows.first; window != NULL; window = window->next ankitm: Use `LISTBASE_FOREACH`.
Same for
wmWindow *window = wm->windows.first; window != NULL… | |||||
| /* -------------------------------------------------------------------- */ | /* -------------------------------------------------------------------- */ | ||||
| /** \name Collection Scene Membership | /** \name Collection Scene Membership | ||||
| * \{ */ | * \{ */ | ||||
| bool BKE_collection_is_in_scene(Collection *collection) | bool BKE_collection_is_in_scene(Collection *collection) | ||||
| { | { | ||||
| if (collection->flag & COLLECTION_IS_MASTER) { | if (collection->flag & COLLECTION_IS_MASTER) { | ||||
| ▲ Show 20 Lines • Show All 682 Lines • Show Last 20 Lines | |||||
Run make format or use extensions (VSCode, Sublime Text) for clang-format.
Alphabetical order for headers.
Same for
https://wiki.blender.org/wiki/Tools/ClangFormat