Distribute Plugin Source

parker

New member
Composing simple plugins is fairly easy, but "real world" plugins are daunting.

Numerous plugin tutorials are available, but they mostly demonstrate technique without descibing how to process the data structures in LW.

PROPOSAL: Distribute the C and H source for the plugins in the LW SDK.
 
there are some simple ones included with the SDK documentation. but i do agree that having more source codes to learn from would help tremendously.
 

Deep Purple

TriCaster Dev Team
C++ Wrappers

Is somebody using C++ wrappers to make development of new plugins easier?
There was an opensource package available ( happylib ) which was quite nice.

I wrote my own template system to create LightWave plugins with a single line of code.
 

fyffe

New member
Hiya. I still keep HappyLib up to date. It wraps nearly the entire LW 7.5 SDK, and also the LW 6.0 SDK, plus has a lot of extra goodies. I'd be interested in hearing about how you used templates. I use a template to register the plugin now, such as:

RegisterPlugin<HappyInstance> happyInstance;

However, the individual plugin classes are base classes with virtual functions, such as LWPShader, LWPVolumetric, etc.

- Graham Fyffe
 

ceej

New member
Hmm, I was about to curse myself for spending the last week writing C++ wrappers for everything I wanted to use in the Lightwave SDK. Then I read in your forums that you haven't wrapped any of the panel stuff in HappyLib, and I felt better again. That's mostly what I concentrated on.

I'll probably release my stuff with a Creative Commons attribution/sharealike license when it's done. I'm not really being systematic about it, though. I've just wrapped the things I've needed for the plugin set I'm writing. I also wrote a little message-sending system so controls can notify their containers when they've been changed.

Usage looks something like this:

Code:
mScaleFactorField = new LightwaveFloatControl(IMPORT_SCALE_FACTOR_CHOSEN, "Scaling factor:");
mScaleFactorField->setInitialPosition(20, 90);
addChild(mScaleFactorField);
// later on to actually create and position it:
mScaleFactorField->initialize(panf, panel);
// to get what's in the field
float scale = mScaleFactorField->getValue();

Is there a handy download link for HappyLib for curious people? Google wasn't helpful.
 

Deep Purple

TriCaster Dev Team
I wrote a template class hierarchy which is able to wrap most plugin classes.

These three lines result in a basic generic plugin:

Code:
#include "genericplugin_adaptor.h"
#include "genericpluginpanel.h"
GenericPlugin_Adaptor<GenericPluginPanel> MyGenericPlugin("Empty panel");

The GenericPlugin_Adaptor will register a generic plugin named "Empty panel"

GenericPluginPanel is a specialization of my Panel class,
which is very simple to use, similar to ceej's class description.

I am using a generic Observer pattern base class to be able to
concentrate controls into more complex ones and notify Observers.
It is very convenient when developing user interfaces.


For the creation of a custom object the code is similar:

Code:
#include "customobject_adaptor"
#include "genericcustomobject.h"
CustomObject_Adaptor<GenericCustomObject> MyCustomObject( "does nothing" );

This woud register a custom object plugin named "does nothing".
To put funcionality into the plugin you would have to specialize GenericCustomObject and use that class as the template parameter.

Maybe we could put our efforts together and create an open source project on one of those sites who provide a free source control environment?

- David
 

fyffe

New member
Interesting. I like that style of using templates. It eliminates the macro I use in my plugins to generate some tedious virtual functions. It's possible we could combine my base classes, and use a template method similar to yours instead of the macros. that would be even easier than the way mine is now. I like having a base class, becaues there is default functionality already implemented and all kinds of helper functions.

- Graham


Deep Purple said:
Maybe we could put our efforts together and create an open source project on one of those sites who provide a free source control environment?

- David
 

Lightwolf

obfuscated SDK hacker
Let me just chime in here...

Since I switched to C++ starting this year (...and I love it :) ), I'm _also_ working on a bunch of wrappers (currently wrapping a couple of globals and adding generic functionality).

I'm also thinking about linking ui elements and variables including save/load methods, because I'm lazy ;) (and I like the way DF handles controls...)

So, I'd volunteer to pitch in code and join a dev team. As long as the resulting library can be used for commercial projects, I'm in.

Sourceforge?

Cheers,
Mike
 

Lightwolf

obfuscated SDK hacker
Sounds good.

Is anyone interested in donating some base code?
Should we create a new thread? (Here or on www.splinecage.com ?)
Any name suggestions? (Important ! ;) my fav: LightWrap++ )

Cheers,
Mike
 

Deep Purple

TriCaster Dev Team
C++ SDK Wrapper

LightWrap++ sounds cool to me ;-)

I am a little busy at the moment,
but I would contribute what I got to start an open
Lightwave SDK C++ Wrapper Project ( at Sourceforge or
a similar provider of free source control )
 

Lightwolf

obfuscated SDK hacker
Neat. I'm quite busy at the moment too. I would like to open up a small forum on Splinecage concerning LightWrap++ if that is o.k. with you guys ( 'n'gals? ). I'll try to set it up within the next couple of days, and we could discuss anything further from there onward.
I guess we'd probably collect some sources first, then agree on nomenclature and general design on the system and work our way forward from that.
To be honest, I never took part in more than a one man programming effort...
SourceForge is a pretty decent idea I guess.

Cheers,
Mike
 
Top Bottom