maya.utils.converter.codegen_tik¶
Code generation utilities for tik.maya output.
This module handles the generation of valid Python code that uses tik.maya from converted maya.cmds AST representations.
Functions¶
|
Format a node creation call. |
|
Format a Plug.connect() call. |
|
Format a Plug.get() call. |
|
Format a Plug.set() call. |
|
Format a resolve() call to wrap a node name. |
|
Format a >> connection expression. |
|
Generate a header comment for converted tik.maya code. |
|
Generate the standard tik.maya import statement. |
Module Contents¶
- format_node_create(type_name: str, **kwargs) str¶
Format a node creation call.
- Args:
type_name: The tik.maya type name (e.g., ‘Transform’). **kwargs: Keyword arguments for the create() call.
- Returns:
Formatted create() call.
- format_plug_connect(src_node: str, src_attr: str, dst_node: str, dst_attr: str) str¶
Format a Plug.connect() call.
- Args:
src_node: Source node expression. src_attr: Source attribute name. dst_node: Destination node expression. dst_attr: Destination attribute name.
- Returns:
Formatted connect() call.
- format_plug_get(node_expr: str, attr_name: str) str¶
Format a Plug.get() call.
- Args:
node_expr: Expression for the node. attr_name: Attribute name.
- Returns:
Formatted get() call.
- format_plug_set(node_expr: str, attr_name: str, value: str) str¶
Format a Plug.set() call.
- Args:
node_expr: Expression for the node. attr_name: Attribute name. value: Value expression.
- Returns:
Formatted set() call.
- format_resolve_call(node_name: str) str¶
Format a resolve() call to wrap a node name.
- Args:
node_name: The node name string.
- Returns:
Formatted resolve() call.
- format_rshift_connect(src_node: str, src_attr: str, dst_node: str, dst_attr: str) str¶
Format a >> connection expression.
- Args:
src_node: Source node expression. src_attr: Source attribute name. dst_node: Destination node expression. dst_attr: Destination attribute name.
- Returns:
Formatted >> connection.
- generate_tik_header_comment(original_info: str | None = None, warnings: List[str] | None = None) str¶
Generate a header comment for converted tik.maya code.
- Args:
original_info: Information about the original source. warnings: List of warnings to include.
- Returns:
Header comment string.
- generate_tik_import() str¶
Generate the standard tik.maya import statement.
- Returns:
Import statement string.