Skip to content
Snippets Groups Projects
Commit 360684d5 authored by Jesse Yurkovich's avatar Jesse Yurkovich Committed by Jesse Yurkovich
Browse files

Fix #114047: Use correct collection during USD import

Ensure that the view layer is properly synced before trying to get the
active collection.

Without the sync, imported objects typically get placed in the global
Scene Collection rather than the new collection that was just created
for the import.

Pull Request: https://projects.blender.org/blender/blender/pulls/114650
parent 13171183
Branches
Tags
No related merge requests found
...@@ -173,6 +173,7 @@ static void import_startjob(void *customdata, bool *stop, bool *do_update, float ...@@ -173,6 +173,7 @@ static void import_startjob(void *customdata, bool *stop, bool *do_update, float
WM_main_add_notifier(NC_SCENE | ND_LAYER, nullptr); WM_main_add_notifier(NC_SCENE | ND_LAYER, nullptr);
BKE_view_layer_synced_ensure(data->scene, data->view_layer);
data->view_layer->active_collection = BKE_layer_collection_first_from_scene_collection( data->view_layer->active_collection = BKE_layer_collection_first_from_scene_collection(
data->view_layer, import_collection); data->view_layer, import_collection);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment