I'm trying to make neural network in Blender nodes, and I'm currently stuck on getting the entire NodeTree to update after manually changing an input value.

value wont trigger update but link will

Is it at all possible to manually update the entire tree without pulling on a socket/updating a link?

  • 1
    $\begingroup$ Hey cool project. Any way to get more info about that? $\endgroup$ – Teck-freak Nov 28 '17 at 11:06
  • $\begingroup$ @Teck-freak I gave up on using Blender and started writing my own node-based language in C++ (github.com/LAK132/NetworkMaker). That said, the Blender version was nearly functional and I could upload it to GitHub if there is any interest in it $\endgroup$ – LAK132 Nov 29 '17 at 2:55
  • $\begingroup$ There is. Definitly. :-) And thanks for the link, I'll check it out. $\endgroup$ – Teck-freak Dec 2 '17 at 1:36
  • $\begingroup$ @Teck-freak github.com/LAK132/BPy-NN $\endgroup$ – LAK132 Jan 14 '18 at 12:19

Looks like I forgot to add the update parameter in the custom property:

#Custom properties are basically a struct, you can have any number of built in (bpy) datatypes defined here:
weight= FloatProperty(default = 1.0) #no update triggered
value = FloatProperty(default = 1.0, update=uda) #update triggered

Additionally the node socket needed to have it's update callback initialised

def init(self, context):
    self.inputs.new("SynapseSocket", "Value 1").callback(self.name, "uda")

For anyone else that manages to stumble across this problem, see my previous question as well: Alternative update callback for PointerProperty?


Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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