ProtectedconstructorOptionalisInternalConstructor: booleanStaticapplyUpdates the contents of the template with the contents of a provided scene object.
SceneObject to save as a template
The template resource to save to.
OptionalautoApply: booleanStaticapplyUpdates the contents of the template with the contents of the provided template instance. If the provided object is not a template instance nothing happens. All template instances in all open scenes will have their diffs recorded, and will be updated after the apply operation is done.
Template instance whose template to update.
The template to apply.
Object signaling status and return value of the operation.
StaticapplyUpdates the contents of the template with the contents of the provided sceneObject.
The sceneObject must be a template instance. If it is not a template instance, an error
is logged to the console.
SceneObject that is part of a template instance to apply to the template resource.
StaticassignPopulates Template UUIDs of the provided scene object. The template UUIDs are taken from the provided template object UUIDs. Both of the hierarchies must match identically. Also ensures all objects in the instance hierarchy have the provided template resource UUID link, essentially breaking any nested template links.
StaticbreakBreaks the link between a template instance and its template. Object will retain all current values but will no longer be influenced by modifications to its parent template.
Template instance whose link to break.
StaticbreakBreaks the template link for the provided scene objects.
The undo/redo information structure.
The scene objects to break the template link for.
OptionalfnOnSuccess: (() => void)An optional callback that is invoked on success.
OptionalfnOnError: ((errorMessage: string) => void)An optional callback that is invoked on error.
StaticcreateCreates a new template from the provided scene object hierarchy, and makes the scene object an instance of the template if succesful.
Scene object hierarchy from which to create the template.
Virtual path at which to store the template in.
Object signaling status and return value of the operation.
StaticcreateCreates a new template from the provided scene object and stores it in the library.
Objects to create the template from. Once template save is completed the object will be converted to the instance of the template.
Path at which to store the template.
OptionalfnOnSuccess: ((result: TemplateOperationResult) => void)OptionalfnOnError: ((errorMessage: string) => void)StaticcreateCreates a template from the selected scene objects, the object will be grouped in a new parent if needed, can be undone.
The undo/redo information structure.
The scene objects to create a template from.
The directory in the library where to save the template.
OptionallibraryPathContainsName: booleanOptionalfnOnSuccess: ((result: TemplateOperationResult, templateLibraryPath: LibraryIdentifierPath, templateRoot: SceneObject) => void)OptionalfnOnError: ((errorMessage: string) => void)True if the template creation operation was started.
StaticgatherGathers all affectted SceneNodes by a template save operation.
The root to start gathering new objects fron.
A vector of all new scene nodes on the template instance.
StaticgetGets a string that represents a template delta. This is only a debug representation and should not be used to parse or extract more informatio about the template.
StaticgetReturns the root object of the template instance that this object belongs to, if any.
Scene object to retrieve the template parent for.
Template parent of the provided object, or null if the object is not part of a template instance.
StaticgetReturns the UUID of the template attached to the provided scene object.
Scene object to retrieve the template UUID for.
Template UUID if the object is part of a template, empty uuid otherwise.
StaticisChecks if a scene object has a template link. Scene objects with a template link will be automatically updated when their template changes in order to reflect its changes.
Scene object to check if it has a template link.
True if the object is a template instance (has a template link), false otherwise.
StaticrecordStaticrecordUpdates the internal template delta data by recording the difference between the current values in provided template instance.
Scene object that is part of the template instance for which to record the deltas for.
OptionalisRecursive: booleanIf true, will recursively record deltas for all children templates, alongside a delta the scene object.
StaticrecordUpdates the internal template delta data by recording the difference between the current values in template instances that are children of the provided object hierarchy.
Scene object at the root of the hierarchy to record template deltas for. Deltas will not be recorded for the root itself, in case it is also a template instance.
StaticresaveResaves all template resources that have the given templateResource as a nested template.
StaticrevertRemove any instance specific changes to the object or its hierarchy from the provided template instance and restore it to the exact copy of the linked template.
Object to revert.
StaticupdateUpdates all template instances of the given template in currently loaded scenes.
The template resource to update the instances for. Null if all instances should be updated.
OptionalisUpdatingNonInstantiatedOnly: booleanIf true, only template instances that have not been instantiated properly yet are updated.
StaticupdateUpdates a template instance to the most recent version of the object from the template resource.
Object to update.
Optionalflags: EnumValue<TemplateInstanceUpdateFlag, number>StaticupdateUpdates multiple template instances to the most recent version of the object from the template resources. Use this over updateInstanceFromTemplate if it is possible that one object has moved from one template instance to another. Calling this method with both instances instead of separate calls to updateInstanceFromTemplate ensures that UUIDs are resolved properly.
The template instances to update.
Optionalflags: EnumValue<TemplateInstanceUpdateFlag, number>Flags that determine the update behavior.
StaticupdateUpdates all template instances in the scene to their most recent version, as stored in the Template resource. Any instance specific changes are preserved.
Scene instance to update.
The template resource to update the instances for. Null if all instances should be updated.
OptionalisUpdatingNonInstantiatedOnly: booleanIf true, only template instances that have not been instantiated properly yet are updated.
StaticupdateUpdates all instances of the nestedTemplate in the templateResource.
The template resource to update.
The template resource of the instances to update.
The TemplateUtility class provides various template specific utilities and helpers to interact with Template and SceneObject instances.