PDA

View Full Version : Trying to make a modeler script



3DGFXStudios
01-28-2009, 01:02 PM
Hi script guys. I'm trying to make some kind of modeler plugin but I'm stuck on something stupid. So I thought I post my script thing here. Can someone tell me what I'm doing wrong? It seems that I can't communicate to the mesh? I tried a lot but I'm just stuck now. I cleaned it up a bit so check it out....:D

I added the script as a .rar

:stumped:

Myagi
01-28-2009, 02:35 PM
not sure what exactly you are after, but this should at least rotate the mesh



main
{

cho = 1;
ch[1] = " X ";
ch[2] = " Y ";
ch[3] = " Z ";

// requester code goes here

reqbegin("<3DGFX On the Move>");
reqsize(250,250);

txt1 = ctltext("","\Written By 3DGFX 28-01-2009");
ctlposition(txt1,45,100,50,15);

deg = ctlinteger("Rotate deg",45);
ctlposition(deg,20,20,132,15);

cx = ctlchoice("Axis",cho,ch);
ctlposition(cx,53,50,100,15);

if(reqpost())
{
val = getvalue(deg);
ax = getvalue(cx);
}
else
{
return;
}

reqend();

// processing code goes here
rotate(65, X, <0,0,0>);
}

xchrisx
01-29-2009, 10:16 AM
Myagi has it right. You were using [ ] when the syntax requires < > brackets for a vector (the center point).

also if you use:

rotate(val,X,<0,0,0>);

it will take the value from your requester.

3DGFXStudios
01-30-2009, 11:40 AM
Thanks guys!!! I've wasted a lot of oure's because of these stupid brackets. hehe
Thanks again!!!