diff options
Diffstat (limited to 'intern/cycles/blender')
-rw-r--r-- | intern/cycles/blender/CMakeLists.txt | 4 | ||||
-rw-r--r-- | intern/cycles/blender/blender_curves.cpp | 10 | ||||
-rw-r--r-- | intern/cycles/blender/blender_object.cpp | 12 |
3 files changed, 22 insertions, 4 deletions
diff --git a/intern/cycles/blender/CMakeLists.txt b/intern/cycles/blender/CMakeLists.txt index 2316800e21e..e0fa45dffbc 100644 --- a/intern/cycles/blender/CMakeLists.txt +++ b/intern/cycles/blender/CMakeLists.txt @@ -109,6 +109,10 @@ if(WITH_OPENIMAGEDENOISE) ) endif() +if(WITH_EXPERIMENTAL_FEATURES) + add_definitions(-DWITH_HAIR_NODES) +endif() + blender_add_lib(bf_intern_cycles "${SRC}" "${INC}" "${INC_SYS}" "${LIB}") # avoid link failure with clang 3.4 debug diff --git a/intern/cycles/blender/blender_curves.cpp b/intern/cycles/blender/blender_curves.cpp index 82c99631a89..6288c370567 100644 --- a/intern/cycles/blender/blender_curves.cpp +++ b/intern/cycles/blender/blender_curves.cpp @@ -628,6 +628,7 @@ void BlenderSync::sync_particle_hair( } } +#ifdef WITH_HAIR_NODES static float4 hair_point_as_float4(BL::HairPoint b_point) { float4 mP = float3_to_float4(get_float3(b_point.co())); @@ -806,6 +807,15 @@ void BlenderSync::sync_hair(Hair *hair, BL::Object &b_ob, bool motion, int motio export_hair_curves(scene, hair, b_hair); } } +#else +void BlenderSync::sync_hair(Hair *hair, BL::Object &b_ob, bool motion, int motion_step) +{ + (void)hair; + (void)b_ob; + (void)motion; + (void)motion_step; +} +#endif void BlenderSync::sync_hair(BL::Depsgraph b_depsgraph, BL::Object b_ob, diff --git a/intern/cycles/blender/blender_object.cpp b/intern/cycles/blender/blender_object.cpp index 3ea6892a349..e0792962b01 100644 --- a/intern/cycles/blender/blender_object.cpp +++ b/intern/cycles/blender/blender_object.cpp @@ -458,15 +458,19 @@ void BlenderSync::sync_motion(BL::RenderSettings &b_render, python_thread_state_restore(python_thread_state); b_engine.frame_set(frame, subframe); python_thread_state_save(python_thread_state); - sync_camera_motion(b_render, b_cam, width, height, 0.0f); + if (b_cam) { + sync_camera_motion(b_render, b_cam, width, height, 0.0f); + } sync_objects(b_depsgraph, b_v3d, 0.0f); } /* Insert motion times from camera. Motion times from other objects * have already been added in a sync_objects call. */ - uint camera_motion_steps = object_motion_steps(b_cam, b_cam); - for (size_t step = 0; step < camera_motion_steps; step++) { - motion_times.insert(scene->camera->motion_time(step)); + if (b_cam) { + uint camera_motion_steps = object_motion_steps(b_cam, b_cam); + for (size_t step = 0; step < camera_motion_steps; step++) { + motion_times.insert(scene->camera->motion_time(step)); + } } /* note iteration over motion_times set happens in sorted order */ |