Question.
You can give me a script. So that I can make all images in all SELECTED clips in BLACK WHITE project with one button.
Help me please.

Thank. I'll try.
This recommendation works. But Not for all selected clips at once. Thank. I'm interested in 1 button, which will make many selected clips black and white in one click.
Animationriver wrote: ↑26 Feb 2021, 02:35This recommendation works. But not for all selected clips at once.
I'm interested in 1 button, which will make many selected clips black and white in one click.
Thank you!
I haven't commented yet ,but have been following this topic.
Code: Select all
// ConvertAllClipsB&W.grg
// Svengali © 2021
// ( Feb ) 2021 - ver .0
Param none
ScriptName = "ConvertAllClipsB&W"
Text = "WARNING: Only run this script on a copy of your MultiClip project!!! |Continue|Exit"
tv_Request Text
Reply = result
IF Reply == 0
tv_warn "Script Aborted.."
EXIT
END
ClipRun = 1
ClipPosition = 0
Frames = 0
WHILE ClipRun
tv_ClipeNumID -1 ClipPosition
ClipID = result
IF CMP(ClipID,"none") == 1
ClipRun = 0
Else
tv_ClipSelect ClipID
tv_FirstImage
FirstImage = result
tv_LastImage
TotalFrames = FirstImage - result
tv_LayerSelect FirstImage TotalFrames
tv_LayerID
LayerID = result
tv_LayerMergeAll
tv_layerblendingmode LayerID VALUE
ClipPosition = ClipPosition + 1
END
END
tv_warn "B&W conversion complete."
I tried the script. I had 18 separate clips , one color image in each clip . The desired result was to automatically convert each color image in each clip to black and white.
I appreciate the feedback David.D.T. Nethery wrote: ↑26 Feb 2021, 16:48
I tried the script. I had 18 separate clips , one color image in each clip . The desired result was to automatically convert each color image in each clip to black and white.
The script worked flawlessly ! Thank you , Svengali .
Your script is good. Thanks.Svengali wrote: ↑26 Feb 2021, 16:19 I have a script solution that you can test. NOTE: Only TEST AND USE ON A COPY OF THE MULTICLIP PROJECT YOU WANT TO CONVERT TO B&W BECAUSE THE PROCESS IS DESTRUCTIVE!!!
copy the following script and create a button inserting the script as embedded GEORGE script.
Give me feedback on the result: either if it works, or any error messages and problem you might have.Code: Select all
// ConvertAllClipsB&W.grg // Svengali © 2021 // ( Feb ) 2021 - ver .0 Param none ScriptName = "ConvertAllClipsB&W" Text = "WARNING: Only run this script on a copy of your MultiClip project!!! |Continue|Exit" tv_Request Text Reply = result IF Reply == 0 tv_warn "Script Aborted.." EXIT END ClipRun = 1 ClipPosition = 0 Frames = 0 WHILE ClipRun tv_ClipeNumID -1 ClipPosition ClipID = result IF CMP(ClipID,"none") == 1 ClipRun = 0 Else tv_ClipSelect ClipID tv_FirstImage FirstImage = result tv_LastImage TotalFrames = FirstImage - result tv_LayerSelect FirstImage TotalFrames tv_LayerID LayerID = result tv_LayerMergeAll tv_layerblendingmode LayerID VALUE ClipPosition = ClipPosition + 1 END END tv_warn "B&W conversion complete."
The way the script works is it goes to each clip, merges all the layers and changes the merged layer's blend mode to VALUE.
sven
No, it doesn't. It removes saturation but preserves value.
Code: Select all
// ConvertAllClipsB&W.grg
// Svengali © 2021
// ( Feb ) 2021 - ver .0
Param none
ScriptName = "ConvertAllClipsB&W"
Text = "WARNING: Only run this script on a copy of your MultiClip project!!! |Continue|Exit"
tv_Request Text
Reply = result
IF Reply == 0
tv_warn "Script Aborted.."
END
FXProcess = "BlackAndWhiteConverter.bin" // added lines to import the Black and White Converter FX process
tv_GetPath GEORGE
GeorgePath = result
FXProcess = GeorgePath""FXProcess
tv_StackLoad FXProcess
ClipRun = 1
ClipPosition = 0
Frames = 0
WHILE ClipRun
tv_ClipeNumID -1 ClipPosition
ClipID = result
IF CMP(ClipID,"none") == 1
ClipRun = 0
Else
tv_ClipSelect ClipID
tv_FirstImage
FirstImage = result
tv_LastImage
TotalFrames = FirstImage - result
tv_LayerSelect FirstImage TotalFrames
tv_LayerID
LayerID = result
tv_LayerMergeAll
tv_StackApply ALLLAYERS // new line to apply Black and White converter to clip
// tv_layerblendingmode LayerID VALUE // removed line from first version
ClipPosition = ClipPosition + 1
END
END
tv_warn "B&W conversion complete."
Svengali wrote: ↑26 Feb 2021, 20:23
addendum: Note that you can apply many other FX processes on all of the CLIPS...
Save your customized FX with your own settings, carefully noting THE NAME you used with a .bin extension - save it to the GEORGE folder.
Then, in the embedded script, find the line that says FXProcess = and replace the current FX name with the name of your FX inside double quotation marks.
Now, when you click the button, all the Clips should be processed by your new FX.
For instance, you could try substituting the Scan Cleaner Black and White...
In my first post I wrote that color pictures are not delivered to my computer immediately. And during the day. I know that I can make 100 pictures black and white by putting them on one layer. But I have to work with the moment of learning the picture at different times.D.T. Nethery wrote: ↑26 Feb 2021, 18:28Animationriver wrote: ↑26 Feb 2021, 17:45 Unfortunately your script changes the color depth.
Color_Converted_Scan_Cleaner_retains_color_depth.jpg
B&W Conversion Script loses Contrast.jpg
Hi, AnimationRiver -
From the examples you posted , it seems like the image converted with Svengali's script loses contrast . (it appears a bit "flat") compared to the image converted using the Scan Cleaner.
Perhaps the parameters of the script could be tweaked so it does not reduce the contrast on the resulting black and white image ? Or maybe the script can be changed to apply Scan Cleaner rather than changing the merged layer's blend mode to VALUE ?
Aside from a script, I was wondering if this procedure would work for your purposes:
1.) You need to convert multiple (100 or more) color images to black and white , each image in a separate Clip. If you had all the color images to be converted in a folder , could you use a batch
renaming app to automatically give all the image files a consistent naming convention , such as COLOR_IMAGE_0001, COLOR_IMAGE_0002 , COLOR_IMAGE_0003 , COLOR_IMAGE_0004, etc. , (I use ReNamer , a batch file renaming app for macOS that allows you to rename lots of files quickly and conveniently. But if you are on Windows I think there are similar apps for Windows.)
2.) Then import all images into TVPaint. If the images have a consistent naming convention they should all import to a single layer in the Timeline.
3.) Now select all the color images on the Timeline and use your keyboard shortcut to apply Scan Cleaner B&W .
4.) Next, use a keyboard shortcut for Split Clip and advance from one image to the next , each time clicking the keyboard shortcut for Split Clip. Although this is somewhat repetitious , it should not take too long to split 100 or more images into separate Clips . Then you will have all the images converted to B & W and separated to their own clips.
Would this work for what you need to do ? (although I expect that Svengali will come through with an improved script , so let's wait and see ... )
.