list of ways to use the api
// visible
api.scene.setAll({ name: 'object_name', plug: 'Properties', property: 'visible' }, true);
// invisible
api.scene.setAll({ name: 'object_name', plug: 'Properties', property: 'visible' }, false);
var materials = api.scene.getAll({ type: 'Material', property: 'name' });
for(var id in materials) {
var button = document.createElement('button');
button.innerText = materials[id];
button.onclick = onClick;
document.getElementById('buttons').appendChild(button);
}