Difference between revisions of "George Commands : Guidelines"

From TVPaintWiki
Jump to: navigation, search
(Created page with '//======================================================================================= // George commands //===================================================================…')
 
Line 1: Line 1:
//=======================================================================================
+
//=======================================================================================
// George commands
+
// George commands
//=======================================================================================
+
//=======================================================================================
  
//returns number < 0 if error
+
//returns number < 0 if error
//returns the index of the new guideline
+
//returns the index of the new guideline
tv_guidelineadd "line" ["x" value] ["y" value] ["angle" value]
+
tv_guidelineadd "line" ["x" value] ["y" value] ["angle" value]
tv_guidelineadd "circle" ["x" value] ["y" value] ["radius" value]
+
tv_guidelineadd "circle" ["x" value] ["y" value] ["radius" value]
tv_guidelineadd "ellipse" ["x" value] ["y" value] ["radiusa" value] ["radiusb" value]
+
tv_guidelineadd "ellipse" ["x" value] ["y" value] ["radiusa" value] ["radiusb" value]
tv_guidelineadd "segment" ["x1" value] ["y1" value] ["x2" value] ["y2" value]
+
tv_guidelineadd "segment" ["x1" value] ["y1" value] ["x2" value] ["y2" value]
tv_guidelineadd "grid" ["x" value] ["y" value] ["w" value] ["h" value]
+
tv_guidelineadd "grid" ["x" value] ["y" value] ["w" value] ["h" value]
tv_guidelineadd "fieldchart"
+
tv_guidelineadd "fieldchart"
tv_guidelineadd "animatorfield"
+
tv_guidelineadd "animatorfield"
tv_guidelineadd "safearea" ["out" value] ["in" value]
+
tv_guidelineadd "safearea" ["out" value] ["in" value]
tv_guidelineadd "image" ["path" value] ["x" value] ["y" value] ["rotation" value] ["scale" value]
+
tv_guidelineadd "image" ["path" value] ["x" value] ["y" value] ["rotation" value] ["scale" value]
  
//returns number < 0 if error
+
//returns number < 0 if error
//returns the previous values of the index guideline
+
//returns the previous values of the index guideline
//for line
+
//for line
tv_guidelinemodify index ["x" value] ["y" value] ["angle" value]
+
tv_guidelinemodify index ["x" value] ["y" value] ["angle" value]
//for circle
+
//for circle
tv_guidelinemodify index ["x" value] ["y" value] ["radius" value]
+
tv_guidelinemodify index ["x" value] ["y" value] ["radius" value]
//for ellipse
+
//for ellipse  
tv_guidelinemodify index ["x" value] ["y" value] ["radiusa" value] ["radiusb" value]
+
tv_guidelinemodify index ["x" value] ["y" value] ["radiusa" value] ["radiusb" value]
//for segment
+
//for segment
tv_guidelinemodify index ["x1" value] ["y1" value] ["x2" value] ["y2" value]
+
tv_guidelinemodify index ["x1" value] ["y1" value] ["x2" value] ["y2" value]
//for grid
+
//for grid
tv_guidelinemodify index ["x" value] ["y" value] ["w" value] ["h" value]
+
tv_guidelinemodify index ["x" value] ["y" value] ["w" value] ["h" value]
//for safearea
+
//for safearea
tv_guidelinemodify index ["out" value] ["in" value]
+
tv_guidelinemodify index ["out" value] ["in" value]
//for image
+
//for image
tv_guidelinemodify index ["path" value] ["x" value] ["y" value] ["rotation" value] ["scale" value]
+
tv_guidelinemodify index ["path" value] ["x" value] ["y" value] ["rotation" value] ["scale" value]
 +
 +
//returns number < 0 if error
 +
tv_guidelineremove "all"|"line"|"circle"|"segment"|"grid"|...|index
 +
 +
//returns number < 0 if error
 +
//returns the previous state (0|1) if index is used
 +
//returns nothing if several guidelines changed
 +
tv_guidelinevisible "all"|"line"|"circle"|"segment"|"grid"|...|index 0|1|"on"|"off"|"true"|"false"|"toggle"
 +
//returns the state of the guideline
 +
tv_guidelinevisible index
  
//returns number < 0 if error
+
//returns number < 0 if error
tv_guidelineremove "all"|"line"|"circle"|"segment"|"grid"|...|index
+
//returns the previous state (0|1) if index is used
 +
//returns nothing if several guidelines changed
 +
tv_guidelinesnap "all"|"line"|"circle"|"segment"|"grid"|...|index 0|1|"on"|"off"|"true"|"false"|"toggle"
 +
//returns the state of the guideline
 +
tv_guidelinesnap index
  
//returns number < 0 if error
+
//returns number < 0 if error
//returns the previous state (0|1) if index is used
+
//returns the previous state (0|1) if index is used
//returns nothing if several guidelines changed
+
//returns nothing if several guidelines changed
tv_guidelinevisible "all"|"line"|"circle"|"segment"|"grid"|...|index 0|1|"on"|"off"|"true"|"false"|"toggle"
+
tv_guidelinecollapse "all"|"line"|"circle"|"segment"|"grid"|...|index 0|1|"on"|"off"|"true"|"false"|"toggle"
//returns the state of the guideline
+
//returns the state of the guideline
tv_guidelinevisible index
+
tv_guidelinecollapse index
  
//returns number < 0 if error
+
//returns number < 0 if error
//returns the previous state (0|1) if index is used
+
//returns the previous marge if index is used
//returns nothing if several guidelines changed
+
//returns nothing if several guidelines changed
tv_guidelinesnap "all"|"line"|"circle"|"segment"|"grid"|...|index 0|1|"on"|"off"|"true"|"false"|"toggle"
+
tv_guidelinemarge "all"|"line"|"circle"|"segment"|"grid"|...|index new-marge
//returns the state of the guideline
+
//returns the marge of the guideline
tv_guidelinesnap index
+
tv_guidelinecollapse index
  
//returns number < 0 if error
+
//returns number < 0 if error
//returns the previous state (0|1) if index is used
+
//returns the previous color if index is used
//returns nothing if several guidelines changed
+
//returns nothing if several guidelines changed
tv_guidelinecollapse "all"|"line"|"circle"|"segment"|"grid"|...|index 0|1|"on"|"off"|"true"|"false"|"toggle"
+
tv_guidelinecolor "all"|"line"|"circle"|"segment"|"grid"|...|index r g b a
//returns the state of the guideline
+
//returns the color of the guideline
tv_guidelinecollapse index
+
tv_guidelinecolor
  
//returns number < 0 if error
+
//returns number < 0 if error
//returns the previous marge if index is used
+
//returns the index of the found guideline at the given position in the whole list
//returns nothing if several guidelines changed
+
//returns "none" if no guideline found
tv_guidelinemarge "all"|"line"|"circle"|"segment"|"grid"|...|index new-marge
+
//in this first case, the returned index = given position
//returns the marge of the guideline
+
tv_guidelineenum position
tv_guidelinecollapse index
+
//returns the index of the found guideline at the given position in the list made of the wanted type
 +
//returns "none" if no guideline found
 +
tv_guidelineenum position "line"|"circle"|"segment"|"grid"|...
  
//returns number < 0 if error
+
e.g.: list of guidelines
//returns the previous color if index is used
+
- 0 line
//returns nothing if several guidelines changed
+
- 1 segment
tv_guidelinecolor "all"|"line"|"circle"|"segment"|"grid"|...|index r g b a
+
- 2 circle
//returns the color of the guideline
+
- 3 circle
tv_guidelinecolor
+
- 4 segment
 +
- 5 line
  
//returns number < 0 if error
+
tv_guidelineenum 0 "circle" -> 2
//returns the index of the found guideline at the given position in the whole list
+
tv_guidelineenum 1 "circle" -> 3
//returns "none" if no guideline found
+
tv_guidelineenum 2 "circle" -> "none"
//in this first case, the returned index = given position
+
tv_guidelineenum 0 "segment" -> 1
tv_guidelineenum position
+
tv_guidelineenum 1 "segment" -> 4
//returns the index of the found guideline at the given position in the list made of the wanted type
+
//returns "none" if no guideline found
+
tv_guidelineenum position "line"|"circle"|"segment"|"grid"|...
+
  
e.g.: list of guidelines
 
- 0 line
 
- 1 segment
 
- 2 circle
 
- 3 circle
 
- 4 segment
 
- 5 line
 
  
tv_guidelineenum 0 "circle" -> 2
+
//returns "ERROR" if error
tv_guidelineenum 1 "circle" -> 3
+
//returns the name of the guideline
tv_guidelineenum 2 "circle" -> "none"
+
tv_guidelinename position
tv_guidelineenum 0 "segment" -> 1
+
//returns the previous name of the guideline
tv_guidelineenum 1 "segment" -> 4
+
tv_guidelinename position new-name
 
+
 
+
//returns "ERROR" if error
+
//returns the name of the guideline
+
tv_guidelinename position
+
//returns the previous name of the guideline
+
tv_guidelinename position new-name
+

Revision as of 07:19, 27 August 2013

//=======================================================================================
// George commands
//=======================================================================================
//returns number < 0 if error
//returns the index of the new guideline
tv_guidelineadd "line" ["x" value] ["y" value] ["angle" value]
tv_guidelineadd "circle" ["x" value] ["y" value] ["radius" value]
tv_guidelineadd "ellipse" ["x" value] ["y" value] ["radiusa" value] ["radiusb" value]
tv_guidelineadd "segment" ["x1" value] ["y1" value] ["x2" value] ["y2" value]
tv_guidelineadd "grid" ["x" value] ["y" value] ["w" value] ["h" value]
tv_guidelineadd "fieldchart"
tv_guidelineadd "animatorfield"
tv_guidelineadd "safearea" ["out" value] ["in" value]
tv_guidelineadd "image" ["path" value] ["x" value] ["y" value] ["rotation" value] ["scale" value]
//returns number < 0 if error
//returns the previous values of the index guideline
//for line
tv_guidelinemodify index ["x" value] ["y" value] ["angle" value]
//for circle
tv_guidelinemodify index ["x" value] ["y" value] ["radius" value]
//for ellipse 
tv_guidelinemodify index ["x" value] ["y" value] ["radiusa" value] ["radiusb" value]
//for segment
tv_guidelinemodify index ["x1" value] ["y1" value] ["x2" value] ["y2" value]
//for grid
tv_guidelinemodify index ["x" value] ["y" value] ["w" value] ["h" value]
//for safearea
tv_guidelinemodify index ["out" value] ["in" value]
//for image
tv_guidelinemodify index ["path" value] ["x" value] ["y" value] ["rotation" value] ["scale" value]

//returns number < 0 if error
tv_guidelineremove "all"|"line"|"circle"|"segment"|"grid"|...|index

//returns number < 0 if error
//returns the previous state (0|1) if index is used
//returns nothing if several guidelines changed
tv_guidelinevisible "all"|"line"|"circle"|"segment"|"grid"|...|index 0|1|"on"|"off"|"true"|"false"|"toggle"
//returns the state of the guideline
tv_guidelinevisible index
//returns number < 0 if error
//returns the previous state (0|1) if index is used
//returns nothing if several guidelines changed
tv_guidelinesnap "all"|"line"|"circle"|"segment"|"grid"|...|index 0|1|"on"|"off"|"true"|"false"|"toggle"
//returns the state of the guideline
tv_guidelinesnap index
//returns number < 0 if error
//returns the previous state (0|1) if index is used
//returns nothing if several guidelines changed
tv_guidelinecollapse "all"|"line"|"circle"|"segment"|"grid"|...|index 0|1|"on"|"off"|"true"|"false"|"toggle"
//returns the state of the guideline
tv_guidelinecollapse index
//returns number < 0 if error
//returns the previous marge if index is used
//returns nothing if several guidelines changed
tv_guidelinemarge "all"|"line"|"circle"|"segment"|"grid"|...|index new-marge
//returns the marge of the guideline
tv_guidelinecollapse index
//returns number < 0 if error
//returns the previous color if index is used
//returns nothing if several guidelines changed
tv_guidelinecolor "all"|"line"|"circle"|"segment"|"grid"|...|index r g b a
//returns the color of the guideline
tv_guidelinecolor
//returns number < 0 if error
//returns the index of the found guideline at the given position in the whole list
//returns "none" if no guideline found
//in this first case, the returned index = given position
tv_guidelineenum position
//returns the index of the found guideline at the given position in the list made of the wanted type
//returns "none" if no guideline found
tv_guidelineenum position "line"|"circle"|"segment"|"grid"|...
e.g.: list of guidelines
- 0 line
- 1 segment
- 2 circle
- 3 circle
- 4 segment
- 5 line
tv_guidelineenum 0 "circle" -> 2
tv_guidelineenum 1 "circle" -> 3
tv_guidelineenum 2 "circle" -> "none"
tv_guidelineenum 0 "segment" -> 1
tv_guidelineenum 1 "segment" -> 4


//returns "ERROR" if error
//returns the name of the guideline
tv_guidelinename position
//returns the previous name of the guideline
tv_guidelinename position new-name