Hey guys, i have a list of WS coordinates that I collected from a plane's vertex positions.
Now lets say I also have a list of objects ( cubes for now), what i want to do is assign them cooridnates in my list to the cubes XYZ translate.

You can see here the cube variable is actually a unicode list of two nodes, the first being the actual transform node and the second being the polycube node. So the zero index at the end of the polycube command I had is only grabbing the transform node of the cube because that is the first in the list. The reason being that you wanted to edit the transformations of the cube not its actual properties.

So for your code I'm not sure how MakeRectengularTower() works but if you want to move it once you have created it you will want to return a transfrom node for the tower out of that function so that you can then position it. Right now it does not appear to be returning anything so that's the reason it says "# Error: 'NoneType' object is unsubscriptable".

Thanks man it defo helped me, i managed to figure out how to return their values. Incase anyone else got the same problem, i just had to add this to the end of my function
buildinglist = [] # empty list
buildingslist.append(buildingname[0]) # adding new buildings to list

print ", ".join(buildingname) # thi is just a print so i know its building the towers
print "Completed, Loading rest of the structures..."
return buildingslist # returns the buildings after it built them

Many thanks for your help again.
Also just a quick question, do you know what the code is so i can see what my script is doing?
someone shown me before in class but i cant remember. i think its something to do with setting the viewport refresh time it was like one line of code

Follow Us On:

The CGSociety

The CGSociety is the most respected and accessible global organization for creative digital artists. The CGS supports artists at every level by offering a range of services to connect, inform, educate and promote digital artists worldwide. More about us on TheArtSociety.com