Adding CurvePoints to existing Curve
It's seems like every image has preexisting curves in C1 with two CurvePoints set by default as a curve is a straight line with two points by default. I'm however now struggling in identifying proper means of adding CurvePoints via JXA or AppleScript. Does anyone have a JXA or AppleScript example on how to add an element?
Thank you in advance.
Michael
Thank you in advance.
Michael
0
-
Hi Michael,
I'm probably a bit late to answer. But in case you still need the info, here is a sample using AppleScript:tell application "Capture One 20"
set selectedVariants to (get selected variants)
tell document in front
-- CHECKS IF ANY VARIANT IS SELECTED
if selectedVariants is {} then
display dialog "No selected variant. Please select variants and try again."
else
-- LOOP TO APPLY SETTINGS TO ALL SELECTED VARIANTS
repeat with thisVariant in selectedVariants
tell adjustments of thisVariant
-- DEFINE VALUES FOR RGB CHANEL
tell rgb curve
-- SET VALUES FOR DEFAULT (0;0) POINT
-- !! VALUES ARE DEFINED ON a 0-100 SCALE, NOT 0-255
set brightness of first curve point to 0
set amount of first curve point to 5
make new curve point with properties {brightness:18, amount:14}
make new curve point with properties {brightness:50, amount:55}
make new curve point with properties {brightness:85, amount:87}
-- SET VALUES FOR DEFAULT (100;100) POINT
set brightness of last curve point to 100
set amount of last curve point to 95
end tell
-- DEFINE VALUES FOR RED CHANEL
tell red curve
-- SET VALUES FOR DEFAULT (0;0) POINT
set brightness of first curve point to 2
set amount of first curve point to 0
make new curve point with properties {brightness:50, amount:45}
-- SET VALUES FOR DEFAULT (100;100) POINT
set brightness of last curve point to 100
set amount of last curve point to 98
end tell
end tell
end repeat
end if
end tell
end tell2
Post is closed for comments.
Comments
1 comment