Re: question on refreshing parameter data between instances.
Re: question on refreshing parameter data between instances.
- Subject: Re: question on refreshing parameter data between instances.
- From: Brian Gardner <email@hidden>
- Date: Thu, 13 Aug 2009 10:17:38 -0700
Thanks, Darrin.
It almost sounds like you're trying to change the value of one
parameter based on another parameter between when the user saved a
document and reopened it. Is that correct?
No, not at all. I'm just trying to save and recover the values that
the user set.
I'm using a singleton object (as you recommended to me a while ago)
as a way for the user to set global variables, that are common to all
instances of the plugin.
Since the singleton doesn't get serialized, itself, then I must
recreate the singleton, it's state,
and it's linkages to the plugins, during project open ... indirectly.
I have two challenges:
1. I complicated things by giving the plugin a "useGlobalValues"
toggle parameter.
It is the user's choice whether an instance of the plugin
functions independently,
(which the user rarely picks) or if the user wants it to be
ganged to the global values
(which is what they typically choose for this plugin).
So, whether the singleton is linked to this plugins' several
parameters or not
will depend on how the user set this "useGlobalValues" toggle
parameter.
When the user saves the project, and later reopens the project,
the state
of the plugins and the singleton need to match the way the user
had set it
from their previous project save.
The challenge is -- how do I save the singleton's state into the
project file?
And how do I recover that state, later, and re-instate the
linkages?
2. The plugin has its UI parameters, which (depending on the
"useGlobalValues" toggle)
should reflect either the local settings, or current global
settings .
When using global, this allows the user to see & change the
global value from any plugin instance.
So, I need to keep all of those parameters which are linked to
the global, in sync.
(Possibly, the singleton would need to update the UI parameter
for each plugin instance, whenever the global is updated.)
When a project is saved, whatever bookkeeping overhead and
mechanism is used to manage
these linkages, would need to be saved ... and recreated later
upon project open.
(But, the singleton does not get serialized / deserialized.)
The plugin is mostly completed, and beta user feedback is very positive.
But, I still need to solve the problems of how to save the user's
settings with the project,
and recover them later during the next project open.
-- Brian
If so, you should not do that, and it won't ever be supported. That
a) breaks the user's assumptions that the document they saved will
be the document they open, and b) could cause problems with other
parts of the document, such as keyframes on the parameters you're
changing. Not to mention the above problem that we make no
guarantees about the order in which things are deserialized.
If you're trying to do something else, please explain in more detail
what you're trying to do. I believe in Jay's example, he was just
trying to save and restore the value of a font menu, and the
installed fonts may not be the same between 2 machines (or between
closing and reopening the document). Since there's a reasonable
fallback of using the default font, you can get away with it in that
case. Are you working with a similar type of functionality?
Darrin
On Aug 12, 2009, at 4:28 PM, Brian Gardner wrote:
Will the other plugin's parameters exist and be settable
during the time when the custom parameter gets called
to deserialize?
In other words, is the custom parameter deserialization
called last?
If it were called too soon, some of what we'd need to do
wouldn't be available yet to be done.
So, I guess I'm really asking... At what point in the
plugin's re-instatement is the custom parameter deserialization
called?
-- Brian
On Aug 12, 2009, at 2:42 PM, Darrin Cardani wrote:
There isn't, but if you have a custom parameter, you will get
called to deserialize its data. You could do what you need to do
at that time.
Darrin
On Aug 11, 2009, at 12:58 PM, Brian Gardner wrote:
I have a similar situation to Jay.
When a saved FCP project is later reopened,
I'd like to update some parameter settings.
As a plugin is getting re-instated during an "Open
Project..." (boot),
is there an methods which get called, which we can hook into?
-- Brian
On Aug 11, 2009, at 10:53 AM, Jay Boyer wrote:
Is there a point in the boot sequence that I can detect that the
plug-in is
from a prior instance so that I can update these lists?
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Pro-apps-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
--
Darrin Cardani
email@hidden
--
Darrin Cardani
email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Pro-apps-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden