Re: weird parameter value on FCP's XML interchange format
Re: weird parameter value on FCP's XML interchange format
- Subject: Re: weird parameter value on FCP's XML interchange format
- From: email@hidden
- Date: Wed, 26 Sep 2007 08:35:57 +0200
Hi,
thanks for all the responses. They were very helpful.
So, I was able to find the formula for my shifting values.
Here it is:
Overlap = ((ScalingFactor * ImageWidth) - CanvasWidth) / 2 [pixel]
Shift = Overlap / ImageWidth [floating point value in XML]
same for the height.
Thank you very much.
Clancy
> On Sep 22, 2007, at 12:44 AM, email@hidden wrote:
>
>> Here's my problem:
>>
>> I try to develop some automatic functions to FCP (5.1.4) via
>> Applescript and the XML Interchange Format:
>>
>> I've got a folder full of images which should be placed one after
>> another in the timeline. Every image should be in full screen mode or
>> bigger. And the upper left corner of the scaled images should be equal
>> to the upper left corner of the canvas.
>>
>> I wrote some code in Applescript which creates the XML-projectfile. A
>> repeat loop grabs the images, reads out the imagesize and calculates a
>> scaling factor to fill the canvas. Then it inserts the appropriate
>> XML-Code. Due to the scaling, some parts of the image overlap the
>> canvas (sure!). So now I want the images to be automatically
>> positioned in the upper left corner of the canvas.
======================
Trevor wrote:
> Hi Clancy,
> The center values (and probably all point position values) in Final
Cut are
> stored as percentages from the center of the canvas. So 0.25 0.0
would move
> the position to your right by 25% of the canvas pixels.
>
> Trevor
==========================
Darrin wrote:
> Clancy,
> The easiest way to get that to happen is to put the anchor point at
> the upper left corner of the image. It should always be (-halfWidth,
> -halfHeight), I believe. So for DV footage, it would be (-360, -240).
> All scaling and rotation happens around the anchor point. So when you
> set the anchor point to the upper left corner and then scale, the upper
> left of the footage (or still) stays in the upper left of the canvas,
> and the scaling happens to the right and bottom.
>
> As someone else pointed out, the point values are possibly also stored
> as percentages of the canvas size (or footage size? I forget which - so
> check the XML docs to be sure).
>
> Darrin
> --
> Darrin Cardani
> email@hidden
>
===========================
Helena wrote:
> Hi Clancy,
>
> Yup, Trevor is correct. The position is a percentage. The allows the
> user to change out the frame size at XML import time in the sequence
> settings (like import something that was originally photoJPEG as HD) and
> have the postiioning all still correct on the new size. If they change
> out the media too it should still work..
>
> I've written up a bug to indicate that the documentation should clarify
> this point. Darrin's advice is great -- one can figure out the meaning
> of the values by placing the point in question in handy places like the
> center, upper right, upper left. I tested with centering on the right
> side myself.
>
> Thanks,
> Helena
_______________________________________________
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