I have noticed that Blender doesn't redraw changes in Cycles Node tree when they made with Custom Property via scripted Drivers. I need run animation to see changes in real-time, but it isn't handy always.

For example, Animation Nodes have such feature:

enter image description here

And it is very helpful.

I want to know is it possible to get something similar for Cycles Node Tree natively or with some addons/scripts?

Thank you for any tips and answers.

  • $\begingroup$ What should be the trigger of the execution? why don't we just use animation nodes? I don't know why people still uses drivers? Use AN. $\endgroup$ – Omar Emara Feb 3 '17 at 8:30
  • $\begingroup$ For example: link def temperatureI3(val): t = bpy.data.objects["Controller"]["Temperature"] colorNode = bpy.data.node_groups["Panel Texture"].nodes["ColorRamp.003"].color_ramp.elements[2].color result = (t-2)/16 print("colorNode is: " % colorNode) for x in range(0, len(colorNode)-1): if result >= 1: colorNode[x] = 1 else: colorNode[x] = 0 return result I like AN too, but not everything may be animated such way. May be I miss something. $\endgroup$ – M.O.Z.G Feb 3 '17 at 9:17
  • $\begingroup$ Hmmm, I encountered a problem like this before where we wanted to edit a node inside a node group but blender had some problem in the dependencies graph of nodes that limited that kind of actions. If it is up to me, I would find a way around the color ramp node and expose a value to the user. We can mimic the function of Color ramp nodes using math, What are you using it for? $\endgroup$ – Omar Emara Feb 3 '17 at 9:20
  • $\begingroup$ Another one thing is switchin textures via contionons with Math Nodes: link link I thinking about this problem more. May be it's unreachable, because Blender has problems with node groups. But I have tried to use new depsgraph, and it doesn't work for such cases. $\endgroup$ – M.O.Z.G Feb 3 '17 at 9:30
  • $\begingroup$ Omar, thanks for tip. Yes this one case could be realized with math node like as via color ramp. But in this case GSLS viewport texture does not update even when animation has started. $\endgroup$ – M.O.Z.G Feb 3 '17 at 9:40

After all I didn't find solution for Cycles Nodetree. I'm sure that such behavior is due NodeGroup and can't work in different way at the moment.

Like Omar Ahmad has advised before, I had rewrite some code and create new Subprogram inside Animation Node tree. When Auto Execution is enabled it allows to see all changes in viewport without active animation, in real-time, even those that are inside NodeGroups.

Be careful if your nodetree has a lot calculations this action can reduce your performance. Use another AN NodeTree for such things. I have attached example below:

enter image description here


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.