|
Blender V4.3
|
#include <usd_reader_stage.hh>
Public Member Functions | |
| USDStageReader (pxr::UsdStageRefPtr stage, const USDImportParams ¶ms, const ImportSettings &settings) | |
| ~USDStageReader () | |
| USDPrimReader * | create_reader_if_allowed (const pxr::UsdPrim &prim) |
| USDPrimReader * | create_reader (const pxr::UsdPrim &prim) |
| void | collect_readers () |
| void | process_armature_modifiers () const |
| void | import_all_materials (struct Main *bmain) |
| void | fake_users_for_unused_materials () |
| bool | valid () const |
| pxr::UsdStageRefPtr | stage () |
| const USDImportParams & | params () const |
| const ImportSettings & | settings () const |
| ReportList * | reports () const |
| void | clear_readers () |
| const blender::Vector< USDPrimReader * > & | readers () const |
| const blender::Vector< pxr::UsdLuxDomeLight > & | dome_lights () const |
| void | sort_readers () |
| void | create_proto_collections (Main *bmain, Collection *parent_collection) |
Protected Attributes | |
| pxr::UsdStageRefPtr | stage_ |
| USDImportParams | params_ |
| ImportSettings | settings_ |
| blender::Vector< USDPrimReader * > | readers_ |
| blender::Vector< pxr::UsdLuxDomeLight > | dome_lights_ |
| blender::Vector< std::string > | material_paths_ |
| ProtoReaderMap | proto_readers_ |
| ProtoReaderMap | instancer_proto_readers_ |
Definition at line 36 of file usd_reader_stage.hh.
| blender::io::usd::USDStageReader::USDStageReader | ( | pxr::UsdStageRefPtr | stage, |
| const USDImportParams & | params, | ||
| const ImportSettings & | settings ) |
Definition at line 110 of file usd_reader_stage.cc.
References params(), params_, settings(), settings_, stage(), and stage_.
| blender::io::usd::USDStageReader::~USDStageReader | ( | ) |
Definition at line 117 of file usd_reader_stage.cc.
References clear_readers().
| void blender::io::usd::USDStageReader::clear_readers | ( | ) |
Clear all cached reader collections.
Definition at line 563 of file usd_reader_stage.cc.
References blender::io::usd::decref(), instancer_proto_readers_, proto_readers_, and readers_.
Referenced by collect_readers(), and ~USDStageReader().
| void blender::io::usd::USDStageReader::collect_readers | ( | ) |
Definition at line 419 of file usd_reader_stage.cc.
References clear_readers(), collect_readers(), dome_lights_, blender::Set< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::is_empty(), params_, proto_readers_, readers_, stage_, and valid().
Referenced by collect_readers(), and blender::io::usd::import_startjob().
| void blender::io::usd::USDStageReader::create_proto_collections | ( | Main * | bmain, |
| Collection * | parent_collection ) |
Create prototype collections for instancing by the USD instance readers.
Definition at line 595 of file usd_reader_stage.cc.
References blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::add(), BKE_collection_object_add(), BLI_assert, CLOG_WARN, COLLECTION_HIDE_RENDER, COLLECTION_HIDE_VIEWPORT, blender::io::usd::create_collection(), DEG_id_tag_update(), Collection::flag, Collection::id, ID_RECALC_HIERARCHY, instancer_proto_readers_, integer_digits_i(), LOG, blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::lookup_default(), blender::io::usd::USDPrimReader::object(), blender::io::usd::USDPrimReader::prim(), blender::io::usd::USDPointInstancerReader::proto_paths(), proto_readers_, readers_, blender::io::usd::USDPointInstancerReader::set_collection(), and blender::io::usd::set_instance_collection().
| USDPrimReader * blender::io::usd::USDStageReader::create_reader | ( | const pxr::UsdPrim & | prim | ) |
Definition at line 182 of file usd_reader_stage.cc.
References params_, and settings_.
Referenced by blender::io::usd::CacheReader_open_usd_object().
| USDPrimReader * blender::io::usd::USDStageReader::create_reader_if_allowed | ( | const pxr::UsdPrim & | prim | ) |
Definition at line 134 of file usd_reader_stage.cc.
|
inline |
Definition at line 120 of file usd_reader_stage.hh.
References dome_lights_.
Referenced by blender::io::usd::import_startjob().
| void blender::io::usd::USDStageReader::fake_users_for_unused_materials | ( | ) |
Definition at line 547 of file usd_reader_stage.cc.
References Material::id, id_fake_user_set(), settings_, and ID::us.
| void blender::io::usd::USDStageReader::import_all_materials | ( | struct Main * | bmain | ) |
Definition at line 504 of file usd_reader_stage.cc.
References blender::io::usd::USDMaterialReader::add_material(), BLI_assert, BLI_assert_msg, blender::io::usd::build_material_map(), blender::io::usd::find_existing_material(), Material::id, blender::io::usd::make_safe_name(), material_paths_, ID::name, params_, settings_, stage_, blender::io::usd::USD_MTL_NAME_COLLISION_MAKE_UNIQUE, and valid().
Referenced by blender::io::usd::import_startjob().
|
inline |
Definition at line 96 of file usd_reader_stage.hh.
References params_.
Referenced by USDStageReader().
| void blender::io::usd::USDStageReader::process_armature_modifiers | ( | ) | const |
Complete setting up the armature modifiers that were created for skinned meshes by setting the modifier object on the corresponding modifier.
Definition at line 461 of file usd_reader_stage.cc.
References blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::add(), BKE_modifiers_findby_type(), BKE_reportf(), eModifierType_Armature, blender::io::usd::USDMeshReader::get_skeleton_path(), blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::lookup_default(), ArmatureModifierData::object, blender::io::usd::USDPrimReader::object(), readers_, reports(), and RPT_WARNING.
Referenced by blender::io::usd::import_startjob().
|
inline |
Definition at line 115 of file usd_reader_stage.hh.
References readers_.
Referenced by blender::io::usd::import_startjob().
|
inline |
Get the wmJobWorkerStatus-provided reports list pointer, to use with the BKE_report API.
Definition at line 107 of file usd_reader_stage.hh.
References params_.
Referenced by process_armature_modifiers().
|
inline |
Definition at line 101 of file usd_reader_stage.hh.
References settings_.
Referenced by USDStageReader().
| void blender::io::usd::USDStageReader::sort_readers | ( | ) |
Definition at line 585 of file usd_reader_stage.cc.
References b, blender::parallel_sort(), and readers_.
Referenced by blender::io::usd::import_startjob().
|
inline |
Definition at line 92 of file usd_reader_stage.hh.
References stage_.
Referenced by blender::io::usd::CacheReader_open_usd_object(), and USDStageReader().
| bool blender::io::usd::USDStageReader::valid | ( | ) | const |
Definition at line 122 of file usd_reader_stage.cc.
References stage_.
Referenced by blender::io::usd::CacheReader_open_usd_object(), collect_readers(), and import_all_materials().
|
protected |
Definition at line 47 of file usd_reader_stage.hh.
Referenced by collect_readers(), and dome_lights().
|
protected |
Definition at line 57 of file usd_reader_stage.hh.
Referenced by clear_readers(), and create_proto_collections().
|
protected |
Definition at line 51 of file usd_reader_stage.hh.
Referenced by import_all_materials().
|
protected |
Definition at line 40 of file usd_reader_stage.hh.
Referenced by collect_readers(), create_reader(), create_reader_if_allowed(), import_all_materials(), params(), reports(), and USDStageReader().
|
protected |
Definition at line 54 of file usd_reader_stage.hh.
Referenced by clear_readers(), collect_readers(), and create_proto_collections().
|
protected |
Definition at line 43 of file usd_reader_stage.hh.
Referenced by clear_readers(), collect_readers(), create_proto_collections(), process_armature_modifiers(), readers(), and sort_readers().
|
protected |
Definition at line 41 of file usd_reader_stage.hh.
Referenced by create_reader(), create_reader_if_allowed(), fake_users_for_unused_materials(), import_all_materials(), settings(), and USDStageReader().
|
protected |
Definition at line 39 of file usd_reader_stage.hh.
Referenced by collect_readers(), import_all_materials(), stage(), USDStageReader(), and valid().