BakeContext
Up and coming: shot check knows this class and its members today, and programs run it once the native runtime lands.
Up and coming
Merge many textured meshes into one texture: bake their colours or normals onto one mesh's UVs.
Get one from MeshService:CreateBakeContext(target, "Diffuse" or "Normal"). Add each source mesh, in the same space as the target, with its texture or its vertex colours, then BakeAsync returns the texture. The bake runs in Blender in a folder of its own, so two bakes at once never overwrite each other, and a failure comes back as an error.
Properties
| Name | Type | Default | Description |
|---|---|---|---|
| Target | EditableMesh | The mesh whose UV layout the textures are baked onto. | |
| BakeType | "Diffuse" | "Normal" | Diffuse bakes colour, Normal bakes normals. | |
| Size | Vector2 | The output texture's size, 1024 by 1024 by default. | |
| Margin | number | Pixels bled past each island's edge. |
Methods
| Name | Arguments | Returns | Description |
|---|---|---|---|
| Add | (source: EditableMesh, texture: EditableImage?) | () | Adds a source mesh in Target's space with its texture, or its vertex colours when the texture is nil. |
| BakeAsync yields | () | (EditableImage?, string?) | Runs the bake in a temporary folder of its own, waits, and returns the baked texture. |
From ShotInstance 33
ClassNameNameParentAncestryChangedAttributeChangedChangedChildAddedChildRemovedDestroyingAddTagClearAllChildrenCloneDestroyFindFirstAncestorFindFirstAncestorOfClassFindFirstAncestorWhichIsAFindFirstChildFindFirstChildOfClassFindFirstChildWhichIsAGetAttributeGetAttributeChangedSignalGetAttributesGetChildrenGetDescendantsGetFullNameGetPropertyChangedSignalGetTagsHasTagIsAIsAncestorOfIsDescendantOfRemoveTagSetAttribute
