Code improvements and fixes #26

Merged
Bogdan Nagirniak merged 8 commits from code_improvements_fixes into hydra-render 2023-04-21 07:48:50 +02:00
4 changed files with 2 additions and 11 deletions
Showing only changes of commit d70e059988 - Show all commits

View File

@ -21,7 +21,7 @@ namespace blender::render::hydra {
extern struct CLG_LogRef *LOG_BSD; /* BSD - Blender Scene Delegate */ extern struct CLG_LogRef *LOG_BSD; /* BSD - Blender Scene Delegate */
class BlenderSceneDelegate : public pxr::HdSceneDelegate { class BlenderSceneDelegate : public pxr::HdSceneDelegate {
friend MeshData; friend MeshData; /* has access to materials_*/
public: public:
enum class EngineType { VIEWPORT = 1, FINAL, PREVIEW }; enum class EngineType { VIEWPORT = 1, FINAL, PREVIEW };

View File

@ -12,11 +12,8 @@
namespace blender::render::hydra { namespace blender::render::hydra {
class BlenderSceneDelegate; class BlenderSceneDelegate;
class InstancerData;
class IdData { class IdData {
friend InstancerData;
public: public:
IdData(BlenderSceneDelegate *scene_delegate, ID *id, pxr::SdfPath const &prim_id); IdData(BlenderSceneDelegate *scene_delegate, ID *id, pxr::SdfPath const &prim_id);
virtual ~IdData() = default; virtual ~IdData() = default;

View File

@ -10,8 +10,6 @@
namespace blender::render::hydra { namespace blender::render::hydra {
class InstancerData : public ObjectData { class InstancerData : public ObjectData {
friend BlenderSceneDelegate;
struct Instance { struct Instance {
std::unique_ptr<ObjectData> obj_data; std::unique_ptr<ObjectData> obj_data;
pxr::VtIntArray indices; pxr::VtIntArray indices;

View File

@ -13,11 +13,7 @@
namespace blender::render::hydra { namespace blender::render::hydra {
class MeshData; class MaterialData : public IdData {
class MaterialData : IdData {
friend MeshData;
public: public:
MaterialData(BlenderSceneDelegate *scene_delegate, MaterialData(BlenderSceneDelegate *scene_delegate,
Material *material, Material *material,