pf.transforms
Members
- procfunc.transforms.coerce_shaders_to_materialresult(_call_node, subgraph)[source]
- Parameters:
_call_node (Node)
subgraph (ComputeGraph)
- Return type:
- procfunc.transforms.eliminate_duplicate_result_types(graphs, uses_threshold=1)[source]
- Parameters:
graphs (list[ComputeGraph])
uses_threshold (int)
- Return type:
- procfunc.transforms.eliminate_duplicate_subgraphs(graphs)[source]
- Parameters:
graphs (list[ComputeGraph])
- Return type:
- procfunc.transforms.extract_shader_vectors_as_inputs(graph, extract_funcs=None)[source]
Pull out shader vectors as inputs to the graph instead
- Parameters:
graph (ComputeGraph)
- procfunc.transforms.fill_graph_defaults_with_call_node(call_node, graph)[source]
- Parameters:
call_node (SubgraphCallNode)
graph (ComputeGraph)
- Return type:
- procfunc.transforms.remove_v1_name_from_graph(_call_node, graph)[source]
- Parameters:
_call_node (Node)
graph (ComputeGraph)
- Return type:
- procfunc.transforms.replace_ids(graph, ids, val)[source]
Pull out hardcoded arguments to be inputs to the graph instead
- Parameters:
graph (ComputeGraph) – The graph to extract constants from
extract_mask – A mask of which args to extract. The key is a tuple of the parent node id and the arg name.
val (Any)
- procfunc.transforms.colors_to_hsv_definition(graph)[source]
- Parameters:
graph (ComputeGraph)
- Return type:
- procfunc.transforms.distribution_to_mode(compute_graph, graph_name=None)[source]
Transform a generator to use the mode of the distribution instead of random samples
- Parameters:
compute_graph (ComputeGraph)
graph_name (str | None)
- Return type:
- procfunc.transforms.outlier_distribution(compute_graph, pct=0.05, graph_name=None, normal_clip_std=3.0)[source]
Transform a generator to generate outliers with a given probability
- Parameters:
compute_graph (ComputeGraph)
pct (float)
graph_name (str | None)
normal_clip_std (float)
- Return type:
- procfunc.transforms.infer_distribution_hypercube(graphs, memo=None)[source]
- Parameters:
graphs (list[ComputeGraph])
- Return type:
- procfunc.transforms.infer_nodegroup_distributions(graphs, supported_types=(float, int, tuple, t.Vector, t.Color, np.ndarray), colors_to_hsv=True, use_randint=False)[source]
Find all multi-use subgraphs within the graphs, and compute the hypercube distribution for all the numeric parameters ever used with each subgraph
- Parameters:
- Return type:
- procfunc.transforms.extract_parameter_distributions(compute_graph)[source]
- Parameters:
compute_graph (ComputeGraph)
- Return type:
- procfunc.transforms.map_graph_list(func)[source]
- Parameters:
func (Callable[[ComputeGraph], ComputeGraph])
- Return type:
Callable[[list[ComputeGraph]], list[ComputeGraph]]
- procfunc.transforms.map_subgraphs(func)[source]
- Parameters:
func (Callable[[Node, ComputeGraph], ComputeGraph])
- Return type:
Callable[[list[ComputeGraph]], list[ComputeGraph]]