[Bf-blender-cvs] [ae342e00ca0] universal-scene-description: USD Import: hide instance prototype collections.
Michael Kowalski
noreply at git.blender.org
Mon Oct 24 17:19:09 CEST 2022
Commit: ae342e00ca08eca8b98e37b7ce29017320db609a
Author: Michael Kowalski
Date: Thu Oct 20 16:37:11 2022 -0400
Branches: universal-scene-description
https://developer.blender.org/rBae342e00ca08eca8b98e37b7ce29017320db609a
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.
===================================================================
M source/blender/io/usd/intern/usd_capi_import.cc
===================================================================
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));
}
More information about the Bf-blender-cvs
mailing list