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 library 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.
Virtual library path at which to store the template.
OptionalfnOnSuccess: (result: TemplateOperationResult) => voidOptionalfnOnError: (errorMessage: string) => voidStaticcreateCreates 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: (OptionalfnOnError: (errorMessage: string) => voidTrue 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.
StaticgetComputes and returns a debug string representation of the template delta for the provided scene object. The delta is computed on the fly against the template version the instance was last synced to.
Scene object to compute the template delta debug string for.
Debug string of the template delta, or empty string if the object is not a template instance.
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.
StaticisChecks if a template instance root is out of date relative to its template resource.
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 unversioned instances of the given template across all currently loaded scenes. Instances that have a pinned template version are skipped; use UpdateInstanceFromTemplate for those.
The template resource to update the instances for.
StaticupdateUpdates a template instance to the most recent version of the object from the template resource.
Object to update.
Optionalflags: EnumValue<TemplateInstanceUpdateFlag>
Flags that determine the update behavior.
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>
Flags that determine the update behavior.
StaticupdateUpdates an internal template instance (keepTemplateInternals) to the most recent version from the provided template resource. Unlike UpdateInstanceFromTemplate, this does not require template link data (OriginObjectID, templateResource) on the instance.
The internal template instance root to update.
The template resource to update from.
Optionalflags: EnumValue<TemplateInstanceUpdateFlag>
Flags that determine the update behavior.
StaticupdateUpdates unversioned instances of nestedTemplate within templateResource. Instances that have a pinned template version
are skipped.
The template resource to update.
The template resource of the instances to update.
StaticupdateUpdates unversioned template instances in the scene to their most recent version. Instances that have a pinned template version are skipped; use UpdateInstanceFromTemplate for those.
Scene instance to update.
The template resource to update the instances for. Null if all instances should be updated.
The TemplateUtility class provides various template specific utilities and helpers to interact with Template and SceneObject instances.