getBitmap outside of renderOutput
getBitmap outside of renderOutput
- Subject: getBitmap outside of renderOutput
- From: Garrick Meeker <email@hidden>
- Date: Fri, 08 Jul 2011 16:36:31 -0700
I dug into this a little more. getBitmap works fine in Motion 5 (and Motion 4) as well as FCP 7 (although it's strangely upside down and the origin doesn't reflect this). In FCP X the call succeeds but the image is the grey image with arrow (like the drop zone in Motion when creating a Final Cut Effect). I noticed that both Motion 5 and FCP X return an 8-bit images, even if I request 32-bit. I don't really care about that part, but maybe it's related? I thought the new code is all floating point?
Should I file this as a bug or an enhancement request? Any ideas for a workaround? I could cache an image from renderOutput but that gets very complicated with the new timeline rendering. It's further complicated by the [actionAPI currentTime] bug below but I "solved" that using the OSC time. Without a workaround we can't release our product.
I'm calling getBitmap like this:
FxRenderInfo renderInfo;
memset(&renderInfo, 0, sizeof(renderInfo));
renderInfo.frame = t;
renderInfo.qualityLevel = kFxQuality_HIGH;
renderInfo.fieldOrder = kFxFieldOrder_PROGRESSIVE;
renderInfo.scaleX = 1;
renderInfo.scaleY = 1;
renderInfo.depth = 32;
renderInfo.sharedContext = CGLGetCurrentContext();
BOOL okay = [api getInputBitmap:&image withInfo:renderInfo atTime:time];
On Jun 30, 2011, at 10:17 PM, Garrick Meeker wrote:
> I'm seeing some issues here that could seriously affect our products. First, we get the current time in the parameterChanged method with:
>
> id <FxCustomParameterActionAPI> actionAPI = [_apiManager apiForProtocol:@protocol(FxCustomParameterActionAPI)];
> double t = [actionAPI currentTime];
>
> That works in Motion 5 and has always worked before, but in FCP X it seems to always be 0.
>
> And we also need access to images outside of renderOutput, specifically in parameterChanged and from on-screen controls (or custom UI in FxPlug 1). I realize this isn't guaranteed by the API but it works in Motion 4 and 5. FCP X seems to return a solid color. I've only tried the bitmap calls here. Stuffing the current OpenGL context into an FxRenderInfo to get a texture seems problematic. Trying to cache a frame from the render calls seems difficult too because of FCP's timeline rendering.
>
> I can file a bug but I'm really hoping there are workarounds for this release.
>
> _______________________________________________
> 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