|
ph0b0z Paine
Registered User
Join date: 14 Jul 2008
Posts: 4
|
07-14-2008 10:35
I take part in a course in University where we try to import general 3d-models (represented in xml files) into different target systems, one of it is Second Life.
We want to generate the lsl script automatically.. and the target is to build something like a bumblebee from one starting-prim with less ui-interaction as possible.
So.. to rez 4 or 5 prims i need to have them in the starting-prim's inventory if i understood right.
Is there a possibility to copy a prim in my inventory via script and put it into the 1st-prims inventory.. or to rez multiple instances of the same object in my inventory (while giving them different scripts)?
I'd be really happy if anyone could help!
So far ph0
|
|
Cheree Bury
ChereeMotion Owner
Join date: 6 Jun 2007
Posts: 666
|
07-14-2008 11:55
You could conceivably create any number of prims from one prim inside the starting prim since multiples can be rezzed, altered, ,positioned, rotated, and linked (with permission.) There are scripts out there that do some of this stuff on a limited scale (e.g. LoopRez.)
I can imagine you will run into problems if any of those new prims require an embedded script, but those things could be worked around.
You would also need a plan for applying textures: either have them in the starting prim, the embedded prim, or use their UUID.
I would also think it would be easier to read and write data that would create the various prims, rather than have it generate a script, but that is apparently not what you want to do. If you have it write the script, the user will have to generate the script and then compile it.
This sounds very interesting, I hope we get more people responding to this one.
|
|
ph0b0z Paine
Registered User
Join date: 14 Jul 2008
Posts: 4
|
07-14-2008 12:53
Hmm okay, how could i practically rez one prim (eg. a cube) multiple times (via script!) ?
|
|
Lee Ponzu
What Would Steve Do?
Join date: 28 Jun 2006
Posts: 1,770
|
Let me see if I understand...
07-14-2008 13:13
You want us to do your home work?
_____________________
So many monkeys, so little Shakespeare.
|
|
ph0b0z Paine
Registered User
Join date: 14 Jul 2008
Posts: 4
|
07-14-2008 14:48
No.. my "Homework" will be a program in QT which parses the xml file and writes the lsl script automatically  I just need a few lines of code or some hints how i can do that.. i'm totally unexperienced in lsl and couldn't find any real solutions the last 2-3 days. so i would really appreciate your help 
|
|
Qie Niangao
Coin-operated
Join date: 24 May 2006
Posts: 7,138
|
07-14-2008 15:11
I'd suggest taking a look at a couple of scripts in the Library: The "BVH-to-Prim Importer" /15/da/37403/1.htmland the "Prim Mirror Script" /15/9a/38165/1.html, both by Jeffrey Gomez. (Also, just in passing: whenever automated code generation seems like the right solution, one should think harder about the problem.)
_____________________
Archived for Your Protection
|
|
ph0b0z Paine
Registered User
Join date: 14 Jul 2008
Posts: 4
|
07-14-2008 15:21
Ah.. i just found out that i can use llrezobject() multiple times on the same object.. i'm a little slow sometimes. now i can start tomorrow finding out the rest. So am i right that i have to use 2 prims minimum to do what i want? (one that rezzes the others from it's inventory) and thanks for the hints, i will look that up tomorrow too. and the automatic code generation.. it's just a thing that our professor wants us to do.. not a real philosophy behind that  good night
|
|
Hewee Zetkin
Registered User
Join date: 20 Jul 2006
Posts: 2,702
|
07-15-2008 13:55
From: ph0b0z Paine So am i right that i have to use 2 prims minimum to do what i want? (one that rezzes the others from it's inventory) and thanks for the hints, i will look that up tomorrow too. Correct. And the script in the rezzed prim needs to be smart enough to shape, position, color/texture, etc., the prim differently given different context (e.g. a different starting position, different start parameter passed to llRezObject() or llRezAtRoot(), different instructions conveyed through chat, etc.).
|