From c10ebcac3b1429542603e956d2d2ce1b6fd74684 Mon Sep 17 00:00:00 2001 From: Vasyl-Pidhirskyi Date: Thu, 3 Aug 2023 15:55:19 +0300 Subject: [PATCH] Removed transform property from WorldData. Removed redundant code. Format. --- source/blender/io/usd/hydra/hydra_scene_delegate.cc | 3 --- source/blender/io/usd/hydra/object.h | 7 ++++--- source/blender/io/usd/hydra/world.h | 2 -- 3 files changed, 4 insertions(+), 8 deletions(-) diff --git a/source/blender/io/usd/hydra/hydra_scene_delegate.cc b/source/blender/io/usd/hydra/hydra_scene_delegate.cc index aa42a694ea5b..a9c614de99b4 100644 --- a/source/blender/io/usd/hydra/hydra_scene_delegate.cc +++ b/source/blender/io/usd/hydra/hydra_scene_delegate.cc @@ -61,9 +61,6 @@ pxr::GfMatrix4d HydraSceneDelegate::GetTransform(pxr::SdfPath const &id) if (obj_data) { return obj_data->transform; } - if (id == world_prim_id()) { - return world_data_->transform; - } return pxr::GfMatrix4d(); } diff --git a/source/blender/io/usd/hydra/object.h b/source/blender/io/usd/hydra/object.h index bee556497049..2536fa7a9df6 100644 --- a/source/blender/io/usd/hydra/object.h +++ b/source/blender/io/usd/hydra/object.h @@ -20,6 +20,10 @@ namespace blender::io::hydra { class ObjectData : public IdData { + public: + pxr::GfMatrix4d transform; + bool visible = true; + public: ObjectData(HydraSceneDelegate *scene_delegate, Object *object, pxr::SdfPath const &prim_id); @@ -38,9 +42,6 @@ class ObjectData : public IdData { virtual pxr::SdfPath material_id(pxr::SdfPath const &id) const; virtual void available_materials(Set &paths) const; - pxr::GfMatrix4d transform; - bool visible = true; - protected: virtual void write_transform(); virtual void write_materials(); diff --git a/source/blender/io/usd/hydra/world.h b/source/blender/io/usd/hydra/world.h index 337b598bbdea..f8ad274372f8 100644 --- a/source/blender/io/usd/hydra/world.h +++ b/source/blender/io/usd/hydra/world.h @@ -20,8 +20,6 @@ namespace blender::io::hydra { class WorldData : public LightData { public: - pxr::GfMatrix4d transform; - WorldData(HydraSceneDelegate *scene_delegate, pxr::SdfPath const &prim_id); void init() override; -- 2.30.2