Fix #29695: cycles particle emitter not being properly hidden.
authorBrecht Van Lommel <brechtvanlommel@pandora.be>
Mon, 2 Jan 2012 19:44:13 +0000 (19:44 +0000)
committerBrecht Van Lommel <brechtvanlommel@pandora.be>
Mon, 2 Jan 2012 19:44:13 +0000 (19:44 +0000)
intern/cycles/blender/blender_object.cpp

index 608c5fda5ac356cc15dfba80e053fda4f2e3f815..caf5b0a99b1b5bf0fbdcfc7868e1a6160eae167a 100644 (file)
@@ -234,13 +234,20 @@ void BlenderSync::sync_objects(BL::SpaceView3D b_v3d)
 
                                object_free_duplilist(*b_ob);
 
-                               /* check if we should render duplicator */
                                hide = true;
-                               BL::Object::particle_systems_iterator b_psys;
+                       }
+
+                       /* check if we should render or hide particle emitter */
+                       BL::Object::particle_systems_iterator b_psys;
+                       bool render_emitter = false;
 
-                               for(b_ob->particle_systems.begin(b_psys); b_psys != b_ob->particle_systems.end(); ++b_psys)
-                                       if(b_psys->settings().use_render_emitter())
-                                               hide = false;
+                       for(b_ob->particle_systems.begin(b_psys); b_psys != b_ob->particle_systems.end(); ++b_psys) {
+                               if(b_psys->settings().use_render_emitter()) {
+                                       hide = false;
+                                       render_emitter = true;
+                               }
+                               else if(!render_emitter)
+                                       hide = true;
                        }
 
                        if(!hide) {