WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

 
 
Thread Tools Rating: Thread Rating: 9 votes, 5.00 average. Display Modes
Prev Previous Post   Next Post Next
  #2  
Old 10-25-2009, 05:30 AM
IGoudt IGoudt is offline
Member
 
Join Date: Sep 2009
Posts: 20
I would do the following using a list, so that path1 is on index 0 and path n on index n-1

Code:
pathlist = list()

for curNumber in range(maxNumberOfPaths) :

     path = viz.add(viz.ANIMATION_PATH) 
     path.speed(1)
     path.loop(viz.CIRCULAR)
     pathlist.append(path)
The way to concatenate strings in Python is:

'text' + str(otherArgs)',

so 'path' + str(1) would become 'path1'

If you are unsure about the ability of the otherArgs to be casted correctly, you can wrap a try/catch around it.

If you want to call elements in a container by their name, you can use a dictionary.
Reply With Quote
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
smoothing a cubic bezier path just alex Vizard 10 04-22-2009 01:07 PM
2D or 3D array help? durf Vizard 1 02-20-2009 10:57 AM
Problems with interaction of vizact.turn and animation path Enlil Vizard 3 11-24-2008 04:23 PM
speed on animation path whj Vizard 8 11-17-2008 07:41 PM
Copy objects in an array to another array Johannes Vizard 3 04-29-2005 02:37 PM


All times are GMT -7. The time now is 08:44 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
Copyright 2002-2023 WorldViz LLC