ComponentManager – Aspire Only: Difference between revisions

From SDK
Jump to navigation Jump to search
(Created page with "Category:SDK right|50px|link=Aspire Only This object is responsible for managing all the components within the application. A reference to the ComponentM...")
 
No edit summary
Line 4: Line 4:


::''local component_manager = job.ComponentManager''
::''local component_manager = job.ComponentManager''


==Methods==
==Methods==


===:AddRelief(Relief relief, CombineMode combine_mode, string name)===
===:AddRelief(Relief relief, CombineMode combine_mode, string name)===
Line 20: Line 11:
relief (Relief) The relief to add as a component
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
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)===
===:FindObjectIdWithName(string name)===
'''Returns:''' the UUID of the component with the specified name
'''Returns:''' the UUID of the component with the specified name
name(string) Name for the component to find
name(string) Name for the component to find


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


===:GetSelectedObjectIds()===
===:GetSelectedObjectIds()===
'''Returns:''' a UUID_List containing the UUIDs of the currently selected components
'''Returns:''' a UUID_List containing the UUIDs of the currently selected components


===:GetTopLevelObjectIds()===
===:GetTopLevelObjectIds()===
'''Returns:''' a UUID_List containing the UUIDs of the top level components in the component tree
'''Returns:''' a UUID_List containing the UUIDs of the top level components in the component tree


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


===:DeleteObjectsWithIds(UUID_List uuids)===
===: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
'''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)===
===:CreateBakedCopyOfObjects(UUID_List uuids, bool delete_originals)===
'''Returns:''' the UUID of the created component uuids (UUID_List) The list of component ids to bake
'''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
delete_orignal(bool) If true delete the original components


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


===:GroupSelectedObjects()===
===:GroupSelectedObjects()===
Group the currently selected components.
Group the currently selected components.
'''Returns:''' the UUID of the grouped component
'''Returns:''' the UUID of the grouped component


===:GroupObjectsWithIds(UUID_List uuids)===
===:GroupObjectsWithIds(UUID_List uuids)===
Group the Components with the ids in the list.
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
'''Returns:''' the UUID of the grouped component uuids (UUID_List) The unique ids of the components to group


===:UnGroupSelectedObjects()===
===:UnGroupSelectedObjects()===
Ungroup the currently selected components.
Ungroup the currently selected components.
'''Returns:''' (bool) true if the ungroup was successful
'''Returns:''' (bool) true if the ungroup was successful


===:UnGroupObjectsWithId(UUID uuid)===
===:UnGroupObjectsWithId(UUID uuid)===
Line 172: Line 59:
'''Returns:''' (bool) true if the component was ungrouped uuid (UUID)
'''Returns:''' (bool) true if the component was ungrouped uuid (UUID)
The unique id of the component to ungroup
The unique id of the component to ungroup


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


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


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


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


===:ReplaceComponentRelief(UUID target_uuid, UUID source_uuid)===
===:ReplaceComponentRelief(UUID target_uuid, UUID source_uuid)===
Line 236: Line 80:
target_uuid(UUID) The id of the component whose relief we are to replace
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
source_uuid(UUID) The id of the component whose relief we are to use as the replacement


===:UpdateCompositeModel()===
===: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.
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()===
===:CreateReliefFromCompositeModel()===
Creates a Relief from the Compsite Model
Creates a Relief from the Compsite Model


===:UpdatePreviews()===
===: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
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




[[File:Back.jpg|right|50px|link=Aspire Only]]
[[File:Back.jpg|right|50px|link=Aspire Only]]
==References==
==References==
'''Please Note:''' The base material for the contents found in this WiKi was sourced from Vectric Lua Interface for Gadgets, version 2.05, published September 12, 2018. by Vectric Ltd. Most current document from Vertric can be downloaded at [https://gadgets.vectric.com/developerinfo.html Vertric Developer Information]
'''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 [https://gadgets.vectric.com/developerinfo.html Vertric Developer Information]

Revision as of 07:51, 4 August 2021

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