Create Texture
tb.ops.texture.create(
*,
name: str = "Texture",
width: int = 1024,
height: int = 1024,
color: Color4 = ...,
data: str = ...,
) -> Result
Create a texture in the scene's library: a blank image of one color (width × height, sRGB color with alpha), or from encoded PNG / JPEG / WebP data (base64, a data: URL works). A name already in use gets a numeric suffix. One undo step.
Export Texture
tb.ops.texture.export(
*,
texture: str,
delivery: Literal["inline", "chunks"] = "inline",
) -> Result
Read a texture's image: stored bytes unchanged, RGBA8 as PNG, or float pixels as lossless HALF/FLOAT OpenEXR, base64-encoded with a file name. Read-only; bounded host replies may omit large files.
Release Texture Export
tb.ops.texture.export.cancel(*, request: str) -> Result
Read Texture Export Bytes
tb.ops.texture.export.read(
*,
request: str,
offset: int = 0,
length: int = 49152,
) -> Result
Read at most 48 KiB as base64 with offset/length/total/eof. Release the same request with texture.export.cancel after delivery.
Get Texture Export Status
tb.ops.texture.export.status(*, request: str) -> Result
Import Texture
tb.ops.texture.import_(*, staged: str) -> Result
Add an image (PNG, JPEG) to the scene's texture library; materials can then use it. The image bytes are stored verbatim. A name already in use gets a numeric suffix.
Paint Advisories
tb.ops.texture.paint.advisories() -> Result
What changed since each texture set was painted: its UVs, the faces using it, the material inputs under the paint, or another texture set sharing its layers.
Import Alpha Tip
tb.ops.texture.paint.alpha.add(*, name: str = "Alpha", data: str) -> Result
Add an image as a brush tip (transparent images use their alpha, opaque ones their darkness). Returns its index; texture.paint.brush.set {tipMode: 'stamp', tipIndex} uses it.
List Alpha Tips
tb.ops.texture.paint.alpha.list() -> Result
The brush tip library: the built-in tips, then the imported ones. A tip's index is the brush tipIndex that stamps with it.
Remove Alpha Tip
tb.ops.texture.paint.alpha.remove(*, index: int) -> Result
Remove an imported tip (built-in tips stay). A brush stamping with it goes back to the round tip; later tips move down one index.
Accept Bake
tb.ops.texture.paint.bake.accept(
*,
material: MaterialRef,
executor: Literal["auto", "gpu", "cpu"] = ...,
) -> Result
Keep the open bake: its GPU result when ready, else baked now on the CPU. One undo step.
Cancel Bake
tb.ops.texture.paint.bake.cancel(*, material: MaterialRef) -> Result
Close the open bake of a texture set without keeping it (its GPU job stops).
Import Mesh Map
tb.ops.texture.paint.bake.import_(
*,
material: MaterialRef,
map: Literal["idMap", "ambientOcclusion", "curvature", "thickness", "normal", "position"] = "idMap",
texture: str = ...,
data: str = ...,
) -> Result
Use an image as a mesh map instead of baking it: an ID map painted or baked in another app, an AO map… Color Selection and the generators read it; re-bakes leave it alone. Importing the same map again replaces it. One undo step.
List Mesh-Map Bakes
tb.ops.texture.paint.bake.list() -> Result
The mesh-map bakes with their settings (keys, defaults, ranges) and the smart-mask generators built on them.
Open Bake
tb.ops.texture.paint.bake.open(
*,
material: MaterialRef,
bake: str = ...,
generator: str = ...,
record: str = ...,
layer: str = ...,
output: Literal["mask", "texture", "channel"] = ...,
into: str = ...,
settings: Any = ...,
channel: Literal["r", "g", "b", "luminance"] = ...,
size: int = ...,
popup: bool = True,
auto_accept: bool = False,
) -> Result
Open a bake for a texture set: in Texture Paint it runs on the GPU in the background with progress (the bake dialog shows it); accept keeps it, cancel drops it.
Re-bake
tb.ops.texture.paint.bake.rebake(
*,
material: MaterialRef,
all: bool = False,
records: Any = ...,
executor: Literal["auto", "gpu", "cpu"] = ...,
) -> Result
Re-bake the stale recipes (or all, or the named ones) after a UV or mesh change. One undo step.
List Bake Recipes
tb.ops.texture.paint.bake.records(*, material: MaterialRef) -> Result
A texture set's bake recipes (smart masks and mesh-map textures) and whether each is stale (its UV layout or surface changed).
Bake
tb.ops.texture.paint.bake.run(
*,
material: MaterialRef,
bake: str = ...,
generator: str = ...,
record: str = ...,
layer: str = ...,
output: Literal["mask", "texture", "channel"] = ...,
into: str = ...,
settings: Any = ...,
channel: Literal["r", "g", "b", "luminance"] = ...,
size: int = ...,
executor: Literal["auto", "gpu", "cpu"] = ...,
) -> Result
Bake a smart mask (on 'layer') or a mesh-map texture and keep it, in one call. One undo step.
Set Bake Settings
tb.ops.texture.paint.bake.set(
*,
material: MaterialRef,
settings: Any = ...,
channel: Literal["r", "g", "b", "luminance"] = ...,
) -> Result
Change the open bake's settings and / or mask channel; it restarts.
Bake State
tb.ops.texture.paint.bake.state(*, material: MaterialRef) -> Result
The open bake of a texture set: bake, settings, progress (0…1), where it runs, whether its result is ready, errors.
Refresh Paint Base
tb.ops.texture.paint.base.refresh(*, material: MaterialRef) -> Result
Rebuild the Base the layers paint over from the material's current color, roughness, metallic, emission and texture maps. One undo step.
Get Brush
tb.ops.texture.paint.brush.get() -> Result
Read the Texture Paint brush settings (size, strength, flow, hardness, spacing, angle, dynamics, jitter, smoothing, stabiliser, symmetry …).
Set Brush
tb.ops.texture.paint.brush.set(*, brush: Any) -> Result
Change the brush with a partial patch of its settings, e.g. {"size": 32, "hardness": 0.8}. Values are validated; nothing changes on an error.
Paint With Material
tb.ops.texture.paint.brush.use_material(*, source: MaterialRef) -> Result
The swatch of a material's PBR values — base color (sRGB), opacity, roughness, metallic, emission — for the brush to paint every channel at once (Texture Paint applies it to the primary swatch and enables its channels).
Add User Channel
tb.ops.texture.paint.channel.add(
*,
material: MaterialRef,
name: str = ...,
color: bool = False,
) -> Result
Add a user channel to a texture set (at most eight): gray, or color with 'color'. It is painted, filled and exported like the built-in channels (export tokens user0 …, userColor0.r / .g / .b …) but never drives the material.
Add Material Channel
tb.ops.texture.paint.channel.add_material(
*,
material: MaterialRef,
kind: Literal["clearcoat", "clearcoatRoughness", "sheen", "sheenRoughness", "anisotropy", "transmission", "thickness", "subsurface"],
) -> Result
Add a channel that drives a material input: Clear Coat, Sheen, Anisotropy, Transmission, Thickness, Subsurface and their kin. It paints, fills and exports like any channel (it takes one of the eight user slots), shows live in the viewport while painting, and publishing writes it into the material's slot.
Remove User Channel
tb.ops.texture.paint.channel.remove(
*,
material: MaterialRef,
channel: Literal["user0", "user1", "user2", "user3", "user4", "user5", "user6", "user7", "userColor0", "userColor1", "userColor2", "userColor3", "userColor4", "userColor5", "userColor6", "userColor7"],
) -> Result
Remove a user channel and everything painted or filled on it.
Rename User Channel
tb.ops.texture.paint.channel.rename(
*,
material: MaterialRef,
channel: Literal["user0", "user1", "user2", "user3", "user4", "user5", "user6", "user7", "userColor0", "userColor1", "userColor2", "userColor3", "userColor4", "userColor5", "userColor6", "userColor7"],
name: str,
) -> Result
Rename a user channel. Only the display name changes: its key (user0 …) and export presets stay as they are.
Set Clone Source
tb.ops.texture.paint.clone.set(
*,
source: Any | None = ...,
aligned: bool = ...,
mode: Literal["offset", "cloneUv"] = ...,
sample_layer: str = ...,
) -> Result
The Clone tool's source: an offset from the source point (UV; null clears it; Aligned keeps the offset between strokes) or the mesh's clone UV map (the same surface point laid out there).
Place Decal
tb.ops.texture.paint.decal.place(
*,
material: MaterialRef,
layer: str = ...,
texture: str = ...,
point: Any,
normal: Any,
up: Any = ...,
width: float,
aspect: float = ...,
angle: float = 0.0,
depth: float = ...,
max_angle: float = 80.0,
opacity: float = 1.0,
image_color: bool = True,
tile: bool = False,
swatch: Any = ...,
channels: Any = ...,
) -> Result
Project an image onto the surface into a paint layer (one undo step): anchored at a surface point, facing along its normal, with the image upright towards 'up'.
Add Layer Filter
tb.ops.texture.paint.effect.add(
*,
material: MaterialRef,
layer: str,
filter: Literal["blur", "sharpen", "warp", "mosaic", "directionalBlur", "slopeBlur", "directionalWarp", "bevel", "leaks", "edgeDamage", "bakedLighting", "highPass", "glow", "edgeDetect", "dilate", "erode", "median", "unsharpMask", "outline", "dropShadow", "innerShadow", "thresholdScan", "bandSelect", "heightToNormal", "hueSaturation", "brightnessContrast", "levels", "curves", "invert", "threshold", "posterize", "clamp", "grayscale", "colorBalance", "gradientMap", "replaceColor", "normalInvert", "exposure", "channelMixer", "valueShift", "sCurveContrast", "rangeCompress", "materialEffect"],
params: Any = ...,
) -> Result
Add a filter to a layer: blur, sharpen, hue/saturation, brightness/contrast, levels, curves or invert. It changes how the layer looks without touching its paint. One undo step.
Remove Layer Filter
tb.ops.texture.paint.effect.remove(
*,
material: MaterialRef,
layer: str,
effect: str,
) -> Result
Remove a filter from a layer. One undo step.
Set Layer Filter
tb.ops.texture.paint.effect.set(
*,
material: MaterialRef,
layer: str,
effect: str,
params: Any = ...,
enabled: bool = ...,
) -> Result
Change a layer filter's parameters (merged into the existing ones) or switch it on or off. Slider drags merge into one undo step.
Export Textures
tb.ops.texture.paint.export(
*,
preset: str = ...,
custom: Any = ...,
materials: Any = ...,
scale: float = 1.0,
format: Literal["png8", "png16", "jpeg", "tga", "tiff8", "tiff16", "tiff32", "bmp", "webp", "exr", "hdr"] = "png8",
padding: Any = ...,
normal_convention: Literal["opengl", "directx"] = ...,
height_range: Any = ...,
pattern: str = ...,
zip: bool = False,
download: bool = False,
job_id: str = ...,
) -> Result
Pack and encode the painted maps of one or more texture sets with a preset (glTF ORM, Unreal-style, Unity URP / HDRP, separate maps …). With download, Texture Paint hands the files (or one ZIP) to you.
Cancel Texture Export
tb.ops.texture.paint.export.cancel(*, job_id: str) -> Result
Drop a finished export that was not delivered yet.
Predict Texture Export
tb.ops.texture.paint.export.predict(
*,
preset: str = ...,
custom: Any = ...,
materials: Any = ...,
scale: float = 1.0,
format: Literal["png8", "png16", "jpeg", "tga", "tiff8", "tiff16", "tiff32", "bmp", "webp", "exr", "hdr"] = "png8",
padding: Any = ...,
normal_convention: Literal["opengl", "directx"] = ...,
height_range: Any = ...,
pattern: str = ...,
zip: bool = False,
) -> Result
The files an export would write — names, sizes, channel packing, skipped optional maps — without writing them.
Texture Export Presets
tb.ops.texture.paint.export.presets() -> Result
The texture export presets (built-ins, then plugin presets): outputs (file suffix, color space) and how each packs the painted channels into R, G, B and A.
Export Textures…
tb.ops.texture.paint.export_dialog(*, preset: str = ...) -> Result
Open the Export Textures dialog (presets, packed-channel previews, options).
Fill
tb.ops.texture.paint.fill(
*,
material: MaterialRef,
layer: str = ...,
mask: str = ...,
mode: Literal["layer", "island", "face", "materialSlot"] = "layer",
uv: Any = ...,
path: Any = ...,
view: Any = ...,
swatch: Any = ...,
channels: Any = ...,
blend: str = ...,
) -> Result
Fill a paint layer (or one of its masks) with a swatch: the whole layer, or the UV island / face / material slot at a UV point. Unset parameters come from the tool session: the paint target, the primary swatch, the written channels and blend; the paint restriction applies. One undo step.
Material Fill Layer
tb.ops.texture.paint.fill.material(
*,
staged: str = ...,
material: MaterialRef,
source: MaterialRef = ...,
layer: str = ...,
placement: ObjectRef = ...,
mapping: Any = ...,
parameters: Any = ...,
mask: Literal["none", "black", "white"] = "none",
name: str = ...,
parent: str = ...,
index: int = ...,
) -> Result
Add a fill layer that shows a material projected onto the texture set (UV, object-axis planar, tri-planar or decal mapping), or change an existing one's material / mapping. With mask 'black' it becomes a material layer: paint its mask to reveal the material in every channel. One undo step.
Refresh Material Fills
tb.ops.texture.paint.fill.refresh(
*,
staged: str = ...,
material: MaterialRef,
layers: Any = ...,
placement: ObjectRef = ...,
) -> Result
Re-project the texture set's material fills (all, or the named layers) after their source material or the mesh changed. One undo step.
Add Paint Layer
tb.ops.texture.paint.layer.add(
*,
material: MaterialRef,
kind: Literal["paint", "fill", "group", "adjustment"] = "paint",
name: str = ...,
parent: str = ...,
index: int = ...,
op: Literal["hueSaturation", "brightnessContrast", "levels", "curves", "invert"] = "hueSaturation",
params: Any = ...,
values: Any = ...,
) -> Result
Add a paint, fill, group or adjustment layer to a texture set (on top of its parent unless an index is given).
Clear Paint Layer
tb.ops.texture.paint.layer.clear(*, material: MaterialRef, layer: str) -> Result
Erase every painted pixel of a paint layer (its masks stay).
Convert to Paint Layer
tb.ops.texture.paint.layer.convert_to_paint(
*,
material: MaterialRef,
layer: str,
) -> Result
Replace a fill layer with a paint layer holding the same pixels, so it can be painted on. Name, blend, opacity, channel switches, masks and filters stay. One undo step.
Copy Paint Layers
tb.ops.texture.paint.layer.copy(
*,
material: MaterialRef,
layer: str = ...,
layers: Any = ...,
) -> Result
Copy layers (groups with their contents) to the layer clipboard. They paste into any texture set.
Cut Paint Layers
tb.ops.texture.paint.layer.cut(
*,
material: MaterialRef,
layer: str = ...,
layers: Any = ...,
) -> Result
Copy layers to the layer clipboard and delete them from this texture set.
Duplicate Paint Layers
tb.ops.texture.paint.layer.duplicate(
*,
material: MaterialRef,
layer: str = ...,
layers: Any = ...,
) -> Result
Copy layers (groups with their contents), each directly above itself. Painted tiles are shared until either copy is painted.
Export Layer
tb.ops.texture.paint.layer.export(
*,
material: MaterialRef,
layer: str,
download: bool = True,
) -> Result
Export one layer's channels as 8-bit PNGs (straight color, coverage in alpha) in one ZIP: the layer alone with its masks, at Normal 100 %. With download, Texture Paint hands the ZIP to you.
Flatten Paint Layer
tb.ops.texture.paint.layer.flatten(*, material: MaterialRef, layer: str) -> Result
Turn a paint or fill layer's content, filters and mask into plain paint. Its blend mode and opacity stay.
Group Paint Layers
tb.ops.texture.paint.layer.group(
*,
material: MaterialRef,
layer: str = ...,
layers: Any = ...,
name: str = "Group",
) -> Result
Put layers into a new group at the position of the topmost of them.
Instance Layer
tb.ops.texture.paint.layer.instance(
*,
material: MaterialRef,
layer: str,
into: MaterialRef = ...,
) -> Result
Add a layer that shows a paint layer or a material fill live, with its own blend, opacity, masks and filters. Painting the source changes the instance too, also in another texture set ('into'); removing the source leaves the instance as paint with its last look.
Merge Down
tb.ops.texture.paint.layer.merge_down(*, material: MaterialRef, layer: str) -> Result
Merge a layer into the paint layer directly below it. The result keeps the lower layer's name, blend, opacity and masks; the look does not change when the lower layer is Normal at 100 %.
Merge Group
tb.ops.texture.paint.layer.merge_group(*, material: MaterialRef, layer: str) -> Result
Flatten a group into one paint layer at its place, keeping the group's name, blend, opacity and masks.
Move Paint Layers
tb.ops.texture.paint.layer.move(
*,
material: MaterialRef,
layer: str = ...,
layers: Any = ...,
parent: str = ...,
index: int = ...,
) -> Result
Move layers to another position or into / out of a group. Several layers move as one block in their stack order; the index then counts the destination without them.
Paste Paint Layers
tb.ops.texture.paint.layer.paste(
*,
material: MaterialRef,
parent: str = ...,
index: int = ...,
) -> Result
Paste the layer clipboard into a texture set. Painted layers follow its resolution; channels it does not paint are left out.
Delete Paint Layers
tb.ops.texture.paint.layer.remove(
*,
material: MaterialRef,
layer: str = ...,
layers: Any = ...,
) -> Result
Delete layers (with everything inside groups), their masks and publications.
Rename Paint Layer
tb.ops.texture.paint.layer.rename(
*,
material: MaterialRef,
layer: str,
name: str,
) -> Result
Rename a layer.
Set Paint Layer Properties
tb.ops.texture.paint.layer.set(
*,
material: MaterialRef,
layer: str = ...,
layers: Any = ...,
visible: bool = ...,
locked: bool = ...,
opacity: float = ...,
blend: Literal["normal", "darken", "multiply", "colorBurn", "lighten", "screen", "colorDodge", "add", "overlay", "softLight", "linearLight", "difference", "subtract", "divide", "replace", "disable", "inverseDivide", "inverseSubtract", "exclusion", "linearBurn", "hardLight", "vividLight", "pinLight", "hue", "saturation", "color", "luminosity", "passThrough"] = ...,
normal_blend: Literal["combine", "replace"] = ...,
height_blend: Literal["mix", "add", "subtract", "max"] = ...,
masks_enabled: bool = ...,
height_mask: Any = ...,
mask_background: Literal["white", "black"] = ...,
color_tag: int = ...,
channels: Any = ...,
values: Any = ...,
) -> Result
Change a layer's visibility, lock, opacity, blend modes, mask switch or per-channel state. Slider drags merge into one undo step.
Ungroup Paint Layers
tb.ops.texture.paint.layer.ungroup(*, material: MaterialRef, layer: str) -> Result
Move a group's layers to its parent (in place) and delete the group.
Add Layer Mask
tb.ops.texture.paint.mask.add(
*,
material: MaterialRef,
layer: str,
kind: Literal["paint", "image", "generator", "anchor", "levels", "invert", "compare"] = "paint",
clear: Literal["white", "black"] = "white",
texture: str = ...,
value: float = ...,
generator: Literal["edgeWear", "cavity", "aoDirt", "thinParts", "topDust", "gradient", "grime", "colorSelection", "clouds", "cells", "scratches", "woodGrain", "weave", "brushedStreaks", "grunge", "bricks", "StreakNoise", "SpotsNoise", "RoundSpots", "Speckles", "CrystalPlates", "CrystalShards", "DirtNoise", "DustSpecks", "FurNoise", "SmoothValueNoise", "StainsNoise", "GrimeNoise", "StreakyGrunge", "LiquidNoise", "DampPatches", "PlasmaNoise", "ValueNoise", "DirectionalNoise", "FibersNoise", "MessyFibers", "LeatherNoise", "CellularTissue", "SoftSpots", "CrackleNoise", "SandDunes", "WoodRings", "MarbleNoise", "StonesNoise", "RipplesNoise", "ConcreteNoise", "BarkNoise", "SimplexNoise", "CracksNoise", "MirroredGradient", "Hexagons", "Polygon", "ShapePattern", "Star", "Stripes", "GridLines", "DotGrid", "DiamondTiles", "Herringbone", "Basketweave", "Chevron", "FishScales", "TriangleTiles", "Spiral", "Rings", "AxialGradient", "CrossShape", "RoundedRectangle", "RingShape", "FanPavement", "OctagonTiles", "Planks", "TreadPlate", "TilePattern", "Splatter", "ScratchesScatter", "PaintStrokes", "RustMask", "MossMask", "ShapeScatter", "PatternScatter", "TileScatter", "FloodFill", "ScratchField", "LeaksMask", "EdgeDamage"] = ...,
params: Any = ...,
anchor: str = ...,
channel: str = ...,
component: Literal["luminance", "r", "g", "b"] = ...,
) -> Result
Add an effect to a layer's mask: paint (the first one sets the mask's background: white reveals, black hides), image, generator or anchor point, or Levels / Invert / Compare on the mask so far.
Apply Mask
tb.ops.texture.paint.mask.apply(
*,
material: MaterialRef,
layer: str,
mask: str,
) -> Result
Bake a mask into its paint layer's pixels (pixels × mask), then remove the mask. One undo step.
Add Geometry Mask
tb.ops.texture.paint.mask.geometry(
*,
material: MaterialRef,
layer: str,
scope: Literal["island", "face", "materialSlot"],
ids: Any,
) -> Result
Show a layer only on whole parts of the mesh: adds a mask that is white on the parts (UV islands, faces or material slots) and black elsewhere.
Delete Layer Mask
tb.ops.texture.paint.mask.remove(
*,
material: MaterialRef,
layer: str,
mask: str,
) -> Result
Delete a mask and anything published from it.
Set Layer Mask
tb.ops.texture.paint.mask.set(
*,
material: MaterialRef,
layer: str,
mask: str,
enabled: bool = ...,
opacity: float = ...,
blend: Literal["multiply", "add", "subtract", "replace", "max", "min"] = ...,
invert: bool = ...,
black: float = ...,
white: float = ...,
gamma: float = ...,
generator: Literal["edgeWear", "cavity", "aoDirt", "thinParts", "topDust", "gradient", "grime", "colorSelection", "clouds", "cells", "scratches", "woodGrain", "weave", "brushedStreaks", "grunge", "bricks", "StreakNoise", "SpotsNoise", "RoundSpots", "Speckles", "CrystalPlates", "CrystalShards", "DirtNoise", "DustSpecks", "FurNoise", "SmoothValueNoise", "StainsNoise", "GrimeNoise", "StreakyGrunge", "LiquidNoise", "DampPatches", "PlasmaNoise", "ValueNoise", "DirectionalNoise", "FibersNoise", "MessyFibers", "LeatherNoise", "CellularTissue", "SoftSpots", "CrackleNoise", "SandDunes", "WoodRings", "MarbleNoise", "StonesNoise", "RipplesNoise", "ConcreteNoise", "BarkNoise", "SimplexNoise", "CracksNoise", "MirroredGradient", "Hexagons", "Polygon", "ShapePattern", "Star", "Stripes", "GridLines", "DotGrid", "DiamondTiles", "Herringbone", "Basketweave", "Chevron", "FishScales", "TriangleTiles", "Spiral", "Rings", "AxialGradient", "CrossShape", "RoundedRectangle", "RingShape", "FanPavement", "OctagonTiles", "Planks", "TreadPlate", "TilePattern", "Splatter", "ScratchesScatter", "PaintStrokes", "RustMask", "MossMask", "ShapeScatter", "PatternScatter", "TileScatter", "FloodFill", "ScratchField", "LeaksMask", "EdgeDamage"] = ...,
params: Any = ...,
anchor: str = ...,
channel: str = ...,
component: Literal["luminance", "r", "g", "b"] = ...,
anchor_generator: Literal["none", "edgeWear", "cavity"] = ...,
) -> Result
Change a mask's switch, opacity, blend, inversion, levels, or its generator and parameters. Slider drags merge into one undo step.
Prepare Material Raster
tb.ops.texture.paint.material.prepare_raster(
*,
operation: Literal["texture.paint.fill.material", "texture.paint.fill.refresh"],
params: Any,
) -> Result
Material Fill Status
tb.ops.texture.paint.material.status(*, material: MaterialRef) -> Result
The texture set's material fills: layer, source material (and whether it still exists), mapping and the channels it holds.
Add Path Layer
tb.ops.texture.paint.path.add(
*,
material: MaterialRef,
points: Any = ...,
closed: bool = ...,
fill: bool = ...,
view: Any = ...,
brush: Any = ...,
swatch: Any = ...,
staged: int = ...,
name: str = ...,
above: str = ...,
channels: Any = ...,
blend: str = ...,
material_brush: str = ...,
paint: bool = True,
) -> Result
Paint a path as its own layer: a stroke of the session's brush along a smooth curve through the control points (or the fill inside it), kept editable (texture.paint.path.set) and saved with the document. One undo step.
Edit Path
tb.ops.texture.paint.path.set(
*,
material: MaterialRef,
layer: str,
points: Any = ...,
closed: bool = ...,
fill: bool = ...,
view: Any = ...,
brush: Any = ...,
swatch: Any = ...,
staged: int = ...,
) -> Result
Change a path layer's control points, Closed, stroke or fill, view, brush or swatch; the layer paints its path again. One undo step.
Get Picker Options
tb.ops.texture.paint.picker.options.get() -> Result
Read this session's source, sample footprint and picker application options.
Set Picker Options
tb.ops.texture.paint.picker.options.set(
*,
source: Literal["composite", "layer"] = ...,
sample_size: int = ...,
all_channels: bool = ...,
keep_active: bool = ...,
expected_revision: int = ...,
) -> Result
Atomically patch session picker options; no authored Undo or project data changes.
Keep Painting on Changed Geometry
tb.ops.texture.paint.provenance.accept(*, material: MaterialRef) -> Result
Record the texture set's current UVs and faces as the ones it is painted on, so the drift notices stop. One undo step.
Keep Strokes on Changed Geometry
tb.ops.texture.paint.provenance.keep_strokes(
*,
material: MaterialRef,
staged: int = ...,
) -> Result
Move everything painted to where the same place on the surface lies now, after the UVs or the mesh changed (a reimport, a new unwrap). Fills re-rasterise; baked maps go stale. One undo step.
Clear Quick Mask
tb.ops.texture.paint.quick_mask.clear(*, material: MaterialRef) -> Result
Delete the texture set's quick mask; strokes in the mask start from empty again.
Set Quick Mask
tb.ops.texture.paint.quick_mask.set(
*,
material: MaterialRef,
enabled: bool = ...,
editing: bool = ...,
inverted: bool = ...,
) -> Result
Switch the quick mask: 'enabled' keeps strokes and fills inside the mask, 'editing' makes strokes paint the mask (and enables it), 'inverted' uses where the mask is not painted. Omitted switches stay as they are.
Clear Paint Restriction
tb.ops.texture.paint.restriction.clear() -> Result
Lift the paint restriction.
Restrict Painting
tb.ops.texture.paint.restriction.set(
*,
material: MaterialRef,
scope: Literal["island", "face", "materialSlot"],
ids: Any,
) -> Result
Paint only here: strokes and fills of the texture set reach only these UV islands, faces or material slots (scope ids as texture.paint.restriction ids; session state, not saved).
Sample Paint
tb.ops.texture.paint.sample(
*,
material: MaterialRef,
uv: Any,
source: Literal["composite", "layer", "idMap"] = ...,
layer: str = ...,
sample_size: int = ...,
all_channels: bool = ...,
set_color: bool = ...,
) -> Result
Pick the channel values under a UV: the composited stack, or one layer's own values. Source and size default to the picker options; setColor puts the pick into the primary swatch.
Apply Smart Material
tb.ops.texture.paint.smart.apply(
*,
material: MaterialRef,
smart: Any,
parent: str = ...,
index: int = ...,
) -> Result
Insert a smart material as a group: a built-in id (texture.paint.smart.list) or a saved smart material's JSON. One undo step. missingMaps names the mesh maps its generators read that the texture set has not baked (bake them for the coats to land where they should).
List Smart Materials
tb.ops.texture.paint.smart.list() -> Result
The built-in smart materials: layer groups of fills and live generators that adapt to the mesh maps.
Convert to UDIM Tiles
tb.ops.texture.paint.stack.convert_udim(*, material: MaterialRef) -> Result
Turn a one-texture set into a UDIM set covering every tile its UVs reach. What is painted stays as tile 1001, texel for texel (the size becomes the tile size); the other tiles start empty. Baked mesh maps go stale and fills re-rasterise.
Set Up Painting
tb.ops.texture.paint.stack.create(
*,
material: MaterialRef,
resolution: int = 2048,
uv_map: str = ...,
add_layer: bool = True,
udim: Literal["off", "on", "auto"] = "off",
) -> Result
Give a material paint layers (a texture set). The material's current color, roughness, metallic, emission and texture maps become the Base the layers paint over.
Prepare Texture Set
tb.ops.texture.paint.stack.ensure(
*,
material: MaterialRef,
resolution: int = ...,
) -> Result
Give a material its texture set with one empty paint layer, if it has none: UDIM tiles when its UVs reach beyond 1001. What Texture Paint does on entering.
Get Paint Stack
tb.ops.texture.paint.stack.get(*, material: MaterialRef) -> Result
Read a texture set's paint stack: layers, masks, channels, resolution and tile ids (no pixels).
Update Painted Textures
tb.ops.texture.paint.stack.publish(
*,
material: MaterialRef,
force: bool = False,
) -> Result
Write the texture set's composited channels as textures (base color + opacity, ORM, normal, emission) so every editor and every export shows the painting. Runs automatically when you leave Texture Paint or save; does nothing when the textures are current unless forced.
Set Paint Resolution
tb.ops.texture.paint.stack.set_resolution(
*,
material: MaterialRef,
resolution: int,
) -> Result
Change the pixel size of a texture set. Every painted layer and mask is resampled (box filter when shrinking, bilinear when growing, in linear light, premultiplied by coverage).
Set Tile Size
tb.ops.texture.paint.stack.udim_tile_size(
*,
material: MaterialRef,
tile: int,
size: int,
) -> Result
The resolution one UDIM tile paints and exports at: the set's tile size or a power-of-two step below it, 16 px at least (0 = the tile size). The tile's paint and masks are resampled to it.
Set UDIM Tiles
tb.ops.texture.paint.stack.udim_tiles(*, material: MaterialRef, tiles: int) -> Result
Change how many UDIM tiles the set paints. Kept tiles stay as they are, tiles past the new count lose their pixels (reported in dropped: per UDIM number, the texels that held paint), and 0 turns UDIM off: tile 1001 becomes the one texture. One undo step; baked mesh maps go stale and fills re-rasterise.
Set Stencil
tb.ops.texture.paint.stencil.set(
*,
texture: str | None = ...,
center: Any = ...,
size: Any = ...,
angle: float = ...,
opacity: float = ...,
tile: bool = ...,
invert: bool = ...,
visible: bool = ...,
preview_opacity: float = ...,
) -> Result
The Projection tool's stencil: a document image (null removes it), placement, mask opacity, tile and invert. Visibility and previewOpacity affect only its overlay, never brush coverage.
Paint Stroke
tb.ops.texture.paint.stroke(
*,
material: MaterialRef,
staged: int = ...,
points: Any = ...,
view: Any = ...,
layer: str = ...,
brush: Any = ...,
swatch: Any = ...,
channels: Any = ...,
blend: str = ...,
smooth: bool = False,
closed: bool = False,
erase: bool = False,
material_brush: str = ...,
brush_raster: str = ...,
tool: Literal["brush", "clone", "smudge"] = "brush",
) -> Result
Paint one stroke as one undo step. Texture Paint commits what its GPU engine staged ('staged'); scripts pass 'points' in UV space ([u, v] or [u, v, pressure], v down the texture) and the stroke is painted with the session's brush, channels, blend and swatch, or every channel of the session's material brush. The commit is refused when the layer changed meanwhile.
Get Paint Swatches
tb.ops.texture.paint.swatch.get() -> Result
Read this session's complete primary and secondary swatches and revision.
Reset Paint Swatches
tb.ops.texture.paint.swatch.reset(*, expected_revision: int = ...) -> Result
Restore factory black primary and white secondary values for this session.
Set Paint Swatches
tb.ops.texture.paint.swatch.set(
*,
primary: Any = ...,
secondary: Any = ...,
expected_revision: int = ...,
) -> Result
Atomically patch primary and/or secondary channel values, preserving unedited channels. Base Color is sRGB; Normal is signed and normalized; emission is linear HDR.
Swap Paint Swatches
tb.ops.texture.paint.swatch.swap(*, expected_revision: int = ...) -> Result
Swap complete primary and secondary channel values for this session.
Set Paint Target
tb.ops.texture.paint.target.set(
*,
material: MaterialRef,
layer: str,
mask: str = ...,
) -> Result
Choose the layer, or one of its masks, that strokes and fills of a texture set paint on.
Get Paint Tool Session
tb.ops.texture.paint.tool.get() -> Result
Read the active tool, its options, the brush, the paint targets, the restriction, the clone source and the stencil.
Set Paint Tool
tb.ops.texture.paint.tool.set(
*,
tool: Literal["paint", "eraser", "projection", "fill", "path", "smudge", "clone", "decal", "picker"] = ...,
channels: Any = ...,
blend: str = ...,
fill_scope: Literal["layer", "island", "face", "materialSlot"] = ...,
smudge_strength: float = ...,
material_brush: str = ...,
) -> Result
Choose the tool and change its options: the channels Paint / Eraser / Fill write, the blend, what Fill fills, Smudge strength, Blur radius and sharpen.
Frame UV View
tb.ops.texture.paint.view.frame() -> Result
Frame the 0-1 UV tile in the 2D UV view.
Get Paint View
tb.ops.texture.paint.view.get() -> Result
Read the Texture Paint view layout and the 2D UV view options.
Set Paint View
tb.ops.texture.paint.view.set(
*,
layout: Literal["3d", "split", "2d"] = ...,
channel: str = ...,
debug: Literal["off", "uv", "idMap", "ambientOcclusion", "curvature", "thickness", "position"] = ...,
wireframe: bool = ...,
islands: bool = ...,
tiled: bool = ...,
split_ratio: float = ...,
) -> Result
Show the 3D view, the 2D UV view or both side by side, and choose what the UV view displays.