PDA

View Full Version : Need some help with lscript



lwuser3d
03-28-2008, 06:18 AM
Hello,

i have found this lscript.

//-----------------------------------------||
// Null_It 1.00 ||
// By Patrik 'TeNgu' Westlin ||
// Copyright Solid Illusions 2002 ||
// Thanks goto Bob Hood, ||
// The people at the Lscript Mailing list. ||
// And last but not least Ernie Wright ||
// Please visit ||
// www.solidillusions.com for ||
// updates and new usefull tools and toys. ||
//-----------------------------------------||

@version 2.2
@warnings
@script generic

generic
{
obj = Scene().firstSelect();
pc = obj.polyCount();
for(x = 1; x <= pc; x++)
{
v = obj.position(obj.poly[x]);
NULLNAME = "NULL_" + x;

if(x <= 99)
{
NULLNAME = "NULL_0" + x;
}

if(x <= 9)
{
NULLNAME = "NULL_00" + x;
}

AddNull(NULLNAME);
SelectByName(NULLNAME);
Position(v.x,v.y,v.z);
}
}


But whenn i use it, layout will crash.can some help.

cya

evenflcw
03-28-2008, 06:59 AM
Don't modify a script and then say it doesn't work. You're dragging Tengus name in your mud.

As the soup nazy might have said:
- No help for you!

(You got helped over at spinquad anyways)

lwuser3d
03-28-2008, 07:19 AM
hello,

sorry when i have done somthing wrong.It can because my system.Thats very low.

cya

dpont
03-28-2008, 07:43 AM
I think this lscript is corrupted or just a theorical odd lscript,
since some functions don't exist, like polyCount(), should be
polygonCount() or poly[x] array, should polygons[x], but
what it's strange to use it here, what "Null'it" lscript is
intented to be? Since polygons will return 2 values,
min & max of the poly boundingbox? If you want rather
put a NULL for each vertex (point) you could use this:

@version 2.2
@warnings
@script generic

generic
{
obj = Scene().firstSelect();
pc = obj.pointCount();

for(x = 1; x <= pc; x++)
{
v = obj.position(obj.points[x]);
NULLNAME = "NULL_" + x;

if(x <= 99)
{
NULLNAME = "NULL_0" + x;
}

if(x <= 9)
{
NULLNAME = "NULL_00" + x;
}

AddNull(NULLNAME);
SelectByName(NULLNAME);
Position(v.x,v.y,v.z);
CreateKey(0);
}
}

//Denis.

lwuser3d
03-28-2008, 08:36 AM
hy

1...excuse me very much
2. i have post the wrong.
3. it was beacause my system.I have take a other.

4..it work now very fine ;O)

titane357
03-29-2008, 06:38 AM
Thanks denis to show us such clean and "simple" scripts.
If you have more....
Very interresting for learning. :D

Do Lscript can acces in 9.5 to lighting, surfacing,... ?