View Full Version : Documentation?

04-06-2007, 08:06 AM
Hi guys,
I'm attempting to take a script I've written and make it into a compiled plugin. One problem being that I'm not that familiar with C code. I know a bit of C++, C#, VBA, etc. so I should be ok, but I'm finding the documentation somewhat lacking. For example, I've opened up the example plugin 'negative' or whatever its called. This made sense as the script I'm converting is an image filter. However, I need access to the camera attributes (I used FOV in Lscript, there doesn't always seem to be direct equivalents from what I can see), so how do I get access to the camera? I cant find how to do this anywhere as the only documentation I can find seems to be a reference type thing. In which case you need to know how to do all this stuff already. There are no tutorial style documents showing how to get up and running & I'm finding it quite frustrating.

04-07-2007, 02:49 AM
LW SDK is grouped into three sections: classes - they are plug-ins appearing as displacements, editing tools, custom cameras etc. that's what you probably know if you used proper class to code Image Filter, 2nd globals - they are function's libraries similar to Windows DLL, also grouped to doing one specific task f.e. playing with cameras in Layout - that's what you are searching for - Camera Info global.. and 3rd - commands - they are called from Layout Generic /Master Handler or CommandSequence in Modeler plug-in classes, no nowhere else.. These are ASCII strings with parameters at the end..

As with everything else, it's taking time to understand architecture and how it works..

04-12-2007, 03:28 AM
Thanks Sensei, thats what I was looking for :)

04-12-2007, 01:43 PM
Hmm, I now have a problem. I was using the LW8 sdk for some reason, so I've updated and its broken something that was working.
I need to get access to the filmSize attribute of LWCameraAccess. I think there used to be a function call in the old sdk to get the horizontal film size and the vertical film size, but this is no longer available and I'll be damned if I can get access to the LWCameraAccess struct.
Its an attribute of the LWCameraHandler struct, but I really cannot find a way to get access to it. Can anyone help?

04-12-2007, 02:04 PM
In the older sdk I could gain access to the film size through
LWCameraInfo->filmSize(id, &hFilmSize, &vFilmSize);
But now this is not available and has been moved to the LWCameraHandler which is inaccessable via the global call.
Am I missing something here? (which is more than likely as I'm new to all this) This is starting to drive me nuts. Can I access the LWCameraHandler at all from inside a ImageFiler class plugin? If not, why the hell was this attribute removed?

04-12-2007, 02:45 PM
Ask Jarno.. He is responsible for this..

You can use LWCameraEvaluationFuncs, but they're different in 9.0 and v9.2..

I have LWCameraInfo->filmSize() in LW SDK v9.2 OB7.. Are you sure it's missing in NEWER SDK??

04-12-2007, 03:57 PM
I think I'm using the 9.0 SDK as I wanted to learn using one thats "stable". I'll grab the 9.2 one and use that from now on.
Thanks again Sensei, your help is appriciated.

04-13-2007, 01:39 AM
You are correct Sensei. For some reason this function was removed in 9.0, but now its back. That'll teach me to try and program when I'm exceptionally tired.

04-13-2007, 03:52 AM
Someone is being mistaken. The filmSize() function in the camera info global is first introduced in 9.2. It has never existed before.

The LWCameraAccess structure is something that is given to camera plugins as a paramter for their evaluation function. It does not exist for plugins of other classes.


04-13-2007, 04:17 AM
That someone is definately me :)
This is my first attempt at writing a plugin & I must have gotten the SDK's documentation mixed up as its all a bit confusing for me.
Cheers Jarno.