[Bf-blender-cvs] [0582da4970f] cycles_procedural_api: avoid computing object bounds if nothing is modified

Kévin Dietrich noreply at git.blender.org
Fri Nov 6 18:48:00 CET 2020


Commit: 0582da4970f84974c3966b7e633b63cc743a9882
Author: Kévin Dietrich
Date:   Fri Nov 6 09:35:15 2020 +0100
Branches: cycles_procedural_api
https://developer.blender.org/rB0582da4970f84974c3966b7e633b63cc743a9882

avoid computing object bounds if nothing is modified

===================================================================

M	intern/cycles/render/object.cpp

===================================================================

diff --git a/intern/cycles/render/object.cpp b/intern/cycles/render/object.cpp
index 41566bbcc4f..4cf771646d8 100644
--- a/intern/cycles/render/object.cpp
+++ b/intern/cycles/render/object.cpp
@@ -163,6 +163,10 @@ void Object::update_motion()
 
 void Object::compute_bounds(bool motion_blur)
 {
+  if (!is_modified() && !geometry->is_modified()) {
+    return;
+  }
+
   BoundBox mbounds = geometry->bounds;
 
   if (motion_blur && use_motion()) {



More information about the Bf-blender-cvs mailing list