Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

How to Script a Sculpty

Amariah Francis
Registered User
Join date: 20 Dec 2006
Posts: 33
08-04-2008 21:57
I am unable to run the newest SL client on my computer, but I need to be able to set a stitching type which isn't available on 1.19 . Can I do this with a script? And how would I go about it?

Ama
Ivanova Shostakovich
Fire Resistant
Join date: 1 Oct 2007
Posts: 98
A script to set your sculpt
08-05-2008 00:11
Hi Amariah.

I wasn't aware that any viewer gave you the ability to directly set the sculpt type. I wrote a script that sets the sculpt type you want and can use the UUID of the sculpt map of your choice.


// This is a simple script for setting a sculpted prim if you
// need to set a sculpt type other than sphere and allows you to
// also enter a UUID for the sculpt map if you wish.
// After setting your sculpt, this script can be removed if you wish.


default
{
state_entry()
{
llOwnerSay("Click me to make me your sculpt.";);
}

touch_start(integer total_number)
{
// In this next statement, replace NULL_KEY with the UUID of your desired sculpt map.
// The integer after NULL_KEY is the sculpt type.
// Set this to 1 for sphere, 2 for torus, 3 for plane and 4 for cylinder
llSetPrimitiveParams([PRIM_TYPE, PRIM_TYPE_SCULPT, NULL_KEY, 1]);
}
}
DrDoug Pennell
e-mail is for old people
Join date: 13 Mar 2007
Posts: 112
08-05-2008 09:20
From: Ivanova Shostakovich
Hi Amariah.

I wasn't aware that any viewer gave you the ability to directly set the sculpt type.


As of 1.20.15 it is in the edit window.

Doug
Domino Marama
Domino Designs
Join date: 22 Sep 2006
Posts: 1,126
08-05-2008 16:47
If you are using Blender, there's an option to export the textures and a script to recreate the sculptie inworld. Support for multi sculptie builds is almost finished, but I'm just having a little break from scripting sculpties (see my homepage for what I am working on ;) )

http://dominodesigns.info/second_life/blender_scripts_export_prims.html
Amariah Francis
Registered User
Join date: 20 Dec 2006
Posts: 33
08-05-2008 18:34
Thank you Domino, without your current scripts I wouldn't have gotten as far as I am now!

:)
Amariah Francis
Registered User
Join date: 20 Dec 2006
Posts: 33
08-05-2008 18:36
Wow the new script looks awesome!
Domino Marama
Domino Designs
Join date: 22 Sep 2006
Posts: 1,126
08-06-2008 02:50
From: Amariah Francis
Wow the new script looks awesome!


:)

I had a look at setting up the avatar meshes from the .ac files from Zee Pixel /109/e8/272169/1.html

After doing a few morph shapes on the skirt mesh and looking at how much needed doing for a full avatar, I decided a scripted solution was better. So I started work on the import avatar script which reads the installed SL data directly. Currently I've only got as far as the armature which is what the pictures on my site show. I'm expecting to make fairly quick progress and will post updates on my site as it goes along.

Did "Export as LSL" help with your sculptie script problem?
Shaindaman Fiertze
Registered User
Join date: 17 Jul 2008
Posts: 13
08-09-2008 15:17
Hmmm I tried to export it from Blender but the files aren't created in the directory . . .

I can get the tga by going to Render>bake Second Life Sculpties, but the export for some reason doesn't do anything . . . the folder I pointed Blender to is just empty.
Amariah Francis
Registered User
Join date: 20 Dec 2006
Posts: 33
08-09-2008 15:45
Yes that is what happens when I try to export, an empty folder and no files. So I tried using Ivanova' script and having trouble there too.

I rez a block, create a new script in the contents of this block, paste Ivanova's script inside. I upload my sculptie texture/map. Then finding the texture map I 'copy UUID' and then go back to the script of the block. I then replace NULL_KEY with the UUID and then replace the 1 at the end with a 3 because it is a plane. Then click 'save,' I then get this error: (18, 52) :ERROR : Syntax error

I get out of building mode and try clicking the block to see if it works even with the syntax error, nope nothing happens . . .

What am I doing wrong?
Domino Marama
Domino Designs
Join date: 22 Sep 2006
Posts: 1,126
08-09-2008 16:58
Are there any messages on the Blender Console after trying the Export LSL fails?
Amariah Francis
Registered User
Join date: 20 Dec 2006
Posts: 33
08-09-2008 18:06
No nothing happens, I click on the 'export button' it seemingly saves it but when I navigate to the folder nothing is in it.

I did find a script here that I was able to use, works perfectly:
http://wiki.secondlife.com/wiki/PRIM_TYPE_SCULPT

But I would love to get the export working from Blender! That would be very helpful, especially with the 'painted' texture

Here are my specs:
iMac PowerPC
Running Mac OSX 10.3.9
Blender 2.46
Scripts, I got the scripts by following Gaia's tutorials, so it's the link from her blog.

It could be my OS that is causing the problems. I will be upgrading my system here in the next month or so. But I've got tons of files to back up before I do this, so that means purchasing an external drive to backup to, and purchasing the latest OS. . . but anything to get SL to run correctly I hate missing out on the new SL client and I've needed to upgrade for awhile now anyway.
Ivanova Shostakovich
Fire Resistant
Join date: 1 Oct 2007
Posts: 98
08-10-2008 19:19
Amariah, be sure when you paste in your sculpt map UUID that it is in quotations. That might be causing your syntax error.
Amariah Francis
Registered User
Join date: 20 Dec 2006
Posts: 33
08-10-2008 19:48
That was probably it, I didn't have the quotations. Thanks!
Ama