Re: Invalidating custom data based on clip
Re: Invalidating custom data based on clip
- Subject: Re: Invalidating custom data based on clip
- From: Darrin Cardani <email@hidden>
- Date: Mon, 28 Nov 2011 11:11:50 -0800
Ben,
Some here suggested that maybe using -finishInitialSetup could work. It's called once when a plug-in is added, but not after deserialization. It's called when a plug-in is copy/pasted elsewhere. It looks like it's not currently called when a plug-in is dragged from one piece of footage to another, but that's probably a bug. Let me know if it that might be workable.
Darrin
On Nov 28, 2011, at 10:17 AM, Darrin Cardani wrote:
> Ben,
>
> Shoot, that's a good point. Short of something like you're already doing, I'm not sure what a good solution is. You could probably create a slightly more sophisticated "checksum" that involved not only the first frame, but maybe things like length of the clip, maybe a sample from another time, or something like that? It's a kludge, but might be more robust than what you're dealing with now.
>
> If you could write up an enhancement request describing how you'd like this solved in the long run, that would be great.
>
> Thanks,
> Darrin
>
> On Nov 28, 2011, at 9:44 AM, Ben Syverson wrote:
>
>> Darrin,
>>
>> Hmm, on second thought, this regenerates the data each time the project is opened, which is less than optimal. It's potentially very expensive to generate this particular custom data, so I'd prefer to do it only once. For example, imagine computing optical flow for the clip.
>>
>> Currently I'm checking out the first frame as a bitmap and reading a few bytes to make sure they match the stored values. However, this is obviously stupid, because two different clips might have identical first frames.
>>
>> I would add a "Regenerate" button using the custom UI, but then that rules out FCP X.
>>
>> Any other ideas?
>>
>> Ben
>>
>>
>> On Nov 28, 2011, at 11:23, Darrin Cardani wrote:
>>
>>> Ben,
>>> Each plug-in instance has their -initWithAPIManager: method called, regardless of how they're created. Maybe you could do something like have a singleton which doles out custom IDs, and call it in the -initWithAPIManager: method. Then, whenever you go to use the custom data, if the id for that data doesn't match the id generated in -initWithAPIManager:, you throw it out and generate unique data for it. Would that work?
>>>
>>> Darrin
>>
>> _______________________________________________
>> 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
>
> _______________________________________________
> 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
_______________________________________________
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