Search in sources :

Example 1 with FilePropertyProvider

use of com.talosvfx.talos.editor.addons.scene.utils.FilePropertyProvider in project talos by rockbite.

the class PrefabMetadata method getPropertyProviders.

@Override
public Iterable<IPropertyProvider> getPropertyProviders() {
    Array<IPropertyProvider> propertyProviders = new Array<>();
    propertyProviders.add(new FilePropertyProvider(currentFile));
    Prefab prefab = new Prefab();
    prefab.path = currentFile.path();
    prefab.loadFromPath();
    GameObject root = prefab.root;
    Iterable<IPropertyProvider> rootProviders = root.getPropertyProviders();
    for (IPropertyProvider provider : rootProviders) {
        propertyProviders.add(provider);
    }
    return propertyProviders;
}
Also used : Array(com.badlogic.gdx.utils.Array) FilePropertyProvider(com.talosvfx.talos.editor.addons.scene.utils.FilePropertyProvider) GameObject(com.talosvfx.talos.editor.addons.scene.logic.GameObject) IPropertyProvider(com.talosvfx.talos.editor.widgets.propertyWidgets.IPropertyProvider) Prefab(com.talosvfx.talos.editor.addons.scene.logic.Prefab)

Aggregations

Array (com.badlogic.gdx.utils.Array)1 GameObject (com.talosvfx.talos.editor.addons.scene.logic.GameObject)1 Prefab (com.talosvfx.talos.editor.addons.scene.logic.Prefab)1 FilePropertyProvider (com.talosvfx.talos.editor.addons.scene.utils.FilePropertyProvider)1 IPropertyProvider (com.talosvfx.talos.editor.widgets.propertyWidgets.IPropertyProvider)1