diff --git a/source/blender/render/hydra/sceneDelegate/blenderSceneDelegate.cc b/source/blender/render/hydra/sceneDelegate/blenderSceneDelegate.cc index 7ef68e84bf90..c2140bd389fb 100644 --- a/source/blender/render/hydra/sceneDelegate/blenderSceneDelegate.cc +++ b/source/blender/render/hydra/sceneDelegate/blenderSceneDelegate.cc @@ -9,6 +9,7 @@ #include "blenderSceneDelegate.h" using namespace pxr; +using namespace std; namespace blender::render::hydra { @@ -149,7 +150,7 @@ void BlenderSceneDelegate::update_collection(bool remove, bool visibility) } /* Export of new visible objects which were not exported before */ - std::set available_objects; + set available_objects; SdfPath id; DEGObjectIterSettings settings = {0}; @@ -164,12 +165,13 @@ void BlenderSceneDelegate::update_collection(bool remove, bool visibility) DEG_iterator_objects_next, DEG_iterator_objects_end, &data, Object *, object) { - if (data.dupli_object_current != nullptr) { - add_update_instance(data.dupli_object_current); + + if (!ObjectData::supported(object)) { continue; } - if (!ObjectData::supported(object)) { + if (data.dupli_object_current != nullptr) { + add_update_instance(data.dupli_object_current); continue; } @@ -196,7 +198,7 @@ void BlenderSceneDelegate::update_collection(bool remove, bool visibility) } /* remove unused materials */ - std::set available_materials; + set available_materials; for (auto &obj : objects) { MeshData *m_data = dynamic_cast(obj.second.get()); if (m_data && !m_data->material_id.IsEmpty()) { diff --git a/source/blender/render/hydra/sceneDelegate/mesh.cc b/source/blender/render/hydra/sceneDelegate/mesh.cc index 945cad857ff1..6d2c5ec754f4 100644 --- a/source/blender/render/hydra/sceneDelegate/mesh.cc +++ b/source/blender/render/hydra/sceneDelegate/mesh.cc @@ -28,7 +28,9 @@ MeshData::MeshData(BlenderSceneDelegate *scene_delegate, Object *object) } else { Mesh *mesh = BKE_object_to_mesh(nullptr, object, false); - set_mesh(mesh); + if (mesh) { + set_mesh(mesh); + } BKE_object_to_mesh_clear(object); } } diff --git a/source/blender/render/hydra/sceneDelegate/object.cc b/source/blender/render/hydra/sceneDelegate/object.cc index bc6012f6f51b..65067e983492 100644 --- a/source/blender/render/hydra/sceneDelegate/object.cc +++ b/source/blender/render/hydra/sceneDelegate/object.cc @@ -19,7 +19,6 @@ bool ObjectData::supported(Object *object) case OB_MESH: case OB_SURF: case OB_FONT: - case OB_CURVES: case OB_CURVES_LEGACY: case OB_MBALL: case OB_LAMP: diff --git a/source/blender/render/hydra/sceneDelegate/world.cc b/source/blender/render/hydra/sceneDelegate/world.cc index 43bdbafaa129..26d1b3e82d13 100644 --- a/source/blender/render/hydra/sceneDelegate/world.cc +++ b/source/blender/render/hydra/sceneDelegate/world.cc @@ -59,6 +59,9 @@ WorldData::WorldData(BlenderSceneDelegate *scene_delegate, World *world, bContex } bNode *input_node = link->fromnode; + if (input_node->type != SH_NODE_BACKGROUND) { + return; + } bNodeSocket color_input = input_node->input_by_identifier("Color"); bNodeSocket strength_input = input_node->input_by_identifier("Strength");