Skip to content

Commit

Permalink
Improvements to Shot Data Toolbox
Browse files Browse the repository at this point in the history
- Added a single "Export Destination" path for Shot Data exports.
- `cp.apple.fcpxml.valid()` now handles `.fcpxmld` bundles correctly.
- Fixed csv2notion code signing.
- Closes #3023
  • Loading branch information
latenitefilms committed Jul 17, 2022
1 parent 2ea3b8a commit 7b10ee1
Show file tree
Hide file tree
Showing 7 changed files with 152 additions and 75 deletions.
5 changes: 5 additions & 0 deletions scripts/build_commandpost_release.sh
Expand Up @@ -142,6 +142,11 @@ echo " * Cleaning up prior to build..."
echo " * Building CommandPost-App Docs..."
./scripts/build.sh docs

echo " * Signing csv2notion..."
xattr -cr "${COMMANDPOST_HOME}/src/plugins/finalcutpro/toolbox/shotdata/csv2notion/csv2notion"
codesign --verbose --force --deep --options=runtime --timestamp --entitlements "${COMMANDPOST_HOME}/src/plugins/finalcutpro/toolbox/shotdata/csv2notion/entitlements.plist" --sign "Developer ID Application: LateNite Films Pty Ltd" "${COMMANDPOST_HOME}/src/plugins/finalcutpro/toolbox/shotdata/csv2notion/csv2notion"
codesign -dv --verbose=4 "${COMMANDPOST_HOME}/src/plugins/finalcutpro/toolbox/shotdata/csv2notion/csv2notion"

echo " * Building CommandPost-App..."
./scripts/build.sh build -s Release -c Release -d -u

Expand Down
16 changes: 8 additions & 8 deletions src/extensions/cp/apple/fcpxml/init.lua
Expand Up @@ -766,6 +766,14 @@ end
--- from the file itself, and if that's not possible, we'll default
--- to the latest FCPXML version.
function mod.valid(path, version)
--------------------------------------------------------------------------------
-- Look inside FCPXML Bundles for metadata:
--------------------------------------------------------------------------------
local extension = tools.getFileExtensionFromPath(path)
if extension and extension == "fcpxmld" then
path = path .. "/Info.fcpxml"
end

--------------------------------------------------------------------------------
-- Make sure the file actually exists:
--------------------------------------------------------------------------------
Expand Down Expand Up @@ -814,14 +822,6 @@ function mod.valid(path, version)
version = semver(mod.latestDTDVersion())
end

--------------------------------------------------------------------------------
-- Look inside FCPXML Bundles for metadata:
--------------------------------------------------------------------------------
local extension = tools.getFileExtensionFromPath(path)
if extension and extension == "fcpxmld" then
path = path .. "/Info.fcpxml"
end

--------------------------------------------------------------------------------
-- Use `xmllint` to make sure the file is valid:
--------------------------------------------------------------------------------
Expand Down
15 changes: 10 additions & 5 deletions src/extensions/languages/English_en.json
Expand Up @@ -236,6 +236,7 @@
"changeDestinationFolder": "Change Destination Folder",
"changeDestinationFolderInCompressor": "Change Destination Folder in Compressor",
"changeDestinationPreset": "Change Destination Preset",
"changeExportDestination": "Change Export Destination",
"changeFilenamesInCompressor": "Change Filenames in Compressor",
"changeFinalCutProLanguage": "Changing Final Cut Pro's language requires Final Cut Pro to restart.",
"changeLanguageRestart": "Changing languages requires CommandPost to Restart.",
Expand Down Expand Up @@ -832,6 +833,7 @@
"executeLuaCodeSnippet": "Execute Lua Code Snippet",
"expandAudio": "Expand Audio",
"exportCSV": "Export CSV",
"exportDestination": "Export Destination",
"exportFCPXML": "Export FCPXML",
"exportSettings": "Export Settings",
"exposure": "Exposure",
Expand All @@ -844,6 +846,8 @@
"failedToAddCustomApplication": "Failed to add Custom Application.",
"failedToAddCustomApplicationDescription": "CommandPost was unable to determine the bundle identifier or display name for the custom application.\n\nPlease provide feedback to the CommandPost team so that they can come up with a fix.",
"failedToChangeLanguage": "Unable to change Final Cut Pro's language.",
"failedToCreateExportDestination": "Failed to create Export Destination",
"failedToCreateExportDestinationDescription": "Please ensure that CommandPost has access to the folder you want to save files to and try again.",
"failedToFindCommandInCommandEditor": "Failed to find '{command}' in Command Editor.",
"failedToLaunchFinalCutPro": "Unable to launch Final Cut Pro.",
"failedToProcessFCPXML": "Failed to process FCPXML",
Expand Down Expand Up @@ -2082,12 +2086,13 @@
"shortcutsSetNoneConfirmation": "This will reset all of the shortcuts to None.",
"shotData": "Shot Data",
"shotDataDescriptionFive": "The images will be renamed based on the Scene and Shot number in the connected Shot Data Title.",
"shotDataDescriptionFour": "on the timeline (but not in a secondary storyline), you'll be asked for an additional folder to consolidate the images to.",
"shotDataDescriptionFour": "on the timeline (but not in a secondary storyline), these images will be consolidated into the same folder as the CSV.",
"shotDataDescriptionOne": "This utility allows you to import a FCPXML which contains one or more Shot Data Titles in a timeline, and converts",
"shotDataDescriptionSix": "This utility was commissioned by Vigneswaran Rajkumar for a feature film project.",
"shotDataDescriptionSix": "This utility was commissioned by Vigneswaran Rajkumar for a feature film project, and is built using vzhd1701's csv2notion.",
"shotDataDescriptionThree": "If you have a Shot Data Title on the Primary Storyline, and have a single still image connected directly to it",
"shotDataDescriptionTwo": "the data from these Motion Templates into a single CSV file for use in other applications.",
"shotDataDropZone": "You can also drag and drop projects from the Final Cut Pro Browser to here for processing...",
"shotDataDropZone": "You can drag and drop projects from the Final Cut Pro Browser to here for processing...",
"shotDataExportDestinationDescription": "Your Shot Data files will be saved to",
"shotDataFailedToInstallTemplate": "Failed to install Shot Data Template.",
"shotDataFailedToInstallTemplateDescription": "CommandPost was unable to install the Shot Data Motion Template. This is most likely a permissions issue.",
"shotDataFCPXMLFailedDescription": "CommandPost was unable to process the FCPXML. Please make sure the FCPXML contains a single timeline, which contains the Shot Data Titles.",
Expand Down Expand Up @@ -2222,8 +2227,8 @@
"textPasteboardHistory": "Text Pasteboard History",
"textToSpeechDestination": "Please select where you want to save your audio files:",
"texture": "Texture",
"theBatchOfFCPXMLsHasBeenExportedSuccessfully": "The batch of FCPXMLs has been exported successfully.",
"theCSVAndConsolidatedImagesHasBeenExportedSuccessfully": "The CSV and consolidated images has been exported successfully.",
"theBatchOfFCPXMLsHasBeenExportedSuccessfully": "The batch of FCPXMLs have been exported successfully.",
"theCSVAndConsolidatedImagesHasBeenExportedSuccessfully": "The CSV and consolidated images have been exported successfully.",
"theCSVHasBeenExportedSuccessfully": "The CSV has been exported successfully.",
"theOriginalAndNewColumnsCannotBeTheSamePleaseCheckYourSettingsAndTryAgain": "The original and new columns cannot be the same. Please check your settings and try again.",
"theSharedFolderCouldNotBeFound": "The Shared Folder could not be found.",
Expand Down
Binary file modified src/plugins/finalcutpro/toolbox/shotdata/csv2notion/csv2notion
Binary file not shown.
@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<!-- These are required for binaries built by PyInstaller -->
<key>com.apple.security.cs.allow-jit</key>
<true/>
<key>com.apple.security.cs.allow-unsigned-executable-memory</key>
<true/>
<key>com.apple.security.cs.disable-library-validation</key>
<true/>
<!-- These are required for binaries built by PyInstaller -->
</dict>
</plist>
41 changes: 31 additions & 10 deletions src/plugins/finalcutpro/toolbox/shotdata/html/panel.html
Expand Up @@ -35,6 +35,14 @@
text-align: left;
}

.destinationText {
font-weight: bold;
text-align: left;
font-size: 13px;
color: #037ffc;
margin-left: 20px;
}

.notionHelpText {
font-size: 9px;
font-weight: normal;
Expand Down Expand Up @@ -218,10 +226,19 @@ <h3 class="uiItem">{{ i18n("shotData") }}</h3>

<br />
<p class="uiItem">{{ i18n("shotDataDescriptionSix") }}</p>
<table>
<br />

<table width="100%">
<tr>
<th style="height: 10px;"></th>
<th style="width: 100%;">
<form>
<textarea type="text" id="dropbox" name="dropbox" oninput="dropboxAction()" tabindex="-1" placeholder="{{ string.upper(i18n("shotDataDropZone")) }}"></textarea>
</form>
</th>
</tr>
</table>

<table>
<tr>
<th style="width: 10px;"></th>
<th>
Expand All @@ -232,15 +249,19 @@ <h3 class="uiItem">{{ i18n("shotData") }}</h3>
</th>
</tr>
</table>
<table width="100%">
<tr>
<th style="height: 10px;"></th>
</tr>

<hr />

<h3 class="uiItem">{{ i18n("exportDestination") }}</h3>

<p class="uiItem">{{ i18n("shotDataExportDestinationDescription") }}:</p>
<p class="destinationText" id="destinationPath"></p>

<table>
<tr>
<th style="width: 100%;">
<form>
<textarea type="text" id="dropbox" name="dropbox" oninput="dropboxAction()" tabindex="-1" placeholder="{{ string.upper(i18n("shotDataDropZone")) }}"></textarea>
</form>
<th style="width: 10px;"></th>
<th>
<a href="#" class="bottomButton" onclick="pressButton('changeExportDestination')">{{ i18n("changeExportDestination") }}</a>
</th>
</tr>
</table>
Expand Down

0 comments on commit 7b10ee1

Please sign in to comment.