Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Discussion: Universal Permissions Suite

Jeffrey Gomez
Join date: 11 Jun 2004
Posts: 3,522
03-29-2005 09:18
Yep, it's me again with another stage of my long scripting project. Ever since the prim mirror caused some dissent regarding making it easy for people to "copy" others' work, I decided it might be a good idea to put out a free solution to the problem. Before I get to that though, let me recap on where I am now:

Milestone 1: 3D Model Importer
Status: Completed!

Milestone 2: BVH-to-Prim Importer
Status: Completed!

Milestone 3: Prim Tools -

Part 1: Prim Mirror
Status: Completed; Rez Code Currently Withheld

Part 2: Touch-to-Face
Status: Completed!

Part 3: Universal Permissions Suite
Status: Open Beta

Milestone 4: External Prim Support
Status: Not yet started
ETA: Several Months from now, depending on if I Actually do it!

Part 4 is still a long ways off, but I'm getting there.


This script is designed for No Modify objects. The idea is to build in modification features that content creators can use on their objects, without the threat that John H. CopyBody can come along, copy someone else's prim setup, and happily resell it. Wild West indeed.

With this, you can be reasonably sure that the end-user has a huge margin of control over what their version of the object looks like, without the fear of losing credit for your work. Because No Modify prevents changes in links, hides the orientation of child objects, yet allows scripts to change features within the object itself, all one really needs is a scripted solution to the problem. This is that solution.

Some statistics:
- No static listeners (listeners are started once the user touches a prim
- Two scripts/prim/object - with the ability to remove them when done
- Dialog-based editing, to prevent users from redundantly using the same property (laggy)
- Undo queue that holds up to three entries
- Modifiable design allows for creators to "pick and choose" the permissions they want with a single list

To use, simply place these scripts into every prim of an object (not the Prim Copy script). Then, simply click any prim but the root (unless edited) to start up the script! I strongly advise that advanced users add llSetRemoteScriptAccessPin(#); to state_entry - this will make it easier to add new scripts or versions if any problems with this one are found, and since the number is held confidential and No Modify prevents external scripts, anyway, your stuff is safe.

When touched, you should see a dialog pop up that has the following options:

- Position: Change the position of a prim or the entire set
- Rotation: Change the rotation of a prim or the entire set
- Scale: Change the scale of a prim or the entire set
- Material: Change a prim's material type (some work for SL v1.6+ only!)
- Color: Change a prim face color
- Alpha: Change a prim face alpha
- Texture: Change a prim's texture options
- Bumpiness: Change the bumpmap of a prim face
- Shine: Change the shininess for a prim face
- Copy a Prim: Copy Mode (does NOT work with root unless edited)
- Undo Last: Undo last operation
- Remove Edit: Remove these scripts from selected prims

Certain Dialogs may also have additional options, including:

- Input a Position: Input a position directly
- Input a Rotation: Input a rotation directly
- Input a Scale: Input a Scale directly
- Copy a Prim: Select a prim to copy by dragging the "Prim Copy" script into the desired prim. Note that contents will NOT be copied!

- Select a Prim: Select the desired prim for an operation
- Example: Root Prim, This Prim, All Prims, All Others

- Select a Face: Select the desired face for an operation
- Example: 0, All Faces

- Select a Material: Select the desired material
- Example: Wood, Stone, Light
- More...: More options are available

- Select a Color: Select the desired color
- Example: Blue
- Advanced...: Input a value directly

- Select a Texture: Select the desired texture option
- Tex: Default: Select the SL Default Texture
- Tex: Blank: Select the SL Blank Texture
- Tex: This: Use this selected texture for entire prim or set
- Tex: Key: Input a texture key directly
- Offset: Input texture offset directly
- Rotation: Input texture rotation directly
- Scale: Input texture scale directly

- Select a Bumpmap: Select the desired bump option
- Example: Wood, Tile, Stucco

- Select a Shine: Select amount of desired shininess
- Example: None, Low, Medium, High

- Confirmation Dialog: Occasionally you will be asked to confirm an option. Select "Yes" or "No" in these cases


"Prim Copy" feature enabled. Please IM me if you have any concerns or trouble with abusers of this script, and I'll show you how to put them to rest.

Shamelessly creating repeat business? Me? Naaahhhhh.... :D
Aestival Cohen
half pint half drunk up
Join date: 2 Sep 2004
Posts: 311
03-30-2005 13:42
Wow! Amazing! I like it I think.. but I'm kinda dumb and was never able to figure out the mirror stuff either so can I ask a few pro'lly obvious questions?

1) This script allows you to sell stuff "No Mod" but still have the customer change the bits you want to let them change?

2) You select what the customer is allowed to change by editing the lists that looks like:
["Position","Rotation","Scale","Material","Color","Alpha","Texture","Bumpiness","Shine","Copy a Prim","Undo Last","Remove Edit"]

So if you only wanted folks to change colors and shine you'd say something like:
["Color","Shine","Undo Last","Remove Edit"]

3) If you only want some of the prims in an object to be editable do you still need to have the scripts in every prim (with empty lists) or just put the scripts in the prims you wanna be changeable

4) How about if I have two parts of an object? Say a bag with handles one color and a body a different color? Can I let the customer change the two independently? They don't have to click on every prim do they?

5) Can I limit the list of choices a user has, like only "very shiny" and "medium shiny", but it's gotta be *some* level of shiny not matte. Or say only a limited set of colors instead of every color?

Thanks so much, if this does what I think it does it sounds great!!! ^_^
=^.^= =^.^= =^.^= =^.^= =^.^= =^.^= =^.^= =^.^= =^.^= =^.^=
Luverly FLICKR photos!
=^.^= =^.^= =^.^= =^.^= =^.^= =^.^= =^.^= =^.^= =^.^= =^.^=
Jeffrey Gomez
Join date: 11 Jun 2004
Posts: 3,522
03-30-2005 14:46
In very simple terms: Depending on how much you want to muck around with the script, you can pretty much get it to do whatever you'd like. :D


1) Yep. This will allow you to offer customizability in No Modify objects without the fear of having people steal stuff.

2) Yep. That's the list you want to edit.

3) This depends on the features you want. Commonly, though, you'll want the "handler" script in every part of the object, and the "suite," or main script, in objects you want the user to be able to interact with. Depending on how you mix and match the scripts and options, you can get some pretty unique results.

For example, let's say you want to allow users to edit textures on a few prims in the set. You would only need the "handler" in those prims, and the main script in the ones you wish for the user to touch.

However, if you want to allow the user to uniformly resize the ENTIRE set, you would need the handler in each and every prim.

Note that the "Prim Copy" feature is actually in the main script. Since it's limited to the prim it's in only, it shouldn't be a problem either. Since the other script needed for that will be released in a few days to a week, not much to worry about there.

So to recap, the main script (permissionsuite) handles the dialogs and the copy feature, whereas the child script (handler) does all of the actual work.

4) The script allows the user to select the prims a feature will be applied to. The default options are "Root Prim," "This Prim," "All Prims," and "All Others."

For editing colors and such individually, there's still the possibility someone might need to do each one separately, but it's still an option. Plus, when I release the copy feature you can basically have them look however you'd like with two clicks and a drag-and-drop. :)

5) You can. It's of note, however, that while the mode you're in is authenticated, individual options like "Shiny > High" are not.

You can fix this by editing both the handler and the main script. Simply remove the options you don't like from the dialogs in the main script, and if you're still concerned, the options in the handler. They should be easy to find.

As for the modes themselves ("Texture," Color," etc), out of the box they're pretty iron-clad. When a listener is started in the object, it starts on a random channel anywhere from 10 to 10000 or so, owner only, and each "permission" is checked against the option list. Pretty difficult to cheat.
Oblique Arbuckle
Registered User
Join date: 17 Nov 2003
Posts: 18
03-30-2005 17:25
Great addition to your ever-growing toolset, Jeffrey.

With all of these wonderful import/copy/customization tools, now we just need to get the community to come up with a prim export tool. This will finally close the loop, allowing for existing SL-created objects to be exported and modified using commercial modeling tools, and eliminate the long-talked-about "what if SL goes out of business" issue related to people losing their creations. It'd also be great for avoiding potential Linden-related data loss / inventory corruption problems, allowing people to make off-site backups of their objects.

After the Prim Mirror rez code is released, I may take a crack at this as providing some sort of email / XML-RPC export facility shouldn't be overly complicated

Thanks again, Jeffrey!
Strife Onizuka
Join date: 3 Mar 2004
Posts: 5,887
03-31-2005 16:20
i found a typo in a comment :D

else if(mode_name == "Scale") // Here>
ScaleMode(); // Yep.

should be

else if(mode_name == "Scale") // Here?
ScaleMode(); // Yep.

everything else looks good
i'm liable to write my own clone of your feature set, make it a little more abstract.
Truth is a river that is always splitting up into arms that reunite. Islanded between the arms, the inhabitants argue for a lifetime as to which is the main river.
- Cyril Connolly

Without the political will to find common ground, the continual friction of tactic and counter tactic, only creates suspicion and hatred and vengeance, and perpetuates the cycle of violence.
- James Nachtwey
Jeffrey Gomez
Join date: 11 Jun 2004
Posts: 3,522
03-31-2005 16:27
Hmph. Evil. I expected to be slammed for calling the "Disk" prim texture "Disc" as well, since I prefer the dated spelling for textures.

Comment nazis of the world, unite! :D
Juro Kothari
Like a dog on a bone
Join date: 4 Sep 2003
Posts: 4,418
04-23-2005 18:17

Could this be used by one of my customers to edit an object they buy from me?
Rose Portocarrero
Here to look cute
Join date: 23 May 2004
Posts: 168
04-23-2005 18:39
Yes Jeffrey, could you comment on this thread?


The poster appears to have already "broken" your script to do just what you have been assuring others it wouldn't do. As someone, like juro that sells objects as Mod/Copy/No Transfer, I would be a tad upset to see our weeks and months of hard work being reproduced, especially now that objects can be sold with the land.

Thank you,

Rose Portocarrero
Co-Owner, Dominion Custom Homes
Jeffrey Gomez
Join date: 11 Jun 2004
Posts: 3,522
04-23-2005 18:54

Thank you for mentioning that. I was unaware of it as I've been out for the better part of the day and am, frankly, exhausted. I've added my followup to that thread.
2fast4u Nabob
Join date: 28 Dec 2005
Posts: 542
Does anyone have a copy of this script?
10-26-2006 21:10
I was looking for this script to see if it suits my need for a product I am working on.

Does anyone have a copy of this script or do you know where I can get it?