ComponentManager – Aspire Only

From SDK
Jump to navigation Jump to search
Back.jpg

This object is responsible for managing all the components within the application. A reference to the ComponentManager is obtained via the ComponentManager property of the VectricJob. The ComponentManager manages all the Components in the job.

local component_manager = job.ComponentManager

Methods

:AddRelief(Relief relief, CombineMode combine_mode, string name)

Creates a Component from a Relief and returns the UUID of the component created relief (Relief) The relief to add as a component combineMode (CombineMode) The combine mode to assign to the component name (String) The name to give to the component created from the relief

:FindObjectIdWithName(string name)

Returns: the UUID of the component with the specified name
name(string) Name for the component to find

:FindObjectWithId(UUID uuid)

Returns: the Component with the given id
uuid (UUID) The unique id of the component to find

:GetSelectedObjectIds()

Returns: a UUID_List containing the UUIDs of the currently selected components

:GetTopLevelObjectIds()

Returns: a UUID_List containing the UUIDs of the top level components in the component tree

:DeleteObjectWithId(UUID uuid)

Returns: (bool) true if the Component with the given is UUID deleted
uuid (UUID) The unique id of the component to delete

:DeleteObjectsWithIds(UUID_List uuids)

Returns: (bool) true if the Components with the UUIDs in the list are successfully deleted uuids (UUID_List) The unique ids of the components to delete

:CreateBakedCopyOfObjects(UUID_List uuids, bool delete_originals)

Returns: the UUID of the created component uuids (UUID_List) The list of component ids to bake
delete_orignal(bool) If true delete the original components

:CreateBakedCopyOfObject(UUID uuid, bool delete_originals)

Returns: the UUID of the created Component
uuid (UUID) The id of the component to bake
delete_orignal(bool) If true delete the original components

:GroupSelectedObjects()

Group the currently selected components.

Returns: the UUID of the grouped component

:GroupObjectsWithIds(UUID_List uuids)

Group the Components with the ids in the list.

Returns: the UUID of the grouped component uuids (UUID_List) The unique ids of the components to group

:UnGroupSelectedObjects()

Ungroup the currently selected components.

Returns: (bool) true if the ungroup was successful

:UnGroupObjectsWithId(UUID uuid)

Ungroup the Component with the given UUID in the list.

Returns: (bool) true if the component was ungrouped uuid (UUID)
The unique id of the component to ungroup

:SelectionCanBeGrouped()

Returns: (bool) true if the selection can be grouped

:SelectionCanBeUngrouped()

Returns: (bool) true if the selection can be ungrouped

:CloneObjectWithId(UUID uuid, bool make_unique)

Returns: the cloned version of the Component
uuid(UUID) The id of the component to clone
make_unique(bool) If true make a deep copy of the component

:CreateReliefFromObjectWithId(UUID uuid)

Returns: a Relief cloned from the Component with the given id
uuid(UUID) The id of the component to clone a relief from

:ReplaceComponentRelief(UUID target_uuid, UUID source_uuid)

Returns: (bool) true if the ComponentManager was able to replace the target components Relief with that of the source
target_uuid(UUID) The id of the component whose relief we are to replace 
source_uuid(UUID) The id of the component whose relief we are to use as the replacement

:UpdateCompositeModel()

Updates the Composite Model. This method should always be called when you have completed a set of Component operations to ensure that the Composite Model displayed to the user is up to date.

:CreateReliefFromCompositeModel()

Creates a Relief from the Compsite Model

:UpdatePreviews()

Updates the Component Previews in the 2D view. This method should always be called when you have completed a set of Component operations to ensure that the Component Previews are correctly positioned


Back.jpg

References

Please Note: The base material for the contents found in this WiKi was sourced from Vectric Lua Interface for Gadgets, version 10.0, published August 21, 2019. by Vectric Ltd. Most current document from Vertric can be downloaded at Vertric Developer Information