User posts bjk
12 December 2016 22:32
I think it's because of the old SDK version. File has been changed.
The latest version has the lines (from 1911)
                if "entryp" in self:
row.prop_search(self.variables_names["vd"], "variable",
self.id_data.nodes[self["entryp"]], 'variables', text=_('Var. name'))

In 'your' version you 'll find (from 1882)
                if "entryp" in self:
row.prop_search(self, "param_var_dest",
self.id_data.nodes[self["entryp"]], 'variables', text=_('Var. name'))

So in the script you can change line 26
regstore.variables_names['vd'].variable = "R2" 

regstore. param_var_dest = ”R2”
After line 26 you will certainly get more errors like this. Open the logic_node_tree files of both versions to find out what you have to change, or just download the latest SDK version
09 December 2016 21:45
Hi Sunnix,
It's all in the Blender file. Look at the attached blend file, run the script and browse the NodeTree to see the result.

For Blender Scripting tutorials take a look at
18 June 2016 12:42
With the logic node Move Camera the straight path can go through the target object. Which doesn't look so nice. Is it possible to create a checkbox for a path around the target? With interpolation of angles and distance?
15 June 2016 15:11
Are there any plans for a feature like this:

In combination with a moving section plane (with canvas texture) I think it could be useful for scientific visualization.
12 May 2016 19:26

Thank you very much!

12 May 2016 17:34
I have (#9455).
12 May 2016 15:43
Hmm. What am I doing wrong? Even when the node is already added manually I can't add a new socket with Python. Could there be other factors then just the code?
09 May 2016 23:03
Thank you Konstantin.
As far as I understand in my code it should be like
bpy.ops.node.b4w_logic_add_dyn_jump_sock('INVOKE_DEFAULT', node_tree="B4WLogicNodeTree", node="sw_select", sock="id1")
or something but it doesn't give the result I want.
An alternative way is starting with a switch_select node with many empty sockets (manually), but this is not really satisfying. What do you think?
05 May 2016 15:55
Thank you Konstantin!

After searching I was able to create a small tree (as a start):

import bpy

scene = bpy.context.scene

scene.render.engine = 'BLEND4WEB'
scene.b4w_use_logic_editor = True
bpy.ops.node.new_node_tree(type='B4WLogicNodeTreeType', name="B4WLogicNodeTree")
scene.b4w_active_logic_node_tree = "B4WLogicNodeTree"

ntree =['B4WLogicNodeTree']

e_point ='B4W_logic_node')
e_point.type = 'ENTRYPOINT'

regstore ='B4W_logic_node')
regstore.type = 'REGSTORE'
regstore.floats['inp1'].float = 2 [s]regstore.param_number1 = 1[/s]
regstore.location = 160, 100

sw_select ='B4W_logic_node')
sw_select.type = 'SWITCH_SELECT'
sw_select.location = 400, 100

move_to ='B4W_logic_node')
move_to.type = 'MOVE_TO'
move_to.location = 650, 100

reroute1 ="NodeReroute")
reroute1.location = 600, -100

reroute2 ="NodeReroute")
reroute2.location = 380, -100[0], regstore.inputs[0])[0], sw_select.inputs[0])[0], move_to.inputs[0])[2], reroute1.inputs[0])[0], reroute2.inputs[0])[0], sw_select.inputs[0])

This is okay, I believe, but how do I select an object (the default cube) in Switch_Select and how do I add a new socket?

By the way, I watched the conference video. Congratulations!
29 April 2016 23:43
Video shows how to add and link Cycle nodes in Blender by using Python. Unfortunately I can't figure out how to do this for B4W logic nodes. Could somebody give me an example?