tv_StackAddToBin iFile --- Have any Scriptors been able to make this command work?

A forum dedicated to George scripting questions
Post Reply
Svengali
Posts: 1552
Joined: 28 Dec 2006, 10:08

tv_StackAddToBin iFile --- Have any Scriptors been able to make this command work?

Post by Svengali »

------------------------------------------------------------------------------------------------------

tv_stackaddtobin (for iFile or iFolder)

Loads the file(s) to the FX Stack bin

[PARAMETERS]
iFile filesystempath The file to add
Info:
For path with special characters (like ':'), you need to write
(to not manage the string as a variable)
tv_***** ... "c:/Users/Mike/Desktop/myfile.ext" ...
For path with spaces, you need to write:
(to manage the path as a single string inside TVPaint Animation)
tv_***** ... '"'"c:/Users/Mike/Desktop/my file with spaces.ext"'"' ...
The path (already encapsulated with quote (") is again encapsulated with:
simple-quote (') quote (") simple-quote (')

------------------------------------------------------------------------------------------------------
I've been trying to script an FX file management utility, but can't seem to get this command to work properly. After working on this for a while I'm nearly convinced the command (both for loading a single file and loading a folder of files) is dis-connected?

What I think it should do is let you copy an FX.bin file or a complete folder of FX.bin files into the FX Stack Bin... this capability is central to the concept I'm working on.

If one of the TVPaint programmers (or independent GEORGE script writers) could post a simple script demonstrating the correct syntax, it would help out a lot.
(I think there is a work-around but it would be sloppy to use.)

thanks, sven
TVP Pro 11.0.10-64bit Win10 - 64GB ram -2TB HHD - 256GB SSD - Wacom Cintiq 16, driver 6.3.41-1
Android Tablet: rel. 11, Samsung Galaxy Note10.1 - 32GB with microSD 32GB
Android Tablet: rel. 11.5, Samsung Galaxy Tab S7plus - 128GB with microSD 64GB
Xavier
Posts: 1852
Joined: 01 Oct 2019, 11:08

Re: tv_StackAddToBin iFile --- Have any Scriptors been able to make this command work?

Post by Xavier »

Looking at the code, this command would work only if a filter stack exists.

If you don't mind sharing your script, we could have a look.
Svengali
Posts: 1552
Joined: 28 Dec 2006, 10:08

Re: tv_StackAddToBin iFile --- Have any Scriptors been able to make this command work?

Post by Svengali »

Thanks Xavier,
I'm going to review my scripts again and will post an example if they still don't seem to work as expected.

sven
TVP Pro 11.0.10-64bit Win10 - 64GB ram -2TB HHD - 256GB SSD - Wacom Cintiq 16, driver 6.3.41-1
Android Tablet: rel. 11, Samsung Galaxy Note10.1 - 32GB with microSD 32GB
Android Tablet: rel. 11.5, Samsung Galaxy Tab S7plus - 128GB with microSD 64GB
Svengali
Posts: 1552
Joined: 28 Dec 2006, 10:08

Re: tv_StackAddToBin iFile --- Have any Scriptors been able to make this command work?

Post by Svengali »

I think I need to clarify what the tv_StackAddToBin commands are supposed to do.

in the StackAddToBin iFile documentation, to me its purpose seems to be to add an FX file from a disk-folder "the iFile" into the Preset Bin List (not into the actual FXStack).

------------------------------------------------------------------------------------------------------
tv_stackaddtobin iFile

Load the file to the FX Stack bin

[PARAMETERS]
iFile filesystempath The file to add
Info:
For path with special characters (like ':'), you need to write
(to not manage the string as a variable)
tv_***** ... "c:/Users/Mike/Desktop/myfile.ext" ...
For path with spaces, you need to write:
(to manage the path as a single string inside TVPaint Animation)
tv_***** ... '"'"c:/Users/Mike/Desktop/my file with spaces.ext"'"' ...
The path (already encapsulated with quote (") is again encapsulated with:
simple-quote (') quote (") simple-quote (')

------------------------------------------------------------------------------------------------------

in the StackAddToBin iFolder documentation, to me its purpose seems to be to add ALL the FX files from a disk-folder "the iFolder" into the Preset Bin List (not into the actual FXStack).

------------------------------------------------------------------------------------------------------
tv_stackaddtobin iFolder

Load all files *recursivily* from the folder to the FX Stack bin

[PARAMETERS]
iFolder filesystempath The folder containing files to add
Info:
For path with special characters (like ':'), you need to write
(to not manage the string as a variable)
tv_***** ... "c:/Users/Mike/Desktop/myfile.ext" ...
For path with spaces, you need to write:
(to manage the path as a single string inside TVPaint Animation)
tv_***** ... '"'"c:/Users/Mike/Desktop/my file with spaces.ext"'"' ...
The path (already encapsulated with quote (") is again encapsulated with:
simple-quote (') quote (") simple-quote (')

------------------------------------------------------------------------------------------------------

the custom script is simple and assumes an FX file exists in a folder: "D:\FXFiles\BlackOutline.bin"

Code: Select all

FXPath = "D:\FXfiles\"
AddFile = CONCAT(FXPath,"BlackOutline.bin")
AddFile = '"'AddFile'"'
tv_warn "AddFile = " AddFile
tv_StackAddToBin AddFile
After running the script, I'm expecting to find the "BlackOutline.bin" newly added to the Preset binlist but it's not there.

At the same time, I already have another FXfile loaded into the FX Stack window.

So,if the tv_StackAddToBin command is meant to "add/load" the bin file from the disk to the FX Stack window, I would expect to find the FX Stack window to show "BlackOutline", but it doesn't.

So, the StackAddToBin command fails to add/load the "BlackOutline.bin" file in any way (not to the Preset binlist and not added to the FX Stack window) my conclusion is the StackAddToBin command is broken.

sven
TVP Pro 11.0.10-64bit Win10 - 64GB ram -2TB HHD - 256GB SSD - Wacom Cintiq 16, driver 6.3.41-1
Android Tablet: rel. 11, Samsung Galaxy Note10.1 - 32GB with microSD 32GB
Android Tablet: rel. 11.5, Samsung Galaxy Tab S7plus - 128GB with microSD 64GB
Post Reply