MCPcopy Create free account
hub / github.com/openai/point-e / node_op

Function node_op

point_e/evals/scripts/blender_script.py:300–310  ·  view source on GitHub ↗
(op: str, *args, clamp=False)

Source from the content-addressed store, hash-verified

298
299 # Helpers to perform math on links and constants.
300 def node_op(op: str, *args, clamp=False):
301 node = tree.nodes.new(type="CompositorNodeMath")
302 node.operation = op
303 if clamp:
304 node.use_clamp = True
305 for i, arg in enumerate(args):
306 if isinstance(arg, (int, float)):
307 node.inputs[i].default_value = arg
308 else:
309 links.new(arg, node.inputs[i])
310 return node.outputs[0]
311
312 def node_clamp(x, maximum=1.0):
313 return node_op("MINIMUM", x, maximum)

Callers 2

node_clampFunction · 0.85
node_mulFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected