Is there a way to use a for loop in a button?
I want to duplicate an object N number of times with hscript, and I don't want to have to create a HDA just for that so I am trying in the callback script for the button:
for i=1 to 10 opcp ./myNode_1 ./myNode_$i end
This works in the texport but not in the callback, any tips?
Thanks.
Use a for loop hscript in a button
2270 3 0- mzigaib
- Member
- 948 posts
- Joined: April 2008
- Offline
- mzigaib
- Member
- 948 posts
- Joined: April 2008
- Offline
- edward
- Member
- 7723 posts
- Joined: July 2005
- Offline
- mzigaib
- Member
- 948 posts
- Joined: April 2008
- Offline
Maybe if I can use a for loop in a single line which I don't know since I don't know phyton and just use hscript for everything, hscript was able to give me what I needed so far.
The way I got around the issue using hscript was to write the script into a file and run it through a callback script which worked.
Even thou it would be nice to know if there's a way to do this for loop in a single line inside a callback script.
The way I got around the issue using hscript was to write the script into a file and run it through a callback script which worked.
Even thou it would be nice to know if there's a way to do this for loop in a single line inside a callback script.
-
- Quick Links