b5.Utils
The Utils class is a utility class that provides functionality that doesn’t generally belong anywhere else or is shared across a number of systems
Methods
sortLayers(objs) – Sorts the supplied array of actor or scene objects by their layer property
getResFromType(parent, type) – Utility method that returns resource array based on specified resource type (used internally)
- parent – Resource parent container
- type – Type of resource to search for (brush, sound, shape, material, bitmap or geometry)
findObjectFromPath(path, type) – Finds an actor, scene, timeline or actions list object from a path of the form scene_name.actor_name….
- path – Path to object
- type – Type of object (timeline, actions, or undefined for actor or scene)
findResourceFromPath(path, type) – Finds a resource object from a path of the form scene_name.resource_name
- path – Path to resource
- type – Type of resource (brush, sound, shape, material, bitmap)
resolveObject(obj_or_path, type) – Takes an object or an object path and returns the found object
- obj_or_path – An instance of an object or path to the object
- type – Type of object (timeline, actions, or undefined for actor or scene)
resolveResource(res_or_path, type) – Takes a resource or a resource path and returns the found resource
- res_or_path – An instance of a resource or path to the resource
- type – Type of resource (brush, sound, shape, material, bitmap)
1,474 total views, 1 views today