diff options
Diffstat (limited to 'intern/cycles/blender/geometry.cpp')
-rw-r--r-- | intern/cycles/blender/geometry.cpp | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/intern/cycles/blender/geometry.cpp b/intern/cycles/blender/geometry.cpp index 479e76f68bc..78c803b7adb 100644 --- a/intern/cycles/blender/geometry.cpp +++ b/intern/cycles/blender/geometry.cpp @@ -19,6 +19,7 @@ #include "scene/hair.h" #include "scene/mesh.h" #include "scene/object.h" +#include "scene/pointcloud.h" #include "scene/volume.h" #include "blender/sync.h" @@ -31,10 +32,18 @@ CCL_NAMESPACE_BEGIN static Geometry::Type determine_geom_type(BObjectInfo &b_ob_info, bool use_particle_hair) { +#ifdef WITH_HAIR_NODES if (b_ob_info.object_data.is_a(&RNA_Hair) || use_particle_hair) { +#else + if (use_particle_hair) { +#endif return Geometry::HAIR; } + if (b_ob_info.object_data.is_a(&RNA_PointCloud)) { + return Geometry::POINTCLOUD; + } + if (b_ob_info.object_data.is_a(&RNA_Volume) || (b_ob_info.object_data == b_ob_info.real_object.data() && object_fluid_gas_domain_find(b_ob_info.real_object))) { @@ -107,6 +116,9 @@ Geometry *BlenderSync::sync_geometry(BL::Depsgraph &b_depsgraph, else if (geom_type == Geometry::VOLUME) { geom = scene->create_node<Volume>(); } + else if (geom_type == Geometry::POINTCLOUD) { + geom = scene->create_node<PointCloud>(); + } else { geom = scene->create_node<Mesh>(); } @@ -166,6 +178,10 @@ Geometry *BlenderSync::sync_geometry(BL::Depsgraph &b_depsgraph, Volume *volume = static_cast<Volume *>(geom); sync_volume(b_ob_info, volume); } + else if (geom_type == Geometry::POINTCLOUD) { + PointCloud *pointcloud = static_cast<PointCloud *>(geom); + sync_pointcloud(pointcloud, b_ob_info); + } else { Mesh *mesh = static_cast<Mesh *>(geom); sync_mesh(b_depsgraph, b_ob_info, mesh); @@ -215,7 +231,11 @@ void BlenderSync::sync_geometry_motion(BL::Depsgraph &b_depsgraph, if (progress.get_cancel()) return; +#ifdef WITH_HAIR_NODES if (b_ob_info.object_data.is_a(&RNA_Hair) || use_particle_hair) { +#else + if (use_particle_hair) { +#endif Hair *hair = static_cast<Hair *>(geom); sync_hair_motion(b_depsgraph, b_ob_info, hair, motion_step); } @@ -223,6 +243,10 @@ void BlenderSync::sync_geometry_motion(BL::Depsgraph &b_depsgraph, object_fluid_gas_domain_find(b_ob_info.real_object)) { /* No volume motion blur support yet. */ } + else if (b_ob_info.object_data.is_a(&RNA_PointCloud)) { + PointCloud *pointcloud = static_cast<PointCloud *>(geom); + sync_pointcloud_motion(pointcloud, b_ob_info, motion_step); + } else { Mesh *mesh = static_cast<Mesh *>(geom); sync_mesh_motion(b_depsgraph, b_ob_info, mesh, motion_step); |