JustAnotherGuy
01-22-2013, 03:12 AM
Hi, we're doing pymel for my uni course, i've only started last week so I'm still very new to it and need a little help (so please keep it simple lol, also skip past the pic to cut to the chase)
Basically, I've done a script which will randomly generate a city like object which will let the user pick some values (size, subdivs etc), then randomly generates the rest (didn't mean it to be a city, but it just kinda ended up looking a little like one)
There is one value which is randomly set, which will either give a lot of simple square buildings at the lower end, and a lot of larger more unusual shaped buildings when it's a lot higher, unfortunately it's just a single variable so it applies to the entire object no matter how detailed it is
Here's an example of it anyway, I think the value is about 3/4 from the highest it could be
http://i50.tinypic.com/106dcw1.jpg
Anyway, I would like to add in something which will run the code for a number of frames, so a new object would be generated just for each frame, but so it'll only appear in that one frame, and then delete/hide itself afterwards
Any help would be appreciated, the whole script is contained in a function so I just need the last bit doing now :)
Here's my half finished failed attempt -
for i in range( 1, 2 ):
pm.currentTime( i, edit = True)
createObject( smooth, oneLayer, twoLayers, threeLayers, fourLayers, pl_subdivs, pl_size, pl_subdivsize, vertDeleteChance)
Cheers :)
Basically, I've done a script which will randomly generate a city like object which will let the user pick some values (size, subdivs etc), then randomly generates the rest (didn't mean it to be a city, but it just kinda ended up looking a little like one)
There is one value which is randomly set, which will either give a lot of simple square buildings at the lower end, and a lot of larger more unusual shaped buildings when it's a lot higher, unfortunately it's just a single variable so it applies to the entire object no matter how detailed it is
Here's an example of it anyway, I think the value is about 3/4 from the highest it could be
http://i50.tinypic.com/106dcw1.jpg
Anyway, I would like to add in something which will run the code for a number of frames, so a new object would be generated just for each frame, but so it'll only appear in that one frame, and then delete/hide itself afterwards
Any help would be appreciated, the whole script is contained in a function so I just need the last bit doing now :)
Here's my half finished failed attempt -
for i in range( 1, 2 ):
pm.currentTime( i, edit = True)
createObject( smooth, oneLayer, twoLayers, threeLayers, fourLayers, pl_subdivs, pl_size, pl_subdivsize, vertDeleteChance)
Cheers :)
