Anyone out there handy with the After Effects plug-in SDK? at DVinfo.net
DV Info Net

Go Back   DV Info Net > Cross-Platform Post Production Solutions > Digital Compositing and Effects
Register FAQ Today's Posts Buyer's Guides

Digital Compositing and Effects
After Effects, Shake and everything else.

Reply
 
Thread Tools Search this Thread
Old November 7th, 2005, 12:46 PM   #1
Major Player
 
Join Date: Mar 2005
Location: Brighton, England
Posts: 225
Anyone out there handy with the After Effects plug-in SDK?

Hi all,

I'm having a little play around with AE's plug-in interface, but I've hit a bit of a problem:

For one of my filters I need to bring the image out of AE's LayerDef structure and into a user defined data type (probably an array of PF_Pixels, but I'm not sure at the moment) so that I don't need to use the iterate() function in order to traverse the image.

However, I can't work out a few simple things having not used the API before and having found it difficult to obtain useful info.

What I need to do is write a couple of functions to get a pixel from the current layer by x,y co-ordinate and put a pixel into the output buffer in the same way.

Also, I'm having trouble finding the current layer in the In_data structure that I'm passed - the documentation states that in the params[] array param[0] is always the current layer, but param[0] contains a PF_Paramdef value, not a PF_Layerdef, as you would expect to find for a layer, current or otherwise...

I know these are probably very easy to do once you have the knowledge but I'm pretty stuck. My C++ skills should still be good enough (if a touch rusty!) to handle coding the effect once I've got the data in a format outside of AE's representation, but I'm stuck until I can do that - any help would be most gratefully received!!!

The functions I've written for getting and putting pixels I'll include below, but I'm unable to test them as I can't get at the current layer :(

In Visual Studio (C++) on a PC the functions are these:

PF_Pixel *getPixel8(PF_LayerDef &def, int x, int y) {
return (PF_Pixel*)((char*)def.data + (y * def.rowbytes) + (x * sizeof(PF_Pixel)));
}

void putPixel8(PF_LayerDef def, int x, int y, PF_Pixel pix) {
A_long pinter = (char)pix.alpha + (char)pix.red + (char)pix.green + (char)pix.blue;
def.data = (PF_Pixel*)(pinter + (y * def.rowbytes) + (x * sizeof(PF_Pixel)));
return;
}

Thanks guys, looking forward to getting the benefit of some serious techie knowledge!....
Dominic Jones is offline   Reply
Reply

DV Info Net refers all where-to-buy and where-to-rent questions exclusively to these trusted full line dealers and rental houses...

B&H Photo Video
(866) 521-7381
New York, NY USA

Scan Computers Int. Ltd.
+44 0871-472-4747
Bolton, Lancashire UK


DV Info Net also encourages you to support local businesses and buy from an authorized dealer in your neighborhood.
  You are here: DV Info Net > Cross-Platform Post Production Solutions > Digital Compositing and Effects


 



All times are GMT -6. The time now is 02:07 PM.


DV Info Net -- Real Names, Real People, Real Info!
1998-2024 The Digital Video Information Network