Platform:
Language:
Exploration
Learn how to use the CreativeEditor SDK's CreativeEngine to explore scenes through the block
API.
Setup#
This example uses the headless CreativeEngine. See the Setup article for a detailed guide.
To get started right away, you can also access the block
API within a running CE.SDK instance via cesdk.engine.block
.
Check out the APIs Overview to see that illustrated in more detail.
Functions#
findAll(): number[]
returns an array with the ids of all the blocks in the scene.
findAllPlaceholders(): number[]
returns an array with the ids of all placeholder blocks in the scene.
findByType(type: string): number[]
returns an array with the ids of all the blocks in the scene that have the requested type.
findByName(name: string): number[]
returns an array with the ids of all the blocks in the scene that have the requested name.
File:
const allIds = engine.block.findAll();const allPlaceholderIds = engine.block.findAllPlaceholders();const allStars = engine.block.findByType('shapes/star');const ids = engine.block.findByName('someName');