Console Commands - Surface Points


The surface points define the size and positions of the objects (ellipses, rectangles, flood fill injection points), which are used to create the mask. Learn more about that objects at the documentation of the Mask Panel. Most objects require two surface points (like an ellipse), some only need one (e.g. color replacement). The following commands are used to modify the surface points.

Command List:

addnativepoint, addpoint, findcolor, genpoints, getpointx/y, loadpointgen, resetpoints, savepointgen.



Usage: addpoint <fx>,<fy>

Adds a point to the textures surface points list. The parameters <fx> and <fy> are floating point values (e.g. 0.342), which are independent of the target texture's width and height. Coordinates between 0.0 and 1.0 are located on the texture's area.

Example: addpoint 0.5,0.5
Adds a point to the center of any texture.



Usage: addnativepoint <x>,<y>

Adds a point to the surface points array. The coordinates <x> and <y> should range between 0 and the width respectively the height of the texture.

Example: addnativepoint 320,240
Adds a point at the center of a 640x480 texture.



Usage: resetpoints

Clears the surface points array, i.e. deletes all objects. This is the same effect like pressing the keys Ctrl+Shift+Delete.



Usage: getpointx/getpointy <tempvar>,<i>

Gets the x-coordinate (getpointx) or the y-coordinate (getpointy) of the surface point <n> and stores it in the temporal variable <i>

Example: getpointx myvariable,5



Usage: genpoints

Runs the Surface Points Generator



Usage: loadpointgen <filename>

Loads the Surface Points Generator preset <filename>. The preset should set these variables like this one (noise):

point generator elements = 100
point generator loops = 1
point generator x1 = rnd(1)
point generator x2 = x1+0.2
point generator y1 = rnd(1)
point generator y2 = y1+0.2

Example: loadpointgen noise



Usage: savepointgen <filename>

Saves the current settings of the Surface Points Generator to the preset <filename>.

Example: savepointgen mypointgenerator



Usage: findcolor <colorvalue>

This function searches for the color with the integer value <colorvalue> and adds a surface point to the first pixel that contains that color. The tolerance value, with a range from 0 to 255, comes from the color tolerance configuration variable of the Fill and Replace panel.

Example: findcolor 16777215
Searches for a white pixel.