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_workspace.h" | |||||
ankitm: Run `make format` or use extensions (VSCode, Sublime Text) for `clang-format`.
Alphabetical… | |||||
| #include "BKE_icons.h" | #include "BKE_icons.h" | ||||
| #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" | ||||
| #include "BKE_rigidbody.h" | #include "BKE_rigidbody.h" | ||||
| #include "BKE_scene.h" | #include "BKE_scene.h" | ||||
| #include "DNA_ID.h" | #include "DNA_ID.h" | ||||
| #include "DNA_windowmanager_types.h" | |||||
| #include "DNA_collection_types.h" | #include "DNA_collection_types.h" | ||||
| #include "DNA_layer_types.h" | #include "DNA_layer_types.h" | ||||
| #include "DNA_object_types.h" | #include "DNA_object_types.h" | ||||
| #include "DNA_rigidbody_types.h" | #include "DNA_rigidbody_types.h" | ||||
| #include "DNA_scene_types.h" | #include "DNA_scene_types.h" | ||||
| #include "DEG_depsgraph.h" | #include "DEG_depsgraph.h" | ||||
| #include "DEG_depsgraph_query.h" | #include "DEG_depsgraph_query.h" | ||||
| ▲ Show 20 Lines • Show All 1,051 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); | ||||
| } | } | ||||
| ViewLayer *view_layer = scene->view_layers.first; | |||||
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 | |||||
| wmWindowManager *wm = bmain->wm.first; | |||||
| for (wmWindow *window = wm->windows.first; window != NULL; window = window->next) { | |||||
| bScreen *screen = BKE_workspace_active_screen_get(window->workspace_hook); | |||||
| for (ScrArea *area = screen->areabase.first; area != NULL; area = area->next) { | |||||
ankitmUnsubmitted 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… | |||||
| View3D *v3d = area->spacedata.first; | |||||
| BKE_layer_collection_local_sync(view_layer,v3d); | |||||
| } | |||||
| } | |||||
| } | } | ||||
| /** \} */ | /** \} */ | ||||
| /* -------------------------------------------------------------------- */ | /* -------------------------------------------------------------------- */ | ||||
| /** \name Collection Scene Membership | /** \name Collection Scene Membership | ||||
| * \{ */ | * \{ */ | ||||
| ▲ Show 20 Lines • Show All 686 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