[Bf-blender-cvs] [83f2012] master: Fix T39341: Cycles Rendered view laggy while using particles.

Lukas Tönne noreply at git.blender.org
Mon Mar 24 13:16:21 CET 2014


Commit: 83f2012300acadafd359307e7a00bd71e67e3fd7
Author: Lukas Tönne
Date:   Mon Mar 24 12:53:36 2014 +0100
https://developer.blender.org/rB83f2012300acadafd359307e7a00bd71e67e3fd7

Fix T39341: Cycles Rendered view laggy while using particles.

There are a couple of bugs that come together here:
* Particle hacks: extra modifier stack evaluation just for particles in
rna_Object_create_duplilist. This is where the primary issue stems from,
the "for_render" setting replaced the G.is_rendering flag in threaded
depsgraph. This causes particles to recalculate the entire modifier
stack with _render_ settings instead of viewport settings now. Fixed by
taking the 'preview' parameter in Cycles into account.
* Buggy skin modifier: The skin modifier generates a different amount of
vertices and faces **on every execution**. This must be looked at
separately, but it could be another reason why cycles constantly
restarted the sync process.
* Particles get re-distributed randomly every time (changing seed). This
could be caused just by the broken skin modifier, but might still be an
issue when simply rendering with cycles, since the psys will be
evaluated for render settings, if just temporarily.

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

M	intern/cycles/blender/blender_object.cpp

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

diff --git a/intern/cycles/blender/blender_object.cpp b/intern/cycles/blender/blender_object.cpp
index 2ea0b27..ec53ebe 100644
--- a/intern/cycles/blender/blender_object.cpp
+++ b/intern/cycles/blender/blender_object.cpp
@@ -432,6 +432,11 @@ void BlenderSync::sync_objects(BL::SpaceView3D b_v3d, int motion)
 	/* object loop */
 	BL::Scene::objects_iterator b_ob;
 	BL::Scene b_sce = b_scene;
+	/* modifier result type (not exposed as enum in C++ API)
+	 * 1 : eModifierMode_Realtime
+	 * 2 : eModifierMode_Render
+	 */
+	bool dupli_settings = preview ? 1 : 2;
 
 	bool cancel = false;
 
@@ -446,7 +451,7 @@ void BlenderSync::sync_objects(BL::SpaceView3D b_v3d, int motion)
 
 				if(b_ob->is_duplicator() && !object_render_hide_duplis(*b_ob)) {
 					/* dupli objects */
-					b_ob->dupli_list_create(b_scene, 2);
+					b_ob->dupli_list_create(b_scene, dupli_settings);
 
 					BL::Object::dupli_list_iterator b_dup;




More information about the Bf-blender-cvs mailing list