Skip to main content
jchichignoud
Known Participant
August 22, 2018
Answered

Access / Edit "Scale to frame size" property?

  • August 22, 2018
  • 2 replies
  • 1025 views

Hi,

I'm trying to find a way for an extension to read whether clips on the timeline have the "Scale to frame size" property enabled or not via the API. Even better would be the option to toggle that property.

This topic has been closed for replies.
Correct answer Bruce Bullis

There's no way to read it from the timeline.

You can check for whether or not the pref is currently set, but that won't tell you whether it was set when the clip was added to the timeline.

We plan to offer get/set footage interpretation in a forthcoming release, which should let you detect the _original_ dimensions.

2 replies

Inspiring
September 6, 2018

You can do it through Clipboard - copy clip to Clipboard,  get XML from Clipboard and then parse it for <ScaleToFramePolicy>1</ScaleToFramePolicy>.

jchichignoud
Known Participant
September 9, 2018

Oh good workaround! Do you know where I can find any more info on accessing the clipboard/pasteboard?

Inspiring
September 10, 2018

You can see data of clipboard with this tool:

InsideClipboard - View the content of all formats stored in the Clipboard

More info You can find on MSDN.

1) You have to open Clipboard:

OpenClipboard function | Microsoft Docs

2) Count Clipboard Formats:

CountClipboardFormats function | Microsoft Docs

Then in loop:

3) Enumerate formats:

EnumClipboardFormats function | Microsoft Docs

4) Get Clipboard Format Name:

GetClipboardFormatNameW function | Microsoft Docs

5) Get Clipboard Data:

GetClipboardData function | Microsoft Docs

When You finish Close Clipboard:

CloseClipboard function | Microsoft Docs

Bruce Bullis
Bruce BullisCorrect answer
Legend
August 23, 2018

There's no way to read it from the timeline.

You can check for whether or not the pref is currently set, but that won't tell you whether it was set when the clip was added to the timeline.

We plan to offer get/set footage interpretation in a forthcoming release, which should let you detect the _original_ dimensions.

jchichignoud
Known Participant
August 23, 2018

I can't see anything in the XML output that gives any indication of it either? Any way (however roundabout) to tell an external application the clips have the option ticked?

Bruce Bullis
Legend
August 24, 2018

Not today.