This george script doesn't work in v12

A forum dedicated to George scripting questions
Post Reply
User avatar
Peter Wassink
Posts: 4620
Joined: 17 Feb 2006, 15:38
Location: Amsterdam
Contact:

This george script doesn't work in v12

Post by Peter Wassink »

This script,
used to delete specific imagemarkers works fine in v11.7.5
but gives a error in v12:
Line 11 Execution ERROR.
IF (result==color)
any ideas how to make it work?
color = 5

tv_layergetimage
image = result

tv_layerinfo 0
PARSE result state position density name type first last xxx

FOR i = first to last
tv_layermarkget 0 i
IF ( result == color )
tv_layermarkset 0 i 0
END
END
Peter Wassink - 2D animator
• PC: Win11/64 Pro - AMD Ryzen 9 5900X 12-Core - 64Gb RAM
• laptop: Win11/64 Pro - i7-4600@2.1 GHz - 16Gb RAM
kelanhordos
Posts: 109
Joined: 06 Aug 2019, 01:09
Contact:

Re: This george script doesn't work in v12

Post by kelanhordos »

Hi Peter, the tv_layermarkget also returns the r g b values after the mark value in v12, so you need to add a parse to the results to separate that out and compare to color.
Something like the below gets it to work on my end. There are some updates to George that don't seem to be in the currently listed v12 documentation, and I've found you just have to parse results and tv_warn them to yourself to see if there is something different happening in v12 that you don't expect

tv_layermarkget 0 i
parse result a b c d
IF ( a == color )
PC: Windows 10/64 Pro - TUF Gaming H470-PRO, i9-10900F@ 2.8 GHz - 32Gb RAM
Tvpaint 12.0.6 Pro
Wacom Cintiq 16 Driver: 6.4.10-3
Post Reply