Ejemplo n.º 1
0
static bool object_render_hide(BL::Object b_ob, bool top_level, bool parent_hide, bool& hide_triangles)
{
    /* check if we should render or hide particle emitter */
    BL::Object::particle_systems_iterator b_psys;

    bool hair_present = false;
    bool show_emitter = false;
    bool hide = false;

    for(b_ob.particle_systems.begin(b_psys); b_psys != b_ob.particle_systems.end(); ++b_psys) {
        if((b_psys->settings().render_type() == BL::ParticleSettings::render_type_PATH) &&
                (b_psys->settings().type()==BL::ParticleSettings::type_HAIR))
            hair_present = true;

        if(b_psys->settings().use_render_emitter()) {
            hide = false;
            show_emitter = true;
        }
    }

    /* duplicators hidden by default, except dupliframes which duplicate self */
    if(b_ob.is_duplicator())
        if(top_level || b_ob.dupli_type() != BL::Object::dupli_type_FRAMES)
            hide = true;

    /* hide original object for duplis */
    BL::Object parent = b_ob.parent();
    if(parent && object_render_hide_original(parent.dupli_type()))
        if(parent_hide)
            hide = true;

    hide_triangles = (hair_present && !show_emitter);
    return hide && !show_emitter;
}
Ejemplo n.º 2
0
static bool object_render_hide_duplis(BL::Object b_ob)
{
	BL::Object parent = b_ob.parent();

	return (parent && object_render_hide_original(b_ob.type(), parent.dupli_type()));
}