CompuServe Thread

#creating an array

10 messages in this thread
#163152From: Tim c BrananApr 5, 1995 10:10 PM
I just got the script extensions yesterday, and I have been looking through the manual and have a few questions: 1) Is there a way to select an object and create a specific number of copies (like create/array does) 2) Is it real difficult to create a menu that would allow me to select objects by wild card and tag them? I have a script that uses the PickObjects menu, but this is only useful for picking all objects or a few dozen. Is something like this around somewhere I can grab it from? I cringe at the thought of doing it myself.
#163241From: Martin Doudoroff/KUBApr 6, 1995 8:58 AM
Tim– >> I just got the script extensions yesterday << Great! I hope you enjoy the product! >> 1) Is there a way to select an object and create a specific number of copies (like create/array does) << Absolutely. If you're looking for a specific function which does this per se, you won't find it, but a combination of functions and a loop or two should work fine. I'll write up a little run-down on the process and post it here shortly. (Caveat: some oddness has been reported regarding TSE's ability to read the vertex list in the Keyframer, so the solution may be a little more elaborate than one would prefer.) For my better understanding, what exactly do you want to do (that the Snapshot feature doesn't do or is inadequate for)? >> 2) Is it real difficult to create a menu that would allow me to select objects by wild card and tag them? I have a script that uses the PickObjects menu, but this is only useful for picking all objects or a few dozen. Is something like this around somewhere I can grab it from? I cringe at the thought of doing it myself. << No it isn't difficult, but you cannot rely on the canned object selectors (ChooseNode or PickObjects) for the task. I think there's a more sophisticated object selector which someone wrote that is floating around here… I'll see if I can dig it up. (Such an object selector is a perfect example of "reusable code" which could be dropped into any script as needed.) Martin
#163299From: Tim c BrananApr 6, 1995 1:32 PM
>>one would prefer.) For my better understanding, what exactly do you want to do (that the Snapshot feature doesn't do or is inadequate for)?<< Well, I have a script that Jonas helped me out on that reads a point file of xyz coordinates, then places a selected object on that point. Since the script doesn't create the objects itself, I have to make copies of the object to place. So far, I have been doing this by running an array on the object to make enough copies of it. I would rather have the script do this, since it is time consuming to sit there and create thousands of copes when I could automate this.
#163489From: Martin Doudoroff/KUBApr 7, 1995 11:39 AM
>> I have a script that Jonas helped me out on that reads a point file of xyz coordinates, then places a selected object on that point. Since the script doesn't create the objects itself, I have to make copies of the object to place. So far, I have been doing this by running an array on the object to make enough copies of it. I would rather have the script do this, since it is time consuming to sit there and create thousands of copes when I could automate this. << I see. (I misinterpreted your earlier post.) How about: ———– Source$ = "Object":' Set this string to the name of the source object Copies = 100 :' Set this value to the number of duplicates you want For count = 0 to Copies Copy Source$, Source$+STR$(count) Next count ———– -Martin
#163314From: Tim c BrananApr 6, 1995 2:43 PM
Oh yea, another thing I wanted to ask, is it possible to create a script that will attach objects together until it hits the face limit, then start a new object, etc. and so on? I have noticed that if I have too many seperate objects in my scene, it bogs down the system and I keep getting pauses moving from window to window, or selecting from the menus. I figure if I can attach my trees together to form 5 or 6 objects instead of 10,000, it might not be such a drag. It also takes forever to redraw, as well. I figure this can be done, somehow. One thing to be aware of when I ask about these things is my comprehension of this stuff is poor and my skill at anything above basic math isn't much better. I tend to picture myself as a monkey trying to comprehend quantum mechanics. Just thought I'd warn you…
#163490From: Martin Doudoroff/KUBApr 7, 1995 11:39 AM
>> Oh yea, another thing I wanted to ask, is it possible to create a script that will attach objects together until it hits the face limit, then start a new object, etc. and so on? << Of course. To do this, you need to systematically load geometry (or create it) in structures within TSE and then parcel it out to 3D Studio in 64000 face chunks. >> I have noticed that if I have too many seperate objects in my scene, it bogs down the system and I keep getting pauses moving from window to window, or selecting from the menus. I figure if I can attach my trees together to form 5 or 6 objects instead of 10,000, it might not be such a drag. It also takes forever to redraw, as well. << Welcome to 3D computer graphics. <g> >> One thing to be aware of when I ask about these things is my comprehension of this stuff is poor and my skill at anything above basic math isn't much better. I tend to picture myself as a monkey trying to comprehend quantum mechanics. << I know this feeling. I know it well. Lots of chin scratching and Tylenol. Practice is the best remedy. If you are feeling all thumbs with scripting, I HIGHLY recommend you pick up the "Release 4 Supplement to 3D STUDIO Applied" by Nancy Fulton from Advanstar Communications. It's a short book, it's cheap ($15), and it will make you comfortable with scripting in no time flat. Martin
#163547From: Tim c BrananApr 7, 1995 3:37 PM
Thanks for the handy info. It helps very much. No doubt I will be annoying you further next week. >>Of course. To do this, you need to systematically load geometry (or create it) in structures within TSE and then parcel it out to 3D Studio in 64000 face chunks.<< Could you elaborate on this a little? Thanks again.
#164645From: Tim c BrananApr 13, 1995 6:12 PM
>>No it isn't difficult, but you cannot rely on the canned object selectors (ChooseNode or PickObjects) for the task. I think there's a more sophisticated object selector which someone wrote that is floating around here… I'll see if I can dig it up. (Such an object selector is a perfect example of "reusable code" which could be dropped into any script as needed.)<< I don't suppose you have made any progress in digging this up? I don't mean to be a pest, but my own attempts at this were spectacularly unsucsessful, and I could really use it right now.
#164654From: Larry MintonApr 13, 1995 7:42 PM
Look for SELECT.ZIP in the libs. LAM
#164663From: Tim c BrananApr 13, 1995 8:29 PM
>>Look for SELECT.ZIP in the libs.<< I will check it out. Thanks.