Cycles: fix missing particle panels and show emitter option not being respected.
authorBrecht Van Lommel <brechtvanlommel@pandora.be>
Thu, 10 Nov 2011 16:02:46 +0000 (16:02 +0000)
committerBrecht Van Lommel <brechtvanlommel@pandora.be>
Thu, 10 Nov 2011 16:02:46 +0000 (16:02 +0000)
intern/cycles/blender/addon/ui.py
intern/cycles/blender/blender_object.cpp

index 01b358869ecbab6f99cd59fdb76f5caa4334158d..7c7d4c81b896872169a45c083d2d78dbffc80b6f 100644 (file)
@@ -735,7 +735,22 @@ def get_panels():
         bpy.types.TEXTURE_PT_distortednoise,
         bpy.types.TEXTURE_PT_voxeldata,
         bpy.types.TEXTURE_PT_pointdensity,
-        bpy.types.TEXTURE_PT_pointdensity_turbulence]
+        bpy.types.TEXTURE_PT_pointdensity_turbulence,
+        bpy.types.PARTICLE_PT_context_particles,
+        bpy.types.PARTICLE_PT_emission,
+        bpy.types.PARTICLE_PT_hair_dynamics,
+        bpy.types.PARTICLE_PT_cache,
+        bpy.types.PARTICLE_PT_velocity,
+        bpy.types.PARTICLE_PT_rotation,
+        bpy.types.PARTICLE_PT_physics,
+        bpy.types.PARTICLE_PT_boidbrain,
+        bpy.types.PARTICLE_PT_render,
+        bpy.types.PARTICLE_PT_draw,
+        bpy.types.PARTICLE_PT_children,
+        bpy.types.PARTICLE_PT_field_weights,
+        bpy.types.PARTICLE_PT_force_fields,
+        bpy.types.PARTICLE_PT_vertexgroups,
+        bpy.types.PARTICLE_PT_custom_props]
 
 def register():
     bpy.types.RENDER_PT_render.append(draw_device)
index 1095a3ee0264eb62d9a0e1573881fe8c91159ef3..0edac820e94c54aa7038b35e35e39b268ef2fb71 100644 (file)
@@ -229,8 +229,17 @@ 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;
+
+                               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;
                        }
-                       else {
+
+                       if(!hide) {
                                /* object itself */
                                Transform tfm = get_transform(b_ob->matrix_world());
                                sync_object(*b_ob, 0, *b_ob, tfm, visibility);