Questions and discussion for this lecture live here. Fire away by hitting Reply below ![]()
Hi Sean,
I don’t understand output of excute 1 (as picture), why I can’t use streaming as denote 2. Actually, I don’t understand how Set Property node working. Can you explain more? Thank you vert much!
Hey @Phu_Nguyen, you can think of the connections between execute sockets as defining the order of operations - these connections literally govern the order that the code executes in. So, in this case, we must first invert the Boolean to update the Serpens property (structure_object_visibility).
Once this is done, we pass out from the Set Property node and move on to the Run Script node. If you connect straight from the execute socket of the the Operator node directly to the execute of the Run Script, you will never pass through the Set Property and update the boolean. And you can’t connect to both (Set Property and Run Script) simultaneously because you can’t split the flow of execution.
I hope that answers your question - feel free to follow up.
Seán
In the python script you type:
if object_name:
obj = bpy.data.object.get(object_name)
Should this not be:
if object_name:
obj = bpy.data.objects.get(object_name)
Hey Peter,
Good to hear from you again.
Yes - great catch!
The line should read:
obj = bpy.data.objects.get(object_name)
As you suggest. I guess we never hit this bug because we always end up passing in a direct reference to an object.
Thanks for posting.
S
