Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@thegrid22593
Last active May 9, 2018 15:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save thegrid22593/ca2eb0c2ffe23f3b5943e4fbfa4273ce to your computer and use it in GitHub Desktop.
Save thegrid22593/ca2eb0c2ffe23f3b5943e4fbfa4273ce to your computer and use it in GitHub Desktop.
list of ways to use the api
## Change Visiblity on an Object
```
// visible
api.scene.setAll({ name: 'object_name', plug: 'Properties', property: 'visible' }, true);
// invisible
api.scene.setAll({ name: 'object_name', plug: 'Properties', property: 'visible' }, false);
```
## Get All Materials
```
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);
}
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment