PDA

View Full Version : Scene Editor help



noiseboy
09-15-2004, 10:52 AM
Is it possible to add a deformation plugin to multiple objects within the scene editor. specifically in my case Impact3. There seems to be an awful lot you can do except add plugins or am I missing something

Colin

faulknermano
09-16-2004, 06:13 AM
generic
{
s = Scene.getSelect();
for(i=1;i<=s.size();i++)
{
SelectItem(s[i].id);
CommandInput("ApplyServer DisplacementHandler Impact3");
}
}


you'd have to find out what name impact3 is registered in lw. look at your lwext cfg file for that.

noiseboy
09-16-2004, 12:12 PM
Thank you faulknermano I shall try that approach. I just thought it would be an obvious thing to be able to do in the scene editor.

gaetan
09-16-2004, 01:38 PM
faulknermano

Do you explain how a use the code please! :confused:


Thank's

faulknermano
09-16-2004, 04:14 PM
faulknermano

Do you explain how a use the code please! :confused:


Thank's

copy paste the text into notepad (or wordpad), save it out with and .ls extension. run layout. add this .ls file as a plugin. the script will be registered in layout by the same name. the script will be registered as a generic plugin, which means it will be available in the edit menu or the edit keys panels where you can assign it a hotkey or place it in your menu to execute.

gaetan
09-20-2004, 07:21 AM
I change only this line:
CommandInput("ApplyServer DisplacementHandler LW_NormalDisplacement")


but the script doesn't work! :confused:

Line 3, invalid objet method getSelect[]

faulknermano
09-20-2004, 07:23 AM
sorry! wrong syntax with the first code.. changed it:



generic
{
s = Scene().getSelect();
for(i=1;i<=s.size();i++)
{
SelectItem(s[i].id);
CommandInput("ApplyServer DisplacementHandler LW_NormalDisplacement");
}
}

gaetan
09-20-2004, 07:36 AM
That's it man, nice scripts :)

thank's a lot

hydrowire
09-20-2004, 07:48 AM
im fimiliar with php and javaScript like actionScript, but total idiot in C/C++/C#.
Does writing plugin require C skill?

faulknermano
09-20-2004, 07:52 AM
im fimiliar with php and javaScript like actionScript, but total idiot in C/C++/C#.
Does writing plugin require C skill?

thats what most people use. but 'require?' not sure.. i'm not a plugin writer so i dont know. however, .p plugins are simply windows .dll files. is there a way to compile a dll using javascript? doest java have a proprietary runtime environment?

hydrowire
09-20-2004, 07:58 AM
is there a way to compile a dll using javascript? doest java have a proprietary runtime environment?
i'm sorry to dissapoint you but actionScript is a programming language in Macromedia Flash that based on the same ECMA code that Java use, so actually I hava no idea at all to your question. sorry~

i thought .dll file is a compiled file? lightwave compile .ls to .p in its own compiler, right?

faulknermano
09-20-2004, 08:01 AM
i thought .dll file is a compiled file? lightwave compile .ls to .p in its own compiler, right?

no... lightwave compiles .ls files to .lsc files, but this is mainly for encryption purposes and is not necessary to run. in fact lsc files can be slower due to decryption.

.p is a windows dll file that is compiled by a C / C++ compiler, or whatever other compilers there are that i'm not aware of. :)