Hi,
Currently I have a similar effect with a FxPlug generator I am working on. The new plugin uses a set of global variables in order to be able to use the calculated results in the next frame. If I apply the generator to Motion's timeline, everything works perfectly. When I apply it a second time, both instances interfere with each other, because Motion launches the plugin once and uses the same one for both instances.
Is there a way to find out which instance is called, so I can make the plugin use different global variables for each instance ?
regards Christoph Vonrhein
On Mar 28, 2007, at 7:56 PM, Darrin Cardani wrote:
On Mar 28, 2007, at 10:53 AM, Pierre Jasmin wrote: Emile Tobenfeld (a. k. a Dr. T) wrote: Hi I am working on a set of FxPlug filters for use in FCP and Motion. The bulk of the code in these filters consists of a large pre-existing library of C++ code. There is a relatively thin layer of Objective C code, (along with some utility code written in C++) wrapped around the old library. All of the common Objective C classes are given unique names (for each filter) at precompile time. What I am finding is that certain filters interfere with other filters when they are installed. This happens particularly in debug builds. (I'm not sure its completely restricted to debug builds -- if it were, I could work around it if necessary. What I am seeing is situations like 1. If filter A is installed, FCP will crash (in its own code) when filter B brings up its UI, even if filter A is not used in the session 2. If Filter C is installed, Filters D and E will not render correctly, even if filter C is not used in the session. I realize this is sketchy information, but I'm hoping someone on one of these lists has an idea about how to deal with the problem. Thanks. Apparently and you won't believe it, as per another list, all class names in FxPlugs must be unique (a problem with the Objective C language and current linker) and also unique amongst natives, your friends and competitors as all FxPlugs are loaded into the same address space. So you have to revert right now I am told (not being an the expert on Objective C) to use defines as in PlugA: #define CustomParam MyCompanyNameMyPluginNameCustomParam PlugB: #define CustomParam MyCompanyNameMyOtherPluginNameCustomParam
Actually in Emile's case, this is a problem with C++ templates. We're still trying to figure out what's happening, as this is different from the Objective-C case.
Darrin
|