PDA

View Full Version : Copy objects in an array to another array


Johannes
04-28-2005, 12:06 PM
Hi,
hope it is not a very dumb question, but I'm trying to copy objets that are in one array to another.

In fieldLine there are 34 Objects. I want to copy them and then transfer them to another location. Do I have to add them all to the scene or is there an easier way e.g.


fieldLine=TorusEllipse1+TorusEllipse2+TorusEllipse 3
fieldLine2=fieldLine[:]

for fieldL in fieldLine2:
fieldL.rotate(0,0,1,135)

Johannes

farshizzo
04-28-2005, 01:53 PM
Hi,

Are you talking about copying Vizard objects or just copying Python objects from one array to another? If you are talking about copying Python objects then the code you posted should work. Let me know if I misunderstood your question.

Johannes
04-28-2005, 06:05 PM
Did a workaround by typing a lot of code (will improve it later with objects).

I tried it with vizard objects (toruses used for field lines), but I guess I have to do it with objects then I will be fine, so no need to answer this question if I have problems I will write again.


I moved small segments in the path of an ellipse. Unfortunately vizard only painted one side of the ellipse with color (red) the other side stayed dark. Could this be a problem with culling?

Johannes

farshizzo
04-29-2005, 02:37 PM
Try disabling lighting on the object. It should be the same color on both sides, however there will be no shading on the object though.