though with the codes i have searched in google , it still doesn't solve the problem, i want to enable one specific composite node like this :

enter image description here

and this is the inactive state:

enter image description here

From inactive state to active state , there is only such script indicated in Google

scene = bpy.context.scene
compositing_node_tree = scene.node_tree
compositing_node_tree.nodes['os_composite'].select = True

But it just functions select node rather than enable node :

enter image description here

How can i enable this specific composite node in python? Thanks if you have any ideas!

  • $\begingroup$ What do you mean by "enabling the node"? $\endgroup$ – Noob Cat Feb 27 '20 at 2:59
  • $\begingroup$ @Pastrokkio after render , Blender will automatically composite the image using the enabled composite node $\endgroup$ – Super-ilad Feb 27 '20 at 4:00
  • $\begingroup$ Just to be sure, you've tried with bpy.context.scene.use_nodes = True ? $\endgroup$ – Noob Cat Feb 27 '20 at 4:03
  • $\begingroup$ @Pastrokkio yes $\endgroup$ – Super-ilad Feb 27 '20 at 5:39

Set active node

Similarly to Set active image node with python

In the python console

C = bpy.context
D = bpy.data

>>> node = C.scene.node_tree.nodes['Composite']
>>> node.select = True
>>> C.scene.node_tree.nodes.active = node
  • $\begingroup$ Sorry , it doesn't count , set it to active start is still left "select state" rather than active state ,only difference is this time it is white border rather than red bother (which shows in question part image) around that node. $\endgroup$ – Super-ilad Feb 28 '20 at 1:12
  • $\begingroup$ The active state should be a red bar in the top of node rather than red or white border around node, you can refer that in my question image. $\endgroup$ – Super-ilad Feb 28 '20 at 1:14
  • $\begingroup$ Besides , could you please explain what is "C" in your code demo?Thanks $\endgroup$ – Super-ilad Feb 28 '20 at 1:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.