Turning blinds: Populate Array inputs per Python script?

Hello there. I made a node setup to turn blinds. However, as i failed to use constraints because they are not supported yet, i do it (not very elegantly) per loop array. But blinds tend to have lots of blades and each blade needs an input. It is probably possible to populate them automatically from a text file with an object list. Can somebody help with the variable names to set?



simpleturnblinds.blend (1.2 MB)

Also, there seems to be a tiny bug somewhere. As you can see in the blend file, the lowest blade turns somewhat faster than the others. That was gone after i re-populated the input list. I am visualizing architecture and have lots of windows (on Linux of course…). Any ideas?

Hi

A better way to do this is to have each blind in a new collection. Then create a node trait to just rotate the object and apply this trait to all blades. This can be done by using he copy traits to selected objects option in blender. (Bledner Viewport -> Object -> Copy traits from active object)

Then, you can send an event to objects in a particular collection and the blades will rotate.

Here I made a small example to show how its done. Use keys 1, 2, 3 and 4 to open and close window blinds of two different windows.

blinds roatation.blend (1.2 MB)

2 Likes

Wooah! Perfect solution and lightning fast answer. Thank you so much. You are faster than Adrien Brody was in “Predators” :smile:

1 Like

Remark for me and other newbies trying to append this from the blend: Make sure you have applied each of the two nodes at least once to an object under Armory traits else it will not work at all. I assigned the so called “WindowManager” node to one of the blades, cause assigning it to the Scene collection did not work. Origin for the blades has to be their center of mass, else they are moving in an unexpected way.