Command-line interface
procfunc
usage: procfunc [-h] {transpile} ...
Positional Arguments
- command
Possible choices: transpile
Sub-commands
transpile
Transpile a Blender file to procfunc Python code.
procfunc transpile [-h] [--materials MATERIALS [MATERIALS ...]]
[--objects OBJECTS [OBJECTS ...]]
[--node_trees NODE_TREES [NODE_TREES ...]]
[--output OUTPUT]
[--transforms {colors_to_hsv_definition,infer_distribution_hypercube,infer_nodegroup_distributions,extract_materials} [{colors_to_hsv_definition,infer_distribution_hypercube,infer_nodegroup_distributions,extract_materials} ...]]
[--object_mode {monkey,active,named}]
[--no_version_comments] [-d] [--add_line_comments]
[--include_object_materials {0,1}]
input
Positional Arguments
- input
Path to the input .blend file to transpile.
Named Arguments
- --materials
Names (or ‘prefix*’ globs) of materials in the blend to transpile.
Default:
[]- --objects
Names (or ‘prefix*’ globs) of objects to transpile. Pass the literal ‘ACTIVE’ to use the blend’s currently active object.
Default:
[]- --node_trees
Names (or ‘prefix*’ globs) of node groups to transpile.
Default:
[]- --output
Output destination: a .py path to write to, ‘print’ to print to stdout, or omit to discard.
- --transforms
Possible choices: colors_to_hsv_definition, infer_distribution_hypercube, infer_nodegroup_distributions, extract_materials
Optional graph transforms to apply before codegen. See the CLI docs page for what each maps to.
Default:
[]- --object_mode
Possible choices: monkey, active, named
How transpiled object code obtains its starting mesh. ‘monkey’: start from pf.ops.primitives.mesh_monkey() (Suzanne placeholder). ‘active’: start from bpy.context.active_object at runtime. ‘named’: start from bpy.data.objects[<name>] using the source object’s name.
Default:
'monkey'- --no_version_comments
Omit the procfunc-version header comment from generated code.
Default:
False- -d, --debug
Enable debug logging.
Default:
20- --add_line_comments
Annotate generated code with comments tracing back to source nodes.
Default:
False- --include_object_materials
Possible choices: 0, 1
Whether to emit set_material calls in transpiled object code (default: 1).
Default:
1
--transforms choices
Each --transforms choice wraps a function from procfunc.transforms:
colors_to_hsv_definition—procfunc.transforms.colors_to_hsv_definition()infer_distribution_hypercube—procfunc.transforms.infer_distribution_hypercube()infer_nodegroup_distributions—procfunc.transforms.infer_nodegroup_distributions()extract_materials—procfunc.transforms.extract_materials_from_graphs()