Changeset View
Changeset View
Standalone View
Standalone View
amaranth/node_editor/templates/vectorblur.py
| Context not available. | |||||
| bpy.ops.node.select_all(action="DESELECT") | bpy.ops.node.select_all(action="DESELECT") | ||||
| act_node = tree.nodes.active | act_node = tree.nodes.active | ||||
| rlayer = act_node.scene.render.layers[act_node.layer] | #rlayer = act_node.scene.render.layers[act_node.layer] | ||||
| if not rlayer.use_pass_vector: | #if not rlayer.use_pass_vector: | ||||
| rlayer.use_pass_vector = True | #rlayer.use_pass_vector = True | ||||
| vblur = tree.nodes.new(type="CompositorNodeVecBlur") | vblur = tree.nodes.new(type="CompositorNodeVecBlur") | ||||
| vblur.use_curved = True | vblur.use_curved = True | ||||
| vblur.factor = 0.5 | vblur.factor = 0.5 | ||||
| tree.links.new(act_node.outputs["Image"], vblur.inputs["Image"]) | tree.links.new(act_node.outputs["Image"], vblur.inputs["Image"]) | ||||
| tree.links.new(act_node.outputs["Z"], vblur.inputs["Z"]) | tree.links.new(act_node.outputs["Depth"], vblur.inputs["Z"]) | ||||
| tree.links.new(act_node.outputs["Speed"], vblur.inputs["Speed"]) | tree.links.new(act_node.outputs["Vector"], vblur.inputs["Speed"]) | ||||
| if tree.nodes.active: | if tree.nodes.active: | ||||
| vblur.location = tree.nodes.active.location | vblur.location = tree.nodes.active.location | ||||
| Context not available. | |||||