Example #1
0
StringDictionary EntityBrowser<BaseGroup>::get_entities(const string& type) const
{
    return
        type == "color" ? build_entity_dictionary(m_base_group.colors()) :
        type == "texture_instance" ? build_entity_dictionary(m_base_group.texture_instances()) :
        StringDictionary();
}
Example #2
0
StringDictionary EntityBrowser<Scene>::get_entities(const string& type) const
{
    return
        type == "camera" ? build_entity_dictionary(m_scene.cameras()) :
        type == "environment_edf" ? build_entity_dictionary(m_scene.environment_edfs()) :
        type == "environment_shader" ? build_entity_dictionary(m_scene.environment_shaders()) :
        EntityBrowser<BaseGroup>::get_entities(type);
}
StringDictionary EntityBrowser<BaseGroup>::get_entities(const string& type) const
{
    if (type == "color")
    {
        return build_entity_dictionary(m_base_group.colors());
    }
    else if (type == "texture_instance")
    {
        return build_entity_dictionary(m_base_group.texture_instances());
    }
    else
    {
        return StringDictionary();
    }
}
StringDictionary EntityBrowser<Scene>::get_entities(const string& type) const
{
    if (type == "environment_edf")
    {
        return build_entity_dictionary(m_scene.environment_edfs());
    }
    else if (type == "environment_shader")
    {
        return build_entity_dictionary(m_scene.environment_shaders());
    }
    else
    {
        return EntityBrowser<BaseGroup>::get_entities(type);
    }
}
Example #5
0
StringDictionary EntityBrowser<Assembly>::get_entities(const string& type) const
{
    StringDictionary entities =
        type == "bsdf" ? build_entity_dictionary(m_assembly.bsdfs()) :
        type == "bssrdf" ? build_entity_dictionary(m_assembly.bssrdfs()) :
        type == "edf" ? build_entity_dictionary(m_assembly.edfs()) :
        type == "material" ? build_entity_dictionary(m_assembly.materials()) :
        type == "surface_shader" ? build_entity_dictionary(m_assembly.surface_shaders()) :
        type == "environment_edf" ? build_entity_dictionary(get_parent_scene(&m_assembly)->environment_edfs()) :
        type == "environment_shader" ? build_entity_dictionary(get_parent_scene(&m_assembly)->environment_shaders()) :
        EntityBrowser<BaseGroup>::get_entities(type);

    const Assembly* parent_assembly = dynamic_cast<const Assembly*>(m_assembly.get_parent());

    if (parent_assembly)
    {
        merge_dictionary(entities, EntityBrowser<Assembly>(*parent_assembly).get_entities(type));
    }
    else
    {
        const Scene* parent_scene = dynamic_cast<const Scene*>(m_assembly.get_parent());
        assert(parent_scene);

        merge_dictionary(entities, EntityBrowser<Scene>(*parent_scene).get_entities(type));
    }

    return entities;
}
Example #6
0
StringDictionary EntityBrowser<Assembly>::get_entities(const string& type) const
{
    if (type == "bsdf")
    {
        return build_entity_dictionary(m_assembly.bsdfs());
    }
    else if (type == "color")
    {
        return build_entity_dictionary(m_assembly.colors());
    }
    else if (type == "edf")
    {
        return build_entity_dictionary(m_assembly.edfs());
    }
    else if (type == "material")
    {
        return build_entity_dictionary(m_assembly.materials());
    }
    else if (type == "surface_shader")
    {
        return build_entity_dictionary(m_assembly.surface_shaders());
    }
    else if (type == "texture_instance")
    {
        return build_entity_dictionary(m_assembly.texture_instances());
    }
    else
    {
        return StringDictionary();
    }
}
Example #7
0
StringDictionary EntityBrowser<Scene>::get_entities(const string& type) const
{
    if (type == "color")
    {
        return build_entity_dictionary(m_scene.colors());
    }
    else if (type == "environment_edf")
    {
        return build_entity_dictionary(m_scene.environment_edfs());
    }
    else if (type == "environment_shader")
    {
        return build_entity_dictionary(m_scene.environment_shaders());
    }
    else if (type == "texture_instance")
    {
        return build_entity_dictionary(m_scene.texture_instances());
    }
    else
    {
        return StringDictionary();
    }
}