pf.ops
Submodules
pf.ops.collection —
procfunc.ops.collectionpf.ops.file —
procfunc.ops.filepf.ops.mesh —
procfunc.ops.meshpf.ops.modifier —
procfunc.ops.modifierpf.ops.object —
procfunc.ops.objectpf.ops.attr —
procfunc.ops.attrpf.ops.curve —
procfunc.ops.curvepf.ops.uv —
procfunc.ops.uv
pf.ops.collection
pf.ops.file
pf.ops.mesh
- procfunc.ops.mesh.transform_apply(mutates_obj, location=True, rotation=True, scale=True)[source]
- Parameters:
mutates_obj (MeshObject)
location (bool)
rotation (bool)
scale (bool)
- procfunc.ops.mesh.transform(mutates_obj, location=None, rotation_euler=None, scale=None)[source]
- Parameters:
mutates_obj (MeshObject)
location (Vector | None)
rotation_euler (Vector | Euler | None)
scale (Vector | None)
- procfunc.ops.mesh.delete_geometry(mutates_obj, vertex_mask=None, edge_mask=None, face_mask=None, type='VERT')[source]
Based on bpy.ops.mesh.delete
- Parameters:
mutates_obj (MeshObject)
vertex_mask (ndarray | None)
edge_mask (ndarray | None)
face_mask (ndarray | None)
type (Literal['VERT', 'EDGE', 'FACE', 'EDGE_FACE', 'ONLY_FACE'])
- Return type:
None
- class procfunc.ops.mesh.ProportionalEditProperties[source]
Bases:
objectProportionalEditProperties(falloff: Optional[Literal[‘SMOOTH’, ‘SPHERE’, ‘ROOT’, ‘INVERSE_SQUARE’, ‘SHARP’, ‘LINEAR’, ‘CONSTANT’, ‘RANDOM’]] = None, size: float = 1.0, connected: bool = False, projected: bool = False)
- procfunc.ops.mesh.extrude_edges(mutates_obj, edge_mask=None, use_normal_flip=False, mirror=False, value=(0.0, 0.0, 0.0), orient_type='GLOBAL', constraint_axis=(False, False, False), **proportional_edit_kwargs)[source]
Extrude individual edges and move
Based on bpy.ops.mesh.extrude_edges_move
- Parameters:
edge_mask (ndarray | None) – Boolean array selecting edges to extrude.
mutates_obj (MeshObject)
use_normal_flip (bool)
mirror (bool)
orient_type (Literal['GLOBAL', 'LOCAL', 'NORMAL', 'GIMBAL', 'VIEW', 'CURSOR'])
proportional_edit_kwargs (Unpack[ProportionalEditProperties])
- Return type:
None
- procfunc.ops.mesh.region_to_loop(obj, face_mask=None)[source]
Select boundary edges of face regions
Based on bpy.ops.mesh.region_to_loop
- Parameters:
face_mask (ndarray | None) – Boolean array selecting face regions to convert to loops.
obj (MeshObject)
- Returns:
Boolean array selecting edges that were converted to loops.
- Return type:
- procfunc.ops.mesh.bridge_edge_loops(mutates_obj, edge_mask=None, type='SINGLE', use_merge=False, merge_factor=0.5, twist_offset=0, number_cuts=0, interpolation='PATH', smoothness=1.0, profile_shape_factor=0.0, profile_shape='SMOOTH')[source]
Create faces between two edge loops
Based on bpy.ops.mesh.bridge_edge_loops
- Parameters:
edge_mask (ndarray | None) – Boolean array selecting edges to bridge between.
mutates_obj (MeshObject)
type (Literal['SINGLE', 'PAIRS', 'FAN'])
use_merge (bool)
merge_factor (float)
twist_offset (int)
number_cuts (int)
interpolation (Literal['PATH', 'SURFACE'])
smoothness (float)
profile_shape_factor (float)
profile_shape (Literal['SMOOTH', 'SPHERE', 'ROOT', 'INVERSE_SQUARE', 'SHARP', 'LINEAR'])
- Return type:
None
- procfunc.ops.mesh.normals_make_consistent(mutates_obj, face_mask=None, inside=False)[source]
Make face normals point outside or inside
Based on bpy.ops.mesh.normals_make_consistent
- Parameters:
face_mask (ndarray | None) – Boolean array selecting faces to make consistent. If None, operates on entire mesh.
mutates_obj (MeshObject)
inside (bool)
- Return type:
None
- procfunc.ops.mesh.remove_doubles(mutates_obj, vertex_mask=None, edge_mask=None, face_mask=None, threshold=0.0001, use_unselected=False, use_sharp_edge_from_normals=False)[source]
Remove duplicate vertices
Based on bpy.ops.mesh.remove_doubles
- Parameters:
- Return type:
None
- procfunc.ops.mesh.quads_convert_to_tris(mutates_obj, face_mask=None)[source]
Convert quad faces to triangular faces
Based on bpy.ops.mesh.quads_convert_to_tris
- Parameters:
face_mask (ndarray | None) – Boolean array selecting faces to convert. If None, operates on entire mesh.
mutates_obj (MeshObject)
- Return type:
None
Note: quad_method and ngon_method not currently included, they are never used in infinigen but could be re-added if useful
- procfunc.ops.mesh.separate_mask(mutates_obj, vertex_mask=None, edge_mask=None, face_mask=None)[source]
Separate selected geometry into a new mesh
Based on bpy.ops.mesh.separate
- Parameters:
vertex_mask (ndarray | None) – Boolean array selecting vertices to separate.
edge_mask (ndarray | None) – Boolean array selecting edges to separate.
face_mask (ndarray | None) – Boolean array selecting faces to separate.
mutates_obj (MeshObject)
- Return type:
Note: we dont currently support the type=”MATERIAL” option, please extract this mask explicitly and pass it in.
- procfunc.ops.mesh.separate_loose(mutates_obj)[source]
Separate loose mesh islands into new objects
Based on bpy.ops.mesh.separate
- Parameters:
mutates_obj (MeshObject)
- Return type:
- procfunc.ops.mesh.fill_grid(mutates_obj, edge_mask, span=1, offset=0, use_interp_simple=False)[source]
Fill grid from two edge loops
Based on bpy.ops.mesh.fill_grid
- Parameters:
edge_mask (ndarray) – Boolean array selecting edge loops to fill between.
mutates_obj (MeshObject)
span (int)
offset (int)
use_interp_simple (bool)
- Return type:
None
- procfunc.ops.mesh.edge_face_add(mutates_obj, edge_mask)[source]
Add an edge or face to selected
Based on bpy.ops.mesh.edge_face_add
- Parameters:
edge_mask (ndarray) – Boolean array selecting edges to add faces to.
mutates_obj (MeshObject)
- Return type:
None
- procfunc.ops.mesh.duplicate(mutates_obj, vertex_mask=None, edge_mask=None, face_mask=None)[source]
Duplicate selected faces
- Parameters:
mutate_obj – MeshObject providing source and destination geometry
vertex_mask (ndarray | None) – If enabled, duplicate these vertices
edge_mask (ndarray | None) – If enabled, duplicate these edges
face_mask (ndarray | None) – If enabled, duplicate these faces
mutates_obj (MeshObject)
- Returns:
mask over vertices edges or faces, depending on which mask was provided
- procfunc.ops.mesh.extrude_faces(mutates_obj, face_mask=None, use_normal_flip=False, use_dissolve_ortho_edges=False, mirror=False, value=(0.0, 0.0, 0.0), orient_type='GLOBAL', constraint_axis=(False, False, False), **proportional_edit_kwargs)[source]
Extrude region and move result
Based on bpy.ops.mesh.extrude_region_move
- Parameters:
face_mask (ndarray | None) – Boolean array selecting faces to extrude. If None, operates on entire mesh.
mutates_obj (MeshObject)
use_normal_flip (bool)
use_dissolve_ortho_edges (bool)
mirror (bool)
orient_type (Literal['GLOBAL', 'LOCAL', 'NORMAL', 'GIMBAL', 'VIEW', 'CURSOR'])
proportional_edit_kwargs (Unpack[ProportionalEditProperties])
- Return type:
None
- procfunc.ops.mesh.subdivide(mutates_obj, vertex_mask=None, edge_mask=None, face_mask=None, number_cuts=1, smoothness=0.0, ngon=True, quadcorner='STRAIGHT_CUT', fractal=0.0, fractal_along_normal=0.0, seed=0)[source]
Subdivide selected edges
Based on bpy.ops.mesh.subdivide
- Parameters:
face_mask (ndarray | None) – Boolean array selecting faces to subdivide. If None, operates on entire mesh.
mutates_obj (MeshObject)
vertex_mask (ndarray | None)
edge_mask (ndarray | None)
number_cuts (int)
smoothness (float)
ngon (bool)
quadcorner (Literal['STRAIGHT_CUT', 'INNER_VERT', 'PATH', 'FAN'])
fractal (float)
fractal_along_normal (float)
seed (int)
- Return type:
None
- procfunc.ops.mesh.unsubdivide(mutates_obj, iterations=2)[source]
Un-subdivide selected edges and faces
Based on bpy.ops.mesh.unsubdivide
- Parameters:
iterations (int) – Number of times to un-subdivide.
mutates_obj (MeshObject)
- Return type:
None
- procfunc.ops.mesh.inset(mutates_obj, face_mask=None, use_boundary=True, use_even_offset=True, use_relative_offset=False, use_edge_rail=False, thickness=0.0, depth=0.0, use_outset=False, use_select_inset=False, use_individual=False, use_interpolate=True)[source]
Inset new faces into selected faces
Based on bpy.ops.mesh.inset
# TODO: use_select_inset as np.array output
- Parameters:
face_mask (ndarray | None) – Boolean array selecting faces to inset. If None, operates on entire mesh.
mutates_obj (MeshObject)
use_boundary (bool)
use_even_offset (bool)
use_relative_offset (bool)
use_edge_rail (bool)
thickness (float)
depth (float)
use_outset (bool)
use_select_inset (bool)
use_individual (bool)
use_interpolate (bool)
- Returns:
Boolean array selecting faces that were inset.
- Return type:
- procfunc.ops.mesh.inset_individual(mutates_obj, face_mask=None, use_boundary=True, use_even_offset=True, use_relative_offset=False, use_edge_rail=False, thickness=0.0, depth=0.0, use_outset=False, use_interpolate=True)[source]
- procfunc.ops.mesh.bisect(mutates_obj, face_mask=None, plane_co=(0.0, 0.0, 0.0), plane_no=(1.0, 0.0, 0.0), use_fill=False, clear_inner=False, clear_outer=False, threshold=0.0001, flip=False)[source]
Cut geometry along a plane
Based on bpy.ops.mesh.bisect
TODO: add edge_mask ?
NOTE: xstart, xend, ystart, yend are not supported as these relate to UI input, please manually specify the plane_c
- Parameters:
- Return type:
None
- procfunc.ops.mesh.convex_hull(mutates_obj, vertex_mask=None, delete_unused=True, use_existing_faces=True, make_holes=False, join_triangles=True, face_threshold=0.698132, shape_threshold=0.698132, uvs=False, vcols=False, seam=False, sharp=False, materials=False)[source]
Enclose selected vertices in a convex hull
Based on bpy.ops.mesh.convex_hull
- Parameters:
vertex_mask (ndarray | None) – Boolean array selecting vertices for hull computation. If None, operates on entire mesh.
mutates_obj (MeshObject)
delete_unused (bool)
use_existing_faces (bool)
make_holes (bool)
join_triangles (bool)
face_threshold (float)
shape_threshold (float)
uvs (bool)
vcols (bool)
seam (bool)
sharp (bool)
materials (bool)
- Return type:
None
- class procfunc.ops.mesh.BevelProperties[source]
Bases:
objectBevelProperties(offset: float = 0.1, offset_pct: float = 0.1, offset_type: Literal[‘OFFSET’, ‘WIDTH’, ‘DEPTH’, ‘PERCENT’, ‘ABSOLUTE’] = ‘OFFSET’, profile_type: Literal[‘SUPERELLIPSE’, ‘CUSTOM’] = ‘SUPERELLIPSE’, segments: int = 1, profile: float = 0.5, clamp_overlap: bool = False, loop_slide: bool = True, mark_seam: bool = False, mark_sharp: bool = False, material: int = -1, harden_normals: bool = False, face_strength_mode: Literal[‘NONE’, ‘NEW’, ‘AFFECTED’, ‘ALL’] = ‘NONE’, miter_outer: Literal[‘SHARP’, ‘PATCH’, ‘ARC’] = ‘SHARP’, miter_inner: Literal[‘SHARP’, ‘ARC’] = ‘SHARP’, spread: float = 0.1, vmesh_method: Literal[‘ADJ’, ‘CUTOFF’] = ‘ADJ’)
- __init__(offset=0.1, offset_pct=0.1, offset_type='OFFSET', profile_type='SUPERELLIPSE', segments=1, profile=0.5, clamp_overlap=False, loop_slide=True, mark_seam=False, mark_sharp=False, material=-1, harden_normals=False, face_strength_mode='NONE', miter_outer='SHARP', miter_inner='SHARP', spread=0.1, vmesh_method='ADJ')
- Parameters:
offset (float)
offset_pct (float)
offset_type (Literal['OFFSET', 'WIDTH', 'DEPTH', 'PERCENT', 'ABSOLUTE'])
profile_type (Literal['SUPERELLIPSE', 'CUSTOM'])
segments (int)
profile (float)
clamp_overlap (bool)
loop_slide (bool)
mark_seam (bool)
mark_sharp (bool)
material (int)
harden_normals (bool)
face_strength_mode (Literal['NONE', 'NEW', 'AFFECTED', 'ALL'])
miter_outer (Literal['SHARP', 'PATCH', 'ARC'])
miter_inner (Literal['SHARP', 'ARC'])
spread (float)
vmesh_method (Literal['ADJ', 'CUTOFF'])
- Return type:
None
- procfunc.ops.mesh.bevel_vertices(mutates_obj, vertex_mask=None, **kwargs)[source]
Cut into selected items at an angle to create bevel or chamfer
Based on bpy.ops.mesh.bevel
- Parameters:
vertex_mask (ndarray | None) – Boolean array selecting vertices to bevel. If None, operates on entire mesh.
mutates_obj (MeshObject)
kwargs (Unpack[BevelProperties])
- Return type:
None
- procfunc.ops.mesh.bevel_edges(mutates_obj, edge_mask=None, **kwargs)[source]
Cut into selected items at an angle to create bevel or chamfer
Based on bpy.ops.mesh.bevel
- Parameters:
edge_mask (ndarray | None) – Boolean array selecting edges to bevel. If None, operates on entire mesh.
mutates_obj (MeshObject)
kwargs (Unpack[BevelProperties])
- Return type:
None
- procfunc.ops.mesh.select_loose(mutates_obj, vertex_mask=None, edge_mask=None, face_mask=None, extend=False)[source]
Select loose geometry.
Based on bpy.ops.mesh.select_loose
- procfunc.ops.mesh.select_more(mutates_obj, vertex_mask=None, edge_mask=None, face_mask=None, use_face_step=True)[source]
Select more vertices, edges or faces connected to current selection.
Based on bpy.ops.mesh.select_more
- procfunc.ops.mesh.loop_multi_select(mutates_obj, vertex_mask=None, edge_mask=None, face_mask=None, ring=False)[source]
Select a loop of connected edges by connection type.
Based on bpy.ops.mesh.loop_multi_select
- procfunc.ops.mesh.fill(mutates_obj, edge_mask=None, use_beauty=True)[source]
Fill a selected edge loop with faces
Based on bpy.ops.mesh.fill
- Parameters:
edge_mask (ndarray | None) – Boolean array selecting edge loop to fill.
mutates_obj (MeshObject)
use_beauty (bool)
- Return type:
None
- procfunc.ops.mesh.poke(mutates_obj, face_mask=None, offset=0.0, use_relative_offset=False, center_mode='MEDIAN_WEIGHTED')[source]
Split selected faces into individual triangles
Based on bpy.ops.mesh.poke
- Parameters:
face_mask (ndarray | None) – Boolean array selecting faces to poke.
mutates_obj (MeshObject)
offset (float)
use_relative_offset (bool)
center_mode (Literal['MEDIAN_WEIGHTED', 'MEDIAN', 'BOUNDS'])
- Return type:
None
- procfunc.ops.mesh.flip_normals(mutates_obj, face_mask=None, only_clnors=False)[source]
Flip the direction of selected faces’ normals
Based on bpy.ops.mesh.flip_normals
- Parameters:
face_mask (ndarray | None) – Boolean array selecting faces to flip normals. If None, operates on entire mesh.
mutates_obj (MeshObject)
only_clnors (bool)
- Return type:
None
- procfunc.ops.mesh.extrude_faces_shrink_fatten(mutates_obj, use_normal_flip=False, use_dissolve_ortho_edges=False, mirror=False, value=0.0, use_even_offset=False, snap=False, use_accurate=False, face_mask=None, **proportional_edit_kwargs)[source]
Extrude region and shrink/fatten
Based on bpy.ops.mesh.extrude_region_shrink_fatten
- Parameters:
face_mask (ndarray | None) – Boolean array selecting faces to extrude. If None, operates on entire mesh.
mutates_obj (MeshObject)
use_normal_flip (bool)
use_dissolve_ortho_edges (bool)
mirror (bool)
value (float)
use_even_offset (bool)
snap (bool)
use_accurate (bool)
proportional_edit_kwargs (Unpack[ProportionalEditProperties])
- Return type:
None
- procfunc.ops.mesh.tris_convert_to_quads(mutates_obj, face_threshold=0.698132, shape_threshold=0.698132, uvs=False, vcols=False, seam=False, sharp=False, materials=False, face_mask=None)[source]
Convert triangles to quads
Based on bpy.ops.mesh.tris_convert_to_quads
- procfunc.ops.mesh.merge(mutates_obj, type='CENTER', uvs=False, vertex_mask=None, edge_mask=None, face_mask=None)[source]
Merge selected vertices
Based on bpy.ops.mesh.merge
- Parameters:
vertex_mask (ndarray | None) – Boolean array selecting vertices to merge. At most one can be provided. If all are None, operates on entire mesh.
edge_mask (ndarray | None) – Boolean array selecting edges to merge. At most one can be provided. If all are None, operates on entire mesh.
face_mask (ndarray | None) – Boolean array selecting faces to merge. At most one can be provided. If all are None, operates on entire mesh.
mutates_obj (MeshObject)
type (Literal['CENTER', 'CURSOR', 'COLLAPSE'])
uvs (bool)
- Return type:
None
Note: Only one of vertex_mask, edge_mask, or face_mask should be provided.
- procfunc.ops.mesh.mark_sharp(mutates_obj, clear=False, use_verts=False, edge_mask=None)[source]
Mark selected edges as sharp
Based on bpy.ops.mesh.mark_sharp
- Parameters:
edge_mask (ndarray | None) – Boolean array selecting edges to mark/unmark as sharp. If None, operates on entire mesh.
mutates_obj (MeshObject)
clear (bool)
use_verts (bool)
- Return type:
None
- procfunc.ops.mesh.dissolve_limited(mutates_obj, angle_limit=0.0872665, use_dissolve_boundaries=False, delimit={'NORMAL'}, edge_mask=None)[source]
Dissolve selected edges and faces limited by the angle of adjacent faces
Based on bpy.ops.mesh.dissolve_limited
- procfunc.ops.mesh.extrude_vertices(mutates_obj, vertex_mask, mirror=False, value=(0.0, 0.0, 0.0), orient_type='GLOBAL', constraint_axis=(False, False, False), **kwargs)[source]
Extrude individual vertices and move
Based on bpy.ops.mesh.extrude_vertices_move
- Parameters:
vertex_mask (ndarray) – Boolean array selecting vertices to extrude. If None, operates on entire mesh.
mutates_obj (MeshObject)
mirror (bool)
orient_type (Literal['GLOBAL', 'LOCAL', 'NORMAL', 'GIMBAL', 'VIEW', 'CURSOR'])
kwargs (Unpack[ProportionalEditProperties])
- Return type:
None
- procfunc.ops.mesh.fill_holes(mutates_obj, sides=4)[source]
Fill in holes (boundary edge loops)
Based on bpy.ops.mesh.fill_holes
- Parameters:
mutates_obj (MeshObject)
sides (int)
- Return type:
None
- procfunc.ops.mesh.spin(mutates_obj, vertex_mask=None, steps=12, dupli=False, angle=1.5708, use_auto_merge=True, use_normal_flip=False, center=(0.0, 0.0, 0.0), axis=(0.0, 0.0, 1.0))[source]
Extrude selected vertices in a circle around the cursor in indicated viewport
Based on bpy.ops.mesh.spin
- Parameters:
- Return type:
None
- procfunc.ops.mesh.vertices_smooth(mutates_obj, vertex_mask=None, factor=0.5, repeat=1, xaxis=True, yaxis=True, zaxis=True)[source]
Flatten angles of selected vertices
Based on bpy.ops.mesh.vertices_smooth
- procfunc.ops.mesh.split_nonplanar_faces(mutates_obj, face_mask=None, angle_limit_rad=0.0872665)[source]
Split nonplanar faces into new faces
- Parameters:
mutates_obj (MeshObject)
face_mask (ndarray | None)
angle_limit_rad (float)
- procfunc.ops.mesh.edges_select_sharp(mutates_obj, sharpness=0.523599)[source]
Select all sharp enough edges
Based on bpy.ops.mesh.edges_select_sharp
- Parameters:
mutates_obj (MeshObject)
sharpness (float)
- Return type:
- procfunc.ops.mesh.select_nth(mutates_obj, domain='FACE', skip=1, nth=1, offset=0)[source]
Deselect every Nth element starting from the active vertex, edge or face.
Based on bpy.ops.mesh.select_nth
- Parameters:
domain (Literal['VERT', 'EDGE', 'FACE']) – Which element type to operate on.
skip (int) – Number of deselected elements in the repetitive sequence.
nth (int) – Number of selected elements in the repetitive sequence.
offset (int) – Offset from the starting point.
mutates_obj (MeshObject)
- Returns:
Boolean mask of the selected elements after the operation.
- Return type:
- procfunc.ops.mesh.edge_split(mutates_obj, edge_mask=None, type='EDGE')[source]
- Parameters:
mutates_obj (MeshObject)
edge_mask (ndarray | None)
type (Literal['EDGE', 'VERT'])
- procfunc.ops.mesh.symmetrize(mutates_obj, vertex_mask=None, edge_mask=None, face_mask=None, direction='NEGATIVE_X', threshold=0.001)[source]
- procfunc.ops.mesh.subdivide_edgering(mutates_obj, edge_mask=None, number_cuts=10, interpolation='PATH', smoothness=1.0, profile_shape_factor=0.0, profile_shape='SMOOTH')[source]
- procfunc.ops.mesh.move(mutates_obj, value=(0.0, 0.0, 0.0), vertex_mask=None, edge_mask=None, face_mask=None, orient_type='GLOBAL', constraint_axis=(False, False, False), mirror=False, **proportional_edit_kwargs)[source]
Move selected geometry
Based on bpy.ops.transform.translate
- Parameters:
mutates_obj (MeshObject)
vertex_mask (ndarray | None)
edge_mask (ndarray | None)
face_mask (ndarray | None)
orient_type (Literal['GLOBAL', 'LOCAL', 'NORMAL', 'GIMBAL', 'VIEW', 'CURSOR'])
mirror (bool)
proportional_edit_kwargs (Unpack[ProportionalEditProperties])
- Return type:
None
- procfunc.ops.mesh.rotate(mutates_obj, value=0.0, vertex_mask=None, edge_mask=None, face_mask=None, orient_axis='Z', orient_type='GLOBAL', constraint_axis=(False, False, False), mirror=False, **proportional_edit_kwargs)[source]
Rotate selected geometry
Based on bpy.ops.transform.rotate
- Parameters:
mutates_obj (MeshObject)
value (float)
vertex_mask (ndarray | None)
edge_mask (ndarray | None)
face_mask (ndarray | None)
orient_axis (Literal['X', 'Y', 'Z'])
orient_type (Literal['GLOBAL', 'LOCAL', 'NORMAL', 'GIMBAL', 'VIEW', 'CURSOR'])
mirror (bool)
proportional_edit_kwargs (Unpack[ProportionalEditProperties])
- Return type:
None
- procfunc.ops.mesh.resize(mutates_obj, value=(1.0, 1.0, 1.0), vertex_mask=None, edge_mask=None, face_mask=None, orient_type='GLOBAL', constraint_axis=(False, False, False), mirror=False, **proportional_edit_kwargs)[source]
Resize selected geometry
Based on bpy.ops.transform.resize
- Parameters:
mutates_obj (MeshObject)
vertex_mask (ndarray | None)
edge_mask (ndarray | None)
face_mask (ndarray | None)
orient_type (Literal['GLOBAL', 'LOCAL', 'NORMAL', 'GIMBAL', 'VIEW', 'CURSOR'])
mirror (bool)
proportional_edit_kwargs (Unpack[ProportionalEditProperties])
- Return type:
None
pf.ops.modifier
- procfunc.ops.modifier.array(mutates_obj, count=2, relative_offset_displace=None, constant_offset_displace=None, merge_threshold=0.0)[source]
Apply array modifier.
- procfunc.ops.modifier.bevel(mutates_obj, width=0.01, segments=1)[source]
Apply bevel modifier.
- Parameters:
mutates_obj (MeshObject)
width (float)
segments (int)
- procfunc.ops.modifier.boolean_difference(mutates_obj, target, threshold=1e-6, fast=True, hole_tolerant=False, self_intersect=False)[source]
Apply boolean difference modifier.
- Parameters:
mutates_obj (MeshObject)
target (MeshObject | Collection)
threshold (float)
fast (bool)
hole_tolerant (bool)
self_intersect (bool)
- procfunc.ops.modifier.curve_deform(mutates_obj, curve_object, deform_axis='POS_Y')[source]
Apply curve deform modifier to bend mesh along a curve.
- Parameters:
mutates_obj (MeshObject)
curve_object (CurveObject)
deform_axis (Literal['POS_X', 'POS_Y', 'POS_Z', 'NEG_X', 'NEG_Y', 'NEG_Z'])
- procfunc.ops.modifier.boolean_intersect(mutates_obj, target, threshold=1e-6, fast=True, hole_tolerant=False, self_intersect=False)[source]
Apply boolean intersect modifier.
- Parameters:
mutates_obj (MeshObject)
target (MeshObject | Collection)
threshold (float)
fast (bool)
hole_tolerant (bool)
self_intersect (bool)
- procfunc.ops.modifier.boolean_union(mutates_obj, target, threshold=1e-6, fast=True, hole_tolerant=False, self_intersect=False)[source]
Apply boolean union modifier.
- Parameters:
mutates_obj (MeshObject)
target (MeshObject)
threshold (float)
fast (bool)
hole_tolerant (bool)
self_intersect (bool)
- procfunc.ops.modifier.corrective_smooth(mutates_obj, iterations=1, smooth_type='SIMPLE')[source]
Apply corrective smooth modifier.
- Parameters:
mutates_obj (MeshObject)
iterations (int)
smooth_type (Literal['SIMPLE', 'LENGTH_WEIGHTED'])
- procfunc.ops.modifier.decimate_collapse(mutates_obj, ratio=0.5)[source]
Apply decimate modifier.
TODO: we will add other modes e.g. DISSOLVE and UNSUBDIV at a later date if proven necessary
- Parameters:
mutates_obj (MeshObject)
ratio (float)
- procfunc.ops.modifier.displacement(mutates_obj, texture=None, strength=1.0, mid_level=0.5, direction='NORMAL', space='LOCAL', texture_coords='LOCAL', texture_coords_object=None, uv_layer='', vertex_group='', invert_vertex_group=False, texture_coords_bone='')[source]
Apply displacement modifier.
- Parameters:
mutates_obj (MeshObject)
texture (Texture | None)
strength (float)
mid_level (float)
direction (Literal['X', 'Y', 'Z', 'NORMAL', 'CUSTOM_NORMAL', 'RGB_TO_XYZ'])
space (Literal['LOCAL', 'GLOBAL'])
texture_coords (Literal['LOCAL', 'GLOBAL', 'OBJECT', 'UV'])
texture_coords_object (Object | None)
uv_layer (str)
vertex_group (str)
invert_vertex_group (bool)
texture_coords_bone (str)
- procfunc.ops.modifier.edge_split(mutates_obj, use_edge_angle=True, split_angle=0.523599)[source]
Apply edge split modifier.
- Parameters:
mutates_obj (MeshObject)
use_edge_angle (bool)
split_angle (float)
- procfunc.ops.modifier.laplacian_smooth(mutates_obj, iterations=1, lambda_factor=1.0, lambda_border=1.0)[source]
Apply Laplacian smooth modifier.
- Parameters:
mutates_obj (MeshObject)
iterations (int)
lambda_factor (float)
lambda_border (float)
- procfunc.ops.modifier.mirror(mutates_obj, use_axis=(True, False, False), use_bisect_axis=(False, False, False), use_bisect_flip_axis=(False, False, False), merge_threshold=0.0)[source]
Apply mirror modifier.
TODO: May also be applicable to t.CurveObject
- procfunc.ops.modifier.remesh_voxel(mutates_obj, voxel_size=0.1, adaptivity=0.0, use_smooth_shade=False)[source]
Apply remesh modifier.
TODO: we will add other modes e.g. BLOCKS and SMOOTH at a later date if proven necessary
- Parameters:
mutates_obj (MeshObject)
voxel_size (float)
adaptivity (float)
use_smooth_shade (bool)
- procfunc.ops.modifier.screw(mutates_obj, angle=6.28318, iterations=1, screw_offset=0)[source]
Apply screw modifier.
- Parameters:
mutates_obj (MeshObject)
angle (float)
iterations (int)
screw_offset (float)
- procfunc.ops.modifier.shrinkwrap(mutates_obj, target)[source]
Apply shrinkwrap modifier.
- Parameters:
mutates_obj (MeshObject)
target (MeshObject)
- procfunc.ops.modifier.skin(mutates_obj, use_smooth_shade=True)[source]
Apply skin modifier.
- Parameters:
mutates_obj (MeshObject)
use_smooth_shade (bool)
- procfunc.ops.modifier.smooth(mutates_obj, iterations=1, factor=0.5)[source]
Apply smooth modifier.
- Parameters:
mutates_obj (MeshObject)
iterations (int)
factor (float)
- procfunc.ops.modifier.solidify(mutates_obj, thickness=0.01, offset=-1.0, solidify_mode='EXTRUDE', use_even_offset=False, use_quality_normals=False, thickness_clamp=0.0, use_rim=True, use_rim_only=False, use_flip_normals=False, material_offset=0, material_offset_rim=0, nonmanifold_thickness_mode='CONSTRAINTS', nonmanifold_boundary_mode='NONE', nonmanifold_merge_threshold=0.0001)[source]
Apply solidify modifier.
- Parameters:
mutates_obj (MeshObject)
thickness (float)
offset (float)
solidify_mode (Literal['EXTRUDE', 'NON_MANIFOLD'])
use_even_offset (bool)
use_quality_normals (bool)
thickness_clamp (float)
use_rim (bool)
use_rim_only (bool)
use_flip_normals (bool)
material_offset (int)
material_offset_rim (int)
nonmanifold_thickness_mode (Literal['FIXED', 'EVEN', 'CONSTRAINTS'])
nonmanifold_boundary_mode (Literal['NONE', 'ROUND', 'FLAT'])
nonmanifold_merge_threshold (float)
- procfunc.ops.modifier.subdivide_surface(mutates_obj, levels=2, subdivision_type='CATMULL_CLARK', boundary_smooth='ALL', uv_smooth='PRESERVE_BOUNDARIES', use_creases=True, quality=3, _skip_apply=False)[source]
Apply subdivision surface modifier.
We disallow render_levels since this function is automatically executed & fully “applied”
- Parameters:
mutates_obj (MeshObject)
levels (int)
subdivision_type (Literal['CATMULL_CLARK', 'SIMPLE'])
boundary_smooth (Literal['PRE_CLIP', 'PRESERVE_CORNERS', 'ALL'])
uv_smooth (Literal['NONE', 'PRESERVE_CORNERS', 'PRESERVE_CORNERS_AND_JUNCTIONS', 'PRESERVE_CORNERS_AND_JUNCTIONS_3_POINTS', 'PRESERVE_BOUNDARIES', 'ALL'])
use_creases (bool)
quality (int)
_skip_apply (bool)
- procfunc.ops.modifier.triangulate(mutates_obj, quad_method='BEAUTY', ngon_method='BEAUTY', min_vertices=4)[source]
Apply triangulate modifier.
- Parameters:
mutates_obj (MeshObject)
quad_method (Literal['BEAUTY', 'FIXED', 'FIXED_ALTERNATIVE', 'SHORTEST_DIAGONAL', 'LONGEST_DIAGONAL'])
ngon_method (Literal['BEAUTY', 'CLIP'])
- procfunc.ops.modifier.weld(mutates_obj, merge_threshold=0.001, mode='ALL')[source]
Apply weld modifier.
- Parameters:
mutates_obj (MeshObject)
merge_threshold (float)
mode (Literal['ALL', 'CONNECTED'])
pf.ops.object
- procfunc.ops.object.set_transform(mutates_obj, location=None, rotation_euler=None, scale=None)[source]
- procfunc.ops.object.set_material(mutates_obj, material=None, surface=None, displacement=None, volume=None, selection=None)[source]
Assign a material to an object.
- Parameters:
mutates_obj (MeshObject) – Blender object to assign material to
material (Material | None) – Material to assign. If None, constructs one from surface/displacement/volume.
surface (ProcNode[Shader] | None) – Shader to assign to the surface.
displacement (ProcNode[Vector] | None) – Vector to assign to the displacement.
volume (ProcNode[Shader] | None) – Shader to assign to the volume.
selection (ndarray | None) – Boolean array with length equal to number of faces. If provided, assigns material only to selected faces.
- procfunc.ops.object.shade_flat(mutates_obj, keep_sharp_edges=True)[source]
Render faces of object with flat shading
Based on bpy.ops.object.shade_flat
- Parameters:
mutates_obj (MeshObject)
keep_sharp_edges (bool)
- Return type:
None
- procfunc.ops.object.joined(**objects)[source]
Copies the objects and creates a new object with them merged together
- Parameters:
objects (Object)
- Return type:
- procfunc.ops.object.join(mutates_obj_1, mutates_obj_2)[source]
Modifies mutates_obj_1 to point to a joined object of the two, without any copying.
mutates_obj_2 is invalidated. TODO: make it safely point to the joined object
- Parameters:
mutates_obj_1 (MeshObject)
mutates_obj_2 (MeshObject)
- Return type:
None
- procfunc.ops.object.duplicate(obj, linked=False, mode='TRANSLATION')[source]
Duplicate selected objects
Based on bpy.ops.object.duplicate
- procfunc.ops.object.shade_smooth(mutates_obj, keep_sharp_edges=True)[source]
Render faces of object with smooth shading
Based on bpy.ops.object.shade_smooth
- Parameters:
mutates_obj (MeshObject)
keep_sharp_edges (bool)
- Return type:
None
- procfunc.ops.object.curve_to_mesh(curve, merge_customdata=True)[source]
Convert curve to mesh
- Parameters:
curve (CurveObject)
merge_customdata (bool)
- Return type:
- procfunc.ops.object.mesh_to_curve(mesh)[source]
Convert mesh to curve
- Parameters:
mesh (MeshObject)
- Return type:
pf.ops.attr
- procfunc.ops.attr.get_attribute(obj, key, domain=None)[source]
Get attribute data from a Blender object.
- Parameters:
obj (MeshObject | CurveObject) – Blender object to read from
key (str) – Attribute name to read
domain (Literal['POINT', 'EDGE', 'FACE', 'CORNER'] | None) – Attribute domain - POINT, EDGE, FACE, or CORNER
- Returns:
numpy array of attribute data, or None if attribute doesn’t exist
- Return type:
ndarray | None
- procfunc.ops.attr.read_attribute(obj, key, domain=None)[source]
Read attribute data into a numpy array.
- Parameters:
obj (MeshObject | CurveObject) – Blender object (required if key is provided)
key (str) – Attribute name (required if obj is provided)
domain (Literal['POINT', 'EDGE', 'FACE', 'CORNER'] | None) – Attribute domain - POINT, EDGE, FACE, or CORNER. If None, allow any domain
attr – Blender attribute object (alternative to obj+key)
- Returns:
numpy array containing the attribute data
- Return type:
- procfunc.ops.attr.write_attribute(obj, data, key, domain, overwrite=False)[source]
Write numpy array data to a Blender object attribute.
- Parameters:
obj (MeshObject | CurveObject)
key (str)
domain (Literal['POINT', 'EDGE', 'FACE', 'CORNER'])
overwrite (bool)
- procfunc.ops.attr.vertex_positions(obj, global_coords=False)[source]
Read vertex positions from a Blender object.
- Parameters:
obj (MeshObject) – Blender mesh object
global_coords (bool) – If True, return global coordinates, otherwise return local coordinates
- Return type:
- procfunc.ops.attr.write_vertex_positions(obj, pos, global_coords=False)[source]
- Parameters:
obj (MeshObject)
pos (ndarray)
global_coords (bool)
- procfunc.ops.attr.edge_indices(obj)[source]
- Parameters:
obj (MeshObject)
- Return type:
- procfunc.ops.attr.polygon_centers(obj)[source]
- Parameters:
obj (MeshObject)
- Return type:
- procfunc.ops.attr.polygon_normals(obj)[source]
- Parameters:
obj (MeshObject)
- Return type:
- procfunc.ops.attr.polygon_areas(obj)[source]
- Parameters:
obj (MeshObject)
- Return type:
- procfunc.ops.attr.uv_coords(obj, layer=None)[source]
- Parameters:
obj (MeshObject)
layer (int | None)
- Return type:
- procfunc.ops.attr.write_uv_coords(obj, uv, layer=None)[source]
- Parameters:
obj (MeshObject)
uv (ndarray)
layer (int | None)
- procfunc.ops.attr.uv_coords_new(obj, name, do_init=True)[source]
- Parameters:
obj (MeshObject)
name (str)
do_init (bool)
- procfunc.ops.attr.bbox_corners(obj, global_coords=True)[source]
Get bounding box corners.
- Parameters:
- Returns:
Nx3 array of vertex positions. For global_coords=True, returns actual world-space vertex positions (tight bbox). For global_coords=False, returns the 8 local bound_box corners.
- Return type:
- procfunc.ops.attr.edge_lengths(obj)[source]
- Parameters:
obj (MeshObject)
- Return type:
- procfunc.ops.attr.edge_centers(obj)[source]
- Parameters:
obj (MeshObject)
- Return type:
- procfunc.ops.attr.edge_directions(obj)[source]
- Parameters:
obj (MeshObject)
- Return type:
- procfunc.ops.attr.loop_starts(obj)[source]
- Parameters:
obj (MeshObject)
- Return type:
- procfunc.ops.attr.loop_totals(obj)[source]
- Parameters:
obj (MeshObject)
- Return type:
- procfunc.ops.attr.loop_edge_indices(obj)[source]
- Parameters:
obj (MeshObject)
- Return type:
- procfunc.ops.attr.loop_vertex_indices(obj)[source]
- Parameters:
obj (MeshObject)
- Return type:
- procfunc.ops.attr.material_index(obj)[source]
- Parameters:
obj (MeshObject)
- Return type:
- procfunc.ops.attr.write_material_index(obj, index, face_mask=None)[source]
- Parameters:
obj (MeshObject)
index (int)
face_mask (ndarray | None)
- Return type:
None
pf.ops.curve
- procfunc.ops.curve.subdivide(mutates_obj, number_cuts=1)[source]
Subdivide selected segments
Based on bpy.ops.curve.subdivide
- Parameters:
mutates_obj (CurveObject)
number_cuts (int)
- Return type:
None
pf.ops.uv
- procfunc.ops.uv.cube_project(mutates_obj, vertex_mask=None, edge_mask=None, face_mask=None, uv_name='UVMap', cube_size=1.0, correct_aspect=True, clip_to_bounds=False, scale_to_bounds=False)[source]
Project the UV vertices of the mesh over the six faces of a cube
Based on bpy.ops.uv.cube_project
- Parameters:
vertex_mask (ndarray | None) – Boolean array selecting vertices to project.
edge_mask (ndarray | None) – Boolean array selecting edges to project.
face_mask (ndarray | None) – Boolean array selecting faces to project.
uv_name (str) – Name of the UV layer to create/replace.
mutates_obj (MeshObject)
cube_size (float)
correct_aspect (bool)
clip_to_bounds (bool)
scale_to_bounds (bool)
- Return type:
None
- procfunc.ops.uv.cylinder_project(mutates_obj, vertex_mask=None, edge_mask=None, face_mask=None, uv_name='UVMap', direction='VIEW_ON_EQUATOR', align='POLAR_ZX', pole='PINCH', seam=False, radius=1.0, correct_aspect=True, clip_to_bounds=False, scale_to_bounds=False)[source]
Project the UV vertices of the mesh over the curved wall of a cylinder
Based on bpy.ops.uv.cylinder_project
- Parameters:
vertex_mask (ndarray | None) – Boolean array selecting vertices to project.
edge_mask (ndarray | None) – Boolean array selecting edges to project.
face_mask (ndarray | None) – Boolean array selecting faces to project.
uv_name (str) – Name of the UV layer to create/replace.
mutates_obj (MeshObject)
direction (Literal['VIEW_ON_EQUATOR', 'VIEW_ON_POLES', 'ALIGN_TO_OBJECT'])
align (Literal['POLAR_ZX', 'POLAR_ZY'])
pole (Literal['PINCH', 'FAN'])
seam (bool)
radius (float)
correct_aspect (bool)
clip_to_bounds (bool)
scale_to_bounds (bool)
- Return type:
None
- procfunc.ops.uv.project_from_view(mutates_obj, vertex_mask=None, edge_mask=None, face_mask=None, uv_name='UVMap', orthographic=False, camera_bounds=True, correct_aspect=True, clip_to_bounds=False, scale_to_bounds=False)[source]
Project the UV vertices of the mesh as seen in current 3D view
Based on bpy.ops.uv.project_from_view
- Parameters:
vertex_mask (ndarray | None) – Boolean array selecting vertices to project.
edge_mask (ndarray | None) – Boolean array selecting edges to project.
face_mask (ndarray | None) – Boolean array selecting faces to project.
uv_name (str) – Name of the UV layer to create/replace.
mutates_obj (MeshObject)
orthographic (bool)
camera_bounds (bool)
correct_aspect (bool)
clip_to_bounds (bool)
scale_to_bounds (bool)
- Return type:
None
- procfunc.ops.uv.smart_project(mutates_obj, vertex_mask=None, edge_mask=None, face_mask=None, uv_name='UVMap', angle_limit=1.15192, margin_method='SCALED', rotate_method='AXIS_ALIGNED_Y', island_margin=0.0, area_weight=0.0, correct_aspect=True, scale_to_bounds=False)[source]
Projection unwraps the selected faces of mesh objects
Based on bpy.ops.uv.smart_project
- Parameters:
vertex_mask (ndarray | None) – Boolean array selecting vertices to project.
edge_mask (ndarray | None) – Boolean array selecting edges to project.
face_mask (ndarray | None) – Boolean array selecting faces to project.
uv_name (str) – Name of the UV layer to create/replace.
mutates_obj (MeshObject)
angle_limit (float)
margin_method (Literal['SCALED', 'ADD', 'FRACTION'])
rotate_method (Literal['AXIS_ALIGNED', 'AXIS_ALIGNED_X', 'AXIS_ALIGNED_Y'])
island_margin (float)
area_weight (float)
correct_aspect (bool)
scale_to_bounds (bool)
- Return type:
None
- procfunc.ops.uv.sphere_project(mutates_obj, vertex_mask=None, edge_mask=None, face_mask=None, uv_name='UVMap', direction='VIEW_ON_EQUATOR', align='POLAR_ZX', pole='PINCH', seam=False, correct_aspect=True, clip_to_bounds=False, scale_to_bounds=False)[source]
Project the UV vertices of the mesh over the curved surface of a sphere
Based on bpy.ops.uv.sphere_project
- Parameters:
vertex_mask (ndarray | None) – Boolean array selecting vertices to project.
edge_mask (ndarray | None) – Boolean array selecting edges to project.
face_mask (ndarray | None) – Boolean array selecting faces to project.
uv_name (str) – Name of the UV layer to create/replace.
mutates_obj (MeshObject)
direction (Literal['VIEW_ON_EQUATOR', 'VIEW_ON_POLES', 'ALIGN_TO_OBJECT'])
align (Literal['POLAR_ZX', 'POLAR_ZY'])
pole (Literal['PINCH', 'FAN'])
seam (bool)
correct_aspect (bool)
clip_to_bounds (bool)
scale_to_bounds (bool)
- Return type:
None
- procfunc.ops.uv.unwrap(mutates_obj, vertex_mask=None, edge_mask=None, face_mask=None, uv_name='UVMap', method='ANGLE_BASED', fill_holes=True, correct_aspect=True, use_subsurf_data=False, margin_method='SCALED', margin=0.001)[source]
Unwrap the mesh of the object being edited
Based on bpy.ops.uv.unwrap
- Parameters:
vertex_mask (ndarray | None) – Boolean array selecting vertices to unwrap.
edge_mask (ndarray | None) – Boolean array selecting edges to unwrap.
face_mask (ndarray | None) – Boolean array selecting faces to unwrap.
uv_name (str) – Name of the UV layer to create/replace.
mutates_obj (MeshObject)
method (Literal['ANGLE_BASED', 'CONFORMAL'])
fill_holes (bool)
correct_aspect (bool)
use_subsurf_data (bool)
margin_method (Literal['SCALED', 'ADD', 'FRACTION'])
margin (float)
- Return type:
None