Skip to main content
added 9 characters in body
Source Link
pink vertex
  • 9.9k
  • 1
  • 26
  • 45

I would suggest doing it with the GUI first and then examine the data structure.

I.e. added a driver to the Composite Node
GUI driver

The path is relative to node_tree.

So try to add the driver to node_tree with the given data path

import bpy

#right click on the socket value of the node -> Copy Data Path
path = 'nodes["Composite"].inputs[1].default_value'

scene = bpy.context.scene
scene.use_nodes = True
driver = scene.node_tree.driver_add(path)

Copy Data Path

I would suggest doing it with the GUI first and then examine the data structure.

I.e. added a driver to the Composite Node
GUI driver

The path is relative to node_tree.

So try to add the driver to node_tree with the given data path

import bpy

#right click on the socket value of the node -> Copy Data Path
path = 'nodes["Composite"].inputs[1].default_value'

scene = bpy.context.scene
scene.use_nodes = True
scene.node_tree.driver_add(path)

Copy Data Path

I would suggest doing it with the GUI first and then examine the data structure.

I.e. added a driver to the Composite Node
GUI driver

The path is relative to node_tree.

So try to add the driver to node_tree with the given data path

import bpy

#right click on the socket value of the node -> Copy Data Path
path = 'nodes["Composite"].inputs[1].default_value'

scene = bpy.context.scene
scene.use_nodes = True
driver = scene.node_tree.driver_add(path)

Copy Data Path

added 67 characters in body
Source Link
pink vertex
  • 9.9k
  • 1
  • 26
  • 45

I would suggest doing it with the GUI first and then examine the data structure.

I.e. added a driver to the Composite Node
GUI driver

The path is relative to node_tree.

So try to add the driver to node_tree with the given data path

import bpy

#right click on the socket value of the node -> Copy Data Path
path = 'nodes["Composite"].inputs[1].default_value'

scene = bpy.context.scene
scene.use_nodes = True
scene.node_tree.driver_add(path)

Copy Data Path

I would suggest doing it with the GUI first and then examine the data structure.

I.e. added a driver to the Composite Node
GUI driver

The path is relative to node_tree.

So try to add the driver to node_tree with the given data path

import bpy

#right click on the socket value of the node -> Copy Data Path
path = 'nodes["Composite"].inputs[1].default_value'

scene = bpy.context.scene
scene.use_nodes = True
scene.node_tree.driver_add(path)

I would suggest doing it with the GUI first and then examine the data structure.

I.e. added a driver to the Composite Node
GUI driver

The path is relative to node_tree.

So try to add the driver to node_tree with the given data path

import bpy

#right click on the socket value of the node -> Copy Data Path
path = 'nodes["Composite"].inputs[1].default_value'

scene = bpy.context.scene
scene.use_nodes = True
scene.node_tree.driver_add(path)

Copy Data Path

Source Link
pink vertex
  • 9.9k
  • 1
  • 26
  • 45

I would suggest doing it with the GUI first and then examine the data structure.

I.e. added a driver to the Composite Node
GUI driver

The path is relative to node_tree.

So try to add the driver to node_tree with the given data path

import bpy

#right click on the socket value of the node -> Copy Data Path
path = 'nodes["Composite"].inputs[1].default_value'

scene = bpy.context.scene
scene.use_nodes = True
scene.node_tree.driver_add(path)