Skip to content

Commit

Permalink
Merge pull request #297 from charlielee/issue-287
Browse files Browse the repository at this point in the history
Fix #287 rename confirm take to conform take
  • Loading branch information
charlielee committed Apr 8, 2021
2 parents a78e500 + 4a6d4c0 commit c4a6ae7
Show file tree
Hide file tree
Showing 8 changed files with 22 additions and 22 deletions.
2 changes: 1 addition & 1 deletion docs/features/menu-bar.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ The menu bar contains an assortment of options both to do with the current proje

**Capture Frame:** select this button to capture a new frame from the live-feed that is visible in capture mode.

**Confirm Take:** select this to rename all of the captured frames file names to be sequential.
**Conform Take:** select this to rename all of the captured frames file names to be sequential.

**Play Capture Sounds:** this toggles whether a sound plays when a frame is captured.

Expand Down
2 changes: 1 addition & 1 deletion src/animator.html
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ <h2 class="sidebar-header">
Rename frame files to be sequential:
</li>
<li class="sidebar-opt">
<button id="btn-confirm-take" class="btn">Confirm Take</button>
<button id="btn-conform-take" class="btn">Conform Take</button>
</li>
</ul>
</div>
Expand Down
4 changes: 2 additions & 2 deletions src/css/animator.css
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,13 @@

/* Options that do nothing when no frames are captured */
body[data-has-frames="false"] #btn-export-video,
body[data-has-frames="false"] #btn-confirm-take {
body[data-has-frames="false"] #btn-conform-take {
background-color: var(--ba-light-mid);
color: var(--ba-dark-active);
cursor: not-allowed;
}
body[data-has-frames="false"] #btn-export-video:focus,
body[data-has-frames="false"] #btn-confirm-take:focus {
body[data-has-frames="false"] #btn-conform-take:focus {
border: 0.0625rem solid var(--ba-border-active);
}

Expand Down
8 changes: 4 additions & 4 deletions src/js/animator/core/ExportVideo.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,11 +95,11 @@
buttons: [true, "Export video"]
})
.then(async (response) => {
// Confirm the take and render the video if "export video" selected
// Conform the take and render the video if "export video" selected
if (response) {
let isTakeConfirmed = await global.projectInst.currentTake.confirmTake(false);
let isTakeConformed = await global.projectInst.currentTake.conformTake(false);

if (isTakeConfirmed) {
if (isTakeConformed) {
// The render method expects an array so convert input from string into array
// Regexes are to handle arguments in quotes
// https://stackoverflow.com/a/56119602
Expand All @@ -108,7 +108,7 @@

ExportVideo.render(argumentsArray, outputPath);
} else {
Notification.error("Unable to export video due to an error renaming files with confirm take.");
Notification.error("Unable to export video due to an error renaming files with conform take.");
}
}
});
Expand Down
4 changes: 2 additions & 2 deletions src/js/animator/core/Features.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@
btnDeleteFrame.click();
}

static confirmTake() {
global.projectInst.currentTake.confirmTake();
static conformTake() {
global.projectInst.currentTake.conformTake();
}

static audioToggle() {
Expand Down
8 changes: 4 additions & 4 deletions src/js/animator/projects/Project.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
const frameModLeftControls = document.querySelector("#left-controls");

const btnDirectoryChange = document.querySelector("#btn-dir-change");
const btnConfirmTake = document.querySelector("#btn-confirm-take");
const btnConformTake = document.querySelector("#btn-conform-take");
const curDirDisplay = document.querySelector("#currentDirectoryName");

/** Represents a project (a series of takes) */
Expand Down Expand Up @@ -85,9 +85,9 @@
self.showExportFrameDirDialog()
});

// Confirm take
btnConfirmTake.addEventListener("click", function () {
self.currentTake.confirmTake();
// Conform take
btnConformTake.addEventListener("click", function () {
self.currentTake.conformTake();
});
}

Expand Down
12 changes: 6 additions & 6 deletions src/js/animator/projects/Take.js
Original file line number Diff line number Diff line change
Expand Up @@ -117,11 +117,11 @@
}

/**
* "Confirms" a take by renaming each captured frame to be sequential.
* "Conforms" a take by renaming each captured frame to be sequential.
* @param {Boolean} notify Display a notification when the process completes/fails
* @returns {Boolean} Returns true if confirm is successful, false if there is an error
* @returns {Boolean} Returns true if conform is successful, false if there is an error
*/
async confirmTake(notify = true) {
async conformTake(notify = true) {
let self = this;
let outputDir = this.saveDirPath;
let promisesList = [];
Expand All @@ -133,7 +133,7 @@
}

try {
Loader.show("Confirming take");
Loader.show("Conforming take");

// Give all of the files a temporary name
// (required because async renaming could cause naming conflicts otherwise)
Expand Down Expand Up @@ -162,13 +162,13 @@
self.exportFrameId = self.getTotalFrames();

if (notify) {
Notification.success("Confirm take successfully completed");
Notification.success("Conform take successfully completed");
}
response = true;

} catch (err) {
if (notify) {
Notification.error("Error renaming file with confirm take");
Notification.error("Error renaming file with conform take");
}
response = false;

Expand Down
4 changes: 2 additions & 2 deletions src/js/main/MenuBar.js
Original file line number Diff line number Diff line change
Expand Up @@ -117,9 +117,9 @@
registerAccelerator: false
},
{
label: "Confirm Take",
label: "Conform Take",
click: function () {
self._sendClickEvent("confirmTake");
self._sendClickEvent("conformTake");
}
},
{ type: "separator" },
Expand Down

0 comments on commit c4a6ae7

Please sign in to comment.