Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Gavrilov <angavrilov@gmail.com>2020-10-31 19:21:07 +0300
committerAlexander Gavrilov <angavrilov@gmail.com>2020-11-03 16:35:43 +0300
commit91d320edc3cfb30443af4adbcb09bc3d7a609e1d (patch)
tree5fa112217c986e516ff30e3ba95556bc2b94d7ce /intern/cycles/blender/blender_curves.cpp
parent9bc177d8ded4ba498762813a0d5106005fef0e67 (diff)
Cycles: immediately store the used_shader list in Blender interface.
Uniform attributes require immediate access to the shader list in object update code, so setting the field can't be deferred to a background task. This required adding a parameter to the clear method of Geometry. Ref D2057
Diffstat (limited to 'intern/cycles/blender/blender_curves.cpp')
-rw-r--r--intern/cycles/blender/blender_curves.cpp10
1 files changed, 3 insertions, 7 deletions
diff --git a/intern/cycles/blender/blender_curves.cpp b/intern/cycles/blender/blender_curves.cpp
index 6288c370567..32aa25354c4 100644
--- a/intern/cycles/blender/blender_curves.cpp
+++ b/intern/cycles/blender/blender_curves.cpp
@@ -352,7 +352,7 @@ static void ExportCurveSegments(Scene *scene, Hair *hair, ParticleCurveData *CDa
/* check allocation */
if ((hair->curve_keys.size() != num_keys) || (hair->num_curves() != num_curves)) {
VLOG(1) << "Allocation failed, clearing data";
- hair->clear();
+ hair->clear(true);
}
}
@@ -817,10 +817,7 @@ void BlenderSync::sync_hair(Hair *hair, BL::Object &b_ob, bool motion, int motio
}
#endif
-void BlenderSync::sync_hair(BL::Depsgraph b_depsgraph,
- BL::Object b_ob,
- Hair *hair,
- const vector<Shader *> &used_shaders)
+void BlenderSync::sync_hair(BL::Depsgraph b_depsgraph, BL::Object b_ob, Hair *hair)
{
/* Compares curve_keys rather than strands in order to handle quick hair
* adjustments in dynamic BVH - other methods could probably do this better. */
@@ -829,8 +826,7 @@ void BlenderSync::sync_hair(BL::Depsgraph b_depsgraph,
oldcurve_keys.steal_data(hair->curve_keys);
oldcurve_radius.steal_data(hair->curve_radius);
- hair->clear();
- hair->used_shaders = used_shaders;
+ hair->clear(true);
if (view_layer.use_hair) {
if (b_ob.type() == BL::Object::type_HAIR) {