Setting CutBrush operation parameters with GEORGE
Setting CutBrush operation parameters with GEORGE
Is there a command in GEORGE which lets you read and set CutBrush Parameters:
i.e.
Smooth
AAliasing
Optimize
Display
Keep
BrushSmooth
I'm trying to guarantee that the tv_BrushCut command will capture the entire Display and not just the current layer. More than that, I'd like to check the status of the Display check box first, so it could be restored after making a cutbrush com-positing all the displayed layers in the x1,y1,x2,y2 designated area of the current image. Is this currently possible?
If not, I suppose it should be possible to merge all layers, then cut from the merged layer, then undo the merge?
EDIT: I'd still like to know if there is a way to read and set CutBrush parameters using GEORGE, but for my purposes, I was able to merge all layers, and use tv_BrushCut command and then undo the merge.
I also wanted to be able to use tv_SetActiveShape to CutFreeHand CutRect and CutPoly, but the merge and the undo both happen before I can actually cut a shape FreeHand, Rect or CutPoly. That is why a separate GEORGE command to read and set CutBrush parameters would be very helpful.
Thanks, Sven
i.e.
Smooth
AAliasing
Optimize
Display
Keep
BrushSmooth
I'm trying to guarantee that the tv_BrushCut command will capture the entire Display and not just the current layer. More than that, I'd like to check the status of the Display check box first, so it could be restored after making a cutbrush com-positing all the displayed layers in the x1,y1,x2,y2 designated area of the current image. Is this currently possible?
If not, I suppose it should be possible to merge all layers, then cut from the merged layer, then undo the merge?
EDIT: I'd still like to know if there is a way to read and set CutBrush parameters using GEORGE, but for my purposes, I was able to merge all layers, and use tv_BrushCut command and then undo the merge.
I also wanted to be able to use tv_SetActiveShape to CutFreeHand CutRect and CutPoly, but the merge and the undo both happen before I can actually cut a shape FreeHand, Rect or CutPoly. That is why a separate GEORGE command to read and set CutBrush parameters would be very helpful.
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
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
Re: Setting CutBrush operation parameters with GEORGE
The doc is not up to date on the wiki.
Here is the full tv_cutbrush command:
You can also set (and get back previous value(s)) when activating the shape:
Here is the full tv_cutbrush command:
Code: Select all
tv_cutbrush x1 y1 x2 y2 0|1 /*copy|cut*/ 0|1 /*image|anim*/ 0|1 /*display*/ 0|1 /*optimize*/
Code: Select all
tv_setactiveshape cutrect [smooth 0-100] [aaliasing 0|1] [keep 0|1] [subpixel 0|1|2|3 /*none|medium|best|smart*/] [optimize 0|1] [display 0|1]
TVPaint Team
Re: Setting CutBrush operation parameters with GEORGE
Thanks for the update, Mike.
Sven
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
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
- NathanOtano
- Posts: 1209
- Joined: 01 Apr 2014, 07:07
- Location: Biarritz, France
- Contact:
Re: Setting CutBrush operation parameters with GEORGE
A way to cut to brush the current selection? Even if we can't use george to manipulate selections?
Working on Windows 10
Creator of Disnosc, providing storyboard, animation and design for 2D realistic pictural animation: https://www.disnosc.fr/ - nathanotano@disnosc.fr
Highly interested in animation workflows, I'm open to scripting new TVP functions for individuals and studios.
Creator of Disnosc, providing storyboard, animation and design for 2D realistic pictural animation: https://www.disnosc.fr/ - nathanotano@disnosc.fr
Highly interested in animation workflows, I'm open to scripting new TVP functions for individuals and studios.
Re: Setting CutBrush operation parameters with GEORGE
ShapeSelect:Copy To CustomBrush ?NathanOtano wrote:A way to cut to brush the current selection? Even if we can't use george to manipulate selections?
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
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
- NathanOtano
- Posts: 1209
- Joined: 01 Apr 2014, 07:07
- Location: Biarritz, France
- Contact:
Re: Setting CutBrush operation parameters with GEORGE
Sorry, I was meaning with george. I found the brushcut function but it cuts without looking at the selection so I guess it's not possible.
I knew for the shortcut, thanks anyway!
I knew for the shortcut, thanks anyway!
Working on Windows 10
Creator of Disnosc, providing storyboard, animation and design for 2D realistic pictural animation: https://www.disnosc.fr/ - nathanotano@disnosc.fr
Highly interested in animation workflows, I'm open to scripting new TVP functions for individuals and studios.
Creator of Disnosc, providing storyboard, animation and design for 2D realistic pictural animation: https://www.disnosc.fr/ - nathanotano@disnosc.fr
Highly interested in animation workflows, I'm open to scripting new TVP functions for individuals and studios.
Re: Setting CutBrush operation parameters with GEORGE
The two GEORGE commands that Mike revealed DO let you set parameter values as needed to capture cutbrushes or animbrushes that respect SELECTED AREAS. In fact, it is possible to capture selected, non-contiguous areas of an image to a brush (or capture from multiple-layers into a brush as shown below!) something that the standard cutbrush commands don't themselves permit. Wonderful possibilities here.NathanOtano wrote:Sorry, I was meaning with george. I found the brushcut function but it cuts without looking at the selection so I guess it's not possible.
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
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
- NathanOtano
- Posts: 1209
- Joined: 01 Apr 2014, 07:07
- Location: Biarritz, France
- Contact:
Re: Setting CutBrush operation parameters with GEORGE
That's nice to read, i'm sorry but i don't fully understand.
I tried it all morning but can't make it working "inside" a script. Meaning that the "cut to brush" shortcut works with a selection, but I need to do that in a "toggle-like" script.
Basically what i want :
- I click one time and it selects the selection tool
- If i click and the selection tool is already selected, it cuts the selection to a brush and go back to freehandline tool
But the "tv_brushcut" (!not tv_cutbrush!) option doesn't cut only the selection. I can do it only with shortcuts on a button, that's limited while scripting.
I managed my shortcuts to do it differently directly with a cutbrush, inspired by your transform shortcuts. I'll try to share it this w-e.
I tried it all morning but can't make it working "inside" a script. Meaning that the "cut to brush" shortcut works with a selection, but I need to do that in a "toggle-like" script.
Basically what i want :
- I click one time and it selects the selection tool
- If i click and the selection tool is already selected, it cuts the selection to a brush and go back to freehandline tool
But the "tv_brushcut" (!not tv_cutbrush!) option doesn't cut only the selection. I can do it only with shortcuts on a button, that's limited while scripting.
I managed my shortcuts to do it differently directly with a cutbrush, inspired by your transform shortcuts. I'll try to share it this w-e.
Working on Windows 10
Creator of Disnosc, providing storyboard, animation and design for 2D realistic pictural animation: https://www.disnosc.fr/ - nathanotano@disnosc.fr
Highly interested in animation workflows, I'm open to scripting new TVP functions for individuals and studios.
Creator of Disnosc, providing storyboard, animation and design for 2D realistic pictural animation: https://www.disnosc.fr/ - nathanotano@disnosc.fr
Highly interested in animation workflows, I'm open to scripting new TVP functions for individuals and studios.
Re: Setting CutBrush operation parameters with GEORGE
You're right.
The button command, Shape Select:Copy To CutBrush respects existing select areas and copies only those selected parts of the image into the CutBrush.
The tv_BrushCut command in George still ignores the select areas and instead, always grabs the whole frame (current layer or total Display). It would be VERY HELPFUL if tv_BrushCut in George was updated to respect existing select areas like the Shape Select:Copy To CutBrush button command now does. That would permit a single-toggle-button George script like you're trying to write.
To work now with this limitation, I've had to setup two buttons: the first gives me the select tool... while the second (as posted) captures the selected area into the CutBrush and then clears the selection.
sven
The button command, Shape Select:Copy To CutBrush respects existing select areas and copies only those selected parts of the image into the CutBrush.
The tv_BrushCut command in George still ignores the select areas and instead, always grabs the whole frame (current layer or total Display). It would be VERY HELPFUL if tv_BrushCut in George was updated to respect existing select areas like the Shape Select:Copy To CutBrush button command now does. That would permit a single-toggle-button George script like you're trying to write.
To work now with this limitation, I've had to setup two buttons: the first gives me the select tool... while the second (as posted) captures the selected area into the CutBrush and then clears the selection.
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
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
- NathanOtano
- Posts: 1209
- Joined: 01 Apr 2014, 07:07
- Location: Biarritz, France
- Contact:
Re: Setting CutBrush operation parameters with GEORGE
I've done the same indeed it works quite well.Svengali wrote:To work now with this limitation, I've had to setup two buttons: the first gives me the select tool... while the second (as posted) captures the selected area into the CutBrush and then clears the selection.
sven
Thanks!
Working on Windows 10
Creator of Disnosc, providing storyboard, animation and design for 2D realistic pictural animation: https://www.disnosc.fr/ - nathanotano@disnosc.fr
Highly interested in animation workflows, I'm open to scripting new TVP functions for individuals and studios.
Creator of Disnosc, providing storyboard, animation and design for 2D realistic pictural animation: https://www.disnosc.fr/ - nathanotano@disnosc.fr
Highly interested in animation workflows, I'm open to scripting new TVP functions for individuals and studios.
Re: Setting CutBrush operation parameters with GEORGE
Mike,Mike wrote:The doc is not up to date on the wiki.
Here is the full tv_cutbrush command:You can also set (and get back previous value(s)) when activating the shape:Code: Select all
tv_cutbrush x1 y1 x2 y2 0|1 /*copy|cut*/ 0|1 /*image|anim*/ 0|1 /*display*/ 0|1 /*optimize*/
Code: Select all
tv_setactiveshape cutrect [smooth 0-100] [aaliasing 0|1] [keep 0|1] [subpixel 0|1|2|3 /*none|medium|best|smart*/] [optimize 0|1] [display 0|1]
Two additional requests to enhance the GEORGE commands that deal with CutBrush and AnimBrush:
1. Could the GEORGE tv_BrushCut command be updated to respect (capture only from within) selected areas of the image WHEN AND IF selections are present when capturing? This is already how the Shortcut command "Shape Select:Copy To CutBrush" works currently.
2. Could the GEORGE tv_GetActiveShape command be enhanced to return not only the name of the active shape, but all of the current states/settings for the SHAPE parameters as well?
Thanks again.
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
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
Re: Setting CutBrush operation parameters with GEORGE
Maybe you can useSvengali wrote: 2. Could the GEORGE tv_GetActiveShape command be enhanced to return not only the name of the active shape, but all of the current states/settings for the SHAPE parameters as well?
Code: Select all
tv_getactivetool [force]
('force' is to be able to get the settings of tool which are not for drawing: filling/select/...)
TVPaint Team
Re: Setting CutBrush operation parameters with GEORGE
Actually, the command tv_AreaInit BACKUP provides all the shape info that I needed... I just thought it might make sense to get all that additional shape info directly, through something like a tv_GetActiveShape force command or something similar.Mike wrote:Maybe you can useSvengali wrote: 2. Could the GEORGE tv_GetActiveShape command be enhanced to return not only the name of the active shape, but all of the current states/settings for the SHAPE parameters as well?which returns all the settings of the current tool ?Code: Select all
tv_getactivetool [force]
('force' is to be able to get the settings of tool which are not for drawing: filling/select/...)
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
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
Re: Setting CutBrush operation parameters with GEORGE
In fact, the shapes and the tools are 2 different objects.
The shapes are inside the main panel => without any settings (that's why tv_getactiveshape only returns the name of the shape, and if george was not made more than 20 years ago, tv_setactiveshape should only set the new shape and not the settings of the tool it used)
The tools are inside the tools panel => with all their settings, so it's the tool which should set/get all its settings (that's why tv_getactivetool should be used to return all the settings)
It's to be coherent with the concept shape/tool
And BTW, when you use "tv_AreaInit BACKUP", the current shape (and so its attached tool) will be changed if the shape is not a filling or select shapes, instead of "tv_getactivetool force" which didn't change the current shape (and so the current tool)
I know it's not as clean as that for every george commands, but hope it enlightens a little bit
The shapes are inside the main panel => without any settings (that's why tv_getactiveshape only returns the name of the shape, and if george was not made more than 20 years ago, tv_setactiveshape should only set the new shape and not the settings of the tool it used)
The tools are inside the tools panel => with all their settings, so it's the tool which should set/get all its settings (that's why tv_getactivetool should be used to return all the settings)
It's to be coherent with the concept shape/tool
And BTW, when you use "tv_AreaInit BACKUP", the current shape (and so its attached tool) will be changed if the shape is not a filling or select shapes, instead of "tv_getactivetool force" which didn't change the current shape (and so the current tool)
I know it's not as clean as that for every george commands, but hope it enlightens a little bit
TVPaint Team
Re: Setting CutBrush operation parameters with GEORGE
Thanks for the clarification Mike, which explains some mysterious script results I never understood.Mike wrote:In fact, the shapes and the tools are 2 different objects.
The shapes are inside the main panel => without any settings (that's why tv_getactiveshape only returns the name of the shape, and if george was not made more than 20 years ago, tv_setactiveshape should only set the new shape and not the settings of the tool it used)
The tools are inside the tools panel => with all their settings, so it's the tool which should set/get all its settings (that's why tv_getactivetool should be used to return all the settings)
It's to be coherent with the concept shape/tool
And BTW, when you use "tv_AreaInit BACKUP", the current shape (and so its attached tool) will be changed if the shape is not a filling or select shapes, instead of "tv_getactivetool force" which didn't change the current shape (and so the current tool)
I know it's not as clean as that for every george commands, but hope it enlightens a little bit
For example, here is a short script I often use to analyze current shape/tool parameters... note that at the end of the script I found I had to restore tool and shape, but I never knew why they changed when all I did was try to look at their parameters.
Spoiler : :
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
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