This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Title: Reverse attachment order | |
* Version: 1.0 | |
* License: MIT | |
* Author: Justin Barrett | |
* Sites: | |
* http://allaboutthatbase.tips | |
* https://www.youtube.com/c/AllAboutThatBase1 | |
* | |
* Github Gist: https://gist.github.com/justinsbarrett/dcab601ccbc6834854773e67e891b4e7 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const settings = input.config({ | |
title: "Mark Matching Records", | |
description: `Searches an incoming data table for records matching those in a \"master\" table. | |
Any matching records are marked via a checkbox field.`, | |
items: [ | |
input.config.table("masterTable", { | |
label: "Master table", | |
description: "The table containing the master list." | |
}), | |
input.config.field("masterField", { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Title: Recursive Hierarchy Labels | |
* License: MIT | |
* Author: Justin Barrett | |
* Sites: | |
* http://www.allaboutthatbase.tips - Main website | |
* https://www.youtube.com/c/AllAboutThatBase1 - All About That Base (YouTube channel) | |
* Show your support: https://ko-fi.com/allaboutthatbase | |
* | |
* Revision history: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Allow user to select the table and view to use, and which fields will be affected | |
const config = input.config({ | |
title: "Set Sequential Event Times", | |
description: `Update a collection of events that occur in sequence so that each new event starts when the previous event ends. | |
* Use the fixed start marker field (a checkbox field) to mark all records that have fixed start times. | |
* The first record in the selected view **must** have a fixed start time. | |
* Any record without a fixed start time will have its start time calculated based on the end time of the previous record.`, | |
items: [ | |
input.config.table("eventsTable", { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Delay execution a specified number of seconds. | |
* @param {number} seconds | |
*/ | |
function delay(seconds) { | |
const startTime = Date.now() | |
while (Date.now() - startTime < seconds * 1000) | |
continue | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Setup | |
const timerOptions = ["30", "45", "60"] | |
// Functions | |
function showTime(seconds) { | |
const min = Math.floor(seconds / 60) | |
const sec = seconds % 60 | |
output.clear() | |
output.markdown(`# ${min}:${("0" + sec).slice(-2)}`) | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import maya.cmds as mc | |
def findNodeAndAttribute(animCurve): | |
parts = animCurve.split("_") | |
for index in range(len(parts)): | |
node = "_".join(parts[:index + 1]) | |
attribute = "_".join(parts[index + 1:]) | |
# Look for the node | |
# If it exists, look for the attribute | |
if mc.objExists(node): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Title: Record Timer (Automation) | |
* Version: 1.0 | |
* License: MIT | |
* Author: Justin S Barrett | |
* Sites: | |
* http://www.justinsbarrett.com - Main website | |
* https://www.youtube.com/channel/UCElPqW_1xVXToQPB3Y_WD3Q - All About That Base | |
* | |
* Description: An alternative to Airtable's built-in timer block. With this script, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Title: Record Timer | |
* Version: 1.0 | |
* License: MIT | |
* Author: Justin Barrett | |
* Sites: | |
* http://www.justinsbarrett.com - Main website | |
* https://www.youtube.com/channel/UCElPqW_1xVXToQPB3Y_WD3Q - All About That Base (YouTube channel) | |
* | |
* Description: An alternative to Airtable's built-in timer block. With this script, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const detailedOutput = false; | |
// Get tables | |
let proctable = base.getTable("Donation Processing"); | |
let reqtable = base.getTable("Donation Requests"); | |
let orgtable = base.getTable("Organizations"); | |
let contactstable = base.getTable("Contacts"); | |
// Get records from processing table | |
let procrecords = await proctable.selectRecordsAsync(); |