removed useless _ folders
This commit is contained in:
3
Clone_Prim/Clone_Prim.sol
Normal file
3
Clone_Prim/Clone_Prim.sol
Normal file
@@ -0,0 +1,3 @@
|
||||
<Solution name="Clone_Prim">
|
||||
<Project name="Clone_Prim" path="Clone_Prim\Clone_Prim.prj" active="true"/>
|
||||
</Solution>
|
||||
10
Clone_Prim/Clone_Prim/Clone_Prim.prj
Normal file
10
Clone_Prim/Clone_Prim/Clone_Prim.prj
Normal file
@@ -0,0 +1,10 @@
|
||||
<Project name="Clone_Prim" guid="D7EDFBDC-6C00-1014-B904-200204C60A89">
|
||||
<Object name="Object" guid="D7EDFCCF-6C00-1014-B904-200204C60A89">
|
||||
<Script name="Clone_Prim_1.lsl" guid="D7EE4D95-6C00-1014-B904-200204C60A89">
|
||||
</Script>
|
||||
<Script name="Clone_Prim_2.lsl" guid="D7EE6BEF-6C00-1014-B904-200204C60A89">
|
||||
</Script>
|
||||
<Script name="Clone_Prim_3.lsl" guid="D7EE88E5-6C00-1014-B904-200204C60A89">
|
||||
</Script>
|
||||
</Object>
|
||||
</Project>
|
||||
363
Clone_Prim/Clone_Prim/Object/Clone_Prim_1.lsl
Normal file
363
Clone_Prim/Clone_Prim/Object/Clone_Prim_1.lsl
Normal file
@@ -0,0 +1,363 @@
|
||||
// :CATEGORY:Building
|
||||
// :NAME:Clone_Prim
|
||||
// :AUTHOR:Clarknova Helvetic
|
||||
// :CREATED:2010-01-10 05:20:56.000
|
||||
// :EDITED:2013-09-18 15:38:50
|
||||
// :ID:183
|
||||
// :NUM:254
|
||||
// :REV:1.0
|
||||
// :WORLD:Second Life
|
||||
// :DESCRIPTION:
|
||||
// Clone_Prim
|
||||
// :CODE:
|
||||
///////////////////////////////////////////////////////////////////
|
||||
|
||||
//
|
||||
|
||||
// CLONE PRIMITIVE v 2.31
|
||||
|
||||
//
|
||||
|
||||
//
|
||||
|
||||
// This script chats out lines of text that can be pasted back
|
||||
|
||||
// into a blank script to clone the original prim.
|
||||
|
||||
//
|
||||
|
||||
// It also produces codeblocks optimized for automated transforms.
|
||||
|
||||
//
|
||||
|
||||
//
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
|
||||
//
|
||||
|
||||
// HOW TO USE
|
||||
|
||||
//
|
||||
|
||||
//
|
||||
|
||||
// Drag 'n Drop this script into the prim you want to copy.
|
||||
|
||||
//
|
||||
|
||||
// It will output a complete script for replicating the object
|
||||
|
||||
// in Owner-Only chat. Then it will delete itself.
|
||||
|
||||
//
|
||||
|
||||
// Copy and paste the chatted script into a *completly blank*
|
||||
|
||||
// new script
|
||||
|
||||
//
|
||||
|
||||
// Then use the Search/Replace function under the Edit menu
|
||||
|
||||
// to replace the "[HH:MM] :" line prefixes with a blank.
|
||||
|
||||
//
|
||||
|
||||
// Just hit the 'Replace All' button.
|
||||
|
||||
//
|
||||
|
||||
// It can take 2 minutes or more to print out, so you may have to
|
||||
|
||||
// do this a few times.
|
||||
|
||||
//
|
||||
|
||||
//
|
||||
|
||||
// The Primitve Paramaters will be chatted out in the oder that
|
||||
|
||||
// they're featured on the offical Wiki:
|
||||
|
||||
//
|
||||
|
||||
// http://wiki.secondlife.com/wiki/LlGetPrimitiveParams
|
||||
|
||||
//
|
||||
|
||||
///////////////////////////////////////////////////////////////////
|
||||
|
||||
//
|
||||
|
||||
// WHY?
|
||||
|
||||
//
|
||||
|
||||
// Chances are you're not going to need an end-to-end
|
||||
|
||||
// script to dupe your prim. Shift-drag copy is a lot easier.
|
||||
|
||||
//
|
||||
|
||||
// But if you're reading this you probably want some of the code,
|
||||
|
||||
// so carve out what you need from the output.
|
||||
|
||||
//
|
||||
|
||||
// The output code is also commented where appropriate. If you want
|
||||
|
||||
// To know more about what's going on, read the comments here and
|
||||
|
||||
// check out the wiki. The wiki's good.
|
||||
|
||||
//
|
||||
|
||||
// Many advanced items on the grid transform from one object to
|
||||
|
||||
// another. Builders have used scrips like this to generate the
|
||||
|
||||
// code that goes into those products.
|
||||
|
||||
//
|
||||
|
||||
// Consider the use of both of llSetPrimitiveParams([]) and
|
||||
|
||||
// llSetLinkPrimitiveParams([]). A multi-prim prim object can be
|
||||
|
||||
// metamorphed with a single scipt.
|
||||
|
||||
//
|
||||
|
||||
// In my experience you can pack five complete primitive trans-
|
||||
|
||||
// formations into one script before you run out of bytes.
|
||||
|
||||
//
|
||||
|
||||
///////////////////////////////////////////////////////////////////
|
||||
|
||||
//
|
||||
|
||||
// Released nder the terms of the
|
||||
|
||||
// GNU General Public Liscence v3
|
||||
|
||||
//
|
||||
|
||||
// This source code is free to use / modify / resell
|
||||
|
||||
// with the following restrictions:
|
||||
|
||||
//
|
||||
|
||||
// If you include any portion of -this- script in a product you
|
||||
|
||||
// distribute you must make the script fully mod/copy/trans for
|
||||
|
||||
// the next user/owner. You must also liscence it under the GPL
|
||||
|
||||
// and give attribution to the contributors.
|
||||
|
||||
//
|
||||
|
||||
// This does not extend to the code this script generates. That
|
||||
|
||||
// is yours to liscense as you see fit.
|
||||
|
||||
//
|
||||
|
||||
// No warantee expressed or implied.
|
||||
|
||||
//
|
||||
|
||||
// For more info see http://www.gnu.org/copyleft/gpl.html
|
||||
|
||||
//
|
||||
|
||||
///////////////////////////////////////////////////////////////////
|
||||
|
||||
//
|
||||
|
||||
// Written by
|
||||
|
||||
// Clarknova Helvetic [2008.01.04]
|
||||
|
||||
// w/ thanks to Bopete Yossarian
|
||||
|
||||
//
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/// Global Functions & Vars to make life easier
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
float pause = .1 ; //// Change this to change the delay between each printed line.
|
||||
|
||||
//// The laggier the server the more delay you'll need to
|
||||
|
||||
//// prevent line mix-up.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// Object-Specific parameters 2 string
|
||||
|
||||
string osp(integer p) {return llDumpList2String(llGetPrimitiveParams([p]),","); }
|
||||
|
||||
|
||||
|
||||
// Face-Specific parameters 2 string
|
||||
|
||||
string fsp(integer p, integer f) { return llDumpList2String(llGetPrimitiveParams([p,f]),","); }
|
||||
|
||||
|
||||
|
||||
// Parameter prefixed and formatted for output
|
||||
|
||||
string param(string p , integer q) { return p + "," + osp(q); }
|
||||
|
||||
|
||||
|
||||
// General owner chat w\ Sleep function to stop chat lag from screwing up the line order
|
||||
|
||||
say(string c) { llSleep(pause); llOwnerSay(c); }
|
||||
|
||||
|
||||
|
||||
// Printing out next element to add to the parameter list
|
||||
|
||||
sayn(string c) { say("\t" + c + " , "); }
|
||||
|
||||
|
||||
|
||||
// Printing out the last element to add to the parameter list
|
||||
|
||||
saynd(string c) { say("\t" + c + "\n\n\t];"); }
|
||||
|
||||
|
||||
|
||||
// Print out the code to apply the parameters to the object
|
||||
|
||||
define() { say("\tllSetPrimitiveParams(params);\n\tparams = [];"); }
|
||||
|
||||
|
||||
|
||||
// Handle to insert comments
|
||||
|
||||
comment(string c) { say("\n\t// " + c ); }
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/// On with the show...
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
default
|
||||
|
||||
{
|
||||
|
||||
state_entry()
|
||||
|
||||
{
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
say("COPY/PASTE THE CODE BELOW INTO A *BLANK* SCRIPT TO CLONE THIS PRIM: \n\n"); // Announce what we're doing
|
||||
|
||||
|
||||
|
||||
// We're going to change the object's name to a null string to make the output easier to read.
|
||||
|
||||
string object_name = llGetObjectName(); // Store the object's name so we can set it back when done
|
||||
|
||||
llSetObjectName("");
|
||||
|
||||
|
||||
|
||||
// Guess we should transfer the description too
|
||||
|
||||
string object_desc = llGetObjectDesc();
|
||||
|
||||
|
||||
|
||||
// Print the script header up to state_entry
|
||||
|
||||
say("\ndefault\n{\n\tstate_entry()\n\t{\n\tlist params;\n\t\n\n\t// If you are cutting code out to paste into custon functions\n\t// Define \"params\" as a global list and start cutting below this line.\n\n\tparams =");
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// Add some comments to the script
|
||||
|
||||
|
||||
|
||||
// [12:56] Tali Rosca: It uses the C-style thing about an assignment also being an expression with a value.
|
||||
|
||||
// [12:56] Tali Rosca: Why it actually saves memory still baffles my mind, though.
|
||||
|
||||
|
||||
|
||||
// list of the the first: paramater constants as strings, then thier integer value.
|
||||
|
||||
list Param_Names = ["PRIM_TYPE",PRIM_TYPE,"PRIM_MATERIAL",PRIM_MATERIAL,"PRIM_PHYSICS",PRIM_PHYSICS,"PRIM_TEMP_ON_REZ",PRIM_TEMP_ON_REZ,"PRIM_PHANTOM",PRIM_PHANTOM,"PRIM_POSITION",PRIM_POSITION,"PRIM_ROTATION",PRIM_ROTATION,"PRIM_SIZE",PRIM_SIZE];
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// ASIDE:
|
||||
|
||||
// Prim params are of two types: Object-Specific and Face-Specific.
|
||||
|
||||
//
|
||||
|
||||
// I'd Like to group them together according to type, but LsL doesn't
|
||||
|
||||
// nor does wiki.secondlife, and I am sworn to complete my destiny...
|
||||
|
||||
//
|
||||
|
||||
// This is probably for historical reasons (the param order, not my
|
||||
|
||||
// ultimate destiny).
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
integer i; // You're going to see a lot of use, integer i!
|
||||
|
||||
integer length; // So are you, integer length!
|
||||
|
||||
|
||||
|
||||
length = (llGetListLength(Param_Names)); // I'm way lazy. Let's make LsL do basic math for us.
|
||||
|
||||
|
||||
|
||||
for ( i = 0 ; i < length ; i = i +2) // This is may answer to list strides. Take that!
|
||||
122
Clone_Prim/Clone_Prim/Object/Clone_Prim_2.lsl
Normal file
122
Clone_Prim/Clone_Prim/Object/Clone_Prim_2.lsl
Normal file
@@ -0,0 +1,122 @@
|
||||
// :CATEGORY:Building
|
||||
// :NAME:Clone_Prim
|
||||
// :AUTHOR:Clarknova Helvetic
|
||||
// :CREATED:2010-01-10 05:20:56.000
|
||||
// :EDITED:2013-09-18 15:38:50
|
||||
// :ID:183
|
||||
// :NUM:255
|
||||
// :REV:1.0
|
||||
// :WORLD:Second Life
|
||||
// :DESCRIPTION:
|
||||
// Sample Output
|
||||
//
|
||||
// Here's an example of the output. This will make a shiny, metallic mobius strip.
|
||||
// :CODE:
|
||||
default
|
||||
|
||||
{
|
||||
|
||||
state_entry()
|
||||
|
||||
{
|
||||
|
||||
list params;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// If you are cutting code out to paste into custon functions
|
||||
|
||||
// Define "params" as a global list and start cutting below this line.
|
||||
|
||||
|
||||
|
||||
params =
|
||||
|
||||
|
||||
|
||||
[
|
||||
|
||||
PRIM_TYPE,4,0,<0.000000, 1.000000, 0.000000>,0.000000,<0.500000, -0.500000, 0.000000>,<0.250000, 0.050000, 0.000000>,<0.000000, -0.100000, 0.000000>,<0.000000, 1.000000, 0.000000>,<0.000000, 0.000000, 0.000000>,1.000000,0.000000,0.000000 ,
|
||||
|
||||
PRIM_MATERIAL,2 ,
|
||||
|
||||
PRIM_PHYSICS,0 ,
|
||||
|
||||
PRIM_TEMP_ON_REZ,0 ,
|
||||
|
||||
PRIM_PHANTOM,2 ,
|
||||
|
||||
// It's probably not a god idea to have your new prim jump to the old one
|
||||
|
||||
// PRIM_POSITION,<84.270088, 36.444294, 231.487076> ] + (params = []) +
|
||||
|
||||
PRIM_ROTATION,<-0.363768, 0.720439, 0.134244, 0.574995> ,
|
||||
|
||||
PRIM_SIZE,<1.072797, 1.206897, 1.072797>
|
||||
|
||||
];
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// Set all of the above paramaters as a group.
|
||||
|
||||
llSetPrimitiveParams(params);
|
||||
|
||||
params = [];
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// We are breaking the llSetPtimitiveParam([]) calls into blocks, because some params are incompatible with others
|
||||
|
||||
// during the same call. This is an LsL bug. See https://jira.secondlife.com/browse/SVC-38 for more info.
|
||||
|
||||
// Please vote to fix it.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// This prim has 3 faces.
|
||||
|
||||
|
||||
|
||||
params =
|
||||
|
||||
[
|
||||
|
||||
|
||||
|
||||
PRIM_TEXTURE,0,"5748decc-f629-461c-9a36-a35a221fe21f",<1.000000, 1.000000, 0.000000>,<0.000000, 0.000000, 0.000000>,0.000000 ,
|
||||
|
||||
PRIM_TEXTURE,1,"5748decc-f629-461c-9a36-a35a221fe21f",<1.000000, 1.000000, 0.000000>,<0.000000, 0.000000, 0.000000>,0.000000 ,
|
||||
|
||||
PRIM_TEXTURE,2,"5748decc-f629-461c-9a36-a35a221fe21f",<1.000000, 1.000000, 0.000000>,<0.000000, 0.000000, 0.000000>,0.000000
|
||||
|
||||
];
|
||||
|
||||
llSetPrimitiveParams(params);
|
||||
|
||||
params = [];
|
||||
|
||||
|
||||
|
||||
// Note that you -cannot- define textures and colors in the same call!
|
||||
|
||||
// If you're cutting out these params for your custom code watch out for this.
|
||||
|
||||
|
||||
|
||||
params =
|
||||
|
||||
[
|
||||
|
||||
|
||||
|
||||
PRIM_COLOR,0,<0.054902, 0.654902, 0.062745>,1.000000 ,
|
||||
|
||||
54
Clone_Prim/Clone_Prim/Object/Clone_Prim_3.lsl
Normal file
54
Clone_Prim/Clone_Prim/Object/Clone_Prim_3.lsl
Normal file
@@ -0,0 +1,54 @@
|
||||
// :CATEGORY:Building
|
||||
// :NAME:Clone_Prim
|
||||
// :AUTHOR:Clarknova Helvetic
|
||||
// :CREATED:2010-01-10 05:20:56.000
|
||||
// :EDITED:2013-09-18 15:38:50
|
||||
// :ID:183
|
||||
// :NUM:256
|
||||
// :REV:1.0
|
||||
// :WORLD:Second Life
|
||||
// :DESCRIPTION:
|
||||
// Tips & Ideas
|
||||
//
|
||||
// Warning: Bad chat lag will sometimes re-order your code for you. Increase the pause variable at the top of the script and try again. If that fails reduce your draw distance, move to a different sim and wait for SL to stop sucking.
|
||||
//
|
||||
// Tip: Comment out the PRIM_SIZE in the output script and drop it in a megaprim after you've built your scale model.
|
||||
//
|
||||
// Tip: Supports sculpties.
|
||||
//
|
||||
// Tip: One neat thing you can do is have your prim cycle between objects. Just take the entire codeblock in state_entry() and stick it in a custom function thus:
|
||||
// :CODE:
|
||||
shape_1()
|
||||
|
||||
{
|
||||
|
||||
// Clone Prim codeblock
|
||||
|
||||
}
|
||||
|
||||
shape_2()
|
||||
|
||||
{
|
||||
|
||||
// Clone Prim codeblock
|
||||
|
||||
}
|
||||
|
||||
shape_3()
|
||||
|
||||
{
|
||||
|
||||
// Clone Prim codeblock
|
||||
|
||||
}
|
||||
|
||||
shape_4()
|
||||
|
||||
{
|
||||
|
||||
// Clone Prim codeblock
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user