Conflict parameters in duplicate plugin
Copy link to clipboard
Copied
Well.. Another question.
I've done plugin and stuck with next question. If I duplicate my plugin on the same layer and change of any parameter, they begin to clash.
Details:
Plugin with moving particles and with flag PF_OutFlag_NON_PARAM_VARY. In every Render() call I check frame number and, if UI parameters changed, change particles behavior. If I duplicate my plugin one of them responds to the another UI settings.
For particles and they behaviors I create separate classes without nests, extends or implements. Also I use singleton class with UI parameters.
Why plugins did behave with duplicate?
Must I use handles for every object or class? Or am I wrong to assess the situation?
Thank you!
With warm,
Mike.
Copy link to clipboard
Copied
Hi Mike,
first idea, may be wrong, but do you use any static values? Could come from there...
Cheers,
François
Copy link to clipboard
Copied
Hi, françois leroy!
Thank you for reply!
Nope, I didn't use static values. But your message have pushed me to think. If I declare singleton outside of functions.. Could this affect my problem?
With warm,
Mike.
Copy link to clipboard
Copied
Well, I don't know anything about singleton...
But I do think you shouldn't declare anything outside of functions.
Instead, you could declare everything you need during one of the calls (Sequence Setup or re-setup for example, depends on what you need) and store it in sequence data. Then you can access it during other calls.
Hope it helps,
François
Copy link to clipboard
Copied
Thank you so much, françois leroy!
I'll try to apply your advices at closest time.
With warm,
Mike

