blenderwright tool reference

Every tool the blenderwright MCP server exposes to Blender, generated directly from the source so it cannot drift out of date.

276 tools 32 modules GitHub Download

Animation 16

add_driver

add_driver(object_name: str, data_path: str, expression: str = '', index: int = -1, driver_type: str = 'SCRIPTED', variables: list[dict[str, Any]] | None = None)

Drive a property from other properties or the frame: a door that opens as a handle turns, a wheel that spins as a car moves, a light that dims with distance. Expressions use Blender's simple subset, evaluated without Python: numbers, + - * / % //, comparisons, and/or/not, "a if c else b", parentheses, the variables below, frame, pi, and sin cos tan asin acos atan atan2 sqrt abs fabs floor ceil trunc round int min max radians degrees exp log pow fmod lerp clamp smoothstep. No ** (use pow).

object_nameObject that owns the driven property.
data_pathProperty to drive, e.g. "location", "rotation_euler", "data.energy" (a light's power), 'modifiers["Bend"].angle', 'data.shape_keys.key_blocks["Smile"].value'. Paths into the object's data or shape keys are driven on that data.
expressionSCRIPTED drivers only, e.g. "lx * 2" or "sin(frame / 10)".
indexComponent of a vector property (0, 1, 2 for X, Y, Z), or -1 for a single value.
driver_typeSCRIPTED (use the expression), or AVERAGE, SUM, MIN, MAX of the variables.
variablesUp to 32, each {"name", "type", "object", ...}: TRANSFORMS: "transform_type" LOC_X..SCALE_AVG, optional "transform_space" WORLD_SPACE (default), LOCAL_SPACE or TRANSFORM_SPACE. SINGLE_PROP: "data_path" on the object, e.g. "data.energy". LOC_DIFF / ROTATION_DIFF: distance or angle between "object" and "object_2".

Returns Dict with the driven path, index, expression and variables.

add_fcurve_modifier

add_fcurve_modifier(object_name: str, data_path: str, modifier: str, index: int = -1, settings: dict[str, Any] | None = None)

Add a modifier to animation curves of the object's active action.

object_nameAnimated object.
data_pathAnimated property, e.g. "location", "rotation_euler".
modifierCYCLES (repeat the keys forever: settings mode_before / mode_after REPEAT, REPEAT_OFFSET for walking forward, MIRROR), NOISE (organic jitter: strength, scale, phase, offset, depth), STEPPED (stop-motion look: frame_step, frame_offset), SMOOTH (Gaussian smoothing: sigma, filter_width).
indexOne component (0, 1, 2) or -1 for every component.
settingsModifier settings by name, plain values.

Returns Dict with how many curves got the modifier.

add_nla_strip

add_nla_strip(object_name: str, action_name: str, frame_start: int = 1, track_name: str = '', blend_type: str = 'REPLACE', repeat: float = 1.0, scale: float = 1.0, extrapolation: str = 'HOLD_FORWARD', blend_in: float = 0.0, blend_out: float = 0.0, influence: float | None = None)

Place an action on the NLA timeline as a strip: repeat a walk cycle, sequence clips, or layer a wave on top of a walk.

object_nameObject to animate.
action_nameAction to place.
frame_startFrame the strip starts.
track_nameNLA track to put it on; created if missing. Empty adds a new track on top.
blend_typeHow it mixes with the tracks below: REPLACE, COMBINE (adds rotations properly, best for layering), ADD, SUBTRACT, MULTIPLY.
repeatTimes to play the action, 0.1 to 1000.
scalePlayback stretch, 0.01 to 100 (2 is half speed).
extrapolationAfter (and before) the strip: NOTHING, HOLD or HOLD_FORWARD.
blend_inFrames to fade in, 0 or more.
blend_outFrames to fade out, 0 or more.
influenceFixed strength 0.0 to 1.0; leave unset for full.

Returns Dict with the track, strip, and its frame range.

clear_animation

clear_animation(object_name: str)

Remove all animation data from an object.

object_nameName of the object.

Returns Confirmation dict.

create_animation_path

create_animation_path(object_name: str, path_object: str)

Make an object follow a path (curve) using a Follow Path constraint.

object_nameName of the object to animate along the path.
path_objectName of the curve object to use as the path.

Returns Confirmation dict with constraint details.

delete_keyframe

delete_keyframe(object_name: str, data_path: str, frame: int)

Remove a keyframe from an object property at a specific frame.

object_nameName of the object.
data_pathProperty data path (e.g., location, rotation_euler, scale).
frameFrame number of the keyframe to remove.

Returns Confirmation dict.

insert_keyframe

insert_keyframe(object_name: str, data_path: str, frame: int, value: float | list[float] | None = None)

Insert a keyframe on an object property at a specific frame.

object_nameName of the object.
data_pathProperty to keyframe. Must be one of: location, rotation_euler, rotation_quaternion, scale, or indexed variants like location[0].
frameFrame number to insert the keyframe at.
valueOptional value to set before inserting the keyframe: a number for an indexed path like location[2], a list for a whole vector.

Returns Confirmation dict with keyframe details.

keyframe_property

keyframe_property(data_path: str, frame: int, value: Any = None, object_name: str = '', target: str = 'OBJECT', index: int = -1)

Keyframe any animatable property: material colours, light power, world strength, modifier settings, camera lens and more. Optionally sets the value first, so "turn red at frame 24" is one call. For location, rotation and scale, insert_keyframe is simpler.

data_pathProperty path from the target, e.g. 'active_material.node_tree.nodes["Principled BSDF"].inputs["Base Color"].default_value', "data.energy" (light power), "data.lens" (camera), 'modifiers["Bend"].angle', 'node_tree.nodes["Background"].inputs["Strength"].default_value' (with target WORLD).
frameFrame to key.
valueValue to set before keying: a number, true/false, or a list for colours and vectors. Omit to key the current value.
object_nameThe object the path starts from (target OBJECT).
targetOBJECT, WORLD (the scene's world) or SCENE.
indexOne component of a vector or colour (0, 1, 2, 3), or -1 for all.

Returns Dict with the data block keyed, its path, the frame and the value.

list_drivers

list_drivers(object_name: str)

List the drivers on an object with their expressions and variables.

object_nameObject to inspect.

Returns Dict with each driver's path, index, type, expression, variables and whether Blender considers it valid.

list_keyframes

list_keyframes(object_name: str)

List all keyframes on an object.

object_nameName of the object.

Returns List of dicts with data_path, frame, and value for each keyframe.

list_nla

list_nla(object_name: str)

List an object's NLA tracks and strips, top to bottom.

object_nameAnimated object.

Returns Dict with each track and its strips (action, frames, blend, repeat).

manage_action

manage_action(object_name: str, operation: str, action_name: str = '')

Work with an object's actions (its saved animations).

object_nameAnimated object.
operationLIST (the file's actions and which one the object plays), NEW (start an empty action named action_name and assign it), ASSIGN (play an existing action; several objects can share one), UNASSIGN (stop playing the active action, keep it in the file), PUSH_DOWN (move the active action into an NLA strip so another action can be layered on top).
action_nameNeeded for NEW and ASSIGN.

Returns Dict with the object's active action and slot, and the file's actions.

remove_driver

remove_driver(object_name: str, data_path: str, index: int = -1)

Remove a driver so the property goes back to its own value.

object_nameObject that owns the driven property.
data_pathThe driven property, as given to add_driver.
indexComponent, or -1 for all components of the property.

Returns Dict with how many drivers were removed.

set_frame

set_frame(frame: int)

Set the current frame in the timeline.

frameFrame number to set as current.

Returns Confirmation dict with the new current frame.

set_frame_range

set_frame_range(start: int, end: int)

Set the start and end frames of the scene timeline.

startStart frame number.
endEnd frame number. Must be greater than start.

Returns Confirmation dict with the new frame range.

set_interpolation

set_interpolation(object_name: str, data_path: str, interpolation: str = 'BEZIER')

Set the interpolation type for keyframes on a property.

object_nameName of the object.
data_pathProperty data path.
interpolationInterpolation type. One of: CONSTANT, LINEAR, BEZIER, SINE, QUAD, CUBIC, QUART, QUINT, EXPO, CIRC, BACK, BOUNCE, ELASTIC.

Returns Confirmation dict.

Armature & Rigging 8

add_bone

add_bone(armature_name: str, bone_name: str, head: list[float] | tuple[float, ...] = (0, 0, 0), tail: list[float] | tuple[float, ...] = (0, 0, 1), parent_bone: str = '')

Add a bone to an armature. Enters edit mode automatically.

armature_nameName of the armature object.
bone_nameName for the new bone.
headXYZ position of the bone head (root). Defaults to (0, 0, 0).
tailXYZ position of the bone tail (tip). Defaults to (0, 0, 1).
parent_boneOptional name of the parent bone for hierarchy.

Returns Dict with the created bone's name, head, and tail positions.

add_constraint

add_constraint(object_name: str, bone_name: str = '', constraint_type: str = '', properties: dict[str, Any] | None = None)

Add a constraint to an object or bone.

object_nameName of the object (armature for bone constraints).
bone_nameName of the bone (empty string for object-level constraints).
constraint_typeConstraint type. One of: IK, COPY_ROTATION, COPY_LOCATION, COPY_SCALE, COPY_TRANSFORMS, TRACK_TO, DAMPED_TRACK, LOCKED_TRACK, LIMIT_ROTATION, LIMIT_LOCATION, LIMIT_SCALE, STRETCH_TO, FLOOR, CLAMP_TO, TRANSFORM, MAINTAIN_VOLUME, CHILD_OF, PIVOT, ARMATURE, LIMIT_DISTANCE, SPLINE_IK, ACTION, FOLLOW_PATH, SHRINKWRAP, GEOMETRY_ATTRIBUTE.
propertiesOptional dict of the constraint's own settings, e.g. target (an object name), subtarget (a bone name), influence, chain_count, owner_space. Only settings Blender declares on that constraint type are accepted. For a full IK setup use setup_ik_chain.

Returns Dict with the created constraint's name and type.

create_armature

create_armature(name: str = 'Armature', location: list[float] | tuple[float, ...] = (0, 0, 0))

Create a new armature object.

nameName for the armature. Defaults to "Armature".
locationXYZ position for the armature. Defaults to origin.

Returns Dict with the created armature's name and location.

manage_bone_collection

manage_bone_collection(armature_name: str, action: str, collection_name: str, bones: list[str] | None = None, parent: str = '')

Organise an armature's bones into collections and show or hide them. Typical rig layout: "Deform" (hidden), "Controls" (visible), "Mechanism" (hidden).

armature_nameArmature object.
actionCREATE (optionally with bones and a parent collection), DELETE, ASSIGN or UNASSIGN bones, SHOW or HIDE the collection.
collection_nameBone collection to act on.
bonesBone names for CREATE, ASSIGN and UNASSIGN, at most 1000.
parentCREATE only: nest under this existing collection.

Returns Dict with the armature's collections, their bones and visibility.

parent_mesh_to_armature

parent_mesh_to_armature(mesh_name: str, armature_name: str, type: str = 'ARMATURE_AUTO')

Parent a mesh object to an armature with automatic weights or other methods.

mesh_nameName of the mesh object to parent.
armature_nameName of the armature object.
typeParenting method. One of: ARMATURE_AUTO (automatic weights), ARMATURE_NAME (by bone names), ARMATURE_ENVELOPE (by envelope).

Returns Confirmation dict.

set_bone_property

set_bone_property(armature_name: str, bone_name: str, property: str, value: Any)

Set a property on a bone in an armature.

armature_nameName of the armature object.
bone_nameName of the bone.
propertyProperty to set. One of: roll, length, use_connect, use_deform, envelope_distance, head_radius, tail_radius, use_inherit_rotation, use_local_location.
valueValue to set the property to.

Returns Confirmation dict with bone name, property, and new value.

set_pose

set_pose(armature_name: str, bone_name: str, location: list[float] | tuple[float, ...] | None = None, rotation: list[float] | tuple[float, ...] | None = None, scale: list[float] | tuple[float, ...] | None = None)

Set the pose of a bone in an armature.

armature_nameName of the armature object.
bone_nameName of the bone to pose.
locationOptional XYZ location offset for the bone.
rotationOptional XYZ Euler rotation in radians.
scaleOptional XYZ scale.

Returns Confirmation dict with the bone's new pose values.

setup_ik_chain

setup_ik_chain(armature_name: str, bone_name: str, target_object: str, target_bone: str = '', chain_count: int = 2, pole_object: str = '', pole_bone: str = '', pole_angle: float = 0.0, use_stretch: bool = False, iterations: int = 500)

Give a limb inverse kinematics: move the target and the chain follows. Put the IK on the last bone of the limb (forearm, shin). A pole target (an empty or bone in front of the knee or behind the elbow) keeps the joint bending the right way.

armature_nameArmature object.
bone_nameLast bone of the chain (the IK sits on it).
target_objectObject the chain reaches for (often the armature itself when target_bone names a control bone).
target_boneBone in target_object to reach for, if any.
chain_countBones in the chain counting up from bone_name, 0 to 255 (0 means the whole chain to the root).
pole_objectObject that sets the joint's bend direction, if any.
pole_boneBone in pole_object, if any.
pole_angleRotate the pole's effect, radians, -3.142 to 3.142; -1.571 (-90 degrees) is a common fix for a twisted limb.
use_stretchLet bones stretch to reach a target out of range.
iterationsSolver iterations, 1 to 10000.

Returns Dict with the constraint and chain details.

baking 1

bake_texture

bake_texture(object_name: str, bake_type: str, filepath: str, resolution: int = 1024, source_object: str = '', cage_extrusion: float = 0.0, max_ray_distance: float = 0.0, margin: int = 16, samples: int = 64, diffuse_color_only: bool = True, normal_space: str = 'TANGENT')

Bake a texture map from an object's materials (or a high-poly source) into an image. The object needs UVs (smart_uv_project) and a material. Cycles is used for the bake and the render engine is put back afterwards.

object_nameObject whose UVs receive the bake (the low-poly one).
bake_typeDIFFUSE (base colour, see diffuse_color_only), NORMAL, AO, ROUGHNESS, EMIT, COMBINED (fully lit), GLOSSY, TRANSMISSION, SHADOW, ENVIRONMENT, POSITION or UV.
filepathImage to write: .png, .exr, .tif or .jpg, in an existing directory. Use .exr or .png for normal maps.
resolutionSquare image size in pixels, 64 to 8192.
source_objectHigh-poly object to bake from onto object_name (selected to active). Leave empty to bake the object onto itself.
cage_extrusionHow far rays start outside the low-poly surface when baking from a source, 0.0 to 10.0. Raise it if the bake has holes.
max_ray_distanceFurthest a ray may travel to hit the source, 0 for no limit, up to 10.0.
marginPixels to bleed past UV island edges, 0 to 64, so mipmaps don't show seams.
samplesCycles samples for the bake, 1 to 4096. AO and COMBINED need more; DIFFUSE and NORMAL are clean at 1 to 16.
diffuse_color_onlyFor DIFFUSE, bake the flat base colour (albedo) rather than lit colour. Game engines want this.
normal_spaceFor NORMAL: TANGENT (game engines, normal map nodes) or OBJECT.

Returns Dict with the file written, its size and the image name in Blender.

Bool Tool 4

booltool_auto_difference

booltool_auto_difference(object_name: str, target_name: str)

Auto boolean difference: subtract the target object from the main object. The target object is used as a cutter and removed after the operation. This is the default choice for a cut. Use boolean_operation instead only when the cutter must stay editable as a modifier. Uses Bool Tool extension if installed, otherwise falls back to native boolean modifier (a warning will be included in the response).

object_nameName of the object to cut from.
target_nameName of the cutter object (will be removed).

Returns Confirmation dict with operation details. May include a 'warning' field if Bool Tool is not available and native fallback was used.

booltool_auto_intersect

booltool_auto_intersect(object_name: str, target_name: str)

Auto boolean intersect: keep only the overlapping volume of two objects. The target object is removed after the operation. This is the default choice for an intersection. Use boolean_operation instead only when the cutter must stay editable as a modifier. Uses Bool Tool extension if installed, otherwise falls back to native boolean modifier (a warning will be included in the response).

object_nameName of the main object.
target_nameName of the intersecting object (will be removed).

Returns Confirmation dict with operation details. May include a 'warning' field if Bool Tool is not available and native fallback was used.

booltool_auto_slice

booltool_auto_slice(object_name: str, target_name: str)

Auto boolean slice: split the main object using the target as a cutter. Creates two separate pieces from the intersection. The target object is removed after the operation. Slice has no modifier equivalent: boolean_operation offers UNION, DIFFERENCE and INTERSECT only. Uses Bool Tool extension if installed, otherwise falls back to native boolean modifier (a warning will be included in the response).

object_nameName of the object to slice.
target_nameName of the cutter object (will be removed).

Returns Confirmation dict with operation details. May include a 'warning' field if Bool Tool is not available and native fallback was used.

booltool_auto_union

booltool_auto_union(object_name: str, target_name: str)

Auto boolean union: merge two mesh objects into one, destructively. The target object is consumed and joined into the main object. This is useful for permanently joining meshes so parts don't float away from their bodies. This is the default choice for a union. Use boolean_operation instead only when the cutter must stay editable as a modifier. Uses Bool Tool extension if installed, otherwise falls back to native boolean modifier (a warning will be included in the response).

object_nameName of the main object to keep.
target_nameName of the object to merge into the main object.

Returns Confirmation dict with operation details. May include a 'warning' field if Bool Tool is not available and native fallback was used.

Camera 6

capture_viewport

capture_viewport(filepath: str = '', width: int = 1920, height: int = 1080)

Render the viewport to a file or return as base64.

filepathOptional absolute path for output image. If empty, returns base64-encoded image.
widthRender width in pixels, default 1920.
heightRender height in pixels, default 1080.

Returns Dict with filepath or base64 image data.

create_camera

create_camera(name: str = 'Camera', location: list = [0, 0, 0], rotation: list = [0, 0, 0], lens: float = 50.0)

Create a new camera in the scene.

nameName for the camera, default "Camera".
locationXYZ location as [x, y, z], default [0, 0, 0].
rotationXYZ Euler rotation in radians as [x, y, z], default [0, 0, 0].
lensFocal length in mm, default 50.

Returns Confirmation dict with camera name and properties.

point_camera_at

point_camera_at(camera_name: str, target: str = '', location: list | None = None)

Point a camera at an object or a specific location using a Track To constraint.

camera_nameName of the camera object.
targetName of an existing object to point at, as a string. For coordinates use `location` instead. Mutually exclusive with location.
locationXYZ location to point at as [x, y, z]. Mutually exclusive with target.

Returns Confirmation dict.

set_active_camera

set_active_camera(object_name: str)

Set the active scene camera.

object_nameName of the camera object to make active.

Returns Confirmation dict.

set_camera_from_view

set_camera_from_view()

Match the active camera to the current 3D viewport view.

Returns Confirmation dict with the camera's new location and rotation.

set_camera_property

set_camera_property(object_name: str, property: str, value: Any)

Set a property on a camera.

object_nameName of the camera object.
propertyProperty to set. One of: lens, clip_start, clip_end, sensor_width, sensor_height, dof.use_dof, dof.focus_distance, dof.aperture_fstop, ortho_scale, shift_x, shift_y, type, sensor_fit.
valueThe value to set.

Returns Confirmation dict.

Code Execution 1

execute_blender_code

execute_blender_code(code: str)

Run Python inside Blender. OFF BY DEFAULT; prefer the structured tools. The user must tick "Allow raw Python" in the blenderwright N-panel (View3D > Sidebar > blenderwright) for the current Blender session. Until they do, this tool returns an error saying so; relay that to the user and do not retry. Never ask the user to enable it just to do something a structured tool already covers. The code runs in a restricted namespace that blocks obvious mistakes (import os/subprocess/socket, exec/eval/open/compile). That is a guard against accidents, not a security boundary: the code runs in-process with full bpy. Every snippet is echoed to Blender's system console and listed in the panel so the user can see what ran.

codePython code to execute. bpy is available but must be imported.

Returns Dict with 'output' (captured stdout) and 'success' boolean.

Collections 8

create_collection

create_collection(name: str, parent: str = '')

Create a new collection, optionally nested under a parent collection.

nameName for the new collection.
parentOptional name of parent collection to nest under. Empty string uses the scene's root collection.

Returns Dict with the created collection's name and parent.

create_collection_instance

create_collection_instance(collection_name: str, name: str = '', location: list[float] | tuple[float, ...] = (0, 0, 0), rotation: list[float] | tuple[float, ...] = (0, 0, 0), scale: list[float] | tuple[float, ...] = (1, 1, 1))

Place a collection as a lightweight instance (an empty that shows it). Instances share the collection's data, so a hundred trees cost little more than one, and editing the collection updates every copy. Works with local and linked collections.

collection_nameCollection to instance.
nameName for the instance object; empty uses the collection name.
locationWorld position [x, y, z].
rotationEuler rotation [x, y, z] in radians.
scaleScale [x, y, z]; components must not be zero.

Returns Dict with the instance object's name and its collection.

delete_collection

delete_collection(collection_name: str, delete_objects: bool = False)

Delete a collection.

collection_nameName of the collection to delete.
delete_objectsIf True, also delete all objects in the collection. If False, objects are unlinked but kept in the scene.

Returns Confirmation dict.

make_instances_real

make_instances_real(object_name: str, keep_hierarchy: bool = False)

Turn a collection instance into real, separately editable objects.

object_nameThe instance object (from create_collection_instance or a linked collection).
keep_hierarchyKeep the instanced objects' parent links.

Returns Dict with the names of the new objects.

manage_view_layer

manage_view_layer(action: str, view_layer: str | None = None, new_name: str | None = None, material_override: str | None = None, world_override: str | None = None, use_for_render: bool | None = None)

List, add, remove, rename or configure view layers (separate render layers). Each view layer renders the scene with its own collection settings (see set_layer_collection) and passes, e.g. a foreground layer and a background layer composited together, or a clay layer. Pass, light group and AOV tools act on the active view layer: SET_ACTIVE first.

actionLIST; ADD (view_layer is the new name); REMOVE; RENAME (to new_name); SET_ACTIVE (the layer other tools change); SET (the overrides and use_for_render below).
view_layerThe layer to act on.
new_nameRENAME only.
material_overrideSET only: render every object with this material (a clay render); "" clears it.
world_overrideSET only: world used for this layer; "" clears it.
use_for_renderSET only: whether this layer renders at all.

Returns Dict with every view layer (name, active, use_for_render, overrides).

move_to_collection

move_to_collection(object_names: list[str], collection_name: str)

Move objects to a collection, unlinking them from their current collections.

object_namesList of object names to move.
collection_nameName of the destination collection.

Returns Dict with the moved objects and destination collection.

set_collection_visibility

set_collection_visibility(collection_name: str, visible: bool, viewport: bool = True, render: bool = True)

Set collection visibility in viewport and/or render.

collection_nameName of the collection.
visibleWhether the collection should be visible.
viewportApply visibility change to viewport. Defaults to True.
renderApply visibility change to render. Defaults to True.

Returns Confirmation dict with visibility state.

set_layer_collection

set_layer_collection(collection_name: str, view_layer: str | None = None, exclude: bool | None = None, holdout: bool | None = None, indirect_only: bool | None = None)

Set how a collection takes part in one view layer.

collection_nameCollection, at any depth.
view_layerView layer to change; omit for the active one.
excludeLeave the collection out of this layer entirely.
holdoutRender it as a transparent cut-out (the objects mask what is behind them), for compositing layers back together.
indirect_onlyCycles: it shows only in reflections, shadows and bounce light, not directly to the camera.

Returns Dict with the collection, the layer and its exclude/holdout/indirect_only.

compositor 5

add_compositor_effect

add_compositor_effect(effect: str, settings: dict[str, Any] | None = None)

Add a post-processing effect at the end of the compositor chain. Effects apply to every render in order, so add glare before film grain.

effectOne of: glare (inputs: Type Bloom/Fog Glow/Streaks/Ghosts/Simple Star/ Sun Beams, Quality High/Medium/Low, Threshold, Strength, Size, Saturation, Tint, Streaks, Streaks Angle), lens_distortion (Type Radial/Horizontal, Distortion -1..1, Dispersion, Fit), color_balance (Type Lift/Gamma/Gain or "Offset/Power/Slope (ASC-CDL)" or White Point, Factor, Lift, Gamma, Gain as RGBA lists, Temperature, Tint), denoise (Prefilter, Quality, HDR), blur (Size [x, y] in pixels, Type Gaussian...), exposure (Exposure), brightness_contrast (Brightness, Contrast), hue_saturation (Hue, Saturation, Value, Factor), kuwahara (painterly), pixelate, posterize, anti_aliasing, vignette (Factor, Feather, Corner Roundness, Scale [x, y]), film_grain (Preset, ISO 50..3200, Animated, Softness), chromatic_aberration (Factor, Type, Samples), sepia (Tone, Saturation, Contrast), split_toning (Highlights, Shadows as RGBA, Balance), sensor_noise (Luminance Noise, Chroma Noise), unsharp_mask (Radius, Factor), tune_image (Contrast, Color Boost, Clarity, Sharpen).
settingsInput name to value, e.g. {"Type": "Fog Glow", "Strength": 0.6}. Names are the node's input labels.

Returns Dict with the new node's name (use it to edit or remove the effect) and its input names.

list_compositor

list_compositor()

List the compositor chain from render to output with each effect's settings.

Returns Dict with the tree name and the chain of effects in order.

remove_compositor_effect

remove_compositor_effect(node_name: str)

Remove an effect and reconnect the chain around it.

node_nameThe node name from add_compositor_effect or list_compositor.

Returns Dict with the removed name and the remaining chain.

set_compositor_effect

set_compositor_effect(node_name: str, settings: dict[str, Any])

Change the settings of an effect already in the compositor.

node_nameThe node name returned by add_compositor_effect or list_compositor, e.g. "Glare".
settingsInput name to value, as for add_compositor_effect.

Returns Dict with the node name and its inputs after the change.

setup_compositor

setup_compositor(reset: bool = False)

Make sure the scene has a compositor: Render Layers into the output. add_compositor_effect calls this itself, so it is only needed to start over. Effects then stack between the render and the output.

resetThrow away the current compositor tree and start clean.

Returns Dict with the tree name and the effect chain, render to output.

Curves 10

add_curve_point

add_curve_point(curve_name: str, location: list[float] | tuple[float, ...] = (0, 0, 0), handle_type: str = 'AUTOMATIC')

Add a control point to an existing curve.

curve_nameName of the curve object to add a point to.
location3D location for the new point as (x, y, z).
handle_typeHandle type - AUTO, VECTOR, ALIGNED, or FREE.

Returns Dict with curve name and new point count.

convert_curve_to_mesh

convert_curve_to_mesh(curve_name: str)

Convert a curve object to a mesh object.

curve_nameName of the curve object to convert.

Returns Dict with the converted object name.

create_curve

create_curve(type: str = 'BEZIER', name: str = '', location: list[float] | tuple[float, ...] = (0, 0, 0))

Create a new curve object.

typeCurve type - BEZIER, NURBS, or PATH.
nameOptional name for the curve object.
location3D location as (x, y, z).

Returns Dict with created curve name and type.

create_text

create_text(text: str, name: str = '', location: list[float] | tuple[float, ...] = (0, 0, 0), size: float = 1.0, font: str = '')

Create a 3D text object.

textThe text string to display.
nameOptional name for the text object.
location3D location as (x, y, z).
sizeFont size.
fontOptional path to a font file. Uses default Blender font if empty.

Returns Dict with created text object name.

set_curve_property

set_curve_property(curve_name: str, property: str, value: Any)

Set a property on a curve object.

curve_nameName of the curve object.
propertyProperty to set - resolution_u, fill_mode, bevel_depth, bevel_resolution, extrude, twist_mode, or use_fill_caps.
valueValue to set. Type depends on property.

Returns Confirmation dict with property name and new value.

set_handle_type

set_handle_type(curve_name: str, handle_type: str = 'AUTOMATIC')

Set the handle type for all control points of a curve.

curve_nameName of the curve object.
handle_typeHandle type - AUTO, VECTOR, ALIGNED, or FREE_ALIGN.

Returns Dict with confirmation of handle type change.

smooth_curve

smooth_curve(curve_name: str)

Smooth the control points of a curve.

curve_nameName of the curve object.

Returns Dict with confirmation of smoothing.

subdivide_curve

subdivide_curve(curve_name: str, number_cuts: int = 1)

Subdivide a curve by adding control points between existing ones.

curve_nameName of the curve object.
number_cutsNumber of cuts to make (1-100).

Returns Dict with confirmation of subdivision.

switch_curve_direction

switch_curve_direction(curve_name: str)

Switch the direction of a curve's splines.

curve_nameName of the curve object.

Returns Dict with confirmation of direction switch.

toggle_cyclic

toggle_cyclic(curve_name: str)

Toggle the cyclic (closed loop) state of a curve.

curve_nameName of the curve object.

Returns Dict with confirmation of cyclic toggle.

deform 14

add_shape_key

add_shape_key(object_name: str, key_name: str, from_mix: bool = False)

Add a shape key (blend shape). The first call also creates the Basis. Shape keys store alternative vertex positions blended by a 0-1 value: facial expressions, morphs, corrective shapes. Shape it with move_shape_key_vertices, blend with set_shape_key, animate with keyframe_shape_key. A new key starts at value 1.0 (fully on), so edits show straight away; set it to 0 to hide it.

object_nameMesh object.
key_nameName for the new shape key.
from_mixStart from the current blend of all keys instead of the Basis.

Returns Dict with the new key and every key on the object.

assign_vertex_group

assign_vertex_group(object_name: str, group_name: str, vertex_indices: list[int] | None = None, weight: float = 1.0, mode: str = 'REPLACE', selection: str = 'ALL')

Put vertices into a vertex group with a weight, creating the group if needed. Vertex groups drive armature skinning, and limit modifiers (Displace, Solidify, Mask) and shape keys to part of a mesh.

object_nameMesh object.
group_nameVertex group; created if it does not exist.
vertex_indicesVertices to change. Omit to use the whole mesh, or the edit-mode selection with selection="CURRENT".
weight0.0 to 1.0.
modeREPLACE sets the weight, ADD and SUBTRACT change it, REMOVE takes the vertices out of the group.
selectionWhen vertex_indices is omitted: ALL vertices, or CURRENT for the ones selected in edit mode (use the select_* tools first).

Returns Dict with the group name, its index and how many vertices changed.

create_lattice

create_lattice(object_name: str, resolution: list[int] | None = None, interpolation: str = 'KEY_LINEAR', lattice_name: str = '')

Wrap an object in a lattice cage and deform it through the cage. The lattice is fitted to the object's bounding box and a Lattice modifier is added. Then bend, taper or bulge the whole shape with move_lattice_points instead of editing vertices.

object_nameObject to deform (mesh, curve, text...).
resolutionPoints along [u, v, w] (the object's X, Y, Z), 2 to 64 each. More points give more local control. Default [2, 2, 2].
interpolationKEY_LINEAR (default) follows the points exactly: scale them to 0.5 and the shape halves. KEY_BSPLINE is smoother but only approximates the points (the same move gives about 0.67). KEY_CATMULL_ROM and KEY_CARDINAL sit between.
lattice_nameName for the lattice object; defaults to "<object> Lattice".

Returns Dict with the lattice name, its point count and the modifier name.

keyframe_shape_key

keyframe_shape_key(object_name: str, key_name: str, frame: int, value: float | None = None)

Keyframe a shape key's value so the blend shape animates.

object_nameMesh object.
key_nameShape key.
frameFrame number.
valueValue to set before keying; omit to key the current value.

Returns Dict with the key, frame and keyed value.

list_shape_keys

list_shape_keys(object_name: str)

List an object's shape keys with values, ranges and options.

object_nameMesh object.

Returns Dict with the reference key and each key's settings.

list_vertex_groups

list_vertex_groups(object_name: str)

List an object's vertex groups with vertex counts and weight ranges.

object_nameMesh object.

Returns Dict with each group's name, index, vertex count, min and max weight.

move_lattice_points

move_lattice_points(lattice_name: str, offset: list[float] | None = None, scale: list[float] | None = None, axis: str | None = None, sign: str = 'POS', point_indices: list[int] | None = None, reset: bool = False)

Move or scale lattice points to deform everything the lattice is bound to. Pick points by side (axis and sign, split at the middle of the lattice) or by index; with neither, every point moves. Scaling is about the lattice centre, per axis: scale [0.2, 0.2, 1] on the top tapers it to a point.

lattice_nameLattice object from create_lattice.
offset[x, y, z] in world units added to the chosen points.
scale[x, y, z] factors, 0.01 to 100, about the lattice centre.
axisX, Y or Z: choose the points on one side of the lattice.
signPOS, NEG, or ALIGN (the middle plane) with axis.
point_indicesChoose points by index instead (u fastest, then v, then w).
resetPut every point back where it started (others ignored).

Returns Dict with how many points moved and the lattice's point count.

move_shape_key_vertices

move_shape_key_vertices(object_name: str, key_name: str, offset: list[float], vertex_indices: list[int] | None = None, vertex_group: str = '')

Move vertices inside a shape key, building the blend shape. The offset is in the object's local space. With a vertex group, each vertex moves by offset times its weight, which gives soft falloff: weight the cheeks, then move them out to puff them.

object_nameMesh object.
key_nameShape key to edit (not the Basis).
offset[x, y, z] distance to move, each -1000 to 1000.
vertex_indicesVertices to move. Leave out to use vertex_group, or neither to move the whole mesh.
vertex_groupMove by this group's weights instead of by index.

Returns Dict with the number of vertices moved.

paint_color_attribute

paint_color_attribute(object_name: str, color: list[float], attribute_name: str = 'Color', domain: str = 'CORNER', data_type: str = 'BYTE_COLOR', vertex_indices: list[int] | None = None, selection: str = 'ALL')

Fill a color attribute (vertex colors) on a mesh, creating it if needed. The attribute becomes the active and render color. Read it in a material with a ShaderNodeVertexColor node whose layer_name is the attribute name. Game engines and glTF export pick it up as vertex color.

object_nameMesh object.
colorLinear RGB or RGBA, each 0.0 to 1.0.
attribute_nameColor attribute; created if it does not exist.
domainCORNER (per face corner, allows hard color edges) or POINT (per vertex). Used only when creating the attribute.
data_typeBYTE_COLOR (8-bit) or FLOAT_COLOR. Used only when creating.
vertex_indicesVertices to paint. Omit to paint the whole mesh, or the edit-mode selection with selection="CURRENT".
selectionWhen vertex_indices is omitted: ALL, or CURRENT for the vertices selected in edit mode (use the select_* tools first).

Returns Dict with the attribute, its domain and type, whether it was created, how many elements were painted, and all color attribute names.

remove_color_attribute

remove_color_attribute(object_name: str, attribute_name: str)

Delete a color attribute from a mesh.

object_nameMesh object.
attribute_nameColor attribute to remove.

Returns Dict with the removed name and the color attributes left.

remove_shape_key

remove_shape_key(object_name: str, key_name: str)

Delete a shape key.

object_nameMesh object.
key_nameShape key to delete.

Returns Dict with the removed key and the keys left.

remove_vertex_group

remove_vertex_group(object_name: str, group_name: str)

Delete a vertex group and every weight in it.

object_nameMesh object.
group_nameVertex group to delete.

Returns Dict with the removed group and the groups left.

set_shape_key

set_shape_key(object_name: str, key_name: str, value: float | None = None, slider_min: float | None = None, slider_max: float | None = None, mute: bool | None = None, vertex_group: str | None = None, relative_key: str = '')

Set how strongly a shape key applies, and its options.

object_nameMesh object.
key_nameShape key.
valueBlend amount, normally 0.0 to 1.0, within the slider range.
slider_minLowest allowed value, -10.0 to 10.0 (0.0 by default). Negative values let a "smile" key also frown.
slider_maxHighest allowed value, -10.0 to 10.0 (1.0 by default).
muteSwitch the key off without losing its value.
vertex_groupLimit the key to this vertex group's weights; "" clears it.
relative_keyKey this one is measured against (the Basis by default).

Returns Dict with the key's settings after the change.

vertex_group_operation

vertex_group_operation(object_name: str, group_name: str, operation: str, factor: float = 0.5, repeat: int = 1, threshold: float = 0.0, offset: float = 0.0, gain: float = 1.0, max_groups: int = 4, steps: int = 4)

Clean up or reshape the weights in a vertex group.

object_nameMesh object.
group_nameVertex group to work on.
operationOne of: NORMALIZE (scale so the highest weight is 1), NORMALIZE_ALL (make each vertex's weights across all groups sum to 1, as armatures expect), INVERT (weight becomes 1 - weight), CLEAN (drop weights at or below threshold), SMOOTH (blur weights with neighbours: factor, repeat), LEVELS (weight * gain + offset), LIMIT_TOTAL (keep at most max_groups groups per vertex, as game engines need), MIRROR (mirror the weights across X), QUANTIZE (snap weights to steps levels).
factorSMOOTH strength, 0.0 to 1.0.
repeatSMOOTH passes, 1 to 200.
thresholdCLEAN cut-off, 0.0 to 1.0.
offsetLEVELS offset, -1.0 to 1.0.
gainLEVELS gain, 0.0 to 10.0.
max_groupsLIMIT_TOTAL groups per vertex, 1 to 32.
stepsQUANTIZE levels, 1 to 1000.

Returns Dict with the group's vertex count and weight range afterwards.

File I/O 14

export_file

export_file(filepath: str, type: str = '', selected_only: bool = False, options: dict[str, Any] | None = None)

Export scene or selected objects to a 3D file. Supports FBX, OBJ, GLTF/GLB, USD, STL, PLY, and Alembic (ABC) formats.

filepathAbsolute path for the export file.
typeOptional format override. Auto-detected from extension if empty.
selected_onlyIf True, export only selected objects. Defaults to False.
optionsThe exporter's own settings by name (true/false, numbers or choices; never text or paths). Common ones: glTF: export_draco_mesh_compression_enable, ..._level (0-10), export_image_format (AUTO, JPEG, WEBP, NONE), export_apply (apply modifiers), export_animations, export_yup. FBX: apply_unit_scale, global_scale, axis_forward, axis_up, use_mesh_modifiers, add_leaf_bones, bake_anim. OBJ: export_triangulated_mesh, apply_modifiers, export_materials, forward_axis, up_axis, global_scale. USD: export_materials, export_textures_mode, export_animation. STL: ascii_format, global_scale, apply_modifiers. An unknown name is refused with the exporter's full list.

Returns Dict with exported file path and format.

import_file

import_file(filepath: str, type: str = '')

Import a 3D file into Blender. Supports FBX, OBJ, GLTF/GLB, USD, STL, PLY, Alembic (ABC), and SVG formats. Auto-detects format from file extension if type is empty.

filepathAbsolute path to the file to import. Must exist.
typeOptional format override. One of: FBX, OBJ, GLTF, USD, STL, PLY, ABC, SVG. Auto-detected from extension if empty.

Returns Dict with imported file path and format.

list_asset_libraries

list_asset_libraries()

List the asset libraries this Blender can use: Essentials (bundled with Blender) and the local libraries set in Preferences. Online libraries are never listed or fetched.

Returns Dict with each library's name and folder.

list_assets

list_assets(library: str, asset_type: str = '')

List the assets in a library, by file, for place_asset.

libraryLibrary name from list_asset_libraries.
asset_typeOnly this type: OBJECT, COLLECTION, MATERIAL, NODE_GROUP, WORLD or MESH. Empty for all.

Returns Dict with assets (file relative to the library, type, name), and truncated if the library has more files than one call reads.

list_blend_contents

list_blend_contents(filepath: str)

List what another .blend file contains without opening it. Use before link_or_append to find the names to bring in. Scripts in the file are never run.

filepathAbsolute path to an existing .blend file.

Returns Dict of data type (objects, collections, materials, node_groups, worlds, meshes) to the names in the file.

list_recent_files

list_recent_files()

List recently opened files from Blender preferences.

Returns List of file path strings.

manage_external_paths

manage_external_paths(action: str, directory: str | None = None)

Check and fix the external files (textures, sounds, libraries) a .blend uses.

actionLIST every external path and whether the file exists; MAKE_RELATIVE or MAKE_ABSOLUTE to rewrite them (relative paths survive moving the project folder; the .blend must be saved); FIND_MISSING to search a folder and relink files that moved.
directoryFIND_MISSING only: absolute folder to search, recursively.

Returns Dict with each external file (type, name, path, exists) and the missing count, after the action.

manage_linked_data

manage_linked_data(action: str, data_name: str | None = None, data_type: str = 'OBJECT', library: str | None = None)

Work with data linked from other .blend files (link_or_append, place_asset). Linked data is read-only here. MAKE_LOCAL copies it into this file and cuts the link; OVERRIDE keeps the link but makes it editable, so library updates still come through for anything not changed here.

actionLIST libraries, linked data and overrides; MAKE_LOCAL; OVERRIDE (OBJECT or COLLECTION); RELOAD a library from disk.
data_nameMAKE_LOCAL and OVERRIDE: the linked data-block's name.
data_typeOBJECT, COLLECTION, MATERIAL, NODE_GROUP, WORLD or MESH.
libraryLibrary name from LIST: required for RELOAD, and picks the library when two linked data-blocks share a name.

Returns Dict with what changed, or for LIST the libraries, linked data and overrides.

open_file

open_file(filepath: str)

Open a .blend file.

filepathAbsolute path to the .blend file. Must exist.

Returns Dict with the opened file path.

pack_resources

pack_resources(autopack: bool | None = None)

Pack every external image, sound, font and volume into the .blend file. Makes the file self-contained so it can be moved or shared without missing textures.

autopackAlso pack new external files automatically on every save.

Returns Dict with the packed items (type, name) and whether autopack is on.

place_asset

place_asset(library: str, file: str, asset_type: str, asset_name: str, link: bool = False)

Bring an asset from a library into the scene (append, or link to keep it in sync with the library). Find it with list_assets first.

libraryLibrary name from list_asset_libraries.
fileThe asset's .blend file, relative to the library, as list_assets gives it.
asset_typeOBJECT, COLLECTION, MATERIAL, NODE_GROUP, WORLD or MESH.
asset_nameThe asset's name.
linkLink instead of append. Linked assets update with the library but can't be edited here.

Returns Dict with the name it got in this file, and any collection instance.

save_file

save_file(filepath: str = '')

Save the current Blender file. If filepath is empty, saves to the current file path (overwrite). If filepath is provided, performs a "Save As" to the given path.

filepathOptional absolute path to save as. Must have .blend extension. Empty string saves to current file.

Returns Dict with the saved file path.

unpack_resources

unpack_resources(overwrite: bool = False)

Write packed files out to folders next to the saved .blend (textures/, sounds/, ...). Files only ever go beside the .blend, never to paths stored in the file. The .blend must be saved first.

overwriteReplace files already there; by default an existing file is reused.

Returns Dict with each unpacked item (type, name, filepath relative to the .blend).

Geometry Nodes 8

add_essentials_modifier

add_essentials_modifier(object_name: str, modifier: str, settings: dict[str, Any] | None = None)

Add one of Blender's ready-made node modifiers, with its inputs set. These are full node setups that would take dozens of add_geometry_node calls. Change inputs later with set_geometry_node_input.

object_nameObject to add the modifier to.
modifierOne of: array (Shape Line/Circle/Curve, Count, Distance, Offset, Rotation, Scale: a richer Array than the classic modifier), scatter_on_surface (scatter an Object or Collection over a mesh: Object, Density Method Density/Amount, Amount, Density, Minimum Distance, Seed, Realize Instances), instance_on_elements (Instance On Points/Edges/Faces, Object, Collection, Align Rotation, Scale), randomize_transforms (jitter instances: Offset, Rotation, Scale, Seed), curve_to_tube (turn a curve into a pipe with caps and UVs: Scale, Profile Resolution, Caps, Shade Smooth), geometry_input (bring in another Object or Collection: Input Type, Object, Collection, As Instance, Replace Original), smooth_by_angle (Angle in radians, Ignore Sharpness), capture_rest_geometry (store rest positions for later effects).
settingsInput name to value, e.g. {"Object": "Rock", "Amount": 200}. Object and Collection inputs take the name of an existing one; menus take the option name as shown in Blender.

Returns Dict with the modifier name and every input with its value.

add_geometry_node

add_geometry_node(modifier_name: str, node_type: str, location: list[float] | tuple[float, ...] = (0, 0))

Add a node to a geometry nodes modifier's node group.

modifier_nameName of the geometry nodes modifier (used to find the node group).
node_typeBlender node type identifier, e.g. GeometryNodeMeshCube, GeometryNodeSetPosition, GeometryNodeTransform, ShaderNodeMath, GeometryNodeJoinGeometry, etc.
locationXY position for the node in the node editor. Defaults to (0, 0).

Returns Dict with the created node's name and type.

build_geometry_nodes

build_geometry_nodes(object_name: str, spec: dict[str, Any], modifier_name: str = 'GeometryNodes')

Build a whole geometry node graph on an object in one call. The graph is built in a new node group and only put on the modifier if every step works; on any error nothing changes. The group always gets a Geometry input and output, wired through nodes named "Group Input" and "Group Output". Read a graph back with get_geometry_node_tree.

object_nameObject to put the graph on (the modifier is created if needed).
spec{ "inputs": [{"name", "type", "default"?, "min"?, "max"?}] extra group inputs, shown on the modifier. type: FLOAT, INT, BOOLEAN, VECTOR, COLOR, ROTATION, STRING, OBJECT, COLLECTION, MATERIAL, GEOMETRY. "outputs": same shape, extra group outputs. "nodes": [{"name", "type", "location"?: [x, y], "pair_with"?: zone output node name, on a zone's input node (GeometryNodeSimulationInput, GeometryNodeRepeatInput, GeometryNodeForeachGeometryElementInput), "settings"?: {"operation": "SINE"}, node options "inputs"?: {"Size X": 4, "Offset": [0, 0, 1]}}] socket values; a socket is a name, identifier (Value_001) or index; object/collection/material sockets take a name. "links": [[from_node, from_socket, to_node, to_socket]] } Example: a wavy grid {"inputs": [{"name": "Size", "type": "FLOAT", "default": 4}], "nodes": [{"name": "grid", "type": "GeometryNodeMeshGrid", "inputs": {"Vertices X": 40, "Vertices Y": 40}}, {"name": "pos", "type": "GeometryNodeInputPosition"}, {"name": "xyz", "type": "ShaderNodeSeparateXYZ"}, {"name": "sine", "type": "ShaderNodeMath", "settings": {"operation": "SINE"}}, {"name": "up", "type": "ShaderNodeCombineXYZ"}, {"name": "move", "type": "GeometryNodeSetPosition"}], "links": [["Group Input", "Size", "grid", "Size X"], ["Group Input", "Size", "grid", "Size Y"], ["pos", 0, "xyz", 0], ["xyz", "X", "sine", 0], ["sine", 0, "up", "Z"], ["grid", "Mesh", "move", "Geometry"], ["up", 0, "move", "Offset"], ["move", "Geometry", "Group Output", "Geometry"]]}
modifier_nameGeometry nodes modifier to use or create.

Returns Dict with the modifier, the node group, and the node and link counts.

connect_geometry_nodes

connect_geometry_nodes(modifier_name: str, from_node: str, from_socket: int, to_node: str, to_socket: int)

Connect two nodes in a geometry nodes modifier's node group.

modifier_nameName of the geometry nodes modifier.
from_nodeName of the source node.
from_socketIndex of the output socket on the source node.
to_nodeName of the destination node.
to_socketIndex of the input socket on the destination node.

Returns Confirmation dict with connection details.

create_geometry_nodes

create_geometry_nodes(object_name: str, name: str = 'GeometryNodes')

Create a Geometry Nodes modifier on an object.

object_nameName of the object to add the modifier to.
nameName for the geometry nodes modifier. Defaults to "GeometryNodes".

Returns Dict with modifier name and node group name.

get_geometry_node_tree

get_geometry_node_tree(object_name: str, modifier_name: str)

Read a geometry nodes modifier's graph: group interface, nodes with their settings and unlinked input values, and links.

object_nameObject with the modifier.
modifier_nameGeometry nodes modifier.

Returns Dict with interface, nodes and links, in the shape build_geometry_nodes takes.

list_geometry_node_inputs

list_geometry_node_inputs(object_name: str, modifier_name: str)

List all available inputs on a geometry nodes modifier.

object_nameName of the object with the modifier.
modifier_nameName of the geometry nodes modifier.

Returns List of dicts with input name, type, and current value.

set_geometry_node_input

set_geometry_node_input(object_name: str, modifier_name: str, input_name: str, value: Any)

Set an input value on a geometry nodes modifier.

object_nameName of the object with the modifier.
modifier_nameName of the geometry nodes modifier.
input_nameName of the input socket to set (as shown in the modifier panel).
valueThe value to set. Type depends on the input (float, int, vector, etc.).

Returns Confirmation dict with the input name and new value.

Grease Pencil 9

add_annotation_layer

add_annotation_layer(annotation_name: str, layer_name: str)

Add a layer to an annotation. Layers organize annotation strokes. Each layer can have its own blend mode, opacity, and color.

annotation_nameName of the annotation data block.
layer_nameName for the new layer.

Returns Confirmation dict with annotation and layer names.

add_annotation_stroke

add_annotation_stroke(annotation_name: str, layer_name: str, points: list[list[float]])

Add a stroke to an annotation layer. Creates a new stroke with the given points on the specified layer. Annotation points in 5.2 are a position only: no pressure or strength.

annotation_nameName of the annotation data block.
layer_nameName of the layer to add the stroke to.
pointsList of XYZ coordinates, e.g. [[0,0,0], [1,1,0], [2,0,0]]. Maximum 10000 points.

Returns Confirmation dict with point count.

add_gp_stroke

add_gp_stroke(object_name: str, points: list[list[float]], layer: str = '', frame: int = 1, radius: float | list[float] = 0.02, cyclic: bool = False, material: str = '')

Draw one stroke in a Grease Pencil object. Points are in the object's local space. cyclic closes the outline.

object_nameGrease Pencil object (from create_grease_pencil).
points2 to 10000 points, each [x, y, z].
layerLayer to draw on; empty uses the active layer, a new name creates it.
frameKeyframe to draw into (drawings per frame make 2D animation).
radiusStroke radius in metres, one value or one per point (0.0001 to 10). Varying it tapers the line.
cyclicClose the stroke back to its first point.
materialGrease Pencil material (create_gp_material); empty uses the object's first material.

Returns Dict with the layer, frame and stroke count on that frame.

add_lineart

add_lineart(source: str = 'SCENE', source_name: str = '', name: str = 'LineArt', thickness: float = 0.01, color: list[float] | tuple[float, ...] = (0, 0, 0, 1), crease_angle: float = 2.443, use_intersection: bool = True)

Add Line Art: inked outlines generated from 3D geometry, as seen by the active camera. Gives renders a comic, technical or toon look.

sourceSCENE (everything), COLLECTION or OBJECT.
source_nameThe collection or object when source is not SCENE.
nameName for the Line Art object.
thicknessLine radius in metres, 0.0001 to 1.0.
colorLine RGBA, components 0.0 to 1.0.
crease_angleEdges sharper than this get lines, radians 0 to 3.1416 (2.443 is 140 degrees; lower draws more lines).
use_intersectionDraw lines where objects intersect.

Returns Dict with the Line Art object and its source.

create_annotation

create_annotation(name: str = '')

Create a new annotation data block. Annotations are viewport overlays used for drawing marks, notes, and guides. Unlike Grease Pencil objects, annotations are not positioned in 3D space.

nameOptional name for the annotation. Auto-generated if empty.

Returns Dict with the created annotation's name.

create_gp_material

create_gp_material(name: str, color: list[float] | tuple[float, ...] = (0, 0, 0, 1))

Create a Grease Pencil material: the stroke colour. Fills are not offered: in Blender 5.2, strokes built from a script do not render their fill.

nameMaterial name.
colorStroke RGBA, components 0.0 to 1.0.

Returns Dict with the material and its colour.

create_grease_pencil

create_grease_pencil(name: str = 'Drawing', location: list[float] | tuple[float, ...] = (0, 0, 0), layer_name: str = 'Lines')

Create a Grease Pencil object to draw 2D strokes in 3D space. Draw into it with add_gp_stroke; colour strokes with create_gp_material. For notes on the viewport use the annotation tools instead.

nameObject name.
locationPosition [x, y, z].
layer_nameName of its first layer.

Returns Dict with the object, layer and frame created.

remove_annotation_layer

remove_annotation_layer(annotation_name: str, layer_name: str)

Remove a layer from an annotation.

annotation_nameName of the annotation data block.
layer_nameName of the layer to remove.

Returns Confirmation dict.

set_annotation_stroke_property

set_annotation_stroke_property(annotation_name: str, layer_name: str, stroke_index: int, property: str, value: Any)

Set a property on an annotation stroke.

annotation_nameName of the annotation data block.
layer_nameName of the layer containing the stroke.
stroke_indexIndex of the stroke in the layer (0-based).
propertydisplay_mode, the only stroke setting in 5.2.
value3DSPACE (in the scene), 2DSPACE (stuck to the view) or 2DIMAGE.

Returns Confirmation dict.

Lighting 9

create_light

create_light(type: str, name: str = '', location: list = [0, 0, 0], energy: float = 1000.0, color: list = [1.0, 1.0, 1.0])

Create a new light in the scene.

typeLight type. One of: POINT, SUN, SPOT, AREA.
nameOptional name for the light.
locationXYZ location as [x, y, z], default [0, 0, 0].
energyLight energy/power, default 1000.
colorRGB color as [r, g, b], default [1.0, 1.0, 1.0].

Returns Confirmation dict with light name and properties.

create_light_rig

create_light_rig(type: str, target: str = '', intensity: float = 1000.0)

Create a pre-built lighting rig (multiple lights arranged for common setups).

typeRig type. One of: THREE_POINT, STUDIO, RIM, OUTDOOR.
targetOptional name of the object the rig should point at.
intensityOverall intensity of the lights, default 1000.

Returns Confirmation dict with names of all created lights.

delete_light

delete_light(object_name: str)

Delete a light object from the scene.

object_nameName of the light object to delete.

Returns Confirmation dict.

list_lights

list_lights()

List all light objects in the scene.

Returns List of dicts with light name, type, energy, color, and location.

set_light_linking

set_light_linking(light_name: str, objects: list[str], role: str = 'RECEIVERS', mode: str = 'INCLUDE')

Limit which objects a light lights, or which objects block its shadows. Classic uses: a rim light that touches only the hero, or a fill light that skips the background. Replaces the light's list each call; an empty list removes the link so the light affects everything again.

light_nameThe light (or emissive object).
objectsObjects in the link list, at most 1000.
roleRECEIVERS (objects the light lights) or BLOCKERS (objects that cast its shadows).
modeINCLUDE (only these) or EXCLUDE (everything except these).

Returns Dict with the light, the link collection and its objects.

set_light_property

set_light_property(object_name: str, property: str, value: Any)

Set a property on a light object.

object_nameName of the light object.
propertyProperty to set. One of: energy, color, shadow_soft_size, spot_size, spot_blend, area_size, area_size_y, use_shadow, angle, specular_factor, diffuse_factor, volume_factor.
valueThe value to set. Type depends on the property.

Returns Confirmation dict.

set_shadow_settings

set_shadow_settings(object_name: str, use_shadow: bool = True, shadow_soft_size: float = 0.25)

Configure shadow settings for a light.

object_nameName of the light object.
use_shadowWhether to enable shadows, default True.
shadow_soft_sizeSoft shadow radius, default 0.25.

Returns Confirmation dict.

set_world_background

set_world_background(color: list | None = None, hdri_path: str | None = None, builtin_hdri: str | None = None, strength: float = 1.0, rotation: float = 0.0)

Set the world background to a solid colour or an HDRI environment. An HDRI lights the whole scene and gives metal and glass something to reflect; without one, metals look dull. Give exactly one of color, hdri_path or builtin_hdri.

colorRGB colour [r, g, b] for a plain background.
hdri_pathAbsolute path to an HDRI image (.hdr, .exr, ...).
builtin_hdriOne of the HDRIs that ship with Blender: city, courtyard, forest, interior, night, studio, sunrise, sunset.
strengthBackground strength, 0 to 1000, default 1.0.
rotationHDRI turn around the vertical axis in radians, to move where the light comes from. -6.283 to 6.283.

Returns Confirmation dict.

set_world_sky

set_world_sky(sky_type: str = 'MULTIPLE_SCATTERING', sun_elevation: float = 0.2618, sun_rotation: float = 0.0, sun_intensity: float = 1.0, sun_disc: bool = True, altitude: float = 100.0, air_density: float = 1.0, aerosol_density: float = 1.0, ozone_density: float = 1.0, strength: float = 1.0)

Light the scene with a physically based procedural sky and sun. Realistic daylight for any time of day with no image file. Low sun elevation gives golden hour; negative gives dusk. Pair with AgX colour management (set_color_management) for natural results.

sky_typeMULTIPLE_SCATTERING (most realistic, new in 5.0), SINGLE_SCATTERING, PREETHAM or HOSEK_WILKIE.
sun_elevationSun height above the horizon in radians, -1.571 to 1.571. 0.26 (15 degrees) is mid-morning; 0.05 golden hour.
sun_rotationSun direction around the vertical axis in radians.
sun_intensitySun brightness multiplier, 0 to 1000.
sun_discShow the sun itself in the sky.
altitudeViewer height in metres, 0 to 100000.
air_densityAir molecules, 0 to 10. Higher is bluer.
aerosol_densityDust and haze, 0 to 10. Higher is hazier and warmer.
ozone_densityOzone, 0 to 10. Affects the blue at dusk.
strengthOverall sky brightness, 0 to 1000.

Returns Dict with the sky settings applied.

Materials & Shaders 25

add_color_ramp_element

add_color_ramp_element(material_name: str, node_name: str, position: float, color: list)

Add a colour stop to a ColorRamp (ShaderNodeValToRGB) node. A new ramp starts with two stops, black at 0.0 and white at 1.0. Add stops to shape a gradient: fire needs dark red, orange, yellow, white bunched toward the top; rust needs a hard break between metal and oxide.

material_nameName of the material.
node_nameName of the ColorRamp node.
positionStop position along the ramp, 0.0 to 1.0.
colorRGB or RGBA color, components 0.0 to 1.0. RGB gains alpha 1.0.

Returns Dict with the new element's index, position, and color.

add_shader_node

add_shader_node(material_name: str, node_type: str, location: list = [0, 0])

Add a shader node to a material's node tree.

material_nameName of the material.
node_typeBlender shader node type (e.g. ShaderNodeBsdfPrincipled).
locationNode location as [x, y], default [0, 0].

Returns Dict with material, node_name, and node_type.

add_texture_node

add_texture_node(material_name: str, image_path: str, label: str = 'Image Texture')

Add an image texture node to a material and connect it to the Principled BSDF Base Color.

material_nameName of the material.
image_pathAbsolute path to the image file. Must exist on disk.
labelLabel for the texture node, default "Image Texture".

Returns Confirmation dict.

assign_material

assign_material(object_name: str, material_name: str)

Assign a material to an object. An object with no material, or a single one (like the default cube's "Material"), takes the new material on every face. An object that already has several materials keeps them and gains an extra slot that no face uses yet.

object_nameName of the target object.
material_nameName of the material to assign.

Returns Dict with the slot used and the action: "assigned", "replaced" (with the replaced material's name), "added_slot" or "already_assigned".

connect_shader_nodes

connect_shader_nodes(material_name: str, from_node: str, from_socket: str, to_node: str, to_socket: str)

Connect two shader nodes in a material's node tree.

material_nameName of the material.
from_nodeName of the source node.
from_socketName of the output socket on the source node.
to_nodeName of the destination node.
to_socketName of the input socket on the destination node.

Returns Confirmation dict.

create_material

create_material(name: str)

Create an empty material: a bare Principled BSDF at default values. Use this only when you will wire the node tree yourself with add_shader_node and connect_shader_nodes. For a plain surface with a colour, metallic and roughness set in one call, use create_principled_material. For wood, marble, fire and other patterned surfaces, use create_procedural_material.

nameName for the new material.

Returns Confirmation dict with the created material name.

create_principled_material

create_principled_material(name: str, color: list = [0.8, 0.8, 0.8, 1.0], metallic: float = 0.0, roughness: float = 0.5, specular: float = 0.5, emission_strength: float = 0.0, emission_color: list = [1.0, 1.0, 1.0, 1.0], alpha: float = 1.0, transmission: float = 0.0, ior: float = 1.45)

Create a plain-surface material with colour, metallic, roughness and more set in one call. The usual choice for painted, metal, glass or plastic surfaces of a single colour. For a patterned surface (wood, marble, fire, veins) use create_procedural_material instead. create_material makes the same Principled BSDF with nothing set, for when you will build the node tree by hand.

nameName for the new material.
colorBase color as RGBA list, default [0.8, 0.8, 0.8, 1.0].
metallicMetallic value 0.0-1.0, default 0.0.
roughnessRoughness value 0.0-1.0, default 0.5.
specularSpecular IOR level 0.0-1.0, default 0.5.
emission_strengthEmission strength, default 0.0.
emission_colorEmission color as RGBA list, default [1.0, 1.0, 1.0, 1.0].
alphaAlpha value 0.0-1.0, default 1.0.
transmissionTransmission weight 0.0-1.0, default 0.0.
iorIndex of refraction, default 1.45.

Returns Confirmation dict with material name and all set properties.

create_procedural_material

create_procedural_material(name: str, pattern: str, scale: float = 5.0, detail: float = 2.0, distortion: float = 0.0, roughness: float = 0.5, metallic: float = 0.0, colors: list | None = None, banded: bool = False, connect_to_bsdf: bool = True)

Create a patterned material (wood, marble, fire, veins) as a full node graph in one call. For a single flat colour use create_principled_material instead; for an empty material you will wire by hand use create_material. Prefer this over hand-wiring texture nodes. It creates the full graph ( coordinates, mapping, the pattern's texture nodes, a tuned colour ramp, and the Principled BSDF) and returns the node names so you can adjust anything afterwards with set_shader_node_input or the colour ramp tools. Procedural beats image textures here: no files, no UV unwrap needed, and it stays sharp at any camera distance. Call list_procedural_patterns() to see what each pattern looks like.

nameName for the new material.
patternOne of the supported patterns, e.g. 'fire', 'wood', 'veins'.
scaleFeature size. Lower is bigger and broader, higher is finer and busier. 5.0 is a sensible default; try 1-3 for large forms and 20+ for fine detail.
detailFractal octaves, 0-15. Higher adds finer sub-detail at the cost of render time. Applies to noise, cloud, wood, marble, plasma and fire. The cellular patterns (voronoi, veins, scales, sparks), stripes, weave and gradient have no detail socket and ignore it.
distortionWarps the pattern. Small values (0.5-2.0) make wood and marble look organic rather than machine-perfect. Applies to noise, cloud, stripes, wood, marble, plasma and fire. The cellular patterns, weave and gradient ignore it.
roughnessSurface roughness 0-1 for the Principled BSDF.
metallicMetallic 0-1 for the Principled BSDF.
colorsOptional list of RGB or RGBA colours for the ramp, in order. Omit to use the pattern's own tuned palette.
bandedUse CONSTANT ramp interpolation, giving hard-edged bands instead of smooth blending. Turns noise into discrete regions: scale plates, cracked mud, cel shading.
connect_to_bsdfWire the result into the Principled BSDF base colour so the material renders immediately. Set False to leave the pattern subtree unconnected for manual wiring.

Returns Dict with the material name, the created node names, and ignored_params listing any arguments this pattern could not use.

create_raster_texture

create_raster_texture(name: str, pattern: str, size: int = 512, count: int = 12, seed: int = 0, foreground: list | None = None, background: list | None = None)

Generate an image texture for patterns shader nodes cannot express. Use this only for patterns that place discrete marks. Shader nodes evaluate a function per point and have no way to say "draw a glyph here, then another over there", so runes need real pixels. Everything else should go through create_procedural_material, which stays sharp at any resolution. The image is packed into the blend file. No file is written to disk.

nameName for the generated image datablock.
patternA raster pattern. Currently 'runes'.
sizePixel width and height, up to 2048. Cost grows with the square.
countHow many marks to stamp. 0 leaves a blank field.
seedChange for a different arrangement; the same seed always reproduces the same image.
foregroundRGB or RGBA colour of the marks.
backgroundRGB or RGBA colour behind them.

Returns Dict with the image name, size, and mark count.

delete_material

delete_material(material_name: str)

Delete a material by name.

material_nameName of the material to delete.

Returns Confirmation dict.

disconnect_shader_nodes

disconnect_shader_nodes(material_name: str, node_name: str, socket_name: str, is_input: bool = True)

Disconnect all links from a specific socket on a shader node.

material_nameName of the material.
node_nameName of the node.
socket_nameName of the socket to disconnect.
is_inputIf True, disconnect an input socket; otherwise an output socket.

Returns Confirmation dict.

duplicate_material

duplicate_material(material_name: str, new_name: str)

Duplicate a material with a new name.

material_nameName of the material to duplicate.
new_nameName for the duplicated material.

Returns Confirmation dict with the new material name.

get_color_ramp

get_color_ramp(material_name: str, node_name: str)

Read every stop on a ColorRamp node. Use this before editing to learn the current indices and positions, since add and move operations reorder stops.

material_nameName of the material.
node_nameName of the ColorRamp node.

Returns Dict with elements (index, position, color), interpolation, color_mode.

get_node_tree

get_node_tree(material_name: str)

Get the full node tree of a material (all nodes and links).

material_nameName of the material.

Returns Dict with nodes (name, type, location, input and output names, the values of unlinked inputs, and the node's own settings) and links.

list_materials

list_materials()

List all materials in the current Blender file.

Returns List of dicts with material name and user count.

list_procedural_patterns

list_procedural_patterns()

List every procedural pattern with a description of what it looks like. Read this before calling create_procedural_material so you pick a pattern that matches the surface you are trying to make.

Returns Dict with the sorted pattern names and a description of each.

remove_color_ramp_element

remove_color_ramp_element(material_name: str, node_name: str, index: int)

Remove a colour stop from a ColorRamp node. Blender requires at least one stop to remain; removing the last one fails.

material_nameName of the material.
node_nameName of the ColorRamp node.
indexZero-based index of the stop to remove.

Returns Dict with the removed index and the remaining element count.

remove_shader_node

remove_shader_node(material_name: str, node_name: str)

Remove a shader node from a material's node tree.

material_nameName of the material.
node_nameName of the node to remove.

Returns Confirmation dict.

set_color_ramp_element

set_color_ramp_element(material_name: str, node_name: str, index: int, position: float | None = None, color: list | None = None)

Move or recolor an existing ColorRamp stop. At least one of position or color must be given. Moving a stop past a neighbour reorders the ramp, so indices may shift after this call. Read the ramp back with get_color_ramp if you need certainty.

material_nameName of the material.
node_nameName of the ColorRamp node.
indexZero-based index of the stop to edit.
positionNew position, 0.0 to 1.0. Omit to leave unchanged.
colorNew RGB or RGBA color. Omit to leave unchanged.

Returns Dict with the element's resulting position and color.

set_color_ramp_interpolation

set_color_ramp_interpolation(material_name: str, node_name: str, interpolation: str, color_mode: str = '')

Set how a ColorRamp blends between its stops. 'CONSTANT' gives hard-edged bands with no blending, which is what turns a noise or voronoi texture into discrete regions: scale plates, cracked mud, stylised cel shading. 'EASE' and 'B_SPLINE' give softer falloff than 'LINEAR'. Set color_mode to 'HSV' to sweep through hues between two stops rather than blending through grey.

material_nameName of the material.
node_nameName of the ColorRamp node.
interpolationOne of EASE, CARDINAL, LINEAR, B_SPLINE, CONSTANT.
color_modeOptional. One of RGB, HSV, HSL. Omit to leave unchanged.

Returns Dict with the applied interpolation and color mode.

set_material_blend_mode

set_material_blend_mode(material_name: str, mode: str)

Set the blend mode of a material (EEVEE).

material_nameName of the material.
modeBlend mode. One of: OPAQUE, CLIP, HASHED, BLEND.

Returns Confirmation dict.

set_material_color

set_material_color(material_name: str, color: list)

Set the base color of a material's Principled BSDF node.

material_nameName of the material.
colorRGBA color as a list of 4 floats (0.0-1.0). e.g. [1.0, 0.0, 0.0, 1.0] for red.

Returns Confirmation dict.

set_material_property

set_material_property(material_name: str, property: str, value: Any)

Set a property on a material's Principled BSDF node.

material_nameName of the material.
propertyProperty to set. One of: metallic, roughness, specular_ior_level, emission_strength, alpha, transmission_weight, ior, coat_weight, coat_roughness, sheen_weight, sheen_roughness, anisotropic, anisotropic_rotation, subsurface_weight, emission_color.
valueThe value to set. Float for most properties, list for color properties.

Returns Confirmation dict.

set_shader_node_input

set_shader_node_input(material_name: str, node_name: str, socket: str | int, value: float | bool | list)

Set the default value of an unconnected input socket on a shader node. This is how you dial in a procedural texture: Noise 'Scale' and 'Detail', Mapping 'Scale' and 'Rotation', a Principled BSDF 'Roughness', and so on. A socket that has a link into it ignores its default value, so disconnect it first if you want the default to take effect.

material_nameName of the material.
node_nameName of the node.
socketSocket name, or a zero-based index. Use the index when names are ambiguous: a Math node has two inputs both called 'Value'.
valueA number, a boolean, or a 2-4 component list for vectors and colors (colors are RGBA).

Returns Dict with the node, socket, and the value that was applied.

set_shader_node_property

set_shader_node_property(material_name: str, node_name: str, property: str, value: str | float | bool)

Set a node-level property (not a socket) on a shader node. These are the dropdowns and checkboxes on the node body rather than its input sockets: Math 'operation', Mix 'blend_type', Voronoi 'feature' (use 'DISTANCE_TO_EDGE' for vein and crack patterns), Wave 'wave_type' and 'bands_direction', Noise 'noise_dimensions'.

material_nameName of the material.
node_nameName of the node.
propertyProperty name. Must be one of the allowed node properties.
valueString enum identifier, number, or boolean.

Returns Dict with the node, property, and the value that was applied.

Mesh Editing 20

bisect_mesh

bisect_mesh(object_name: str, plane_point: list[float] | tuple[float, ...] = (0, 0, 0), plane_normal: list[float] | tuple[float, ...] = (0, 0, 1), clear_inner: bool = False, clear_outer: bool = False, fill: bool = False, selection: str = 'ALL')

Slice a mesh with a plane, optionally deleting one side and capping the cut. Cuts a new edge loop where the plane crosses, which is also a clean way to halve a model before adding a Mirror modifier.

object_nameMesh object.
plane_pointA point on the cutting plane, in world space.
plane_normalThe plane's direction, in world space; it need not be unit length but must not be zero. [0, 0, 1] is a horizontal cut.
clear_innerDelete everything behind the plane (against the normal).
clear_outerDelete everything in front of the plane (along the normal).
fillCap the cut with a face. Only useful when one side is cleared.
selection"ALL" for the whole mesh, or "CURRENT" for the part already selected.

Returns Dict with the vertex count afterwards.

dissolve_edges

dissolve_edges(object_name: str, selection: str = 'ALL')

Dissolve all edges, merging adjacent faces. Simplifies topology by removing unnecessary edge loops while preserving the overall shape.

object_nameName of the mesh object.
selection"ALL" to act on the whole mesh, or "CURRENT" to act only on what is already selected. Use the select_* tools to choose first. Defaults to "ALL".

Returns Confirmation dict.

dissolve_faces

dissolve_faces(object_name: str, selection: str = 'ALL')

Dissolve all faces, merging them into surrounding geometry. Removes faces while keeping the surrounding mesh structure intact. Cleaner than deleting faces which leaves holes.

object_nameName of the mesh object.
selection"ALL" to act on the whole mesh, or "CURRENT" to act only on what is already selected. Use the select_* tools to choose first. Defaults to "ALL".

Returns Confirmation dict.

dissolve_verts

dissolve_verts(object_name: str, selection: str = 'ALL')

Dissolve all vertices, merging connected edges and faces. Removes vertices while preserving surrounding geometry.

object_nameName of the mesh object.
selection"ALL" to act on the whole mesh, or "CURRENT" to act only on what is already selected. Use the select_* tools to choose first. Defaults to "ALL".

Returns Confirmation dict.

edit_mesh_operation

edit_mesh_operation(object_name: str, operation: str, selection: str = 'ALL', factor: float = 0.5, repeat: int = 1, offset: float = 0.0, thickness: float = 0.02)

Run one of the common edit-mode operations on a mesh.

object_nameMesh object.
operationOne of: SMOOTH_VERTICES (relax lumpy geometry: factor, repeat), POKE (a new vertex in the middle of each face, fanned into triangles: offset pushes it along the normal), EDGE_SPLIT (separate faces along their edges, for hard edges), WIREFRAME (turn every edge into a strut: thickness), SOLIDIFY (give faces thickness, e.g. a plane into a slab: thickness).
selectionALL, or CURRENT for the part chosen with the select_* tools.
factorSMOOTH_VERTICES strength, 0.0 to 1.0.
repeatSMOOTH_VERTICES passes, 1 to 100.
offsetPOKE distance along the face normal, -100 to 100.
thicknessWIREFRAME and SOLIDIFY thickness, 0.0001 to 1000.

Returns Dict with the operation and the mesh's vertex and face counts after it.

fill_faces

fill_faces(object_name: str, selection: str = 'ALL')

Fill selected edges with a face. Creates faces from a closed edge loop. Useful for closing gaps in meshes or capping open ends.

object_nameName of the mesh object.
selection"ALL" to act on the whole mesh, or "CURRENT" to act only on what is already selected. Use the select_* tools to choose first. Defaults to "ALL".

Returns Confirmation dict.

flip_normals

flip_normals(object_name: str, selection: str = 'ALL')

Flip the direction of all face normals on a mesh. Reverses inside/outside of all faces. Use recalculate_normals instead if normals are inconsistent rather than uniformly wrong.

object_nameName of the mesh object.
selection"ALL" to act on the whole mesh, or "CURRENT" to act only on what is already selected. Use the select_* tools to choose first. Defaults to "ALL".

Returns Confirmation dict.

grid_fill

grid_fill(object_name: str, span: int = 1, offset: int = 0, selection: str = 'ALL')

Fill a closed edge loop with a grid of quads. Creates a clean quad grid between edge loops. Better than fill_faces for maintaining good topology.

object_nameName of the mesh object.
spanNumber of grid columns. Range: 1-1000.
offsetOffset for the grid alignment. Range: 0-1000.
selection"ALL" to act on the whole mesh, or "CURRENT" to act only on what is already selected. Use the select_* tools to choose first. Defaults to "ALL".

Returns Confirmation dict.

inset_faces

inset_faces(object_name: str, thickness: float = 0.1, depth: float = 0.0, selection: str = 'ALL')

Inset all faces of a mesh, creating a border/frame around each face. Core hard-surface modeling operation for adding detail, panel lines, or preparing faces for extrusion. On a closed mesh, selection="ALL" does nothing: a region with no boundary has nothing to inset from, and Blender reports success having changed nothing. Measured on a default cube in 5.1, the vertex, edge and face counts are identical afterwards. Select the faces you mean and pass selection="CURRENT".

object_nameName of the mesh object.
thicknessInset thickness (border width). Range: 0.0-10.0.
depthInset depth (positive=outward, negative=inward). Range: -10.0 to 10.0.
selection"ALL" to act on the whole mesh, or "CURRENT" to act only on what is already selected. Use the select_* tools to choose first. Defaults to "ALL".

Returns Confirmation dict.

knife_project

knife_project(object_name: str, cutter_name: str)

Project a cutter object's outline onto a mesh to cut it. The cutter object (curve or mesh) is projected from the viewport onto the target mesh, cutting new edges into it.

object_nameName of the mesh to cut into.
cutter_nameName of the cutter object (curve or mesh) to project.

Returns Confirmation dict.

loop_tools

loop_tools(object_name: str, operation: str, factor: float = 1.0, radius: float | None = None, selection: str = 'CURRENT')

Reshape selected loops: make them round, even or flat. Blender 5.2's built-in versions of the LoopTools add-on. Select a loop or region first with the select_* tools.

object_nameMesh object.
operationCIRCLE (shape the selection into a circle: round holes for bolts and pipes), SPACE (space vertices evenly along the loop), or FLATTEN (press the selection onto a best-fit plane).
factorHow far to move toward the result, 0.0 to 1.0.
radiusCIRCLE only: a fixed radius instead of the best fit, above 0.
selection"CURRENT" (default) for what is selected, or "ALL".

Returns Dict with the operation and the object.

mark_seam

mark_seam(object_name: str, clear: bool = False, selection: str = 'ALL')

Mark or clear UV seams on all edges of a mesh. UV seams guide the UV unwrapping process. Edges marked as seams define where the mesh is "cut" when unwrapped to 2D.

object_nameName of the mesh object.
clearIf True, clear seams instead of marking them.
selection"ALL" to act on the whole mesh, or "CURRENT" to act only on what is already selected. Use the select_* tools to choose first. Defaults to "ALL".

Returns Confirmation dict.

mark_sharp

mark_sharp(object_name: str, clear: bool = False, selection: str = 'ALL')

Mark or clear sharp edges on a mesh. Sharp edges control auto-smooth shading. Edges marked as sharp will have a hard edge in the shading even with smooth shading enabled.

object_nameName of the mesh object.
clearIf True, clear sharp marks instead of setting them.
selection"ALL" to act on the whole mesh, or "CURRENT" to act only on what is already selected. Use the select_* tools to choose first. Defaults to "ALL".

Returns Confirmation dict.

quads_to_tris

quads_to_tris(object_name: str, selection: str = 'ALL')

Convert all quad faces to triangles. Useful for game engine export or when triangulated geometry is required.

object_nameName of the mesh object.
selection"ALL" to act on the whole mesh, or "CURRENT" to act only on what is already selected. Use the select_* tools to choose first. Defaults to "ALL".

Returns Confirmation dict.

recalculate_normals

recalculate_normals(object_name: str, inside: bool = False, selection: str = 'ALL')

Recalculate face normals to be consistent (all pointing outward or inward). Fixes meshes with flipped or inconsistent normals that cause shading artifacts.

object_nameName of the mesh object.
insideIf True, normals point inward instead of outward.
selection"ALL" to act on the whole mesh, or "CURRENT" to act only on what is already selected. Use the select_* tools to choose first. Defaults to "ALL".

Returns Confirmation dict.

select_linked

select_linked(object_name: str)

Grow the current mesh selection to everything connected to it. Expands selection to include all connected vertices, edges, and faces. Useful for isolating mesh islands or selecting connected components. Needs a starting selection: set one with select_by_index or select_by_axis first. Works inside one mesh; to select whole objects use select_objects.

object_nameName of the mesh object.

Returns Confirmation dict.

set_edge_crease

set_edge_crease(object_name: str, value: float = 1.0, selection: str = 'ALL')

Set edge crease value on all edges for subdivision surface control. Crease values control how sharp edges remain when a Subdivision Surface modifier is applied. 0 = fully smooth, 1 = fully sharp.

object_nameName of the mesh object.
valueCrease value. Range: -1.0 to 1.0.
selection"ALL" to act on the whole mesh, or "CURRENT" to act only on what is already selected. Use the select_* tools to choose first. Defaults to "ALL".

Returns Confirmation dict.

spin_mesh

spin_mesh(object_name: str, angle: float = math.tau, steps: int = 12, axis: list[float] | tuple[float, ...] = (0, 0, 1), center: list[float] | tuple[float, ...] = (0, 0, 0), selection: str = 'ALL')

Spin (lathe) mesh geometry around an axis. Creates rotational geometry by duplicating and rotating the selected geometry around a center point. Great for creating round shapes like vases, columns, or wheels.

object_nameName of the mesh object.
angleTotal spin angle in radians. Range: -6.283 to 6.283 (full circle).
stepsNumber of steps in the spin. Range: 1-1000.
axisSpin axis as XYZ vector. Defaults to Z-up (0, 0, 1).
centerCenter point for the spin as XYZ. Defaults to origin.
selection"ALL" to act on the whole mesh, or "CURRENT" to act only on what is already selected. Use the select_* tools to choose first. Defaults to "ALL".

Returns Confirmation dict.

symmetrize_mesh

symmetrize_mesh(object_name: str, direction: str = 'NEGATIVE_X', threshold: float = 0.0001, selection: str = 'ALL')

Make a mesh symmetrical by copying one half onto the other. Fixes a model that drifted out of symmetry, or builds the second half of a half-modelled object. Works in the object's local axes.

object_nameMesh object.
directionWhich half is copied where. NEGATIVE_X copies the -X side onto +X; POSITIVE_X the reverse; likewise for Y and Z.
thresholdDistance within which vertices on the centre line merge, 0.0 to 1.0.
selection"ALL" for the whole mesh, or "CURRENT" for the part already selected with the select_* tools.

Returns Dict with the direction and the vertex count afterwards.

tris_to_quads

tris_to_quads(object_name: str, selection: str = 'ALL')

Convert adjacent triangle pairs to quad faces where possible. Improves topology for subdivision and deformation. Not all triangles can be merged: only adjacent pairs with compatible angles.

object_nameName of the mesh object.
selection"ALL" to act on the whole mesh, or "CURRENT" to act only on what is already selected. Use the select_* tools to choose first. Defaults to "ALL".

Returns Confirmation dict.

Mesh Quality 3

analyze_mesh_quality

analyze_mesh_quality(object_name: str)

Analyze mesh topology quality and return a structured defect report. Checks for non-manifold edges, loose vertices, zero-area faces, duplicate vertices, and wire edges. Returns counts and sample indices (capped at 50 per category) for each defect type.

object_nameName of the mesh object to analyze.

Returns Dict with vertex/edge/face counts, defect counts and sample indices, and an issues_found boolean.

decimate_mesh

decimate_mesh(object_name: str, ratio: float = 0.5)

Reduce a mesh's polygon count, collapsing edges to hit a target. The counterpart to subdivision: an agent that has stacked Subdivision modifiers has otherwise no way back down, and a dense mesh slows every later operation.

object_nameName of the mesh object to simplify.
ratioFraction of faces to keep, between 0 and 1. 0.5 halves the face count. 1.0 keeps everything and is refused as a no-op.

Returns Dict with the face count before and after.

repair_mesh

repair_mesh(object_name: str, remove_loose: bool = True, dissolve_degenerate: bool = True, fill_holes: bool = False)

Repair the defects analyze_mesh_quality reports. Pairs with analyze_mesh_quality: run that first, then call this with the repairs the report calls for. Removing loose geometry and dissolving degenerate faces cannot change a well-formed mesh, so both are on by default. Filling holes creates new geometry and is opt-in.

object_nameName of the mesh object to repair.
remove_looseDelete loose vertices and wire edges, the ones reported as loose_vertex_count and wire_edge_count.
dissolve_degenerateDissolve zero-area faces and zero-length edges, reported as zero_area_face_count.
fill_holesClose boundary loops, which reduces non_manifold_edge_count but invents geometry to do it.

Returns Dict with the counts before and after, so the effect is visible.

Modeling 13

add_modifier

add_modifier(object_name: str, modifier_type: str, name: str = '')

Add a modifier to a mesh object (non-destructive workflow). TIP: For BOOLEAN type, consider using booltool_auto_union/difference/intersect/slice instead: they apply the boolean immediately and handle cutter cleanup automatically. Only use add_modifier with BOOLEAN when you want a non-destructive modifier stack.

object_nameName of the object to add the modifier to.
modifier_typeType of modifier. Must be one of: SUBSURF, MIRROR, ARRAY, BEVEL, BOOLEAN, SOLIDIFY, DECIMATE, REMESH, WIREFRAME, SHRINKWRAP, SMOOTH, EDGE_SPLIT, TRIANGULATE, WEIGHTED_NORMAL, SIMPLE_DEFORM, LATTICE, CURVE, CAST, WAVE, DISPLACE, SCREW, SKIN, MASK, WELD, CORRECTIVE_SMOOTH, LAPLACIAN_SMOOTH, SURFACE_DEFORM, MESH_DEFORM, HOOK.
nameOptional custom name for the modifier.

Returns Confirmation dict with modifier details.

apply_modifier

apply_modifier(object_name: str, modifier_name: str)

Apply a modifier to an object, making its effect permanent.

object_nameName of the object.
modifier_nameName of the modifier to apply.

Returns Confirmation dict.

bevel_edges

bevel_edges(object_name: str, width: float = 0.1, segments: int = 1, selection: str = 'ALL')

Bevel all edges of a mesh.

object_nameName of the mesh object.
widthBevel width.
segmentsNumber of bevel segments. Range: 1-100.
selection"ALL" to act on the whole mesh, or "CURRENT" to act only on what is already selected. Use the select_* tools to choose first. Defaults to "ALL".

Returns Confirmation dict.

boolean_operation

boolean_operation(object_name: str, target_name: str, operation: str = 'DIFFERENCE')

Perform a boolean operation between two objects using a modifier. NOTE: For destructive booleans, prefer the booltool_auto_* tools instead (booltool_auto_union, booltool_auto_difference, booltool_auto_intersect, booltool_auto_slice). They handle selection and cutter cleanup automatically. Use this tool only when you need a non-destructive boolean modifier workflow.

object_nameName of the object to apply the boolean to.
target_nameName of the target/cutter object.
operationBoolean operation type. One of: UNION, DIFFERENCE, INTERSECT.

Returns Confirmation dict with operation details.

bridge_edge_loops

bridge_edge_loops(object_name: str, segments: int = 1, profile_shape_factor: float = 0.0)

Bridge two edge loops to create connecting geometry. Select two edge loops on a mesh before calling this. The operation creates faces connecting the two loops, useful for connecting separate mesh parts, creating holes between surfaces, or building tube-like geometry.

object_nameName of the mesh object with selected edge loops.
segmentsNumber of segments in the bridge. Range: 1-1000.
profile_shape_factorShape of the bridge profile. Range: -1.0 to 1.0. 0.0 is straight, positive values bulge outward, negative inward.

Returns Confirmation dict with bridge details.

extrude_faces

extrude_faces(object_name: str, offset: float = 1.0, selection: str = 'ALL')

Extrude all faces of a mesh along their normals.

object_nameName of the mesh object.
offsetExtrusion distance along face normals.
selection"ALL" to act on the whole mesh, or "CURRENT" to act only on what is already selected. Use the select_* tools to choose first. Defaults to "ALL".

Returns Confirmation dict.

loop_cut

loop_cut(object_name: str, cuts: int = 1, selection: str = 'ALL')

Add loop cuts to a mesh object.

object_nameName of the mesh object.
cutsNumber of loop cuts. Range: 1-100.
selection"ALL" to act on the whole mesh, or "CURRENT" to act only on what is already selected. Use the select_* tools to choose first. Defaults to "ALL".

Returns Confirmation dict.

merge_vertices

merge_vertices(object_name: str, threshold: float = 0.0001, selection: str = 'ALL')

Merge vertices by distance.

object_nameName of the mesh object.
thresholdMaximum distance between vertices to merge. Range: 0.0-10.0.
selection"ALL" to act on the whole mesh, or "CURRENT" to act only on what is already selected. Use the select_* tools to choose first. Defaults to "ALL".

Returns Confirmation dict with number of removed vertices.

remove_modifier

remove_modifier(object_name: str, modifier_name: str)

Remove a modifier from an object.

object_nameName of the object.
modifier_nameName of the modifier to remove.

Returns Confirmation dict.

separate_mesh

separate_mesh(object_name: str, type: str = 'SELECTED')

Separate a mesh into parts.

object_nameName of the mesh object.
typeSeparation method. One of: SELECTED, MATERIAL, LOOSE.

Returns Confirmation dict.

set_modifier_property

set_modifier_property(object_name: str, modifier_name: str, property: str, value: Any)

Set a property on a modifier (e.g., levels, count, offset, angle).

object_nameName of the object.
modifier_nameName of the modifier.
propertyThe modifier property to set (e.g., 'levels', 'count', 'width', 'segments', 'angle', 'offset', 'ratio', 'iterations', or an object setting such as 'target' or 'object').
valueThe value to set. Object, collection, texture and image settings take the name of an existing one.

Returns Confirmation dict with updated property.

set_smooth_shading

set_smooth_shading(object_name: str, smooth: bool = True)

Set smooth or flat shading on an object. TIP: For production use, prefer shade_auto_smooth which provides angle-based auto-smooth shading: it gives better results on hard-surface models by only smoothing faces within the angle threshold.

object_nameName of the mesh object.
smoothTrue for smooth shading, False for flat shading.

Returns Confirmation dict.

subdivide_mesh

subdivide_mesh(object_name: str, cuts: int = 1, selection: str = 'ALL')

Subdivide a mesh.

object_nameName of the mesh object to subdivide.
cutsNumber of cuts per edge. Range: 1-100.
selection"ALL" to act on the whole mesh, or "CURRENT" to act only on what is already selected. Use the select_* tools to choose first. Defaults to "ALL".

Returns Confirmation dict.

Objects 16

convert_object

convert_object(object_name: str, target: str = 'MESH')

Convert an object to a different type.

object_nameName of the object to convert.
targetTarget type. One of: MESH, CURVE, SURFACE, META, FONT, CURVES, POINTCLOUD, GPENCIL.

Returns Confirmation dict.

create_metaball

create_metaball(name: str = 'Metaball', elements: list[dict[str, Any]] | None = None, location: list[float] | None = None, resolution: float = 0.2, threshold: float = 0.6)

Create a metaball: soft elements that melt into one smooth surface. Good for organic blobs, liquid drops and quick character blocking. Turn it into an editable mesh with convert_object(target="MESH").

nameObject name.
elementsUp to 500 of {"type": BALL | CAPSULE | ELLIPSOID | CUBE | PLANE, "location": [x, y, z] (relative to the object), "radius": influence (default 1), "stiffness": 0-10 how firm (default 2), "size": [x, y, z] half-extents for the non-BALL types, "negative": true to carve the shape away instead}. Elements closer than their radii merge. Default: one ball.
locationObject position, [x, y, z].
resolutionSurface detail in the viewport, 0.05 (fine) to 2 (coarse).
thresholdWhere the surface sits in the field, 0.01 to 5. Lower is fatter.

Returns Dict with the object name and element count.

create_object

create_object(type: str, name: str = '', location: list[float] | tuple[float, ...] = (0, 0, 0), rotation: list[float] | tuple[float, ...] = (0, 0, 0), scale: list[float] | tuple[float, ...] = (1, 1, 1))

Create a primitive object in the scene.

typePrimitive type. One of: CUBE, SPHERE, UV_SPHERE, ICO_SPHERE, CYLINDER, CONE, TORUS, PLANE, CIRCLE, MONKEY, EMPTY.
nameOptional name for the object. Auto-generated if empty.
locationXYZ position as a 3-element list/tuple. Defaults to origin.
rotationXYZ Euler rotation in radians as a 3-element list/tuple.
scaleXYZ scale as a 3-element list/tuple. Defaults to (1,1,1). Use positive values; a negative component on a symmetric primitive is applied as the equivalent rotation and noted in the result.

Returns Dict with the created object's name, type, location, dimensions, and world-space bounds (min and max corner). Place the next part from the bounds: a nose cone sits at bounds.max z plus half its own height.

create_polygon_prism

create_polygon_prism(sides: int, radius: float = 1.0, depth: float = 2.0, name: str = '', location: list[float] | tuple[float, ...] = (0, 0, 0), rotation: list[float] | tuple[float, ...] = (0, 0, 0), scale: list[float] | tuple[float, ...] = (1, 1, 1))

Create an N-sided regular prism (polygon-based cylinder). Useful for hex sockets, octagonal columns, triangular prisms, or any straight-sided geometry where a 32-sided round cylinder is the wrong primitive. For a hex socket cutter on an M3 button-head screw, use sides=6.

sidesNumber of sides for the polygon base. Range: 3-64.
radiusCircumscribed radius (center to vertex). Must be > 0.
depthHeight of the prism along its Z axis. Must be > 0.
nameOptional name for the object. Auto-generated if empty.
locationXYZ position as a 3-element list/tuple. Defaults to origin.
rotationXYZ Euler rotation in radians as a 3-element list/tuple.
scaleXYZ scale as a 3-element list/tuple. Defaults to (1,1,1).

Returns Dict with the created object's name, type, location, and sides.

create_threaded_shaft

create_threaded_shaft(diameter: float, length: float, pitch: float, thread_depth: float = 0.0, segments: int = 32, thread_runout: float = -1.0, name: str = '', location: list[float] | tuple[float, ...] = (0, 0, 0))

Create a cylindrical shaft with helical external threads. Produces a single mesh object: a threaded rod at the given diameter and length, with helical thread ridges following the specified pitch. Suitable for boolean-union onto a screw-head or direct use as a threaded fastener. Thread geometry: a 60-degree V profile swept along a Z-axis helix via the Screw modifier.

diameterMajor diameter of the shaft (outer thread peaks). Must be > 0.
lengthAxial length of the shaft (under-head length, like real fastener spec). Must be > 0.
pitchDistance between thread peaks along the axis. Must be > 0 and <= length.
thread_depthRadial depth of the thread (major radius - minor radius). If 0 (default), auto-computed as pitch * 0.54.
segmentsRotational resolution of the helix (steps per revolution). Range: 3-256. Higher = smoother helix, more geometry.
thread_runoutSmooth (unthreaded) region at the top of the shaft. Defaults to 0 (full-length threads), which gives the strongest print because threads under the head form a continuous stress path. Leaving a smooth runout creates a thin-walled neck at minor_r that snaps under torque in FDM prints. Pass a positive value only if a head's deep hex socket would otherwise reach thread peaks.
nameOptional name for the object. Auto-generated if empty.
locationXYZ position of the shaft base as a 3-element list/tuple.

Returns Dict with the created object's name, diameter, length, pitch, and the number of thread iterations actually generated.

delete_object

delete_object(object_name: str)

Delete an object from the scene by name.

object_nameName of the object to delete.

Returns Confirmation dict.

duplicate_object

duplicate_object(object_name: str, linked: bool = False)

Duplicate an object.

object_nameName of the object to duplicate.
linkedIf True, create a linked duplicate (shares mesh data). Defaults to False.

Returns Dict with the new object's name.

get_object_info

get_object_info(object_name: str)

Get detailed information about an object.

object_nameName of the object.

Returns Dict with type, location (as set), world_location (where it really is after parents, constraints and simulation), rotation, scale, dimensions, modifiers, materials, parent, children, and visibility.

join_objects

join_objects(names: list[str])

Join multiple mesh objects into one (keeps all geometry as-is). This merges objects into a single datablock without modifying geometry. The meshes remain separate inside the object (no boolean merge). TIP: If you want to truly fuse overlapping meshes into one solid shape, use booltool_auto_union instead: it performs a boolean union that merges the geometry and removes internal faces.

namesList of object names to join. The first name becomes the active object.

Returns Dict with the resulting object's name, the names that no longer exist, and a note saying so.

list_objects

list_objects(type_filter: str = '')

List all objects in the scene, optionally filtered by type.

type_filterFilter by object type (e.g., MESH, LIGHT, CAMERA, EMPTY). Empty string returns all objects.

Returns List of dicts with object name, type, and location.

make_single_user

make_single_user(object_name: str, object: bool = True, data: bool = True)

Make an object's data single-user (unlink shared datablocks).

object_nameName of the object.
objectMake the object single-user. Defaults to True.
dataMake the object data (e.g., mesh) single-user. Defaults to True.

Returns Confirmation dict.

parent_objects

parent_objects(child: str, parent: str)

Set parent-child relationship between two objects.

childName of the child object.
parentName of the parent object.

Returns Confirmation dict.

rename_object

rename_object(old_name: str, new_name: str)

Rename an object.

old_nameCurrent name of the object.
new_nameNew name for the object.

Returns Dict with old and new names.

select_objects

select_objects(names: list[str], deselect_others: bool = True)

Select whole objects in the scene by name. This is object-level selection, the kind that join_objects and delete_object act on. To select vertices, edges or faces inside one mesh, use select_by_index, select_by_axis or the other select_* tools in the Selection group.

namesList of object names to select.
deselect_othersIf True, deselect all other objects first. Defaults to True.

Returns Dict with list of selected object names.

set_object_visibility

set_object_visibility(object_name: str, visible: bool, viewport: bool = True, render: bool = True)

Set object visibility in viewport and/or render.

object_nameName of the object.
visibleWhether the object should be visible.
viewportApply visibility change to viewport. Defaults to True.
renderApply visibility change to render. Defaults to True.

Returns Confirmation dict with visibility state.

shade_auto_smooth

shade_auto_smooth(object_name: str, angle: float = 0.523599)

Apply angle-based auto-smooth shading to an object. Smooths faces only where the angle between adjacent face normals is below the given threshold, giving clean results on hard-surface models.

object_nameName of the mesh object.
angleAuto-smooth angle threshold in radians (0.0 to pi). Defaults to ~30 degrees (0.523599 rad).

Returns Confirmation dict.

Physics 14

add_cloth_sim

add_cloth_sim(object_name: str, quality: int = 5, mass: float = 0.3)

Add a cloth physics simulation to an object.

object_nameName of the mesh object.
qualitySimulation quality steps (1-80).
massMass of the cloth in kg.

Returns Confirmation dict with cloth settings.

add_collision

add_collision(object_name: str, thickness: float = 0.02, damping: float = 0.1, friction: float = 5.0, stickiness: float = 0.0, permeability: float = 0.0)

Make an object solid to cloth, particles and soft bodies. Without it, a cloth falls straight through the floor.

object_nameMesh object to collide with.
thicknessOuter collision distance, 0.001 to 1.0. Raise it if cloth pokes through.
dampingHow much bounce is lost, 0.0 to 1.0.
frictionCloth friction against the surface, 0 to 80.
stickinessParticles stick to the surface, 0 to 10.
permeabilityShare of particles that pass through, 0.0 to 1.0.

Returns Dict with the collision settings.

add_fluid_sim

add_fluid_sim(object_name: str, type: str = 'DOMAIN', domain_type: str = 'GAS')

Add a fluid physics simulation to an object.

object_nameName of the object.
typeFluid type - DOMAIN (container), FLOW (emitter), or EFFECTOR (obstacle).
domain_typeDomain simulation type - GAS (smoke/fire) or LIQUID. Only used when type is DOMAIN.

Returns Confirmation dict with fluid settings.

add_force_field

add_force_field(type: str, name: str = '', location: list[float] | tuple[float, ...] = (0, 0, 0), rotation: list[float] | tuple[float, ...] = (0, 0, 0), strength: float = 1.0, flow: float = 0.0, noise: float = 0.0, seed: int = 1, falloff_type: str = 'SPHERE', falloff_power: float = 0.0, max_distance: float = 0.0)

Add a force field that pushes cloth, particles, soft and rigid bodies.

typeWIND (blows along its local Z), TURBULENCE (random gusts), VORTEX (spins around Z), FORCE (pushes outward, negative pulls in), MAGNET, HARMONIC (springs to the centre), CHARGE, LENNARDJ (keeps things apart), DRAG (slows everything down).
nameName for the field object; empty uses the type.
locationPosition [x, y, z].
rotationEuler rotation in radians; aims WIND and VORTEX.
strength-100000 to 100000. Negative reverses the push.
flowAir flow, 0 to 100; for WIND it carries particles along.
noiseRandomness added to the force, 0 to 100.
seedNoise seed, 1 to 128.
falloff_typeSPHERE, TUBE or PLANE: the shape the force fades over.
falloff_powerHow fast it fades with distance, 0 to 10.
max_distanceRange beyond which there is no force; 0 for unlimited.

Returns Dict with the field object's name and settings.

add_particle_system

add_particle_system(object_name: str, count: int = 1000, lifetime: float = 50.0, emit_from: str = 'FACE')

Add a particle system to an object.

object_nameName of the mesh object.
countNumber of particles (max 1000000).
lifetimeParticle lifetime in frames.
emit_fromEmission source - VERT, FACE, or VOLUME.

Returns Confirmation dict with particle system settings.

add_rigid_body

add_rigid_body(object_name: str, type: str = 'ACTIVE', mass: float = 1.0, friction: float = 0.5, restitution: float = 0.0)

Add a rigid body physics simulation to an object.

object_nameName of the object.
typeRigid body type - ACTIVE (affected by physics) or PASSIVE (static collider).
massMass of the object in kg.
frictionSurface friction coefficient (0.0-1.0).
restitutionBounciness (0.0-1.0).

Returns Confirmation dict with rigid body settings.

add_rigid_body_constraint

add_rigid_body_constraint(object1: str, object2: str, type: str = 'FIXED', empty_name: str = 'Constraint', location: list[float] | None = None, rotation: list[float] | None = None, breaking_threshold: float | None = None, disable_collisions: bool = True, settings: dict[str, Any] | None = None)

Join two rigid bodies with a physics constraint (glue, hinge, slider, spring, motor). Both objects need add_rigid_body first. The constraint lives on a new empty, placed at the midpoint unless location is given; HINGE turns around the empty's Z axis, SLIDER and PISTON move along its X.

object1First rigid body.
object2Second rigid body.
typeFIXED (glued), POINT (ball joint), HINGE, SLIDER, PISTON, GENERIC (per-axis limits), GENERIC_SPRING, MOTOR.
empty_nameName of the new empty that holds the constraint.
locationWorld position of the joint, [x, y, z].
rotationJoint orientation in radians, [x, y, z]; aims the hinge axis.
breaking_thresholdImpulse that snaps the joint; omit for unbreakable. Good for destruction: glue pieces with FIXED and a threshold.
disable_collisionsStop the two bodies colliding with each other.
settingsThe constraint's own settings, e.g. {"use_limit_ang_z": true, "limit_ang_z_lower": -1.57, "limit_ang_z_upper": 0} for a door, spring_stiffness_x, motor_ang_target_velocity, use_motor_ang.

Returns Dict with the empty, the type and the two objects.

add_soft_body

add_soft_body(object_name: str, mass: float = 1.0, goal: bool = True, goal_strength: float = 0.7, pull: float = 0.5, push: float = 0.5, bend: float = 0.0, damping: float = 0.5, friction: float = 0.5, self_collision: bool = False)

Make an object soft and wobbly: jelly, cushions, bellies, antennae. Bake it with bake_physics. With goal on, vertices are pulled back to their shape (higher goal_strength is stiffer); with goal off the object sags and bounces freely, like a water balloon. Add collision to the floor.

object_nameMesh object.
massVertex mass, 0.001 to 50.
goalPull vertices back toward the original shape.
goal_strengthHow strongly, 0.0 to 1.0.
pullEdge stiffness when stretched, 0.0 to 0.999.
pushEdge stiffness when squashed, 0.0 to 0.999.
bendResistance to bending, 0 to 10.
dampingEdge spring damping, 0 to 50.
frictionAir friction, 0 to 50.
self_collisionStop the body passing through itself (slower).

Returns Dict with the soft body settings.

bake_physics

bake_physics(object_name: str, physics_type: str = '')

Bake a physics simulation for an object.

object_nameName of the object with physics.
physics_typeOptional physics type to bake: RIGID_BODY, CLOTH, FLUID, PARTICLE_SYSTEM or SOFT_BODY. If empty, bakes all physics on the object.

Returns Confirmation dict.

delete_particle_system

delete_particle_system(object_name: str, particle_system_name: str = '')

Remove a particle system from an object.

object_nameName of the object.
particle_system_nameName of the particle system to remove. If empty, removes the first particle system.

Returns Confirmation dict.

set_particle_rendering

set_particle_rendering(object_name: str, render_type: str = 'PATH', instance_object: str = '', instance_collection: str = '')

Set rendering mode for an object's particle system.

object_nameName of the object with a particle system.
render_typeRender type. One of: NONE, PATH, OBJECT, COLLECTION.
instance_objectObject to instance (when render_type is OBJECT).
instance_collectionCollection to instance (when render_type is COLLECTION).

Returns Confirmation dict.

set_particle_velocity

set_particle_velocity(object_name: str, normal: float = 1.0, tangent: float = 0.0, object_align_factor: list[float] | tuple[float, ...] = (0, 0, 0))

Set velocity settings for an object's particle system.

object_nameName of the object with a particle system.
normalVelocity along face normals.
tangentVelocity along face tangents.
object_align_factorXYZ velocity factors relative to the object. 3-element vector.

Returns Confirmation dict.

set_physics_property

set_physics_property(object_name: str, physics_type: str, property: str, value: Any)

Set a property on an existing physics simulation.

object_nameName of the object with the physics simulation.
physics_typePhysics type - RIGID_BODY, CLOTH, FLUID, or PARTICLE_SYSTEM.
propertyProperty name to set (depends on physics type).
valueValue to set.

Returns Confirmation dict with property name and new value.

set_rigid_body_world

set_rigid_body_world(enabled: bool | None = None, time_scale: float | None = None, substeps_per_frame: int | None = None, solver_iterations: int | None = None, use_split_impulse: bool | None = None)

Tune the rigid body simulation for the scene, creating it if needed. Raise substeps_per_frame and solver_iterations when fast or stacked objects jitter, pass through each other, or joints stretch.

enabledRun the simulation at all.
time_scaleSpeed of the simulation, 0 to 100 (0.5 is slow motion).
substeps_per_framePhysics steps per frame, 1 to 1000 (default 10).
solver_iterationsConstraint solver passes, 1 to 1000 (default 10).
use_split_impulseReduce extra bounce when objects stack.

Returns Every rigid body world setting after the change.

print3d 1

check_3d_printability

check_3d_printability(object_name: str, checks: list[str] | None = None, overhang_angle: float | None = None, min_thickness: float | None = None, sharp_angle: float | None = None, nonplanar_angle: float | None = None, zero_threshold: float | None = None)

Check whether a mesh will 3D print, using Blender's 3D Print Toolbox. Catches three defects a mesh can carry while still passing analyze_mesh_quality, because each one leaves the mesh manifold, watertight and free of degenerate faces: - Bad contiguous edges: a shell whose normals agree with each other but collectively face inward. Recalculating normals reports nothing to fix, and the slicer rejects the file as having reversed faces. - Intersect faces: the surface passing through itself. - Thin faces: walls thinner than the nozzle, which slice away to nothing. It also reports shell count, zero-area faces and edges, non-flat faces, sharp edges and overhanging faces. Index lists are capped at 50 samples and can be fed straight to select_by_index to see the problem in Blender. Requires the 3D Print Toolbox extension, which ships with Blender but is off by default. If it is disabled this returns an error saying how to enable it; suggest_extensions also reports whether it is on.

object_nameName of the mesh object to check.
checksWhich checks to run - any of SOLID (non-manifold and bad contiguous edges), INTERSECT, DEGENERATE (zero faces and edges), THICKNESS, SHARP, OVERHANG, NONPLANAR. Omit or pass an empty list to run everything, which also reports shell count. Counts are only returned for checks that actually ran.
overhang_angleOverhang threshold in RADIANS. Faces steeper than this need support. 0.785 (45 degrees) is the usual FDM limit. Leave unset to keep the toolbox's current setting.
min_thicknessMinimum wall thickness in Blender units. Set it to your nozzle width. Leave unset to keep the current setting.
sharp_angleSharp-edge threshold in RADIANS.
nonplanar_angleNon-flat face threshold in RADIANS.
zero_thresholdArea below which a face counts as zero-area.

Returns Dict with a count (and sample indices) per check that ran, plus checks_run, issues_found, and print_blocking: the defects that stop a print, as opposed to overhangs and sharp edges which are advisory.

render_settings 13

manage_aov

manage_aov(action: str, name: str | None = None, type: str = 'COLOR')

List, add or remove shader AOVs: custom render passes written by materials. In a material, an Output AOV node (ShaderNodeOutputAOV, its aov_name set to this name) writes a color or value into the pass. Use for masks and IDs in compositing. The Render Layers node gets an output with the AOV name.

actionLIST, ADD or REMOVE.
nameAOV name, for ADD and REMOVE.
typeADD only: COLOR or VALUE.

Returns Dict with every AOV (name, type).

set_color_management

set_color_management(view_transform: str = '', look: str = '', exposure: float | None = None, gamma: float | None = None, display_device: str = '', white_balance_temperature: float | None = None, working_space: str = '', convert_colors: bool = True)

Set how the scene's light becomes final pixel colours. AgX (the default) handles bright highlights gracefully; Standard is for flat graphics and UI shots; Khronos PBR Neutral keeps product colours true. A look adds contrast on top. Leave anything unset to keep it.

view_transformOne of: AgX, Standard, Filmic, Filmic Log, Khronos PBR Neutral, ACES 1.3, ACES 2.0, False Color, Raw.
lookContrast look, short name. AgX and False Color offer Punchy, Greyscale, Base Contrast and Very Low to Very High Contrast; most others offer Very Low to Very High Contrast; ACES offers Reference Gamut Compression. "None" clears it. Applies to the view transform being set, or the current one.
exposureBrightness in stops. Range -10.0 to 10.0; 0 is unchanged.
gammaExtra gamma. Range 0.0 to 5.0; 1.0 is unchanged.
display_deviceOne of: sRGB, Display P3, Rec.1886, Rec.2020, Rec.2100-PQ, Rec.2100-HLG.
white_balance_temperatureKelvin, 1800 to 100000. Lower warms the image, higher cools it. Setting it turns white balance on.
working_spaceColor space the file renders and mixes colours in: Linear Rec.709 (default), Linear Rec.2020 or ACEScg (wide gamut, for VFX pipelines).
convert_colorsWith working_space: convert existing colours so they look the same; false keeps the raw numbers.

Returns Dict with the full colour management state after the change.

set_cycles_sampling

set_cycles_sampling(adaptive: bool | None = None, noise_threshold: float | None = None, min_samples: int | None = None, time_limit: float | None = None, clamp_direct: float | None = None, clamp_indirect: float | None = None, path_guiding: bool | None = None, seed: int | None = None, animated_seed: bool | None = None)

Tune how Cycles spends samples. Set the sample count with set_render_samples. Leave anything unset to keep it.

adaptiveStop sampling pixels once they are clean enough.
noise_thresholdAdaptive cut-off, 0.0 to 1.0. 0.01 is Blender's default; 0.05 renders faster and noisier, 0.001 slower and cleaner.
min_samplesSamples every pixel gets before adaptive stopping, 0 to 4096. 0 lets Blender choose.
time_limitSeconds per frame before stopping, 0 to 86400. 0 means no limit.
clamp_directCap on direct light per sample, 0 to 1000000. 0 means no clamp. Lowers fireflies at the cost of some energy.
clamp_indirectCap on bounced light per sample, 0 to 1000000. 10 is Blender's default; lower removes fireflies.
path_guidingLearn where light comes from; helps interiors lit through small openings. CPU only.
seedNoise pattern seed, 0 or more.
animated_seedChange the seed every frame so noise does not stick to the screen in animations.

Returns Dict with the sampling settings after the change.

set_denoising

set_denoising(enabled: bool | None = None, denoiser: str = '', quality: str = '', prefilter: str = '', input_passes: str = '', use_gpu: bool | None = None, viewport: bool | None = None)

Configure Cycles denoising for final renders and the viewport. Denoising lets a render use far fewer samples: 128 denoised samples often beat 2048 raw ones. Leave anything unset to keep it.

enabledDenoise final renders.
denoiserOPENIMAGEDENOISE (any machine) or OPTIX (NVIDIA GPUs only).
qualityHIGH, BALANCED or FAST.
prefilterHow the albedo and normal guides are cleaned: ACCURATE (sharpest detail), FAST, or NONE.
input_passesGuides the denoiser uses: RGB, RGB_ALBEDO, or RGB_ALBEDO_NORMAL (best edges).
use_gpuRun the denoiser on the GPU when one is available.
viewportDenoise the rendered viewport preview too.

Returns Dict with the denoising settings after the change.

set_eevee_quality

set_eevee_quality(raytracing: bool | None = None, ray_tracing_method: str = '', fast_gi: bool | None = None, fast_gi_method: str = '', shadow_pool_size: int | None = None, shadow_rays: int | None = None, shadow_steps: int | None = None, volumetric_samples: int | None = None, volumetric_tile_size: int | None = None, volumetric_shadows: bool | None = None, clamp_direct: float | None = None, clamp_indirect: float | None = None)

Tune EEVEE's reflections, global illumination, shadows and volumes. Leave anything unset to keep it.

raytracingScreen-space ray traced reflections and refraction.
ray_tracing_methodPROBE (fast, uses light probes) or SCREEN (accurate for what is on screen).
fast_giApproximate bounced light.
fast_gi_methodGLOBAL_ILLUMINATION or AMBIENT_OCCLUSION_ONLY.
shadow_pool_sizeShadow memory in MB: 16 to 2048 in powers of two, plus 1536 (new in 5.2). Raise it if shadows go blocky.
shadow_raysSoft shadow rays per light, 1 to 4.
shadow_stepsSoft shadow steps, 1 to 16.
volumetric_samplesFog and smoke slices, 1 to 256.
volumetric_tile_sizeVolume detail in pixels: 1, 2, 4, 8 or 16 (smaller is sharper and slower).
volumetric_shadowsVolumes cast shadows on themselves.
clamp_directCap on direct light per sample, 0 for none.
clamp_indirectCap on bounced light per sample, 0 for none.

Returns Dict with the EEVEE settings after the change.

set_film

set_film(transparent: bool | None = None, transparent_glass: bool | None = None, filter_width: float | None = None)

Set film options: transparent background and pixel filter.

transparentRender the world background as transparent, for compositing or product cut-outs. Needs PNG or EXR output to keep the alpha.
transparent_glassCycles only. Let the background show through glass and other transmissive surfaces when transparent is on.
filter_widthCycles pixel filter width in pixels, 0.01 to 10.0. 1.5 is Blender's default; lower is sharper, higher is softer.

Returns Dict with the film settings after the change.

set_freestyle

set_freestyle(enabled: bool = True, thickness: float | None = None, color: list[float] | None = None, edges: list[str] | None = None, crease_angle: float | None = None, as_render_pass: bool | None = None)

Draw ink lines over the render: outlines, toon, technical-drawing looks. Applies to the active view layer's line set (created if needed).

enabledTurn line rendering on or off.
thicknessLine width in pixels, 0.1 to 10000.
colorRGB of the lines, 0.0 to 1.0.
edgesWhich edges get lines: SILHOUETTE (object outline against others), BORDER (open mesh edges), CREASE (sharp folds, see crease_angle), CONTOUR, EXTERNAL_CONTOUR (outer outline only), MATERIAL_BOUNDARY, RIDGE_VALLEY, SUGGESTIVE_CONTOUR, EDGE_MARK (edges marked for Freestyle). Replaces the current choice.
crease_angleDegrees, 0 to 180: edges sharper than this count as creases.
as_render_passPut the lines in their own pass instead of on the image.

Returns Dict with the Freestyle state after the change.

set_light_group

set_light_group(group: str, objects: list[str] | None = None, world: bool = False, remove: bool = False)

Put lights (or emissive objects, or the world) into a light group. Each light group renders as its own pass (Cycles), so light balance can be changed in the compositor without re-rendering: the Render Layers node gets a Combined_<group> output. The group is created if needed.

groupLight group name. Blender turns dots into underscores; the result gives the name actually used.
objectsLights or emissive objects to move into the group.
worldAlso put the world (sky/HDRI light) into the group.
removeDelete the group and take every member out of it.

Returns Dict with the group name used and every light group with its members.

set_light_paths

set_light_paths(total: int | None = None, diffuse: int | None = None, glossy: int | None = None, transmission: int | None = None, volume: int | None = None, transparent: int | None = None, caustics_reflective: bool | None = None, caustics_refractive: bool | None = None, filter_glossy: float | None = None)

Set Cycles light bounce limits and caustics. Fewer bounces render faster; glass and liquids need enough transmission bounces or they turn black. Each bounce count is 0 to 1024. Leave anything unset to keep it.

totalOverall bounce cap (Blender default 12).
diffuseBounces off matte surfaces (default 4).
glossyBounces off shiny surfaces (default 4).
transmissionBounces through glass and liquid (default 12).
volumeBounces inside smoke and fog (default 0).
transparentLayers of alpha-transparent surfaces such as leaves (default 8).
caustics_reflectiveAllow light focused by mirrors.
caustics_refractiveAllow light focused by glass; turning it off removes much glass noise.
filter_glossyBlur sharp reflections to cut noise, 0.0 to 10.0.

Returns Dict with the light path settings after the change.

set_motion_blur

set_motion_blur(enabled: bool | None = None, shutter: float | None = None, position: str = '', eevee_steps: int | None = None)

Set render motion blur for moving objects and cameras.

enabledTurn motion blur on or off.
shutterShutter time in frames, 0.0 to 2.0. 0.5 is a film-like 180 degree shutter.
positionWhere the shutter opens around the frame: START, CENTER or END.
eevee_stepsEEVEE only. Blur passes, 1 to 64. More gives smoother curved motion.

Returns Dict with the motion blur settings after the change.

set_object_ray_visibility

set_object_ray_visibility(object_name: str, camera: bool | None = None, diffuse: bool | None = None, glossy: bool | None = None, transmission: bool | None = None, volume_scatter: bool | None = None, shadow: bool | None = None, holdout: bool | None = None, shadow_catcher: bool | None = None)

Choose which rays see an object: hide it from the camera but keep its shadow, keep it out of reflections, or turn it into a shadow catcher. Leave anything unset to keep it.

object_nameObject to change.
cameraSeen directly by the camera.
diffuseLights matte surfaces by bounced light.
glossyShows in reflections.
transmissionShows through glass.
volume_scatterAffects smoke and fog.
shadowCasts shadows.
holdoutCut a transparent hole where the object is, for compositing.
shadow_catcherCycles only. Show only the shadows other objects cast on it, for placing renders into photos (pair with set_film transparent).

Returns Dict with every visibility flag after the change.

set_render_passes

set_render_passes(passes: list[str], enabled: bool = True)

Turn render passes on or off for the active view layer. Passes are extra images saved with a multilayer EXR or used in the compositor: depth for fog and focus, mist, normals, cryptomatte masks for picking objects later.

passesPass names: combined, z (alias depth), mist, normal, position, vector, uv, object_index, material_index, ambient_occlusion (alias ao), shadow, emit (alias emission), environment, diffuse_direct, diffuse_indirect, diffuse_color, glossy_direct, glossy_indirect, glossy_color, transmission_direct, transmission_indirect, transmission_color, subsurface_direct, subsurface_indirect, subsurface_color, cryptomatte_object, cryptomatte_material, cryptomatte_asset, shadow_catcher (Cycles), volume_direct, volume_indirect (Cycles), transparent (EEVEE), grease_pencil.
enabledTrue to turn them on, False to turn them off.

Returns Dict with the view layer name and the passes changed.

set_render_performance

set_render_performance(simplify: bool | None = None, max_subdivision: int | None = None, texture_limit: str = '', texture_resolution: float | None = None, persistent_data: bool | None = None, auto_tile: bool | None = None, tile_size: int | None = None, anisotropic_filter: int | None = None)

Speed up heavy renders or fit them in memory. Leave anything unset to keep it.

simplifyTurn on Simplify, which max_subdivision and the texture settings need.
max_subdivisionCap subdivision levels at render, 0 to 6.
texture_limitCycles: largest texture size at render, OFF or 128 to 8192.
texture_resolutionCycles: scale all textures, 0.0 to 1.0 (new in 5.2).
persistent_dataCycles: keep scene data between frames of an animation for faster re-renders, at the cost of memory.
auto_tileCycles: render in tiles to save memory.
tile_sizeCycles tile size in pixels, 8 to 8192.
anisotropic_filterTexture filtering for angled surfaces: 0, 2, 4, 8 or 16.

Returns Dict with the performance settings after the change.

Rendering 7

render_animation

render_animation(filepath: str = '', format: str = 'PNG')

Render the animation sequence to image files.

filepathOutput file path prefix for the rendered frames. Each frame will be saved with a frame number suffix. The directory must exist. Empty means render_ in the system temp directory.
formatOutput format. One of: PNG, JPEG, OPEN_EXR, TIFF, BMP.

Returns Confirmation dict with output details.

render_image

render_image(filepath: str = '')

Render the current scene to an image file.

filepathOutput file path for the rendered image. Must be an absolute path with a valid image extension (.png, .jpg, .exr, .tiff, .bmp) in a directory that exists. Empty means render.png in the system temp directory.

Returns Confirmation dict with the output file path.

set_eevee_light_path

set_eevee_light_path(direct_intensity: float | None = None, indirect_intensity: float | None = None)

Set EEVEE light intensity controls (Blender 5.1+). Scales how strongly direct and indirect lighting contribute. Only applies when the render engine is EEVEE.

direct_intensityMultiplier for light arriving straight from a lamp. Range 0.0-10.0, 1.0 is unchanged. Leave unset to keep the current value.
indirect_intensityMultiplier for bounced light. Range 0.0-10.0, 1.0 is unchanged. Leave unset to keep the current value.

Returns Dict with both intensities after the change.

set_output_format

set_output_format(format: str, filepath: str = '')

Set the render output format and optionally the output file path.

formatOutput format. One of: PNG, JPEG, OPEN_EXR, TIFF, BMP.
filepathOptional output file path. Must be an absolute path.

Returns Confirmation dict with the new output settings.

set_render_engine

set_render_engine(engine: str)

Set the render engine.

engineRender engine to use. One of: BLENDER_EEVEE, CYCLES, BLENDER_WORKBENCH.

Returns Confirmation dict with the active render engine.

set_render_resolution

set_render_resolution(width: int, height: int, percentage: int = 100)

Set the render resolution.

widthRender width in pixels. Range: 1-8192.
heightRender height in pixels. Range: 1-8192.
percentageResolution percentage scale. Range: 1-100.

Returns Confirmation dict with the new resolution settings.

set_render_samples

set_render_samples(samples: int)

Set the number of render samples.

samplesNumber of samples. Range: 1-10000.

Returns Confirmation dict with the new sample count.

Scene 7

create_scene

create_scene(name: str)

Create a new scene.

nameName for the new scene.

Returns Confirmation dict with the created scene name.

delete_scene

delete_scene(scene_name: str)

Delete a scene by name.

scene_nameName of the scene to delete. Cannot delete the last remaining scene.

Returns Confirmation dict.

get_scene_info

get_scene_info()

Get full scene information including object tree, hierarchy, counts, frame range, fps, and render engine. Returns a dict with scene name, object list with hierarchy, object type counts, frame range (start, end, current), fps, and active render engine.

list_scenes

list_scenes()

List all scenes in the current Blender file. Returns a list of dicts, each containing the scene name and object count.

set_scene_property

set_scene_property(property: str, value: Any)

Set a scene property such as frame_start, frame_end, frame_current, fps, unit_system, or render_engine.

propertyThe scene property to set. Must be one of: frame_start, frame_end, frame_current, frame_step, fps, unit_system, render_engine, use_gravity, gravity.
valueThe value to set the property to. Type depends on the property.

Returns Confirmation dict with the property name and new value.

set_units

set_units(system: str | None = None, scale_length: float | None = None, length_unit: str | None = None, mass_unit: str | None = None, time_unit: str | None = None, temperature_unit: str | None = None, rotation: str | None = None, use_separate: bool | None = None)

Set the scene's units, for real-world sizes (e.g. a 3D print in millimetres). Only the settings given are changed. Unit names depend on the system: METRIC lengths are KILOMETERS, METERS, CENTIMETERS, MILLIMETERS, MICROMETERS; IMPERIAL lengths are MILES, FEET, INCHES, THOU. ADAPTIVE picks per value.

systemNONE, METRIC or IMPERIAL. NONE takes no units.
scale_lengthBlender units to scene units, e.g. 0.001 so 1 unit reads 1 mm.
length_unitDisplay unit for lengths.
mass_unitMETRIC: TONNES, KILOGRAMS, GRAMS, MILLIGRAMS; IMPERIAL: TONNES, CENTUM_WEIGHTS, STONES, POUNDS, OUNCES.
time_unitDAYS, HOURS, MINUTES, SECONDS, MILLISECONDS, MICROSECONDS.
temperature_unitKELVIN plus CELSIUS (METRIC) or FAHRENHEIT (IMPERIAL).
rotationDEGREES or RADIANS.
use_separateShow compound values like 1 m 20 cm.

Returns Every unit setting after the change.

suggest_extensions

suggest_extensions(task_description: str = '')

Suggest helpful Blender extensions for a planned task. Analyzes the task description and recommends free Blender extensions that could improve the workflow. Already-installed extensions are excluded.

task_descriptionDescription of the planned task. If empty, returns all extensions not currently installed.

Returns Dict with 'suggestions' list of recommended extensions and 'installed' list of already-installed extension IDs.

Sculpting 10

add_multires_modifier

add_multires_modifier(object_name: str, levels: int = 2)

Add a Multiresolution modifier for sculpting detail.

object_nameName of the mesh object.
levelsNumber of subdivision levels to add (1-6).

Returns Dict with object name and modifier info.

enable_dyntopo

enable_dyntopo(object_name: str, detail_size: float = 12.0, detail_mode: str = 'RELATIVE')

Enable dynamic topology (dyntopo) for adaptive sculpting resolution. Dyntopo adds and removes mesh detail dynamically as you sculpt, allowing unlimited detail where needed without uniform subdivision.

object_nameName of the mesh object (must be in sculpt mode or will enter it).
detail_sizeDetail level (smaller = more detail). Range: 0.1-500.0.
detail_modeDetail mode. One of: RELATIVE, CONSTANT, BRUSH, MANUAL.

Returns Confirmation dict with dyntopo settings.

enter_sculpt_mode

enter_sculpt_mode(object_name: str)

Enter sculpt mode for a mesh object.

object_nameName of the mesh object to sculpt.

Returns Confirmation dict with object name and mode.

exit_sculpt_mode

exit_sculpt_mode()

Exit sculpt mode and return to object mode.

Returns Confirmation dict with current mode.

remesh

remesh(object_name: str, voxel_size: float = 0.1, mode: str = 'VOXEL')

Remesh an object to create a clean topology.

object_nameName of the mesh object to remesh.
voxel_sizeVoxel size for remeshing (smaller = more detail). Only used in VOXEL mode.
modeRemesh mode - VOXEL, SHARP, SMOOTH, or BLOCKS.

Returns Dict with object name and new vertex count.

set_brush_property

set_brush_property(property: str, value: Any)

Set a property on the active sculpt brush.

propertyProperty to set - size, strength, auto_smooth_factor, or use_frontface.
valueValue to set. size is int (1-500), strength is float (0.0-1.0), auto_smooth_factor is float (0.0-1.0), use_frontface is bool.

Returns Confirmation dict with property name and new value.

set_face_sets

set_face_sets(object_name: str, mode: str, face_indices: list[int] | None = None, face_set: int = 1)

Split a mesh into face sets: colored regions for sculpting one part at a time. In sculpt mode, face sets can be hidden or isolated, and brushes and automasking can stay within one set.

object_nameMesh object.
modeLOOSE_PARTS (one set per separate piece), MATERIALS (one set per material slot), ASSIGN (face_indices into face_set), CLEAR.
face_indicesASSIGN only: the faces to change.
face_setASSIGN only: set number, 1 or more.

Returns Dict with the number of distinct face sets.

set_sculpt_brush

set_sculpt_brush(brush_type: str)

Set the active sculpt brush.

brush_typeBrush type - DRAW, CLAY, CLAY_STRIPS, INFLATE, GRAB, SMOOTH, FLATTEN, FILL, SCRAPE, PINCH, CREASE, BLOB, MASK, MULTIRES_DISPLACEMENT_SMEAR.

Returns Confirmation dict with active brush type.

set_sculpt_mask

set_sculpt_mask(object_name: str, value: float = 1.0, vertex_indices: list[int] | None = None, vertex_group: str | None = None, invert: bool = False, clear: bool = False)

Mask part of a mesh so sculpt brushes and filters leave it alone. 1.0 is fully protected, 0.0 is free to sculpt. Works in any mode.

object_nameMesh object.
valueMask strength, 0.0 to 1.0.
vertex_indicesVertices to set; the rest keep their mask. Omit (and vertex_group) to set the whole mesh.
vertex_groupMask from a vertex group: each member gets value times its weight, other vertices are unmasked.
invertFlip the current mask (other arguments ignored).
clearRemove the mask entirely.

Returns Dict with how many vertices are masked (above 0) and the vertex count.

set_sculpt_symmetry

set_sculpt_symmetry(use_x: bool = True, use_y: bool = False, use_z: bool = False)

Set sculpt symmetry axes. Enables symmetrical sculpting across the specified axes. X-axis symmetry is the most common for character modeling.

use_xEnable X-axis symmetry. Defaults to True.
use_yEnable Y-axis symmetry. Defaults to False.
use_zEnable Z-axis symmetry. Defaults to False.

Returns Confirmation dict with symmetry settings.

Selection 6

get_selection

get_selection(object_name: str)

Report what is currently selected on a mesh. Without this a caller cannot see the result of its own selection, and the mesh tools that act on the current selection would be operating blind.

object_nameName of the mesh object.

Returns Dict with selected and total counts per element type, and the first 50 selected indices of each, so a caller can confirm before acting.

select_all_geometry

select_all_geometry(object_name: str, action: str = 'SELECT')

Select, deselect or invert all vertices, edges and faces on one mesh. Acts inside a mesh. To select whole objects in the scene, use select_objects.

object_nameName of the mesh object.
actionOne of: SELECT, DESELECT, INVERT, TOGGLE.

Returns Dict with the counts selected afterwards.

select_by_axis

select_by_axis(object_name: str, axis: str = 'Z', sign: str = 'POS', extend: bool = False)

Select the vertices, edges and faces on one side of a mesh along an axis. The usual way to say "the top", "the front" or "the left half" of one object. To select whole objects in the scene, use select_objects.

object_nameName of the mesh object.
axisOne of: X, Y, Z.
signPOS for the positive half, NEG for the negative half, split at the middle of the object's bounding box (the middle counts for both); ALIGN for geometry lying on that middle plane.
extendAdd to the current selection instead of replacing it.

Returns Dict with how many elements were selected.

select_by_index

select_by_index(object_name: str, element: str, indices: list[int], extend: bool = False)

Select specific vertices, edges or faces of one mesh by index. The deterministic way to select: no operator, no viewport, no guessing. analyze_mesh_quality reports sample indices for each defect it finds, so this is how to act on them. To select whole objects in the scene, use select_objects.

object_nameName of the mesh object.
elementOne of: VERTEX, EDGE, FACE.
indicesIndices to select. Must be non-negative and within the mesh.
extendAdd to the current selection instead of replacing it.

Returns Dict with how many elements were selected and the mesh's totals.

select_faces_by_sides

select_faces_by_sides(object_name: str, number: int = 4, comparison: str = 'EQUAL', extend: bool = False)

Select faces of one mesh by how many sides they have. The direct way to find ngons (GREATER than 4) or triangles (EQUAL to 3), which is what topology cleanup usually needs. Works inside one mesh; to select whole objects use select_objects.

object_nameName of the mesh object.
numberNumber of sides to compare against. A face has at least 3.
comparisonOne of: LESS, EQUAL, GREATER, NOTEQUAL.
extendAdd to the current selection instead of replacing it.

Returns Dict with how many faces were selected.

select_similar

select_similar(object_name: str, type: str = 'FACE_AREA', threshold: float = 0.0)

Grow the current mesh selection to vertices, edges or faces that resemble it. Requires something to already be selected: it compares against that. Works inside one mesh; it does not pick objects (see select_objects).

object_nameName of the mesh object.
typeWhat to compare. Face options: FACE_MATERIAL, FACE_AREA, FACE_SIDES, FACE_PERIMETER, FACE_NORMAL, FACE_COPLANAR, FACE_SMOOTH, FACE_FREESTYLE. Edge options: EDGE_LENGTH, EDGE_DIR, EDGE_FACES, EDGE_FACE_ANGLE, EDGE_CREASE, EDGE_BEVEL, EDGE_SEAM, EDGE_SHARP, EDGE_FREESTYLE. Vertex options: VERT_NORMAL, VERT_FACES, VERT_GROUPS, VERT_EDGES, VERT_CREASE.
thresholdHow close a match must be, 0.0 to 1.0.

Returns Dict with how many elements were selected.

sequencer 8

add_image_sequence_strip

add_image_sequence_strip(first_frame: str, name: str = '', channel: int = 1, frame_start: int = 1)

Add rendered frames to the sequencer as one image strip. Give the first frame of a numbered sequence, such as the output of render_animation. Every file in the same folder that shares its prefix and extension is added in numeric order, one image per timeline frame.

first_framePath to the first image, e.g. /renders/f_0001.png.
nameOptional name for the strip.
channelSequencer channel, 1-128. Higher channels draw on top.
frame_startTimeline frame where the strip begins.

Returns Dict with the strip name, image count, and the frames it covers.

add_sequencer_strip

add_sequencer_strip(kind: str, name: str = '', channel: int = 1, frame_start: int = 1, length: int = 25, text: str = '', font_size: float = 60.0, color: list[float] | None = None, filepath: str = '')

Add a text, solid colour or movie strip to the video sequencer. Higher channels draw on top. Style text or move any strip afterwards with set_strip_property; fade it with add_strip_fade.

kindTEXT (a title), COLOR (a solid background) or MOVIE (a video file).
nameStrip name; defaults to the kind or the file name.
channel1 to 128.
frame_startFirst frame.
lengthFrames, for TEXT and COLOR (a MOVIE takes the file's length).
textTEXT only: the words, up to 2000 characters.
font_sizeTEXT only, 1 to 2000.
colorTEXT: RGB(A) of the letters; COLOR: RGB of the fill. 0.0 to 1.0.
filepathMOVIE only: absolute path to .mp4, .mov, .mkv, .webm, .avi or .m4v.

Returns Dict with the strip's name, type, channel and frame range.

add_sound_strip

add_sound_strip(filepath: str, name: str = '', channel: int = 2, frame_start: int = 1, start_offset: float = 0.0, volume: float = 1.0)

Add an audio file to the sequencer as a sound strip.

filepathPath to the audio file (.wav, .mp3, .flac, .ogg, .m4a, .aac, .opus).
nameOptional name for the strip.
channelSequencer channel, 1-128.
frame_startTimeline frame where the sound becomes audible.
start_offsetSeconds to skip at the start of the audio file, so a clip can begin partway in.
volumeVolume multiplier, 0-100. 1.0 leaves the audio unchanged.

Returns Dict with the strip name and the frames it covers.

add_strip_fade

add_strip_fade(strip_name: str, fade_in: int = 0, fade_out: int = 0)

Fade a strip in from black and/or out to black (sound strips fade their volume).

strip_nameThe strip.
fade_inFrames to fade in over, from the strip's start.
fade_outFrames to fade out over, ending at the strip's end.

Returns Dict with the strip and the frames keyed.

list_strips

list_strips()

List every strip in the sequencer.

Returns List of dicts with name, type, channel, and first and last frame.

remove_strip

remove_strip(strip_name: str)

Remove a strip from the sequencer by name.

strip_nameName of the strip to remove.

Returns Confirmation dict.

render_video

render_video(filepath: str = '', container: str = 'MPEG4', quality: str = 'HIGH', audio_codec: str = 'AAC')

Render the scene's frame range to a single video file, with sound. Sequencer strips are used when there are any, so frames already rendered with render_animation can be assembled with a sound strip in seconds. With an empty sequencer the 3D scene is rendered. Playback speed follows the scene fps.

filepathOutput path, in a directory that exists. Empty means the system temp directory. The extension must match the container: .mp4 for MPEG4, .mkv for MKV, .webm for WEBM.
containerVideo container. One of: MPEG4, MKV, WEBM.
qualityEncoder quality preset, from LOWEST to LOSSLESS.
audio_codecAudio codec, or NONE for a silent video. WEBM accepts only OPUS or NONE.

Returns Dict with the output path, frame range, and fps.

set_strip_property

set_strip_property(strip_name: str, settings: dict[str, Any] | None = None, transform: dict[str, float] | None = None, crop: dict[str, float] | None = None)

Change a sequencer strip: its own settings, position and crop.

strip_nameThe strip.
settingsThe strip's settings by name, e.g. {"blend_alpha": 0.5, "channel": 3, "frame_start": 10, "blend_type": "ADD"}; text strips also take text, font_size, use_shadow, use_outline, use_box, wrap_width and alignment_x (LEFT, CENTER, RIGHT).
transformoffset_x / offset_y (pixels), scale_x / scale_y, rotation (radians).
cropmin_x, max_x, min_y, max_y in pixels.

Returns Dict with the strip's name, type, channel and frame range.

sweep 2

analyze_sweep_path

analyze_sweep_path(path_points: list[list[float]], radius: float = 1.0, resolution: int = 0)

Check whether a path can carry a profile of a given radius, without building it. Where a path's radius of curvature falls below the profile radius, the swept rings pass through each other on the inside of the bend. The result still reports as watertight and manifold with no degenerate faces, so no ordinary mesh check catches it. Call this before sweeping, or to find where an existing path needs widening.

path_pointsCentreline as a list of [x, y, z] points, in order.
radiusOuter radius of the profile you intend to sweep.
resolutionSamples between path points, matching what you will pass to sweep_profile_along_path so the check covers the same curve.

Returns Dict with min_clearance_ratio (curvature radius over profile radius at the tightest station; below 1.0 self-intersects), tightest_index, tightest_point, self_intersects, and counts of stations below 1.0 and below 1.5. Aim for 1.5 or more for a clean surface.

sweep_profile_along_path

sweep_profile_along_path(path_points: list[list[float]], profile: str = 'CIRCLE', radius: float = 1.0, sides: int = 16, resolution: int = 0, twist: float = 0.0, caps: bool = True, name: str = 'Sweep')

Sweep a closed profile along a 3D path to make a solid tube, pipe, cable or rope. Use this for anything that follows a route: hoses, handrails, wires, vines, tentacles, roads. It orients the profile with parallel transport, so the tube never creases or folds where the path turns vertical, and it reports whether any bend is too tight for the profile to fit around.

path_pointsCentreline as a list of [x, y, z] points, in order. At least 2, at most 2000. Consecutive points must differ.
profileCross-section shape - CIRCLE, SQUARE, HEXAGON, or TRIANGLE.
radiusDistance from the centreline to the furthest point of the profile, in Blender units. Must be positive.
sidesNumber of sides for a CIRCLE profile (3-1024). Ignored by the fixed-sided profiles.
resolutionSamples generated between each pair of path points, which smooths the path with a centripetal Catmull-Rom spline. 0 uses the points exactly as given. 8-16 gives a smooth curve.
twistTotal rotation of the profile about the path from start to end, in radians. Spreads evenly along the path.
capsClose both ends. Leave True for a printable solid.
nameName for the created object.

Returns Dict with the object name, vertex and face counts, and a validity report: min_clearance_ratio (path curvature radius over profile radius at the tightest point), tightest_point, and self_intersects. A ratio below 1.0 means rings overlap inside the bend, so the result is watertight but is not a solid.

Transforms 6

apply_transforms

apply_transforms(object_name: str, location: bool = True, rotation: bool = True, scale: bool = True)

Apply (freeze) transforms on an object, making current transforms the new basis.

object_nameName of the object.
locationApply location transform. Defaults to True.
rotationApply rotation transform. Defaults to True.
scaleApply scale transform. Defaults to True.

Returns Confirmation dict.

set_location

set_location(object_name: str, location: Vector3)

Set the position of an object.

object_nameName of the object.
locationXYZ position as a 3-element list/tuple.

Returns Dict with the object name and new location.

set_origin

set_origin(object_name: str, type: str = 'GEOMETRY')

Set the origin point of an object.

object_nameName of the object.
typeOrigin type. One of: GEOMETRY (origin to geometry center), CURSOR (origin to 3D cursor), CENTER_OF_MASS (origin to center of mass), CENTER_OF_VOLUME (origin to center of volume). Defaults to GEOMETRY.

Returns Confirmation dict with new origin location.

set_rotation

set_rotation(object_name: str, rotation: Vector3, mode: str = 'EULER')

Set the rotation of an object.

object_nameName of the object.
rotationRotation values. For EULER mode, XYZ angles in radians (3 elements). For QUATERNION mode, WXYZ values (4 elements).
modeRotation mode, either EULER or QUATERNION. Defaults to EULER.

Returns Dict with the object name and new rotation.

set_scale

set_scale(object_name: str, scale: Vector3)

Set the scale of an object.

object_nameName of the object.
scaleXYZ scale as a 3-element list/tuple.

Returns Dict with the object name and new scale.

snap_to_grid

snap_to_grid(object_name: str, grid_size: float = 1.0)

Snap an object's location to the nearest grid point.

object_nameName of the object.
grid_sizeSize of the grid cells. Defaults to 1.0.

Returns Dict with the object name and snapped location.

UV Mapping 8

get_texel_density

get_texel_density(object_name: str, texture_size: int = 1024)

Measure texel density: how many texture pixels cover one metre of surface. Matching density across assets keeps texture sharpness consistent; game art often targets 512 or 1024 px/m.

object_nameMesh object with a UV map.
texture_sizeTexture width in pixels the UVs are meant for.

Returns Dict with density in px/m, surface area in m^2 (world scale), and the share of UV space used.

manage_uv_map

manage_uv_map(object_name: str, action: str, uv_map: str = 'UVMap', new_name: str | None = None, copy_active: bool = True)

List, add, remove, rename UV maps, or choose which one is edited or rendered. A mesh holds up to 8 UV maps. Common use: ADD a "Lightmap" map, then smart_uv_project or pack_uv_islands on it for non-overlapping bake UVs, while textures keep using the first map. UV tools work on the active map; materials and export use the render map unless a UV Map node picks one.

object_nameMesh object.
actionLIST, ADD (becomes the active map), REMOVE, SET_ACTIVE (the map UV tools edit), SET_RENDER (the map renders and exports), RENAME.
uv_mapThe map to act on, or the new map's name for ADD.
new_nameRENAME only: the new name.
copy_activeADD only: start from a copy of the active map's UVs instead of blank ones.

Returns Dict with every UV map (name, active, render).

pack_uv_islands

pack_uv_islands(object_name: str, margin: float = 0.001, rotate: bool = True, rotate_method: str = 'ANY', scale: bool = True)

Pack UV islands to fit efficiently within the UV space.

object_nameName of the mesh object.
marginMargin between packed islands (0.0-1.0).
rotateAllow islands to rotate for a tighter fit.
rotate_methodANY, CARDINAL (90 degree steps), AXIS_ALIGNED, AXIS_ALIGNED_X or AXIS_ALIGNED_Y.
scaleScale islands to fill the space. Turn off after set_texel_density, or the pack undoes the density.

Returns Confirmation dict with object name.

set_texel_density

set_texel_density(object_name: str, density: float, texture_size: int = 1024)

Scale an object's UVs to hit a target texel density. Islands keep their layout and scale about their shared centre, so they may spill outside the 0-1 square; pack afterwards with pack_uv_islands(scale=False) to bring them back without undoing this.

object_nameMesh object with a UV map.
densityTarget pixels per metre, above 0 and up to 100000.
texture_sizeTexture width in pixels the UVs are meant for.

Returns Dict with the density before and after.

set_uv_projection

set_uv_projection(object_name: str, projection: str)

Apply a projection-based UV mapping to a mesh object.

object_nameName of the mesh object.
projectionProjection type - CUBE, CYLINDER, or SPHERE.

Returns Confirmation dict with object name and projection type.

smart_uv_project

smart_uv_project(object_name: str, angle_limit: float = 66.0, island_margin: float = 0.0, area_weight: float = 0.0)

Apply Smart UV Project to a mesh object. Automatically unwraps the mesh using angle-based projection.

object_nameName of the mesh object.
angle_limitAngle limit in degrees for splitting faces (0.0-89.0).
island_marginMargin between UV islands (0.0-1.0).
area_weightWeight given to face area for island arrangement (0.0-1.0).

Returns Confirmation dict with object name and UV map info.

uv_island_operation

uv_island_operation(object_name: str, operation: str, selection: str = 'ALL', iterations: int = 20, rotation: float = 0.0, scale_variation: float = 0.0, offset: float = 0.0, seed: int = 0, margin: float = 0.05, threshold: float = 0.0001)

Tidy UV islands after unwrapping.

object_nameMesh object with a UV map.
operationOne of: AVERAGE_SCALE (give every island the same texel size relative to its 3D area, so textures don't look blurrier on some parts), MINIMIZE_STRETCH (relax UVs to reduce distortion: iterations), ALIGN_ROTATION (turn islands to line up with the axes), RANDOMIZE (jitter islands so tiled textures don't repeat visibly: rotation in radians, scale_variation, offset, seed), SEAMS_FROM_ISLANDS (mark seams along the current island borders), ARRANGE (lay islands out in rows, new in 5.0: margin), WELD (merge UV points closer than threshold).
selection"ALL" for the whole mesh, or "CURRENT" for the faces already selected.
iterationsMINIMIZE_STRETCH passes, 1 to 1000.
rotationRANDOMIZE maximum rotation, 0 to 6.283 radians.
scale_variationRANDOMIZE scale range, 0.0 to 1.0.
offsetRANDOMIZE maximum position change, 0.0 to 1.0.
seedRANDOMIZE seed, 0 or more.
marginARRANGE spacing, 0.0 to 1.0.
thresholdWELD distance, 0.0 to 1.0.

Returns Dict with the operation and the object.

uv_unwrap

uv_unwrap(object_name: str, method: str = 'ANGLE_BASED')

Unwrap a mesh object's UVs using standard unwrap. Requires seams to be marked for best results.

object_nameName of the mesh object.
methodUnwrap method - ANGLE_BASED, CONFORMAL, or MINIMUM_STRETCH (the SLIM unwrapper; least distortion, slower).

Returns Confirmation dict with object name.

Viewport 3

focus_on_object

focus_on_object(object_name: str)

Frame/focus the viewport on a specific object. Selects the object and uses View Selected to center the viewport on it.

object_nameName of the object to focus on.

Returns Confirmation dict.

set_viewport_overlay

set_viewport_overlay(overlay: str, enabled: bool)

Toggle a viewport overlay setting.

overlayOverlay property name. One of: show_wireframes, show_face_orientation, show_floor, show_axis_x, show_axis_y, show_axis_z, show_cursor, show_object_origins, show_relationship_lines, show_stats.
enabledWhether the overlay should be enabled.

Returns Confirmation dict with the overlay name and state.

set_viewport_shading

set_viewport_shading(mode: str)

Set the viewport shading mode.

modeShading mode. One of: WIREFRAME, SOLID, MATERIAL, RENDERED.

Returns Confirmation dict with the new shading mode.

Viewport Capture 1

get_viewport_screenshot

get_viewport_screenshot(max_size: int = 1000, mode: str = 'fast')

Capture a screenshot of the current Blender 3D viewport.

max_sizeMaximum size in pixels for the largest dimension (default: 1000).
modeCapture mode - 'fast' for instant viewport capture using OpenGL (default), 'full' for a complete render through the active render engine.

Returns Dict with base64-encoded PNG image data, width, height, format, and mode.