Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorMichael Kowalski <makowalski@nvidia.com>2022-10-20 23:37:11 +0300
committerMichael Kowalski <makowalski@nvidia.com>2022-10-20 23:37:11 +0300
commitae342e00ca08eca8b98e37b7ce29017320db609a (patch)
tree4deb511c5057e0a58615eebd0e311dc29677783b /source
parent471636ffcd49d5d339f80edce58d812cbe9aa12d (diff)
USD Import: hide instance prototype collections.
Now hiding the instance prototype parent collection in both the viewport and render. This change was also necessary because the previous code for hiding prototype layer collections stopped working with the latest merge from master.
Diffstat (limited to 'source')
-rw-r--r--source/blender/io/usd/intern/usd_capi_import.cc11
1 files changed, 5 insertions, 6 deletions
diff --git a/source/blender/io/usd/intern/usd_capi_import.cc b/source/blender/io/usd/intern/usd_capi_import.cc
index 5ec0d73e0f9..9ed0e4cb69f 100644
--- a/source/blender/io/usd/intern/usd_capi_import.cc
+++ b/source/blender/io/usd/intern/usd_capi_import.cc
@@ -166,6 +166,11 @@ static void create_proto_collections(Main *bmain,
{
Collection *all_protos_collection = create_collection(bmain, parent_collection, "prototypes");
+ if (all_protos_collection) {
+ all_protos_collection->flag |= COLLECTION_HIDE_VIEWPORT;
+ all_protos_collection->flag |= COLLECTION_HIDE_RENDER;
+ }
+
std::map<pxr::SdfPath, Collection *> proto_collection_map;
for (const auto &pair : proto_readers) {
@@ -179,12 +184,6 @@ static void create_proto_collections(Main *bmain,
Collection *proto_collection = create_collection(
bmain, all_protos_collection, proto_collection_name.c_str());
- LayerCollection *proto_lc = BKE_layer_collection_first_from_scene_collection(view_layer,
- proto_collection);
- if (proto_lc) {
- proto_lc->flag |= LAYER_COLLECTION_HIDE;
- }
-
proto_collection_map.insert(std::make_pair(pair.first, proto_collection));
}