|
Blender V4.3
|
#include <usd_reader_xform.hh>
Inherits blender::io::usd::USDPrimReader.
Inherited by blender::io::usd::USDCameraReader, blender::io::usd::USDGeomReader, blender::io::usd::USDInstanceReader, blender::io::usd::USDLightReader, blender::io::usd::USDPointInstancerReader, blender::io::usd::USDSkeletonReader, and blender::io::usd::USDVolumeReader.
Public Member Functions | |
| USDXformReader (const pxr::UsdPrim &prim, const USDImportParams &import_params, const ImportSettings &settings) | |
| void | create_object (Main *bmain, double motionSampleTime) override |
| void | read_object_data (Main *bmain, double motionSampleTime) override |
| void | read_matrix (float r_mat[4][4], float time, float scale, bool *r_is_constant) const |
| bool | use_parent_xform () const |
| void | set_use_parent_xform (bool flag) |
| bool | prim_has_xform_ops () const |
Public Member Functions inherited from blender::io::usd::USDPrimReader | |
| USDPrimReader (const pxr::UsdPrim &prim, const USDImportParams &import_params, const ImportSettings &settings) | |
| virtual | ~USDPrimReader () |
| const pxr::UsdPrim & | prim () const |
| virtual bool | valid () const |
| Object * | object () const |
| void | object (Object *ob) |
| USDPrimReader * | parent () const |
| void | parent (USDPrimReader *parent) |
| ReportList * | reports () const |
| int | refcount () const |
| void | incref () |
| void | decref () |
| const std::string & | name () const |
| const std::string & | prim_path () const |
| void | set_is_in_instancer_proto (bool flag) |
| bool | is_in_instancer_proto () const |
| bool | is_in_proto () const |
Protected Member Functions | |
| bool | is_root_xform_prim () const |
| virtual std::optional< XformResult > | get_local_usd_xform (float time) const |
Protected Member Functions inherited from blender::io::usd::USDPrimReader | |
| void | set_props (bool merge_with_parent=false, pxr::UsdTimeCode motionSampleTime=pxr::UsdTimeCode::Default()) |
Additional Inherited Members | |
Protected Attributes inherited from blender::io::usd::USDPrimReader | |
| std::string | name_ |
| std::string | prim_path_ |
| Object * | object_ |
| pxr::UsdPrim | prim_ |
| const USDImportParams & | import_params_ |
| USDPrimReader * | parent_reader_ |
| const ImportSettings * | settings_ |
| int | refcount_ |
| bool | is_in_instancer_proto_ |
Definition at line 21 of file usd_reader_xform.hh.
|
inline |
Definition at line 30 of file usd_reader_xform.hh.
|
overridevirtual |
Implements blender::io::usd::USDPrimReader.
Definition at line 28 of file usd_reader_xform.cc.
References BKE_object_add_only_object(), Object::data, Object::empty_drawsize, blender::io::usd::USDPrimReader::name_, OB_EMPTY, and blender::io::usd::USDPrimReader::object_.
|
protectedvirtual |
Return the USD prim's local transformation.
| time | Time code for evaluating the transform. |
Definition at line 151 of file usd_reader_xform.cc.
References blender::io::usd::USDPrimReader::prim_.
Referenced by read_matrix().
|
protected |
Definition at line 112 of file usd_reader_xform.cc.
References blender::io::usd::USDPrimReader::is_in_proto(), and blender::io::usd::USDPrimReader::prim_.
Referenced by set_use_parent_xform().
| bool blender::io::usd::USDXformReader::prim_has_xform_ops | ( | ) | const |
Definition at line 98 of file usd_reader_xform.cc.
References blender::io::usd::USDPrimReader::prim_.
Referenced by blender::io::usd::merge_with_parent().
| void blender::io::usd::USDXformReader::read_matrix | ( | float | r_mat[4][4], |
| float | time, | ||
| float | scale, | ||
| bool * | r_is_constant ) const |
Definition at line 62 of file usd_reader_xform.cc.
References BLI_assert, blender::io::usd::ImportSettings::conversion_mat, blender::io::usd::ImportSettings::do_convert_mat, get_local_usd_xform(), mul_m4_m4m4(), scale_m4_fl(), blender::io::usd::USDPrimReader::settings_, and unit_m4().
Referenced by read_object_data(), and blender::io::usd::USD_get_transform().
|
overridevirtual |
Reimplemented from blender::io::usd::USDPrimReader.
Definition at line 35 of file usd_reader_xform.cc.
References BKE_constraint_add_for_object(), BKE_object_apply_mat4(), CONSTRAINT_TYPE_TRANSFORM_CACHE, bConstraint::data, blender::io::usd::ImportSettings::get_cache_file, id_us_plus(), blender::io::usd::USDPrimReader::import_params_, blender::io::usd::USDPrimReader::object_, blender::io::usd::USDPrimReader::prim_, blender::io::usd::USDPrimReader::prim_path(), blender::io::usd::USDPrimReader::prim_path_, read_matrix(), blender::io::usd::USDImportParams::scale, blender::io::usd::USDPrimReader::set_props(), blender::io::usd::USDPrimReader::settings_, STRNCPY, and use_parent_xform().
Referenced by blender::io::usd::USDCameraReader::read_object_data(), blender::io::usd::USDLightReader::read_object_data(), blender::io::usd::USDMeshReader::read_object_data(), blender::io::usd::USDNurbsReader::read_object_data(), blender::io::usd::USDPointInstancerReader::read_object_data(), blender::io::usd::USDPointsReader::read_object_data(), blender::io::usd::USDShapeReader::read_object_data(), blender::io::usd::USDSkeletonReader::read_object_data(), and blender::io::usd::USDVolumeReader::read_object_data().
|
inline |
Definition at line 48 of file usd_reader_xform.hh.
References flag, and is_root_xform_prim().
Referenced by blender::io::usd::merge_with_parent().
|
inline |
Definition at line 44 of file usd_reader_xform.hh.
Referenced by blender::io::usd::merge_with_parent(), and read_object_data().