From 829fa0cfdcc1269c9813f4b193031059c0debc4f Mon Sep 17 00:00:00 2001 From: eska Date: Tue, 8 Dec 2015 19:33:50 +0100 Subject: Fix "Play Project" button --- tools/editor/editor_node.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/editor/editor_node.cpp b/tools/editor/editor_node.cpp index 8e39ce36f8..b319317c7d 100644 --- a/tools/editor/editor_node.cpp +++ b/tools/editor/editor_node.cpp @@ -1754,7 +1754,7 @@ void EditorNode::_run(bool p_current,const String& p_custom) { } play_button->set_pressed(false); - play_button->set_icon(gui_base->get_icon("Play","EditorIcons")); + play_button->set_icon(gui_base->get_icon("MainPlay","EditorIcons")); //pause_button->set_pressed(false); play_scene_button->set_pressed(false); play_scene_button->set_icon(gui_base->get_icon("PlayScene","EditorIcons")); @@ -2626,7 +2626,7 @@ void EditorNode::_menu_option_confirm(int p_option,bool p_confirmed) { editor_run.stop(); play_button->set_pressed(false); - play_button->set_icon(gui_base->get_icon("Play","EditorIcons")); + play_button->set_icon(gui_base->get_icon("MainPlay","EditorIcons")); play_scene_button->set_pressed(false); play_scene_button->set_icon(gui_base->get_icon("PlayScene","EditorIcons")); //pause_button->set_pressed(false); -- cgit v1.2.3 From e7581a97e7c18d74addf818e55f7161a062e291a Mon Sep 17 00:00:00 2001 From: eska Date: Wed, 9 Dec 2015 23:21:37 +0100 Subject: Update Autoload demo --- demos/misc/autoload/global.gd | 27 +++++++++++++-------------- demos/misc/autoload/scene_a.gd | 11 ----------- demos/misc/autoload/scene_b.gd | 11 ----------- 3 files changed, 13 insertions(+), 36 deletions(-) diff --git a/demos/misc/autoload/global.gd b/demos/misc/autoload/global.gd index 2671b6f412..735995e806 100644 --- a/demos/misc/autoload/global.gd +++ b/demos/misc/autoload/global.gd @@ -1,7 +1,9 @@ extends Node -# Member variables -var current_scene = null + +# Changing scenes is most easily done using the functions `change_scene` +# and `change_scene_to` of the SceneTree. This script demonstrates how to +# change scenes without those helpers. func goto_scene(path): @@ -18,20 +20,17 @@ func goto_scene(path): func _deferred_goto_scene(path): - # Immediately free the current scene, - # there is no risk here. - current_scene.free() + # Immediately free the current scene, there is no risk here. + get_tree().get_current_scene().free() # Load new scene - var s = ResourceLoader.load(path) + var packed_scene = ResourceLoader.load(path) # Instance the new scene - current_scene = s.instance() + var instanced_scene = packed_scene.instance() - # Add it to the active scene, as child of root - get_tree().get_root().add_child(current_scene) - - -func _ready(): - # Get the current scene at the time of initialization - current_scene = get_tree().get_current_scene() + # Add it to the scene tree, as direct child of root + get_tree().get_root().add_child(instanced_scene) + + # Set it as the current scene, only after it has been added to the tree + get_tree().set_current_scene(instanced_scene) diff --git a/demos/misc/autoload/scene_a.gd b/demos/misc/autoload/scene_a.gd index f9c39887b0..03da86d9a0 100644 --- a/demos/misc/autoload/scene_a.gd +++ b/demos/misc/autoload/scene_a.gd @@ -1,16 +1,5 @@ - extends Panel -# Member variables here, example: -# var a=2 -# var b="textvar" - - -func _ready(): - # Initalization here - pass - func _on_goto_scene_pressed(): get_node("/root/global").goto_scene("res://scene_b.scn") - pass # Replace with function body diff --git a/demos/misc/autoload/scene_b.gd b/demos/misc/autoload/scene_b.gd index fdf2287a04..dea8c4623f 100644 --- a/demos/misc/autoload/scene_b.gd +++ b/demos/misc/autoload/scene_b.gd @@ -1,16 +1,5 @@ - extends Panel -# Member variables here, example: -# var a=2 -# var b="textvar" - - -func _ready(): - # Initalization here - pass - func _on_goto_scene_pressed(): get_node("/root/global").goto_scene("res://scene_a.scn") - pass # Replace with function body -- cgit v1.2.3 From 5b03af6b732c42aa310aeb47dc87d8edcb5f55e5 Mon Sep 17 00:00:00 2001 From: eska Date: Thu, 10 Dec 2015 23:48:03 +0100 Subject: Fix exponential sliders --- scene/gui/slider.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scene/gui/slider.cpp b/scene/gui/slider.cpp index b6292c544b..78b5dabeb4 100644 --- a/scene/gui/slider.cpp +++ b/scene/gui/slider.cpp @@ -50,9 +50,9 @@ void Slider::_input_event(InputEvent p_event) { grab.pos=orientation==VERTICAL?mb.y:mb.x; double max = orientation==VERTICAL ? get_size().height : get_size().width ; if (orientation==VERTICAL) - set_val( ( ( -(double)grab.pos / max) * ( get_max() - get_min() ) ) + get_max() ); + set_unit_value( 1 - ((double)grab.pos / max) ); else - set_val( ( ( (double)grab.pos / max) * ( get_max() - get_min() ) ) + get_min() ); + set_unit_value((double)grab.pos / max); grab.active=true; grab.uvalue=get_unit_value(); } else { -- cgit v1.2.3 From a028840ea5cfc6ac4e80d99c4850ae3f10eeb353 Mon Sep 17 00:00:00 2001 From: eska Date: Thu, 10 Dec 2015 23:53:19 +0100 Subject: Fix editing TreeItem cells in range mode - Show slider when editing range mode tree cells per mouse input - Hide slider after using keyboard controls to edit range mode tree cells --- scene/gui/tree.cpp | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/scene/gui/tree.cpp b/scene/gui/tree.cpp index ee7c0724e3..1b204cff65 100644 --- a/scene/gui/tree.cpp +++ b/scene/gui/tree.cpp @@ -1721,6 +1721,7 @@ void Tree::text_editor_enter(String p_text) { text_editor->hide(); + value_editor->hide(); if (!popup_edited_item) return; @@ -2167,18 +2168,9 @@ void Tree::_input_event(InputEvent p_event) { range_drag_enabled=false; Input::get_singleton()->set_mouse_mode(Input::MOUSE_MODE_VISIBLE); warp_mouse(range_drag_capture_pos); - } else { - text_editor->set_pos(pressing_item_rect.pos); - text_editor->set_size(pressing_item_rect.size); - - text_editor->clear(); - text_editor->set_text( pressing_for_editor_text ); - text_editor->select_all(); + } else + edit_selected(); - text_editor->show_modal(); - text_editor->grab_focus(); - - } pressing_for_editor=false; } -- cgit v1.2.3 From 3dead22454f40cbf34ae7015143936acb359580b Mon Sep 17 00:00:00 2001 From: Franklin Sobrinho Date: Sat, 12 Dec 2015 14:06:27 -0300 Subject: Fix crash caused by a empty NavigationMesh --- tools/editor/spatial_editor_gizmos.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tools/editor/spatial_editor_gizmos.cpp b/tools/editor/spatial_editor_gizmos.cpp index 5efca44c7d..04a6b1b437 100644 --- a/tools/editor/spatial_editor_gizmos.cpp +++ b/tools/editor/spatial_editor_gizmos.cpp @@ -2283,6 +2283,8 @@ void NavigationMeshSpatialGizmo::redraw() { } } + if (faces.empty()) + return; Map<_EdgeKey,bool> edge_map; DVector tmeshfaces; @@ -2330,7 +2332,7 @@ void NavigationMeshSpatialGizmo::redraw() { } } - Ref tmesh = memnew( TriangleMesh); + Ref tmesh = memnew( TriangleMesh ); tmesh->create(tmeshfaces); if (lines.size()) -- cgit v1.2.3 From 61eb037d5de92b75238b16083c66e489b43ea327 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Sat, 12 Dec 2015 20:53:57 +0100 Subject: Remove outdated documentation --- .gitignore | 8 +- doc/core_classes.xml | 2654 --- doc/deferred_format.txt | 33 - doc/demos.txt | 40 - doc/engine_classes.xml | 17940 ------------------- doc/examples/physics/script/test_base.sq | 295 - doc/examples/physics/script/test_fall.sq | 42 - doc/gdscript.lyx | 2531 --- doc/godot_splash.png | Bin 9801 -> 0 bytes doc/header.txt | 12 - doc/html/@GDScript.html | 93 - doc/html/@Global Scope.html | 459 - doc/html/@Squirrel.html | 2 - doc/html/main.css | 146 - .../0_home_red_coding_godot_doc_math_position.png | Bin 1679 -> 0 bytes .../1_home_red_coding_godot_doc_math_direction.png | Bin 3600 -> 0 bytes .../2_home_red_coding_godot_doc_math_normals.png | Bin 2452 -> 0 bytes doc/html/tutorial01/tutorial.css | 128 - doc/html/tutorial01/tutorial.html | 902 - doc/html/tutorial01/tutorial0x.png | Bin 2056 -> 0 bytes doc/html/tutorial01/tutorial1x.png | Bin 4122 -> 0 bytes doc/html/tutorial01/tutorial2x.png | Bin 618 -> 0 bytes doc/html/tutorial01/tutorial3x.png | Bin 754 -> 0 bytes doc/html/tutorial01/tutorial4x.png | Bin 2961 -> 0 bytes doc/notes.txt | 20 - doc/phys_engine.png | Bin 29177 -> 0 bytes doc/squirrel.lyx | 984 - doc/todo.txt | 39 - doc/tutorial/01 Getting Started.lyx | 557 - doc/tutorial/editor.png | Bin 81238 -> 0 bytes doc/tutorial/pm.png | Bin 36586 -> 0 bytes doc/tutorial/pmc.png | Bin 22446 -> 0 bytes doc/tutorial/tute1_1.png | Bin 8719 -> 0 bytes doc/tutorial/tute1_2.png | Bin 12907 -> 0 bytes doc/tutorial/tute1_2b.png | Bin 3154 -> 0 bytes doc/tutorial/tute1_3a.png | Bin 6660 -> 0 bytes doc/tutorial/tute1_3b.png | Bin 27956 -> 0 bytes doc/tutorial/tute1_3c.png | Bin 3785 -> 0 bytes doc/tutorial/tute1_4a.png | Bin 17321 -> 0 bytes doc/tutorial/tute1_4b.png | Bin 5421 -> 0 bytes doc/tutorial/tute1_5a.png | Bin 25190 -> 0 bytes doc/tutorial/tute1_5b.png | Bin 47382 -> 0 bytes doc/tutorial/tute1_6.png | Bin 2555 -> 0 bytes doc/tutorial/tute1_7.png | Bin 1445 -> 0 bytes doc/undoredoapi.txt | 25 - 45 files changed, 3 insertions(+), 26907 deletions(-) delete mode 100644 doc/core_classes.xml delete mode 100644 doc/deferred_format.txt delete mode 100644 doc/demos.txt delete mode 100644 doc/engine_classes.xml delete mode 100644 doc/examples/physics/script/test_base.sq delete mode 100644 doc/examples/physics/script/test_fall.sq delete mode 100644 doc/gdscript.lyx delete mode 100644 doc/godot_splash.png delete mode 100644 doc/header.txt delete mode 100644 doc/html/@GDScript.html delete mode 100644 doc/html/@Global Scope.html delete mode 100644 doc/html/@Squirrel.html delete mode 100644 doc/html/main.css delete mode 100644 doc/html/tutorial01/0_home_red_coding_godot_doc_math_position.png delete mode 100644 doc/html/tutorial01/1_home_red_coding_godot_doc_math_direction.png delete mode 100644 doc/html/tutorial01/2_home_red_coding_godot_doc_math_normals.png delete mode 100644 doc/html/tutorial01/tutorial.css delete mode 100644 doc/html/tutorial01/tutorial.html delete mode 100644 doc/html/tutorial01/tutorial0x.png delete mode 100644 doc/html/tutorial01/tutorial1x.png delete mode 100644 doc/html/tutorial01/tutorial2x.png delete mode 100644 doc/html/tutorial01/tutorial3x.png delete mode 100644 doc/html/tutorial01/tutorial4x.png delete mode 100644 doc/notes.txt delete mode 100644 doc/phys_engine.png delete mode 100644 doc/squirrel.lyx delete mode 100644 doc/todo.txt delete mode 100644 doc/tutorial/01 Getting Started.lyx delete mode 100644 doc/tutorial/editor.png delete mode 100644 doc/tutorial/pm.png delete mode 100644 doc/tutorial/pmc.png delete mode 100644 doc/tutorial/tute1_1.png delete mode 100644 doc/tutorial/tute1_2.png delete mode 100644 doc/tutorial/tute1_2b.png delete mode 100644 doc/tutorial/tute1_3a.png delete mode 100644 doc/tutorial/tute1_3b.png delete mode 100644 doc/tutorial/tute1_3c.png delete mode 100644 doc/tutorial/tute1_4a.png delete mode 100644 doc/tutorial/tute1_4b.png delete mode 100644 doc/tutorial/tute1_5a.png delete mode 100644 doc/tutorial/tute1_5b.png delete mode 100644 doc/tutorial/tute1_6.png delete mode 100644 doc/tutorial/tute1_7.png delete mode 100644 doc/undoredoapi.txt diff --git a/.gitignore b/.gitignore index d947306558..fc8f413717 100644 --- a/.gitignore +++ b/.gitignore @@ -24,8 +24,9 @@ tools/editor/editor_icons.cpp make.bat log.txt -# Doxygen generated documentation -doc/doxygen/* +# Documentation generated by doxygen or scripts +doc/doxygen/ +doc/html/ # Javascript specific *.bc @@ -189,9 +190,6 @@ AutoTest.Net/ # Installshield output folder [Ee]xpress/ -# dumpdoc generated files -doc/html/class_list - # DocProject is a documentation generator add-in DocProject/buildhelp/ DocProject/Help/*.HxT diff --git a/doc/core_classes.xml b/doc/core_classes.xml deleted file mode 100644 index c37b50f122..0000000000 --- a/doc/core_classes.xml +++ /dev/null @@ -1,2654 +0,0 @@ - - - - - Vector class, which performs basic 3D vector math operations. - - - Vector3 is one of the core classes of the engine, and includes several built-in helper functions to perform basic vecor math operations. - - - - - - - Sum. - - - Add two vectors. - - - - - - - Difference. - - - Substract two vectors. - - - - - - - Quotient. - - - Divide two vectors (component wise). - - - - - - - Product. - - - Multiply two vectors (components wise). - - - - - Axis Index. - - - Value. - - - Set an individual axis (0 is X, 1 is Y and 2 is Z). the enum constants Vector.AXIS_X, Vector.AXIS_Y, and Vector.AXIS_Z, are also valid. This is specially useful for for-loops. - - - - - Axis Index. - - - Value. - - - Set an individual axis (0 is X, 1 is Y and 2 is Z). the enum constants Vector.AXIS_X, Vector.AXIS_Y, and Vector.AXIS_Z, are also valid. This is specially useful for for-loops. - - - - - Length: sqrt(x^2+y^2+z^2) - - - Return the length of the vector. - - - - - Squared Length: x^2+y^2+z^2. - - - Return the length of the vector, without the square root step. - - - - - Normalize the vector to unit length. This is the same as v = v / v.length() - - - - - - - Return a copy of the normalized vector to unit length. This is the same as v / v.length() - - - - - Inverse: 1/v - - - Returns the inverse of the vector. this is the same as Vector3( 1.0 / v.x, 1.0 / v.y, 1.0 / v.z ) - - - - - Set x,y and z to 0. - - - - - - - Snap the vector in each axis the the lowest nearest multiple. ie: 4,5,7 snapped to 2 equals 4,4,6. - - - - - - - Snapped copy. - - - Return a copy of the vector, snapped to the lowest neared multiple. - - - - - - - - - - - Linearly interpolates the vector to a given one (b), by the given amount (i) - - - - - - - - - - - - - - - Perform a cubic interpolation between vectors a,b,c,d (b is current), by the given amount (i). - - - - - - - Cross product. - - - Return the cross product with b. - - - - - - - - - Return the dot product with b. - - - - - - - - - Return the distance to b. - - - - - - - - - Return the squared distance (distance minus the last square root) to b. - - - - - - - - - - - - - - - - - - - - - - - Axis-Aligned-Bounding-Box. - - - AABB stands for "Axis Aligned Bounding Box". It consits of a position and a size, which for an box that is always aligned to the x, y and z axis, which goes from "pos" to "pos+size". - - - - - - - Returns true if the AABB volume is empty (even if it has a surface). Holds true if size.x,y or z is 0. - - - - - - - Return true if size is 0,0,0. - - - - - - - Compute the volume of the AABB. - - - - - - - - - Returns true if this AABB shares a portion of space with b. - - - - - - - - - Returns true if this AABB completely encloses b. - - - - - - - Expand this AABB to also enclose the area of b. - - - - - - - - - Return the shared portion of space with b (empty if they don't intersect). - - - - - - - - - result (if they intersect) - - - normal (if they intersect) - - - - - Returns true if this AABB intersects segment "a" towards "b". Also, return the point and normal of intersection. - - - - - - - - - Returns true if this AABB intersects the plane b. - - - - - - - - - Return true if this AABB contains point "p". - - - - - Axis direction - - - Get the normal of the longest axis in this AABB. - - - - - - - Get the index of the longest axis in this AABB. - - - - - Get the length of the longest axis in this AABB. - - - - - - - - - - - Get one of the edges (0 to 11) of this AABB in "ra" and "rb". - - - - - - - Grow this AABB, by expanding its margin, by "s". - - - - - - - Expand this AABB to contain point "p". - - - - - - Position of the AABB. - - - Suze of the AABB (should always be positive). - - - - - - Plane in hessian form. - - - Plane represents a normalized plane equation. Basically, "normal" is the normal of the plane (a,b,c normalized), and "d" is the distance from the origin to the plane (in the direction of "normal"). "Over" or "Above" the plane is considered the side of the plane towards where the normal is pointing. - - - - - Normalize the plane (although it will be often normalized already). - - - - - - - Returns a copy of the plane, normalized. - - - - - - - - - Returns true if "p" is located above the plane. - - - - - - - - - Returns the orthogonal distance from "p" to the plane. If positive, "p" is above, if negative, "p" is below. - - - - - - - - - Returns true if "p" is inside the plane (by a very minimum treshold). - - - - - - - - - - - - - Returns true if this plane intersects with planes "a" and "b". The resulting intersectin is placed in "r". - - - - - - - - - - - - - Returns true if ray consiting of position "p" and direction normal "d" intersects this plane. If true, the result is placed in "r". - - - - - - - - - - - - - Returns true if segment from position "sa" to position "sb" intersects this plane. If true, the result is placed in "r". - - - - - - - - - - Returns the orthogonal projection of point "p" into a point in the plane. - - - - - - - - - Returns true if plane "b" is very similar to this one. - - - - - - Plane normal vector (a,c and d in the plane equation normalized). - - - Plane distance (d in the plane equation). - - - - - - Quaternion. - - - Quaternion is a 4 dimensional vector that is used to represet a rotation. It mainly exists to perform SLERP (spherical-linear interpolation) between to rotations obtained by a Matrix3 cheaply. Adding quaternions also cheaply adds the rotations, however quaternions need to be often normalized, or else they suffer from precision issues. - - - - - - - Returns the length of the quaternion. - - - - - - - Returns the length of the quaternion, minus the square root. - - - - - Normalize the quaternion to unit length. - - - - - - - Returns a copy of the quaternion, normalized to unit length. - - - - - - - Returns the inverse of the quaternion (applies to the inverse rotatio too). - - - - - - - - - Returns the dot product between two quaternions. - - - - - - - Create a quaternion from euler rotation "e", as yaw, pitch, roll. - - - - - - - - - - - Perform a spherical-linear interpolation with another quaternion. - - - - - - - - - Peform multiplication between two quaternions. - - - - - - x-axis - - - y-axis - - - z-axis - - - w-axis - - - - - - 3x3 Matrix. - - - Matrix represent a 3x3 (3 rows by 3 columns) transformation matrix. it is used mainly to represent and accumulate transformations such as rotation or scale when used as an OCS (oriented coordinate system). - - - - - Invert the matrix (transformations are reversed). - - - - - Transpose the matrix (transformations are reversed only for orthogonal matrices). - - - - - - - Returns the inverse of the matrix. - - - - - - - Returns the transposition of the matrix. - - - - - - - - - Rotates the matrix in normalized "axis" by amount "phi" in radians. (This is equivalent to glRotate from OpenGL). - - - - - - - Scale each axis of the rotated matrix by 's". - - - - - - - Get the scale of the matrix. - - - - - - - Create an orthogonal matrix from euler angles "e", as yaw, pitch, roll. - - - - - - - Computes and returns the euler engles for an orthogonal matrix, as yaw, pitch, roll. - - - - - - - - - Computes and returns a dot product with transposed axis x. - - - - - - - - - Computes and returns a dot product with transposed axis y. - - - - - - - - - Computes and returns a dot product with transposed axis z. - - - - - - - - - Transforms vector "v" by this matrix (as M x V) and returns the result. - - - - - - - - - Inverse-transforms vector "v" by this matrix (as V x M) and returns the result. - - - - - - - - - Get an axis of the OCS. (0 is X, 1 is Y and 2 is Z). The enum constants Vector.AXIS_X, Vector.AXIS_Y, and Vector.AXIS_Z, are also valid. This is equivalent to get_column(). - - - - - - - - - Set an axis of the OCS. (0 is X, 1 is Y and 2 is Z). The enum constants Vector.AXIS_X, Vector.AXIS_Y, and Vector.AXIS_Z, are also valid. This is equivalent to set_column() - - - - - - - - - Get a matrix row. - - - - - - - - - Set a matrix row. - - - - - - - - - Get a matrix column. This is equivalent to get_axis() - - - - - - - - Set a matrix column. This is equivalent to set_axis - - - - - - - - - - Perform a matrix multiplication (M x N) and return the result. - - - - - - - - - Perform a transposed-matrix multiplication (Mt x N) and return the result. - - - - - - - - - - - - - - - - - - - - - - - - - - - Transformation. - - - Transform is used to store transformations, including translations. It consists of a Matrix3 "basis" and Vector3 "origin". Transform is used to represent transformations of any object in space. It is similar to a 4x3 matrix. - - - - - Invert the transform. - - - - - - - - Returns the inverse of the transform. - - - - - - - - - Rotates the transform in normalized "axis" by amount "phi" in radians. (This is equivalent to glRotate from OpenGL). - - - - - - - Scales the whole transform by "s" (including the origin) - - - - - - - Get the basis. - - - - - - - Translate the transform by "v". - - - - - "Eye" Position. - - - "Target" Position. - - - "Up" Normal Vector. - - - Creates a transform positioned at "eye", looking towards "target". "up" represents the direction where "up" is. This function is useful for setting up cameras. - - - - - - - - - Transforms vector "v" by this transform. - - - - - - - - - Inverse-transforms vector "v" by this transform. - - - - - - - - - Transforms AABB "a" by this transform. The resulting aabb will often be larger, so succesive transforms are not recommended. - - - - - - - - - Inverse-transforms AABB "a" by this transform. The resulting aabb will often be larger, so succesive transforms are not recommended. - - - - - - - - - Transform plane "p" by this transform. - - - - - - - - - Inverse-transforms plane "p" by this transform. - - - - - - Transform "basis" or OCS. - - - Transform origin. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Vector used for 2D Math. - - - Vector class, which performs basic 2D vector math operations. - - - - - - - - - Add two vectors. - - - - - - - - - Substract two vectors. - - - - - - - - - Divide two vectors. - - - - - - - - - Multiply two vectors. - - - - - - - Returns the length of the vector. - - - - - - - Returns the squared length of the vector. - - - - - Normalizes the vector to unit length. - - - - - - - Returns a normalized vector to unit length. - - - - - Sets x and y to 0. - - - - - - - - - - - Returns the result of the linear interpolation between this vector and "b", by amount "i". - - - - - - - - - Returns the dot product with vector "b". - - - - - - - - - Returns the distance to vector "b". - - - - - - - Remove the fractional part of x and y. - - - - - - - - - - - - - - - Positioned rectangle in 2D. - - - Rect2 represets a positioned rectangle of position "pos" and "size". - - - - - - - Returns "true" if the rectangle has no area. - - - - - - - - - Returns true if v is contained within the rectangle. - - - - - - - Extend the rectangle to enclose "b". - - - - - - - - - Return the interection with rectangle "b" - - - - - - - Extend the rectangle margin by "m". - - - - - - Position of the rectangle. - - - Size of the rectangle. - - - - - - - - - - - - - - - Color in RGBA format. - - - A color is represented as red, green and blue (r,g,b) components. Additionally, "a" represents the alpha component, often used for transparency. - - - - - - - Convert the color to a 32 its integer (each byte represets a RGBA). - - - - - - - Convert the color to gray. - - - - - - - Compute the "hue" of the color. - - - - - - - Compute the "saturation" of the color. - - - - - - - Compute the "value" of the color. - - - - - - - - - - - Set the color from the HSV format. - - - - - Invert the color. - - - - - Contrast the color. - - - - - - - (0 to 1) - - - Linearly blend with color "c", by amount "i". - - - - - - Red. - - - Green. - - - Blue. - - - Alpha. - - - - - - Two Dimensional Image. - - - Image represents a two-dimensional representation of an image, composed by a color per pixel. - - - - - - - Returns the width of the image (in pixels). - - - - - - - Returns the height of the image (in pixels). - - - - - - - - - - - Get the color of the pixel at position (x,y). - - - - - - - - - - - Sets the color of the pixel at position (x,y). - - - - - - - Convert the image to a new format (valid values in the FORMAT_* enumeration). - - - - - - - Get the image format (valid values in the FORMAT_* enumeration). - - - - - - - - - Resize the image to a new pixel resolution given by width,height. - - - - - - - - - Crop the image to a new pixel resolution given by width,height. - - - - - Flip the X axis of the image. - - - - - Flip the Y axis of the image. - - - - - - - Create a mipmap from "source" image. - - - - - - - Create a normalmap from "height_scale" image. - - - - - - - - - - - Create a new image of size width, height and format. - - - - - - - - - - - - - Import an image from raw data, given a specific format. - - - - - - - Returns true if the image is empty. - - - - - - - - - Load an image from a file in "path". - - - - - - - - - - - - - - - - - - - - - - - Resource ID. - - - RID references a resource, typically created in a server. - - - - - - - Returns true if the resource is valid. - - - - - - - A struct containing information fron an input device. - - - A struct containing information fron an input event, such as mouse, keyboard, joystick, etc. Valid event types are:

- -
  • InputEvent.NONE
  • -
  • InputEvent.KEY
  • -
  • InputEvent.MOUSE_BUTTON
  • -
  • InputEvent.MOUSE_MOTION
  • -
  • InputEvent.JOYSTICK_MOTION
  • -
  • InputEvent.JOYSTICK_BUTTON
  • -
    - -
    - - - Event ID. Every event as a unique ID. - - - Event type (check description). - - - Device that originated the event. - - - Mouse x position (for mouse events). - - - Mouse y position (for mouse events). - - - State of the mouse buttons as a bitmask (for key and mouse events) - - - Global mouse x position (used in GUI Controls). - - - Global mouse y position (used in GUI Controls). - - - if MOUSE_BUTTON was a press, this value is true. - - - if MOUSE_BUTTON was a doubleclick, this value is true. - - - Index of the clicked button (mouse button event). - - - Relative x motion of the mouse (mouse motion event). - - - Relative y motion of the mouse (mouse motion event). - - - If ALT modifier is pressed, this is true (mouse and key events). - - - If SHIFT modifier is pressed, this is true (mouse and key events). - - - If CONTROL modifier is pressed, this is true (mouse and key events). - - - If META modifier (win/apple/etc keys) is pressed, this is true (mouse and key events). - - - if a KEY event originated from a keypress, this is true. - - - if a KEY event originated from an echo key, this is true. - - - Unicode value of a key pressed (key event). - - - Scancode of a key pressed (check the KEY_* enumeration) (key event). - - - Joystick button index (joy button event). - - - If joystick button was pressed, this is true (joy button event). - - - Index of the pressed/released joystick button. - - - Axis of a joystick (joy axis event). - - - Axis value a joystick, from -1 to 1 (joy axis event). - - - - - Empty input event. - - - Key pressed/released event. - - - Mouse button pressed/released event. - - - Joystick axis motion event. - - - Joystick button press/release event. - - - -
    - - - File Access Interface. - - - FileAccess provides access to files in the host platform (remote access to files in webserver in the web plugin, as web plugin does not access the local filesystem). - - - - - Path to a file - - - Open mode: FileAccess.READ, FileAccess.WRITE or FileAccess.READ_WRITE - - - Error value (check the ERR_ macro for the meaning of the values) - - - Open a file in a given path. Error is returned if the file can't be opened, is nt found, etc. - - - - - Closes a currently open file. - - - - - - - Returns true if a file is currently open. - - - - - - - Seek to a given position (in bytes) in the file. - - - - - - - Seek to a given position (in bytes) in the file, from the end of the file. - - - - - - - Get the current position in the file. - - - - - - - Get the open file size (in bytes). - - - - - - - Returns true if EOF was reached (read past end of file). - - - - - - - Read a byte from the file. - - - - - - - Read a 16-bits unsigned integer from the file, in little/big endian format. - - - - - - - Read a 32-bits unsigned integer from the file, in little/big endian format. - - - - - - - Change the endian mode for reading sizes larger than a byte (read big endian files). - - - - - - - Return the status of the endian swap. - - - - - - - Store a byte in the file. - - - - - - - Store a 16-bits integer in the file. - - - - - - - Store a 32 bits integer in the file. - - - - - - - - - Returns true if a given file (in path) exist. - - - - - - - - - - - - - - - - Directory Tree Access Interface. - - - Dir provides access to directories in the host platform (remote access to files in webserver in the web plugin, as web plugin does not access the local filesystem). - - - - - true if an error ocurred. - - - Begin a directory listing. This is done iteratively due to the positility of directories with a large amount of entries. - - - - - - - Get the next item. If the return value is empty (""), then the end of the directory has been reached. - - - - - - - Returns true if the current item is a directory (not a file). - - - - - End the directory listing. - - - - - - - Get the amount of drives (windows only, returns 0 on other platforms). - - - - - - - - - Get the string (or character) representing the drive (such as "C","D",etc). - - - - - - - - - Change the current directory of the dir access. "dir" can be either absolute or relative. - - - - - - - Get the full path of the current dir. - - - - - - - Get the string or character most commonly used as drive separator in the host OS. - - - - - - - true on error. - - - Create a new directory. "name" can be either absolute or relative. - - - - - - - - - Returns true if a file exist. "path" can be either absolute or relative. - - - - - - - Return the space left on the device, in kilobytes. - - - - - - - Video Mode structure. - - - Describes a video mode. - - - - - - - - "true" if the video mode is full scren. - - - "true" if the video mode can be resized to another video mode. - - - - - - Date structure. - - - Describes a date. - - - - year (integer) - - - day of the year - - - day of the week (0 to 6) - - - month of the year (0 to 11) - - - "true" if daylight savings is enabled. - - - - - - Current Time. - - - Describes the current time. - - - - (0 to 11) - - - (0 to 59) - - - (0 to 59) - - - - - - Operating System common functions. - - - OS provides access to common host OS functions. "OS" Must not be instanced. All members are static (called like OS.get_name() ). - - - - - - - Produce an alert. On OSs such as windows or mac, this may result in a popup dialog. - - - - - - - Determine the hardware cursor visibility (if available). - - - - - - - Capture the hardware cursor (if available). - - - - - - - Returns true if the application is capturing the hardware cursor. - - - - - - - Get the name of the host OS or Platform. - - - - - - - Change the current videomode (if available). - - - - - - - Get the current videomode. - - - - - - - Get the current date. - - - - - - - Get the current time. - - - - - - - Get the amount of milliseconds since the app started. - - - - - - - Suspend the calling thread for "usec" milliseconds - - - - - - - Common math functions. - - - Math provides implementations of commonly used math functions."Math" shouldt not be instanced since all members are static (called like Math.cos() ). - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Degrees to Radians conversion. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Round to nearest (lowest) value in given step. - - - - - - - - - - - - - - - - - - - - - - - - - Returns the amount of decimals used by "s". - - - - - - - Returns a random number fro 0 to 1 - - - - - - - - - - - Returns a random number between "min" and "max" - - - - - - - - - - - - Shell Execution interface. - - - Shell allows the application to open a given URL in the host OS. It can be anything the host OS understands, from a web page to a media file. - - - - - - - Open any URL the host OS understands. - - - - - - - Resource Loader. - - - ResourceLoader loads resources from disk and returns a resource object. - - - - - - - null on failure. - - - Open a resource in the given path. - - - - - - - Scene Loader - - - SceneLoader loads scenes from disk and returns a scene node. - - - - - - - A scene node, null on error. - - - Load a scene from disk at given "path" and return a node object. - - - - - - - Base class for the Object Model. - - - Object is the building block of most of the high level engine interfaces. The "Object" interface contains a reference to an actual internal Object. - Usually, Object memory should not be managed by the API, as resources will be fred automatically when not in use and nodes are deleted by their parent nodes. - - - - - Free the Object reference. This should not be used with nodes inside a scene tree, as they are removed by their parent node. This function can also be used to unreference resources. - - - - - - - Get a string with the type name of the object. - - - - - - - Returns true if the Object datatype contains a reference to an actual object instance. - - - - - - - Return the instance ID of the object. Every Object has a unique instance ID. - - - - - - - - - Return true if the type of the object class (or any base clases) match "type. - - - - - - - - - Set a property "property", with any value "value. This function can be inherited with "_set" (but base class "_set" will still be called). - - - - - - - - - Return a property "property". This function can be inherited with "_get" (but base class "_get" will still be called). - - - - - - - - - Perform a notification. Notifications are quick ways to tell an Object that something happened or changed regarding it's state and surroundings. This function can be inherited with "_notification" (but base class "_notification" will still be called). - - - - - - - Set the script of the object. Any object can contain a script. Scripts behave as if they inherited the object they are set to - - - - - - - Return the script of the object. Any object can contain a script. Scripts behave as if they inherited the object they are set to - - - - - - - Set a meta property. Meta properties are just containers for setting and retrieving any custom data to an object. Metaproperties are also saved with the object. - - - - - - - Return a meta property. Meta properties are just containers for setting and retrieving any custom data to an object. Metaproperties are also saved with the object. - - - - - - - - - Return wether an object has a meta property. Meta properties are just containers for setting and retrieving any custom data to an object. Metaproperties are also saved with the object. - - - - - - - Return the list of meta properties in the object. Meta properties are just containers for setting and retrieving any custom data to an object. Metaproperties are also saved with the object. - - - - - - - Call any method in the object (syntax: call("method", .. arguments..). - - - - - - This notification is called right after the object is done initializing - - - This notification is called right before the object will e deleted. - - - - - - All Symbolic Key Names - - - Key is an enumaration containing the constants for all the symbolic key names. They are used directly (not with Key. prefix). This value is used in the "scancode" field of the "KEY" InputEvent. - - - Special Key Mask - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Property Hints. - - - PropertyHint hints editors on how to edit a property. In many cases, hint_string (in the PropertyInfo) will contain extra data. These constants are used globally ("PropertyHint" class doesn't exist"). - - - - Hint_string defined as "min,max,step - " - Values such as 0,1,2 are represented in hint_string as "A,B,C" - hint_string is the length of an array type. - Flags names are in hint_string from MSB to LSB as "flag8,fla7,flag6,,,,flag1" - Property is a path. - Property is a path to a file. - Property is a path to a dir. - hint_string contains the valid resource types the property accept (separated by ","). - - - - - Usage for an object property. - - - PropertyUsage defines a list of (inclusive) usages that can be ORed together to specify how the property will be treated in different scenarios. These constants are used globally ("PropertyUsage" class doesn't exist"). - - - Property is Saved/Loaded from disk. - Property is visible in editor (for editing). - Property can be syncronized on network. - Default usage. - - - - - Valid Data Types. - - - Type consists of a list of valid types. It is usually used for property type hinting. These constants are used globally ("Type" class doesn't exist"). - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - List of generic errors. - - - Error is a list of generic errors - - - - Generic fail error - What is requested is unsupported/unavailable - The object being used hasnt been properly set up yet - Missing credentials for requested resource - Parameter given out of range - Out of memory - - - - - - - - - - - - Can't open a resource/socket/file - - - - resource is locked - - - Data passed is invalid - Parameter passed is invalid - When adding"> item already exists - When retrieving/erasing"> it item does not exist - database is full - database is full - - - - - - - user requested help!! - a bug in the software certainly happeneddue to a double check failing or unexpected behavior. - an impossible to trigger check due to paranoid programmer was triggered - - -
    - - diff --git a/doc/deferred_format.txt b/doc/deferred_format.txt deleted file mode 100644 index 76a158a3ce..0000000000 --- a/doc/deferred_format.txt +++ /dev/null @@ -1,33 +0,0 @@ -deferred: - -ar ag ab gl - accumulation RGB + glow - -nx ny mx my? - normal, motion -dr dg db sm - diffuse, shademodel -sr sg sb sp - specular OR shadeparams - -ar ag ab gl -nx ny sp sp -dr dg db se -444 6 -se can be 6 bits, 2 for shade model - -shade models: - -0 - none -1 - wrap -2 - toon -3 - fresne - - - -sp: 2 bits what - 6 bits param - -16 - - - - - - - diff --git a/doc/demos.txt b/doc/demos.txt deleted file mode 100644 index cf56a5cbc6..0000000000 --- a/doc/demos.txt +++ /dev/null @@ -1,40 +0,0 @@ --Oceano --Portales --Grilla --Personaje --Auto (?) --Fisica --Fisica Idle --Low level APIS (Server) --Sonido Posicional --Custom Shaders --HDR --Trees Waving --luces --fixed material --shader material --synctoaudio speech and speex --particulas con gif animados para mostrar que es cada parametro --soporte de syntax hilight de gdscript para editores mas comunes --instanciar enemigos usando duplicate --simulated motion con animacion --animation player controla otro animation player (tipo camina de lugar a otro y saluda) --corutinas y loops con yield para animation, audio, etc --CCD (bullets) - --custom gizmos, editor plugins en script - -Clases que necesitan tutorial. - -Animation/AnimationPlayer -Area2D (space override, notifications) -custom container demo -custon drawing in a canvas item -ignore mouse on top of button -input in a game, with _unhandled_input -demo containers -Control, anchors e input event handling -lots of 2D physics examples -dictionary and array doc of passing by reference? - - diff --git a/doc/engine_classes.xml b/doc/engine_classes.xml deleted file mode 100644 index 43602e26e9..0000000000 --- a/doc/engine_classes.xml +++ /dev/null @@ -1,17940 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/doc/examples/physics/script/test_base.sq b/doc/examples/physics/script/test_base.sq deleted file mode 100644 index 9d5451728f..0000000000 --- a/doc/examples/physics/script/test_base.sq +++ /dev/null @@ -1,295 +0,0 @@ - -class PhysicsTestBase extends MainLoopScripted { - - - bodies=[] - type_mesh_map={} - type_shape_map={} - cameratr=Transform() - - - function body_changed_transform(p_transform, p_velocity, p_angular_velocity,p_sleeping, p_visual_instance) { - - VisualServer.instance_set_transform(p_visual_instance,p_transform); - } - - - function create_body(p_shape, p_body_mode, p_location, p_active=true) { - - local mesh_instance = VisualServer.instance_create( type_mesh_map[p_shape] ) - local body = PhysicsServer.body_create(RID(),p_body_mode,!p_active) - PhysicsServer.body_add_shape(body,type_shape_map[p_shape]) - - local query = PhysicsServer.query_create(this,"body_changed_transform",mesh_instance) - PhysicsServer.query_body_state(query, body) - - PhysicsServer.body_set_state( body, PhysicsServer.BODY_STATE_TRANSFORM, p_location ) - bodies.append( body ) - return body - - } - - - function create_static_plane(p_plane) { - - local plane_shape = PhysicsServer.shape_create(PhysicsServer.SHAPE_PLANE) - PhysicsServer.shape_set_data( plane_shape, p_plane ); - - local b = PhysicsServer.body_create(RID(), PhysicsServer.BODY_MODE_STATIC ); - PhysicsServer.body_add_shape(b, plane_shape); - return b; - } - - function configure_body( p_body, p_mass, p_friction, p_bounce) { - - PhysicsServer.body_set_param( p_body, PhysicsServer.BODY_PARAM_MASS, p_mass ); - PhysicsServer.body_set_param( p_body, PhysicsServer.BODY_PARAM_FRICTION, p_friction ); - PhysicsServer.body_set_param( p_body, PhysicsServer.BODY_PARAM_BOUNCE, p_bounce ); - - } - - function init_shapes() { - - - /* SPHERE SHAPE */ - local sphere_mesh = VisualServer.make_sphere_mesh(10,20,1.0); - local sphere_material = VisualServer.fixed_material_create(); - //VisualServer.material_set_flag( sphere_material, VisualServer.MATERIAL_FLAG_WIREFRAME, true ); - VisualServer.fixed_material_set_parameter( sphere_material, VisualServer.FIXED_MATERIAL_PARAM_DIFFUSE, Color(0.7,0.8,3.0) ); - VisualServer.mesh_surface_set_material( sphere_mesh, 0, sphere_material ); - type_mesh_map[PhysicsServer.SHAPE_SPHERE] <- sphere_mesh; - - local sphere_shape=PhysicsServer.shape_create(PhysicsServer.SHAPE_SPHERE); - PhysicsServer.shape_set_data( sphere_shape, 1.0 ); - type_shape_map[PhysicsServer.SHAPE_SPHERE] <- sphere_shape; - - /* BOX SHAPE */ - - local box_planes = GeometryUtils.build_box_planes(Vector3(0.5,0.5,0.5)); - local box_material = VisualServer.fixed_material_create(); - VisualServer.fixed_material_set_parameter( box_material, VisualServer.FIXED_MATERIAL_PARAM_DIFFUSE, Color(1.0,0.2,0.2) ); - local box_mesh = VisualServer.mesh_create(); - - VisualServer.mesh_add_surface_from_planes(box_mesh,box_planes); - VisualServer.mesh_surface_set_material( box_mesh, 0, box_material ); - type_mesh_map[PhysicsServer.SHAPE_BOX]<- box_mesh; - - local box_shape=PhysicsServer.shape_create(PhysicsServer.SHAPE_BOX); - PhysicsServer.shape_set_data( box_shape, Vector3(0.5,0.5,0.5) ); - type_shape_map[PhysicsServer.SHAPE_BOX]<- box_shape; - - /* CYLINDER SHAPE */ - - local cylinder_planes = GeometryUtils.build_cylinder_planes(0.5,1,12 - ,Vector3.AXIS_Z); - local cylinder_material = VisualServer.fixed_material_create(); - VisualServer.fixed_material_set_parameter( cylinder_material, VisualServer.FIXED_MATERIAL_PARAM_DIFFUSE, Color(0.3,0.4,1.0) ); - local cylinder_mesh = VisualServer.mesh_create(); - - VisualServer.mesh_add_surface_from_planes(cylinder_mesh,cylinder_planes); - VisualServer.mesh_surface_set_material( cylinder_mesh, 0, cylinder_material ); - type_mesh_map[PhysicsServer.SHAPE_CYLINDER]<- cylinder_mesh; - - local cylinder_shape=PhysicsServer.shape_create(PhysicsServer.SHAPE_CYLINDER); - local cylinder_params={} - cylinder_params["radius"]<- 0.5; - cylinder_params["height"]<- 2; - PhysicsServer.shape_set_data( cylinder_shape, cylinder_params ); - type_shape_map[PhysicsServer.SHAPE_CYLINDER]<- cylinder_shape; - - /* CAPSULE SHAPE */ - - local capsule_planes = GeometryUtils.build_capsule_planes(0.5,0.7,12,Vector3.AXIS_Z); - local capsule_material = VisualServer.fixed_material_create(); - VisualServer.fixed_material_set_parameter( capsule_material, VisualServer.FIXED_MATERIAL_PARAM_DIFFUSE, Color(0.3,0.4,1.0) ); - - local capsule_mesh = VisualServer.mesh_create(); - - VisualServer.mesh_add_surface_from_planes(capsule_mesh,capsule_planes); - VisualServer.mesh_surface_set_material( capsule_mesh, 0, capsule_material ); - type_mesh_map[PhysicsServer.SHAPE_CAPSULE]<-capsule_mesh; - - local capsule_shape=PhysicsServer.shape_create(PhysicsServer.SHAPE_CAPSULE); - local capsule_params={} - capsule_params["radius"]<- 0.5; - capsule_params["height"]<- 1.4; - PhysicsServer.shape_set_data( capsule_shape, capsule_params ); - type_shape_map[PhysicsServer.SHAPE_CAPSULE]<- capsule_shape; - - /* CONVEX SHAPE */ - - local convex_planes = GeometryUtils.build_cylinder_planes(0.5,0.7,5,Vector3.AXIS_Z); - local convex_material = VisualServer.fixed_material_create(); - VisualServer.fixed_material_set_parameter( convex_material, VisualServer.FIXED_MATERIAL_PARAM_DIFFUSE, Color(0.8,0.2,0.9)); - - local convex_mesh = VisualServer.mesh_create(); - VisualServer.mesh_add_surface_from_planes(convex_mesh,convex_planes); - VisualServer.mesh_surface_set_material( convex_mesh, 0, convex_material ); - type_mesh_map[PhysicsServer.SHAPE_CONVEX_POLYGON]<- convex_mesh; - - local convex_shape=PhysicsServer.shape_create(PhysicsServer.SHAPE_CONVEX_POLYGON); - PhysicsServer.shape_set_data( convex_shape, convex_planes ); - type_shape_map[PhysicsServer.SHAPE_CONVEX_POLYGON]<- convex_shape; - - } - - function make_trimesh(p_faces,p_xform=Transform()) { - - local trimesh_shape = PhysicsServer.shape_create(PhysicsServer.SHAPE_CONCAVE_POLYGON); - PhysicsServer.shape_set_data(trimesh_shape, p_faces); - p_faces=PhysicsServer.shape_get_data(trimesh_shape); // optimized one - normals=[] - - for (i=0;i 5: -\end_layout - -\begin_layout Plain Layout - - print(param2) -\end_layout - -\begin_layout Plain Layout - - else: -\end_layout - -\begin_layout Plain Layout - - print("fail!") -\end_layout - -\begin_layout Plain Layout - -\end_layout - -\begin_layout Plain Layout - - for i in range(20): -\end_layout - -\begin_layout Plain Layout - - print(i) -\end_layout - -\begin_layout Plain Layout - -\end_layout - -\begin_layout Plain Layout - - while(param2!=0): -\end_layout - -\begin_layout Plain Layout - - param2-=1 -\end_layout - -\begin_layout Plain Layout - -\end_layout - -\begin_layout Plain Layout - - var local_var2 = param1+3 -\end_layout - -\begin_layout Plain Layout - - return local_var2 -\end_layout - -\begin_layout Plain Layout - -\end_layout - -\begin_layout Plain Layout - -\end_layout - -\begin_layout Plain Layout - -#subclass -\end_layout - -\begin_layout Plain Layout - -\end_layout - -\begin_layout Plain Layout - -class Something: -\end_layout - -\begin_layout Plain Layout - - var a=10 -\end_layout - -\begin_layout Plain Layout - -\end_layout - -\begin_layout Plain Layout - -#constructor -\end_layout - -\begin_layout Plain Layout - -\end_layout - -\begin_layout Plain Layout - -func _init(): -\end_layout - -\begin_layout Plain Layout - - print("constructed!") -\end_layout - -\begin_layout Plain Layout - - var lv = Something.new() -\end_layout - -\begin_layout Plain Layout - - print(lv.a) -\end_layout - -\begin_layout Plain Layout - -\end_layout - -\begin_layout Plain Layout - -\end_layout - -\end_inset - - -\end_layout - -\begin_layout Section -Language -\end_layout - -\begin_layout Subsection -Identifiers -\end_layout - -\begin_layout Standard -Any string that restricts itself to alphabetic characters ('a' to 'z' and - 'A' to 'Z'), digits ('0' to '9') and '_' qualifies as an identifier. - As an extra restriction, identifiers must not begin with a digit. - Identifiers are case-sensitive ('foo' is different to 'FOO'). -\end_layout - -\begin_layout Subsection -Keywords -\end_layout - -\begin_layout Standard -The following is the list of keywords supported by the language. - Since keywords are reserved words (tokens), they can't be used as identifiers. -\end_layout - -\begin_layout Subsection -Operators -\end_layout - -\begin_layout Standard -The following is the list of supported operators and their precedence (TODO, - change since this was made to reflect python operators) -\end_layout - -\begin_layout Standard -\begin_inset Tabular - - - - - - -\begin_inset Text - -\begin_layout Plain Layout -Operator -\end_layout - -\end_inset - - -\begin_inset Text - -\begin_layout Plain Layout -Note -\end_layout - -\end_inset - - - - -\begin_inset Text - -\begin_layout Plain Layout -x[index] -\end_layout - -\end_inset - - -\begin_inset Text - -\begin_layout Plain Layout -Subscription, Highest Priority -\end_layout - -\end_inset - - - - -\begin_inset Text - -\begin_layout Plain Layout -x.attribute -\end_layout - -\end_inset - - -\begin_inset Text - -\begin_layout Plain Layout -Attribute Reference -\end_layout - -\end_inset - - - - -\begin_inset Text - -\begin_layout Plain Layout -extends -\end_layout - -\end_inset - - -\begin_inset Text - -\begin_layout Plain Layout -Instance Type Checker -\end_layout - -\end_inset - - - - -\begin_inset Text - -\begin_layout Plain Layout -~ -\end_layout - -\end_inset - - -\begin_inset Text - -\begin_layout Plain Layout -Bitwise NOT -\end_layout - -\end_inset - - - - -\begin_inset Text - -\begin_layout Plain Layout --x -\end_layout - -\end_inset - - -\begin_inset Text - -\begin_layout Plain Layout -Negative -\end_layout - -\end_inset - - - - -\begin_inset Text - -\begin_layout Plain Layout -* / % -\end_layout - -\end_inset - - -\begin_inset Text - -\begin_layout Plain Layout -Mult / Div / Remainder -\end_layout - -\end_inset - - - - -\begin_inset Text - -\begin_layout Plain Layout -+ - -\end_layout - -\end_inset - - -\begin_inset Text - -\begin_layout Plain Layout -Addition / Substraction -\end_layout - -\end_inset - - - - -\begin_inset Text - -\begin_layout Plain Layout -<< >> -\end_layout - -\end_inset - - -\begin_inset Text - -\begin_layout Plain Layout -Bit Shifting -\end_layout - -\end_inset - - - - -\begin_inset Text - -\begin_layout Plain Layout -& -\end_layout - -\end_inset - - -\begin_inset Text - -\begin_layout Plain Layout -Bitwise AND -\end_layout - -\end_inset - - - - -\begin_inset Text - -\begin_layout Plain Layout -^ -\end_layout - -\end_inset - - -\begin_inset Text - -\begin_layout Plain Layout -Bitwise XOR -\end_layout - -\end_inset - - - - -\begin_inset Text - -\begin_layout Plain Layout -| -\end_layout - -\end_inset - - -\begin_inset Text - -\begin_layout Plain Layout -Bitwise OR -\end_layout - -\end_inset - - - - -\begin_inset Text - -\begin_layout Plain Layout -< > == != >= <= -\end_layout - -\end_inset - - -\begin_inset Text - -\begin_layout Plain Layout -Comparisons -\end_layout - -\end_inset - - - - -\begin_inset Text - -\begin_layout Plain Layout -in -\end_layout - -\end_inset - - -\begin_inset Text - -\begin_layout Plain Layout -Content Test -\end_layout - -\end_inset - - - - -\begin_inset Text - -\begin_layout Plain Layout -! not -\end_layout - -\end_inset - - -\begin_inset Text - -\begin_layout Plain Layout -Boolean NOT -\end_layout - -\end_inset - - - - -\begin_inset Text - -\begin_layout Plain Layout -and && -\end_layout - -\end_inset - - -\begin_inset Text - -\begin_layout Plain Layout -Boolean AND -\end_layout - -\end_inset - - - - -\begin_inset Text - -\begin_layout Plain Layout -or || -\end_layout - -\end_inset - - -\begin_inset Text - -\begin_layout Plain Layout -Boolean OR -\end_layout - -\end_inset - - - - -\begin_inset Text - -\begin_layout Plain Layout -= += -= *= /= ^= &= |= -\end_layout - -\end_inset - - -\begin_inset Text - -\begin_layout Plain Layout -Assignment, Lowest Priority -\end_layout - -\end_inset - - - - -\end_inset - - -\end_layout - -\begin_layout Subsection -Literals -\end_layout - -\begin_layout Standard -\begin_inset Tabular - - - - - - -\begin_inset Text - -\begin_layout Plain Layout -Literal -\end_layout - -\end_inset - - -\begin_inset Text - -\begin_layout Plain Layout -Name -\end_layout - -\end_inset - - - - -\begin_inset Text - -\begin_layout Plain Layout -45 -\end_layout - -\end_inset - - -\begin_inset Text - -\begin_layout Plain Layout -Base 10 Integer -\end_layout - -\end_inset - - - - -\begin_inset Text - -\begin_layout Plain Layout -0x8F51 -\end_layout - -\end_inset - - -\begin_inset Text - -\begin_layout Plain Layout -Base 16 (hex) Integer -\end_layout - -\end_inset - - - - -\begin_inset Text - -\begin_layout Plain Layout -3.14, 58.1e-10 -\end_layout - -\end_inset - - -\begin_inset Text - -\begin_layout Plain Layout -Floating Point Number (real) -\end_layout - -\end_inset - - - - -\begin_inset Text - -\begin_layout Plain Layout -'Hello', -\begin_inset Quotes eld -\end_inset - -Hi -\begin_inset Quotes erd -\end_inset - - -\end_layout - -\end_inset - - -\begin_inset Text - -\begin_layout Plain Layout -Strings -\end_layout - -\end_inset - - - - -\begin_inset Text - -\begin_layout Plain Layout -@'Hello', @'Hi' -\end_layout - -\end_inset - - -\begin_inset Text - -\begin_layout Plain Layout -Internationalized Strings -\end_layout - -\end_inset - - - - -\end_inset - - -\end_layout - -\begin_layout Subsection -Comments -\end_layout - -\begin_layout Standard -Anything from a '#' to the end of the line is ignored and is considered - a comment. -\end_layout - -\begin_layout Standard -\begin_inset listings -lstparams "language=Python" -inline false -status open - -\begin_layout Plain Layout - -# This is a comment -\end_layout - -\end_inset - - -\end_layout - -\begin_layout Section -Built-in Types -\end_layout - -\begin_layout Subsection -Basic Bult-In Types -\end_layout - -\begin_layout Standard -A variable in GDScript can be assigned many of several built-in types. - -\end_layout - -\begin_layout Subsubsection -null -\end_layout - -\begin_layout Standard -'null' is a data type that contains no information, nothing assigned, and - it's just empy. - It can only be set to one value: 'null'. -\end_layout - -\begin_layout Subsubsection -bool -\end_layout - -\begin_layout Standard -Boolean data type, can only contain 'true' or 'false'. -\end_layout - -\begin_layout Subsubsection -int -\end_layout - -\begin_layout Standard -Integer data type, can only contain integer numbers, negative and positive. -\end_layout - -\begin_layout Subsubsection -float -\end_layout - -\begin_layout Standard -contains a floating point value (real). -\end_layout - -\begin_layout Subsubsection -String -\end_layout - -\begin_layout Standard -Sequence of characters in unicode format. - Strings can contain the standard C escape sequences. -\end_layout - -\begin_layout Subsection -Vector Built-In Types -\end_layout - -\begin_layout Subsubsection -Vector2/Size2 -\end_layout - -\begin_layout Standard -2D vector type, containing x and y fields. - Can alternatively access fields as width and height for readability. - Can also be accessed as array. -\end_layout - -\begin_layout Subsubsection -Rect2 -\end_layout - -\begin_layout Standard -2D Rectangle type. - Contains 2 vectors fields, -\begin_inset Quotes eld -\end_inset - -pos -\begin_inset Quotes erd -\end_inset - - and size -\begin_inset Quotes erd -\end_inset - -. - Alternatively contains an -\begin_inset Quotes eld -\end_inset - -end -\begin_inset Quotes erd -\end_inset - - field which is -\begin_inset Quotes eld -\end_inset - -pos+size -\begin_inset Quotes erd -\end_inset - -. -\end_layout - -\begin_layout Subsubsection -Vector3 -\end_layout - -\begin_layout Standard -3D vector type. - Contains x, y and z fields. - Can also be accessed as array. -\end_layout - -\begin_layout Subsubsection -Matrix32 -\end_layout - -\begin_layout Standard -3x2 matrix used for 2D transforms. -\end_layout - -\begin_layout Subsubsection -Plane -\end_layout - -\begin_layout Standard -3D Plane type in normalized form. - Contains a -\begin_inset Quotes eld -\end_inset - -normal -\begin_inset Quotes erd -\end_inset - - vector field and a -\begin_inset Quotes eld -\end_inset - -d -\begin_inset Quotes erd -\end_inset - - scalar distance. -\end_layout - -\begin_layout Subsubsection -Quat -\end_layout - -\begin_layout Standard -Quaternion, datatype used for representing a 3D rotation. - It's useful for interpolating rotations. -\end_layout - -\begin_layout Subsubsection -AABB/Box3 -\end_layout - -\begin_layout Standard -Axis Aligned bounding box (or alternatively, 3D box). - Contains 2 vectors fields, -\begin_inset Quotes eld -\end_inset - -pos -\begin_inset Quotes erd -\end_inset - - and size -\begin_inset Quotes erd -\end_inset - -. - Alternatively contains an -\begin_inset Quotes eld -\end_inset - -end -\begin_inset Quotes erd -\end_inset - - field which is -\begin_inset Quotes eld -\end_inset - -pos+size -\begin_inset Quotes erd -\end_inset - -. -\end_layout - -\begin_layout Subsubsection -Matrix3 -\end_layout - -\begin_layout Standard -3x3 matrix used for 3D rotation and scale. - Contains 3 vector fields x,y and z. - Can also be accessed as array of 3D vectors. -\end_layout - -\begin_layout Subsubsection -Transform -\end_layout - -\begin_layout Standard -3D Transform, contains a Matrix3 field -\begin_inset Quotes eld -\end_inset - -basis -\begin_inset Quotes erd -\end_inset - - and a Vector3 field -\begin_inset Quotes eld -\end_inset - -origin -\begin_inset Quotes erd -\end_inset - -. -\end_layout - -\begin_layout Subsection -Engine Built-In Types -\end_layout - -\begin_layout Subsubsection -Color -\end_layout - -\begin_layout Standard -Color datatype, contains r,g,b,a fields. - Can also be accessed as h,s,v for hue/saturation/value. -\end_layout - -\begin_layout Subsubsection -Image -\end_layout - -\begin_layout Standard -Contains a 2D Image of custom format and allows direct access to the pixels. -\end_layout - -\begin_layout Subsubsection -NodePath -\end_layout - -\begin_layout Standard -Compiled path to a node, used mainly in the scene system. - Can be easily asigned from/to a String. -\end_layout - -\begin_layout Subsubsection -RID -\end_layout - -\begin_layout Standard -Resource ID (RID). - Servers use generic RIDs to reference opaque data. -\end_layout - -\begin_layout Subsubsection -Object -\end_layout - -\begin_layout Standard -Base class for anything not a built-in type. - -\end_layout - -\begin_layout Subsubsection -InputEvent -\end_layout - -\begin_layout Standard -Events from input devices are contained in very compact form in InputEvent - objects. - Due to fact they can be received in high amounts from frame to frame, they - are optimized in their own datatype. - -\end_layout - -\begin_layout Subsection -Container Built-In Types -\end_layout - -\begin_layout Subsubsection -Array -\end_layout - -\begin_layout Standard -Generic sequence of objects. - It's size can be changed to anything and starts from index 0. - -\end_layout - -\begin_layout Standard -\begin_inset listings -inline false -status open - -\begin_layout Plain Layout - -var arr=[] -\end_layout - -\begin_layout Plain Layout - -arr=[1,2,3] -\end_layout - -\begin_layout Plain Layout - -arr[0]="Hi!" -\end_layout - -\end_inset - - -\end_layout - -\begin_layout Standard -Arrays are allocated linearly in memory, so they are fast, but very large - arrays (more than tens of thousands of elements) may cause fragmentation. - There are specialized arrays for some built-in datatypes which do not suffer - from this and use much less memory. -\end_layout - -\begin_layout Subsubsection -Dictionary -\end_layout - -\begin_layout Standard -Associative container which contains values referenced by unique keys. -\end_layout - -\begin_layout Standard -\begin_inset listings -inline false -status open - -\begin_layout Plain Layout - -var dict={4:5, "a key":"a value", 28:[1,2,3]} -\end_layout - -\begin_layout Plain Layout - -dict["Hi!"]=0 -\end_layout - -\end_inset - - -\end_layout - -\begin_layout Subsubsection -ByteArray -\end_layout - -\begin_layout Standard -Array of bytes. - Can only contains bytes (integers from 0 to 255). - Optimized for memory usage, can't fragment the memory. -\end_layout - -\begin_layout Subsubsection -IntArray -\end_layout - -\begin_layout Standard -Array of integers. - Can only contain integers. - Optimized for memory usage, can't fragment the memory. -\end_layout - -\begin_layout Subsubsection -FloatArray -\end_layout - -\begin_layout Standard -Array of floats, can only contain floats. - Optimized for memory usage, can't fragment the memory. -\end_layout - -\begin_layout Subsubsection -StringArray -\end_layout - -\begin_layout Standard -Array of strings, can only contain strings. - Optimized for memory usage, can't fragment the memory. -\end_layout - -\begin_layout Subsubsection -Vector2Array -\end_layout - -\begin_layout Standard -Array of Vector2, can only contain 2D Vectors. - Optimized for memory usage, can't fragment the memory. -\end_layout - -\begin_layout Subsubsection -Vector3Array -\end_layout - -\begin_layout Standard -Array of Vector3, can only contain 3D Vectors. - Optimized for memory usage, can't fragment the memory. -\end_layout - -\begin_layout Subsubsection -ColorArray -\end_layout - -\begin_layout Standard -Array of Color, can only contains colors. - Optimized for memory usage, can't fragment the memory. -\end_layout - -\begin_layout Section -Data -\end_layout - -\begin_layout Subsection -Variables -\end_layout - -\begin_layout Standard -Variables can exist as class members or local to functions. - They are created with the -\begin_inset Quotes eld -\end_inset - -var -\begin_inset Quotes erd -\end_inset - - keyword and may be, optionally, be assigned a value upon initialization. -\end_layout - -\begin_layout Standard -\begin_inset listings -inline false -status open - -\begin_layout Plain Layout - -var a # datatype is null by default -\end_layout - -\begin_layout Plain Layout - -var b = 5 -\end_layout - -\begin_layout Plain Layout - -var c = 3.8 -\end_layout - -\begin_layout Plain Layout - -var d = b+c # variables are always initialized in order -\end_layout - -\end_inset - - -\end_layout - -\begin_layout Subsection -Constants -\end_layout - -\begin_layout Standard -Constants are similar to variables, but must be constants or constant expression -s and must be assigned on initialization. -\end_layout - -\begin_layout Standard -\begin_inset listings -inline false -status open - -\begin_layout Plain Layout - -const a = 5 -\end_layout - -\begin_layout Plain Layout - -const b = Vector2(20,20) -\end_layout - -\begin_layout Plain Layout - -const c = 10+20 # constant expression -\end_layout - -\begin_layout Plain Layout - -const d = Vector2(20,30).x # constant expression: 20 -\end_layout - -\begin_layout Plain Layout - -const e = [1,2,3,4][0] # constant expression: 1 -\end_layout - -\begin_layout Plain Layout - -const f = sin(20) # sin() can be used in constant expression -\end_layout - -\begin_layout Plain Layout - -const g = x+20 # invalid, not a constant expression! -\end_layout - -\begin_layout Plain Layout - -\end_layout - -\end_inset - - -\end_layout - -\begin_layout Subsection -Functions -\end_layout - -\begin_layout Standard -Functions always belong to a class. - The scope priority for variable look-up is: local -> class member -> global. - -\begin_inset Quotes eld -\end_inset - -self -\begin_inset Quotes erd -\end_inset - - is provided as an option for accessing class members but is not required - always (and must -\emph on -not -\emph default - be defined as first parameter, like in Python). - For performance reasons, functions are not considered class members, so - they can't be referenced directly. - A function can return at any point. - The default return value is null. -\end_layout - -\begin_layout Standard -\begin_inset listings -inline false -status open - -\begin_layout Plain Layout - -func myfunction(a,b): -\end_layout - -\begin_layout Plain Layout - - print(a) -\end_layout - -\begin_layout Plain Layout - - print(b) -\end_layout - -\begin_layout Plain Layout - - return a+b # return is optional, otherwise null is returned -\end_layout - -\end_inset - - -\end_layout - -\begin_layout Subsubsection -Statements and Control Flow -\end_layout - -\begin_layout Standard -Statements are standard, and can be assignments, function calls, control - flow structures, etc (see below). - -\begin_inset Quotes eld -\end_inset - -; -\begin_inset Quotes erd -\end_inset - - as separator is entirely optional. -\end_layout - -\begin_layout Subsubsection -if/else/elif -\end_layout - -\begin_layout Standard -Simple conditions are created by using the -\emph on -if/else/elif -\emph default - syntax. - Parenthesis around statements is allowed but not requiered. - Given the nature of the tab-based indentation, elif can be used instead - of else:/if: to mantain a level of indentation. -\end_layout - -\begin_layout Standard -\begin_inset listings -inline false -status open - -\begin_layout Plain Layout - -if [expression]: -\end_layout - -\begin_layout Plain Layout - - statement(s) -\end_layout - -\begin_layout Plain Layout - -elif [expression]: -\end_layout - -\begin_layout Plain Layout - - statement(s) -\end_layout - -\begin_layout Plain Layout - -else: -\end_layout - -\begin_layout Plain Layout - - statement(s) -\end_layout - -\end_inset - - -\end_layout - -\begin_layout Subsubsection -while -\end_layout - -\begin_layout Standard -Simple loops are created by using -\emph on -while -\emph default - syntax. - Loops can be broken using -\emph on -break -\emph default -, or continued using -\emph on -continue -\emph default -: -\end_layout - -\begin_layout Standard -\begin_inset listings -inline false -status open - -\begin_layout Plain Layout - -while [expression]: -\end_layout - -\begin_layout Plain Layout - - statement(s) -\end_layout - -\end_inset - - -\end_layout - -\begin_layout Subsubsection -for -\end_layout - -\begin_layout Standard -To iterate a range, array or table a -\emph on -for -\emph default - loop is used. - For loops store the index in the loop variable on each iteration. -\end_layout - -\begin_layout Standard -\begin_inset listings -inline false -status open - -\begin_layout Plain Layout - -for i in [0,1,2]: -\end_layout - -\begin_layout Plain Layout - - statement # loop iterates 3 times, i being 0,1 and 2 -\end_layout - -\begin_layout Plain Layout - -\end_layout - -\begin_layout Plain Layout - -var dict = {"a":0, "b":1, "c": 2} -\end_layout - -\begin_layout Plain Layout - -for i in dict: -\end_layout - -\begin_layout Plain Layout - - print(dict[i]) # loop iterates the keys, i being "a","b" and c". - It prints 0, 1 and 2. -\end_layout - -\begin_layout Plain Layout - -\end_layout - -\begin_layout Plain Layout - -for i in range(3): -\end_layout - -\begin_layout Plain Layout - - statement # similar to [0,1,2] but does not allocate an array -\end_layout - -\begin_layout Plain Layout - -\end_layout - -\begin_layout Plain Layout - -for i in range(1,3): -\end_layout - -\begin_layout Plain Layout - - statement # similar to [1,2] but does not allocate an array -\end_layout - -\begin_layout Plain Layout - -\end_layout - -\begin_layout Plain Layout - -for i in range(2,8,2): -\end_layout - -\begin_layout Plain Layout - - statement # similar to [2,4,6] but does not allocate an array -\end_layout - -\begin_layout Plain Layout - -\end_layout - -\end_inset - - -\end_layout - -\begin_layout Section -Classes -\end_layout - -\begin_layout Standard -By default, the body of a script file is an unnamed class, and it can only - be referenced externally as a resource or file. - Class syntax is meant to be very compact and can only contain member variables - or functions. - Static functions are allowed, but not static members (in the spirit of - thread safety, since scripts can be initialized in separate threads without - the user knowing). - In the same way, member variables (including arrays and dictionaries) are - initialized every time an instance is created. - -\end_layout - -\begin_layout Subsection -Class File Example -\end_layout - -\begin_layout Standard -Example of a class file, imagine it being stored in a file like myclass.gd. -\end_layout - -\begin_layout Standard -\begin_inset listings -inline false -status open - -\begin_layout Plain Layout - -\end_layout - -\begin_layout Plain Layout - -var a=5 -\end_layout - -\begin_layout Plain Layout - -\end_layout - -\begin_layout Plain Layout - -function print_value_of_a(): -\end_layout - -\begin_layout Plain Layout - - print(a) -\end_layout - -\begin_layout Plain Layout - -\end_layout - -\end_inset - - -\end_layout - -\begin_layout Subsection -Inheritance -\end_layout - -\begin_layout Standard -A class-file can inherit from a global class, another file or a subclass - inside another file. - Multiple inheritance is not allowed. - The -\begin_inset Quotes eld -\end_inset - -extends -\begin_inset Quotes erd -\end_inset - - syntax is used: -\end_layout - -\begin_layout Standard -\begin_inset listings -inline false -status open - -\begin_layout Plain Layout - -# extend from some class (global) -\end_layout - -\begin_layout Plain Layout - -extends SomeClass -\end_layout - -\begin_layout Plain Layout - -\end_layout - -\begin_layout Plain Layout - -# optionally, extend from another file -\end_layout - -\begin_layout Plain Layout - -extends "somefile.gd" -\end_layout - -\begin_layout Plain Layout - -\end_layout - -\begin_layout Plain Layout - -# extend from a subclass in another file -\end_layout - -\begin_layout Plain Layout - -extends "somefile.gd".Subclass -\end_layout - -\end_inset - - -\end_layout - -\begin_layout Subsection -Inheritance Testing -\end_layout - -\begin_layout Standard -It is possible to check if an instance inherits from a given class. - For this the -\begin_inset Quotes eld -\end_inset - -extends -\begin_inset Quotes erd -\end_inset - - keyword can be used as an operator instead: -\end_layout - -\begin_layout Standard -\begin_inset listings -inline false -status open - -\begin_layout Plain Layout - -static var enemy_class = preload("enemy.gd") # cache the enemy class -\end_layout - -\begin_layout Plain Layout - -\end_layout - -\begin_layout Plain Layout - -[..] -\end_layout - -\begin_layout Plain Layout - -\end_layout - -\begin_layout Plain Layout - -if ( entity extends enemy_class ): -\end_layout - -\begin_layout Plain Layout - - entity.apply_damage() -\end_layout - -\begin_layout Plain Layout - -\end_layout - -\begin_layout Plain Layout - -\end_layout - -\begin_layout Plain Layout - -\end_layout - -\end_inset - - -\end_layout - -\begin_layout Subsection -Constructor -\end_layout - -\begin_layout Standard -A class can have an optional constructor, a function named -\begin_inset Quotes eld -\end_inset - -_init -\begin_inset Quotes erd -\end_inset - - that is called when the class is instanced. -\end_layout - -\begin_layout Subsection -Sub Classes -\end_layout - -\begin_layout Standard -A class file can have subclasses. - Syntax should be straightforward: -\end_layout - -\begin_layout Standard -\begin_inset listings -inline false -status open - -\begin_layout Plain Layout - -class SomeSubClass: -\end_layout - -\begin_layout Plain Layout - - var a=5 -\end_layout - -\begin_layout Plain Layout - - function print_value_of_a(): -\end_layout - -\begin_layout Plain Layout - - print(a) -\end_layout - -\begin_layout Plain Layout - -\end_layout - -\begin_layout Plain Layout - -function _init(): -\end_layout - -\begin_layout Plain Layout - - var sc = SomeSubClass.new() #instance by calling built-in new -\end_layout - -\begin_layout Plain Layout - - sc.print_value_of_a() -\end_layout - -\end_inset - - -\end_layout - -\begin_layout Subsection -Classes as Objects -\end_layout - -\begin_layout Standard -It may be desired at some point to load a class from a file and then instance - it. - Since the global scope does not exist, classes must be loaded as a resource. - Instancing is done by calling the -\begin_inset Quotes eld -\end_inset - -new -\begin_inset Quotes erd -\end_inset - - function in a class object: -\end_layout - -\begin_layout Standard -\begin_inset listings -inline false -status open - -\begin_layout Plain Layout - -#load the class (loaded every time the script is instanced) -\end_layout - -\begin_layout Plain Layout - -var MyClass = load("myclass.gd") -\end_layout - -\begin_layout Plain Layout - -\end_layout - -\begin_layout Plain Layout - -#alternatively, using the preload() function preloads the class at compile - time -\end_layout - -\begin_layout Plain Layout - -var MyClass2 = preload("myclass.gd") -\end_layout - -\begin_layout Plain Layout - -\end_layout - -\begin_layout Plain Layout - -function _init(): -\end_layout - -\begin_layout Plain Layout - - var a = MyClass.new() -\end_layout - -\begin_layout Plain Layout - - a.somefunction() -\end_layout - -\end_inset - - -\end_layout - -\begin_layout Subsection -Exports -\end_layout - -\begin_layout Standard -Class members can be exported. - This means their value gets saved along with a scene. - If class members have initializers to constant expressions, they will be - available for editing in the property editor. - Exporting is done by using the export keyword: -\end_layout - -\begin_layout Standard -\begin_inset listings -inline false -status open - -\begin_layout Plain Layout - -extends Button -\end_layout - -\begin_layout Plain Layout - -\end_layout - -\begin_layout Plain Layout - -export var data # value will be saved -\end_layout - -\begin_layout Plain Layout - -export var number=5 # also available to the property editor -\end_layout - -\begin_layout Plain Layout - -\end_layout - -\end_inset - - -\end_layout - -\begin_layout Standard -One of the fundamental benefits of exporting member variables is to have - them visible in the property editor. - This way artists and game designers can modify values that later influence - how the program runs. - For this, a special export syntax is provided for more detail in the exported - variables: -\end_layout - -\begin_layout Standard -\begin_inset listings -inline false -status open - -\begin_layout Plain Layout - -#if the exported value assigns a constant or constant expression, the type - will be infered and used in the editor -\end_layout - -\begin_layout Plain Layout - -\end_layout - -\begin_layout Plain Layout - -export var number=5 -\end_layout - -\begin_layout Plain Layout - -\end_layout - -\begin_layout Plain Layout - -#export can take a basic datatype as argument, which will be used in the - editor -\end_layout - -\begin_layout Plain Layout - -\end_layout - -\begin_layout Plain Layout - -export(int) var number -\end_layout - -\begin_layout Plain Layout - -\end_layout - -\begin_layout Plain Layout - -#export can also take a resource type as hint -\end_layout - -\begin_layout Plain Layout - -\end_layout - -\begin_layout Plain Layout - -export(Texture) var character_face -\end_layout - -\begin_layout Plain Layout - -\end_layout - -\begin_layout Plain Layout - -#integers and strings hint enumerated values -\end_layout - -\begin_layout Plain Layout - -\end_layout - -\begin_layout Plain Layout - -export(int,"Warrior","Magician","Thief") var character_class # (editor will - set them as 0,1 and 2) -\end_layout - -\begin_layout Plain Layout - -export(String,"Rebecca","Mary","Leah") var character_name -\end_layout - -\begin_layout Plain Layout - -\end_layout - -\begin_layout Plain Layout - -#strings as paths -\end_layout - -\begin_layout Plain Layout - -\end_layout - -\begin_layout Plain Layout - -export(String,FILE) var f # string is a path to a file -\end_layout - -\begin_layout Plain Layout - -export(String,DIR) var f # string is a path to a directory -\end_layout - -\begin_layout Plain Layout - -export(String,FILE,"*.txt") var f # string is a path to a file, custom filter - provided as hint -\end_layout - -\begin_layout Plain Layout - -\end_layout - -\begin_layout Plain Layout - -#integers and floats hint ranges -\end_layout - -\begin_layout Plain Layout - -\end_layout - -\begin_layout Plain Layout - -export(int,20) var i # 0 to 20 allowed -\end_layout - -\begin_layout Plain Layout - -export(int,-10,20) var j # -10 to 20 allowed -\end_layout - -\begin_layout Plain Layout - -export(float,-10,20,0.2) var k # -10 to 20 allowed, with stepping of 0.2 -\end_layout - -\begin_layout Plain Layout - -\end_layout - -\begin_layout Plain Layout - -#color can hint availability of alpha -\end_layout - -\begin_layout Plain Layout - -\end_layout - -\begin_layout Plain Layout - -export(Color,RGB) var col # Color is RGB -\end_layout - -\begin_layout Plain Layout - -export(Color,RGBA) var col # Color is RGBA -\end_layout - -\begin_layout Plain Layout - -\end_layout - -\begin_layout Plain Layout - -\end_layout - -\end_inset - - -\end_layout - -\begin_layout Standard -It must be noted that even if the script is not being run while at the editor, - the exported properties are still editable (see below for -\begin_inset Quotes eld -\end_inset - -tool -\begin_inset Quotes erd -\end_inset - -). -\end_layout - -\begin_layout Subsection -Static Functions -\end_layout - -\begin_layout Standard -A function can be declared static. - When static, it has no access to the instance member variables or -\begin_inset Quotes eld -\end_inset - -self -\begin_inset Quotes erd -\end_inset - -. - This is mainly useful to make libraries of helper functions: -\end_layout - -\begin_layout Standard -\begin_inset listings -inline false -status open - -\begin_layout Plain Layout - -static func sum2(a,b): -\end_layout - -\begin_layout Plain Layout - - return a+b -\end_layout - -\end_inset - - -\end_layout - -\begin_layout Subsection -Asserting -\end_layout - -\begin_layout Standard -It is possible to assert a condition, which will cause a debugger break - if false. - Just use the built-in 'assert' function. -\end_layout - -\begin_layout Standard -\begin_inset listings -inline false -status open - -\begin_layout Plain Layout - -assert(a==2) -\end_layout - -\begin_layout Plain Layout - -# if a is not 2, it will generate a debugger break -\end_layout - -\end_inset - - -\end_layout - -\begin_layout Subsection -Tool Mode -\end_layout - -\begin_layout Standard -Scripts by default don't run inside the editor, and only the exported properties - can be changed. - In some cases it is desired that they do (as long as they don't execute - game code or manually avoid doing so). - For this, the -\begin_inset Quotes eld -\end_inset - -tool -\begin_inset Quotes erd -\end_inset - - keyword exists, and must be placed at the top of the file: -\end_layout - -\begin_layout Standard -\begin_inset listings -inline false -status open - -\begin_layout Plain Layout - -tool -\end_layout - -\begin_layout Plain Layout - -extends Button -\end_layout - -\begin_layout Plain Layout - -\end_layout - -\begin_layout Plain Layout - -func _init(): -\end_layout - -\begin_layout Plain Layout - - print("Hello") -\end_layout - -\end_inset - - -\end_layout - -\begin_layout Subsection -Memory Management -\end_layout - -\begin_layout Standard -If a class inherits from -\emph on -Reference -\emph default -, then instances will be freed when no longer in use. - No garbage collector exists, just simple reference counting. - By default, all classes that don't define inheritance extend -\emph on -Reference -\emph default -. - If this is not desired, then a class must inherit -\emph on -Object -\emph default - manually and must call instance.free(). - To avoid reference cycles that can't be freed, a weakref() function is - provided for creating weak references. - -\end_layout - -\begin_layout Subsection -Function References -\end_layout - -\begin_layout Standard -Functions can't be referenced because they are not treated as class members. - There are two alternatives to this, though. - The -\begin_inset Quotes eld -\end_inset - -call -\begin_inset Quotes erd -\end_inset - - function or the funcref() helper. -\end_layout - -\begin_layout Standard -\begin_inset listings -inline false -status open - -\begin_layout Plain Layout - -instance.call("funcname",args) # call a function by bane -\end_layout - -\begin_layout Plain Layout - -\end_layout - -\begin_layout Plain Layout - -var fr = funcref(instance,"funcname") #create a function ref -\end_layout - -\begin_layout Plain Layout - -fr.exec(args) -\end_layout - -\end_inset - - -\end_layout - -\end_body -\end_document diff --git a/doc/godot_splash.png b/doc/godot_splash.png deleted file mode 100644 index da56fa15cc..0000000000 Binary files a/doc/godot_splash.png and /dev/null differ diff --git a/doc/header.txt b/doc/header.txt deleted file mode 100644 index 359949cc3b..0000000000 --- a/doc/header.txt +++ /dev/null @@ -1,12 +0,0 @@ -/*************************************************/ -/* $filename */ -/*************************************************/ -/* This file is part of: */ -/* GODOT ENGINE */ -/*************************************************/ -/* Source code within this file is: */ -/* (c) 2007-2010 Juan Linietsky, Ariel Manzur */ -/* All Rights Reserved. */ -/*************************************************/ - - diff --git a/doc/html/@GDScript.html b/doc/html/@GDScript.html deleted file mode 100644 index 5d5d77ffbf..0000000000 --- a/doc/html/@GDScript.html +++ /dev/null @@ -1,93 +0,0 @@ -
    IndexClassesCategoriesInheritance

    @GDScript

    - Built-in GDScript functions. -

    Category: Core

    Public Methods:

    real sin ( real s )
    real cos ( real s )
    real tan ( real s )
    real sinh ( real s )
    real cosh ( real s )
    real tanh ( real s )
    real asin ( real s )
    real acos ( real s )
    real atan ( real s )
    real atan2 ( real x, real y )
    real sqrt ( real s )
    real fmod ( real x, real y )
    real fposmod ( real x, real y )
    real floor ( real s )
    real ceil ( real s )
    real round ( real s )
    real abs ( real s )
    real sign ( real s )
    real pow ( real x, real y )
    real log ( real s )
    real exp ( real s )
    real isnan ( real s )
    real isinf ( real s )
    real ease ( real s, real curve )
    real decimals ( real step )
    real stepify ( real s, real step )
    int rand ()
    real randf ()
    real rand_range ( real from, real to )
    Array rand_seed ( real seed )
    real deg2rad ( real deg )
    real rad2deg ( real rad )
    real linear2db ( real nrg )
    real db2linear ( real db )
    real max ( real a, real b )
    real min ( real a, real b )
    real clamp ( real val, real min, real max )
    int nearest_po2 ( int val )
    Object weakref ( Object obj )
    Object convert ( var what, int type )
    String str ( var what, var ... )
    Nil print ( var what, var ... )
    Nil printerr ( var what, var ... )
    Nil printraw ( var what, var ... )
    Array range ( var ... )

    Description:

    - This contains the list of built-in gdscript functions. Mostly math functions and other utilities. Everything else is expanded by objects. -

    Method Documentation:

    - Standard sine function. -
    - Standard cosine function. -
    - Standard tangent function. -
    - Hyperbolic sine. -
    - Hyperbolic tangent. -
    - Arc-sine. -
    - Arc-cosine. -
    - Arc-tangent. -
    - Arc-tangent that takes a 2D vector as argument, retuns the full -pi to +pi range. -
    - Square root. -
    - Module (remainder of x/y). -
    - Module (remainder of x/y) that wraps equally in positive and negative. -
    - Floor (rounds down to nearest integer). -
    - Ceiling (rounds up to nearest integer). -
    - Round to nearest integer. -
    - Remove sign (works for integer and float). -
    - Return sign (-1 or +1). -
    - Power function, x elevate to y. -
    - Natural logarithm. -
    - Exponential logarithm. -
    - Return true if the float is not a number. -
    - Return true if the float is infinite. -
    - Easing function, based on exponent. 0 is constant, 1 is linear, 0 to 1 is ease-in, 1+ is ease out. Negative values are in-out/out in. -
    - Return the amount of decimals in the floating point value. -
    - Snap float value to a given step. -
    - Random value (integer). -
    - Random value (0 to 1 float). -
    - Random range. -
    - random from seed, pass a seed and an array with both number and new seed is returned. -
    - Convert from degrees to radians. -
    - Convert from radias to degrees. -
    - Convert from linear energy to decibels (audio). -
    - Convert from decibels to linear energy (audio). -
    - Return the maximum of two values. -
    - Return the minimum of two values. -
    - Clamp both values to a range. -
    - Return the nearest larger power of 2 for an integer. -
    - Return a weak reference to an object. -
    - Convert from a type to another in the best way possible. The "type" parameter uses the enum TYPE_* in Global Scope. -
    String @GDScript::str ( var what, var ... )
    - Convert one or more arguments to strings in the best way possible. -
    Nil @GDScript::print ( var what, var ... )
    - Print one or more arguments to strings in the best way possible to a console line. -
    Nil @GDScript::printerr ( var what, var ... )
    - Print one or more arguments to strings in the best way possible to standard error line. -
    Nil @GDScript::printraw ( var what, var ... )
    - Print one or more arguments to strings in the best way possible to console. No newline is added at the end. -
    - Return an array with the given range. Range can be 1 argument N (0 to N-1), two arguments (initial, final-1) or three arguments (initial,final-1,increment). -

    Copyright 2008-2010 Codenix SRL \ No newline at end of file diff --git a/doc/html/@Global Scope.html b/doc/html/@Global Scope.html deleted file mode 100644 index 3324383c3d..0000000000 --- a/doc/html/@Global Scope.html +++ /dev/null @@ -1,459 +0,0 @@ -
    IndexClassesCategoriesInheritance

    @Global Scope

    - Global scope constants and variables. -

    Category: Core

    Public Variables:

  • Globals Globals -
  • IP IP -
  • Geometry Geometry -
  • ResourceLoader ResourceLoader -
  • ResourceSaver ResourceSaver -
  • PathRemap PathRemap -
  • OS OS -
  • TranslationServer TranslationServer -
  • SceneIO SceneIO -
  • VisualServer VisualServer -
  • AudioServer AudioServer -
  • PhysicsServer PhysicsServer -
  • Physics2DServer Physics2DServer -
  • SpatialSound2DServer SpatialSoundServer -
  • SpatialSound2DServer SpatialSound2DServer -
  • Constants:

  • MARGIN_LEFT = 0 -
  • MARGIN_TOP = 1 -
  • MARGIN_RIGHT = 2 -
  • MARGIN_BOTTOM = 3 -
  • VERTICAL = 1 -
  • HORIZONTAL = 0 -
  • HALIGN_LEFT = 0 -
  • HALIGN_CENTER = 1 -
  • HALIGN_RIGHT = 2 -
  • VALIGN_TOP = 0 -
  • VALIGN_CENTER = 1 -
  • VALIGN_BOTTOM = 2 -
  • SPKEY = 16777216 -
  • KEY_ESCAPE = 16777217 -
  • KEY_TAB = 16777218 -
  • KEY_BACKTAB = 16777219 -
  • KEY_BACKSPACE = 16777220 -
  • KEY_RETURN = 16777221 -
  • KEY_ENTER = 16777222 -
  • KEY_INSERT = 16777223 -
  • KEY_DELETE = 16777224 -
  • KEY_PAUSE = 16777225 -
  • KEY_PRINT = 16777226 -
  • KEY_SYSREQ = 16777227 -
  • KEY_CLEAR = 16777228 -
  • KEY_HOME = 16777229 -
  • KEY_END = 16777230 -
  • KEY_LEFT = 16777231 -
  • KEY_UP = 16777232 -
  • KEY_RIGHT = 16777233 -
  • KEY_DOWN = 16777234 -
  • KEY_PAGEUP = 16777235 -
  • KEY_PAGEDOWN = 16777236 -
  • KEY_SHIFT = 16777237 -
  • KEY_CONTROL = 16777238 -
  • KEY_META = 16777239 -
  • KEY_ALT = 16777240 -
  • KEY_CAPSLOCK = 16777241 -
  • KEY_NUMLOCK = 16777242 -
  • KEY_SCROLLLOCK = 16777243 -
  • KEY_F1 = 16777244 -
  • KEY_F2 = 16777245 -
  • KEY_F3 = 16777246 -
  • KEY_F4 = 16777247 -
  • KEY_F5 = 16777248 -
  • KEY_F6 = 16777249 -
  • KEY_F7 = 16777250 -
  • KEY_F8 = 16777251 -
  • KEY_F9 = 16777252 -
  • KEY_F10 = 16777253 -
  • KEY_F11 = 16777254 -
  • KEY_F12 = 16777255 -
  • KEY_F13 = 16777256 -
  • KEY_F14 = 16777257 -
  • KEY_F15 = 16777258 -
  • KEY_F16 = 16777259 -
  • KEY_KP_ENTER = 16777344 -
  • KEY_KP_MULTIPLY = 16777345 -
  • KEY_KP_DIVIDE = 16777346 -
  • KEY_KP_SUBSTRACT = 16777347 -
  • KEY_KP_PERIOD = 16777348 -
  • KEY_KP_ADD = 16777349 -
  • KEY_KP_0 = 16777350 -
  • KEY_KP_1 = 16777351 -
  • KEY_KP_2 = 16777352 -
  • KEY_KP_3 = 16777353 -
  • KEY_KP_4 = 16777354 -
  • KEY_KP_5 = 16777355 -
  • KEY_KP_6 = 16777356 -
  • KEY_KP_7 = 16777357 -
  • KEY_KP_8 = 16777358 -
  • KEY_KP_9 = 16777359 -
  • KEY_SUPER_L = 16777260 -
  • KEY_SUPER_R = 16777261 -
  • KEY_MENU = 16777262 -
  • KEY_HYPER_L = 16777263 -
  • KEY_HYPER_R = 16777264 -
  • KEY_HELP = 16777265 -
  • KEY_DIRECTION_L = 16777266 -
  • KEY_DIRECTION_R = 16777267 -
  • KEY_BACK = 16777280 -
  • KEY_FORWARD = 16777281 -
  • KEY_STOP = 16777282 -
  • KEY_REFRESH = 16777283 -
  • KEY_VOLUMEDOWN = 16777284 -
  • KEY_VOLUMEMUTE = 16777285 -
  • KEY_VOLUMEUP = 16777286 -
  • KEY_BASSBOOST = 16777287 -
  • KEY_BASSUP = 16777288 -
  • KEY_BASSDOWN = 16777289 -
  • KEY_TREBLEUP = 16777290 -
  • KEY_TREBLEDOWN = 16777291 -
  • KEY_MEDIAPLAY = 16777292 -
  • KEY_MEDIASTOP = 16777293 -
  • KEY_MEDIAPREVIOUS = 16777294 -
  • KEY_MEDIANEXT = 16777295 -
  • KEY_MEDIARECORD = 16777296 -
  • KEY_HOMEPAGE = 16777297 -
  • KEY_FAVORITES = 16777298 -
  • KEY_SEARCH = 16777299 -
  • KEY_STANDBY = 16777300 -
  • KEY_OPENURL = 16777301 -
  • KEY_LAUNCHMAIL = 16777302 -
  • KEY_LAUNCHMEDIA = 16777303 -
  • KEY_LAUNCH0 = 16777304 -
  • KEY_LAUNCH1 = 16777305 -
  • KEY_LAUNCH2 = 16777306 -
  • KEY_LAUNCH3 = 16777307 -
  • KEY_LAUNCH4 = 16777308 -
  • KEY_LAUNCH5 = 16777309 -
  • KEY_LAUNCH6 = 16777310 -
  • KEY_LAUNCH7 = 16777311 -
  • KEY_LAUNCH8 = 16777312 -
  • KEY_LAUNCH9 = 16777313 -
  • KEY_LAUNCHA = 16777314 -
  • KEY_LAUNCHB = 16777315 -
  • KEY_LAUNCHC = 16777316 -
  • KEY_LAUNCHD = 16777317 -
  • KEY_LAUNCHE = 16777318 -
  • KEY_LAUNCHF = 16777319 -
  • KEY_UNKNOWN = 33554431 -
  • KEY_SPACE = 32 -
  • KEY_EXCLAM = 33 -
  • KEY_QUOTEDBL = 34 -
  • KEY_NUMBERSIGN = 35 -
  • KEY_DOLLAR = 36 -
  • KEY_PERCENT = 37 -
  • KEY_AMPERSAND = 38 -
  • KEY_APOSTROPHE = 39 -
  • KEY_PARENLEFT = 40 -
  • KEY_PARENRIGHT = 41 -
  • KEY_ASTERISK = 42 -
  • KEY_PLUS = 43 -
  • KEY_COMMA = 44 -
  • KEY_MINUS = 45 -
  • KEY_PERIOD = 46 -
  • KEY_SLASH = 47 -
  • KEY_0 = 48 -
  • KEY_1 = 49 -
  • KEY_2 = 50 -
  • KEY_3 = 51 -
  • KEY_4 = 52 -
  • KEY_5 = 53 -
  • KEY_6 = 54 -
  • KEY_7 = 55 -
  • KEY_8 = 56 -
  • KEY_9 = 57 -
  • KEY_COLON = 58 -
  • KEY_SEMICOLON = 59 -
  • KEY_LESS = 60 -
  • KEY_EQUAL = 61 -
  • KEY_GREATER = 62 -
  • KEY_QUESTION = 63 -
  • KEY_AT = 64 -
  • KEY_A = 65 -
  • KEY_B = 66 -
  • KEY_C = 67 -
  • KEY_D = 68 -
  • KEY_E = 69 -
  • KEY_F = 70 -
  • KEY_G = 71 -
  • KEY_H = 72 -
  • KEY_I = 73 -
  • KEY_J = 74 -
  • KEY_K = 75 -
  • KEY_L = 76 -
  • KEY_M = 77 -
  • KEY_N = 78 -
  • KEY_O = 79 -
  • KEY_P = 80 -
  • KEY_Q = 81 -
  • KEY_R = 82 -
  • KEY_S = 83 -
  • KEY_T = 84 -
  • KEY_U = 85 -
  • KEY_V = 86 -
  • KEY_W = 87 -
  • KEY_X = 88 -
  • KEY_Y = 89 -
  • KEY_Z = 90 -
  • KEY_BRACKETLEFT = 91 -
  • KEY_BACKSLASH = 92 -
  • KEY_BRACKETRIGHT = 93 -
  • KEY_ASCIICIRCUM = 94 -
  • KEY_UNDERSCORE = 95 -
  • KEY_QUOTELEFT = 96 -
  • KEY_BRACELEFT = 123 -
  • KEY_BAR = 124 -
  • KEY_BRACERIGHT = 125 -
  • KEY_ASCIITILDE = 126 -
  • KEY_NOBREAKSPACE = 160 -
  • KEY_EXCLAMDOWN = 161 -
  • KEY_CENT = 162 -
  • KEY_STERLING = 163 -
  • KEY_CURRENCY = 164 -
  • KEY_YEN = 165 -
  • KEY_BROKENBAR = 166 -
  • KEY_SECTION = 167 -
  • KEY_DIAERESIS = 168 -
  • KEY_COPYRIGHT = 169 -
  • KEY_ORDFEMININE = 170 -
  • KEY_GUILLEMOTLEFT = 171 -
  • KEY_NOTSIGN = 172 -
  • KEY_HYPHEN = 173 -
  • KEY_REGISTERED = 174 -
  • KEY_MACRON = 175 -
  • KEY_DEGREE = 176 -
  • KEY_PLUSMINUS = 177 -
  • KEY_TWOSUPERIOR = 178 -
  • KEY_THREESUPERIOR = 179 -
  • KEY_ACUTE = 180 -
  • KEY_MU = 181 -
  • KEY_PARAGRAPH = 182 -
  • KEY_PERIODCENTERED = 183 -
  • KEY_CEDILLA = 184 -
  • KEY_ONESUPERIOR = 185 -
  • KEY_MASCULINE = 186 -
  • KEY_GUILLEMOTRIGHT = 187 -
  • KEY_ONEQUARTER = 188 -
  • KEY_ONEHALF = 189 -
  • KEY_THREEQUARTERS = 190 -
  • KEY_QUESTIONDOWN = 191 -
  • KEY_AGRAVE = 192 -
  • KEY_AACUTE = 193 -
  • KEY_ACIRCUMFLEX = 194 -
  • KEY_ATILDE = 195 -
  • KEY_ADIAERESIS = 196 -
  • KEY_ARING = 197 -
  • KEY_AE = 198 -
  • KEY_CCEDILLA = 199 -
  • KEY_EGRAVE = 200 -
  • KEY_EACUTE = 201 -
  • KEY_ECIRCUMFLEX = 202 -
  • KEY_EDIAERESIS = 203 -
  • KEY_IGRAVE = 204 -
  • KEY_IACUTE = 205 -
  • KEY_ICIRCUMFLEX = 206 -
  • KEY_IDIAERESIS = 207 -
  • KEY_ETH = 208 -
  • KEY_NTILDE = 209 -
  • KEY_OGRAVE = 210 -
  • KEY_OACUTE = 211 -
  • KEY_OCIRCUMFLEX = 212 -
  • KEY_OTILDE = 213 -
  • KEY_ODIAERESIS = 214 -
  • KEY_MULTIPLY = 215 -
  • KEY_OOBLIQUE = 216 -
  • KEY_UGRAVE = 217 -
  • KEY_UACUTE = 218 -
  • KEY_UCIRCUMFLEX = 219 -
  • KEY_UDIAERESIS = 220 -
  • KEY_YACUTE = 221 -
  • KEY_THORN = 222 -
  • KEY_SSHARP = 223 -
  • KEY_DIVISION = 247 -
  • KEY_YDIAERESIS = 255 -
  • KEY_CODE_MASK = 33554431 -
  • KEY_MODIFIER_MASK = -16777216 -
  • KEY_MASK_SHIFT = 33554432 -
  • KEY_MASK_ALT = 67108864 -
  • KEY_MASK_META = 134217728 -
  • KEY_MASK_CTRL = 268435456 -
  • KEY_MASK_KPAD = 536870912 -
  • KEY_MASK_GROUP_SWITCH = 1073741824 -
  • BUTTON_LEFT = 1 -
  • BUTTON_RIGHT = 2 -
  • BUTTON_MIDDLE = 3 -
  • BUTTON_WHEEL_UP = 4 -
  • BUTTON_WHEEL_DOWN = 5 -
  • BUTTON_MASK_LEFT = 1 -
  • BUTTON_MASK_RIGHT = 2 -
  • BUTTON_MASK_MIDDLE = 4 -
  • JOY_BUTTON_0 = 0 -
  • JOY_BUTTON_1 = 1 -
  • JOY_BUTTON_2 = 2 -
  • JOY_BUTTON_3 = 3 -
  • JOY_BUTTON_4 = 4 -
  • JOY_BUTTON_5 = 5 -
  • JOY_BUTTON_6 = 6 -
  • JOY_BUTTON_7 = 7 -
  • JOY_BUTTON_8 = 8 -
  • JOY_BUTTON_9 = 9 -
  • JOY_BUTTON_10 = 10 -
  • JOY_BUTTON_11 = 11 -
  • JOY_BUTTON_12 = 12 -
  • JOY_BUTTON_13 = 13 -
  • JOY_BUTTON_14 = 14 -
  • JOY_BUTTON_15 = 15 -
  • JOY_BUTTON_MAX = 16 -
  • JOY_SNES_A = 1 -
  • JOY_SNES_B = 0 -
  • JOY_SNES_X = 3 -
  • JOY_SNES_Y = 2 -
  • JOY_SONY_CIRCLE = 1 -
  • JOY_SONY_X = 0 -
  • JOY_SONY_SQUARE = 2 -
  • JOY_SONY_TRIANGLE = 3 -
  • JOY_SEGA_B = 1 -
  • JOY_SEGA_A = 0 -
  • JOY_SEGA_X = 2 -
  • JOY_SEGA_Y = 3 -
  • JOY_XBOX_B = 1 -
  • JOY_XBOX_A = 0 -
  • JOY_XBOX_X = 2 -
  • JOY_XBOX_Y = 3 -
  • JOY_DS_A = 1 -
  • JOY_DS_B = 0 -
  • JOY_DS_X = 3 -
  • JOY_DS_Y = 2 -
  • JOY_SELECT = 10 -
  • JOY_START = 11 -
  • JOY_DPAD_UP = 12 -
  • JOY_DPAD_DOWN = 13 -
  • JOY_DPAD_LEFT = 14 -
  • JOY_DPAD_RIGHT = 15 -
  • JOY_L = 4 -
  • JOY_L2 = 6 -
  • JOY_L3 = 8 -
  • JOY_R = 5 -
  • JOY_R2 = 7 -
  • JOY_R3 = 9 -
  • JOY_AXIS_0 = 0 -
  • JOY_AXIS_1 = 1 -
  • JOY_AXIS_2 = 2 -
  • JOY_AXIS_3 = 3 -
  • JOY_AXIS_4 = 4 -
  • JOY_AXIS_5 = 5 -
  • JOY_AXIS_6 = 6 -
  • JOY_AXIS_7 = 7 -
  • JOY_AXIS_MAX = 8 -
  • JOY_ANALOG_0_X = 0 -
  • JOY_ANALOG_0_Y = 1 -
  • JOY_ANALOG_1_X = 2 -
  • JOY_ANALOG_1_Y = 3 -
  • JOY_ANALOG_2_X = 4 -
  • JOY_ANALOG_2_Y = 5 -
  • OK = 0 -
  • FAILED = 1 -
  • ERR_UNAVAILABLE = 2 -
  • ERR_UNCONFIGURED = 3 -
  • ERR_UNAUTHORIZED = 4 -
  • ERR_PARAMETER_RANGE_ERROR = 5 -
  • ERR_OUT_OF_MEMORY = 6 -
  • ERR_FILE_NOT_FOUND = 7 -
  • ERR_FILE_BAD_DRIVE = 8 -
  • ERR_FILE_BAD_PATH = 9 -
  • ERR_FILE_NO_PERMISSION = 10 -
  • ERR_FILE_ALREADY_IN_USE = 11 -
  • ERR_FILE_CANT_OPEN = 12 -
  • ERR_FILE_CANT_WRITE = 13 -
  • ERR_FILE_CANT_READ = 14 -
  • ERR_FILE_UNRECOGNIZED = 15 -
  • ERR_FILE_CORRUPT = 16 -
  • ERR_FILE_EOF = 17 -
  • ERR_CANT_OPEN = 18 -
  • ERR_CANT_CREATE = 19 -
  • ERROR_QUERY_FAILED = 20 -
  • ERR_ALREADY_IN_USE = 21 -
  • ERR_LOCKED = 22 -
  • ERR_TIMEOUT = 23 -
  • ERR_CANT_AQUIRE_RESOURCE = 24 -
  • ERR_INVALID_DATA = 26 -
  • ERR_INVALID_PARAMETER = 27 -
  • ERR_ALREADY_EXISTS = 28 -
  • ERR_DOES_NOT_EXIST = 29 -
  • ERR_DATABASE_CANT_READ = 30 -
  • ERR_DATABASE_CANT_WRITE = 31 -
  • ERR_COMPILATION_FAILED = 32 -
  • ERR_METHOD_NOT_FOUND = 33 -
  • ERR_LINK_FAILED = 34 -
  • ERR_SCRIPT_FAILED = 35 -
  • ERR_CYCLIC_LINK = 36 -
  • ERR_BUSY = 40 -
  • ERR_HELP = 42 -
  • ERR_BUG = 43 -
  • ERR_WTF = 45 -
  • PROPERTY_HINT_NONE = 0 - No hint for edited property. -
  • PROPERTY_HINT_RANGE = 1 -
  • PROPERTY_HINT_EXP_RANGE = 2 - Hint string is an exponential range, defined as "min,max" or "min,max,step". This is valid for integers and floats. -
  • PROPERTY_HINT_ENUM = 3 - Property hint is an enumerated value, like "Hello,Something,Else". This is valid for integers, floats and strings properties. -
  • PROPERTY_HINT_LENGTH = 5 -
  • PROPERTY_HINT_FLAGS = 7 - Property hint is a bitmask description, for bits 0,1,2,3 abd 5 the hint would be like "Bit0,Bit1,Bit2,Bit3,,Bit5". Valid only for integers. -
  • PROPERTY_HINT_FILE = 8 - String property is a file (so pop up a file dialog when edited). Hint string can be a set of wildcards like "*.doc". -
  • PROPERTY_HINT_DIR = 9 - String property is a directory (so pop up a file dialog when edited). -
  • PROPERTY_HINT_RESOURCE_TYPE = 10 - String property is a resource, so open the resource popup menu when edited. -
  • PROPERTY_USAGE_STORAGE = 1 - Property will be used as storage (default). -
  • PROPERTY_USAGE_STORAGE = 1 - Property will be used as storage (default). -
  • PROPERTY_USAGE_EDITOR = 2 - Property will be visible in editor (default). -
  • PROPERTY_USAGE_NETWORK = 4 -
  • PROPERTY_USAGE_DEFAULT = 7 - Default usage (storage and editor). -
  • TYPE_NIL = 0 -
  • TYPE_BOOL = 1 -
  • TYPE_INT = 2 -
  • TYPE_REAL = 3 -
  • TYPE_STRING = 4 -
  • TYPE_VECTOR2 = 5 -
  • TYPE_RECT2 = 6 -
  • TYPE_VECTOR3 = 7 -
  • TYPE_MATRIX32 = 8 -
  • TYPE_PLANE = 9 -
  • TYPE_QUAT = 10 -
  • TYPE_AABB = 11 -
  • TYPE_MATRIX3 = 12 -
  • TYPE_TRANSFORM = 13 -
  • TYPE_COLOR = 14 -
  • TYPE_IMAGE = 15 -
  • TYPE_NODE_PATH = 16 -
  • TYPE_RID = 17 -
  • TYPE_OBJECT = 18 -
  • TYPE_INPUT_EVENT = 19 -
  • TYPE_DICTIONARY = 20 -
  • TYPE_ARRAY = 21 -
  • TYPE_RAW_ARRAY = 22 -
  • TYPE_INT_ARRAY = 23 -
  • TYPE_REAL_ARRAY = 24 -
  • TYPE_STRING_ARRAY = 25 -
  • TYPE_VECTOR2_ARRAY = 26 -
  • TYPE_VECTOR3_ARRAY = 27 -
  • TYPE_COLOR_ARRAY = 28 -
  • TYPE_MAX = 29 -
  • Description:

    - Global scope constants and variables. This is all that resides in the globals, constants regarding error codes, scancodes, property hints, etc. It's not much. - Singletons are also documented here, since they can be accessed from anywhere. -

    Method Documentation:


    Copyright 2008-2010 Codenix SRL \ No newline at end of file diff --git a/doc/html/@Squirrel.html b/doc/html/@Squirrel.html deleted file mode 100644 index ad4aaa49d8..0000000000 --- a/doc/html/@Squirrel.html +++ /dev/null @@ -1,2 +0,0 @@ -
    IndexClassesCategoriesInheritance

    @Squirrel

    -

    Category: Core

    Method Documentation:


    Copyright 2008-2010 Codenix SRL \ No newline at end of file diff --git a/doc/html/main.css b/doc/html/main.css deleted file mode 100644 index a76e6bbed8..0000000000 --- a/doc/html/main.css +++ /dev/null @@ -1,146 +0,0 @@ -BODY,H1,H2,H3,H4,H5,H6,P,CENTER,TD,TH,UL,DL,DIV, SPAN { - font-family: Arial, Geneva, Helvetica, sans-serif; -} - -a { - - text-decoration: none; - -} - -a:hover { - - text-decoration: underline; -} - -td.top_table { - - padding: 5px; -} - -div.method_doc { - - padding-bottom: 30px; -} - -div.method_description { - margin-left: 30px; -} - -list.inh_class_list { - margin-left: 30px; - -} - -div.inh_class_list { - margin-left: 30px; - -} - -div.method_doc div.method { - - font-size: 12pt; - font-weight: bold; -} - -span.funcdecl { - - color: #202060; -} - -span.funcdef { - - color: #202060; -} - - -span.qualifier { - - font-weight: bold; -} - - -span.symbol { - - /*font-weight: bold;*/ - color: #471870; -} - - -span.datatype { - - color: #6a1533; -} - -tr.category_title { - - background-color: #333333; -} -a.category_title { - font-weight: bold; - color: #FFFFFF; -} - -div.method_list { - - margin-left: 30px; -} - -div.constant_list { - - margin-left: 30px; -} - -div.member_list { - - margin-left: 30px; -} - -div.description { - - margin-left: 30px; -} - -div.class_description { - - margin-left: 30px; -} - -div.method_list li div { - - display: inline; -} - -div.member_list li div.member { - - display: inline; -} - -div.constant_list li div.constant { - - display: inline; -} - -span.member_description { - - font-style: italic; - color: grey; -} - -span.constant_description { - - font-style: italic; - color: grey; -} - -span.identifier { - - font-weight: bold; -} - - -table.class_table td { - - vertical-align: top; -} - diff --git a/doc/html/tutorial01/0_home_red_coding_godot_doc_math_position.png b/doc/html/tutorial01/0_home_red_coding_godot_doc_math_position.png deleted file mode 100644 index df52c05462..0000000000 Binary files a/doc/html/tutorial01/0_home_red_coding_godot_doc_math_position.png and /dev/null differ diff --git a/doc/html/tutorial01/1_home_red_coding_godot_doc_math_direction.png b/doc/html/tutorial01/1_home_red_coding_godot_doc_math_direction.png deleted file mode 100644 index 5b58274bcb..0000000000 Binary files a/doc/html/tutorial01/1_home_red_coding_godot_doc_math_direction.png and /dev/null differ diff --git a/doc/html/tutorial01/2_home_red_coding_godot_doc_math_normals.png b/doc/html/tutorial01/2_home_red_coding_godot_doc_math_normals.png deleted file mode 100644 index 73681a58ce..0000000000 Binary files a/doc/html/tutorial01/2_home_red_coding_godot_doc_math_normals.png and /dev/null differ diff --git a/doc/html/tutorial01/tutorial.css b/doc/html/tutorial01/tutorial.css deleted file mode 100644 index a518c6dff7..0000000000 --- a/doc/html/tutorial01/tutorial.css +++ /dev/null @@ -1,128 +0,0 @@ - -/* start css.sty */ -.cmr-7{font-size:70%;} -.cmmi-7{font-size:70%;font-style: italic;} -.cmmi-10{font-style: italic;} -.ectt-1000{ font-family: monospace;} -.ectt-1000{ font-family: monospace;} -.ectt-1000{ font-family: monospace;} -.ectt-1000{ font-family: monospace;} -.ectt-1000{ font-family: monospace;} -.ecti-1000{ font-style: italic;} -.ecti-1000{ font-style: italic;} -.ecti-1000{ font-style: italic;} -.ecti-1000{ font-style: italic;} -.ecti-1000{ font-style: italic;} -.ecti-0700{font-size:70%; font-style: italic;} -.ecti-0700{ font-style: italic;} -.ecti-0700{ font-style: italic;} -.ecti-0700{ font-style: italic;} -.ecti-0700{ font-style: italic;} -.ecrm-0700{font-size:70%;} -p.noindent { text-indent: 0em } -td p.noindent { text-indent: 0em; margin-top:0em; } -p.nopar { text-indent: 0em; } -p.indent{ text-indent: 1.5em } -@media print {div.crosslinks {visibility:hidden;}} -a img { border-top: 0; border-left: 0; border-right: 0; } -center { margin-top:1em; margin-bottom:1em; } -td center { margin-top:0em; margin-bottom:0em; } -.Canvas { position:relative; } -img.math{vertical-align:middle;} -li p.indent { text-indent: 0em } -.enumerate1 {list-style-type:decimal;} -.enumerate2 {list-style-type:lower-alpha;} -.enumerate3 {list-style-type:lower-roman;} -.enumerate4 {list-style-type:upper-alpha;} -div.newtheorem { margin-bottom: 2em; margin-top: 2em;} -.obeylines-h,.obeylines-v {white-space: nowrap; } -div.obeylines-v p { margin-top:0; margin-bottom:0; } -.overline{ text-decoration:overline; } -.overline img{ border-top: 1px solid black; } -td.displaylines {text-align:center; white-space:nowrap;} -.centerline {text-align:center;} -.rightline {text-align:right;} -div.verbatim {font-family: monospace; white-space: nowrap; text-align:left; clear:both; } -.fbox {padding-left:3.0pt; padding-right:3.0pt; text-indent:0pt; border:solid black 0.4pt; } -div.fbox {display:table} -div.center div.fbox {text-align:center; clear:both; padding-left:3.0pt; padding-right:3.0pt; text-indent:0pt; border:solid black 0.4pt; } -table.minipage{width:100%;} -div.center, div.center div.center {text-align: center; margin-left:1em; margin-right:1em;} -div.center div {text-align: left;} -div.flushright, div.flushright div.flushright {text-align: right;} -div.flushright div {text-align: left;} -div.flushleft {text-align: left;} -.underline{ text-decoration:underline; } -.underline img{ border-bottom: 1px solid black; margin-bottom:1pt; } -.framebox-c, .framebox-l, .framebox-r { padding-left:3.0pt; padding-right:3.0pt; text-indent:0pt; border:solid black 0.4pt; } -.framebox-c {text-align:center;} -.framebox-l {text-align:left;} -.framebox-r {text-align:right;} -span.thank-mark{ vertical-align: super } -span.footnote-mark sup.textsuperscript, span.footnote-mark a sup.textsuperscript{ font-size:80%; } -div.tabular, div.center div.tabular {text-align: center; margin-top:0.5em; margin-bottom:0.5em; } -table.tabular td p{margin-top:0em;} -table.tabular {margin-left: auto; margin-right: auto;} -div.td00{ margin-left:0pt; margin-right:0pt; } -div.td01{ margin-left:0pt; margin-right:5pt; } -div.td10{ margin-left:5pt; margin-right:0pt; } -div.td11{ margin-left:5pt; margin-right:5pt; } -table[rules] {border-left:solid black 0.4pt; border-right:solid black 0.4pt; } -td.td00{ padding-left:0pt; padding-right:0pt; } -td.td01{ padding-left:0pt; padding-right:5pt; } -td.td10{ padding-left:5pt; padding-right:0pt; } -td.td11{ padding-left:5pt; padding-right:5pt; } -table[rules] {border-left:solid black 0.4pt; border-right:solid black 0.4pt; } -.hline hr, .cline hr{ height : 1px; margin:0px; } -.tabbing-right {text-align:right;} -span.TEX {letter-spacing: -0.125em; } -span.TEX span.E{ position:relative;top:0.5ex;left:-0.0417em;} -a span.TEX span.E {text-decoration: none; } -span.LATEX span.A{ position:relative; top:-0.5ex; left:-0.4em; font-size:85%;} -span.LATEX span.TEX{ position:relative; left: -0.4em; } -div.float img, div.float .caption {text-align:center;} -div.figure img, div.figure .caption {text-align:center;} -.marginpar {width:20%; float:right; text-align:left; margin-left:auto; margin-top:0.5em; font-size:85%; text-decoration:underline;} -.marginpar p{margin-top:0.4em; margin-bottom:0.4em;} -table.equation {width:100%;} -.equation td{text-align:center; } -td.equation { margin-top:1em; margin-bottom:1em; } -td.equation-label { width:5%; text-align:center; } -td.eqnarray4 { width:5%; white-space: normal; } -td.eqnarray2 { width:5%; } -table.eqnarray-star, table.eqnarray {width:100%;} -div.eqnarray{text-align:center;} -div.array {text-align:center;} -div.pmatrix {text-align:center;} -table.pmatrix {width:100%;} -span.pmatrix img{vertical-align:middle;} -div.pmatrix {text-align:center;} -table.pmatrix {width:100%;} -img.cdots{vertical-align:middle;} -.partToc a, .partToc, .likepartToc a, .likepartToc {line-height: 200%; font-weight:bold; font-size:110%;} -.index-item, .index-subitem, .index-subsubitem {display:block} -.caption td.id{font-weight: bold; white-space: nowrap; } -table.caption {text-align:center;} -h1.partHead{text-align: center} -p.bibitem { text-indent: -2em; margin-left: 2em; margin-top:0.6em; margin-bottom:0.6em; } -p.bibitem-p { text-indent: 0em; margin-left: 2em; margin-top:0.6em; margin-bottom:0.6em; } -.paragraphHead, .likeparagraphHead { margin-top:2em; font-weight: bold;} -.subparagraphHead, .likesubparagraphHead { font-weight: bold;} -.quote {margin-bottom:0.25em; margin-top:0.25em; margin-left:1em; margin-right:1em; text-align:justify;} -.verse{white-space:nowrap; margin-left:2em} -div.maketitle {text-align:center;} -h2.titleHead{text-align:center;} -div.maketitle{ margin-bottom: 2em; } -div.author, div.date {text-align:center;} -div.thanks{text-align:left; margin-left:10%; font-size:85%; font-style:italic; } -div.author{white-space: nowrap;} -.quotation {margin-bottom:0.25em; margin-top:0.25em; margin-left:1em; } -.abstract p {margin-left:5%; margin-right:5%;} -table.abstract {width:100%;} -.lstlisting .label{margin-right:0.5em; } -div.lstlisting{font-family: monospace; white-space: nowrap; margin-top:0.5em; margin-bottom:0.5em; } -div.lstinputlisting{ font-family: monospace; white-space: nowrap; } -.lstinputlisting .label{margin-right:0.5em;} -.figure img.graphics {margin-left:10%;} -/* end css.sty */ - diff --git a/doc/html/tutorial01/tutorial.html b/doc/html/tutorial01/tutorial.html deleted file mode 100644 index 45c0258709..0000000000 --- a/doc/html/tutorial01/tutorial.html +++ /dev/null @@ -1,902 +0,0 @@ - - - - - - - - - - - -

    1 Introduction to 3D Math

    -

    -

    1.1 Introduction

    -

    There are many approaches to understanding the type of 3D math used in video -games, modelling, ray-tracing, etc. The usual is through vector algebra, matrices, and -linear transformations and, while they are not completely necesary to understand -most of the aspects of 3D game programming (from the theorical point of view), they -provide a common language to communicate with other programmers or -engineers. -

    This tutorial will focus on explaining all the basic concepts needed for a -programmer to understand how to develop 3D games without getting too deep into -algebra. Instead of a math-oriented language, code examples will be given instead -when possible. The reason for this is that. while programmers may have -different backgrounds or experience (be it scientific, engineering or self taught), -code is the most familiar language and the lowest common denominator for -understanding. -

    -

    1.2 Vectors

    -

    -

    1.2.1 Brief Introduction
    -

    When writing 2D games, interfaces and other applications, the typical convention is -to define coordinates as an x,y pair, x representing the horizontal offset and y the -vertical one. In most cases, the unit for both is pixels. This makes sense given the -screen is just a rectangle in two dimensions. -

    An x,y pair can be used for two purposes. It can be an absolute position (screen -cordinate in the previous case), or a relative direction, if we trace an arrow from the -origin (0,0 coordinates) to it’s position. -

    -

    - -

    - - - -
    PICPIC
    Position Direction
    -
    -

    When used as a direction, this pair is called a vector, and two properties can be -observed: The first is the magnitude or length , and the second is the direction. In -two dimensions, direction can be an angle. The magnitude or length can be computed -by simply using Pithagoras theorem: -

    -

    -

    - - -
    ∘x2-+-y2-∘x2-+-y2 +-z2
    2D 3D
    -
    -

    The direction can be an arbitrary angle from either the x or y axis, and could be -computed by using trigonometry, or just using the usual atan2 function present in -most math libraries. However, when dealing with 3D, the direction can’t be described -as an angle. To separate magnitude and direction, 3D uses the concept of normal -vectors. -

    -

    1.2.2 Implementation
    -

    Vectors are implemented in Godot Engine as a class named Vector3 for 3D, and as -both Vector2, Point2 or Size2 in 2D (they are all aliases). They are used for any -purpose where a pair of 2D or 3D values (described as x,y or x,y,z) is needed. This is -somewhat a standard in most libraries or engines. In the script API, they can be -instanced like this: - -

    a = Vector3() 
    a = Vector2( 2.0, 3.4 ) -
    - -

    Vectors also support the common operators +, -, / and * for addition, -substraction, multiplication and division. - -

    a = Vector3(1,2,3) 
    b = Vector3(4,5,6) 
    c = Vector3() 
     
    // writing 
     
    c = a + b 
     
    // is the same as writing 
     
    c.x = a.x + b.x 
    c.y = a.y + b.y 
    c.z = a.z + b.z 
     
    // both will result in a vector containing (5,7,9). 
    // the same happens for the rest of the operators. -
    -

    Vectors also can perform a wide variety of built-in functions, their most common -usages will be explored next. -

    -

    1.2.3 Normal Vectors
    -

    Two points ago, it was mentioned that 3D vectors can’t describe their direction as an -agle (as 2D vectors can). Because of this, normal vectors become important for -separating a vector between direction and magnitude. -

    A normal vector is a vector with a magnitude of 1. This means, no matter where -the vector is pointing to, it’s length is always 1. -

    - - -
    PIC
    Normal vectors aroud the origin.
    -
    -

    Normal vectors have endless uses in 3D graphics programming, so it’s -recommended to get familiar with them as much as possible. -

    -

    1.2.4 Normalization
    -

    Normalization is the process through which normal vectors are obtained -from regular vectors. In other words, normalization is used to reduce the -magnitude of any vector to 1. (except of course, unless the vector is (0,0,0) -). -

    To normalize a vector, it must be divided by its magnitude (which should be -greater than zero): - -

    // a custom vector is created 
    a = Vector3(4,5,6) 
    // l is a single real number (or scalar) containight the length 
    l = Math.sqrt( a.x*a.x + a.y*a.y + a.z*a.z ) 
    // the vector a is divided by its length, by performing scalar divide 
    a = a / l 
    // which is the same as 
    a.x = a.x / l 
    a.y = a.y / l 
    a.z = a.z / l - -
    -

    Vector3 contains two built in functions for normalization: - -

    a = Vector3(4,5,6) 
    a.normalize() // in-place normalization 
    b = a.normalized() // returns a copy of a, normalized -
    -

    -

    1.2.5 Dot Product
    -

    The dot product is, pheraps, the most useful operation that can be applied to 3D -vectors. In the surface, it’s multiple usages are not very obvious, but in depth it can -provide very useful information between two vectors (be it direction or just points in -space). -

    The dot product takes two vectors (a and b in the example) and returns a scalar -(single real number): -

    -

    -

    axbx + ayby + azbz -

    -

    The same expressed in code: - -

    a = Vector3(...) 
    b = Vector3(...) 
     
    c = a.x*b.x + a.y*b.y + a.z*b.z 
     
    // using built-in dot() function 
     
    c = a.dot(b) -
    -

    The dot product presents several useful properties: -

      -
    • If both a and b parameters to a dot product are direction vectors, dot - product will return positive if both point towards the same direction, - negative if both point towards opposite directions, and zero if they are - orthogonal (one is perpendicular to the other). -
    • -
    • If both a and b parameters to a dot product are normalized direction - vectors, then the dot product will return the cosine of the angle between - them (ranging from 1 if they are equal, 0 if they are orthogonal, and -1 if - they are opposed (a == -b)). -
    • -
    • If a is a normalized direction vector and b is a point, the dot product will - return the distance from b to the plane passing through the origin, with - normal a (see item about planes) - -
    • -
    • More uses will be presented later in this tutorial.
    -

    -

    1.2.6 Cross Product
    -

    The cross product also takes two vectors a and b, but returns another vector c that is -orthogonal to the two previous ones. -

    -

    -

    cx = axbz - azby -

    -
    -

    -

    cy = azbx - axbz -

    -
    -

    -

    cz = axby - aybx -

    -

    The same in code: - -

    a = Vector3(...) 
    b = Vector3(...) 
    c = Vector3(...) 
     
    c.x = a.x*b.z - a.z*b.y 
    c.y = a.z*b.x - a.x*b.z 
    c.z = a.x*b.y - a.y*b.x 
     
    // or using the built-in function 
     
    c = a.cross(b) -
    -

    The cross product also presents several useful properties: -

      -
    • As mentioned, the resulting vector c is orthogonal to the input vectors a - and b. -
    • -
    • Since the cross product is anticommutative, swapping a and b will result - in a negated vector c. - -
    • -
    • if a and b are taken from two of the segmets AB, BC or CA that form a - 3D triangle, the magnitude of the resulting vector divided by 2 is the area - of that triangle. -
    • -
    • The direction of the resulting vector c in the previous triangle example - determines wether the points A,B and C are arranged in clocwise or - counter-clockwise order.
    -

    -

    1.3 Plane

    -

    -

    1.3.1 Theory
    -

    A plane can be considered as an infinite, flat surface that splits space in two halves, -usually one named positive and one named negative. In regular mathematics, a plane -formula is described as: -

    -

    -

    ax + by + cz + d -

    -

    However, in 3D programming, this form alone is often of little use. For planes to -become useful, they must be in normalized form. -

    A normalized plane consists of a normal vector n and a distance d. To normalize -a plane, a vector n and distance d’ are created this way: -

    nx = a -

    ny = b -

    nz = c -

    d= d -

    Finally, both n and d’ are both divided by the magnitude of n. -

    In any case, normalizing planes is not often needed (this was mostly for -explanation purposes), and normalized planes are useful because they can be created -and used easily. -

    A normalized plane could be visualized as a plane pointing towards normal n, -offseted by d in the direction of n. -

    In other words, take n, multiply it by scalar d and the resulting point will be part -of the plane. This may need some thinking, so an example with a 2D normal vector -(z is 0, so plane is orthogonal to it) is provided: -

    Some operations can be done with normalized planes: - -

      -
    • Given any point p, the distance from it to a plane can be computed by - doing: n.dot(p) - d -
    • -
    • If the resulting distance in the previous point is negative, the point is - below the plane. -
    • -
    • Convex polygonal shapes can be defined by enclosing them in planes (the - physics engine uses this property)
    -

    -

    1.3.2 Implementation
    -

    Godot Engine implements normalized planes by using the Plane class. - -

    //creates a plane with normal (0,1,0) and distance 5 
    p = Plane( Vector3(0,1,0), 5 ) 
    // get the distance to a point 
    d = p.distance( Vector3(4,5,6) ) -
    -

    -

    1.4 Matrices, Quaternions and Coordinate Systems

    -

    It is very often needed to store the location/rotation of something. In 2D, it is often -enough to store an x,y location and maybe an angle as the rotation, as that should -be enough to represent any posible position. -

    In 3D this becomes a little more difficult, as there is nothing as simple as an angle -to store a 3-axis rotation. -

    The first think that may come to mind is to use 3 angles, one for x, one for y and -one for z. However this suffers from the problem that it becomes very cumbersome to -use, as the individual rotations in each axis need to be performed one after another -(they can’t be performed at the same time), leading to a problem called “gimbal -lock”. Also, it becomes impossible to accumulate rotations (add a rotation to an -existing one). -

    To solve this, there are two known diferent approaches that aid in solving -rotation, Quaternions and Oriented Coordinate Systems. -

    -

    1.4.1 Oriented Coordinate Systems
    -

    Oriented Coordinate Systems (OCS) are a way of representing a coordinate system -inside the cartesian coordinate system. They are mainly composed of 3 Vectors, one -for each axis. The first vector is the x axis, the second the y axis, and the third is the - -z axis. The OCS vectors can be rotated around freely as long as they are kept the -same length (as changing the length of an axis changes its cale), and as long as they -remain orthogonal to eachother (as in, the same as the default cartesian system, -with y pointing up, x pointing left and z pointing front, but all rotated -together). -

    Oriented Coordinate Systems are represented in 3D programming as a 3x3 matrix, -where each row (or column, depending on the implementation) contains one of the -axis vectors. Transforming a Vector by a rotated OCS Matrix results in the rotation -being applied to the resulting vector. OCS Matrices can also be multiplied to -accumulate their transformations. -

    Godot Engine implements OCS Matrices in the Matrix3 class: - -

    //create a 3x3 matrix 
    m = Matrix3() 
    //rotate the matrix in the y axis, by 45 degrees 
    m.rotate( Vector3(0,1,0), Math.deg2rad(45) ) 
    //transform a vector v (xform method is used) 
    v = Vector3(...) 
    result = m.xform( v ) -
    -

    However, in most usage cases, one wants to store a translation together with the -rotation. For this, an origin vector must be added to the OCS, thus transforming it -into a 3x4 (or 4x3, depending on preference) matrix. Godot engine implements this -functionality in the Transform class: - -

    t = Transform() 
    //rotate the transform in the y axis, by 45 degrees 
    t.rotate( Vector3(0,1,0), Math.deg2rad(45) ) 
    //translate the transform by 5 in the z axis 
    t.translate( Vector3( 0,0,5 ) ) 
    //transform a vector v (xform method is used) 
    v = Vector3(...) 
    result = t.xform( v ) -
    -

    Transform contains internally a Matrix3 “basis” and a Vector3 “origin” (which can -be modified individually). -

    -

    1.4.2 Transform Internals
    -

    Internally, the xform() process is quite simple, to apply a 3x3 transform to a vector, -the transposed axis vectors are used (as using the regular axis vectors will result on -an inverse of the desired transform): - -

    m = Matrix3(...) 
    v = Vector3(..) 
    result = Vector3(...) 
     
    x_axis = m.get_axis(0) 
    y_axis = m.get_axis(1) 
    z_axis = m.get_axis(2) 
     
    result.x = Vector3(x_axis.x, y_axis.x, z_axis.x).dot(v) 
    result.y = Vector3(x_axis.y, y_axis.y, z_axis.y).dot(v) 
    result.z = Vector3(x_axis.z, y_axis.z, z_axis.z).dot(v) 
     
    // is the same as doing 
     
    result = m.xform(v) 
     
    // if m this was a Transform(), the origin would be added 
    // like this: 
     
    result = result + t.get_origin() -
    -

    -

    1.4.3 Using The Transform
    -

    So, it is often desired apply sucessive operations to a transformation. For example, -let’s a assume that there is a turtle sitting at the origin (the turtle is a logo reference, - -for those familiar with it). The y axis is up, and the the turtle’s nose is pointing -towards the z axis. -

    The turtle (like many other animals, or vehicles!) can only walk towards the -direction it’s looking at. So, moving the turtle around a little should be something -like this: - -

    // turtle at the origin 
    turtle = Transform() 
    // turtle will walk 5 units in z axis 
    turtle.translate( Vector3(0,0,5) ) 
    // turtle eyes a lettuce 3 units away, will rotate 45 degrees right 
    turtle.rotate( Vector3(0,1,0), Math.deg2rad(45) ) 
    // turtle approaches the lettuce 
    turtle.translate( Vector3(0,0,5) ) 
    // happy turtle over lettuce is at 
    print(turtle.get_origin()) -
    -

    As can be seen, every new action the turtle takes is based on the previous one it -took. Had the order of actions been different and the turtle would have never reached -the lettuce. -

    Transforms are just that, a mean of “accumulating” rotation, translation, scale, -etc. -

    -

    1.4.4 A Warning about Numerical Precision
    -

    Performing several actions over a transform will slowly and gradually lead to -precision loss (objects that draw according to a transform may get jittery, bigger, -smaller, skewed, etc). This happens due to the nature of floating point numbers. if -transforms/matrices are created from other kind of values (like a position and -some angular rotation) this is not needed, but if has been accumulating -transformations and was never recreated, it can be normalized by calling the -.orthonormalize() built-in function. This function has little cost and calling it every -now and then will avoid the effects from precision loss to become visible. - - - - - diff --git a/doc/html/tutorial01/tutorial0x.png b/doc/html/tutorial01/tutorial0x.png deleted file mode 100644 index a0ed4f53ff..0000000000 Binary files a/doc/html/tutorial01/tutorial0x.png and /dev/null differ diff --git a/doc/html/tutorial01/tutorial1x.png b/doc/html/tutorial01/tutorial1x.png deleted file mode 100644 index 80f0d099f7..0000000000 Binary files a/doc/html/tutorial01/tutorial1x.png and /dev/null differ diff --git a/doc/html/tutorial01/tutorial2x.png b/doc/html/tutorial01/tutorial2x.png deleted file mode 100644 index 76c502b6da..0000000000 Binary files a/doc/html/tutorial01/tutorial2x.png and /dev/null differ diff --git a/doc/html/tutorial01/tutorial3x.png b/doc/html/tutorial01/tutorial3x.png deleted file mode 100644 index 8431e9d15c..0000000000 Binary files a/doc/html/tutorial01/tutorial3x.png and /dev/null differ diff --git a/doc/html/tutorial01/tutorial4x.png b/doc/html/tutorial01/tutorial4x.png deleted file mode 100644 index 1ce7a2bb45..0000000000 Binary files a/doc/html/tutorial01/tutorial4x.png and /dev/null differ diff --git a/doc/notes.txt b/doc/notes.txt deleted file mode 100644 index 39c03ca4c5..0000000000 --- a/doc/notes.txt +++ /dev/null @@ -1,20 +0,0 @@ - -in FileDialog file_selected -> file_activated -focus script/shader editor when gaining focus -detect if errors in editor and don't allow play - - --tree of files (all recognized extensions) - -*export: *keep|export|bundle -*options: [make binary for xnl], then options for each filetype (texture compress method, etc) - - -config.h deberia teber varias cosas de plataforma - -_FORCE_INLINE_ -copymem -ftoi -defines de funciones matematicas - - diff --git a/doc/phys_engine.png b/doc/phys_engine.png deleted file mode 100644 index 15539d47d7..0000000000 Binary files a/doc/phys_engine.png and /dev/null differ diff --git a/doc/squirrel.lyx b/doc/squirrel.lyx deleted file mode 100644 index 05270c1b8f..0000000000 --- a/doc/squirrel.lyx +++ /dev/null @@ -1,984 +0,0 @@ -#LyX 2.0 created this file. For more info see http://www.lyx.org/ -\lyxformat 413 -\begin_document -\begin_header -\textclass article -\use_default_options true -\maintain_unincluded_children false -\language english -\language_package default -\inputencoding auto -\fontencoding global -\font_roman default -\font_sans default -\font_typewriter default -\font_default_family default -\use_non_tex_fonts false -\font_sc false -\font_osf false -\font_sf_scale 100 -\font_tt_scale 100 - -\graphics default -\default_output_format default -\output_sync 0 -\bibtex_command default -\index_command default -\paperfontsize default -\use_hyperref false -\papersize default -\use_geometry false -\use_amsmath 1 -\use_esint 1 -\use_mhchem 1 -\use_mathdots 1 -\cite_engine basic -\use_bibtopic false -\use_indices false -\paperorientation portrait -\suppress_date false -\use_refstyle 1 -\index Index -\shortcut idx -\color #008000 -\end_index -\secnumdepth 3 -\tocdepth 3 -\paragraph_separation indent -\paragraph_indentation default -\quotes_language english -\papercolumns 1 -\papersides 1 -\paperpagestyle default -\tracking_changes false -\output_changes false -\html_math_output 0 -\html_css_as_file 0 -\html_be_strict false -\end_header - -\begin_body - -\begin_layout Title -Squirrel Usage in Godot -\end_layout - -\begin_layout Section -Introduction -\end_layout - -\begin_layout Standard -Squirrel is a nice scripting language. - It's sort of a mix between Lua, Java and JavaScript and ends up being easy - to learn for most programmers. - It has more language features than GDScript but it's also slower, more - limited and not as well integrated. - This guide will explain how Squirrel is integrated to Godot and all the - quirks that are needed to know in order to use it properly. -\end_layout - -\begin_layout Section -Enabling Squirrel -\end_layout - -\begin_layout Standard -Squirrel may not be enabled by default in a Godot build. - To enable it, execute SCons with the following parameters: -\end_layout - -\begin_layout Standard -\begin_inset listings -inline false -status open - -\begin_layout Plain Layout - -shell$ scons squirrel=yes -\end_layout - -\end_inset - - -\end_layout - -\begin_layout Section -Documentation -\end_layout - -\begin_layout Standard -Godot utilizes Squirrel 2.2. - Documentation can be found at: -\begin_inset CommandInset href -LatexCommand href -target "http://squirrel-lang.org/#documentation" - -\end_inset - - -\end_layout - -\begin_layout Section -Class Files -\end_layout - -\begin_layout Standard -Unless writing a library, Godot expects a class for scripting an object. - Since a Squirrel source file can contain many classes, the main class must - be returned. - The following is an example of extending a button: -\end_layout - -\begin_layout Standard -\begin_inset listings -inline false -status open - -\begin_layout Plain Layout - -class MyButton extends Button { -\end_layout - -\begin_layout Plain Layout - -\end_layout - -\begin_layout Plain Layout - -\end_layout - -\begin_layout Plain Layout - - constructor() { -\end_layout - -\begin_layout Plain Layout - - // ALWAYS call parent constructor -\end_layout - -\begin_layout Plain Layout - - Button.constructor() -\end_layout - -\begin_layout Plain Layout - - } -\end_layout - -\begin_layout Plain Layout - -} -\end_layout - -\begin_layout Plain Layout - -\end_layout - -\begin_layout Plain Layout - -return MyButton // main class returned -\end_layout - -\end_inset - - -\end_layout - -\begin_layout Standard -Additionally, classes are all copied to the root table, so all class names - in scripts must be different if they are attempted to be loaded simultaneously. - The same can be said for any other globals declared in the script. - -\end_layout - -\begin_layout Standard -Finally, squirrel scripts must be saved with the .nut or .sq extensions (both - are recognized). -\end_layout - -\begin_layout Section -Including Other Scripts -\end_layout - -\begin_layout Standard -Other scripts can be included with the include() directive. - Full and relative paths are supported. - When included, the classes and globals are moved to the root table, so - they become immediately available. - Constants, however, are only inlined in the current class on load, so Squirrel - does not make them available. - Example of including scripts: -\end_layout - -\begin_layout Standard -\begin_inset listings -inline false -status open - -\begin_layout Plain Layout - -include("my_button.nut") # // relative to current script, expected to be - in the same path -\end_layout - -\begin_layout Plain Layout - -include("res://buttons/my_button.nut") // using resource path -\end_layout - -\end_inset - - -\end_layout - -\begin_layout Section -Built-In Types -\end_layout - -\begin_layout Standard -There are some small differences between the Built-In types in Godot and - the ones in Squirrel, so the documentation will not match. - The differences are documented here. -\end_layout - -\begin_layout Standard -An attempt will be made to document everything here,but if in doubt about - bindings on built-in types, you can always take a loot at the bindings - source file in script/squirrel/sq_bind_types.cpp. -\end_layout - -\begin_layout Standard -Built-In Types in Squirrel are passed by reference (unlike by value like - in GD). - They also don't need to be freed. -\end_layout - -\begin_layout Subsection -AABB -\end_layout - -\begin_layout Standard -\begin_inset Quotes eld -\end_inset - -pos -\begin_inset Quotes erd -\end_inset - -, -\begin_inset Quotes eld -\end_inset - -size -\begin_inset Quotes erd -\end_inset - - and -\begin_inset Quotes eld -\end_inset - -end -\begin_inset Quotes erd -\end_inset - - are not available Use get_pos()/set_pos and get_size()/set_size(). -\end_layout - -\begin_layout Subsection -InputEvent -\end_layout - -\begin_layout Standard -InputEvent is a single datatype and contains everything. - Use only the fields meant for the event type: -\end_layout - -\begin_layout Standard -\begin_inset listings -inline false -status open - -\begin_layout Plain Layout - -//for mouse motion and button -\end_layout - -\begin_layout Plain Layout - -int mouse_x -\end_layout - -\begin_layout Plain Layout - -int mouse_y -\end_layout - -\begin_layout Plain Layout - -int mouse_button_mask -\end_layout - -\begin_layout Plain Layout - -int mouse_global_x -\end_layout - -\begin_layout Plain Layout - -int mouse_global_y -\end_layout - -\begin_layout Plain Layout - -\end_layout - -\begin_layout Plain Layout - -//for mouse button -\end_layout - -\begin_layout Plain Layout - -\end_layout - -\begin_layout Plain Layout - -int mouse_button_index -\end_layout - -\begin_layout Plain Layout - -bool mouse_button_pressed -\end_layout - -\begin_layout Plain Layout - -bool mouse_button_doubleclick -\end_layout - -\begin_layout Plain Layout - -\end_layout - -\begin_layout Plain Layout - -//for mouse motion -\end_layout - -\begin_layout Plain Layout - -\end_layout - -\begin_layout Plain Layout - -int mouse_motion_x -\end_layout - -\begin_layout Plain Layout - -int mouse_motion_y -\end_layout - -\begin_layout Plain Layout - -\end_layout - -\begin_layout Plain Layout - -//for keyboard -\end_layout - -\begin_layout Plain Layout - -\end_layout - -\begin_layout Plain Layout - -int key_scancode -\end_layout - -\begin_layout Plain Layout - -int key_unicode -\end_layout - -\begin_layout Plain Layout - -bool key_pressed -\end_layout - -\begin_layout Plain Layout - -bool key_echo -\end_layout - -\begin_layout Plain Layout - -\end_layout - -\begin_layout Plain Layout - -//for keyboard and mouse -\end_layout - -\begin_layout Plain Layout - -\end_layout - -\begin_layout Plain Layout - -bool mod_alt -\end_layout - -\begin_layout Plain Layout - -bool mod_shift -\end_layout - -\begin_layout Plain Layout - -bool mod_meta -\end_layout - -\begin_layout Plain Layout - -bool mod_control -\end_layout - -\begin_layout Plain Layout - -\end_layout - -\begin_layout Plain Layout - -//joy button -\end_layout - -\begin_layout Plain Layout - -\end_layout - -\begin_layout Plain Layout - -int joy_button_index -\end_layout - -\begin_layout Plain Layout - -bool joy_button_pressed -\end_layout - -\begin_layout Plain Layout - -\end_layout - -\begin_layout Plain Layout - -//joy axis -\end_layout - -\begin_layout Plain Layout - -\end_layout - -\begin_layout Plain Layout - -int joy_axis -\end_layout - -\begin_layout Plain Layout - -float joy_axis_value -\end_layout - -\begin_layout Plain Layout - -\end_layout - -\begin_layout Plain Layout - -//screen drag and touch -\end_layout - -\begin_layout Plain Layout - -\end_layout - -\begin_layout Plain Layout - -int screen_index -\end_layout - -\begin_layout Plain Layout - -int screen_x -\end_layout - -\begin_layout Plain Layout - -int screen_y -\end_layout - -\begin_layout Plain Layout - -\end_layout - -\begin_layout Plain Layout - -//screen touch -\end_layout - -\begin_layout Plain Layout - -\end_layout - -\begin_layout Plain Layout - -int screen_index -\end_layout - -\begin_layout Plain Layout - -\end_layout - -\begin_layout Plain Layout - -//action -\end_layout - -\begin_layout Plain Layout - -\end_layout - -\begin_layout Plain Layout - -int action_id -\end_layout - -\begin_layout Plain Layout - -bool action_pressed -\end_layout - -\begin_layout Plain Layout - -\end_layout - -\end_inset - - -\end_layout - -\begin_layout Subsection -Matrix3 -\end_layout - -\begin_layout Standard -x,y,z member vectors are not available. - Use get_row() and set_row() instead. - Individual float values of the matrix are available as swizzle masks such - as xxy, xyz, zzx, etc. -\end_layout - -\begin_layout Standard -Additional in-place versions of some functions are available: transpose(), - invert(), rotate(), scale(), orthonormalize(). -\end_layout - -\begin_layout Subsection -Transform -\end_layout - -\begin_layout Standard -\begin_inset Quotes eld -\end_inset - -basis -\begin_inset Quotes erd -\end_inset - - and -\begin_inset Quotes eld -\end_inset - -origin -\begin_inset Quotes erd -\end_inset - - members are not available. - Use get_basis()/set_basis() and get_origin()/set_origin() instead. - Additional in-place versions of some functions are available: invert(), - affine_invert(), orthonormalize(), rotate(), translate(), scale(). -\end_layout - -\begin_layout Standard -Vector2 -\end_layout - -\begin_layout Subsection -Plane -\end_layout - -\begin_layout Standard -\begin_inset Quotes eld -\end_inset - -normal -\begin_inset Quotes erd -\end_inset - - member vector is not available. - Use get_normal(), set_normal() instead. -\end_layout - -\begin_layout Subsection -Rect2 -\end_layout - -\begin_layout Standard -\begin_inset Quotes eld -\end_inset - -pos -\begin_inset Quotes erd -\end_inset - -, -\begin_inset Quotes eld -\end_inset - -size -\begin_inset Quotes erd -\end_inset - - and -\begin_inset Quotes eld -\end_inset - -end -\begin_inset Quotes erd -\end_inset - - are not available Use get_pos()/set_pos and get_size()/set_size(). -\end_layout - -\begin_layout Subsection -Native Arrays -\end_layout - -\begin_layout Standard -Native arrays such as RawArray, IntArray,StringArray, etc are not supported. - Use regular squirrel arrays instead, since conversion to/from them will - happen automatically. -\end_layout - -\begin_layout Subsection -Math Functions -\end_layout - -\begin_layout Standard -Math functions are inside the Math namespace in Squirrel. - For example Math.sin , Math.PI, Math.atan2(). -\end_layout - -\begin_layout Subsection -Native Types -\end_layout - -\begin_layout Standard -Array, Dictionary and NodePath are not available. - Use a native array, table and string respectively. -\end_layout - -\begin_layout Section -_get , _set -\end_layout - -\begin_layout Standard -_get and _set are reserved in Squirrel, for overriding Godot Object property - getter/setter, use _get_property and _set_property. -\end_layout - -\begin_layout Section -Member Export -\end_layout - -\begin_layout Standard -Simple exporting of members (so far only integer, floating point and string - are supported) is supported by the @export extension. - It is used like this: -\end_layout - -\begin_layout Standard -\begin_inset listings -inline false -status open - -\begin_layout Plain Layout - -class MyButton extends Button { -\end_layout - -\begin_layout Plain Layout - -\end_layout - -\begin_layout Plain Layout - - aprop=1 // @export -\end_layout - -\begin_layout Plain Layout - - bprop=2.0 // @export -\end_layout - -\begin_layout Plain Layout - - cprop="3" // @export -\end_layout - -\begin_layout Plain Layout - -\end_layout - -\begin_layout Plain Layout - - //these will be available to the property editor, and will be loaded/saved - with the scene. -\end_layout - -\begin_layout Plain Layout - -} -\end_layout - -\end_inset - - -\end_layout - -\begin_layout Section -Always Enabled Scripts -\end_layout - -\begin_layout Standard -Scripts are not enabled in the editor by default. - To enable a script always, add an @always_enabled comment. - Example: -\end_layout - -\begin_layout Standard -\begin_inset listings -inline false -status open - -\begin_layout Plain Layout - -//@always_enabled -\end_layout - -\begin_layout Plain Layout - -\end_layout - -\begin_layout Plain Layout - -class MyButton extends Button { -\end_layout - -\begin_layout Plain Layout - -\end_layout - -\begin_layout Plain Layout - -... -\end_layout - -\end_inset - - -\end_layout - -\begin_layout Section -Threads -\end_layout - -\begin_layout Standard -Thread support in Squirrel is very poor. - This is because of the stack-based nature of the language implementation. - Since godot can run in multiple threads, it will forcibily lock the whole - VM when accessed from multiple threads, which will result in degraded performan -ce. - Creating user threads in Squirrel is definitely not recomended, as it may - completely lock the main thread. -\end_layout - -\begin_layout Section -References -\end_layout - -\begin_layout Standard -Godot has a built-in reference counted type used in conjunction with a template - (objects that inherit the -\begin_inset Quotes eld -\end_inset - -Reference -\begin_inset Quotes erd -\end_inset - - class). - Since Squirrel also uses reference counting, it becomes impossible for - such types in godot to contain a script, because it would result in an - un-breakable reference cycle. - To avoid this, a Ref() class was created in Squirrel. - -\end_layout - -\begin_layout Standard -When calling Godot API functions, returned references are wrapped inside - Ref() transparently, but the problem arises when creating a Reference-derived - object from the code. - In such cases, the reference must be wrapped manually like this: -\end_layout - -\begin_layout Standard -\begin_inset listings -inline false -status open - -\begin_layout Plain Layout - -local f = Ref( File() ) -\end_layout - -\begin_layout Plain Layout - -local err = f.open("hello.txt",File.READ) -\end_layout - -\end_inset - - -\end_layout - -\begin_layout Standard -Anything not a reference that inherits from Object can be freed manually - by calling .free(), just like in GDScript. - Object classes are in itself weak references to engine objects, and their - validity can be checked by calling the -\begin_inset Quotes eld -\end_inset - -has_instance() -\begin_inset Quotes erd -\end_inset - - built-in method. -\end_layout - -\begin_layout Section -Unicode -\end_layout - -\begin_layout Standard -Squirrel source code is supposed to support Unicode, but the implementation - is very broken (Squirrel attempts to use 16 bit chars no matter what, making - it incompatible when the host OS is 32 bit, like Linux). - Squirrel source code is parsed as UTF-8, and strings also contain UTF-8. - Wide char access in strings is not supported. -\end_layout - -\begin_layout Section -Debugging -\end_layout - -\begin_layout Standard -Squirrel is well integrated into the Godot debugger. - To run the project in debug mode, execute the godot binary with the -debug - argument. - Godot will break on squirrel errors and allow the programmer to debug. -\end_layout - -\begin_layout Section -Utility Functions -\end_layout - -\begin_layout Standard -There are a few squirrel-only utility functions available: -\end_layout - -\begin_layout Subsection -print(value[,value]) -\end_layout - -\begin_layout Standard -Print stuff to stdout. -\end_layout - -\begin_layout Subsection -dofile(path) -\end_layout - -\begin_layout Standard -Execute a squirrel script file and return whatever the file returns. - Not recommended to use in production because it can't be optimized. -\end_layout - -\begin_layout Subsection -nativeref(var) -\end_layout - -\begin_layout Standard -Convert any squirrel type to an engine type. - When this type returns to squirrel, it's converted back. - This is useful to add to Godot callbacks to ensure that the datatype is - not converted. -\end_layout - -\begin_layout Subsection -unicode_split(string) -\end_layout - -\begin_layout Standard -Split an unicode string (utf8) into an array of widechars. - Useful since there is no wide char access from Squirrel. -\end_layout - -\begin_layout Subsection -breakpoint() -\end_layout - -\begin_layout Standard -Stop the debugger when reaches here (when run inside the debugger). -\end_layout - -\begin_layout Subsection -backtrace() -\end_layout - -\begin_layout Standard -Print a backtrace of the call stack. -\end_layout - -\begin_layout Subsection -tr(text) -\end_layout - -\begin_layout Standard -Translate text (use string lookup in Godot translation system). -\end_layout - -\begin_layout Subsection -printerr(text) -\end_layout - -\begin_layout Standard -Print a string to stderr. -\end_layout - -\end_body -\end_document diff --git a/doc/todo.txt b/doc/todo.txt deleted file mode 100644 index 511b5dbbe2..0000000000 --- a/doc/todo.txt +++ /dev/null @@ -1,39 +0,0 @@ --Fisica 2D - *terminar constraints - *terminar queries - *desactivar on suspend - -bugs supongo? - --Fisica 3D - -portar engine 2D a 3D mayoritariamente (si puedo esperar, mejor) - -hacer que skeletons se vuelvan ragdolls de alguna forma - -hacer bien lo de enganchar cosas a huesos de esqueleto - --GUI - - Tree necesita resizear desde los headers - --Escena 3D - -Deshabilitar 3D (Opcional en compilacion) - -Particulas 3D - -Heightmaps - -Arreglar fixed pipeline - -arreglar glow y ssao - --Editor codigo - -Editor de codigo (esta, pero esta lleno de bugs) - -Debugger (esta, pero hay que integrar bien) - --UI General - -Cambiar lugar el tema de resources porque es MUY poco intuitivo - -Tal vez arreglar un poquito el theme y la estetica (para release, low priority) - -Run deberia correr la escena main - -new script deberia dar opcion de crear en disco - -los scripts de deberian mantener abiertos al abrir otra escena - - - --Settings - -Hacer pantalla de optimizacion general del proyecto - --A futuro: - -Scripting Propio - -Portar a DX9/GL3 \ No newline at end of file diff --git a/doc/tutorial/01 Getting Started.lyx b/doc/tutorial/01 Getting Started.lyx deleted file mode 100644 index bdb4c7706d..0000000000 --- a/doc/tutorial/01 Getting Started.lyx +++ /dev/null @@ -1,557 +0,0 @@ -#LyX 1.6.5 created this file. For more info see http://www.lyx.org/ -\lyxformat 345 -\begin_document -\begin_header -\textclass article -\use_default_options true -\language english -\inputencoding auto -\font_roman default -\font_sans default -\font_typewriter default -\font_default_family default -\font_sc false -\font_osf false -\font_sf_scale 100 -\font_tt_scale 100 - -\graphics default -\paperfontsize default -\use_hyperref false -\papersize default -\use_geometry false -\use_amsmath 1 -\use_esint 1 -\cite_engine basic -\use_bibtopic false -\paperorientation portrait -\secnumdepth 3 -\tocdepth 3 -\paragraph_separation indent -\defskip medskip -\quotes_language english -\papercolumns 1 -\papersides 1 -\paperpagestyle default -\tracking_changes false -\output_changes false -\author "" -\author "" -\end_header - -\begin_body - -\begin_layout Title -01. - Getting Started with Godot Engine -\end_layout - -\begin_layout Section* -Introduction: -\end_layout - -\begin_layout Standard -Godot Engine is designed to be useful. - This may sound rather vague and is difficult to explain without repeating - the same claims that every other engine does, but, as we progress through - this (and the next) tutorials, hopefully it will be made clear what -\begin_inset Quotes eld -\end_inset - -useful -\begin_inset Quotes erd -\end_inset - - means. -\end_layout - -\begin_layout Standard -Godot Engine has many components, both high and low level, and is usually - more abstract and complex than most other engines. - This is, however, to the advantage of the user as complexity is presented - in a way that it only needs to be discovered when more power needs to be - untapped. - This helps to provide an easy learning curve. -\end_layout - -\begin_layout Standard -Design wise, the whole API and set of components were created with a clear - goal in mind, which is to allow for smooth integration of design ideas, - code and assets. - This is achieved by defining the following rules: -\end_layout - -\begin_layout Itemize -Implementing a game feature should never be too many steps away from an - existing component. -\end_layout - -\begin_layout Itemize -More complex features should be leveraged by combining or extending existing - components. -\end_layout - -\begin_layout Itemize -If the above fails, creating custom components should be extremely simple. -\end_layout - -\begin_layout Standard -Ultimately, Godot Engine provides an editor and tools that allows everyone - to work with it: -\end_layout - -\begin_layout Itemize -Programmers can script and extend any component of the project. -\end_layout - -\begin_layout Itemize -Designers can tweak and animate any parameter from a friendly user interface. -\end_layout - -\begin_layout Itemize -Artists can import their art and models and tweak the look of everything - in realtime. -\end_layout - -\begin_layout Section* -Editor: -\end_layout - -\begin_layout Standard -As mentioned before, Godot Engine is very abstract so projects consist of - just a -\emph on -path -\emph default - (ie: C: -\backslash -games -\backslash -mygame5). - Projects don't have to be specifically created, and many can be placed - inside the same path (useful for not wasting folders on tests and experiments). - -\end_layout - -\begin_layout Standard -In any case, to ease the management of projects, a graphical util exists. -\end_layout - -\begin_layout Subsection* -Running From The Project Manager -\end_layout - -\begin_layout Standard -Godot Engine includes a built-in project manager. - This is installed by default on Windows and OSX and it allows for the creation - and removal projects that will be remembered at the next startup: -\end_layout - -\begin_layout Standard -\align center -\begin_inset Graphics - filename pm.png - -\end_inset - - -\end_layout - -\begin_layout Standard -To create a new project, the [Create] button must be pressed and a dialog - will appear, prompting for a path and project name. - Afterwards, the [Open] button will close the project manager and open the - desired project. -\end_layout - -\begin_layout Subsection* -Running From the Command Line -\end_layout - -\begin_layout Standard -To create and manage projects, it is perfectly possible to use the command - line. - Many users prefer this way of working with project data. -\end_layout - -\begin_layout Standard -\align center -\begin_inset Graphics - filename pmc.png - -\end_inset - - -\end_layout - -\begin_layout Standard -For ease of use, it is recommended that the -\begin_inset Quotes eld -\end_inset - -godot -\begin_inset Quotes erd -\end_inset - - binary exists in the path, so any project can be opened easily aywhere - just by changing location to the projec and executing the editor. -\end_layout - -\begin_layout Subsection* -Godot Editor -\end_layout - -\begin_layout Standard -Godot Editor should have been opened by now, if not please check the previous - steps again. -\end_layout - -\begin_layout Standard -Godot has a powerful buit-in editor. - It uses the graphics toolkint within itself to display the UI, so it runs - identical on any platform (even consoles or phones!). -\end_layout - -\begin_layout Standard -\align center -\begin_inset Graphics - filename editor.png - -\end_inset - - -\end_layout - -\begin_layout Standard -In the above screenshots, a few regions are labelled to be explained as - follows: -\end_layout - -\begin_layout Subsubsection* -Viewport -\end_layout - -\begin_layout Standard -The -\emph on -Viewport -\emph default - is the main space where the content is displayed. - Content includes 3D Nodes or Graphical User Interface (GUI) controls. - Other types of data spawn editors of their own when being edited. - The default viewport is the 3D viewport, which can be panned, zoomed, etc. -\end_layout - -\begin_layout Subsubsection* -Scene Tree -\end_layout - -\begin_layout Standard -The -\emph on -Scene Tree -\emph default - is a small dock that displays the tree of the current scene being edited. - A scene is a collection of nodes arranged in a tree-hierarchy (any node - can have several owned children-nodes). - The meaning of this ownership depends purely on the -\emph on -type -\emph default - of the node, but it will become clear after going through the examples. - In a -\emph on -MVC -\emph default - pattern, the scene tree could be considered the -\emph on -View -\emph default -. -\end_layout - -\begin_layout Subsubsection* -Property Editor -\end_layout - -\begin_layout Standard -The -\emph on -Property Editor -\emph default - is another small dock. - Every node contains a finite number of -\emph on -properties -\emph default -, which can be edited. - Properties can be of several types, such as integers, strings, images, - matrices, etc. - Usually, changes to properties are reflected in the -\emph on -viewport -\emph default - in real time. -\end_layout - -\begin_layout Section* -Examples: -\end_layout - -\begin_layout Standard -From now, a few, simple examples will be presented that will help understand - a little better how Godot Engine works. - -\end_layout - -\begin_layout Subsubsection* -Hello, World! -\end_layout - -\begin_layout Enumerate -Open the editor -\end_layout - -\begin_layout Enumerate -Click on -\begin_inset Quotes eld -\end_inset - -Node -\begin_inset Quotes erd -\end_inset - - (Node Menu), then on -\begin_inset Quotes eld -\end_inset - -Create Root -\begin_inset Quotes erd -\end_inset - - -\end_layout - -\begin_deeper -\begin_layout Standard -\align center -\begin_inset Graphics - filename tute1_1.png - -\end_inset - - -\end_layout - -\end_deeper -\begin_layout Enumerate -Create a node of type -\emph on -Label, -\emph default -then instruct the -\emph on -editor -\emph default -to switch to GUI editing mode. - A few red squares will appear on the top left corner, don't mind them yet. -\end_layout - -\begin_deeper -\begin_layout Standard -\align center -\begin_inset Graphics - filename tute1_2.png - -\end_inset - - -\end_layout - -\begin_layout Standard -\align center -\begin_inset Graphics - filename tute1_2b.png - -\end_inset - - -\end_layout - -\begin_layout Standard -\align center -\begin_inset Graphics - filename tute1_3c.png - -\end_inset - - -\end_layout - -\end_deeper -\begin_layout Enumerate -Select the -\emph on -Label -\emph default -node in the -\emph on -Scene Tree -\emph default - (if it's not selected yet), the properties of the selected node will appear - in the -\emph on -Property Editor -\end_layout - -\begin_deeper -\begin_layout Standard -\align center -\begin_inset Graphics - filename tute1_3a.png - -\end_inset - - -\end_layout - -\begin_layout Standard -\align center -\begin_inset Graphics - filename tute1_3b.png - -\end_inset - - -\end_layout - -\end_deeper -\begin_layout Enumerate -Look for the -\emph on -Text -\emph default - property in the -\emph on -Property Editor -\emph default - and click the right column, so it becomes editable. - Enter the text -\begin_inset Quotes eld -\end_inset - -Hello, World! -\begin_inset Quotes erd -\end_inset - -. - A red square containing -\begin_inset Quotes eld -\end_inset - -Hello World! -\begin_inset Quotes erd -\end_inset - - will appear at the top left, move it to the center. -\end_layout - -\begin_deeper -\begin_layout Standard -\align center -\begin_inset Graphics - filename tute1_4a.png - -\end_inset - - -\end_layout - -\begin_layout Standard -\align center -\begin_inset Graphics - filename tute1_4b.png - -\end_inset - - -\end_layout - -\end_deeper -\begin_layout Enumerate -Save the scene. -\end_layout - -\begin_deeper -\begin_layout Standard -\align center -\begin_inset Graphics - filename tute1_5a.png - -\end_inset - - -\end_layout - -\begin_layout Standard -\align center -\begin_inset Graphics - filename tute1_5b.png - -\end_inset - - -\end_layout - -\end_deeper -\begin_layout Enumerate -Press PLAY. - A new window will appear running the application. -\end_layout - -\begin_deeper -\begin_layout Standard -\align center -\begin_inset Graphics - filename tute1_6.png - -\end_inset - - -\end_layout - -\begin_layout Standard -\align center -\begin_inset Graphics - filename tute1_7.png - -\end_inset - - -\end_layout - -\end_deeper -\begin_layout Subsubsection* -Hello World 2 (a little more complex) -\end_layout - -\begin_layout Subsubsection* -A 3D Cube in Space -\end_layout - -\begin_layout Standard - -\end_layout - -\begin_layout Standard -In many cases, nodes and other types of engine objects need to express changes - in their state, such as a button being pressed, a scroll being dragged, - or a projectile colliding against a tank. - Godot Engine utilizes the concept of signals for this. - Different types of nodes and objects can emit signals, and any other node - or object can connect to them. - -\end_layout - -\end_body -\end_document diff --git a/doc/tutorial/editor.png b/doc/tutorial/editor.png deleted file mode 100644 index 92255a6f17..0000000000 Binary files a/doc/tutorial/editor.png and /dev/null differ diff --git a/doc/tutorial/pm.png b/doc/tutorial/pm.png deleted file mode 100644 index 00d46d9a64..0000000000 Binary files a/doc/tutorial/pm.png and /dev/null differ diff --git a/doc/tutorial/pmc.png b/doc/tutorial/pmc.png deleted file mode 100644 index 847d32b3a2..0000000000 Binary files a/doc/tutorial/pmc.png and /dev/null differ diff --git a/doc/tutorial/tute1_1.png b/doc/tutorial/tute1_1.png deleted file mode 100644 index 82152c7255..0000000000 Binary files a/doc/tutorial/tute1_1.png and /dev/null differ diff --git a/doc/tutorial/tute1_2.png b/doc/tutorial/tute1_2.png deleted file mode 100644 index 852015894c..0000000000 Binary files a/doc/tutorial/tute1_2.png and /dev/null differ diff --git a/doc/tutorial/tute1_2b.png b/doc/tutorial/tute1_2b.png deleted file mode 100644 index e97a40b4c5..0000000000 Binary files a/doc/tutorial/tute1_2b.png and /dev/null differ diff --git a/doc/tutorial/tute1_3a.png b/doc/tutorial/tute1_3a.png deleted file mode 100644 index 5feef01e03..0000000000 Binary files a/doc/tutorial/tute1_3a.png and /dev/null differ diff --git a/doc/tutorial/tute1_3b.png b/doc/tutorial/tute1_3b.png deleted file mode 100644 index 1f2ded42bb..0000000000 Binary files a/doc/tutorial/tute1_3b.png and /dev/null differ diff --git a/doc/tutorial/tute1_3c.png b/doc/tutorial/tute1_3c.png deleted file mode 100644 index 2c52ccd780..0000000000 Binary files a/doc/tutorial/tute1_3c.png and /dev/null differ diff --git a/doc/tutorial/tute1_4a.png b/doc/tutorial/tute1_4a.png deleted file mode 100644 index 8d0d04ff6b..0000000000 Binary files a/doc/tutorial/tute1_4a.png and /dev/null differ diff --git a/doc/tutorial/tute1_4b.png b/doc/tutorial/tute1_4b.png deleted file mode 100644 index fff5f8d723..0000000000 Binary files a/doc/tutorial/tute1_4b.png and /dev/null differ diff --git a/doc/tutorial/tute1_5a.png b/doc/tutorial/tute1_5a.png deleted file mode 100644 index 37bea04570..0000000000 Binary files a/doc/tutorial/tute1_5a.png and /dev/null differ diff --git a/doc/tutorial/tute1_5b.png b/doc/tutorial/tute1_5b.png deleted file mode 100644 index df9a987ef3..0000000000 Binary files a/doc/tutorial/tute1_5b.png and /dev/null differ diff --git a/doc/tutorial/tute1_6.png b/doc/tutorial/tute1_6.png deleted file mode 100644 index bbe04c8547..0000000000 Binary files a/doc/tutorial/tute1_6.png and /dev/null differ diff --git a/doc/tutorial/tute1_7.png b/doc/tutorial/tute1_7.png deleted file mode 100644 index 7653a89064..0000000000 Binary files a/doc/tutorial/tute1_7.png and /dev/null differ diff --git a/doc/undoredoapi.txt b/doc/undoredoapi.txt deleted file mode 100644 index eb73b8ccff..0000000000 --- a/doc/undoredoapi.txt +++ /dev/null @@ -1,25 +0,0 @@ -undo/redo api proposal - - - -o o o o o o o o - - -undoredo.create_method(); -undoredo.add_do_method(node,"add_child",node_to_add); -undoredo.add_undo_method(node,"remove_child",node_to_add); -undoredo.add_add_data(node_to_add); -undoredo.commit() - -undoredo.create_method(); -undoredo.add_do_method(node,"remove_node",node_to_remove); -undoredo.add_undo_method(node,"add_node",node_to_remove); -undoredo.add_remove_data(node_to_remove); -undoredo.commit() - - -undoredo.create_property(); -undoredo.add_do_set(node,"property",value); -undoredo.add_undo_set(node,"property",previous_value); -undoredo.add_remove_data(node_to_remove); -undoredo.commit() -- cgit v1.2.3 From 29f30b7deb8d3b01d90d47194e4cf0c15cec7dd5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Sat, 12 Dec 2015 21:00:37 +0100 Subject: Move doxygen config to doc folder Also removed logo_small.png and used logo.png instead --- Doxyfile | 2432 -------------------------------------------------------- doc/Doxyfile | 2432 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ logo_small.png | Bin 2025 -> 0 bytes 3 files changed, 2432 insertions(+), 2432 deletions(-) delete mode 100644 Doxyfile create mode 100644 doc/Doxyfile delete mode 100644 logo_small.png diff --git a/Doxyfile b/Doxyfile deleted file mode 100644 index 4268ed8c7d..0000000000 --- a/Doxyfile +++ /dev/null @@ -1,2432 +0,0 @@ -# Doxyfile 1.8.9.1 - -# This file describes the settings to be used by the documentation system -# doxygen (www.doxygen.org) for a project. -# -# All text after a double hash (##) is considered a comment and is placed in -# front of the TAG it is preceding. -# -# All text after a single hash (#) is considered a comment and will be ignored. -# The format is: -# TAG = value [value, ...] -# For lists, items can also be appended using: -# TAG += value [value, ...] -# Values that contain spaces should be placed between quotes (\" \"). - -#--------------------------------------------------------------------------- -# Project related configuration options -#--------------------------------------------------------------------------- - -# This tag specifies the encoding used for all characters in the config file -# that follow. The default is UTF-8 which is also the encoding used for all text -# before the first occurrence of this tag. Doxygen uses libiconv (or the iconv -# built into libc) for the transcoding. See http://www.gnu.org/software/libiconv -# for the list of possible encodings. -# The default value is: UTF-8. - -DOXYFILE_ENCODING = UTF-8 - -# The PROJECT_NAME tag is a single word (or a sequence of words surrounded by -# double-quotes, unless you are using Doxywizard) that should identify the -# project for which the documentation is generated. This name is used in the -# title of most generated pages and in a few other places. -# The default value is: My Project. - -PROJECT_NAME = Godot - -# The PROJECT_NUMBER tag can be used to enter a project or revision number. This -# could be handy for archiving the generated documentation or if some version -# control system is used. - -PROJECT_NUMBER = - -# Using the PROJECT_BRIEF tag one can provide an optional one line description -# for a project that appears at the top of each page and should give viewer a -# quick idea about the purpose of the project. Keep the description short. - -PROJECT_BRIEF = "Game Engine MIT" - -# With the PROJECT_LOGO tag one can specify a logo or an icon that is included -# in the documentation. The maximum height of the logo should not exceed 55 -# pixels and the maximum width should not exceed 200 pixels. Doxygen will copy -# the logo to the output directory. - -PROJECT_LOGO = ./logo_small.png - -# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) path -# into which the generated documentation will be written. If a relative path is -# entered, it will be relative to the location where doxygen was started. If -# left blank the current directory will be used. - -OUTPUT_DIRECTORY = ./doc/doxygen/ - -# If the CREATE_SUBDIRS tag is set to YES then doxygen will create 4096 sub- -# directories (in 2 levels) under the output directory of each output format and -# will distribute the generated files over these directories. Enabling this -# option can be useful when feeding doxygen a huge amount of source files, where -# putting all generated files in the same directory would otherwise causes -# performance problems for the file system. -# The default value is: NO. - -CREATE_SUBDIRS = NO - -# If the ALLOW_UNICODE_NAMES tag is set to YES, doxygen will allow non-ASCII -# characters to appear in the names of generated files. If set to NO, non-ASCII -# characters will be escaped, for example _xE3_x81_x84 will be used for Unicode -# U+3044. -# The default value is: NO. - -ALLOW_UNICODE_NAMES = NO - -# The OUTPUT_LANGUAGE tag is used to specify the language in which all -# documentation generated by doxygen is written. Doxygen will use this -# information to generate all constant output in the proper language. -# Possible values are: Afrikaans, Arabic, Armenian, Brazilian, Catalan, Chinese, -# Chinese-Traditional, Croatian, Czech, Danish, Dutch, English (United States), -# Esperanto, Farsi (Persian), Finnish, French, German, Greek, Hungarian, -# Indonesian, Italian, Japanese, Japanese-en (Japanese with English messages), -# Korean, Korean-en (Korean with English messages), Latvian, Lithuanian, -# Macedonian, Norwegian, Persian (Farsi), Polish, Portuguese, Romanian, Russian, -# Serbian, Serbian-Cyrillic, Slovak, Slovene, Spanish, Swedish, Turkish, -# Ukrainian and Vietnamese. -# The default value is: English. - -OUTPUT_LANGUAGE = English - -# If the BRIEF_MEMBER_DESC tag is set to YES, doxygen will include brief member -# descriptions after the members that are listed in the file and class -# documentation (similar to Javadoc). Set to NO to disable this. -# The default value is: YES. - -BRIEF_MEMBER_DESC = YES - -# If the REPEAT_BRIEF tag is set to YES, doxygen will prepend the brief -# description of a member or function before the detailed description -# -# Note: If both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the -# brief descriptions will be completely suppressed. -# The default value is: YES. - -REPEAT_BRIEF = YES - -# This tag implements a quasi-intelligent brief description abbreviator that is -# used to form the text in various listings. Each string in this list, if found -# as the leading text of the brief description, will be stripped from the text -# and the result, after processing the whole list, is used as the annotated -# text. Otherwise, the brief description is used as-is. If left blank, the -# following values are used ($name is automatically replaced with the name of -# the entity):The $name class, The $name widget, The $name file, is, provides, -# specifies, contains, represents, a, an and the. - -ABBREVIATE_BRIEF = "The $name class" \ - "The $name widget" \ - "The $name file" \ - is \ - provides \ - specifies \ - contains \ - represents \ - a \ - an \ - the - -# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then -# doxygen will generate a detailed section even if there is only a brief -# description. -# The default value is: NO. - -ALWAYS_DETAILED_SEC = NO - -# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all -# inherited members of a class in the documentation of that class as if those -# members were ordinary class members. Constructors, destructors and assignment -# operators of the base classes will not be shown. -# The default value is: NO. - -INLINE_INHERITED_MEMB = NO - -# If the FULL_PATH_NAMES tag is set to YES, doxygen will prepend the full path -# before files name in the file list and in the header files. If set to NO the -# shortest path that makes the file name unique will be used -# The default value is: YES. - -FULL_PATH_NAMES = YES - -# The STRIP_FROM_PATH tag can be used to strip a user-defined part of the path. -# Stripping is only done if one of the specified strings matches the left-hand -# part of the path. The tag can be used to show relative paths in the file list. -# If left blank the directory from which doxygen is run is used as the path to -# strip. -# -# Note that you can specify absolute paths here, but also relative paths, which -# will be relative from the directory where doxygen is started. -# This tag requires that the tag FULL_PATH_NAMES is set to YES. - -STRIP_FROM_PATH = - -# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of the -# path mentioned in the documentation of a class, which tells the reader which -# header file to include in order to use a class. If left blank only the name of -# the header file containing the class definition is used. Otherwise one should -# specify the list of include paths that are normally passed to the compiler -# using the -I flag. - -STRIP_FROM_INC_PATH = - -# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter (but -# less readable) file names. This can be useful is your file systems doesn't -# support long names like on DOS, Mac, or CD-ROM. -# The default value is: NO. - -SHORT_NAMES = NO - -# If the JAVADOC_AUTOBRIEF tag is set to YES then doxygen will interpret the -# first line (until the first dot) of a Javadoc-style comment as the brief -# description. If set to NO, the Javadoc-style will behave just like regular Qt- -# style comments (thus requiring an explicit @brief command for a brief -# description.) -# The default value is: NO. - -JAVADOC_AUTOBRIEF = NO - -# If the QT_AUTOBRIEF tag is set to YES then doxygen will interpret the first -# line (until the first dot) of a Qt-style comment as the brief description. If -# set to NO, the Qt-style will behave just like regular Qt-style comments (thus -# requiring an explicit \brief command for a brief description.) -# The default value is: NO. - -QT_AUTOBRIEF = NO - -# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make doxygen treat a -# multi-line C++ special comment block (i.e. a block of //! or /// comments) as -# a brief description. This used to be the default behavior. The new default is -# to treat a multi-line C++ comment block as a detailed description. Set this -# tag to YES if you prefer the old behavior instead. -# -# Note that setting this tag to YES also means that rational rose comments are -# not recognized any more. -# The default value is: NO. - -MULTILINE_CPP_IS_BRIEF = NO - -# If the INHERIT_DOCS tag is set to YES then an undocumented member inherits the -# documentation from any documented member that it re-implements. -# The default value is: YES. - -INHERIT_DOCS = YES - -# If the SEPARATE_MEMBER_PAGES tag is set to YES then doxygen will produce a new -# page for each member. If set to NO, the documentation of a member will be part -# of the file/class/namespace that contains it. -# The default value is: NO. - -SEPARATE_MEMBER_PAGES = NO - -# The TAB_SIZE tag can be used to set the number of spaces in a tab. Doxygen -# uses this value to replace tabs by spaces in code fragments. -# Minimum value: 1, maximum value: 16, default value: 4. - -TAB_SIZE = 4 - -# This tag can be used to specify a number of aliases that act as commands in -# the documentation. An alias has the form: -# name=value -# For example adding -# "sideeffect=@par Side Effects:\n" -# will allow you to put the command \sideeffect (or @sideeffect) in the -# documentation, which will result in a user-defined paragraph with heading -# "Side Effects:". You can put \n's in the value part of an alias to insert -# newlines. - -ALIASES = - -# This tag can be used to specify a number of word-keyword mappings (TCL only). -# A mapping has the form "name=value". For example adding "class=itcl::class" -# will allow you to use the command class in the itcl::class meaning. - -TCL_SUBST = - -# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources -# only. Doxygen will then generate output that is more tailored for C. For -# instance, some of the names that are used will be different. The list of all -# members will be omitted, etc. -# The default value is: NO. - -OPTIMIZE_OUTPUT_FOR_C = NO - -# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java or -# Python sources only. Doxygen will then generate output that is more tailored -# for that language. For instance, namespaces will be presented as packages, -# qualified scopes will look different, etc. -# The default value is: NO. - -OPTIMIZE_OUTPUT_JAVA = NO - -# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran -# sources. Doxygen will then generate output that is tailored for Fortran. -# The default value is: NO. - -OPTIMIZE_FOR_FORTRAN = NO - -# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL -# sources. Doxygen will then generate output that is tailored for VHDL. -# The default value is: NO. - -OPTIMIZE_OUTPUT_VHDL = NO - -# Doxygen selects the parser to use depending on the extension of the files it -# parses. With this tag you can assign which parser to use for a given -# extension. Doxygen has a built-in mapping, but you can override or extend it -# using this tag. The format is ext=language, where ext is a file extension, and -# language is one of the parsers supported by doxygen: IDL, Java, Javascript, -# C#, C, C++, D, PHP, Objective-C, Python, Fortran (fixed format Fortran: -# FortranFixed, free formatted Fortran: FortranFree, unknown formatted Fortran: -# Fortran. In the later case the parser tries to guess whether the code is fixed -# or free formatted code, this is the default for Fortran type files), VHDL. For -# instance to make doxygen treat .inc files as Fortran files (default is PHP), -# and .f files as C (default is Fortran), use: inc=Fortran f=C. -# -# Note: For files without extension you can use no_extension as a placeholder. -# -# Note that for custom extensions you also need to set FILE_PATTERNS otherwise -# the files are not read by doxygen. - -EXTENSION_MAPPING = - -# If the MARKDOWN_SUPPORT tag is enabled then doxygen pre-processes all comments -# according to the Markdown format, which allows for more readable -# documentation. See http://daringfireball.net/projects/markdown/ for details. -# The output of markdown processing is further processed by doxygen, so you can -# mix doxygen, HTML, and XML commands with Markdown formatting. Disable only in -# case of backward compatibilities issues. -# The default value is: YES. - -MARKDOWN_SUPPORT = YES - -# When enabled doxygen tries to link words that correspond to documented -# classes, or namespaces to their corresponding documentation. Such a link can -# be prevented in individual cases by putting a % sign in front of the word or -# globally by setting AUTOLINK_SUPPORT to NO. -# The default value is: YES. - -AUTOLINK_SUPPORT = YES - -# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want -# to include (a tag file for) the STL sources as input, then you should set this -# tag to YES in order to let doxygen match functions declarations and -# definitions whose arguments contain STL classes (e.g. func(std::string); -# versus func(std::string) {}). This also make the inheritance and collaboration -# diagrams that involve STL classes more complete and accurate. -# The default value is: NO. - -BUILTIN_STL_SUPPORT = NO - -# If you use Microsoft's C++/CLI language, you should set this option to YES to -# enable parsing support. -# The default value is: NO. - -CPP_CLI_SUPPORT = NO - -# Set the SIP_SUPPORT tag to YES if your project consists of sip (see: -# http://www.riverbankcomputing.co.uk/software/sip/intro) sources only. Doxygen -# will parse them like normal C++ but will assume all classes use public instead -# of private inheritance when no explicit protection keyword is present. -# The default value is: NO. - -SIP_SUPPORT = NO - -# For Microsoft's IDL there are propget and propput attributes to indicate -# getter and setter methods for a property. Setting this option to YES will make -# doxygen to replace the get and set methods by a property in the documentation. -# This will only work if the methods are indeed getting or setting a simple -# type. If this is not the case, or you want to show the methods anyway, you -# should set this option to NO. -# The default value is: YES. - -IDL_PROPERTY_SUPPORT = YES - -# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC -# tag is set to YES then doxygen will reuse the documentation of the first -# member in the group (if any) for the other members of the group. By default -# all members of a group must be documented explicitly. -# The default value is: NO. - -DISTRIBUTE_GROUP_DOC = NO - -# Set the SUBGROUPING tag to YES to allow class member groups of the same type -# (for instance a group of public functions) to be put as a subgroup of that -# type (e.g. under the Public Functions section). Set it to NO to prevent -# subgrouping. Alternatively, this can be done per class using the -# \nosubgrouping command. -# The default value is: YES. - -SUBGROUPING = YES - -# When the INLINE_GROUPED_CLASSES tag is set to YES, classes, structs and unions -# are shown inside the group in which they are included (e.g. using \ingroup) -# instead of on a separate page (for HTML and Man pages) or section (for LaTeX -# and RTF). -# -# Note that this feature does not work in combination with -# SEPARATE_MEMBER_PAGES. -# The default value is: NO. - -INLINE_GROUPED_CLASSES = NO - -# When the INLINE_SIMPLE_STRUCTS tag is set to YES, structs, classes, and unions -# with only public data fields or simple typedef fields will be shown inline in -# the documentation of the scope in which they are defined (i.e. file, -# namespace, or group documentation), provided this scope is documented. If set -# to NO, structs, classes, and unions are shown on a separate page (for HTML and -# Man pages) or section (for LaTeX and RTF). -# The default value is: NO. - -INLINE_SIMPLE_STRUCTS = NO - -# When TYPEDEF_HIDES_STRUCT tag is enabled, a typedef of a struct, union, or -# enum is documented as struct, union, or enum with the name of the typedef. So -# typedef struct TypeS {} TypeT, will appear in the documentation as a struct -# with name TypeT. When disabled the typedef will appear as a member of a file, -# namespace, or class. And the struct will be named TypeS. This can typically be -# useful for C code in case the coding convention dictates that all compound -# types are typedef'ed and only the typedef is referenced, never the tag name. -# The default value is: NO. - -TYPEDEF_HIDES_STRUCT = NO - -# The size of the symbol lookup cache can be set using LOOKUP_CACHE_SIZE. This -# cache is used to resolve symbols given their name and scope. Since this can be -# an expensive process and often the same symbol appears multiple times in the -# code, doxygen keeps a cache of pre-resolved symbols. If the cache is too small -# doxygen will become slower. If the cache is too large, memory is wasted. The -# cache size is given by this formula: 2^(16+LOOKUP_CACHE_SIZE). The valid range -# is 0..9, the default is 0, corresponding to a cache size of 2^16=65536 -# symbols. At the end of a run doxygen will report the cache usage and suggest -# the optimal cache size from a speed point of view. -# Minimum value: 0, maximum value: 9, default value: 0. - -LOOKUP_CACHE_SIZE = 0 - -#--------------------------------------------------------------------------- -# Build related configuration options -#--------------------------------------------------------------------------- - -# If the EXTRACT_ALL tag is set to YES, doxygen will assume all entities in -# documentation are documented, even if no documentation was available. Private -# class members and static file members will be hidden unless the -# EXTRACT_PRIVATE respectively EXTRACT_STATIC tags are set to YES. -# Note: This will also disable the warnings about undocumented members that are -# normally produced when WARNINGS is set to YES. -# The default value is: NO. - -EXTRACT_ALL = NO - -# If the EXTRACT_PRIVATE tag is set to YES, all private members of a class will -# be included in the documentation. -# The default value is: NO. - -EXTRACT_PRIVATE = NO - -# If the EXTRACT_PACKAGE tag is set to YES, all members with package or internal -# scope will be included in the documentation. -# The default value is: NO. - -EXTRACT_PACKAGE = NO - -# If the EXTRACT_STATIC tag is set to YES, all static members of a file will be -# included in the documentation. -# The default value is: NO. - -EXTRACT_STATIC = NO - -# If the EXTRACT_LOCAL_CLASSES tag is set to YES, classes (and structs) defined -# locally in source files will be included in the documentation. If set to NO, -# only classes defined in header files are included. Does not have any effect -# for Java sources. -# The default value is: YES. - -EXTRACT_LOCAL_CLASSES = YES - -# This flag is only useful for Objective-C code. If set to YES, local methods, -# which are defined in the implementation section but not in the interface are -# included in the documentation. If set to NO, only methods in the interface are -# included. -# The default value is: NO. - -EXTRACT_LOCAL_METHODS = NO - -# If this flag is set to YES, the members of anonymous namespaces will be -# extracted and appear in the documentation as a namespace called -# 'anonymous_namespace{file}', where file will be replaced with the base name of -# the file that contains the anonymous namespace. By default anonymous namespace -# are hidden. -# The default value is: NO. - -EXTRACT_ANON_NSPACES = NO - -# If the HIDE_UNDOC_MEMBERS tag is set to YES, doxygen will hide all -# undocumented members inside documented classes or files. If set to NO these -# members will be included in the various overviews, but no documentation -# section is generated. This option has no effect if EXTRACT_ALL is enabled. -# The default value is: NO. - -HIDE_UNDOC_MEMBERS = NO - -# If the HIDE_UNDOC_CLASSES tag is set to YES, doxygen will hide all -# undocumented classes that are normally visible in the class hierarchy. If set -# to NO, these classes will be included in the various overviews. This option -# has no effect if EXTRACT_ALL is enabled. -# The default value is: NO. - -HIDE_UNDOC_CLASSES = NO - -# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, doxygen will hide all friend -# (class|struct|union) declarations. If set to NO, these declarations will be -# included in the documentation. -# The default value is: NO. - -HIDE_FRIEND_COMPOUNDS = NO - -# If the HIDE_IN_BODY_DOCS tag is set to YES, doxygen will hide any -# documentation blocks found inside the body of a function. If set to NO, these -# blocks will be appended to the function's detailed documentation block. -# The default value is: NO. - -HIDE_IN_BODY_DOCS = NO - -# The INTERNAL_DOCS tag determines if documentation that is typed after a -# \internal command is included. If the tag is set to NO then the documentation -# will be excluded. Set it to YES to include the internal documentation. -# The default value is: NO. - -INTERNAL_DOCS = NO - -# If the CASE_SENSE_NAMES tag is set to NO then doxygen will only generate file -# names in lower-case letters. If set to YES, upper-case letters are also -# allowed. This is useful if you have classes or files whose names only differ -# in case and if your file system supports case sensitive file names. Windows -# and Mac users are advised to set this option to NO. -# The default value is: system dependent. - -CASE_SENSE_NAMES = NO - -# If the HIDE_SCOPE_NAMES tag is set to NO then doxygen will show members with -# their full class and namespace scopes in the documentation. If set to YES, the -# scope will be hidden. -# The default value is: NO. - -HIDE_SCOPE_NAMES = NO - -# If the HIDE_COMPOUND_REFERENCE tag is set to NO (default) then doxygen will -# append additional text to a page's title, such as Class Reference. If set to -# YES the compound reference will be hidden. -# The default value is: NO. - -HIDE_COMPOUND_REFERENCE= NO - -# If the SHOW_INCLUDE_FILES tag is set to YES then doxygen will put a list of -# the files that are included by a file in the documentation of that file. -# The default value is: YES. - -SHOW_INCLUDE_FILES = YES - -# If the SHOW_GROUPED_MEMB_INC tag is set to YES then Doxygen will add for each -# grouped member an include statement to the documentation, telling the reader -# which file to include in order to use the member. -# The default value is: NO. - -SHOW_GROUPED_MEMB_INC = NO - -# If the FORCE_LOCAL_INCLUDES tag is set to YES then doxygen will list include -# files with double quotes in the documentation rather than with sharp brackets. -# The default value is: NO. - -FORCE_LOCAL_INCLUDES = NO - -# If the INLINE_INFO tag is set to YES then a tag [inline] is inserted in the -# documentation for inline members. -# The default value is: YES. - -INLINE_INFO = YES - -# If the SORT_MEMBER_DOCS tag is set to YES then doxygen will sort the -# (detailed) documentation of file and class members alphabetically by member -# name. If set to NO, the members will appear in declaration order. -# The default value is: YES. - -SORT_MEMBER_DOCS = YES - -# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the brief -# descriptions of file, namespace and class members alphabetically by member -# name. If set to NO, the members will appear in declaration order. Note that -# this will also influence the order of the classes in the class list. -# The default value is: NO. - -SORT_BRIEF_DOCS = NO - -# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen will sort the -# (brief and detailed) documentation of class members so that constructors and -# destructors are listed first. If set to NO the constructors will appear in the -# respective orders defined by SORT_BRIEF_DOCS and SORT_MEMBER_DOCS. -# Note: If SORT_BRIEF_DOCS is set to NO this option is ignored for sorting brief -# member documentation. -# Note: If SORT_MEMBER_DOCS is set to NO this option is ignored for sorting -# detailed member documentation. -# The default value is: NO. - -SORT_MEMBERS_CTORS_1ST = NO - -# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the hierarchy -# of group names into alphabetical order. If set to NO the group names will -# appear in their defined order. -# The default value is: NO. - -SORT_GROUP_NAMES = NO - -# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be sorted by -# fully-qualified names, including namespaces. If set to NO, the class list will -# be sorted only by class name, not including the namespace part. -# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. -# Note: This option applies only to the class list, not to the alphabetical -# list. -# The default value is: NO. - -SORT_BY_SCOPE_NAME = NO - -# If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to do proper -# type resolution of all parameters of a function it will reject a match between -# the prototype and the implementation of a member function even if there is -# only one candidate or it is obvious which candidate to choose by doing a -# simple string match. By disabling STRICT_PROTO_MATCHING doxygen will still -# accept a match between prototype and implementation in such cases. -# The default value is: NO. - -STRICT_PROTO_MATCHING = NO - -# The GENERATE_TODOLIST tag can be used to enable (YES) or disable (NO) the todo -# list. This list is created by putting \todo commands in the documentation. -# The default value is: YES. - -GENERATE_TODOLIST = YES - -# The GENERATE_TESTLIST tag can be used to enable (YES) or disable (NO) the test -# list. This list is created by putting \test commands in the documentation. -# The default value is: YES. - -GENERATE_TESTLIST = YES - -# The GENERATE_BUGLIST tag can be used to enable (YES) or disable (NO) the bug -# list. This list is created by putting \bug commands in the documentation. -# The default value is: YES. - -GENERATE_BUGLIST = YES - -# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or disable (NO) -# the deprecated list. This list is created by putting \deprecated commands in -# the documentation. -# The default value is: YES. - -GENERATE_DEPRECATEDLIST= YES - -# The ENABLED_SECTIONS tag can be used to enable conditional documentation -# sections, marked by \if ... \endif and \cond -# ... \endcond blocks. - -ENABLED_SECTIONS = - -# The MAX_INITIALIZER_LINES tag determines the maximum number of lines that the -# initial value of a variable or macro / define can have for it to appear in the -# documentation. If the initializer consists of more lines than specified here -# it will be hidden. Use a value of 0 to hide initializers completely. The -# appearance of the value of individual variables and macros / defines can be -# controlled using \showinitializer or \hideinitializer command in the -# documentation regardless of this setting. -# Minimum value: 0, maximum value: 10000, default value: 30. - -MAX_INITIALIZER_LINES = 30 - -# Set the SHOW_USED_FILES tag to NO to disable the list of files generated at -# the bottom of the documentation of classes and structs. If set to YES, the -# list will mention the files that were used to generate the documentation. -# The default value is: YES. - -SHOW_USED_FILES = YES - -# Set the SHOW_FILES tag to NO to disable the generation of the Files page. This -# will remove the Files entry from the Quick Index and from the Folder Tree View -# (if specified). -# The default value is: YES. - -SHOW_FILES = YES - -# Set the SHOW_NAMESPACES tag to NO to disable the generation of the Namespaces -# page. This will remove the Namespaces entry from the Quick Index and from the -# Folder Tree View (if specified). -# The default value is: YES. - -SHOW_NAMESPACES = YES - -# The FILE_VERSION_FILTER tag can be used to specify a program or script that -# doxygen should invoke to get the current version for each file (typically from -# the version control system). Doxygen will invoke the program by executing (via -# popen()) the command command input-file, where command is the value of the -# FILE_VERSION_FILTER tag, and input-file is the name of an input file provided -# by doxygen. Whatever the program writes to standard output is used as the file -# version. For an example see the documentation. - -FILE_VERSION_FILTER = - -# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed -# by doxygen. The layout file controls the global structure of the generated -# output files in an output format independent way. To create the layout file -# that represents doxygen's defaults, run doxygen with the -l option. You can -# optionally specify a file name after the option, if omitted DoxygenLayout.xml -# will be used as the name of the layout file. -# -# Note that if you run doxygen from a directory containing a file called -# DoxygenLayout.xml, doxygen will parse it automatically even if the LAYOUT_FILE -# tag is left empty. - -LAYOUT_FILE = - -# The CITE_BIB_FILES tag can be used to specify one or more bib files containing -# the reference definitions. This must be a list of .bib files. The .bib -# extension is automatically appended if omitted. This requires the bibtex tool -# to be installed. See also http://en.wikipedia.org/wiki/BibTeX for more info. -# For LaTeX the style of the bibliography can be controlled using -# LATEX_BIB_STYLE. To use this feature you need bibtex and perl available in the -# search path. See also \cite for info how to create references. - -CITE_BIB_FILES = - -#--------------------------------------------------------------------------- -# Configuration options related to warning and progress messages -#--------------------------------------------------------------------------- - -# The QUIET tag can be used to turn on/off the messages that are generated to -# standard output by doxygen. If QUIET is set to YES this implies that the -# messages are off. -# The default value is: NO. - -QUIET = NO - -# The WARNINGS tag can be used to turn on/off the warning messages that are -# generated to standard error (stderr) by doxygen. If WARNINGS is set to YES -# this implies that the warnings are on. -# -# Tip: Turn warnings on while writing the documentation. -# The default value is: YES. - -WARNINGS = YES - -# If the WARN_IF_UNDOCUMENTED tag is set to YES then doxygen will generate -# warnings for undocumented members. If EXTRACT_ALL is set to YES then this flag -# will automatically be disabled. -# The default value is: YES. - -WARN_IF_UNDOCUMENTED = YES - -# If the WARN_IF_DOC_ERROR tag is set to YES, doxygen will generate warnings for -# potential errors in the documentation, such as not documenting some parameters -# in a documented function, or documenting parameters that don't exist or using -# markup commands wrongly. -# The default value is: YES. - -WARN_IF_DOC_ERROR = YES - -# This WARN_NO_PARAMDOC option can be enabled to get warnings for functions that -# are documented, but have no documentation for their parameters or return -# value. If set to NO, doxygen will only warn about wrong or incomplete -# parameter documentation, but not about the absence of documentation. -# The default value is: NO. - -WARN_NO_PARAMDOC = NO - -# The WARN_FORMAT tag determines the format of the warning messages that doxygen -# can produce. The string should contain the $file, $line, and $text tags, which -# will be replaced by the file and line number from which the warning originated -# and the warning text. Optionally the format may contain $version, which will -# be replaced by the version of the file (if it could be obtained via -# FILE_VERSION_FILTER) -# The default value is: $file:$line: $text. - -WARN_FORMAT = "$file:$line: $text" - -# The WARN_LOGFILE tag can be used to specify a file to which warning and error -# messages should be written. If left blank the output is written to standard -# error (stderr). - -WARN_LOGFILE = - -#--------------------------------------------------------------------------- -# Configuration options related to the input files -#--------------------------------------------------------------------------- - -# The INPUT tag is used to specify the files and/or directories that contain -# documented source files. You may enter file names like myfile.cpp or -# directories like /usr/src/myproject. Separate the files or directories with -# spaces. -# Note: If this tag is empty the current directory is searched. - -INPUT = ./core/ ./main/ ./scene/ - -# This tag can be used to specify the character encoding of the source files -# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses -# libiconv (or the iconv built into libc) for the transcoding. See the libiconv -# documentation (see: http://www.gnu.org/software/libiconv) for the list of -# possible encodings. -# The default value is: UTF-8. - -INPUT_ENCODING = UTF-8 - -# If the value of the INPUT tag contains directories, you can use the -# FILE_PATTERNS tag to specify one or more wildcard patterns (like *.cpp and -# *.h) to filter out the source-files in the directories. If left blank the -# following patterns are tested:*.c, *.cc, *.cxx, *.cpp, *.c++, *.java, *.ii, -# *.ixx, *.ipp, *.i++, *.inl, *.idl, *.ddl, *.odl, *.h, *.hh, *.hxx, *.hpp, -# *.h++, *.cs, *.d, *.php, *.php4, *.php5, *.phtml, *.inc, *.m, *.markdown, -# *.md, *.mm, *.dox, *.py, *.f90, *.f, *.for, *.tcl, *.vhd, *.vhdl, *.ucf, -# *.qsf, *.as and *.js. - -FILE_PATTERNS = *.c \ - *.cc \ - *.cxx \ - *.cpp \ - *.c++ \ - *.java \ - *.ii \ - *.ixx \ - *.ipp \ - *.i++ \ - *.inl \ - *.idl \ - *.ddl \ - *.odl \ - *.h \ - *.hh \ - *.hxx \ - *.hpp \ - *.h++ \ - *.cs \ - *.d \ - *.php \ - *.php4 \ - *.php5 \ - *.phtml \ - *.inc \ - *.m \ - *.markdown \ - *.md \ - *.mm \ - *.dox \ - *.py \ - *.f90 \ - *.f \ - *.for \ - *.tcl \ - *.vhd \ - *.vhdl \ - *.ucf \ - *.qsf \ - *.as \ - *.js - -# The RECURSIVE tag can be used to specify whether or not subdirectories should -# be searched for input files as well. -# The default value is: NO. - -RECURSIVE = YES - -# The EXCLUDE tag can be used to specify files and/or directories that should be -# excluded from the INPUT source files. This way you can easily exclude a -# subdirectory from a directory tree whose root is specified with the INPUT tag. -# -# Note that relative paths are relative to the directory from which doxygen is -# run. - -EXCLUDE = - -# The EXCLUDE_SYMLINKS tag can be used to select whether or not files or -# directories that are symbolic links (a Unix file system feature) are excluded -# from the input. -# The default value is: NO. - -EXCLUDE_SYMLINKS = NO - -# If the value of the INPUT tag contains directories, you can use the -# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude -# certain files from those directories. -# -# Note that the wildcards are matched against the file with absolute path, so to -# exclude all test directories for example use the pattern */test/* - -EXCLUDE_PATTERNS = - -# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names -# (namespaces, classes, functions, etc.) that should be excluded from the -# output. The symbol name can be a fully qualified name, a word, or if the -# wildcard * is used, a substring. Examples: ANamespace, AClass, -# AClass::ANamespace, ANamespace::*Test -# -# Note that the wildcards are matched against the file with absolute path, so to -# exclude all test directories use the pattern */test/* - -EXCLUDE_SYMBOLS = - -# The EXAMPLE_PATH tag can be used to specify one or more files or directories -# that contain example code fragments that are included (see the \include -# command). - -EXAMPLE_PATH = - -# If the value of the EXAMPLE_PATH tag contains directories, you can use the -# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp and -# *.h) to filter out the source-files in the directories. If left blank all -# files are included. - -EXAMPLE_PATTERNS = * - -# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be -# searched for input files to be used with the \include or \dontinclude commands -# irrespective of the value of the RECURSIVE tag. -# The default value is: NO. - -EXAMPLE_RECURSIVE = NO - -# The IMAGE_PATH tag can be used to specify one or more files or directories -# that contain images that are to be included in the documentation (see the -# \image command). - -IMAGE_PATH = - -# The INPUT_FILTER tag can be used to specify a program that doxygen should -# invoke to filter for each input file. Doxygen will invoke the filter program -# by executing (via popen()) the command: -# -# -# -# where is the value of the INPUT_FILTER tag, and is the -# name of an input file. Doxygen will then use the output that the filter -# program writes to standard output. If FILTER_PATTERNS is specified, this tag -# will be ignored. -# -# Note that the filter must not add or remove lines; it is applied before the -# code is scanned, but not when the output code is generated. If lines are added -# or removed, the anchors will not be placed correctly. - -INPUT_FILTER = - -# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern -# basis. Doxygen will compare the file name with each pattern and apply the -# filter if there is a match. The filters are a list of the form: pattern=filter -# (like *.cpp=my_cpp_filter). See INPUT_FILTER for further information on how -# filters are used. If the FILTER_PATTERNS tag is empty or if none of the -# patterns match the file name, INPUT_FILTER is applied. - -FILTER_PATTERNS = - -# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using -# INPUT_FILTER) will also be used to filter the input files that are used for -# producing the source files to browse (i.e. when SOURCE_BROWSER is set to YES). -# The default value is: NO. - -FILTER_SOURCE_FILES = NO - -# The FILTER_SOURCE_PATTERNS tag can be used to specify source filters per file -# pattern. A pattern will override the setting for FILTER_PATTERN (if any) and -# it is also possible to disable source filtering for a specific pattern using -# *.ext= (so without naming a filter). -# This tag requires that the tag FILTER_SOURCE_FILES is set to YES. - -FILTER_SOURCE_PATTERNS = - -# If the USE_MDFILE_AS_MAINPAGE tag refers to the name of a markdown file that -# is part of the input, its contents will be placed on the main page -# (index.html). This can be useful if you have a project on for instance GitHub -# and want to reuse the introduction page also for the doxygen output. - -USE_MDFILE_AS_MAINPAGE = README.md - -#--------------------------------------------------------------------------- -# Configuration options related to source browsing -#--------------------------------------------------------------------------- - -# If the SOURCE_BROWSER tag is set to YES then a list of source files will be -# generated. Documented entities will be cross-referenced with these sources. -# -# Note: To get rid of all source code in the generated output, make sure that -# also VERBATIM_HEADERS is set to NO. -# The default value is: NO. - -SOURCE_BROWSER = NO - -# Setting the INLINE_SOURCES tag to YES will include the body of functions, -# classes and enums directly into the documentation. -# The default value is: NO. - -INLINE_SOURCES = NO - -# Setting the STRIP_CODE_COMMENTS tag to YES will instruct doxygen to hide any -# special comment blocks from generated source code fragments. Normal C, C++ and -# Fortran comments will always remain visible. -# The default value is: YES. - -STRIP_CODE_COMMENTS = YES - -# If the REFERENCED_BY_RELATION tag is set to YES then for each documented -# function all documented functions referencing it will be listed. -# The default value is: NO. - -REFERENCED_BY_RELATION = NO - -# If the REFERENCES_RELATION tag is set to YES then for each documented function -# all documented entities called/used by that function will be listed. -# The default value is: NO. - -REFERENCES_RELATION = NO - -# If the REFERENCES_LINK_SOURCE tag is set to YES and SOURCE_BROWSER tag is set -# to YES then the hyperlinks from functions in REFERENCES_RELATION and -# REFERENCED_BY_RELATION lists will link to the source code. Otherwise they will -# link to the documentation. -# The default value is: YES. - -REFERENCES_LINK_SOURCE = YES - -# If SOURCE_TOOLTIPS is enabled (the default) then hovering a hyperlink in the -# source code will show a tooltip with additional information such as prototype, -# brief description and links to the definition and documentation. Since this -# will make the HTML file larger and loading of large files a bit slower, you -# can opt to disable this feature. -# The default value is: YES. -# This tag requires that the tag SOURCE_BROWSER is set to YES. - -SOURCE_TOOLTIPS = YES - -# If the USE_HTAGS tag is set to YES then the references to source code will -# point to the HTML generated by the htags(1) tool instead of doxygen built-in -# source browser. The htags tool is part of GNU's global source tagging system -# (see http://www.gnu.org/software/global/global.html). You will need version -# 4.8.6 or higher. -# -# To use it do the following: -# - Install the latest version of global -# - Enable SOURCE_BROWSER and USE_HTAGS in the config file -# - Make sure the INPUT points to the root of the source tree -# - Run doxygen as normal -# -# Doxygen will invoke htags (and that will in turn invoke gtags), so these -# tools must be available from the command line (i.e. in the search path). -# -# The result: instead of the source browser generated by doxygen, the links to -# source code will now point to the output of htags. -# The default value is: NO. -# This tag requires that the tag SOURCE_BROWSER is set to YES. - -USE_HTAGS = NO - -# If the VERBATIM_HEADERS tag is set the YES then doxygen will generate a -# verbatim copy of the header file for each class for which an include is -# specified. Set to NO to disable this. -# See also: Section \class. -# The default value is: YES. - -VERBATIM_HEADERS = YES - -# If the CLANG_ASSISTED_PARSING tag is set to YES then doxygen will use the -# clang parser (see: http://clang.llvm.org/) for more accurate parsing at the -# cost of reduced performance. This can be particularly helpful with template -# rich C++ code for which doxygen's built-in parser lacks the necessary type -# information. -# Note: The availability of this option depends on whether or not doxygen was -# compiled with the --with-libclang option. -# The default value is: NO. - -CLANG_ASSISTED_PARSING = NO - -# If clang assisted parsing is enabled you can provide the compiler with command -# line options that you would normally use when invoking the compiler. Note that -# the include paths will already be set by doxygen for the files and directories -# specified with INPUT and INCLUDE_PATH. -# This tag requires that the tag CLANG_ASSISTED_PARSING is set to YES. - -CLANG_OPTIONS = - -#--------------------------------------------------------------------------- -# Configuration options related to the alphabetical class index -#--------------------------------------------------------------------------- - -# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index of all -# compounds will be generated. Enable this if the project contains a lot of -# classes, structs, unions or interfaces. -# The default value is: YES. - -ALPHABETICAL_INDEX = YES - -# The COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns in -# which the alphabetical index list will be split. -# Minimum value: 1, maximum value: 20, default value: 5. -# This tag requires that the tag ALPHABETICAL_INDEX is set to YES. - -COLS_IN_ALPHA_INDEX = 5 - -# In case all classes in a project start with a common prefix, all classes will -# be put under the same header in the alphabetical index. The IGNORE_PREFIX tag -# can be used to specify a prefix (or a list of prefixes) that should be ignored -# while generating the index headers. -# This tag requires that the tag ALPHABETICAL_INDEX is set to YES. - -IGNORE_PREFIX = - -#--------------------------------------------------------------------------- -# Configuration options related to the HTML output -#--------------------------------------------------------------------------- - -# If the GENERATE_HTML tag is set to YES, doxygen will generate HTML output -# The default value is: YES. - -GENERATE_HTML = YES - -# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. If a -# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of -# it. -# The default directory is: html. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_OUTPUT = html - -# The HTML_FILE_EXTENSION tag can be used to specify the file extension for each -# generated HTML page (for example: .htm, .php, .asp). -# The default value is: .html. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_FILE_EXTENSION = .html - -# The HTML_HEADER tag can be used to specify a user-defined HTML header file for -# each generated HTML page. If the tag is left blank doxygen will generate a -# standard header. -# -# To get valid HTML the header file that includes any scripts and style sheets -# that doxygen needs, which is dependent on the configuration options used (e.g. -# the setting GENERATE_TREEVIEW). It is highly recommended to start with a -# default header using -# doxygen -w html new_header.html new_footer.html new_stylesheet.css -# YourConfigFile -# and then modify the file new_header.html. See also section "Doxygen usage" -# for information on how to generate the default header that doxygen normally -# uses. -# Note: The header is subject to change so you typically have to regenerate the -# default header when upgrading to a newer version of doxygen. For a description -# of the possible markers and block names see the documentation. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_HEADER = - -# The HTML_FOOTER tag can be used to specify a user-defined HTML footer for each -# generated HTML page. If the tag is left blank doxygen will generate a standard -# footer. See HTML_HEADER for more information on how to generate a default -# footer and what special commands can be used inside the footer. See also -# section "Doxygen usage" for information on how to generate the default footer -# that doxygen normally uses. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_FOOTER = - -# The HTML_STYLESHEET tag can be used to specify a user-defined cascading style -# sheet that is used by each HTML page. It can be used to fine-tune the look of -# the HTML output. If left blank doxygen will generate a default style sheet. -# See also section "Doxygen usage" for information on how to generate the style -# sheet that doxygen normally uses. -# Note: It is recommended to use HTML_EXTRA_STYLESHEET instead of this tag, as -# it is more robust and this tag (HTML_STYLESHEET) will in the future become -# obsolete. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_STYLESHEET = - -# The HTML_EXTRA_STYLESHEET tag can be used to specify additional user-defined -# cascading style sheets that are included after the standard style sheets -# created by doxygen. Using this option one can overrule certain style aspects. -# This is preferred over using HTML_STYLESHEET since it does not replace the -# standard style sheet and is therefore more robust against future updates. -# Doxygen will copy the style sheet files to the output directory. -# Note: The order of the extra style sheet files is of importance (e.g. the last -# style sheet in the list overrules the setting of the previous ones in the -# list). For an example see the documentation. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_EXTRA_STYLESHEET = - -# The HTML_EXTRA_FILES tag can be used to specify one or more extra images or -# other source files which should be copied to the HTML output directory. Note -# that these files will be copied to the base HTML output directory. Use the -# $relpath^ marker in the HTML_HEADER and/or HTML_FOOTER files to load these -# files. In the HTML_STYLESHEET file, use the file name only. Also note that the -# files will be copied as-is; there are no commands or markers available. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_EXTRA_FILES = - -# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. Doxygen -# will adjust the colors in the style sheet and background images according to -# this color. Hue is specified as an angle on a colorwheel, see -# http://en.wikipedia.org/wiki/Hue for more information. For instance the value -# 0 represents red, 60 is yellow, 120 is green, 180 is cyan, 240 is blue, 300 -# purple, and 360 is red again. -# Minimum value: 0, maximum value: 359, default value: 220. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_COLORSTYLE_HUE = 220 - -# The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of the colors -# in the HTML output. For a value of 0 the output will use grayscales only. A -# value of 255 will produce the most vivid colors. -# Minimum value: 0, maximum value: 255, default value: 100. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_COLORSTYLE_SAT = 100 - -# The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to the -# luminance component of the colors in the HTML output. Values below 100 -# gradually make the output lighter, whereas values above 100 make the output -# darker. The value divided by 100 is the actual gamma applied, so 80 represents -# a gamma of 0.8, The value 220 represents a gamma of 2.2, and 100 does not -# change the gamma. -# Minimum value: 40, maximum value: 240, default value: 80. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_COLORSTYLE_GAMMA = 80 - -# If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML -# page will contain the date and time when the page was generated. Setting this -# to NO can help when comparing the output of multiple runs. -# The default value is: YES. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_TIMESTAMP = YES - -# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML -# documentation will contain sections that can be hidden and shown after the -# page has loaded. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_DYNAMIC_SECTIONS = NO - -# With HTML_INDEX_NUM_ENTRIES one can control the preferred number of entries -# shown in the various tree structured indices initially; the user can expand -# and collapse entries dynamically later on. Doxygen will expand the tree to -# such a level that at most the specified number of entries are visible (unless -# a fully collapsed tree already exceeds this amount). So setting the number of -# entries 1 will produce a full collapsed tree by default. 0 is a special value -# representing an infinite number of entries and will result in a full expanded -# tree by default. -# Minimum value: 0, maximum value: 9999, default value: 100. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_INDEX_NUM_ENTRIES = 100 - -# If the GENERATE_DOCSET tag is set to YES, additional index files will be -# generated that can be used as input for Apple's Xcode 3 integrated development -# environment (see: http://developer.apple.com/tools/xcode/), introduced with -# OSX 10.5 (Leopard). To create a documentation set, doxygen will generate a -# Makefile in the HTML output directory. Running make will produce the docset in -# that directory and running make install will install the docset in -# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find it at -# startup. See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html -# for more information. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -GENERATE_DOCSET = NO - -# This tag determines the name of the docset feed. A documentation feed provides -# an umbrella under which multiple documentation sets from a single provider -# (such as a company or product suite) can be grouped. -# The default value is: Doxygen generated docs. -# This tag requires that the tag GENERATE_DOCSET is set to YES. - -DOCSET_FEEDNAME = "Doxygen generated docs" - -# This tag specifies a string that should uniquely identify the documentation -# set bundle. This should be a reverse domain-name style string, e.g. -# com.mycompany.MyDocSet. Doxygen will append .docset to the name. -# The default value is: org.doxygen.Project. -# This tag requires that the tag GENERATE_DOCSET is set to YES. - -DOCSET_BUNDLE_ID = org.doxygen.Project - -# The DOCSET_PUBLISHER_ID tag specifies a string that should uniquely identify -# the documentation publisher. This should be a reverse domain-name style -# string, e.g. com.mycompany.MyDocSet.documentation. -# The default value is: org.doxygen.Publisher. -# This tag requires that the tag GENERATE_DOCSET is set to YES. - -DOCSET_PUBLISHER_ID = org.doxygen.Publisher - -# The DOCSET_PUBLISHER_NAME tag identifies the documentation publisher. -# The default value is: Publisher. -# This tag requires that the tag GENERATE_DOCSET is set to YES. - -DOCSET_PUBLISHER_NAME = Publisher - -# If the GENERATE_HTMLHELP tag is set to YES then doxygen generates three -# additional HTML index files: index.hhp, index.hhc, and index.hhk. The -# index.hhp is a project file that can be read by Microsoft's HTML Help Workshop -# (see: http://www.microsoft.com/en-us/download/details.aspx?id=21138) on -# Windows. -# -# The HTML Help Workshop contains a compiler that can convert all HTML output -# generated by doxygen into a single compiled HTML file (.chm). Compiled HTML -# files are now used as the Windows 98 help format, and will replace the old -# Windows help format (.hlp) on all Windows platforms in the future. Compressed -# HTML files also contain an index, a table of contents, and you can search for -# words in the documentation. The HTML workshop also contains a viewer for -# compressed HTML files. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -GENERATE_HTMLHELP = NO - -# The CHM_FILE tag can be used to specify the file name of the resulting .chm -# file. You can add a path in front of the file if the result should not be -# written to the html output directory. -# This tag requires that the tag GENERATE_HTMLHELP is set to YES. - -CHM_FILE = - -# The HHC_LOCATION tag can be used to specify the location (absolute path -# including file name) of the HTML help compiler (hhc.exe). If non-empty, -# doxygen will try to run the HTML help compiler on the generated index.hhp. -# The file has to be specified with full path. -# This tag requires that the tag GENERATE_HTMLHELP is set to YES. - -HHC_LOCATION = - -# The GENERATE_CHI flag controls if a separate .chi index file is generated -# (YES) or that it should be included in the master .chm file (NO). -# The default value is: NO. -# This tag requires that the tag GENERATE_HTMLHELP is set to YES. - -GENERATE_CHI = NO - -# The CHM_INDEX_ENCODING is used to encode HtmlHelp index (hhk), content (hhc) -# and project file content. -# This tag requires that the tag GENERATE_HTMLHELP is set to YES. - -CHM_INDEX_ENCODING = - -# The BINARY_TOC flag controls whether a binary table of contents is generated -# (YES) or a normal table of contents (NO) in the .chm file. Furthermore it -# enables the Previous and Next buttons. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTMLHELP is set to YES. - -BINARY_TOC = NO - -# The TOC_EXPAND flag can be set to YES to add extra items for group members to -# the table of contents of the HTML help documentation and to the tree view. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTMLHELP is set to YES. - -TOC_EXPAND = NO - -# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and -# QHP_VIRTUAL_FOLDER are set, an additional index file will be generated that -# can be used as input for Qt's qhelpgenerator to generate a Qt Compressed Help -# (.qch) of the generated HTML documentation. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -GENERATE_QHP = NO - -# If the QHG_LOCATION tag is specified, the QCH_FILE tag can be used to specify -# the file name of the resulting .qch file. The path specified is relative to -# the HTML output folder. -# This tag requires that the tag GENERATE_QHP is set to YES. - -QCH_FILE = - -# The QHP_NAMESPACE tag specifies the namespace to use when generating Qt Help -# Project output. For more information please see Qt Help Project / Namespace -# (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#namespace). -# The default value is: org.doxygen.Project. -# This tag requires that the tag GENERATE_QHP is set to YES. - -QHP_NAMESPACE = org.doxygen.Project - -# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating Qt -# Help Project output. For more information please see Qt Help Project / Virtual -# Folders (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#virtual- -# folders). -# The default value is: doc. -# This tag requires that the tag GENERATE_QHP is set to YES. - -QHP_VIRTUAL_FOLDER = doc - -# If the QHP_CUST_FILTER_NAME tag is set, it specifies the name of a custom -# filter to add. For more information please see Qt Help Project / Custom -# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom- -# filters). -# This tag requires that the tag GENERATE_QHP is set to YES. - -QHP_CUST_FILTER_NAME = - -# The QHP_CUST_FILTER_ATTRS tag specifies the list of the attributes of the -# custom filter to add. For more information please see Qt Help Project / Custom -# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom- -# filters). -# This tag requires that the tag GENERATE_QHP is set to YES. - -QHP_CUST_FILTER_ATTRS = - -# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this -# project's filter section matches. Qt Help Project / Filter Attributes (see: -# http://qt-project.org/doc/qt-4.8/qthelpproject.html#filter-attributes). -# This tag requires that the tag GENERATE_QHP is set to YES. - -QHP_SECT_FILTER_ATTRS = - -# The QHG_LOCATION tag can be used to specify the location of Qt's -# qhelpgenerator. If non-empty doxygen will try to run qhelpgenerator on the -# generated .qhp file. -# This tag requires that the tag GENERATE_QHP is set to YES. - -QHG_LOCATION = - -# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files will be -# generated, together with the HTML files, they form an Eclipse help plugin. To -# install this plugin and make it available under the help contents menu in -# Eclipse, the contents of the directory containing the HTML and XML files needs -# to be copied into the plugins directory of eclipse. The name of the directory -# within the plugins directory should be the same as the ECLIPSE_DOC_ID value. -# After copying Eclipse needs to be restarted before the help appears. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -GENERATE_ECLIPSEHELP = NO - -# A unique identifier for the Eclipse help plugin. When installing the plugin -# the directory name containing the HTML and XML files should also have this -# name. Each documentation set should have its own identifier. -# The default value is: org.doxygen.Project. -# This tag requires that the tag GENERATE_ECLIPSEHELP is set to YES. - -ECLIPSE_DOC_ID = org.doxygen.Project - -# If you want full control over the layout of the generated HTML pages it might -# be necessary to disable the index and replace it with your own. The -# DISABLE_INDEX tag can be used to turn on/off the condensed index (tabs) at top -# of each HTML page. A value of NO enables the index and the value YES disables -# it. Since the tabs in the index contain the same information as the navigation -# tree, you can set this option to YES if you also set GENERATE_TREEVIEW to YES. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -DISABLE_INDEX = NO - -# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index -# structure should be generated to display hierarchical information. If the tag -# value is set to YES, a side panel will be generated containing a tree-like -# index structure (just like the one that is generated for HTML Help). For this -# to work a browser that supports JavaScript, DHTML, CSS and frames is required -# (i.e. any modern browser). Windows users are probably better off using the -# HTML help feature. Via custom style sheets (see HTML_EXTRA_STYLESHEET) one can -# further fine-tune the look of the index. As an example, the default style -# sheet generated by doxygen has an example that shows how to put an image at -# the root of the tree instead of the PROJECT_NAME. Since the tree basically has -# the same information as the tab index, you could consider setting -# DISABLE_INDEX to YES when enabling this option. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -GENERATE_TREEVIEW = NO - -# The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values that -# doxygen will group on one line in the generated HTML documentation. -# -# Note that a value of 0 will completely suppress the enum values from appearing -# in the overview section. -# Minimum value: 0, maximum value: 20, default value: 4. -# This tag requires that the tag GENERATE_HTML is set to YES. - -ENUM_VALUES_PER_LINE = 4 - -# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be used -# to set the initial width (in pixels) of the frame in which the tree is shown. -# Minimum value: 0, maximum value: 1500, default value: 250. -# This tag requires that the tag GENERATE_HTML is set to YES. - -TREEVIEW_WIDTH = 250 - -# If the EXT_LINKS_IN_WINDOW option is set to YES, doxygen will open links to -# external symbols imported via tag files in a separate window. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -EXT_LINKS_IN_WINDOW = NO - -# Use this tag to change the font size of LaTeX formulas included as images in -# the HTML documentation. When you change the font size after a successful -# doxygen run you need to manually remove any form_*.png images from the HTML -# output directory to force them to be regenerated. -# Minimum value: 8, maximum value: 50, default value: 10. -# This tag requires that the tag GENERATE_HTML is set to YES. - -FORMULA_FONTSIZE = 10 - -# Use the FORMULA_TRANPARENT tag to determine whether or not the images -# generated for formulas are transparent PNGs. Transparent PNGs are not -# supported properly for IE 6.0, but are supported on all modern browsers. -# -# Note that when changing this option you need to delete any form_*.png files in -# the HTML output directory before the changes have effect. -# The default value is: YES. -# This tag requires that the tag GENERATE_HTML is set to YES. - -FORMULA_TRANSPARENT = YES - -# Enable the USE_MATHJAX option to render LaTeX formulas using MathJax (see -# http://www.mathjax.org) which uses client side Javascript for the rendering -# instead of using pre-rendered bitmaps. Use this if you do not have LaTeX -# installed or if you want to formulas look prettier in the HTML output. When -# enabled you may also need to install MathJax separately and configure the path -# to it using the MATHJAX_RELPATH option. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -USE_MATHJAX = NO - -# When MathJax is enabled you can set the default output format to be used for -# the MathJax output. See the MathJax site (see: -# http://docs.mathjax.org/en/latest/output.html) for more details. -# Possible values are: HTML-CSS (which is slower, but has the best -# compatibility), NativeMML (i.e. MathML) and SVG. -# The default value is: HTML-CSS. -# This tag requires that the tag USE_MATHJAX is set to YES. - -MATHJAX_FORMAT = HTML-CSS - -# When MathJax is enabled you need to specify the location relative to the HTML -# output directory using the MATHJAX_RELPATH option. The destination directory -# should contain the MathJax.js script. For instance, if the mathjax directory -# is located at the same level as the HTML output directory, then -# MATHJAX_RELPATH should be ../mathjax. The default value points to the MathJax -# Content Delivery Network so you can quickly see the result without installing -# MathJax. However, it is strongly recommended to install a local copy of -# MathJax from http://www.mathjax.org before deployment. -# The default value is: http://cdn.mathjax.org/mathjax/latest. -# This tag requires that the tag USE_MATHJAX is set to YES. - -MATHJAX_RELPATH = http://cdn.mathjax.org/mathjax/latest - -# The MATHJAX_EXTENSIONS tag can be used to specify one or more MathJax -# extension names that should be enabled during MathJax rendering. For example -# MATHJAX_EXTENSIONS = TeX/AMSmath TeX/AMSsymbols -# This tag requires that the tag USE_MATHJAX is set to YES. - -MATHJAX_EXTENSIONS = - -# The MATHJAX_CODEFILE tag can be used to specify a file with javascript pieces -# of code that will be used on startup of the MathJax code. See the MathJax site -# (see: http://docs.mathjax.org/en/latest/output.html) for more details. For an -# example see the documentation. -# This tag requires that the tag USE_MATHJAX is set to YES. - -MATHJAX_CODEFILE = - -# When the SEARCHENGINE tag is enabled doxygen will generate a search box for -# the HTML output. The underlying search engine uses javascript and DHTML and -# should work on any modern browser. Note that when using HTML help -# (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets (GENERATE_DOCSET) -# there is already a search function so this one should typically be disabled. -# For large projects the javascript based search engine can be slow, then -# enabling SERVER_BASED_SEARCH may provide a better solution. It is possible to -# search using the keyboard; to jump to the search box use + S -# (what the is depends on the OS and browser, but it is typically -# , /

    " + elif (cmd=="/center"): + tag_text="
    " + elif (cmd=="br"): + tag_text="
    " + elif (cmd=="i" or cmd=="/i" or cmd=="b" or cmd=="/b" or cmd=="u" or cmd=="/u"): + tag_text="<"+tag_text+">" #html direct mapping + else: + tag_text="["+tag_text+"]" + + + text=pre_text+tag_text+post_text + pos=len(pre_text)+len(tag_text) + + #tnode = ET.SubElement(parent,"div") + #tnode.text=text + text="
    "+text+"
    " + try: + tnode=ET.XML(text) + parent.append(tnode) + except: + print("Error parsing description text: '"+text+"'") + sys.exit(255) + + + return tnode + + + + +def make_method_def(name,m,declare,event=False): + + mdata={} + + + if (not declare): + div=ET.Element("tr") + div.attrib["class"]="method" + ret_parent=ET.SubElement(div,"td") + ret_parent.attrib["align"]="right" + func_parent=ET.SubElement(div,"td") + else: + div=ET.Element("div") + div.attrib["class"]="method" + ret_parent=div + func_parent=div + + mdata["argidx"]=[] + mdata["name"]=m.attrib["name"] + qualifiers="" + if ("qualifiers" in m.attrib): + qualifiers=m.attrib["qualifiers"] + + args=list(m) + for a in args: + if (a.tag=="return"): + idx=-1 + elif (a.tag=="argument"): + idx=int(a.attrib["index"]) + else: + continue + + mdata["argidx"].append(idx) + mdata[idx]=a + + if (not event): + if (-1 in mdata["argidx"]): + make_type(mdata[-1].attrib["type"],ret_parent) + mdata["argidx"].remove(-1) + else: + make_type("void",ret_parent) + + span=ET.SubElement(func_parent,"span") + if (declare): + span.attrib["class"]="funcdecl" + a=ET.SubElement(span,"a") + a.attrib["name"]=name+"_"+m.attrib["name"] + a.text=name+"::"+m.attrib["name"] + else: + span.attrib["class"]="identifier funcdef" + a=ET.SubElement(span,"a") + a.attrib["href"]="#"+name+"_"+m.attrib["name"] + a.text=m.attrib["name"] + + span=ET.SubElement(func_parent,"span") + span.attrib["class"]="symbol" + span.text=" (" + + for a in mdata["argidx"]: + arg=mdata[a] + if (a>0): + span=ET.SubElement(func_parent,"span") + span.text=", " + else: + span=ET.SubElement(func_parent,"span") + span.text=" " + + + make_type(arg.attrib["type"],func_parent) + + span=ET.SubElement(func_parent,"span") + span.text=arg.attrib["name"] + if ("default" in arg.attrib): + span.text=span.text+"="+arg.attrib["default"] + + + span=ET.SubElement(func_parent,"span") + span.attrib["class"]="symbol" + if (len(mdata["argidx"])): + span.text=" )" + else: + span.text=")" + + if (qualifiers): + span=ET.SubElement(func_parent,"span") + span.attrib["class"]="qualifier" + span.text=" "+qualifiers + + return div + + +def make_html_class(node): + + div=ET.Element("div") + div.attrib["class"]="class"; + + a=ET.SubElement(div,"a") + a.attrib["name"]=node.attrib["name"] + + h3=ET.SubElement(a,"h3") + h3.attrib["class"]="title class_title" + h3.text=node.attrib["name"] + + briefd = node.find("brief_description") + if (briefd!=None): + div2=ET.SubElement(div,"div") + div2.attrib["class"]="description class_description" + div2.text=briefd.text + + if ("inherits" in node.attrib): + ET.SubElement(div,"br") + + div2=ET.SubElement(div,"div") + div2.attrib["class"]="inheritance"; + + span=ET.SubElement(div2,"span") + span.text="Inherits: " + + make_type(node.attrib["inherits"],div2) + + if ("category" in node.attrib): + ET.SubElement(div,"br") + + div3=ET.SubElement(div,"div") + div3.attrib["class"]="category"; + + span=ET.SubElement(div3,"span") + span.attrib["class"]="category" + span.text="Category: " + + a = ET.SubElement(div3,"a") + a.attrib["class"]="category_ref" + a.text=node.attrib["category"] + catname=a.text + if (catname.rfind("/")!=-1): + catname=catname[catname.rfind("/"):] + catname="CATEGORY_"+catname + + if (single_page): + a.attrib["href"]="#"+catname + else: + a.attrib["href"]="category.html#"+catname + + + methods = node.find("methods") + + if(methods!=None and len(list(methods))>0): + + h4=ET.SubElement(div,"h4") + h4.text="Public Methods:" + + method_table=ET.SubElement(div,"table") + method_table.attrib["class"]="method_list"; + + for m in list(methods): +# li = ET.SubElement(div2, "li") + method_table.append( make_method_def(node.attrib["name"],m,False) ) + + events = node.find("signals") + + if(events!=None and len(list(events))>0): + h4=ET.SubElement(div,"h4") + h4.text="Events:" + + event_table=ET.SubElement(div,"table") + event_table.attrib["class"]="method_list"; + + for m in list(events): +# li = ET.SubElement(div2, "li") + event_table.append( make_method_def(node.attrib["name"],m,False,True) ) + + + members = node.find("members") + if(members!=None and len(list(members))>0): + + h4=ET.SubElement(div,"h4") + h4.text="Public Variables:" + div2=ET.SubElement(div,"div") + div2.attrib["class"]="member_list"; + + for c in list(members): + + li = ET.SubElement(div2, "li") + div3=ET.SubElement(li,"div") + div3.attrib["class"]="member"; + make_type(c.attrib["type"],div3) + span=ET.SubElement(div3,"span") + span.attrib["class"]="identifier member_name" + span.text=" "+c.attrib["name"]+" " + span=ET.SubElement(div3,"span") + span.attrib["class"]="member_description" + span.text=c.text + + + constants = node.find("constants") + if(constants!=None and len(list(constants))>0): + + h4=ET.SubElement(div,"h4") + h4.text="Constants:" + div2=ET.SubElement(div,"div") + div2.attrib["class"]="constant_list"; + + for c in list(constants): + li = ET.SubElement(div2, "li") + div3=ET.SubElement(li,"div") + div3.attrib["class"]="constant"; + + span=ET.SubElement(div3,"span") + span.attrib["class"]="identifier constant_name" + span.text=c.attrib["name"]+" " + if ("value" in c.attrib): + span=ET.SubElement(div3,"span") + span.attrib["class"]="symbol" + span.text="= " + span=ET.SubElement(div3,"span") + span.attrib["class"]="constant_value" + span.text=c.attrib["value"]+" " + span=ET.SubElement(div3,"span") + span.attrib["class"]="constant_description" + span.text=c.text + +# ET.SubElement(div,"br") + + + descr=node.find("description") + if (descr!=None and descr.text.strip()!=""): + h4=ET.SubElement(div,"h4") + h4.text="Description:" + + make_text_def(node.attrib["name"],div,descr.text) +# div2=ET.SubElement(div,"div") +# div2.attrib["class"]="description"; +# div2.text=descr.text + + + + if(methods!=None or events!=None): + + h4=ET.SubElement(div,"h4") + h4.text="Method Documentation:" + iter_list = [] + if (methods!=None): + iter_list+=list(methods) + if (events!=None): + iter_list+=list(events) + + for m in iter_list: + + descr=m.find("description") + + if (descr==None or descr.text.strip()==""): + continue; + + div2=ET.SubElement(div,"div") + div2.attrib["class"]="method_doc"; + + + div2.append( make_method_def(node.attrib["name"],m,True) ) + #anchor = ET.SubElement(div2, "a") + #anchor.attrib["name"] = + make_text_def(node.attrib["name"],div2,descr.text) + #div3=ET.SubElement(div2,"div") + #div3.attrib["class"]="description"; + #div3.text=descr.text + + + return div + +class_names=[] +classes={} + +for file in input_list: + tree = ET.parse(file) + doc=tree.getroot() + + if ("version" not in doc.attrib): + print("Version missing from 'doc'") + sys.exit(255) + + version=doc.attrib["version"] + + for c in list(doc): + if (c.attrib["name"] in class_names): + continue + class_names.append(c.attrib["name"]) + classes[c.attrib["name"]]=c + +html = ET.Element("html") +css = ET.SubElement(html, "link") +css.attrib["href"] = "main.css" +css.attrib["rel"] = "stylesheet" +css.attrib["type"] = "text/css" + +body = ET.SubElement(html, "body") +if (not single_page): + make_html_top(body) + + + +class_names.sort() + +body.append( make_html_class_list(class_names,5) ) + +for cn in class_names: + c=classes[cn] + if (single_page): + body.append( make_html_class(c)) + else: + html2 = ET.Element("html") + css = ET.SubElement(html2, "link") + css.attrib["href"] = "main.css" + css.attrib["rel"] = "stylesheet" + css.attrib["type"] = "text/css" + body2 = ET.SubElement(html2, "body" ) + make_html_top(body2) + body2.append( make_html_class(c) ); + make_html_bottom(body2) + et_out = ET.ElementTree(html2) + et_out.write(c.attrib["name"]+".html") + + +et_out = ET.ElementTree(html) +if (single_page): + et_out.write("singlepage.html") +else: + make_html_bottom(body) + et_out.write("alphabetical.html") + diff --git a/doc/tools/makemd.py b/doc/tools/makemd.py new file mode 100644 index 0000000000..f85d145d5e --- /dev/null +++ b/doc/tools/makemd.py @@ -0,0 +1,345 @@ +#!/usr/bin/python +# -*- coding: utf-8 -*- +import sys +import xml.etree.ElementTree as ET + +input_list = [] + +for arg in sys.argv[1:]: + input_list.append(arg) + +if len(input_list) < 1: + print 'usage: makedoku.py ' + sys.exit(0) + + +def validate_tag(elem, tag): + if elem.tag != tag: + print "Tag mismatch, expected '" + tag + "', got " + elem.tag + sys.exit(255) + + +class_names = [] +classes = {} + + +def make_class_list(class_list, columns): + + f = open('class_list.md', 'wb') + prev = 0 + col_max = len(class_list) / columns + 1 + print ('col max is ', col_max) + col_count = 0 + row_count = 0 + last_initial = '' + fit_columns = [] + + for n in range(0, columns): + fit_columns += [[]] + + indexers = [] + last_initial = '' + + idx = 0 + for n in class_list: + col = idx / col_max + if col >= columns: + col = columns - 1 + fit_columns[col] += [n] + idx += 1 + if n[:1] != last_initial: + indexers += [n] + last_initial = n[:1] + + row_max = 0 + f.write("\n") + + for n in range(0, columns): + if len(fit_columns[n]) > row_max: + row_max = len(fit_columns[n]) + + f.write("| ") + for n in range(0, columns): + f.write(" | |") + + f.write("\n") + f.write("| ") + for n in range(0, columns): + f.write(" --- | ------- |") + f.write("\n") + + for r in range(0, row_max): + s = '| ' + for c in range(0, columns): + if r >= len(fit_columns[c]): + continue + + classname = fit_columns[c][r] + initial = classname[0] + if classname in indexers: + s += '**' + initial + '** | ' + else: + s += ' | ' + + s += '[' + classname + '](class_'+ classname.lower()+') | ' + + s += '\n' + f.write(s) + + +def dokuize_text(txt): + + return txt + + +def dokuize_text(text): + pos = 0 + while True: + pos = text.find('[', pos) + if pos == -1: + break + + endq_pos = text.find(']', pos + 1) + if endq_pos == -1: + break + + pre_text = text[:pos] + post_text = text[endq_pos + 1:] + tag_text = text[pos + 1:endq_pos] + + if tag_text in class_names: + tag_text = make_type(tag_text) + else: + + # command + + cmd = tag_text + space_pos = tag_text.find(' ') + if cmd.find('html') == 0: + cmd = tag_text[:space_pos] + param = tag_text[space_pos + 1:] + tag_text = '<' + param + '>' + elif cmd.find('method') == 0: + cmd = tag_text[:space_pos] + param = tag_text[space_pos + 1:] + + if param.find('.') != -1: + (class_param, method_param) = param.split('.') + tag_text = '['+class_param+'.'+method_param.replace("_","_")+'](' + class_param.lower() + '#' \ + + method_param + ')' + else: + tag_text = '[' + param.replace("_","_") + '](#' + param + ')' + elif cmd.find('image=') == 0: + tag_text = '![](' + cmd[6:] + ')' + elif cmd.find('url=') == 0: + tag_text = '[' + cmd[4:] + ']('+cmd[4:] + elif cmd == '/url': + tag_text = ')' + elif cmd == 'center': + tag_text = '' + elif cmd == '/center': + tag_text = '' + elif cmd == 'br': + tag_text = '\n' + elif cmd == 'i' or cmd == '/i': + tag_text = '_' + elif cmd == 'b' or cmd == '/b': + tag_text = '**' + elif cmd == 'u' or cmd == '/u': + tag_text = '__' + else: + tag_text = '[' + tag_text + ']' + + text = pre_text + tag_text + post_text + pos = len(pre_text) + len(tag_text) + + # tnode = ET.SubElement(parent,"div") + # tnode.text=text + + return text + + +def make_type(t): + global class_names + if t in class_names: + return '[' + t + '](class_' + t.lower() + ')' + return t + + +def make_method( + f, + name, + m, + declare, + event=False, + ): + + s = ' * ' + ret_type = 'void' + args = list(m) + mdata = {} + mdata['argidx'] = [] + for a in args: + if a.tag == 'return': + idx = -1 + elif a.tag == 'argument': + idx = int(a.attrib['index']) + else: + continue + + mdata['argidx'].append(idx) + mdata[idx] = a + + if not event: + if -1 in mdata['argidx']: + s += make_type(mdata[-1].attrib['type']) + else: + s += 'void' + s += ' ' + + if declare: + + # span.attrib["class"]="funcdecl" + # a=ET.SubElement(span,"a") + # a.attrib["name"]=name+"_"+m.attrib["name"] + # a.text=name+"::"+m.attrib["name"] + + s += ' **'+m.attrib['name'].replace("_","_")+'** ' + else: + s += ' **['+ m.attrib['name'].replace("_","_")+'](#' + m.attrib['name'] + ')** ' + + s += ' **(**' + argfound = False + for a in mdata['argidx']: + arg = mdata[a] + if a < 0: + continue + if a > 0: + s += ', ' + else: + s += ' ' + + s += make_type(arg.attrib['type']) + if 'name' in arg.attrib: + s += ' ' + arg.attrib['name'] + else: + s += ' arg' + str(a) + + if 'default' in arg.attrib: + s += '=' + arg.attrib['default'] + + argfound = True + + if argfound: + s += ' ' + s += ' **)**' + + if 'qualifiers' in m.attrib: + s += ' ' + m.attrib['qualifiers'] + + f.write(s + '\n') + + +def make_doku_class(node): + + name = node.attrib['name'] + + f = open("class_"+name.lower() + '.md', 'wb') + + f.write('# ' + name + ' \n') + + if 'inherits' in node.attrib: + inh = node.attrib['inherits'].strip() + f.write('####**Inherits:** '+make_type(inh)+'\n') + if 'category' in node.attrib: + f.write('####**Category:** ' + node.attrib['category'].strip() + + '\n') + + briefd = node.find('brief_description') + if briefd != None: + f.write('\n### Brief Description \n') + f.write(dokuize_text(briefd.text.strip()) + '\n') + + methods = node.find('methods') + + if methods != None and len(list(methods)) > 0: + f.write('\n### Member Functions \n') + for m in list(methods): + make_method(f, node.attrib['name'], m, False) + + events = node.find('signals') + if events != None and len(list(events)) > 0: + f.write('\n### Signals \n') + for m in list(events): + make_method(f, node.attrib['name'], m, True, True) + + members = node.find('members') + + if members != None and len(list(members)) > 0: + f.write('\n### Member Variables \n') + + for c in list(members): + s = ' * ' + s += make_type(c.attrib['type']) + ' ' + s += '**' + c.attrib['name'] + '**' + if c.text.strip() != '': + s += ' - ' + c.text.strip() + f.write(s + '\n') + + constants = node.find('constants') + if constants != None and len(list(constants)) > 0: + f.write('\n### Numeric Constants \n') + for c in list(constants): + s = ' * ' + s += '**' + c.attrib['name'] + '**' + if 'value' in c.attrib: + s += ' = **' + c.attrib['value'] + '**' + if c.text.strip() != '': + s += ' - ' + c.text.strip() + f.write(s + '\n') + + descr = node.find('description') + if descr != None and descr.text.strip() != '': + f.write('\n### Description \n') + f.write(dokuize_text(descr.text.strip()) + '\n') + + methods = node.find('methods') + + if methods != None and len(list(methods)) > 0: + f.write('\n### Member Function Description \n') + for m in list(methods): + + d = m.find('description') + if d == None or d.text.strip() == '': + continue + f.write('\n#### ' + m.attrib['name'] + '\n') + make_method(f, node.attrib['name'], m, True) + f.write('\n') + f.write(dokuize_text(d.text.strip())) + f.write('\n') + + +for file in input_list: + tree = ET.parse(file) + doc = tree.getroot() + + if 'version' not in doc.attrib: + print "Version missing from 'doc'" + sys.exit(255) + + version = doc.attrib['version'] + + for c in list(doc): + if c.attrib['name'] in class_names: + continue + class_names.append(c.attrib['name']) + classes[c.attrib['name']] = c + +class_names.sort() + +make_class_list(class_names, 2) + +for cn in class_names: + c = classes[cn] + make_doku_class(c) + diff --git a/tools/docdump/class_list.xml b/tools/docdump/class_list.xml deleted file mode 100644 index 3d07f84177..0000000000 --- a/tools/docdump/class_list.xml +++ /dev/null @@ -1,13625 +0,0 @@ - - - - - Contains data used to animate everything in the engine. - - - An Animation resource contains data used to animate everything in the engine. Animations are divided into tracks, and each track must be linked to a node. The state of that node can be changed through time, by adding timed keys (signals) to the track. [html br/] Animations are just data containers, and must be added to odes such as an [AnimationPlayer] or [AnimationTreePlayer] to be played back. - - - - - - - - - Add a track to the Animation. The track type must be specified as any of the values in te TYPE_* enumeration. - - - - - - - Remove a track by specifying the track index. - - - - - - - Return the amount of tracks in the animation. - - - - - - - - - Get the type of a track. - - - - - - - - - Get the path of a track. for more information on the path format, see [method track_set_path] - - - - - - - - - Set the path of a track. Paths must be valid scene-tree paths to a node, and must be specified starting from the parent node of the node that will reproduce the animation. Tracks that control properties or bones must append their name after the path, separated by ":". Example: "character/skeleton:ankle" or "character/mesh:transform/local:" - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Return the amount of keys in a given track. - - - - - - - - - - - - - - - - - - - Return the time at which the key is located. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Set the total length of the animation (in seconds). Note that length is not delimited by the last key, as this one may be before or after the end to ensure correct interpolation and looping. - - - - - - - Return the total length of the animation (in seconds). - - - - - - - Set a flag indicating that the animation must loop. This is uses for correct interpolation of animation cycles, and for hinting the player that it must restart the animation once it's over. - - - - - - - Return wether the animation has the loop flag set. - - - - - - - - Transform tracks are used to change node local transforms or skeleton pose bones. Transitions are Interpolated. - - - - - TODO will be changed and bleh - - - Value tracks set values in node properties, but only those which can be Interpolated. - - - - - - - - - - - - Container and player of [Animaton] resources. - - - An animation player is used for general purpose playback of [Animation] resources. It contains a dictionary of animations (referenced by name) and custom blend times between their transitions. Additionally, animations can be played and blended in diferent channels. - - - - - - - - - - - Add an animation resource to the player, which will be later referenced by the "name" argument. - - - - - - - Remove an animation from the player (by supplying the same name used to add it). - - - - - - - - - - - - - - - - - Request wether an [Animation] name exist within the player. - - - - - - - - - Get an [Animation] resource by requesting a name. - - - - - - - Get the list of names of the animations stored in the player. - - - - - - - - - - - Specify a blend time (in seconds) between two animations, referemced by their names. - - - - - - - - - - - Get the blend time between two animations, referemced by their names. - - - - - - - - - Start playback of an animation (referenced by "name"). Optionally a channel can be specified. - - - - - - - Start playback of an animation channel. (or channel 0 if none is provided). - - - - - Stop playback on all animation channels. - - - - - - - - - Return wether an animation chanel is playing (or channel 0 if none is provided). - - - - - - - - - Return the name of the animation being played in a channel (or channel 0 if none is provided). - - - - - - - Pause the playback in all animation channels. - - - - - - - Return [html i]true[html /i] if all playback is paused. - - - - - - - - - Set a speed scaling ratio in a given animation channel (or channel 0 if none is provided). Default ratio is [html i]1[html /i] (no scaling). - - - - - - - - - Get the speed scaling ratio in a given animation channel (or channel 0 if none is provided). Default ratio is [html i]1[html /i] (no scaling). - - - - - - - - - Seek the animation in an animation channel (or channel 0 if none is provided) to a specific position (in seconds). - - - - - - - - - Return the playback position (in seconds) in an animation channel (or channel 0 if none is provided) - - - - - - - - - - - - - The animation player creates caches for faster access to the nodes it will animate. However, if a specific node is removed, it may not notice it, so clear_caches will force the player to search for the nodes again. - - - - - - Maximum amount of animation channels. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Provides a base class for different kinds of buttons. - - - BaseButton is the abstract base class for buttons, so it shouldn't be used directly (It doesnt display anything). Other types of buttons inherit from it. - - - - - - - Set the button to pressed state (only if toggle_mode is active). - - - - - - - Return when the button is pressed (only if toggle_mode is active). - - - - - - - Set the button toggle_mode property. Toggle mode makes the button flip state between pressed and unpressed each time its area is clicked. - - - - - - - Return the toggle_mode property (see [method set_toggle_mode]). - - - - - - - Set the button into disabled state. When a button is disabled, it can't be clicked or toggled. - - - - - - - Return wether the button is in disabled state (see [method set_disabled]). - - - - - - - Set the button click_on_press mode. This mode generates click signals when a mousebutton or key is just pressed (by default signals are generated when the button/keys are released and both press and release occur in the visual area of the Button). - - - - - - - Return the state of the click_on_press property (see [method set_click_on_press]). - - - - - - - - - This signal is emitted when the button was just toggled between pressed and normal states (only if toggle_mode is active). The new state is contained in the [html i]pressed[html /i] argument. - - - - - This signal is emitted every time the button is pressed or toggled. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Standard themed Button. - - - Button is just the standard themed button: [html image src="images/button_example.png"/] It can contain a text and an icon, and will display them according to the current theme. - - - - - - - Set the button text, which will be displayed inside the button area. - - - - - - - Return the button text. - - - - - - - Set the button icon, which will be displayed to the left of the text. - - - - - - - Return the button icon. - - - - - - - Set the [html i]flat[html /i] property of a Button. Flat buttons don't display decoration unless hoevered or pressed. - - - - - - - Set the [html i]clip_text[html /i] property of a Button. When this property is enabled, text that is too large to fit the button is clipped, when disabled (default) the Button will always be wide enough to hold the text. - - - - - - - Return the state of the [html i]clip_text[html /i] property (see [method set_clip_text]) - - - - - - - Return the state of the [html i]flat[html /i] property (see [method set_flat]) - - - - - - - - - Camera node, displays from a point of view. - - - Camera is a special node that displays what is visible from its current location. Cameras register themselves in the nearest [Viewport] node (when ascending the tree). Only one camera can be active per viewport. If no viewport is available ascending the tree, the Camera will register in the global viewport. In other words, a Camera just provides [html i]3D[html /i] display capabilities to a [Viewport], and, without one, a [Scene] registered in that [Viewport] (or higher viewports) can't be displayed. - - - - - - - - - Return a normal vector in worldspace, that is the result of projecting a point on the [Viewport] rectangle by the camera proyection. This is useful for casting rays in the form of (origin,normal) for object intersection or picking. - - - - - - - - - Return a 3D position in worldspace, that is the result of projecting a point on the [Viewport] rectangle by the camera proyection. This is useful for casting rays in the form of (origin,normal) for object intersection or picking. - - - - - - - - - Return how a 3D point in worldpsace maps to a 2D coordinate in the [Viewport] rectangle. - - - - - - - - - - - Set the camera projection to perspective mode, by specifying a [html i]FOV[html /i] angle in degrees (FOV means Field of View), and the [html i]near[html /i] and [html i]far[html /i] clip planes in worldspace units. - - - - - - - - - - - Set the camera projection to orthogonal mode, by specifying a rectangle and the [html i]near[html /i] and [html i]far[html /i] clip planes in worldspace units. (As a hint, 2D games often use this projection, with values specified in pixels) - - - - - Make this camera the current Camera for the [Viewport] (see class description). If the Camera Node is outside the scene tree, it will attempt to become current once it's added. - - - - - - - - - - - Return wether the Camera is the current one in the [Viewport], or plans to become current (if outside the scene tree). - - - - - - - Get the camera transform. Subclassed cameras (such as CharacterCamera) may provide different transforms than the [Node] transform. - - - - - - - - - - - - Perspective Projection (object's size on the screen becomes smaller when far away). - - - Orthogonal Projection (objects remain the same size on the screen no matter how far away they are). - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Control is the base class Node for all the GUI components. - - - Control is the base class Node for all the GUI components. Every GUI component inherits from it, directly or indirectly. Control Nodes contain positions relative to their parent control nodes. In this way, sections of the scene tree made of contiguous Control Nodes, become user interfaces.[html br/] Controls contain a [html i]canvas item[html /i] RID from the visual server, and can draw to it when receiving a NOTIFICATION_DRAW.[html br/] TODO: Explain margins and anchors[html br/] TODO: explain focus[html br/] - - - - - - - - - - - Return the minimum size this Control can shrink to. A control will never be displayed or resized smaller than its minimum size. - - - - - - - Return wether this control is a [html i]window[html /i]. Controls are considered windows when their parent [Node] is not a Control. - - - - - - - Return the [html i]window[html /i] for this control, ascending the scene tree (see [method is_window]). - - - - - - - - - Change the anchor (ANCHOR_BEGIN, ANCHOR_END, ANCHOR_RATIO) type for a margin (MARGIN_LEFT, MARGIN_TOP, MARGIN_RIGHT, MARGIN_BOTTOM). Changing the anchor mode converts the current margin offset from the previos anchor mode to the new one, so margin offsets ([method set_margin]) must be done after setting anchors, or at the same time ([method set_anchor_and_margin]). - - - - - - - - - Return the anchor type (ANCHOR_BEGIN, ANCHOR_END, ANCHOR_RATIO) for a given margin (MARGIN_LEFT, MARGIN_TOP, MARGIN_RIGHT, MARGIN_BOTTOM). - - - - - - - - - Set a margin offset. Margin can be one of (MARGIN_LEFT, MARGIN_TOP, MARGIN_RIGHT, MARGIN_BOTTOM). Offset value being set depends on the anchor mode. - - - - - - - - - - - Change the anchor (ANCHOR_BEGIN, ANCHOR_END, ANCHOR_RATIO) type for a margin (MARGIN_LEFT, MARGIN_TOP, MARGIN_RIGHT, MARGIN_BOTTOM), and also set its offset. This is a helper (see [method set_anchor] and [method set_margin]). - - - - - - - Sets MARGIN_LEFT and MARGIN_TOP at the same time. This is a helper (see [method set_margin]). - - - - - - - Sets MARGIN_RIGHT and MARGIN_BOTTOM at the same time. This is a helper (see [method set_margin]). - - - - - - - Move the Control to a new position, relative to the top-left corner of the parent Control, changing all margins if needed and without changing current anchor mode. This is a helper (see [method set_margin]). - - - - - - - Changes MARGIN_RIGHT and MARGIN_BOTTOM to fit a given size. This is a helper (see [method set_margin]). - - - - - - - Move the Control to a new position, relative to the top-left corner of the [html i]window[html /i] Control, and without changing current anchor mode. (see [method set_margin]). - - - - - - - - - Return a margin offset. Margin can be one of (MARGIN_LEFT, MARGIN_TOP, MARGIN_RIGHT, MARGIN_BOTTOM). Offset value being returned depends on the anchor mode. - - - - - - - - - - - - - Returns MARGIN_LEFT and MARGIN_TOP at the same time. This is a helper (see [method set_margin]). - - - - - - - Returns the Control position, relative to the top-left corner of the parent Control and independly of the anchor mode. - - - - - - - Returns the size of the Control, computed from all margins, however the size returned will [html b]never be smaller than the minimum size reported by [method get_minimum_size][html /b]. This means that even if end position of the Control rectangle is smaller than the begin position, the Control will still display and interact correctly. (see description, [method get_minimum_size], [method set_margin], [method set_anchor]). - - - - - - - Returns the Control position, relative to the top-left corner of the parent Control and independent of the anchor mode. - - - - - - - Return position and size of the Control, relative to the top-left corner of the parent Control. This is a helper (see [method get_pos],[method get_size]). - - - - - - - Return position and size of the Control, relative to the top-left corner of the [html i]window[html /i] Control. This is a helper (see [method get_global_pos],[method get_size]). - - - - - Change all margins and anchors, so this Control always takes up the same area as the parent Control. This is a helper (see [method set_anchor],[method set_margin]). - - - - - - - Display a Control as modal. Control must be a subwindow (see [method set_as_subwindow]). Modal controls capture the input signals until closed or the area outside them is accessed. When a modal control loses focus, or the ESC key is pressed, they automatically hide. Modal controls are used extensively for popup dialogs and menus. - - - - - - - Set the focus access mode for the control (FOCUS_NONE, FOCUS_CLICK, FOCUS_ALL). Only one Control can be focused at the same time, and it will receive keyboard signals. - - - - - - - Return wether the Control is the current focused control (see [method set_focus_mode]). - - - - - Steal the focus from another control and become the focused control (see [method set_focus_mode]). - - - - - - - Override whole the [Theme] for this Control and all its children controls. - - - - - - - Return a [Theme] override, if one exists (see [method set_theme]). - - - - - - - - - Override a single icon ([Texture]) in the theme of this Control. If texture is empty, override is cleared. - - - - - - - - - Override a single stylebox ([Stylebox]) in the theme of this Control. If stylebox is empty, override is cleared. - - - - - - - - - Override a single font (font) in the theme of this Control. If font is empty, override is cleared. - - - - - - - - - - - - - - - - - Override a single constant (integer) in the theme of this Control. If constant equals Theme.INVALID_CONSTANT, override is cleared. - - - - - - - Return the parent Control. Unlike get_parent() in [Node], only returns a valid object if the parent is a Control. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Control gained focus. - - - - - Mouse pointer entered the area of the Control. - - - Control changed size (get_size() reports the new size). - - - Control can acquire focus only if clicked. - - - - - - - - - - - - - - - Control lost focus. - - - Control can't acquire focus. - - - X is relative to MARGIN_LEFT, Y is relative to MARGIN_TOP, - - - - - - - - - - - Mouse pointer exited the area of the Control. - - - Control can acquire focus if clicked, or by pressing TAB/Directionals in the keyboard from another Control. - - - - - X and Y are a ratio (0 to 1) relative to the parent size 0 is left/top, 1 is right/bottom. - - - X is relative to -MARGIN_RIGHT, Y is relative to -MARGIN_BOTTOM, - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - GridMap is like a tile map, but in 3D. - - - GridMap is a 3D Tile map, using [html i]3D Cells[html /i] instead of tiles. On each cell, a mesh and a collision volume can be placed from a [MeshLibrary]. GridMap is used for designing worlds quickly. Despite that GridMaps can contain up to hundreds millions of cells, they are very optimized, and only use resources for the cells that contain items. - - - - - - - Set a MeshLibrary. Cell indices refer to items in the theme. - - - - - - - Get the current MeshLibrary (if exists). - - - - - - - Set the size of a cell, in worldpsace units. All cells in a GridMap are the same size. - - - - - - - Return the current cell size. - - - - - - - - - - - - - - - - - - - Set the width of the GridMap. Width is the amount of cells i the direction of the X coordinate. - - - - - - - Get the width of the GridMap. Width is the amount of cells i the direction of the X coordinate. - - - - - - - Set the height of the GridMap. Height is the amount of cells i the direction of the Y coordinate. - - - - - - - Get the height of the GridMap. Height is the amount of cells i the direction of the Y coordinate. - - - - - - - Set the depth of the GridMap. Depth is the amount of cells i the direction of the Z coordinate. - - - - - - - Get the depth of the GridMap. Depth is the amount of cells i the direction of the Z coordinate. - - - - - - - - - - - - - - - Set a cell item (x,y,z pos). Cell items are indices to items in the [MeshLibrary]. - - - - - - - - - - - - - Get a cell item (x,y,z pos). Cell items are indices to items in the [MeshLibrary]. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Value indicating that a cell item is not used or invalid. - - - - - - Theme for a [GridMap]. - - - MeshLibrary is [Resource] containing the data used in a [GridMap]. It's filled with items, each containing a mesh and a collision shape. - - - - - - - Create a new item, and assign it a given id. - - - - - - - - - Set the name of an item, referenced by id. - - - - - - - - - Set the [Mesh] of an item, referenced by id. - - - - - - - - - - - - - - - - - Get the name of an item, referenced by id. - - - - - - - - - Get the [Mesh] of an item, referenced by id. - - - - - - - - - - - - - - - Remove an item, referenced by id. - - - - - Clear all items contained in this resource. - - - - - - - Get the list of item IDs contained in this theme. - - - - - - - Get the last unused item id. This is useful for creating new item IDs. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Directional Light, such as the Sun or the Moon. - - - A DirectionalLight is a type of [Light] node that emits light constantly in one direction (the negative z axis of the node). It is used lights with strong intensity that are located far away from the scene to model sunlight or moonlight. The worldpace location of the DirectionalLight transform (origin) is ignored, only the basis is used do determine light direction. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Dialog for selecting files or directories in the filesystem. - - - FileDialog is a preset dialog used to choose files and directories in the filesystem. It supports filter masks. - - - - - Clear all the added filters in the dialog. - - - - - - - Add a custom filter. Filter format is: "mask ; description. - - - - - - - Get the current working directory of the file dialog. - - - - - - - Get the current selected file of the file dialog (empty if none). - - - - - - - Get the current selected path (directory and file) of the file dialog (empty if none). - - - - - - - - - - - - - - - - - - - - - - - - - Set the file dialog mode from the MODE_* enum. - - - - - - - Get the file dialog mode from the MODE_* enum. - - - - - - - - - - - - - - - Event emitted when the user selects a file (double clicks it or presses the OK button). - - - - - - - - Editor will not allow to select nonexistent files. - - - Editor will warn when a file exists. - - - - - - Simple Material with a fixed parameter set. - - - FixedMaterial is a simple type of material [Resource], which contains a fixed amount of paramters. It is the only type of material supported in fixed-pipeline devices and APIs. It is also an often a better alternative to [ShaderMaterial] for most simple use cases. - - - - - - - - - - - - - - - - - - - - - Set a parameter, parameters are defined in the PARAM_* enum. The type of each parameter may change, so it's best to check the enum. - - - - - - - Return a parameter, parameters are defined in the PARAM_* enum. The type of each parameter may change, so it's best to check the enum. - - - - - - - - - Set a texture. Textures change parameters per texel and are mapped to the model depending on the texcoord mode (see [method set_texcoord_mode]). - - - - - - - - - Return a texture. Textures change parameters per texel and are mapped to the model depending on the texcoord mode (see [method set_texcoord_mode]). - - - - - - - Set the texture coordinate generation mode. Materials have a unique, texgen mode which can generate texture coordinates on the fly. Texgen mode must be one of the values from the TEXGEN_* enum. TEXGEN can be selected as a texture coordinate mode (see [method set_texcoord_mode]). - - - - - - - Return the texture coordinate generation mode. Materials have a unique, texgen mode which can generate texture coordinates on the fly. Texgen mode must be one of the values from the TEXGEN_* enum. TEXGEN can be selected as a texture coordinate mode (see [method set_texcoord_mode]). - - - - - - - - - Set the texture coordinate mode. Each texture param (from the PARAM_* enum) has one. It defines how the textures are mapped to the object. - - - - - - - - - Return the texture coordinate mode. Each texture param (from the PARAM_* enum) has one. It defines how the textures are mapped to the object. - - - - - - - Sets a special transform used to post-transform UV coordinates of the uv_xfrom tecoord mode: TEXCOORD_UV_TRANSFORM - - - - - - - Returns the special transform used to post-transform UV coordinates of the uv_xfrom tecoord mode: TEXCOORD_UV_TRANSFORM - - - - - - Specular Exponent (size of the specular dot) - - - Detail Layer for diffuse lighting. - - - Read texture coordinates from the UV2 array. - - - Use the screen coordinates as UV, scaled by depth and the screenz coefficient. - - - Read texture coordinates from the UV array and transform them by uv_xform. - - - Use object local X and Y coordinates as UV. - - - - - Maximum amount of parameters - - - Diffuse Lighting (light scattered from surface). - - - Emission Lighting (light emitted from the surface) - - - Specular Lighting (light reflected from the surface). - - - Mix coefficient for the detail layer. - - - Use view normal reflected by object normal as UV. - - - Normal Map (irregularity map). - - - Glow (Visible emitted scattered light). - - - Read texture coordinates from the UV array. - - - Use texture coordinates from the texgen. - - - Use the screen coordinates as UV. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Internationalized font and text drawing support. - - - Font contains an unicode compatible character set, as well as the ability to draw it with variable width, ascent, descent and kerning. For creating fonts from TTF files (or other font formats), see the editor support for fonts. TODO check wikipedia for graph of ascent/baseline/descent/height/etc. - - - - - - - Set the total font height (ascent plus descent) in pixels. - - - - - - - Return the total font height (ascent plus descent) in pixels. - - - - - - - Set the font ascent (number of pixels above the baseline). - - - - - - - Return the font ascent (number of pixels above the baseline). - - - - - - - Return the font descent (number of pixels below the baseline). - - - - - - - - - - - Add a kerning pair to the [Font] as a difference. Kerning pairs are special cases where a typeface advance is determined by the next character. - - - - - - - - - - - Return a kerning pair as a difference. Kerning pairs are special cases where a typeface advance is determined by the next character. - - - - - - - Add a texture to the [Font]. - - - - - - - - - - - - - - - Add a character to the font, where "character" is the unicode value, "texture" is the texture index, "rect" is the region in the texture (in pixels!), "align" is the (optional) alignment for the character and "advance" is the (optional) advance. - - - - - - - - - - - Return the size of a character, optionally taking kerning into account if the next character is provided. - - - - - - - - - Return the size of a string, taking kerning and advance into account. - - - - - Clear all the font data. - - - - - - - - - - - - - - - Draw "string" into a canvas item using the font at a given "pos" position, with "modulate" color, and optionally clipping the width. "pos" specifies te baseline, not the top. To draw from the top, [html i]ascent[html /i] must be added to the Y axis. - - - - - - - - - - - - - - - - - Draw character "char" into a canvas item using the font at a given "pos" position, with "modulate" color, and optionally kerning if "next" is apassed. clipping the width. "pos" specifies te baseline, not the top. To draw from the top, [html i]ascent[html /i] must be added to the Y axis. The width used by the character is returned, making this function useful for drawing strings character by character. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Contains global variables accessible from everywhere. - - - Contains global variables accessible from everywhere. Use the normal [Object] API, such as "Globals.get(variable)", "Globals.set(variable,value)" or "Globals.has(variable)" to access them. Variables stored in engine.cfg are also loaded into globals, making this object very useful for reading custom game configuration options. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Horizontal version of [ScrollBar], which goes from top (min) to bottom (max). - - - - - - - - - - - Horizontal version of [Separator]. - - - Horizontal version of [Separator]. It is used to separate objects vertiacally, though (but it looks horizontal!). - - - - - - - - - - - - - - - - - - - IP Protocol support functions. - - - IP contains some support functions for the IPv4 protocol. TCP/IP support is in different classes (see [TCP_Client], [TCP_Server]). IP provides hostname resolution support, both blocking and threaded. - - - - - - - - - Resolve a given hostname, blocking. Resolved hostname is returned as an IP. - - - - - - - - - Create a queue item for resolving a given hostname. The queue ID is returned, or RESOLVER_INVALID_ID on error. - - - - - - - - - Return the status of hostname queued for resolving, given it's queue ID. Returned status can be any of the RESOLVER_STATUS_* enumeration. - - - - - - - - - Return a resolved item address, or an empty string if an error happened or resolution didn't happen yet (see [method get_resolve_item_status]). - - - - - - - Erase a queue ID, removing it from the queue if needed. This should be used after a queue is completed to free it and enable more queries to happen. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Control that displays formatted text. - - - Label is a control that displays formatted text, optionally autowrapping it to the [Control] area. It inherits from range to be able to scroll wrapped text vertically. - - - - - - - Set the alignmend mode to any of the ALIGN_* enumeration values. - - - - - - - Return the alignmend mode (any of the ALIGN_* enumeration values). - - - - - - - Set the label text. Text can contain newlines. - - - - - - - Return the label text. Text can contain newlines. - - - - - - - Set [html i]autowrap[html /i] mode. When enabled, autowrap will fit text to the control width, breaking sentences when they exceed the available horizontal space. When disabled, the label minimum width becomes the width of the longest row, and the minimum height large enough to fit all rows. - - - - - - - Return the state of the [html i]autowrap[html /i] mode (see [method set_autowrap]). - - - - - - Align rows centered. - - - Align rows to the left (default). - - - Align rows to the right (default). - - - Expand row whitespaces to fit the width. - - - - - - Provides a base class for different kinds of light nodes. - - - Light is the abstract base class for light nodes, so it shouldn't be used directly (It can't be instanced). Other types of light nodes inherit from it. Light contains the common variables and parameters used for lighting. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Control that provides single line string editing. - - - LineEdit provides a single line string editor, used for text fields. - - - - - Clear the [LineEdit] text. - - - - - Select the whole string. - - - - - - - Set the text in the [LineEdit], clearing the existing one and the selection. - - - - - - - Return the text in the [LineEdit]. - - - - - - - Set the cursor position inside the [LineEdit], causing it to scroll if needed. - - - - - - - Return the cursor position inside the [LineEdit]. - - - - - - - Set the maximum amount of characters the [LineEdit] can edit, and cropping existing text in case it exceeds that limit. Setting 0 removes the limit. - - - - - - - Return the maximum amount of characters the [LineEdit] can edit. If 0 is returned, no limit exists. - - - - - - - Append text at cursor, scrolling the [LineEdit] when needed. - - - - - - - Set the [html i]editable[html /i] status of the [LineEdit]. When disabled, existing text can't be modified and new text can't be added. - - - - - - - Return the [html i]editable[html /i] status of the [LineEdit] (see [method set_editable]). - - - - - - - Set the [html i]secret[html /i] status of the [LineEdit]. When enabled, every character is displayed as "*". - - - - - - - Return the [html i]secret[html /i] status of the [LineEdit] (see [method set_secret]). - - - - - - - - - - - - - - - This signal is emitted when the user presses KEY_ENTER on the [LineEdit]. This signal is often used as an alternate confirmation mechanism in dialogs. - - - - - - - When the text changes, this signal is emitted. - - - - - - - - - Main loop is the abstract main loop base class. - - - Main loop is the abstract main loop base class. All other main loop classes are derived from it. Upon application start, a [MainLoop] has to be provided to OS, else the application will exit. This happens automatically (and a [SceneMainLoop] is created), unless a main [Script] is supplied, which may or not create and return a [MainLoop]. - - - - - - - - - - - - - - - Abstract base [Resource] for coloring and shading geometry. - - - Material is a base [Resource] used for coloring and shading geometry. All materials inherit from it and almost all [VisualInstance] derived nodes carry a Material. A few flags and parameters are shared between all material types and are configured here. - - - - - - - - - Set a [Material] flag, which toggles on or off a behavior when rendering. See enumeration FLAG_* for a list. - - - - - - - - - Return a [Material] flag, which toggles on or off a behavior when rendering. See enumeration FLAG_* for a list. - - - - - - - - - - - - - - - - - - - - - - - Set blend mode for the material, which can be one of BLEND_MODE_MIX (default), BLEND_MODE_ADD, BLEND_MODE_SUB. Keep in mind that only BLEND_MODE_MIX ensures that the material [html i]may[html /i] be opaque, any other blend mode will render with alpha blending enabled in raster-based [VisualServer] implementations. - - - - - - - Return blend mode for the material, which can be one of BLEND_MODE_MIX (default), BLEND_MODE_ADD, BLEND_MODE_SUB. Keep in mind that only BLEND_MODE_MIX ensures that the material [html i]may[html /i] be opaque, any other blend mode will render with alpha blending enabled in raster-based [VisualServer] implementations. - - - - - - - - - - - - - - - - - - - Set the line width for geometry drawn with FLAG_WIREFRAME enabled, or LINE primitives. Note that not all hardware or VisualServer backends support this (like DirectX). - - - - - - - Return the line width for geometry drawn with FLAG_WIREFRAME enabled, or LINE primitives. Note that not all hardware or VisualServer backends support this (like DirectX). - - - - - - - - - - - - - - - - - - - - - - - - - - Triangle geometry is drawn as lines if this flag is enabled. - - - - - - - - - Both front facing and back facing triangles are rendered when this flag is enabled. - - - Geometry world transform is computed as billboard if this flag is enabled, often used for impostors. - - - Shading (lighting) is disabled when this flag is enabled. - - - Use the regular alpha blending equation (source and dest colors are faded) (default). - - - - - - - Maximum amount of flags - - - Geometry is visible when this flag is enabled (default). - - - - - - - - - Use additive blending equation, often used for particle effects such as fire or light decals. - - - - - - - - - Use substractive blending equation, often used for some smoke effects or types of glass. - - - Front facing and back facing order is swapped when this flag is enabled. - - - - - - Special button that brings up a [PopupMenu] when clicked. - - - Special button that brings up a [PopupMenu] when clicked. That's pretty much all it does, as it's just a helper class when bulding GUIs. - - - - - - - Return the [PopupMenu] contained in this button. - - - - - - - - - - - - - - - A [Resource] that contains vertex-array based geometry. - - - Mesh is a type of [Resource] that contains vertex-array based geometry, divided in [html i]surfaces[html /i]. Each surface contains a completely separate array and a material used to draw it. Design wise, a mesh with multiple surfaces is prefered to a single surface, because objects created in 3D editing software commonly contain multiple materials. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Create a new surface ([method get_surface_count] will become surf_idx for this.[html br/] Surfaces are created to be rendered using a "primitive", which may be PRIMITIVE_POINTS, PRIMITIVE_LINES, PRIMITIVE_LINE_STRIP, PRIMITIVE_LINE_LOOP, PRIMITIVE_TRIANGLES, PRIMITIVE_TRIANGLE_STRIP, PRIMITIVE_TRIANGLE_FAN. (As a note, when using indices, it is recommended to only use just points, lines or triangles).[html br/] The format of a surface determines which arrays it will allocate and hold, so "format" is a combination of ARRAY_FORMAT_* mask constants ORed together. ARRAY_FORMAT_VERTEX must be always present. "array_len" determines the amount of vertices in the array (not primitives!). if ARRAY_FORMAT_INDEX is in the format mask, then it means that an index array will be allocated and "index_array_len" must be passed. - - - - - - - Return the amount of surfaces that the [Mesh] holds. - - - - - - - Remove a surface at position surf_idx, shifting greater surfaces one surf_idx slot down. - - - - - - - - - - - - - Set a surface array, array must be defined in the format (see [method add_surface]), and which array being set in "data" must be indicated passing a value from the ARRAY_* enum (NOT THE ARRAY_FORMAT_ enum!!). A Mesh can't be displayed (error will be reported) if an array that is present in the format was not set. - - - - - - - - - Return a surface array, array must be defined in the format (see [method add_surface]), and which array being returned must be indicated passing a value from the ARRAY_* enum (NOT THE ARRAY_FORMAT_ enum!!) (see [method add_surface]). - - - - - - - - - Return the length in vertices of the vertex array in the requested surface (see [method add_surface]). - - - - - - - - - Return the length in indices of the index array in the requested surface (see [method add_surface]). - - - - - - - - - Return the format mask of the requested surface (see [method add_surface]). - - - - - - - - - Return the primitive type of the requested surface (see [method add_surface]). - - - - - - - - - Set a [Material] for a given surface. Surface will be rendered using this material. - - - - - - - - - Return a [Material] in a given surface. Surface is rendered using this material. - - - - - - Render array as lines (every two vertices a line is created). - - - - - - - Amount of weights/bone indices per vertex (always 4). - - - Array format will include vertices (mandatory). - - - Vertex array (array of [Vector3]() vertices). - - - Render array as points (one vertex equals one point). - - - Array format will include bone indices. - - - Array format will include a color array. - - - Array of bone indices, as a float array. Each element in groups of 4 floats. - - - Vertex array (array of [Color]() colors). - - - Index array will be used. - - - Array of integers, used as indices referencing vertices. No index can be beyond the vertex array size. - - - Render array as triangle strips. - - - Array format will include tangents - - - Array format will include normals - - - Tangent array, array of groups of 4 floats. first 3 floats determine the tangent, and the last the binormal direction as -1 or 1. - - - Normal array (array of [Vector3]() normals). - - - Render array as triangles (every three vertices a triangle is created). - - - Render array as line loop (like line strip, but closed). - - - Render array as line strip. - - - Array format will include bone weights. - - - Array format will include UVs. - - - Array of bone weights, as a float array. Each element in groups of 4 floats. - - - UV array (array of [Vector3]() UVs or float array of groups of 2 floats (u,v)). - - - Render array as triangle fans. - - - Default value used for index_array_len when no indices are present. - - - - - - Node that instances meshes into a [Scenario]. - - - MeshInstance is a [Node] that takes a [Mesh] resource and adds it to the current [Scenario] by creating an instance of it. This is the class most often used to get 3D geometry rendered and can be used to instance a sigle [Mesh] in many places. This allows to reuse geometry and save on resources. When a [Mesh] has to be instanced more than thousands of times at close proximity, consider using a [MultiMesh] in a [MultiMeshInstance] instead. - - - - - - - Set the [Mesh] resource for the instance. - - - - - - - Return the current [Mesh] resource for the instance. - - - - - - - Return the AABB of the mesh, in local coordinates. - - - - - This helper creates a [StaticBody] child [Node] using the mesh geometry as collision. It's mainly used for testing. - - - - - - - - - Soon to be removed, bye bye. - - - - - - - - - - - Provides high perfomance mesh instancing. - - - MultiMesh provides low level mesh instancing. If the amount of [Mesh] instances needed goes from hundreds to thousands (and most need to be visible at close proximity) creating such a large amount of [MeshInstance] nodes may affect performance by using too much CPU or video memory. [html br/]For this case a MultiMesh becomes very useful, as it can draw thousands of instances with little API overhead.[html br/] As a drawback, if the instances are too far away of each other, performance may be reduced as every sigle instance will always rendered (they are spatially indexed as one, for the whole object).[html br/] Since instances may have any behavior, the AABB used for visibility must be provided by the user, or generated with [method generate_aabb]. - - - - - - - Set the [Mesh] resource to be drawn in multiple instances. - - - - - - - Return the [Mesh] resource drawn as multiple instances. - - - - - - - Set the amount of instnces that is going to be drawn. Changing this number will erase all the existing instance transform and color data. - - - - - - - Return the amount of instnces that is going to be drawn. - - - - - - - - - Set the transform for a specific instance. - - - - - - - - - Return the transform of a specific instance. - - - - - - - - - Set the color of a specific instance. - - - - - - - - - Get the color of a specific instance. - - - - - - - Set the visibility AABB. If not provided, MultiMesh will not be visible. - - - - - - - Return the visibility AABB. - - - - - Generate a new visibility AABB, using mesh AABB and instance transforms. Since instance information is stored in the [VisualServer], this function is VERY SLOW and must NOT be used often. - - - - - - - - - Node that instances a [MultiMesh]. - - - MultiMeshInstance is a [Node] that takes a [MultiMesh] resource and adds it to the current [Scenario] by creating an instance of it (yes, this is an instance of instances). - - - - - - - Set the [MultiMesh] to be instance. - - - - - - - Return the [MultiMesh] that is used for instancing. - - - - - - - - - Base class for all the "Scene" elements. - - - Nodes can be set as children of other nodes, resulting in a tree arrangement. Any tree of nodes is called a "Scene".[html br/] Scenes can be saved to disk, and then instanced into other scenes. This allows for very high flexibility in the architecture and data model of the projects. Scenes become "active" and part of the "Scene Tree" once they are added as children of a [RootNode].[html br/][html br/] As an illustrative example, a Scene (tree of nodes): [html div align="center"][html img src="images/scene.png"/][html /div] This scene will was edited separatedly, then is added as part of a game (by instancing it), becoming part of a "Scene Tree": [html div align="center"][html img src="images/scene_tree.png"/][html /div] In short, nodes are an effective all-in-one way to create and organize assets, gameplay and game data. When a Node is freed (deleted), it will delete all its children nodes. TODO: explain better process/signal/group call ordering - - - - - - - Set the name of the [Node]. Name must be unique within parent, and setting an already existing name will cause for the node to be automatically renamed. - - - - - - - Return the name of the [Node]. Name is be unique within parent. - - - - - - - Add a child [Node]. Nodes can have as many children as they want, but every child must have a unique name. Children nodes are automatically deleted when the parent node is deleted, so deleting a whole scene is performed by deleting its topmost node. - - - - - - - Remove a child [Node]. Node is NOT deleted and will have to be deleted manually. - - - - - - - Return the amount of children nodes. - - - - - - - - - Return a children node by it's index (see [method get_child_count]). This method is often used for iterating all children of a node. - - - - - - - - - - - - - - - - - Fetch a node. "path" must be valid (or else error will occur) and can be either the name of a child node, a relative path (from the current node to another node), or an absolute path to a node.[html br/] Examples ofa paths are: get_node("Sword") , get_node("../Swamp/Alligator") , get_node("/MyGame"). [html br/]Note: fetching absolute paths only works when the node is inside the scene tree (see [method is_inside_tree]). - - - - - - - Return the parent [Node] of the current [Node], or an empty Object if the node lacks a parent. - - - - - - - - - - - - - - - Return [html i]true[html /i] if the "node" argument is a direct or indirect child of the current node, otherwise return [html i]false[html /i]. - - - - - - - - - Return [html i]true[html /i] if "node" occurs later in the scene hierarchy than the current node, otherwise return [html i]false[html /i]. - - - - - - - Return the absolute path of the current node. This only works if the curent node is inside the scene tree (see [method is_inside_tree]). - - - - - - - - - Return the relative path from the current node to the specified node in "node" argument. Both nodes must be in the same scene, or else the function will fail. - - - - - - - - - Add a node to a group. Groups are helpers to name and organize group of nodes, like for example: "Enemies" "Collectables", etc. A [Node] can be in any number of groups. Nodes can be assigned a group at any time, but will not be added to it until they are inside the scene tree (see [method is_inside_tree]). - - - - - - - Remove a node from a group. - - - - - - - - - Move a child node to a different position (order) amongst the other children. Since calls, signals, etc are performed by tree order, changing the order of chilren nodes may be useful. - - - - - Move this node to the top of the array of nodes of the parent node. This is often useful on GUIs ([Control]), because their order of drawing fully depends on their order in the tree. - - - - - - - Set the node owner. A node can have any other node as owner (as long as a valid parent, grandparent, etc ascending in the tree). When saving a node (using SceneSaver) all the nodes it owns will be saved with it. This allows to create complex SceneTrees, with instancing and subinstancing. - - - - - - - Get the node owner (see [method set_node_owner]). - - - - - Remove a node and set all its children as childrens of the parent node (if exists). All even subscriptions that pass by the removed node will be unsubscribed. - - - - - - - Get the node index in the parent (assuming it has a parent). - - - - - Print the screne to stdout. Used mainly for debugging purposes. - - - - - - - A node can contain a filename. This filename should not be changed by the user, unless writing editors and tools. When a scene is instanced from a file, it topmost node contains the filename from where it was loaded. - - - - - - - Return a filename that may be containedA node can contained by the node. When a scene is instanced from a file, it topmost node contains the filename from where it was loaded (see [method set_filename]). - - - - - - - Notify the current node and all its chldren recursively by calling notification() in all of them. - - - - - - - Enables or disables node processing. When a node is being processed, it will receive a NOTIFICATION_PROCESS on every frame. It is common to check how much time was elapsed since the previous frame by calling [method get_process_time]. If the application is set to run at 60 fps, NOTIFICATION_PROCESS will be received 60 times per second (even if the visuals are running at faster or lower fps). Because of this, nodes that wish to do processing are recommended to use [method set_idle_process] instead, unless strong syncronization is requiered (for example, to modify the behavior of physics objects). - - - - - - - Return the amount of time elapsed (in seconds) between two succesive NOTIFICATION_PROCESS notifications. - - - - - - - Return wether processing is enabled in the current node. - - - - - - - Enables or disables node idle processing. When a node is being idle-processed, it will receive a NOTIFICATION_IDLE_PROCESS when idle. It is common to check how much time was elapsed since the previous idle time by calling [method get_idle_process_time]. Idle processing is commonly syncronized to [VisualServer] being done rendering a frame, so this type of processing is syncronized to the visible frames per second. To syncronize with the desired frames per second, see [method set_process] instead. - - - - - - - Return the amount of time elapsed (in seconds) between two succesive NOTIFICATION_IDLE_PROCESS notifications. - - - - - - - Return wether idle processing is enabled in the current node. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Return a duplicate of the scene, with all nodes and parameters copied. Subscriptions will not be duplicated. - - - - - - - - - Replace a node in a scene by a given one. Subscriptions that pass through this node will be lost. - - - - - - - - - - - - - - - - - - - - - - - - Notification received when a node is unparented (parent removed it from the list of children). - - - - - Notification received every frame when the process flag is set (see [method set_process]). - - - - - - - - - - - - - Notification received when a node is set as a child of another node. Note that this doesn't mean that a node entered the Scene Tree. - - - - - Notification received every time the application enters idle when the idle process flag is set (see [method set_process]). - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - OmniDirectional Light, such as a lightbulb or a candle. - - - An OmniDirectional light is a type of [Light] node that emits lights in all directions. The light is attenuated through the distance and this attenuation can be configured by changing the energy, radius and attenuation parameters of [Light]. TODO: Image of an omnilight. - - - - - - - - - Button control that provides selectable options when pressed. - - - OptionButton is a type button that provides a selectable list of items when pressed. The item selected becomes the "current" item and is displayed as the button text. - - - - - - - - - Add an item, with text "label" and (optionally) id. If no "id" is passed, "id" becomes the item index. New items are appended at the end. - - - - - - - - - - - Add an item, with a "texture" icon, text "label" and (optionally) id. If no "id" is passed, "id" becomes the item index. New items are appended at the end. - - - - - - - - - Set the text of an item at index "idx". - - - - - - - - - Set the icon of an item at index "idx". - - - - - - - - - - - - - - - - - Set the ID of an item at index "idx". - - - - - - - - - - - - - - - - - Return the text of the item at index "idx". - - - - - - - - - Return the icon of the item at index "idx". - - - - - - - - - Return the ID of the item at index "idx". - - - - - - - - - - - - - - - - - - - - - Return the amount of items in the OptionButton. - - - - - Add a separator to the list of items. Separators help to group items. Separator also takes up an index and is appended at the end. - - - - - Clear all the items in the [OptionButton]. - - - - - - - Select an item by index and make it the current item. - - - - - - - Return the current item index - - - - - - - - - - - - - - - - - - - This signal is emitted when the current item was changed by the user. ID of the item selected is passed as argument (if no IDs were added, ID will be just the item index). - - - - - - - - - Abstraction and base class for packet-based protocols. - - - PacketPeer is an abstration and base class for packet-based protocols (such as UDP). It provides an API for sending and receiving packets both as raw data or variables. This makes it easy to transfer data over a protocol, without having to encode data as low level bytes or having to worry about network ordering. - - - - - - - - - Wrapper to use a PacketPeer over a StreamPeer. - - - PacketStreamPeer provides a wrapper for working using packets over a stream. This allows for using packet based code with StreamPeers. PacketPeerStream implements a custom protocol over the StreamPeer, so the user should not read or write to the wrapped StreamPeer directly. - - - - - - - Set the StreamPeer object to be wrapped - - - - - - - - - Provides an opaque background for [Control] children. - - - Panel is a [Control] that displays an opaque background. It's commoly used as a parent and container for other types of [Control] nodes. [html div align="center"][html img src="images/panel_example.png"/][html /div] - - - - - - - - - Particle system 3D Node - - - Particles is a particle system 3D [Node] that is used to simulate several types of particle effects, such as explosions, rain, snow, fireflies, or other magical-like shinny sparkles. Particles are drawn using impostors, and given their dynamic behavior, the user must provide a visibility AABB (although helpers to create one automatically exist). - - - - - - - Set total amount of particles in the system. - - - - - - - Return the total amount of particles in the system. - - - - - - - Set the "emitting" property state. When emitting, the particle system generates new particles at constant rate. - - - - - - - Return the "emitting" property state (see [method set_emitting]). - - - - - - - Set the visibility AABB for the particle system, since the default one will not work properly most of the time. - - - - - - - Return the current visibility AABB. - - - - - - - Set the half extents for the emission box. - - - - - - - Return the half extents for the emission box. - - - - - - - - - - - - - - - - - - - Set the normal vector towards where gravity is pulling (by default, negative Y). - - - - - - - Return the normal vector towards where gravity is pulling (by default, negative Y). - - - - - - - - - Set a specific variable for the particle system (see VAR_* enum). - - - - - - - - - Return a specific variable for the particle system (see VAR_* enum). - - - - - - - - - Set the randomness for a specific variable of the particle system. Randomness produces small changes from the default each time a particle is emitted. - - - - - - - - - Return the randomness for a specific variable of the particle system. Randomness produces small changes from the default each time a particle is emitted. - - - - - - - - - Set the position of a color phase (0 to 1) - - - - - - - - - Return the position of a color phase (0 to 1) - - - - - - - - - Set the color of a color phase. - - - - - - - - - Return the color of a color phase. - - - - - - - Set the material used to draw particles - - - - - - - Return the material used to draw particles - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Base class for differnt types of Physics bodies. - - - PhysicsBody is an abstract base class for implementing a physics body. All PhysicsBody types inherit from it. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Base container control for popups and dialogs. - - - PopUp is a base [Control] used to show dialogs and popups. It's a subwindow and modal by default (see [Control]) and has helpers for custom popup behavior. - - - - - - - Popup (show the control in modal form) in the center of the screen, at the curent size, or at a size determined by "size". - - - - - - - Popup (show the control in modal form) in the center of the screen, scalled at a ratio of size of the screen. - - - - - Popup (show the control in modal form). - - - - - - - - - - - - - - - - - - - This signal is emitted when a popup is about to be shown. (often used in [PopupMenu] for clearing the list of options and creating a new one according to the current context). - - - - - - - - - - - - - - - - - - - PopupMenu displays a list of options. - - - PopupMenu is the typical Control that displays a list of options. They are popular in toolbars or context menus. - - - - - - - - - - - - - Add a new item with text "label" and icon "texture. An id can optonally be provided, as well as an accelerator. If no id is provided, one will be created from the index. - - - - - - - - - - - Add a new item with text "label". An id can optonally be provided, as well as an accelerator. If no id is provided, one will be created from the index. - - - - - - - - - - - - - Add a new checkable item with text "label" and icon "texture. An id can optonally be provided, as well as an accelerator. If no id is provided, one will be created from the index. Note that checkable items just display a checkmark, but don't have any built-in checking behavior and must be checked/unchecked manually. - - - - - - - - - - - Add a new checkable item with text "label". An id can optonally be provided, as well as an accelerator. If no id is provided, one will be created from the index. Note that checkable items just display a checkmark, but don't have any built-in checking behavior and must be checked/unchecked manually. - - - - - - - - - Set the text of the item at index "idx". - - - - - - - - - Set the icon of the item at index "idx". - - - - - - - - - Set the accelerator of the item at index "idx". Accelerators are special combinations of keys that activate the item, no matter which control is fucused. - - - - - - - - - - - - - - - - - Set the checkstate status of the item at index "idx". - - - - - - - - - - - - - - - - - Set the id of the item at index "idx". - - - - - - - - - Return the text of the item at index "idx". - - - - - - - - - Return the icon of the item at index "idx". - - - - - - - - - - - - - - - Return the accelerator of the item at index "idx". Accelerators are special combinations of keys that activate the item, no matter which control is fucused. - - - - - - - - - Return the checkstate status of the item at index "idx". - - - - - - - - - - - - - - - - - Return the id of the item at index "idx". - - - - - - - - - Find and return the index of the item containing a given id. - - - - - - - Return the amount of items. - - - - - Add a separator between items. Separators also occupy an index. - - - - - Clear the popup menu. - - - - - - - - - This even is emitted when an item is pressed or its accelerator is activated. The id of the item is returned if it exists, else the index. - - - - - - - - - - - - - - - - - - - Portals provide virtual openings to rooms. - - - Portals provide virtual openings to [RoomInstance] nodes, so cameras can look at them from the outside. Note that portals are a visibility optimization technique, and are in no way related to the game of the same name (as in, they are not used for teleportation). For more information on how rooms and portals work, see [RoomInstance]. Portals are represented as 2D convex polygon shapes (in the X,Y local plane), and are placed on the surface of the areas occupied by a [RoomInstance], to indicate that the room can be accessed or looked-at through them. If two rooms are next to each other, and two similar portals in each of them share the same world position (and are parallel and opposed to each other), they will automatically "connect" and form "doors" (for example, the portals that connect a kitchen to a living room are placed in the door they share). Portals must always have a [RoomInstance] node as a parent, grandparent or far parent, or else they will not be active. - - - - - - - Set the portal shape. The shape is an array of [Point2] points, representing a convex polygon in the X,Y plane. - - - - - - - Return the portal shape. The shape is an array of [Point2] points, representing a convex polygon in the X,Y plane. - - - - - - - Enable the portal (it is enabled by defaul though), disabling it will cause the parent [RoomInstance] to not be visible any longer when looking through the portal. - - - - - - - Return wether the portal is active. When disabled it causes the parent [RoomInstance] to not be visible any longer when looking through the portal. - - - - - - - Set the distance threshold for disabling the portal. Every time that the portal goes beyond "distance", it disables itself, becoming the opaque color (see [method set_disabled_color]). - - - - - - - Return the distance threshold for disabling the portal. Every time that the portal goes beyond "distance", it disables itself, becoming the opaque color (see [method set_disabled_color]). - - - - - - - When the portal goes beyond the disable distance (see [method set_disable_distance]), it becomes opaque and displayed with color "color". - - - - - - - Return the color for when the portal goes beyond the disable distance (see [method set_disable_distance]) and becomes disabled. - - - - - - - Set the range for auto-connecting two portals from different rooms sharing the same space. - - - - - - - Return the range for auto-connecting two portals from different rooms sharing the same space. - - - - - - - - - Abstract base class for range-based controls. - - - Range is a base class for [Control] nodes that change a floating point [html i]value[html /i] between a need a [html i]minimum[html /i], [html i]maximum[html /i], using [html i]step[html /i] and [html i]page[html /i], for example a [ScrollBar]. - - - - - - - Return the current value. - - - - - - - Return the minimum value. - - - - - - - Return the maximum value. - - - - - - - Return the stepping, if step is 0, stepping is disabled. - - - - - - - Return the page size, if page is 0, paging is disabled. - - - - - - - Return value mapped to 0 to 1 (unit) range. - - - - - - - - - - - - - Set minimum value, clamped range value to it if it's less. - - - - - - - - - - - - - Set step value. If step is 0, stepping will be disabled. - - - - - - - Set page size. Page is mainly used for scrollbars or anything that controls text scrolling. - - - - - - - Set value mapped to 0 to 1 (unit) range, it will then be converted to the actual value within min and max. - - - - - - - - - - - - - - - - - - - This signal is emitted when value changes. - - - - - This signal is emitted when min, max, range or step change. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Base class for all resources. - - - Resource is the base class for all resource types. Resources are primarily data containers. They are reference counted and freed when no longer in use. They are also loaded only once from disk, and further attempts to load the resource will return the same reference (all this in contrast to a [Node], which is not reference counted and can be instanced from disk as many times as desred). Resources can be saved externally on disk or bundled into another object, such as a [Node] or another resource. - - - - - - - Set the path of the resource. This is useful mainly for editors when saving/loading, and shouldn't be changed by anything else. - - - - - - - Return the path of the resource. This is useful mainly for editors when saving/loading, and shouldn't be changed by anything else. - - - - - - - Set the name of the resources, any name is ok (it doesn't have to be unique). Name is for descriptive purposes only. - - - - - - - Return the name of the resources, any name is ok (it doesn't have to be unique). Name is for descriptive purposes only. - - - - - - - Return the RID of the resource (or an empty RID). Many resources (such as [Texture], [Mesh], etc) are high level abstractions of resources stored in a server, so this function will return the original RID. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Room data resource. - - - Room contains the data to define the bounds of a scene (using a BSP Tree). It is instanced by a [RoomInstance] node to create rooms. See that class documentation for more information about rooms. - - - - - - - Set the bounds of the room as a BSP tree. a BSP Tree is defined a Dictionary: (TODO - see source code on how to create a BSP tree from a dictionary). - - - - - - - Return the bounds of the room as a BSP tree. a BSP Tree is defined a Dictionary: (TODO - see source code on how to create a BSP tree from a dictionary). - - - - - - - Set the "geometry" hint of the room. This means, how the room actually looks (an array of [Vector3]s, forming triangles). - - - - - - - Return the "geometry" hint of the room. This means, how the room actually looks (an array of [Vector3]s, forming triangles). - - - - - - - - - Node that instances a Room. - - - RoomInstance is a [Node] that instances a [Room] resource and places it on the world. Rooms are used for defining the areas taken up by [html i]interiors[html /i]. An [html i]interior[html /i] is any closed space that has an entrance/exit (or not) to the outside world, for example the inside of a house, a room in a house, a cave.[html br/]So why is this used? Rooms and Portals ([Portal]) are a common visualization optimization technique, it is used to make interiors invisible (not rendered) when the camera is at the exterior (such as an open field), and also the exterior invisible when inside an interior (such as a house). It is also used to make interior rooms invisible from other interior rooms. [html div align="center"][html img src="images/portals_example.png"/][html /div] - - - - - - - Set the [Room] resource, containing the room bounds. - - - - - - - Return the [Room] resource, containing the room bounds. - - - - - This helper function computes a [Room] from the shapes of all the children [VisualInstance] nodes, and sets it to the node. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Audio Sample (sound) class. - - - Sample provides an audio sample class, containing audio data, together with some information for playback, such as format, mix rate and loop. It is used by sound playback routines. - - - - - - - - - - - Create new data for the sample, with format "format" (see FORMAT_* enum), stereo hint, and length in frames (not samples or bytes!) "frame". Calling create overrides previous existing data if it exists. Stereo samples are interleaved pairs of left and right (in that order) points - - - - - - - Return the sample format (see FORMAT_* enum). - - - - - - - Return true if the sample was created stereo. - - - - - - - Return the sample length in frames. - - - - - - - Set sample data. Data must be little endian, no matter the host platform, and exactly as long to fit all frames. Example, if data is Stereo, 16 bits, 256 frames, it will be 1024 bytes long. - - - - - - - Return sample data. Data will be endian, no matter with the host platform, and exactly as long to fit all frames. Example, if data is Stereo, 16 bits, 256 frames, it will be 1024 bytes long. - - - - - - - Set the mix rate for the sample (expected playback frequency). - - - - - - - Return the mix rate for the sample (expected playback frequency). - - - - - - - Set the loop format, see LOOP_* enum - - - - - - - Return the loop format, see LOOP_* enum. - - - - - - - Set the loop begin position, it must be a valid frame and less than the loop end position. - - - - - - - Return the loop begin position. - - - - - - - Set the loop end position, it must be a valid frame and greater than the loop begin position. - - - - - - - Return the loop begin position. - - - - - - Ima-ADPCM Audio. - - - Forward looping (when playback reaches loop end, goes back to loop begin) - - - 16-Bits signed little endian PCM audio. - - - 8-Bits signed little endian PCM audio. - - - No loop enabled. - - - Ping-Pong looping (when playback reaches loop end, plays backward untilloop begin). Not available in all platforms. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Sample Player node. - - - SamplePlayer is a [Node] meant for simple sample playback. A library of samples is loaded and played back "as is", without positioning or anything. - - - - - - - - - - - - - - - - - - - Set the amount of simultaneous voices that will be used for playback. - - - - - - - Return the amount of simultaneous voices that will be used for playback. - - - - - - - - - - - Play back sample, given it's identifier "name". if "unique" is true, all othere previous samples will be stopped. The voice allocated for playback will be returned. - - - - - - - Stop a voice "voice". (see [method play]). - - - - - - - - - - - - - Change the mix rate of a voice "voice" to given "hz". - - - - - - - - - Scale the pitch (mix rate) of a voice by a ratio value "ratio". A ratio of 1.0 means the voice is unscaled. - - - - - - - - - Set the volume of a voice, 0db is maximum volume (every about -6db, volume is reduced in half). "db" does in fact go from zero to negative. - - - - - - - - - - - - - - - - - - - - - Set the panning of a voice. Panning goes from -1 (left) to +1 (right). Optionally, if the hardware supports 3D sound, also set depth and height (also in range -1 to +1). - - - - - - - - - - - - - - - Set and enable a filter of a voice, with type "type" (see FILTER_* enum), cutoff (0 to 22khz) frequency and resonance (0+). - - - - - - - - - Set the chorus send level of a voice (0 to 1). For setting chorus parameters, see [AudioServer]. - - - - - - - - - - - Set the reverb send level and type of a voice (0 to 1). (see REVERB_* enum for type). - - - - - - - - - Return the current mix rate for a given voice. - - - - - - - - - Return the current pitch scale for a given voice. - - - - - - - - - Return the current volume (in db) for a given voice. 0db is maximum volume (every about -6db, volume is reduced in half). "db" does in fact go from zero to negative. - - - - - - - - - - - - - - - - - Return the current panning for a given voice. Panning goes from -1 (left) to +1 (right). - - - - - - - - - Return the current pan depth for a given voice (not used unless the hardware supports 3D sound) - - - - - - - - - Return the current pan height for a given voice (not used unless the hardware supports 3D sound) - - - - - - - - - Return the current filter type in use (see FILTER_* enum) for a given voice. - - - - - - - - - Return the current filter cutoff for a given voice. Cutoff goes from 0 to 22khz. - - - - - - - - - Return the current filter resonance for a given voice. Resonance goes from 0 up. - - - - - - - - - - - - - - - - - Return the current chorus send level for a given voice. (0 to 1). - - - - - - - - - Return the current reverb room type for a given voice (see REVERB_* enum). - - - - - - - - - Return the current reverb send level for a given voice. (0 to 1). - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - HighPass filter is used for voice. - - - Filter is disabled for voice. - - - Huge reverb room (cathedral, warehouse). - - - Medium reverb room (street) - - - Small reverb room (house room). - - - - - - - Lowpass filter is used for voice. - - - Large reverb room (Theather) - - - - - Band-Limit filter is used for voice, in this case resonance is the highpass cutoff. - - - Notch filter is used for voice. - - - Bandpass filter is used for voice. - - - - - - - - Deprecated, will go away. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Base class for scroll bars. - - - Scrollbars are a [Range] based [Control], that display a draggable area (the size of the page). Horizontal ([HScrollBar]) and Vertical ([VScrollBar]) versions are available. - - - - - - - - - Base class for separators. - - - Separator is a [Control] used for sepataring other controls. It's purely a visual decoration. Horizontal ([HSeparator]) and Vertical ([VSeparator]) versions are available. - - - - - - - - - To be changed, ignore. - - - To be changed, ignore. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Skeleton for characters and animated objects. - - - Skeleton provides a hierachial interface for managing bones, including pose, rest and animation (see [Animation]). Skeleton will support rag doll dynamics in the future. - - - - - - - Add a bone, with name "name". [method get_bone_count] will become the bone index. - - - - - - - - - Return the bone index that matches "name" as its name. - - - - - - - - - Return the name of the bone at index "index" - - - - - - - - - Return the bone index which is the parent of the bone at "bone_idx". If -1, then bone has no parent. Note that the parent bone returned will always be less than "bone_idx". - - - - - - - - - Set the bone index "parent_idx" as the parent of the bone at "bone_idx". If -1, then bone has no parent. Note: "parent_idx" must be less than "bone_idx". - - - - - - - Return the amount of bones in the skeleton. - - - - - - - - - Return the rest transform for a bone "bone_idx". - - - - - - - - - Set the rest transform for bone "bone_idx" - - - - - - - - - Deprecated soon - - - - - - - - - Deprecated soon - - - - - - - - - Deprecated Soon - - - - - Clear all the bones in this skeleton. - - - - - - - - - Return the pose transform for bone "bone_idx". - - - - - - - - - Return the pose transform for bone "bone_idx". - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Base class for all 3D nodes. - - - Spatial is the base for every type of 3D [Node]. It contains a 3D [Transform] which can be set or get as local or global. If a Spatial [Node] has Spatial children, their transforms will be relative to the parent. - - - - - - - Set the transform locally, relative to the parent spatial node. - - - - - - - Return the local transform, relative to the bone parent. - - - - - - - Set the transform globally, relative to worldspace. - - - - - - - Return the gloal transform, relative to worldspace. - - - - - - - Return the parent [Spatial], or an empty [Object] if no parent exists or parent is not of type [Spatial. - - - - - - - - - - Spatial nodes receive this notification when the viewport next to it in ascending hierarchy changed the [Scenario]. - - - Spatial nodes receive this notifacation with their global transform changes. This means that either the current or a parent node changed it's transform. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Spotlight Light, such as a reflector spotlight or a latern. - - - A SpotLight light is a type of [Light] node that emits lights in a specific direction, in the shape of a cone. The light is attenuated through the distance and this attenuation can be configured by changing the energy, radius and attenuation parameters of [Light]. TODO: Image of a spotlight. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Squirrel script language support. - - - [html a href="http://squirrel-lang.org/"]Squirrel Language[html /a] support for the engine. Allows to load a [Script] from a .sq or .nut source or compiled file, or bundled it into scenes. - - - - - - - - - PhysicsBody for static collision objects. - - - StaticBody implements a static collision [Node], by utilizing a rigid body in the [PhysicsServer]. Static bodies are used for static collision. For more information on physics body nodes, see [PhysicsBody]. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Abstraction and base class for stream-based protocols. - - - StreamPeer is an abstration and base class for stream-based protocols (such as TCP or Unix Sockets). It provides an API for sending and receiving data through streams as raw data or strings. - - - - - - - - - Send a chunk of data through the connection, blocking if necesary until the data is done sending. This function returns an [Error] code. - - - - - - - - - Send a chunk of data through the connection, if all the data could not be sent at once, only part of it will. This function returns two values, an [Error] code and an integer, describing how much data was actually sent. - - - - - - - - - Return a chunk data with the received bytes. The amount of bytes to be received can be requested in the "bytes" argument. If not enough bytes are available, the function will block until the desired amount is received. This function returns two values, an [Error] code and a data array. - - - - - - - - - Return a chunk data with the received bytes. The amount of bytes to be received can be requested in the "bytes" argument. If not enough bytes are available, the function will return how many were actually received. This function returns two values, an [Error] code, and a data array. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Base class for dawing stylized boxes for the UI. - - - StyleBox is [Resource] that provides an abstract base class for dawing stylized boxes for the UI. StyleBoxes are used for dawing the styles of buttons, line edit backgrounds, tree backgrounds, etc. and also for testing a transparency mask for pointer signals. If mask test fails on a StyleBox assigned as mask to a control, clicks and motion signals will go through it to the one below. - - - - - - - - - - - Test a position in a rectangle, return wether it pases the mask test. - - - - - - - - - Set the default offset "offset" of the margin "margin" (see MARGIN_* enum) for a StyleBox, Controls that draw styleboxes with context inside need to know the margin, so the border of the stylebox is not occluded. - - - - - - - - - Return the default offset of the margin "margin" (see MARGIN_* enum) of a StyleBox, Controls that draw styleboxes with context inside need to know the margin, so the border of the stylebox is not occluded. - - - - - - - - - Return the offset of margin "margin" (see MARGIN_* enum). - - - - - - - Return the minimum size that this stylebox can be shrunk to. - - - - - - - Return the "offset" of a stylebox, this is a helper function, like writing Point2( style.get_margin(MARGIN_LEFT), style.get_margin(MARGIN_TOP) ) - - - - - - - - - Empty stylebox (does not display anything). - - - Empty stylebox (really does not display anything). - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Image mask based StyleBox, for mask test. - - - This StyleBox is similar to [StyleBoxTexture], but only meant to be used for mask testing. It takes an image and applies stretch rules to determine if the poit clicked is masked or not. - - - - - - - Set the image used for mask testing. Pixels (converted to grey) that have a value, less than 0.5 will fail the test. - - - - - - - Return the image used for mask testing. (see [method set_imag]). - - - - - - - Set the expand property (default). When expanding, the image will use the same rules as [StyleBoxTexture] for expand. If not expanding, the image will always be tested at its original size. - - - - - - - Return wether the expand property is set(default). When expanding, the image will use the same rules as [StyleBoxTexture] for expand. If not expanding, the image will always be tested at its original size. - - - - - - - - - Set an expand margin size (from enum MARGIN_*). Parts of the image below the size of the margin (and in the direction of the margin) will not expand. - - - - - - - - - Return the expand margin size (from enum MARGIN_*). Parts of the image below the size of the margin (and in the direction of the margin) will not expand. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Vertical version of [ScrollBar], which goes from left (min) to right (max). - - - - - - - - - - - Vertical version of [Separator]. - - - Vertical version of [Separator]. It is used to separate objects horizontally, though (but it looks vertical!). - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tools/docdump/doc_merge.py b/tools/docdump/doc_merge.py deleted file mode 100644 index 872f38ed87..0000000000 --- a/tools/docdump/doc_merge.py +++ /dev/null @@ -1,208 +0,0 @@ -import sys -import xml.etree.ElementTree as ET - - -tree = ET.parse(sys.argv[1]) -old_doc=tree.getroot() - -tree = ET.parse(sys.argv[2]) -new_doc=tree.getroot() - -f = file(sys.argv[3],"wb") -tab=0 - -old_classes={} - -def write_string(_f, text,newline=True): - for t in range(tab): - _f.write("\t") - _f.write(text) - if (newline): - _f.write("\n") - -def escape(ret): - ret=ret.replace("&","&"); - ret=ret.replace("<",">"); - ret=ret.replace(">","<"); - ret=ret.replace("'","'"); - ret=ret.replace("\"","""); - return ret - - -def inc_tab(): - global tab - tab+=1 - -def dec_tab(): - global tab - tab-=1 - -write_string(f,'') -write_string(f,'') - -def get_tag(node,name): - tag="" - if (name in node.attrib): - tag=' '+name+'="'+escape(node.attrib[name])+'" ' - return tag - -def find_method_descr(old_class,name): - - methods = old_class.find("methods") - if(methods!=None and len(list(methods))>0): - for m in list(methods): - if (m.attrib["name"]==name): - description=m.find("description") - if (description!=None and description.text.strip()!=""): - return description.text - - return None - -def find_signal_descr(old_class,name): - - signals = old_class.find("signals") - if(signals!=None and len(list(signals))>0): - for m in list(signals): - if (m.attrib["name"]==name): - description=m.find("description") - if (description!=None and description.text.strip()!=""): - return description.text - - return None - -def find_constant_descr(old_class,name): - - if (old_class==None): - return None - constants = old_class.find("constants") - if(constants!=None and len(list(constants))>0): - for m in list(constants): - if (m.attrib["name"]==name): - if (m.text.strip()!=""): - return m.text - return None - -def write_class(c): - class_name = c.attrib["name"] - print("Parsing Class: "+class_name) - if (class_name in old_classes): - old_class=old_classes[class_name] - else: - old_class=None - - - category=get_tag(c,"category") - inherits=get_tag(c,"inherits") - write_string(f,'') - inc_tab() - - write_string(f,"") - - if (old_class!=None): - old_brief_descr=old_class.find("brief_description") - if (old_brief_descr!=None): - write_string(f,escape(old_brief_descr.text.strip())) - - - write_string(f,"") - - write_string(f,"") - if (old_class!=None): - old_descr=old_class.find("description") - if (old_descr!=None): - write_string(f,escape(old_descr.text.strip())) - - write_string(f,"") - - methods = c.find("methods") - if(methods!=None and len(list(methods))>0): - - write_string(f,"") - inc_tab() - - for m in list(methods): - qualifiers=get_tag(m,"qualifiers") - - write_string(f,'') - inc_tab() - - for a in list(m): - if (a.tag=="return"): - typ=get_tag(a,"type") - write_string(f,''); - write_string(f,''); - elif (a.tag=="argument"): - - default=get_tag(a,"default") - - write_string(f,''); - write_string(f,''); - - write_string(f,''); - if (old_class!=None): - old_method_descr=find_method_descr(old_class,m.attrib["name"]) - if (old_method_descr): - write_string(f,escape(escape(old_method_descr.strip()))) - - write_string(f,''); - dec_tab() - write_string(f,"") - dec_tab() - write_string(f,"") - - signals = c.find("signals") - if(signals!=None and len(list(signals))>0): - - write_string(f,"") - inc_tab() - - for m in list(signals): - - write_string(f,'') - inc_tab() - - for a in list(m): - if (a.tag=="argument"): - - write_string(f,''); - write_string(f,''); - - write_string(f,''); - if (old_class!=None): - old_signal_descr=find_signal_descr(old_class,m.attrib["name"]) - if (old_signal_descr): - write_string(f,escape(old_signal_descr.strip())) - write_string(f,''); - dec_tab() - write_string(f,"") - dec_tab() - write_string(f,"") - - constants = c.find("constants") - if(constants!=None and len(list(constants))>0): - - write_string(f,"") - inc_tab() - - for m in list(constants): - - write_string(f,'') - old_constant_descr=find_constant_descr(old_class,m.attrib["name"]) - if (old_constant_descr): - write_string(f,escape(old_constant_descr.strip())) - write_string(f,"") - - dec_tab() - write_string(f,"") - - dec_tab() - write_string(f,"") - -for c in list(old_doc): - old_classes[c.attrib["name"]]=c - -for c in list(new_doc): - write_class(c) -write_string(f,'\n') - - diff --git a/tools/docdump/locales/es/LC_MESSAGES/makedocs.mo b/tools/docdump/locales/es/LC_MESSAGES/makedocs.mo deleted file mode 100644 index 8d7ea2689e..0000000000 Binary files a/tools/docdump/locales/es/LC_MESSAGES/makedocs.mo and /dev/null differ diff --git a/tools/docdump/locales/es/LC_MESSAGES/makedocs.po b/tools/docdump/locales/es/LC_MESSAGES/makedocs.po deleted file mode 100644 index 82115dd897..0000000000 --- a/tools/docdump/locales/es/LC_MESSAGES/makedocs.po +++ /dev/null @@ -1,142 +0,0 @@ -# Translations template for PROJECT. -# Copyright (C) 2015 ORGANIZATION -# This file is distributed under the same license as the PROJECT project. -# FIRST AUTHOR , 2015. -# -msgid "" -msgstr "" -"Project-Id-Version: makedocs\n" -"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" -"POT-Creation-Date: 2015-10-07 11:47-0600\n" -"PO-Revision-Date: 2015-10-07 13:10-0600\n" -"Last-Translator: Jorge Araya Navarro \n" -"Language-Team: \n" -"Language: es\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 2.0\n" -"X-Generator: Poedit 1.8.4\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" - -#: makedocs.py:74 -msgid "" -"\"{gclass}(Go to page of class {gclass})\":/class_{lkclass}" -msgstr "" -"\"{gclass}(Ir a la pagina de la clase {gclass})\":/" -"class_{lkclass}" - -#: makedocs.py:76 -msgid "" -"\"{gclass}.{method}(Go to page {gclass}, section {method})\":/" -"class_{lkclass}#{lkmethod}" -msgstr "" -"\"{gclass}.{method}(Ir a la pagina {gclass}, sección " -"{method})\":/class_{lkclass}#{lkmethod}" - -#: makedocs.py:79 -msgid "\"{method}(Jump to method {method})\":#{lkmethod}" -msgstr "\"{method}(Saltar al método {method})\":#{lkmethod}" - -#: makedocs.py:81 -msgid " \"{rtype}(Go to page of class {rtype})\":/class_{link} " -msgstr " \"{rtype}(Ir a la pagina de la clase {rtype})\":/class_{link} " - -#: makedocs.py:82 -msgid "" -"\"*{funcname}*(Jump to description for node {funcname})\":#{link} ( " -msgstr "" -"\"*{funcname}*(Saltar a la descripción para el nodo {funcname})\":#{link} " -"( " - -#: makedocs.py:87 -msgid "h4. Inherits: " -msgstr "h4. Hereda de: " - -#: makedocs.py:232 -msgid "'s version attribute missing" -msgstr "El atributo version de no existe" - -#: makedocs.py:246 -msgid "|_. Index symbol |_. Class name |_. Index symbol |_. Class name |\n" -msgstr "" -"|_. Índice de símbolo |_. Nombre de la clase |_. Índice de símbolo |_. " -"Nombre de la clase |\n" - -#: makedocs.py:305 -msgid "" -"h4. Category: {}\n" -"\n" -msgstr "" -"h4. Categoría: {}\n" -"\n" - -#: makedocs.py:310 -msgid "" -"h2. Brief Description\n" -"\n" -msgstr "" -"h2. Descripción breve\n" -"\n" - -#: makedocs.py:312 -msgid "" -"\"read more\":#more\n" -"\n" -msgstr "" -"\"Leer más\":#more\n" -"\n" - -#: makedocs.py:317 -msgid "" -"\n" -"h3. Member Functions\n" -"\n" -msgstr "" -"\n" -"h3. Funciones miembro\n" -"\n" - -#: makedocs.py:323 -msgid "" -"\n" -"h3. Signals\n" -"\n" -msgstr "" -"\n" -"h3. Señales\n" -"\n" - -#: makedocs.py:331 -msgid "" -"\n" -"h3. Numeric Constants\n" -"\n" -msgstr "" -"\n" -"h3. Constantes numéricas\n" -"\n" - -#: makedocs.py:347 -msgid "" -"\n" -"h3(#more). Description\n" -"\n" -msgstr "" -"\n" -"h3(#more). Descripción\n" -"\n" - -#: makedocs.py:351 -msgid "_Nothing here, yet..._\n" -msgstr "_Aún nada por aquí..._\n" - -#: makedocs.py:355 -msgid "" -"\n" -"h3. Member Function Description\n" -"\n" -msgstr "" -"\n" -"h3. Descripción de las funciones miembro\n" -"\n" diff --git a/tools/docdump/main.css b/tools/docdump/main.css deleted file mode 100644 index a76e6bbed8..0000000000 --- a/tools/docdump/main.css +++ /dev/null @@ -1,146 +0,0 @@ -BODY,H1,H2,H3,H4,H5,H6,P,CENTER,TD,TH,UL,DL,DIV, SPAN { - font-family: Arial, Geneva, Helvetica, sans-serif; -} - -a { - - text-decoration: none; - -} - -a:hover { - - text-decoration: underline; -} - -td.top_table { - - padding: 5px; -} - -div.method_doc { - - padding-bottom: 30px; -} - -div.method_description { - margin-left: 30px; -} - -list.inh_class_list { - margin-left: 30px; - -} - -div.inh_class_list { - margin-left: 30px; - -} - -div.method_doc div.method { - - font-size: 12pt; - font-weight: bold; -} - -span.funcdecl { - - color: #202060; -} - -span.funcdef { - - color: #202060; -} - - -span.qualifier { - - font-weight: bold; -} - - -span.symbol { - - /*font-weight: bold;*/ - color: #471870; -} - - -span.datatype { - - color: #6a1533; -} - -tr.category_title { - - background-color: #333333; -} -a.category_title { - font-weight: bold; - color: #FFFFFF; -} - -div.method_list { - - margin-left: 30px; -} - -div.constant_list { - - margin-left: 30px; -} - -div.member_list { - - margin-left: 30px; -} - -div.description { - - margin-left: 30px; -} - -div.class_description { - - margin-left: 30px; -} - -div.method_list li div { - - display: inline; -} - -div.member_list li div.member { - - display: inline; -} - -div.constant_list li div.constant { - - display: inline; -} - -span.member_description { - - font-style: italic; - color: grey; -} - -span.constant_description { - - font-style: italic; - color: grey; -} - -span.identifier { - - font-weight: bold; -} - - -table.class_table td { - - vertical-align: top; -} - diff --git a/tools/docdump/makedocs.pot b/tools/docdump/makedocs.pot deleted file mode 100644 index be3220f686..0000000000 --- a/tools/docdump/makedocs.pot +++ /dev/null @@ -1,108 +0,0 @@ -# Translations template for PROJECT. -# Copyright (C) 2015 ORGANIZATION -# This file is distributed under the same license as the PROJECT project. -# FIRST AUTHOR , 2015. -# -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: makedocs 0.1\n" -"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" -"POT-Creation-Date: 2015-10-07 11:47-0600\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME \n" -"Language-Team: \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 2.0\n" -"X-Generator: Poedit 1.8.4\n" - -#: makedocs.py:74 -msgid "\"{gclass}(Go to page of class {gclass})\":/class_{lkclass}" -msgstr "" - -#: makedocs.py:76 -msgid "\"{gclass}.{method}(Go to page {gclass}, section {method})\":/class_{lkclass}#{lkmethod}" -msgstr "" - -#: makedocs.py:79 -msgid "\"{method}(Jump to method {method})\":#{lkmethod}" -msgstr "" - -#: makedocs.py:81 -msgid " \"{rtype}(Go to page of class {rtype})\":/class_{link} " -msgstr "" - -#: makedocs.py:82 -msgid "\"*{funcname}*(Jump to description for node {funcname})\":#{link} ( " -msgstr "" - -#: makedocs.py:87 -msgid "h4. Inherits: " -msgstr "" - -#: makedocs.py:232 -msgid "'s version attribute missing" -msgstr "" - -#: makedocs.py:246 -msgid "|_. Index symbol |_. Class name |_. Index symbol |_. Class name |\n" -msgstr "" - -#: makedocs.py:305 -msgid "" -"h4. Category: {}\n" -"\n" -msgstr "" - -#: makedocs.py:310 -msgid "" -"h2. Brief Description\n" -"\n" -msgstr "" - -#: makedocs.py:312 -msgid "" -"\"read more\":#more\n" -"\n" -msgstr "" - -#: makedocs.py:317 -msgid "" -"\n" -"h3. Member Functions\n" -"\n" -msgstr "" - -#: makedocs.py:323 -msgid "" -"\n" -"h3. Signals\n" -"\n" -msgstr "" - -#: makedocs.py:331 -msgid "" -"\n" -"h3. Numeric Constants\n" -"\n" -msgstr "" - -#: makedocs.py:347 -msgid "" -"\n" -"h3(#more). Description\n" -"\n" -msgstr "" - -#: makedocs.py:351 -msgid "_Nothing here, yet..._\n" -msgstr "" - -#: makedocs.py:355 -msgid "" -"\n" -"h3. Member Function Description\n" -"\n" -msgstr "" diff --git a/tools/docdump/makedocs.py b/tools/docdump/makedocs.py deleted file mode 100644 index be57891abc..0000000000 --- a/tools/docdump/makedocs.py +++ /dev/null @@ -1,382 +0,0 @@ -#!/usr/bin/python3 -# -*- coding: utf-8 -*- - -# -# makedocs.py: Generate documentation for Open Project Wiki -# Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. -# Contributor: Jorge Araya Navarro -# - -# IMPORTANT NOTICE: -# If you are going to modify anything from this file, please be sure to follow -# the Style Guide for Python Code or often called "PEP8". To do this -# automagically just install autopep8: -# -# $ sudo pip3 install autopep8 -# -# and run: -# -# $ autopep8 makedocs.py -# -# Before committing your changes. Also be sure to delete any trailing -# whitespace you may left. -# -# TODO: -# * Refactor code. -# * Adapt this script for generating content in other markup formats like -# DokuWiki, Markdown, etc. -# -# Also check other TODO entries in this script for more information on what is -# left to do. -import argparse -import gettext -import logging -import re -from itertools import zip_longest -from os import path, listdir -from xml.etree import ElementTree - - -# add an option to change the verbosity -logging.basicConfig(level=logging.INFO) - - -def getxmlfloc(): - """ Returns the supposed location of the XML file - """ - filepath = path.dirname(path.abspath(__file__)) - return path.join(filepath, "class_list.xml") - - -def langavailable(): - """ Return a list of languages available for translation - """ - filepath = path.join( - path.dirname(path.abspath(__file__)), "locales") - files = listdir(filepath) - choices = [x for x in files] - choices.insert(0, "none") - return choices - - -desc = "Generates documentation from a XML file to different markup languages" - -parser = argparse.ArgumentParser(description=desc) -parser.add_argument("--input", dest="xmlfp", default=getxmlfloc(), - help="Input XML file, default: {}".format(getxmlfloc())) -parser.add_argument("--output-dir", dest="outputdir", required=True, - help="Output directory for generated files") -parser.add_argument("--language", choices=langavailable(), default="none", - help=("Choose the language of translation" - " for the output files. Default is English (none). " - "Note: This is NOT for the documentation itself!")) -# TODO: add an option for outputting different markup formats - -args = parser.parse_args() -# Let's check if the file and output directory exists -if not path.isfile(args.xmlfp): - logging.critical("File not found: {}".format(args.xmlfp)) - exit(1) -elif not path.isdir(args.outputdir): - logging.critical("Path does not exist: {}".format(args.outputdir)) - exit(1) - -_ = gettext.gettext -if args.language != "none": - lang = gettext.translation(domain="makedocs", - localedir="locales", - languages=[args.language]) - lang.install() - - _ = lang.gettext - -# Strings -C_LINK = _("\"{gclass}(Go to page of class" - " {gclass})\":/class_{lkclass}") -MC_LINK = _("\"{gclass}.{method}(Go " - "to page {gclass}, section {method})\"" - ":/class_{lkclass}#{lkmethod}") -TM_JUMP = _("\"{method}(Jump to method" - " {method})\":#{lkmethod}") -GTC_LINK = _(" \"{rtype}(Go to page of class {rtype})\":/class_{link} ") -DFN_JUMP = _("\"*{funcname}*(Jump to description for" - " node {funcname})\":#{link} ( ") -M_ARG_DEFAULT = C_LINK + " {name}={default}" -M_ARG = C_LINK + " {name}" - -OPENPROJ_INH = _("h4. Inherits: ") + C_LINK + "\n\n" - - -def tb(string): - """ Return a byte representation of a string - """ - return bytes(string, "UTF-8") - - -def sortkey(c): - """ Symbols are first, letters second - """ - if "_" == c.attrib["name"][0]: - return "A" - else: - return c.attrib["name"] - - -def toOP(text): - """ Convert commands in text to Open Project commands - """ - # TODO: Make this capture content between [command] ... [/command] - groups = re.finditer((r'\[html (?P/?\w+/?)(\]| |=)?(\]| |=)?(?P\w+)?(\]| |=)?(?P"[^"]+")?/?\]'), text) - alignstr = "" - for group in groups: - gd = group.groupdict() - if gd["command"] == "br/": - text = text.replace(group.group(0), "\n\n", 1) - elif gd["command"] == "div": - if gd["value"] == '"center"': - alignstr = ("{display:block; margin-left:auto;" - " margin-right:auto;}") - elif gd["value"] == '"left"': - alignstr = "<" - elif gd["value"] == '"right"': - alignstr = ">" - text = text.replace(group.group(0), "\n\n", 1) - elif gd["command"] == "/div": - alignstr = "" - text = text.replace(group.group(0), "\n\n", 1) - elif gd["command"] == "img": - text = text.replace(group.group(0), "!{align}{src}!".format( - align=alignstr, src=gd["value"].strip('"')), 1) - elif gd["command"] == "b" or gd["command"] == "/b": - text = text.replace(group.group(0), "*", 1) - elif gd["command"] == "i" or gd["command"] == "/i": - text = text.replace(group.group(0), "_", 1) - elif gd["command"] == "u" or gd["command"] == "/u": - text = text.replace(group.group(0), "+", 1) - # Process other non-html commands - groups = re.finditer((r'\[method ((?P[aA0-zZ9_]+)(?:\.))' - r'?(?P[aA0-zZ9_]+)\]'), text) - for group in groups: - gd = group.groupdict() - if gd["class"]: - replacewith = (MC_LINK.format(gclass=gd["class"], - method=gd["method"], - lkclass=gd["class"].lower(), - lkmethod=gd["method"].lower())) - else: - # The method is located in the same wiki page - replacewith = (TM_JUMP.format(method=gd["method"], - lkmethod=gd["method"].lower())) - - text = text.replace(group.group(0), replacewith, 1) - # Finally, [Classes] are around brackets, make them direct links - groups = re.finditer(r'\[(?P[az0-AZ0_]+)\]', text) - for group in groups: - gd = group.groupdict() - replacewith = (C_LINK. - format(gclass=gd["class"], - lkclass=gd["class"].lower())) - text = text.replace(group.group(0), replacewith, 1) - - return text + "\n\n" - - -def mkfn(node, is_signal=False): - """ Return a string containing a unsorted item for a function - """ - finalstr = "" - name = node.attrib["name"] - rtype = node.find("return") - if rtype: - rtype = rtype.attrib["type"] - else: - rtype = "void" - # write the return type and the function name first - finalstr += "* " - # return type - if not is_signal: - if rtype != "void": - finalstr += GTC_LINK.format( - rtype=rtype, - link=rtype.lower()) - else: - finalstr += " void " - - # function name - if not is_signal: - finalstr += DFN_JUMP.format( - funcname=name, - link=name.lower()) - else: - # Signals have no description - finalstr += "*{funcname}* (".format(funcname=name) - # loop for the arguments of the function, if any - args = [] - for arg in sorted( - node.iter(tag="argument"), - key=lambda a: int(a.attrib["index"])): - - ntype = arg.attrib["type"] - nname = arg.attrib["name"] - - if "default" in arg.attrib: - args.insert(-1, M_ARG_DEFAULT.format( - gclass=ntype, - lkclass=ntype.lower(), - name=nname, - default=arg.attrib["default"])) - else: - # No default value present - args.insert(-1, M_ARG.format(gclass=ntype, - lkclass=ntype.lower(), name=nname)) - # join the arguments together - finalstr += ", ".join(args) - # and, close the function with a ) - finalstr += " )" - # write the qualifier, if any - if "qualifiers" in node.attrib: - qualifier = node.attrib["qualifiers"] - finalstr += " " + qualifier - - finalstr += "\n" - - return finalstr - -# Let's begin -tree = ElementTree.parse(args.xmlfp) -root = tree.getroot() - -# Check version attribute exists in -if "version" not in root.attrib: - logging.critical(_("'s version attribute missing")) - exit(1) - -version = root.attrib["version"] -classes = sorted(root, key=sortkey) -# first column is always longer, second column of classes should be shorter -zclasses = zip_longest(classes[:int(len(classes) / 2 + 1)], - classes[int(len(classes) / 2 + 1):], - fillvalue="") - -# We write the class_list file and also each class file at once -with open(path.join(args.outputdir, "class_list.txt"), "wb") as fcl: - # Write header of table - fcl.write(tb("|^.\n")) - fcl.write(tb(_("|_. Index symbol |_. Class name " - "|_. Index symbol |_. Class name |\n"))) - fcl.write(tb("|-.\n")) - - indexletterl = "" - indexletterr = "" - for gdclassl, gdclassr in zclasses: - # write a row # - # write the index symbol column, left - if indexletterl != gdclassl.attrib["name"][0]: - indexletterl = gdclassl.attrib["name"][0] - fcl.write(tb("| *{}* |".format(indexletterl.upper()))) - else: - # empty cell - fcl.write(tb("| |")) - # write the class name column, left - fcl.write(tb(C_LINK.format( - gclass=gdclassl.attrib["name"], - lkclass=gdclassl.attrib["name"].lower()))) - - # write the index symbol column, right - if isinstance(gdclassr, ElementTree.Element): - if indexletterr != gdclassr.attrib["name"][0]: - indexletterr = gdclassr.attrib["name"][0] - fcl.write(tb("| *{}* |".format(indexletterr.upper()))) - else: - # empty cell - fcl.write(tb("| |")) - # We are dealing with an empty string - else: - # two empty cell - fcl.write(tb("| | |\n")) - # We won't get the name of the class since there is no ElementTree - # object for the right side of the tuple, so we iterate the next - # tuple instead - continue - - # write the class name column (if any), right - fcl.write(tb(C_LINK.format( - gclass=gdclassl.attrib["name"], - lkclass=gdclassl.attrib["name"].lower()) + "|\n")) - - # row written # - # now, let's write each class page for each class - for gdclass in [gdclassl, gdclassr]: - if not isinstance(gdclass, ElementTree.Element): - continue - - classname = gdclass.attrib["name"] - with open(path.join(args.outputdir, "{}.txt".format( - classname.lower())), "wb") as clsf: - # First level header with the name of the class - clsf.write(tb("h1. {}\n\n".format(classname))) - # lay the attributes - if "inherits" in gdclass.attrib: - inh = gdclass.attrib["inherits"].strip() - clsf.write(tb(OPENPROJ_INH.format(gclass=inh, - lkclass=inh.lower()))) - if "category" in gdclass.attrib: - clsf.write(tb(_("h4. Category: {}\n\n"). - format(gdclass.attrib["category"].strip()))) - # lay child nodes - briefd = gdclass.find("brief_description") - if briefd.text.strip(): - clsf.write(tb(_("h2. Brief Description\n\n"))) - clsf.write(tb(toOP(briefd.text.strip()) + - _("\"read more\":#more\n\n"))) - - # Write the list of member functions of this class - methods = gdclass.find("methods") - if methods and len(methods) > 0: - clsf.write(tb(_("\nh3. Member Functions\n\n"))) - for method in methods.iter(tag='method'): - clsf.write(tb(mkfn(method))) - - signals = gdclass.find("signals") - if signals and len(signals) > 0: - clsf.write(tb(_("\nh3. Signals\n\n"))) - for signal in signals.iter(tag='signal'): - clsf.write(tb(mkfn(signal, True))) - # TODO: tag is necessary to process? it does not - # exists in class_list.xml file. - - consts = gdclass.find("constants") - if consts and len(consts) > 0: - clsf.write(tb(_("\nh3. Numeric Constants\n\n"))) - for const in sorted(consts, key=lambda k: - k.attrib["name"]): - if const.text.strip(): - clsf.write(tb("* *{name}* = *{value}* - {desc}\n". - format( - name=const.attrib["name"], - value=const.attrib["value"], - desc=const.text.strip()))) - else: - # Constant have no description - clsf.write(tb("* *{name}* = *{value}*\n". - format( - name=const.attrib["name"], - value=const.attrib["value"]))) - descrip = gdclass.find("description") - clsf.write(tb(_("\nh3(#more). Description\n\n"))) - if descrip.text: - clsf.write(tb(descrip.text.strip() + "\n")) - else: - clsf.write(tb(_("_Nothing here, yet..._\n"))) - - # and finally, the description for each method - if methods and len(methods) > 0: - clsf.write(tb(_("\nh3. Member Function Description\n\n"))) - for method in methods.iter(tag='method'): - clsf.write(tb("h4(#{n}). {name}\n\n".format( - n=method.attrib["name"].lower(), - name=method.attrib["name"]))) - clsf.write(tb(mkfn(method) + "\n")) - clsf.write(tb(toOP(method.find( - "description").text.strip()))) diff --git a/tools/docdump/makedoku.py b/tools/docdump/makedoku.py deleted file mode 100644 index e8207715fe..0000000000 --- a/tools/docdump/makedoku.py +++ /dev/null @@ -1,511 +0,0 @@ -import sys -import xml.etree.ElementTree as ET - -input_list = [] - - -for arg in sys.argv[1:]: - input_list.append(arg) - -if len(input_list) < 1: - print("usage: makedoku.py ") - sys.exit(0) - - -def validate_tag(elem,tag): - if (elem.tag != tag): - print("Tag mismatch, expected '"+tag+"', got "+elem.tag); - sys.exit(255) - - -class_names=[] -classes={} - - -def make_class_list(class_list,columns): - - f=open("class_list.txt","wb") - prev=0 - col_max = len(class_list) / columns + 1 - print("col max is ", col_max) - col_count = 0 - row_count = 0 - last_initial = "" - fit_columns=[] - - for n in range(0,columns): - fit_columns+=[[]] - - indexers=[] - last_initial="" - - idx=0 - for n in class_list: - col = idx/col_max - if (col>=columns): - col=columns-1 - fit_columns[col]+=[n] - idx+=1 - if (n[:1]!=last_initial): - indexers+=[n] - last_initial=n[:1] - - - row_max=0 - - for n in range(0,columns): - if (len(fit_columns[n])>row_max): - row_max=len(fit_columns[n]) - - - for r in range(0,row_max): - s="|" - for c in range(0,columns): - if (r>=len(fit_columns[c])): - continue - - classname = fit_columns[c][r] - initial=classname[0] - if (classname in indexers): - s+="**"+initial+"**|" - else: - s+=" |" - - s+="[["+classname.lower()+"|"+classname+"]]|" - - s+="\n" - f.write(s) - - -def dokuize_text(txt): - - return txt - - -def dokuize_text(text): - pos=0 - while(True): - pos = text.find("[",pos) - if (pos==-1): - break - - endq_pos=text.find("]",pos+1) - if (endq_pos==-1): - break - - pre_text=text[:pos] - post_text=text[endq_pos+1:] - tag_text=text[pos+1:endq_pos] - - if (tag_text in class_names): - tag_text="[["+tag_text.lower()+"|"+tag_text+"]]" - else: #command - cmd=tag_text - space_pos=tag_text.find(" ") - if (cmd.find("html")==0): - cmd=tag_text[:space_pos] - param=tag_text[space_pos+1:] - tag_text="<"+param+">" - elif(cmd.find("method")==0): - cmd=tag_text[:space_pos] - param=tag_text[space_pos+1:] - - if (param.find(".")!=-1): - class_param,method_param=param.split(".") - tag_text="[["+class_param.lower()+"#"+method_param+"|"+class_param+'.'+method_param+"]]" - else: - tag_text="[[#"+param+"|"+param+"]]" - elif (cmd.find("image=")==0): - tag_text="{{"+cmd[6:]+"}}" - elif (cmd.find("url=")==0): - tag_text="[["+cmd[4:]+"|" - elif (cmd=="/url"): - tag_text="]]>" - elif (cmd=="center"): - tag_text="" - elif (cmd=="/center"): - tag_text="" - elif (cmd=="br"): - tag_text="\\\\\n" - elif (cmd=="i" or cmd=="/i"): - tag_text="//" - elif (cmd=="b" or cmd=="/b"): - tag_text="**" - elif (cmd=="u" or cmd=="/u"): - tag_text="__" - else: - tag_text="["+tag_text+"]" - - - text=pre_text+tag_text+post_text - pos=len(pre_text)+len(tag_text) - - #tnode = ET.SubElement(parent,"div") - #tnode.text=text - return text - - -def make_type(t): - global class_names - if (t in class_names): - return "[["+t.lower()+"|"+t+"]]" - return t - - -def make_method(f,name,m,declare,event=False): - - s=" * " - ret_type="void" - args=list(m) - mdata={} - mdata["argidx"]=[] - for a in args: - if (a.tag=="return"): - idx=-1 - elif (a.tag=="argument"): - idx=int(a.attrib["index"]) - else: - continue - - mdata["argidx"].append(idx) - mdata[idx]=a - - - - if (not event): - if (-1 in mdata["argidx"]): - s+=make_type(mdata[-1].attrib["type"]) - else: - s+="void" - s+=" " - - if (declare): - - #span.attrib["class"]="funcdecl" - #a=ET.SubElement(span,"a") - #a.attrib["name"]=name+"_"+m.attrib["name"] - #a.text=name+"::"+m.attrib["name"] - s+="**"+m.attrib["name"]+"**" - else: - s+="[[#"+m.attrib["name"]+"|"+m.attrib["name"]+"]]" - - s+="**(**" - argfound=False - for a in mdata["argidx"]: - arg=mdata[a] - if (a<0): - continue - if (a>0): - s+=", " - else: - s+=" " - - s+=make_type(arg.attrib["type"]) - if ("name" in arg.attrib): - s+=" "+arg.attrib["name"] - else: - s+=" arg"+str(a) - - if ("default" in arg.attrib): - s+="="+arg.attrib["default"] - - - argfound=True - - if (argfound): - s+=" " - s+="**)**" - - if ("qualifiers" in m.attrib): - s+=" "+m.attrib["qualifiers"] - - f.write(s+"\n") - - -def make_doku_class(node): - - name = node.attrib["name"] - - f=open(name.lower()+".txt","wb") - - f.write("====== "+name+" ======\n") - - if ("inherits" in node.attrib): - inh=node.attrib["inherits"].strip() - f.write("**Inherits:** [["+inh.lower()+"|"+inh+"]]\\\\\n") - if ("category" in node.attrib): - f.write("**Category:** "+node.attrib["category"].strip()+"\\\\\n") - - briefd = node.find("brief_description") - if (briefd!=None): - f.write("===== Brief Description ======\n") - f.write( dokuize_text(briefd.text.strip())+"\n" ) - - methods = node.find("methods") - - if(methods!=None and len(list(methods))>0): - f.write("===== Member Functions ======\n") - for m in list(methods): - make_method(f,node.attrib["name"],m,False) - - events = node.find("signals") - if(events!=None and len(list(events))>0): - f.write("===== Signals ======\n") - for m in list(events): - make_method(f,node.attrib["name"],m,True,True) - - members = node.find("members") - - if(members!=None and len(list(members))>0): - f.write("===== Member Variables ======\n") - - for c in list(members): - s = " * " - s+=make_type(c.attrib["type"])+" " - s+="**"+c.attrib["name"]+"**" - if (c.text.strip()!=""): - s+=" - "+c.text.strip() - f.write(s+"\n") - - - - constants = node.find("constants") - if(constants!=None and len(list(constants))>0): - f.write("===== Numeric Constants ======\n") - for c in list(constants): - s = " * " - s+="**"+c.attrib["name"]+"**" - if ("value" in c.attrib): - s+=" = **"+c.attrib["value"]+"**" - if (c.text.strip()!=""): - s+=" - "+c.text.strip() - f.write(s+"\n") - - - descr=node.find("description") - if (descr!=None and descr.text.strip()!=""): - f.write("===== Description ======\n") - f.write(dokuize_text(descr.text.strip())+"\n") - - methods = node.find("methods") - - if(methods!=None and len(list(methods))>0): - f.write("===== Member Function Description ======\n") - for m in list(methods): - - d=m.find("description") - if (d==None or d.text.strip()==""): - continue - f.write("== "+m.attrib["name"]+" ==\n") - make_method(f,node.attrib["name"],m,False) - f.write("\\\\\n") - f.write(dokuize_text(d.text.strip())) - f.write("\n") - - - - - - """ - div=ET.Element("div") - div.attrib["class"]="class"; - - a=ET.SubElement(div,"a") - a.attrib["name"]=node.attrib["name"] - - h3=ET.SubElement(a,"h3") - h3.attrib["class"]="title class_title" - h3.text=node.attrib["name"] - - briefd = node.find("brief_description") - if (briefd!=None): - div2=ET.SubElement(div,"div") - div2.attrib["class"]="description class_description" - div2.text=briefd.text - - if ("inherits" in node.attrib): - ET.SubElement(div,"br") - - div2=ET.SubElement(div,"div") - div2.attrib["class"]="inheritance"; - - span=ET.SubElement(div2,"span") - span.text="Inherits: " - - make_type(node.attrib["inherits"],div2) - - if ("category" in node.attrib): - ET.SubElement(div,"br") - - div3=ET.SubElement(div,"div") - div3.attrib["class"]="category"; - - span=ET.SubElement(div3,"span") - span.attrib["class"]="category" - span.text="Category: " - - a = ET.SubElement(div3,"a") - a.attrib["class"]="category_ref" - a.text=node.attrib["category"] - catname=a.text - if (catname.rfind("/")!=-1): - catname=catname[catname.rfind("/"):] - catname="CATEGORY_"+catname - - if (single_page): - a.attrib["href"]="#"+catname - else: - a.attrib["href"]="category.html#"+catname - - - methods = node.find("methods") - - if(methods!=None and len(list(methods))>0): - - h4=ET.SubElement(div,"h4") - h4.text="Public Methods:" - - method_table=ET.SubElement(div,"table") - method_table.attrib["class"]="method_list"; - - for m in list(methods): -# li = ET.SubElement(div2, "li") - method_table.append( make_method_def(node.attrib["name"],m,False) ) - - events = node.find("signals") - - if(events!=None and len(list(events))>0): - h4=ET.SubElement(div,"h4") - h4.text="Events:" - - event_table=ET.SubElement(div,"table") - event_table.attrib["class"]="method_list"; - - for m in list(events): -# li = ET.SubElement(div2, "li") - event_table.append( make_method_def(node.attrib["name"],m,False,True) ) - - - members = node.find("members") - if(members!=None and len(list(members))>0): - - h4=ET.SubElement(div,"h4") - h4.text="Public Variables:" - div2=ET.SubElement(div,"div") - div2.attrib["class"]="member_list"; - - for c in list(members): - - li = ET.SubElement(div2, "li") - div3=ET.SubElement(li,"div") - div3.attrib["class"]="member"; - make_type(c.attrib["type"],div3) - span=ET.SubElement(div3,"span") - span.attrib["class"]="identifier member_name" - span.text=" "+c.attrib["name"]+" " - span=ET.SubElement(div3,"span") - span.attrib["class"]="member_description" - span.text=c.text - - - constants = node.find("constants") - if(constants!=None and len(list(constants))>0): - - h4=ET.SubElement(div,"h4") - h4.text="Constants:" - div2=ET.SubElement(div,"div") - div2.attrib["class"]="constant_list"; - - for c in list(constants): - li = ET.SubElement(div2, "li") - div3=ET.SubElement(li,"div") - div3.attrib["class"]="constant"; - - span=ET.SubElement(div3,"span") - span.attrib["class"]="identifier constant_name" - span.text=c.attrib["name"]+" " - if ("value" in c.attrib): - span=ET.SubElement(div3,"span") - span.attrib["class"]="symbol" - span.text="= " - span=ET.SubElement(div3,"span") - span.attrib["class"]="constant_value" - span.text=c.attrib["value"]+" " - span=ET.SubElement(div3,"span") - span.attrib["class"]="constant_description" - span.text=c.text - -# ET.SubElement(div,"br") - - - descr=node.find("description") - if (descr!=None and descr.text.strip()!=""): - - h4=ET.SubElement(div,"h4") - h4.text="Description:" - - make_text_def(node.attrib["name"],div,descr.text) -# div2=ET.SubElement(div,"div") -# div2.attrib["class"]="description"; -# div2.text=descr.text - - - - if(methods!=None or events!=None): - - h4=ET.SubElement(div,"h4") - h4.text="Method Documentation:" - iter_list = [] - if (methods!=None): - iter_list+=list(methods) - if (events!=None): - iter_list+=list(events) - - for m in iter_list: - - descr=m.find("description") - - if (descr==None or descr.text.strip()==""): - continue; - - div2=ET.SubElement(div,"div") - div2.attrib["class"]="method_doc"; - - - div2.append( make_method_def(node.attrib["name"],m,True) ) - #anchor = ET.SubElement(div2, "a") - #anchor.attrib["name"] = - make_text_def(node.attrib["name"],div2,descr.text) - #div3=ET.SubElement(div2,"div") - #div3.attrib["class"]="description"; - #div3.text=descr.text - - - return div -""" -for file in input_list: - tree = ET.parse(file) - doc=tree.getroot() - - if ("version" not in doc.attrib): - print("Version missing from 'doc'") - sys.exit(255) - - version=doc.attrib["version"] - - for c in list(doc): - if (c.attrib["name"] in class_names): - continue - class_names.append(c.attrib["name"]) - classes[c.attrib["name"]]=c - - -class_names.sort() - -make_class_list(class_names,4) - -for cn in class_names: - c=classes[cn] - make_doku_class(c) - - diff --git a/tools/docdump/makehtml.py b/tools/docdump/makehtml.py deleted file mode 100644 index 9b9c62f33b..0000000000 --- a/tools/docdump/makehtml.py +++ /dev/null @@ -1,717 +0,0 @@ -import sys -import xml.etree.ElementTree as ET -from xml.sax.saxutils import escape, unescape - -html_escape_table = { - '"': """, - "'": "'" -} - -html_unescape_table = {v:k for k, v in html_escape_table.items()} - -def html_escape(text): - return escape(text, html_escape_table) - -def html_unescape(text): - return unescape(text, html_unescape_table) - -input_list = [] - -single_page=True - -for arg in sys.argv[1:]: - if arg[:1] == "-": - if arg[1:] == "multipage": - single_page = False - if arg[1:] == "singlepage": - single_page = True - else: - input_list.append(arg) - -if len(input_list) < 1: - print("usage: makehtml.py ") - sys.exit(0) - - -def validate_tag(elem,tag): - if (elem.tag != tag): - print("Tag mismatch, expected '"+tag+"', got "+elem.tag); - sys.exit(255) - -def make_html_bottom(body): - #make_html_top(body,True) - ET.SubElement(body,"hr") - copyright = ET.SubElement(body,"span") - copyright.text = "Copyright 2008-2010 Codenix SRL" - -def make_html_top(body,bottom=False): - - if (bottom): - ET.SubElement(body,"hr") - - table = ET.SubElement(body,"table") - table.attrib["class"]="top_table" - tr = ET.SubElement(table,"tr") - td = ET.SubElement(tr,"td") - td.attrib["class"]="top_table" - - img = ET.SubElement(td,"image") - img.attrib["src"]="images/logo.png" - td = ET.SubElement(tr,"td") - td.attrib["class"]="top_table" - a = ET.SubElement(td,"a") - a.attrib["href"]="index.html" - a.text="Index" - td = ET.SubElement(tr,"td") - td.attrib["class"]="top_table" - a = ET.SubElement(td,"a") - a.attrib["href"]="alphabetical.html" - a.text="Classes" - td = ET.SubElement(tr,"td") - td.attrib["class"]="top_table" - a = ET.SubElement(td,"a") - a.attrib["href"]="category.html" - a.text="Categories" - td = ET.SubElement(tr,"td") - a = ET.SubElement(td,"a") - a.attrib["href"]="inheritance.html" - a.text="Inheritance" - if (not bottom): - ET.SubElement(body,"hr") - - - - -def make_html_class_list(class_list,columns): - - div=ET.Element("div") - div.attrib["class"]="ClassList"; - - h1=ET.SubElement(div,"h2") - h1.text="Alphabetical Class List" - - table=ET.SubElement(div,"table") - table.attrib["class"]="class_table" - table.attrib["width"]="100%" - prev=0 - - col_max = len(class_list) / columns + 1 - print("col max is ", col_max) - col_count = 0 - row_count = 0 - last_initial = "" - fit_columns=[] - - for n in range(0,columns): - fit_columns+=[[]] - - indexers=[] - last_initial="" - - idx=0 - for n in class_list: - col = int(idx/col_max) - if (col>=columns): - col=columns-1 - fit_columns[col]+=[n] - idx+=1 - if (n[:1]!=last_initial): - indexers+=[n] - last_initial=n[:1] - - row_max=0 - - for n in range(0,columns): - if (len(fit_columns[n])>row_max): - row_max=len(fit_columns[n]) - - - for r in range(0,row_max): - tr = ET.SubElement(table,"tr") - for c in range(0,columns): - tdi = ET.SubElement(tr,"td") - tdi.attrib["align"]="right" - td = ET.SubElement(tr,"td") - if (r>=len(fit_columns[c])): - continue - - classname = fit_columns[c][r] - print(classname) - if (classname in indexers): - - span = ET.SubElement(tdi, "span") - span.attrib["class"] = "class_index_letter" - span.text = classname[:1].upper() - - if (single_page): - link="#"+classname - else: - link=classname+".html" - - a=ET.SubElement(td,"a") - a.attrib["href"]=link - a.text=classname - - - if (not single_page): - cat_class_list=ET.Element("html") - csscc = ET.SubElement(cat_class_list, "link") - csscc.attrib["href"] = "main.css" - csscc.attrib["rel"] = "stylesheet" - csscc.attrib["type"] = "text/css" - bodycc = ET.SubElement(cat_class_list, "body") - make_html_top(bodycc) - - cat_class_parent=bodycc - else: - cat_class_parent=div - - - - - h1=ET.SubElement(cat_class_parent,"h2") - h1.text="Class List By Category" - - class_cat_table={} - class_cat_list=[] - - for c in class_list: - clss = classes[c] - if ("category" in clss.attrib): - class_cat=clss.attrib["category"] - else: - class_cat="Core" - if (class_cat.find("/")!=-1): - class_cat=class_cat[class_cat.rfind("/")+1:] - if (not class_cat in class_cat_list): - class_cat_list.append(class_cat) - class_cat_table[class_cat]=[] - class_cat_table[class_cat].append(c) - - class_cat_list.sort() - - ct = ET.SubElement(cat_class_parent,"table") - for cl in class_cat_list: - l = class_cat_table[cl] - l.sort() - tr = ET.SubElement(ct,"tr") - tr.attrib["class"]="category_title" - td = ET.SubElement(ct,"td") - td.attrib["class"]="category_title" - - a = ET.SubElement(td,"a") - a.attrib["class"]="category_title" - a.text=cl - a.attrib["name"]="CATEGORY_"+cl - - td = ET.SubElement(ct,"td") - td.attrib["class"]="category_title" - - for clt in l: - tr = ET.SubElement(ct,"tr") - td = ET.SubElement(ct,"td") - make_type(clt,td) - clss=classes[clt] - bd = clss.find("brief_description") - bdtext="" - if (bd!=None): - bdtext=bd.text - td = ET.SubElement(ct,"td") - td.text=bdtext - - if (not single_page): - make_html_bottom(bodycc) - catet_out = ET.ElementTree(cat_class_list) - catet_out.write("category.html") - - - if (not single_page): - inh_class_list=ET.Element("html") - cssic = ET.SubElement(inh_class_list, "link") - cssic.attrib["href"] = "main.css" - cssic.attrib["rel"] = "stylesheet" - cssic.attrib["type"] = "text/css" - bodyic = ET.SubElement(inh_class_list, "body") - make_html_top(bodyic) - inh_class_parent=bodyic - else: - inh_class_parent=div - - - - - h1=ET.SubElement(inh_class_parent,"h2") - h1.text="Class List By Inheritance" - - itemlist = ET.SubElement(inh_class_parent,"list") - - class_inh_table={} - - def add_class(clss): - if (clss.attrib["name"] in class_inh_table): - return #already added - parent_list=None - - if ("inherits" in clss.attrib): - inhc = clss.attrib["inherits"] - if (not (inhc in class_inh_table)): - add_class(classes[inhc]) - - parent_list = class_inh_table[inhc].find("div") - if (parent_list == None): - parent_div = ET.SubElement(class_inh_table[inhc],"div") - parent_list = ET.SubElement(parent_div,"list") - parent_div.attrib["class"]="inh_class_list" - else: - parent_list = parent_list.find("list") - - - else: - parent_list=itemlist - - item = ET.SubElement(parent_list,"li") -# item.attrib["class"]="inh_class_list" - class_inh_table[clss.attrib["name"]]=item - make_type(clss.attrib["name"],item) - - - for c in class_list: - add_class(classes[c]) - - if (not single_page): - make_html_bottom(bodyic) - catet_out = ET.ElementTree(inh_class_list) - catet_out.write("inheritance.html") - - - - - - #h1=ET.SubElement(div,"h2") - #h1.text="Class List By Inheritance" - - return div - - -def make_type(p_type,p_parent): - if (p_type=="RefPtr"): - p_type="Resource" - - if (p_type in class_names): - a=ET.SubElement(p_parent,"a") - a.attrib["class"]="datatype_existing" - a.text=p_type+" " - if (single_page): - a.attrib["href"]="#"+p_type - else: - a.attrib["href"]=p_type+".html" - else: - span=ET.SubElement(p_parent,"span") - span.attrib["class"]="datatype" - span.text=p_type+" " - - - -def make_text_def(class_name,parent,text): - text = html_escape(text) - pos=0 - while(True): - pos = text.find("[",pos) - if (pos==-1): - break - - endq_pos=text.find("]",pos+1) - if (endq_pos==-1): - break - - pre_text=text[:pos] - post_text=text[endq_pos+1:] - tag_text=text[pos+1:endq_pos] - - if (tag_text in class_names): - if (single_page): - tag_text=''+tag_text+'' - else: - tag_text=''+tag_text+'' - else: #command - cmd=tag_text - space_pos=tag_text.find(" ") - if (cmd.find("html")==0): - cmd=tag_text[:space_pos] - param=tag_text[space_pos+1:] - tag_text="<"+param+">" - elif(cmd.find("method")==0): - cmd=tag_text[:space_pos] - param=tag_text[space_pos+1:] - - if (not single_page and param.find(".")!=-1): - class_param,method_param=param.split(".") - tag_text=tag_text=''+class_param+'.'+method_param+'()' - else: - tag_text=tag_text=''+class_name+'.'+param+'()' - elif (cmd.find("image=")==0): - print("found image: "+cmd) - tag_text="" - elif (cmd.find("url=")==0): - tag_text="" - elif (cmd=="/url"): - tag_text="" - elif (cmd=="center"): - tag_text="
    " - elif (cmd=="/center"): - tag_text="
    " - elif (cmd=="br"): - tag_text="
    " - elif (cmd=="i" or cmd=="/i" or cmd=="b" or cmd=="/b" or cmd=="u" or cmd=="/u"): - tag_text="<"+tag_text+">" #html direct mapping - else: - tag_text="["+tag_text+"]" - - - text=pre_text+tag_text+post_text - pos=len(pre_text)+len(tag_text) - - #tnode = ET.SubElement(parent,"div") - #tnode.text=text - text="
    "+text+"
    " - try: - tnode=ET.XML(text) - parent.append(tnode) - except: - print("Error parsing description text: '"+text+"'") - sys.exit(255) - - - return tnode - - - - -def make_method_def(name,m,declare,event=False): - - mdata={} - - - if (not declare): - div=ET.Element("tr") - div.attrib["class"]="method" - ret_parent=ET.SubElement(div,"td") - ret_parent.attrib["align"]="right" - func_parent=ET.SubElement(div,"td") - else: - div=ET.Element("div") - div.attrib["class"]="method" - ret_parent=div - func_parent=div - - mdata["argidx"]=[] - mdata["name"]=m.attrib["name"] - qualifiers="" - if ("qualifiers" in m.attrib): - qualifiers=m.attrib["qualifiers"] - - args=list(m) - for a in args: - if (a.tag=="return"): - idx=-1 - elif (a.tag=="argument"): - idx=int(a.attrib["index"]) - else: - continue - - mdata["argidx"].append(idx) - mdata[idx]=a - - if (not event): - if (-1 in mdata["argidx"]): - make_type(mdata[-1].attrib["type"],ret_parent) - mdata["argidx"].remove(-1) - else: - make_type("void",ret_parent) - - span=ET.SubElement(func_parent,"span") - if (declare): - span.attrib["class"]="funcdecl" - a=ET.SubElement(span,"a") - a.attrib["name"]=name+"_"+m.attrib["name"] - a.text=name+"::"+m.attrib["name"] - else: - span.attrib["class"]="identifier funcdef" - a=ET.SubElement(span,"a") - a.attrib["href"]="#"+name+"_"+m.attrib["name"] - a.text=m.attrib["name"] - - span=ET.SubElement(func_parent,"span") - span.attrib["class"]="symbol" - span.text=" (" - - for a in mdata["argidx"]: - arg=mdata[a] - if (a>0): - span=ET.SubElement(func_parent,"span") - span.text=", " - else: - span=ET.SubElement(func_parent,"span") - span.text=" " - - - make_type(arg.attrib["type"],func_parent) - - span=ET.SubElement(func_parent,"span") - span.text=arg.attrib["name"] - if ("default" in arg.attrib): - span.text=span.text+"="+arg.attrib["default"] - - - span=ET.SubElement(func_parent,"span") - span.attrib["class"]="symbol" - if (len(mdata["argidx"])): - span.text=" )" - else: - span.text=")" - - if (qualifiers): - span=ET.SubElement(func_parent,"span") - span.attrib["class"]="qualifier" - span.text=" "+qualifiers - - return div - - -def make_html_class(node): - - div=ET.Element("div") - div.attrib["class"]="class"; - - a=ET.SubElement(div,"a") - a.attrib["name"]=node.attrib["name"] - - h3=ET.SubElement(a,"h3") - h3.attrib["class"]="title class_title" - h3.text=node.attrib["name"] - - briefd = node.find("brief_description") - if (briefd!=None): - div2=ET.SubElement(div,"div") - div2.attrib["class"]="description class_description" - div2.text=briefd.text - - if ("inherits" in node.attrib): - ET.SubElement(div,"br") - - div2=ET.SubElement(div,"div") - div2.attrib["class"]="inheritance"; - - span=ET.SubElement(div2,"span") - span.text="Inherits: " - - make_type(node.attrib["inherits"],div2) - - if ("category" in node.attrib): - ET.SubElement(div,"br") - - div3=ET.SubElement(div,"div") - div3.attrib["class"]="category"; - - span=ET.SubElement(div3,"span") - span.attrib["class"]="category" - span.text="Category: " - - a = ET.SubElement(div3,"a") - a.attrib["class"]="category_ref" - a.text=node.attrib["category"] - catname=a.text - if (catname.rfind("/")!=-1): - catname=catname[catname.rfind("/"):] - catname="CATEGORY_"+catname - - if (single_page): - a.attrib["href"]="#"+catname - else: - a.attrib["href"]="category.html#"+catname - - - methods = node.find("methods") - - if(methods!=None and len(list(methods))>0): - - h4=ET.SubElement(div,"h4") - h4.text="Public Methods:" - - method_table=ET.SubElement(div,"table") - method_table.attrib["class"]="method_list"; - - for m in list(methods): -# li = ET.SubElement(div2, "li") - method_table.append( make_method_def(node.attrib["name"],m,False) ) - - events = node.find("signals") - - if(events!=None and len(list(events))>0): - h4=ET.SubElement(div,"h4") - h4.text="Events:" - - event_table=ET.SubElement(div,"table") - event_table.attrib["class"]="method_list"; - - for m in list(events): -# li = ET.SubElement(div2, "li") - event_table.append( make_method_def(node.attrib["name"],m,False,True) ) - - - members = node.find("members") - if(members!=None and len(list(members))>0): - - h4=ET.SubElement(div,"h4") - h4.text="Public Variables:" - div2=ET.SubElement(div,"div") - div2.attrib["class"]="member_list"; - - for c in list(members): - - li = ET.SubElement(div2, "li") - div3=ET.SubElement(li,"div") - div3.attrib["class"]="member"; - make_type(c.attrib["type"],div3) - span=ET.SubElement(div3,"span") - span.attrib["class"]="identifier member_name" - span.text=" "+c.attrib["name"]+" " - span=ET.SubElement(div3,"span") - span.attrib["class"]="member_description" - span.text=c.text - - - constants = node.find("constants") - if(constants!=None and len(list(constants))>0): - - h4=ET.SubElement(div,"h4") - h4.text="Constants:" - div2=ET.SubElement(div,"div") - div2.attrib["class"]="constant_list"; - - for c in list(constants): - li = ET.SubElement(div2, "li") - div3=ET.SubElement(li,"div") - div3.attrib["class"]="constant"; - - span=ET.SubElement(div3,"span") - span.attrib["class"]="identifier constant_name" - span.text=c.attrib["name"]+" " - if ("value" in c.attrib): - span=ET.SubElement(div3,"span") - span.attrib["class"]="symbol" - span.text="= " - span=ET.SubElement(div3,"span") - span.attrib["class"]="constant_value" - span.text=c.attrib["value"]+" " - span=ET.SubElement(div3,"span") - span.attrib["class"]="constant_description" - span.text=c.text - -# ET.SubElement(div,"br") - - - descr=node.find("description") - if (descr!=None and descr.text.strip()!=""): - h4=ET.SubElement(div,"h4") - h4.text="Description:" - - make_text_def(node.attrib["name"],div,descr.text) -# div2=ET.SubElement(div,"div") -# div2.attrib["class"]="description"; -# div2.text=descr.text - - - - if(methods!=None or events!=None): - - h4=ET.SubElement(div,"h4") - h4.text="Method Documentation:" - iter_list = [] - if (methods!=None): - iter_list+=list(methods) - if (events!=None): - iter_list+=list(events) - - for m in iter_list: - - descr=m.find("description") - - if (descr==None or descr.text.strip()==""): - continue; - - div2=ET.SubElement(div,"div") - div2.attrib["class"]="method_doc"; - - - div2.append( make_method_def(node.attrib["name"],m,True) ) - #anchor = ET.SubElement(div2, "a") - #anchor.attrib["name"] = - make_text_def(node.attrib["name"],div2,descr.text) - #div3=ET.SubElement(div2,"div") - #div3.attrib["class"]="description"; - #div3.text=descr.text - - - return div - -class_names=[] -classes={} - -for file in input_list: - tree = ET.parse(file) - doc=tree.getroot() - - if ("version" not in doc.attrib): - print("Version missing from 'doc'") - sys.exit(255) - - version=doc.attrib["version"] - - for c in list(doc): - if (c.attrib["name"] in class_names): - continue - class_names.append(c.attrib["name"]) - classes[c.attrib["name"]]=c - -html = ET.Element("html") -css = ET.SubElement(html, "link") -css.attrib["href"] = "main.css" -css.attrib["rel"] = "stylesheet" -css.attrib["type"] = "text/css" - -body = ET.SubElement(html, "body") -if (not single_page): - make_html_top(body) - - - -class_names.sort() - -body.append( make_html_class_list(class_names,5) ) - -for cn in class_names: - c=classes[cn] - if (single_page): - body.append( make_html_class(c)) - else: - html2 = ET.Element("html") - css = ET.SubElement(html2, "link") - css.attrib["href"] = "main.css" - css.attrib["rel"] = "stylesheet" - css.attrib["type"] = "text/css" - body2 = ET.SubElement(html2, "body" ) - make_html_top(body2) - body2.append( make_html_class(c) ); - make_html_bottom(body2) - et_out = ET.ElementTree(html2) - et_out.write(c.attrib["name"]+".html") - - -et_out = ET.ElementTree(html) -if (single_page): - et_out.write("singlepage.html") -else: - make_html_bottom(body) - et_out.write("alphabetical.html") - diff --git a/tools/docdump/makemd.py b/tools/docdump/makemd.py deleted file mode 100644 index f85d145d5e..0000000000 --- a/tools/docdump/makemd.py +++ /dev/null @@ -1,345 +0,0 @@ -#!/usr/bin/python -# -*- coding: utf-8 -*- -import sys -import xml.etree.ElementTree as ET - -input_list = [] - -for arg in sys.argv[1:]: - input_list.append(arg) - -if len(input_list) < 1: - print 'usage: makedoku.py ' - sys.exit(0) - - -def validate_tag(elem, tag): - if elem.tag != tag: - print "Tag mismatch, expected '" + tag + "', got " + elem.tag - sys.exit(255) - - -class_names = [] -classes = {} - - -def make_class_list(class_list, columns): - - f = open('class_list.md', 'wb') - prev = 0 - col_max = len(class_list) / columns + 1 - print ('col max is ', col_max) - col_count = 0 - row_count = 0 - last_initial = '' - fit_columns = [] - - for n in range(0, columns): - fit_columns += [[]] - - indexers = [] - last_initial = '' - - idx = 0 - for n in class_list: - col = idx / col_max - if col >= columns: - col = columns - 1 - fit_columns[col] += [n] - idx += 1 - if n[:1] != last_initial: - indexers += [n] - last_initial = n[:1] - - row_max = 0 - f.write("\n") - - for n in range(0, columns): - if len(fit_columns[n]) > row_max: - row_max = len(fit_columns[n]) - - f.write("| ") - for n in range(0, columns): - f.write(" | |") - - f.write("\n") - f.write("| ") - for n in range(0, columns): - f.write(" --- | ------- |") - f.write("\n") - - for r in range(0, row_max): - s = '| ' - for c in range(0, columns): - if r >= len(fit_columns[c]): - continue - - classname = fit_columns[c][r] - initial = classname[0] - if classname in indexers: - s += '**' + initial + '** | ' - else: - s += ' | ' - - s += '[' + classname + '](class_'+ classname.lower()+') | ' - - s += '\n' - f.write(s) - - -def dokuize_text(txt): - - return txt - - -def dokuize_text(text): - pos = 0 - while True: - pos = text.find('[', pos) - if pos == -1: - break - - endq_pos = text.find(']', pos + 1) - if endq_pos == -1: - break - - pre_text = text[:pos] - post_text = text[endq_pos + 1:] - tag_text = text[pos + 1:endq_pos] - - if tag_text in class_names: - tag_text = make_type(tag_text) - else: - - # command - - cmd = tag_text - space_pos = tag_text.find(' ') - if cmd.find('html') == 0: - cmd = tag_text[:space_pos] - param = tag_text[space_pos + 1:] - tag_text = '<' + param + '>' - elif cmd.find('method') == 0: - cmd = tag_text[:space_pos] - param = tag_text[space_pos + 1:] - - if param.find('.') != -1: - (class_param, method_param) = param.split('.') - tag_text = '['+class_param+'.'+method_param.replace("_","_")+'](' + class_param.lower() + '#' \ - + method_param + ')' - else: - tag_text = '[' + param.replace("_","_") + '](#' + param + ')' - elif cmd.find('image=') == 0: - tag_text = '![](' + cmd[6:] + ')' - elif cmd.find('url=') == 0: - tag_text = '[' + cmd[4:] + ']('+cmd[4:] - elif cmd == '/url': - tag_text = ')' - elif cmd == 'center': - tag_text = '' - elif cmd == '/center': - tag_text = '' - elif cmd == 'br': - tag_text = '\n' - elif cmd == 'i' or cmd == '/i': - tag_text = '_' - elif cmd == 'b' or cmd == '/b': - tag_text = '**' - elif cmd == 'u' or cmd == '/u': - tag_text = '__' - else: - tag_text = '[' + tag_text + ']' - - text = pre_text + tag_text + post_text - pos = len(pre_text) + len(tag_text) - - # tnode = ET.SubElement(parent,"div") - # tnode.text=text - - return text - - -def make_type(t): - global class_names - if t in class_names: - return '[' + t + '](class_' + t.lower() + ')' - return t - - -def make_method( - f, - name, - m, - declare, - event=False, - ): - - s = ' * ' - ret_type = 'void' - args = list(m) - mdata = {} - mdata['argidx'] = [] - for a in args: - if a.tag == 'return': - idx = -1 - elif a.tag == 'argument': - idx = int(a.attrib['index']) - else: - continue - - mdata['argidx'].append(idx) - mdata[idx] = a - - if not event: - if -1 in mdata['argidx']: - s += make_type(mdata[-1].attrib['type']) - else: - s += 'void' - s += ' ' - - if declare: - - # span.attrib["class"]="funcdecl" - # a=ET.SubElement(span,"a") - # a.attrib["name"]=name+"_"+m.attrib["name"] - # a.text=name+"::"+m.attrib["name"] - - s += ' **'+m.attrib['name'].replace("_","_")+'** ' - else: - s += ' **['+ m.attrib['name'].replace("_","_")+'](#' + m.attrib['name'] + ')** ' - - s += ' **(**' - argfound = False - for a in mdata['argidx']: - arg = mdata[a] - if a < 0: - continue - if a > 0: - s += ', ' - else: - s += ' ' - - s += make_type(arg.attrib['type']) - if 'name' in arg.attrib: - s += ' ' + arg.attrib['name'] - else: - s += ' arg' + str(a) - - if 'default' in arg.attrib: - s += '=' + arg.attrib['default'] - - argfound = True - - if argfound: - s += ' ' - s += ' **)**' - - if 'qualifiers' in m.attrib: - s += ' ' + m.attrib['qualifiers'] - - f.write(s + '\n') - - -def make_doku_class(node): - - name = node.attrib['name'] - - f = open("class_"+name.lower() + '.md', 'wb') - - f.write('# ' + name + ' \n') - - if 'inherits' in node.attrib: - inh = node.attrib['inherits'].strip() - f.write('####**Inherits:** '+make_type(inh)+'\n') - if 'category' in node.attrib: - f.write('####**Category:** ' + node.attrib['category'].strip() - + '\n') - - briefd = node.find('brief_description') - if briefd != None: - f.write('\n### Brief Description \n') - f.write(dokuize_text(briefd.text.strip()) + '\n') - - methods = node.find('methods') - - if methods != None and len(list(methods)) > 0: - f.write('\n### Member Functions \n') - for m in list(methods): - make_method(f, node.attrib['name'], m, False) - - events = node.find('signals') - if events != None and len(list(events)) > 0: - f.write('\n### Signals \n') - for m in list(events): - make_method(f, node.attrib['name'], m, True, True) - - members = node.find('members') - - if members != None and len(list(members)) > 0: - f.write('\n### Member Variables \n') - - for c in list(members): - s = ' * ' - s += make_type(c.attrib['type']) + ' ' - s += '**' + c.attrib['name'] + '**' - if c.text.strip() != '': - s += ' - ' + c.text.strip() - f.write(s + '\n') - - constants = node.find('constants') - if constants != None and len(list(constants)) > 0: - f.write('\n### Numeric Constants \n') - for c in list(constants): - s = ' * ' - s += '**' + c.attrib['name'] + '**' - if 'value' in c.attrib: - s += ' = **' + c.attrib['value'] + '**' - if c.text.strip() != '': - s += ' - ' + c.text.strip() - f.write(s + '\n') - - descr = node.find('description') - if descr != None and descr.text.strip() != '': - f.write('\n### Description \n') - f.write(dokuize_text(descr.text.strip()) + '\n') - - methods = node.find('methods') - - if methods != None and len(list(methods)) > 0: - f.write('\n### Member Function Description \n') - for m in list(methods): - - d = m.find('description') - if d == None or d.text.strip() == '': - continue - f.write('\n#### ' + m.attrib['name'] + '\n') - make_method(f, node.attrib['name'], m, True) - f.write('\n') - f.write(dokuize_text(d.text.strip())) - f.write('\n') - - -for file in input_list: - tree = ET.parse(file) - doc = tree.getroot() - - if 'version' not in doc.attrib: - print "Version missing from 'doc'" - sys.exit(255) - - version = doc.attrib['version'] - - for c in list(doc): - if c.attrib['name'] in class_names: - continue - class_names.append(c.attrib['name']) - classes[c.attrib['name']] = c - -class_names.sort() - -make_class_list(class_names, 2) - -for cn in class_names: - c = classes[cn] - make_doku_class(c) - -- cgit v1.2.3 From 410e418aea16cc1c07249a9a64d3defcb8990866 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Sun, 13 Dec 2015 00:01:04 +0100 Subject: Add a Makefile to generate classes doc in various formats All the generated documentation is put in doc/_build. --- .gitignore | 5 ++--- doc/Doxyfile | 2 +- doc/Makefile | 47 +++++++++++++++++++++++++++++++++++++++++++++++ doc/make_doc.sh | 16 ---------------- doc/tools/doc_merge.py | 3 +++ doc/tools/makedocs.py | 2 +- doc/tools/makedoku.py | 5 ++++- doc/tools/makehtml.py | 5 ++++- doc/tools/makemd.py | 3 ++- 9 files changed, 64 insertions(+), 24 deletions(-) create mode 100644 doc/Makefile delete mode 100644 doc/make_doc.sh diff --git a/.gitignore b/.gitignore index fc8f413717..a6d5a2d412 100644 --- a/.gitignore +++ b/.gitignore @@ -24,9 +24,8 @@ tools/editor/editor_icons.cpp make.bat log.txt -# Documentation generated by doxygen or scripts -doc/doxygen/ -doc/html/ +# Documentation generated by doxygen or from classes.xml +doc/_build/ # Javascript specific *.bc diff --git a/doc/Doxyfile b/doc/Doxyfile index bc0d6d3925..c1904f17c9 100644 --- a/doc/Doxyfile +++ b/doc/Doxyfile @@ -58,7 +58,7 @@ PROJECT_LOGO = ../logo.png # entered, it will be relative to the location where doxygen was started. If # left blank the current directory will be used. -OUTPUT_DIRECTORY = ./doxygen/ +OUTPUT_DIRECTORY = ./_build/doxygen/ # If the CREATE_SUBDIRS tag is set to YES then doxygen will create 4096 sub- # directories (in 2 levels) under the output directory of each output format and diff --git a/doc/Makefile b/doc/Makefile new file mode 100644 index 0000000000..286a5162af --- /dev/null +++ b/doc/Makefile @@ -0,0 +1,47 @@ +BASEDIR = $(CURDIR) +CLASSES = $(BASEDIR)/base/classes.xml +OUTPUTDIR = $(BASEDIR)/_build +TOOLSDIR = $(BASEDIR)/tools + +.ONESHELL: + +clean: + rm -rf $(OUTPUTDIR) + +doku: + rm -rf $(OUTPUTDIR)/doku + mkdir -p $(OUTPUTDIR)/doku + pushd $(OUTPUTDIR)/doku + python2 $(TOOLSDIR)/makedoku.py $(CLASSES) + popd + +doxygen: + rm -rf $(OUTPUTDIR)/doxygen + mkdir -p $(OUTPUTDIR)/doxygen + doxygen Doxyfile + +html: + rm -rf $(OUTPUTDIR)/html + mkdir -p $(OUTPUTDIR)/html + pushd $(OUTPUTDIR)/html + python2 $(TOOLSDIR)/makehtml.py -multipage $(CLASSES) + popd + +markdown: + rm -rf $(OUTPUTDIR)/markdown + mkdir -p $(OUTPUTDIR)/markdown + pushd $(OUTPUTDIR)/markdown + python2 $(TOOLSDIR)/makemd.py $(CLASSES) + popd + +rst: + rm -rf $(OUTPUTDIR)/rst + mkdir -p $(OUTPUTDIR)/rst + pushd $(OUTPUTDIR)/rst + echo "TODO" + popd + +textile: + rm -rf $(OUTPUTDIR)/textile + mkdir -p $(OUTPUTDIR)/textile + python3 $(TOOLSDIR)/makedocs.py --input $(CLASSES) --output $(OUTPUTDIR)/textile diff --git a/doc/make_doc.sh b/doc/make_doc.sh deleted file mode 100644 index 5d0c1a9c2f..0000000000 --- a/doc/make_doc.sh +++ /dev/null @@ -1,16 +0,0 @@ -#! /bin/bash -here="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" -godotHome=$(dirname "$here") -docTarget=${here}/html/class_list - -throw() { - echo "$@" >&2 - exit 1 -} - -[ -d "$docTarget" ] || mkdir -p "$docTarget" || throw "Could not create doc target $docTarget" - -cd "$docTarget" -python ${here}/makehtml.py -multipage ${here}/base/classes.xml -cd "$here" - diff --git a/doc/tools/doc_merge.py b/doc/tools/doc_merge.py index 872f38ed87..6cc7019324 100644 --- a/doc/tools/doc_merge.py +++ b/doc/tools/doc_merge.py @@ -1,3 +1,6 @@ +#!/usr/bin/python +# -*- coding: utf-8 -*- + import sys import xml.etree.ElementTree as ET diff --git a/doc/tools/makedocs.py b/doc/tools/makedocs.py index be57891abc..db9f04b091 100644 --- a/doc/tools/makedocs.py +++ b/doc/tools/makedocs.py @@ -24,7 +24,7 @@ # TODO: # * Refactor code. # * Adapt this script for generating content in other markup formats like -# DokuWiki, Markdown, etc. +# reStructuredText, Markdown, DokuWiki, etc. # # Also check other TODO entries in this script for more information on what is # left to do. diff --git a/doc/tools/makedoku.py b/doc/tools/makedoku.py index e8207715fe..1ab16841b1 100644 --- a/doc/tools/makedoku.py +++ b/doc/tools/makedoku.py @@ -1,3 +1,6 @@ +#!/usr/bin/python +# -*- coding: utf-8 -*- + import sys import xml.etree.ElementTree as ET @@ -8,7 +11,7 @@ for arg in sys.argv[1:]: input_list.append(arg) if len(input_list) < 1: - print("usage: makedoku.py ") + print("usage: makedoku.py ") sys.exit(0) diff --git a/doc/tools/makehtml.py b/doc/tools/makehtml.py index 9b9c62f33b..34db47e424 100644 --- a/doc/tools/makehtml.py +++ b/doc/tools/makehtml.py @@ -1,3 +1,6 @@ +#!/usr/bin/python +# -*- coding: utf-8 -*- + import sys import xml.etree.ElementTree as ET from xml.sax.saxutils import escape, unescape @@ -29,7 +32,7 @@ for arg in sys.argv[1:]: input_list.append(arg) if len(input_list) < 1: - print("usage: makehtml.py ") + print("usage: makehtml.py ") sys.exit(0) diff --git a/doc/tools/makemd.py b/doc/tools/makemd.py index f85d145d5e..e012287b0e 100644 --- a/doc/tools/makemd.py +++ b/doc/tools/makemd.py @@ -1,5 +1,6 @@ #!/usr/bin/python # -*- coding: utf-8 -*- + import sys import xml.etree.ElementTree as ET @@ -9,7 +10,7 @@ for arg in sys.argv[1:]: input_list.append(arg) if len(input_list) < 1: - print 'usage: makedoku.py ' + print 'usage: makemd.py ' sys.exit(0) -- cgit v1.2.3 From 450926693f0f18a40a7b60d64eef800f1a18a28a Mon Sep 17 00:00:00 2001 From: Juan Linietsky Date: Sun, 13 Dec 2015 07:50:07 -0300 Subject: fix zip export --- tools/editor/editor_import_export.cpp | 4 +++- tools/editor/project_export.cpp | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/tools/editor/editor_import_export.cpp b/tools/editor/editor_import_export.cpp index 64b104334f..3cd5cfd629 100644 --- a/tools/editor/editor_import_export.cpp +++ b/tools/editor/editor_import_export.cpp @@ -1081,12 +1081,14 @@ Error EditorExportPlatform::save_pack_file(void *p_userdata,const String& p_path Error EditorExportPlatform::save_zip_file(void *p_userdata,const String& p_path, const Vector& p_data,int p_file,int p_total) { + String path=p_path.replace_first("res://",""); + ZipData *zd = (ZipData*)p_userdata; zipFile zip=(zipFile)zd->zip; zipOpenNewFileInZip(zip, - p_path.utf8().get_data(), + path.utf8().get_data(), NULL, NULL, 0, diff --git a/tools/editor/project_export.cpp b/tools/editor/project_export.cpp index 36976a9120..29f9918e26 100644 --- a/tools/editor/project_export.cpp +++ b/tools/editor/project_export.cpp @@ -1407,7 +1407,7 @@ ProjectExportDialog::ProjectExportDialog(EditorNode *p_editor) { add_child(confirm); confirm->connect("confirmed",this,"_confirmed"); - get_ok()->set_text("Export PCK"); + get_ok()->set_text("Export PCK/Zip"); expopt="--,Export,Bundle"; -- cgit v1.2.3 From 4523a591d33d8c28ee5c034101228bf7a686537e Mon Sep 17 00:00:00 2001 From: Franklin Sobrinho Date: Sun, 13 Dec 2015 08:41:11 -0300 Subject: Double-click item for reparent and choose a node in NodePath dialog --- tools/editor/reparent_dialog.cpp | 16 ++++++++-------- tools/editor/scene_tree_editor.cpp | 5 ++--- 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/tools/editor/reparent_dialog.cpp b/tools/editor/reparent_dialog.cpp index 78ba47d54b..f024844731 100644 --- a/tools/editor/reparent_dialog.cpp +++ b/tools/editor/reparent_dialog.cpp @@ -36,12 +36,12 @@ void ReparentDialog::_notification(int p_what) { - if (p_what==NOTIFICATION_ENTER_TREE) { + if (p_what==NOTIFICATION_ENTER_TREE) { connect("confirmed", this,"_reparent"); } - if (p_what==NOTIFICATION_EXIT_TREE) { + if (p_what==NOTIFICATION_EXIT_TREE) { disconnect("confirmed", this,"_reparent"); } @@ -83,29 +83,29 @@ void ReparentDialog::_bind_methods() { ReparentDialog::ReparentDialog() { - set_title("Reparent Node"); + VBoxContainer *vbc = memnew( VBoxContainer ); add_child(vbc); set_child_rect(vbc); tree = memnew( SceneTreeEditor(false) ); - + tree->set_show_enabled_subscene(true); vbc->add_margin_child("Reparent Location (Select new Parent):",tree,true); - + + tree->get_scene_tree()->connect("item_activated",this,"_reparent"); + //Label *label = memnew( Label ); //label->set_pos( Point2( 15,8) ); //label->set_text("Reparent Location (Select new Parent):"); - + node_only = memnew( CheckButton ); add_child(node_only); node_only->hide(); - tree->set_show_enabled_subscene(true); //vbc->add_margin_child("Options:",node_only);; - //cancel->connect("pressed", this,"_cancel"); diff --git a/tools/editor/scene_tree_editor.cpp b/tools/editor/scene_tree_editor.cpp index 6575603073..a164703e31 100644 --- a/tools/editor/scene_tree_editor.cpp +++ b/tools/editor/scene_tree_editor.cpp @@ -928,7 +928,7 @@ void SceneTreeDialog::_cancel() { void SceneTreeDialog::_select() { if (tree->get_selected()) { - emit_signal("selected",tree->get_selected()->get_path()); + emit_signal("selected",tree->get_selected()->get_path()); hide(); } } @@ -939,7 +939,6 @@ void SceneTreeDialog::_bind_methods() { ObjectTypeDB::bind_method("_cancel",&SceneTreeDialog::_cancel); ADD_SIGNAL( MethodInfo("selected",PropertyInfo(Variant::NODE_PATH,"path"))); - } @@ -951,7 +950,7 @@ SceneTreeDialog::SceneTreeDialog() { add_child(tree); set_child_rect(tree); - + tree->get_scene_tree()->connect("item_activated",this,"_select"); } -- cgit v1.2.3 From 2e8ed75d8dc1dc16399fc695a1fb130f312f4c5b Mon Sep 17 00:00:00 2001 From: Franklin Sobrinho Date: Sun, 13 Dec 2015 11:42:29 -0300 Subject: Fix array editor NodePath being relative to editor --- tools/editor/array_property_edit.cpp | 9 +++++++++ tools/editor/array_property_edit.h | 2 ++ tools/editor/property_editor.cpp | 18 ++++++++++++++---- 3 files changed, 25 insertions(+), 4 deletions(-) diff --git a/tools/editor/array_property_edit.cpp b/tools/editor/array_property_edit.cpp index 9cd443270b..64a2762095 100644 --- a/tools/editor/array_property_edit.cpp +++ b/tools/editor/array_property_edit.cpp @@ -209,6 +209,15 @@ void ArrayPropertyEdit::edit(Object* p_obj,const StringName& p_prop,Variant::Typ } +Node *ArrayPropertyEdit::get_node() { + + Object *o = ObjectDB::get_instance(obj); + if (!o) + return NULL; + + return o->cast_to(); +} + void ArrayPropertyEdit::_bind_methods() { ObjectTypeDB::bind_method(_MD("_set_size"),&ArrayPropertyEdit::_set_size); diff --git a/tools/editor/array_property_edit.h b/tools/editor/array_property_edit.h index acfb8e68ed..948b2a71a3 100644 --- a/tools/editor/array_property_edit.h +++ b/tools/editor/array_property_edit.h @@ -30,6 +30,8 @@ public: void edit(Object* p_obj, const StringName& p_prop, Variant::Type p_deftype); + Node *get_node(); + ArrayPropertyEdit(); }; diff --git a/tools/editor/property_editor.cpp b/tools/editor/property_editor.cpp index 9fb623022b..c44cfa3d6e 100644 --- a/tools/editor/property_editor.cpp +++ b/tools/editor/property_editor.cpp @@ -915,15 +915,25 @@ void CustomPropertyEditor::_color_changed(const Color& p_color) { void CustomPropertyEditor::_node_path_selected(NodePath p_path) { - if (owner && owner->is_type("Node")) { + if (owner) { + + Node *node=NULL; + + if (owner->is_type("Node")) + node = owner->cast_to(); + else if (owner->is_type("ArrayPropertyEdit")) + node = owner->cast_to()->get_node(); + + if (!node) { + v=p_path; + emit_signal("variant_changed"); + return; + } - Node *node = owner->cast_to(); Node *tonode=node->get_node(p_path); if (tonode) { - p_path=node->get_path_to(tonode); } - } v=p_path; -- cgit v1.2.3 From 95a469ad28e54fe05c3ae548725e557f91021d79 Mon Sep 17 00:00:00 2001 From: Juan Linietsky Date: Sun, 13 Dec 2015 12:53:29 -0300 Subject: added binary API to StreamPeer, fixes #2863 --- core/io/stream_peer.cpp | 299 ++++++++++++++++++++- core/io/stream_peer.h | 38 ++- core/typedefs.h | 12 + drivers/openssl/stream_peer_openssl.cpp | 7 + drivers/openssl/stream_peer_openssl.h | 2 + drivers/unix/stream_peer_tcp_posix.cpp | 9 + drivers/unix/stream_peer_tcp_posix.h | 2 + platform/windows/stream_peer_winsock.cpp | 8 + platform/windows/stream_peer_winsock.h | 2 + tools/doc/doc_data.cpp | 5 +- tools/editor/io_plugins/editor_export_scene.cpp | 2 +- .../io_plugins/editor_sample_import_plugin.cpp | 2 +- .../io_plugins/editor_texture_import_plugin.cpp | 4 +- 13 files changed, 383 insertions(+), 9 deletions(-) diff --git a/core/io/stream_peer.cpp b/core/io/stream_peer.cpp index b00b462eb6..a76b84bed3 100644 --- a/core/io/stream_peer.cpp +++ b/core/io/stream_peer.cpp @@ -27,7 +27,7 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /*************************************************************************/ #include "stream_peer.h" - +#include "io/marshalls.h" Error StreamPeer::_put_data(const DVector& p_data) { @@ -115,6 +115,271 @@ Array StreamPeer::_get_partial_data(int p_bytes) { } +void StreamPeer::set_big_endian(bool p_enable) { + + big_endian=p_enable; +} + +bool StreamPeer::is_big_endian_enabled() const { + + return big_endian; +} + + +void StreamPeer::put_u8(uint8_t p_val) { + put_data((const uint8_t*)&p_val,1); + +} + +void StreamPeer::put_8(int8_t p_val){ + + put_data((const uint8_t*)&p_val,1); +} +void StreamPeer::put_u16(uint16_t p_val){ + + if (big_endian) { + p_val=BSWAP16(p_val); + } + uint8_t buf[2]; + encode_uint16(p_val,buf); + put_data(buf,2); + +} +void StreamPeer::put_16(int16_t p_val){ + + if (big_endian) { + p_val=BSWAP16(p_val); + } + uint8_t buf[2]; + encode_uint16(p_val,buf); + put_data(buf,2); + +} +void StreamPeer::put_u32(uint32_t p_val){ + + if (big_endian) { + p_val=BSWAP32(p_val); + } + uint8_t buf[4]; + encode_uint32(p_val,buf); + put_data(buf,4); + +} +void StreamPeer::put_32(int32_t p_val){ + + if (big_endian) { + p_val=BSWAP32(p_val); + } + uint8_t buf[4]; + encode_uint32(p_val,buf); + put_data(buf,4); + +} +void StreamPeer::put_u64(uint64_t p_val){ + + if (big_endian) { + p_val=BSWAP64(p_val); + } + uint8_t buf[8]; + encode_uint64(p_val,buf); + put_data(buf,8); + +} +void StreamPeer::put_64(int64_t p_val){ + + if (big_endian) { + p_val=BSWAP64(p_val); + } + uint8_t buf[8]; + encode_uint64(p_val,buf); + put_data(buf,8); + +} +void StreamPeer::put_float(float p_val){ + + uint8_t buf[4]; + + encode_float(p_val,buf); + if (big_endian) { + uint32_t *p32=(uint32_t *)buf; + *p32=BSWAP32(*p32); + } + + put_data(buf,4); + +} +void StreamPeer::put_double(double p_val){ + + uint8_t buf[8]; + encode_double(p_val,buf); + if (big_endian) { + uint64_t *p64=(uint64_t *)buf; + *p64=BSWAP64(*p64); + } + put_data(buf,8); + +} +void StreamPeer::put_utf8_string(const String& p_string) { + + CharString cs=p_string.utf8(); + put_data((const uint8_t*)cs.get_data(),cs.length()); + +} +void StreamPeer::put_var(const Variant& p_variant){ + + int len=0; + Vector buf; + encode_variant(p_variant,NULL,len); + buf.resize(len); + put_32(len); + encode_variant(p_variant,buf.ptr(),len); + put_data(buf.ptr(),buf.size()); + + +} + +uint8_t StreamPeer::get_u8(){ + + uint8_t buf[1]; + get_data(buf,1); + return buf[0]; +} +int8_t StreamPeer::get_8(){ + + uint8_t buf[1]; + get_data(buf,1); + return buf[0]; + +} +uint16_t StreamPeer::get_u16(){ + + uint8_t buf[2]; + get_data(buf,2); + uint16_t r = decode_uint16(buf); + if (big_endian) { + r=BSWAP16(r); + } + return r; + +} +int16_t StreamPeer::get_16(){ + + uint8_t buf[2]; + get_data(buf,2); + uint16_t r = decode_uint16(buf); + if (big_endian) { + r=BSWAP16(r); + } + return r; + +} +uint32_t StreamPeer::get_u32(){ + + uint8_t buf[4]; + get_data(buf,4); + uint32_t r = decode_uint32(buf); + if (big_endian) { + r=BSWAP32(r); + } + return r; + +} +int32_t StreamPeer::get_32(){ + + uint8_t buf[4]; + get_data(buf,4); + uint32_t r = decode_uint32(buf); + if (big_endian) { + r=BSWAP32(r); + } + return r; + +} +uint64_t StreamPeer::get_u64(){ + + uint8_t buf[8]; + get_data(buf,8); + uint64_t r = decode_uint64(buf); + if (big_endian) { + r=BSWAP64(r); + } + return r; + +} +int64_t StreamPeer::get_64(){ + + uint8_t buf[8]; + get_data(buf,8); + uint64_t r = decode_uint64(buf); + if (big_endian) { + r=BSWAP64(r); + } + return r; + +} +float StreamPeer::get_float(){ + + uint8_t buf[4]; + get_data(buf,4); + + if (big_endian) { + uint32_t *p32=(uint32_t *)buf; + *p32=BSWAP32(*p32); + } + + return decode_float(buf); +} + +float StreamPeer::get_double(){ + + uint8_t buf[8]; + get_data(buf,8); + + if (big_endian) { + uint64_t *p64=(uint64_t *)buf; + *p64=BSWAP64(*p64); + } + + return decode_double(buf); + +} +String StreamPeer::get_string(int p_bytes){ + + ERR_FAIL_COND_V(p_bytes<0,String()); + + Vector buf; + buf.resize(p_bytes+1); + get_data((uint8_t*)&buf[0],p_bytes); + buf[p_bytes]=0; + return buf.ptr(); + +} +String StreamPeer::get_utf8_string(int p_bytes){ + + ERR_FAIL_COND_V(p_bytes<0,String()); + ERR_FAIL_COND_V(p_bytes<0,String()); + + Vector buf; + buf.resize(p_bytes); + get_data(buf.ptr(),p_bytes); + + String ret; + ret.parse_utf8((const char*)buf.ptr(),buf.size()); + return ret; + +} +Variant StreamPeer::get_var(){ + + int len = get_32(); + Vector var; + var.resize(len); + get_data(var.ptr(),len); + + Variant ret; + decode_variant(ret,var.ptr(),len); + return ret; +} + void StreamPeer::_bind_methods() { @@ -123,4 +388,36 @@ void StreamPeer::_bind_methods() { ObjectTypeDB::bind_method(_MD("get_data","bytes"),&StreamPeer::_get_data); ObjectTypeDB::bind_method(_MD("get_partial_data","bytes"),&StreamPeer::_get_partial_data); + + ObjectTypeDB::bind_method(_MD("get_available_bytes"),&StreamPeer::get_available_bytes); + + ObjectTypeDB::bind_method(_MD("set_big_endian","enable"),&StreamPeer::set_big_endian); + ObjectTypeDB::bind_method(_MD("is_big_endian_enabled"),&StreamPeer::is_big_endian_enabled); + + ObjectTypeDB::bind_method(_MD("put_8","val"),&StreamPeer::put_8); + ObjectTypeDB::bind_method(_MD("put_u8","val"),&StreamPeer::put_u8); + ObjectTypeDB::bind_method(_MD("put_16","val"),&StreamPeer::put_16); + ObjectTypeDB::bind_method(_MD("put_u16","val"),&StreamPeer::put_u16); + ObjectTypeDB::bind_method(_MD("put_32","val"),&StreamPeer::put_32); + ObjectTypeDB::bind_method(_MD("put_u32","val"),&StreamPeer::put_u32); + ObjectTypeDB::bind_method(_MD("put_64","val"),&StreamPeer::put_64); + ObjectTypeDB::bind_method(_MD("put_u64","val"),&StreamPeer::put_u64); + ObjectTypeDB::bind_method(_MD("put_float","val"),&StreamPeer::put_float); + ObjectTypeDB::bind_method(_MD("put_double","val"),&StreamPeer::put_double); + ObjectTypeDB::bind_method(_MD("put_utf8_string","val"),&StreamPeer::put_utf8_string); + ObjectTypeDB::bind_method(_MD("put_var","val:var"),&StreamPeer::put_var); + + ObjectTypeDB::bind_method(_MD("get_8"),&StreamPeer::get_8); + ObjectTypeDB::bind_method(_MD("get_u8"),&StreamPeer::get_u8); + ObjectTypeDB::bind_method(_MD("get_16"),&StreamPeer::get_16); + ObjectTypeDB::bind_method(_MD("get_u16"),&StreamPeer::get_u16); + ObjectTypeDB::bind_method(_MD("get_32"),&StreamPeer::get_32); + ObjectTypeDB::bind_method(_MD("get_u32"),&StreamPeer::get_u32); + ObjectTypeDB::bind_method(_MD("get_64"),&StreamPeer::get_64); + ObjectTypeDB::bind_method(_MD("get_u64"),&StreamPeer::get_u64); + ObjectTypeDB::bind_method(_MD("get_float"),&StreamPeer::get_float); + ObjectTypeDB::bind_method(_MD("get_double"),&StreamPeer::get_double); + ObjectTypeDB::bind_method(_MD("get_string","bytes"),&StreamPeer::get_string); + ObjectTypeDB::bind_method(_MD("get_utf8_string","bytes"),&StreamPeer::get_utf8_string); + ObjectTypeDB::bind_method(_MD("get_var:var"),&StreamPeer::get_var); } diff --git a/core/io/stream_peer.h b/core/io/stream_peer.h index e83fc71b93..2bb8f731b2 100644 --- a/core/io/stream_peer.h +++ b/core/io/stream_peer.h @@ -44,6 +44,8 @@ protected: Array _get_data(int p_bytes); Array _get_partial_data(int p_bytes); + bool big_endian; + public: virtual Error put_data(const uint8_t* p_data,int p_bytes)=0; ///< put a whole chunk of data, blocking until it sent @@ -52,7 +54,41 @@ public: virtual Error get_data(uint8_t* p_buffer, int p_bytes)=0; ///< read p_bytes of data, if p_bytes > available, it will block virtual Error get_partial_data(uint8_t* p_buffer, int p_bytes,int &r_received)=0; ///< read as much data as p_bytes into buffer, if less was read, return in r_received - StreamPeer() {} + virtual int get_available_bytes() const=0; + + void set_big_endian(bool p_enable); + bool is_big_endian_enabled() const; + + void put_8(int8_t p_val); + void put_u8(uint8_t p_val); + void put_16(int16_t p_val); + void put_u16(uint16_t p_val); + void put_32(int32_t p_val); + void put_u32(uint32_t p_val); + void put_64(int64_t p_val); + void put_u64(uint64_t p_val); + void put_float(float p_val); + void put_double(double p_val); + void put_utf8_string(const String& p_string); + void put_var(const Variant& p_variant); + + uint8_t get_u8(); + int8_t get_8(); + uint16_t get_u16(); + int16_t get_16(); + uint32_t get_u32(); + int32_t get_32(); + uint64_t get_u64(); + int64_t get_64(); + float get_float(); + float get_double(); + String get_string(int p_bytes); + String get_utf8_string(int p_bytes); + Variant get_var(); + + + + StreamPeer() { big_endian=false; } }; #endif // STREAM_PEER_H diff --git a/core/typedefs.h b/core/typedefs.h index 6ca31fd137..460b2e2110 100644 --- a/core/typedefs.h +++ b/core/typedefs.h @@ -197,10 +197,22 @@ static inline int get_shift_from_power_of_2( unsigned int p_pixel ) { return -1; } +/** Swap 16 bits value for endianness */ +static inline uint16_t BSWAP16(uint16_t x) { + return (x>>8)|(x<<8); +} /** Swap 32 bits value for endianness */ static inline uint32_t BSWAP32(uint32_t x) { return((x<<24)|((x<<8)&0x00FF0000)|((x>>8)&0x0000FF00)|(x>>24)); } +/** Swap 64 bits value for endianness */ + +static inline uint64_t BSWAP64(uint64_t x) { + x = (x & 0x00000000FFFFFFFF) << 32 | (x & 0xFFFFFFFF00000000) >> 32; + x = (x & 0x0000FFFF0000FFFF) << 16 | (x & 0xFFFF0000FFFF0000) >> 16; + x = (x & 0x00FF00FF00FF00FF) << 8 | (x & 0xFF00FF00FF00FF00) >> 8; + return x; +} /** When compiling with RTTI, we can add an "extra" * layer of safeness in many operations, so dynamic_cast diff --git a/drivers/openssl/stream_peer_openssl.cpp b/drivers/openssl/stream_peer_openssl.cpp index ef07f11334..81795fdc60 100644 --- a/drivers/openssl/stream_peer_openssl.cpp +++ b/drivers/openssl/stream_peer_openssl.cpp @@ -479,6 +479,13 @@ Error StreamPeerOpenSSL::get_partial_data(uint8_t* p_buffer, int p_bytes,int &r_ return OK; } +int StreamPeerOpenSSL::get_available_bytes() const { + + ERR_FAIL_COND_V(!connected,0); + + return SSL_pending(ssl); + +} StreamPeerOpenSSL::StreamPeerOpenSSL() { ctx=NULL; diff --git a/drivers/openssl/stream_peer_openssl.h b/drivers/openssl/stream_peer_openssl.h index a66b641dd4..64f5a1d7ac 100644 --- a/drivers/openssl/stream_peer_openssl.h +++ b/drivers/openssl/stream_peer_openssl.h @@ -71,6 +71,8 @@ public: virtual Error get_data(uint8_t* p_buffer, int p_bytes); virtual Error get_partial_data(uint8_t* p_buffer, int p_bytes,int &r_received); + virtual int get_available_bytes() const; + static void initialize_ssl(); static void finalize_ssl(); diff --git a/drivers/unix/stream_peer_tcp_posix.cpp b/drivers/unix/stream_peer_tcp_posix.cpp index 5aa3915893..edf5e02971 100644 --- a/drivers/unix/stream_peer_tcp_posix.cpp +++ b/drivers/unix/stream_peer_tcp_posix.cpp @@ -38,6 +38,7 @@ #include #include #include +#include #ifndef NO_FCNTL #ifdef __HAIKU__ #include @@ -367,6 +368,14 @@ Error StreamPeerTCPPosix::get_partial_data(uint8_t* p_buffer, int p_bytes,int &r return read(p_buffer, p_bytes, r_received, false); }; +int StreamPeerTCPPosix::get_available_bytes() const { + + unsigned long len; + int ret = ioctl(sockfd,FIONREAD,&len); + ERR_FAIL_COND_V(ret==-1,0) + return len; + +} IP_Address StreamPeerTCPPosix::get_connected_host() const { return peer_host; diff --git a/drivers/unix/stream_peer_tcp_posix.h b/drivers/unix/stream_peer_tcp_posix.h index 9b1716ac42..817f24c91c 100644 --- a/drivers/unix/stream_peer_tcp_posix.h +++ b/drivers/unix/stream_peer_tcp_posix.h @@ -67,6 +67,8 @@ public: virtual Error get_data(uint8_t* p_buffer, int p_bytes); virtual Error get_partial_data(uint8_t* p_buffer, int p_bytes,int &r_received); + virtual int get_available_bytes() const; + void set_socket(int p_sockfd, IP_Address p_host, int p_port); virtual IP_Address get_connected_host() const; diff --git a/platform/windows/stream_peer_winsock.cpp b/platform/windows/stream_peer_winsock.cpp index e8245c92e5..5bc3e34107 100644 --- a/platform/windows/stream_peer_winsock.cpp +++ b/platform/windows/stream_peer_winsock.cpp @@ -342,6 +342,14 @@ void StreamPeerWinsock::set_nodelay(bool p_enabled) { setsockopt(sockfd, IPPROTO_TCP, TCP_NODELAY, (char*)&flag, sizeof(int)); } +int StreamPeerWinsock::get_available_bytes() const { + + unsigned long len; + int ret = ioctlsocket(sockfd,FIONREAD,&len); + ERR_FAIL_COND_V(ret==-1,0) + return len; + +} IP_Address StreamPeerWinsock::get_connected_host() const { diff --git a/platform/windows/stream_peer_winsock.h b/platform/windows/stream_peer_winsock.h index 373b502d2c..5dd836aa0c 100644 --- a/platform/windows/stream_peer_winsock.h +++ b/platform/windows/stream_peer_winsock.h @@ -66,6 +66,8 @@ public: virtual Error get_data(uint8_t* p_buffer, int p_bytes); virtual Error get_partial_data(uint8_t* p_buffer, int p_bytes,int &r_received); + virtual int get_available_bytes() const; + void set_socket(int p_sockfd, IP_Address p_host, int p_port); virtual IP_Address get_connected_host() const; diff --git a/tools/doc/doc_data.cpp b/tools/doc/doc_data.cpp index c1d3e5e314..3161e380b9 100644 --- a/tools/doc/doc_data.cpp +++ b/tools/doc/doc_data.cpp @@ -187,14 +187,13 @@ void DocData::generate(bool p_basic_types) { arginfo=E->get().return_val; - if (arginfo.type==Variant::NIL) - continue; #ifdef DEBUG_METHODS_ENABLED if (m && m->get_return_type()!=StringName()) method.return_type=m->get_return_type(); - else + else if (arginfo.type!=Variant::NIL) { #endif method.return_type=(arginfo.hint==PROPERTY_HINT_RESOURCE_TYPE)?arginfo.hint_string:Variant::get_type_name(arginfo.type); + } } else { diff --git a/tools/editor/io_plugins/editor_export_scene.cpp b/tools/editor/io_plugins/editor_export_scene.cpp index cd5c34e53b..dff41a59ed 100644 --- a/tools/editor/io_plugins/editor_export_scene.cpp +++ b/tools/editor/io_plugins/editor_export_scene.cpp @@ -100,7 +100,7 @@ Vector EditorSceneExportPlugin::custom_export(String& p_path,const Ref< Vector ret = FileAccess::get_file_as_array(tmp_path+"scnexp-"+md5+".scn"); - p_path+=".optimized.scn"; + p_path+=".converted.scn"; return ret; diff --git a/tools/editor/io_plugins/editor_sample_import_plugin.cpp b/tools/editor/io_plugins/editor_sample_import_plugin.cpp index 7888246956..28eeb56b4b 100644 --- a/tools/editor/io_plugins/editor_sample_import_plugin.cpp +++ b/tools/editor/io_plugins/editor_sample_import_plugin.cpp @@ -859,7 +859,7 @@ Vector EditorSampleExportPlugin::custom_export(String& p_path,const Ref ERR_FAIL_COND_V(err!=OK,Vector()); - p_path=p_path.basename()+".smp"; + p_path=p_path.basename()+".converted.smp"; return FileAccess::get_file_as_array(savepath); } diff --git a/tools/editor/io_plugins/editor_texture_import_plugin.cpp b/tools/editor/io_plugins/editor_texture_import_plugin.cpp index 8d5a4f1dcf..92ef57a69e 100644 --- a/tools/editor/io_plugins/editor_texture_import_plugin.cpp +++ b/tools/editor/io_plugins/editor_texture_import_plugin.cpp @@ -1666,7 +1666,7 @@ EditorTextureImportPlugin::EditorTextureImportPlugin(EditorNode *p_editor, Mode if (pl.is_valid()) { Vector ce = pl->custom_export(p_path,p_platform); if (ce.size()) { - p_path=p_path.basename()+".tex"; + p_path=p_path.basename()+".converted.tex"; return ce; } } @@ -1680,7 +1680,7 @@ EditorTextureImportPlugin::EditorTextureImportPlugin(EditorNode *p_editor, Mode if (pl.is_valid()) { Vector ce = pl->custom_export(p_path,p_platform); if (ce.size()) { - p_path=p_path.basename()+".tex"; + p_path=p_path.basename()+".converted.tex"; return ce; } } -- cgit v1.2.3 From 39f345a9ae12d99cee50059293fc9dc8eee4ef41 Mon Sep 17 00:00:00 2001 From: Juan Linietsky Date: Sun, 13 Dec 2015 14:15:55 -0300 Subject: -deprecated pcz, replaced by just zip. Closes #2879 --- core/globals.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/core/globals.cpp b/core/globals.cpp index aee708d0cd..0a6a1876b3 100644 --- a/core/globals.cpp +++ b/core/globals.cpp @@ -309,7 +309,7 @@ Error Globals::setup(const String& p_path,const String & p_main_pack) { print_line("has res dir: "+resource_path); if (!_load_resource_pack("res://data.pck")) - _load_resource_pack("res://data.pcz"); + _load_resource_pack("res://data.zip"); // make sure this is load from the resource path print_line("exists engine cfg? "+itos(FileAccess::exists("/engine.cfg"))); if (_load_settings("res://engine.cfg")==OK || _load_settings_binary("res://engine.cfb")==OK) { @@ -340,7 +340,7 @@ Error Globals::setup(const String& p_path,const String & p_main_pack) { //try to load settings in ascending through dirs shape! //tries to open pack, but only first time - if (first_time && (_load_resource_pack(current_dir+"/"+exec_name+".pck") || _load_resource_pack(current_dir+"/"+exec_name+".pcz") )) { + if (first_time && (_load_resource_pack(current_dir+"/"+exec_name+".pck") || _load_resource_pack(current_dir+"/"+exec_name+".zip") )) { if (_load_settings("res://engine.cfg")==OK || _load_settings_binary("res://engine.cfb")==OK) { _load_settings("res://override.cfg"); @@ -349,7 +349,7 @@ Error Globals::setup(const String& p_path,const String & p_main_pack) { } break; - } else if (first_time && (_load_resource_pack(current_dir+"/data.pck") || _load_resource_pack(current_dir+"/data.pcz") )) { + } else if (first_time && (_load_resource_pack(current_dir+"/data.pck") || _load_resource_pack(current_dir+"/data.zip") )) { if (_load_settings("res://engine.cfg")==OK || _load_settings_binary("res://engine.cfb")==OK) { _load_settings("res://override.cfg"); -- cgit v1.2.3 From 7c39ebd05cbead99ead5b29021d8b83468a39d4d Mon Sep 17 00:00:00 2001 From: Juan Linietsky Date: Sun, 13 Dec 2015 15:20:58 -0300 Subject: -hash dictionaries properly instead of using pointer, fixes #2880 --- core/dictionary.cpp | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/core/dictionary.cpp b/core/dictionary.cpp index b2d31f230d..c544573629 100644 --- a/core/dictionary.cpp +++ b/core/dictionary.cpp @@ -160,7 +160,20 @@ void Dictionary::_unref() const { } uint32_t Dictionary::hash() const { - return hash_djb2_one_64(make_uint64_t(_p)); + uint32_t h=hash_djb2_one_32(Variant::DICTIONARY); + + List keys; + get_key_list(&keys); + + for (List::Element *E=keys.front();E;E=E->next()) { + + h = hash_djb2_one_32( E->get().hash(), h); + h = hash_djb2_one_32( operator[](E->get()).hash(), h); + + } + + + return h; } Array Dictionary::keys() const { -- cgit v1.2.3 From 72ff61963b207cc41664f7aeb39448d0a2f8369f Mon Sep 17 00:00:00 2001 From: Juan Linietsky Date: Sun, 13 Dec 2015 17:16:13 -0300 Subject: fixed and improved selection and list selection, closes #2852 --- tools/editor/icons/icon_list_select.png | Bin 0 -> 470 bytes tools/editor/plugins/canvas_item_editor_plugin.cpp | 141 +++++++++++++-------- tools/editor/plugins/canvas_item_editor_plugin.h | 3 + tools/editor/plugins/spatial_editor_plugin.cpp | 134 +++++++++++++------- tools/editor/plugins/spatial_editor_plugin.h | 8 +- 5 files changed, 184 insertions(+), 102 deletions(-) create mode 100644 tools/editor/icons/icon_list_select.png diff --git a/tools/editor/icons/icon_list_select.png b/tools/editor/icons/icon_list_select.png new file mode 100644 index 0000000000..cbe81d4328 Binary files /dev/null and b/tools/editor/icons/icon_list_select.png differ diff --git a/tools/editor/plugins/canvas_item_editor_plugin.cpp b/tools/editor/plugins/canvas_item_editor_plugin.cpp index a3164fc524..0946383c8d 100644 --- a/tools/editor/plugins/canvas_item_editor_plugin.cpp +++ b/tools/editor/plugins/canvas_item_editor_plugin.cpp @@ -221,7 +221,7 @@ void CanvasItemEditor::_unhandled_key_input(const InputEvent& p_ev) { void CanvasItemEditor::_tool_select(int p_index) { - ToolButton *tb[TOOL_MAX]={select_button,move_button,rotate_button,pan_button}; + ToolButton *tb[TOOL_MAX]={select_button,list_select_button,move_button,rotate_button,pan_button}; for(int i=0;iset_pressed(i==p_index); @@ -938,6 +938,75 @@ bool CanvasItemEditor::get_remove_list(List *p_list) { } +void CanvasItemEditor::_list_select(const InputEventMouseButton& b) { + + Point2 click=Point2(b.x,b.y); + + Node* scene = editor->get_edited_scene(); + if (!scene) + return; + + _find_canvas_items_at_pos(click, scene,transform,Matrix32(), selection_results); + + for(int i=0;iget_owner()!=scene && !scene->is_editable_instance(item->get_owner())) { + //invalid result + selection_results.remove(i); + i--; + } + + } + + if (selection_results.size() == 1) { + + CanvasItem *item = selection_results[0].item; + selection_results.clear(); + + additive_selection=b.mod.shift; + if (!_select(item, click, additive_selection, false)) + return; + + } else if (!selection_results.empty()) { + + selection_results.sort(); + + NodePath root_path = get_tree()->get_edited_scene_root()->get_path(); + StringName root_name = root_path.get_name(root_path.get_name_count()-1); + + for (int i = 0; i < selection_results.size(); i++) { + + CanvasItem *item=selection_results[i].item; + + + Ref icon; + if (item->has_meta("_editor_icon")) + icon=item->get_meta("_editor_icon"); + else + icon=get_icon( has_icon(item->get_type(),"EditorIcons")?item->get_type():String("Object"),"EditorIcons"); + + String node_path="/"+root_name+"/"+root_path.rel_path_to(item->get_path()); + + selection_menu->add_item(item->get_name()); + selection_menu->set_item_icon(i, icon ); + selection_menu->set_item_metadata(i, node_path); + selection_menu->set_item_tooltip(i,String(item->get_name())+ + "\nType: "+item->get_type()+"\nPath: "+node_path); + } + + additive_selection=b.mod.shift; + + selection_menu->set_global_pos(Vector2( b.global_x, b.global_y )); + selection_menu->popup(); + selection_menu->call_deferred("grab_click_focus"); + selection_menu->set_invalidate_click_until_motion(); + + + return; + } + +} + void CanvasItemEditor::_viewport_input_event(const InputEvent& p_event) { { @@ -993,59 +1062,11 @@ void CanvasItemEditor::_viewport_input_event(const InputEvent& p_event) { if (b.button_index==BUTTON_RIGHT) { - if (b.pressed && tool==TOOL_SELECT && b.mod.alt) { - - Point2 click=Point2(b.x,b.y); - - Node* scene = editor->get_edited_scene(); - if (!scene) - return; - - _find_canvas_items_at_pos(click, scene,transform,Matrix32(), selection_results); - - if (selection_results.size() == 1) { - - CanvasItem *item = selection_results[0].item; - selection_results.clear(); - - additive_selection=b.mod.shift; - if (!_select(item, click, additive_selection, false)) - return; - - } else if (!selection_results.empty()) { - - selection_results.sort(); - - NodePath root_path = get_tree()->get_edited_scene_root()->get_path(); - StringName root_name = root_path.get_name(root_path.get_name_count()-1); - for (int i = 0; i < selection_results.size(); i++) { + if (b.pressed && (tool==TOOL_SELECT && b.mod.alt)) { - CanvasItem *item=selection_results[i].item; - - Ref icon; - if (item->has_meta("_editor_icon")) - icon=item->get_meta("_editor_icon"); - else - icon=get_icon( has_icon(item->get_type(),"EditorIcons")?item->get_type():String("Object"),"EditorIcons"); - - String node_path="/"+root_name+"/"+root_path.rel_path_to(item->get_path()); - - selection_menu->add_item(item->get_name()); - selection_menu->set_item_icon(i, icon ); - selection_menu->set_item_metadata(i, node_path); - selection_menu->set_item_tooltip(i,String(item->get_name())+ - "\nType: "+item->get_type()+"\nPath: "+node_path); - } - - additive_selection=b.mod.shift; - - selection_menu->set_global_pos(Vector2( b.global_x, b.global_y )); - selection_menu->popup(); - selection_menu->call_deferred("grab_click_focus"); - - return; - } + _list_select(b); + return; } if (get_item_count() > 0 && drag!=DRAG_NONE) { @@ -1103,6 +1124,12 @@ void CanvasItemEditor::_viewport_input_event(const InputEvent& p_event) { //if (!canvas_items.size()) // return; + if (b.button_index==BUTTON_LEFT && tool==TOOL_LIST_SELECT) { + if (b.pressed) + _list_select(b); + return; + } + if (tool==TOOL_PAN || b.button_index!=BUTTON_LEFT || Input::get_singleton()->is_key_pressed(KEY_SPACE)) return; @@ -2118,6 +2145,7 @@ void CanvasItemEditor::_notification(int p_what) { } select_button->set_icon( get_icon("ToolSelect","EditorIcons")); + list_select_button->set_icon( get_icon("ListSelect","EditorIcons")); move_button->set_icon( get_icon("ToolMove","EditorIcons")); rotate_button->set_icon( get_icon("ToolRotate","EditorIcons")); pan_button->set_icon( get_icon("ToolPan", "EditorIcons")); @@ -3155,7 +3183,8 @@ CanvasItemEditor::CanvasItemEditor(EditorNode *p_editor) { hb->add_child(select_button); select_button->connect("pressed",this,"_tool_select",make_binds(TOOL_SELECT)); select_button->set_pressed(true); - select_button->set_tooltip("Select Mode (Q)\n"+keycode_get_string(KEY_MASK_CMD)+"Drag: Rotate\nAlt+Drag: Move\nPress 'v' to Change Pivot, 'Shift+v' to Drag Pivot (while moving)."); + select_button->set_tooltip("Select Mode (Q)\n"+keycode_get_string(KEY_MASK_CMD)+"Drag: Rotate\nAlt+Drag: Move\nPress 'v' to Change Pivot, 'Shift+v' to Drag Pivot (while moving).\nAlt+RMB: Depth list selection"); + move_button = memnew( ToolButton ); move_button->set_toggle_mode(true); @@ -3171,6 +3200,12 @@ CanvasItemEditor::CanvasItemEditor(EditorNode *p_editor) { hb->add_child(memnew(VSeparator)); + list_select_button = memnew( ToolButton ); + list_select_button->set_toggle_mode(true); + hb->add_child(list_select_button); + list_select_button->connect("pressed",this,"_tool_select",make_binds(TOOL_LIST_SELECT)); + list_select_button->set_tooltip("Show a list of all objects at the position clicked\n(same as Alt+RMB in selet mode)."); + pan_button = memnew( ToolButton ); pan_button->set_toggle_mode(true); hb->add_child(pan_button); diff --git a/tools/editor/plugins/canvas_item_editor_plugin.h b/tools/editor/plugins/canvas_item_editor_plugin.h index b96d36f7dc..2376e9f842 100644 --- a/tools/editor/plugins/canvas_item_editor_plugin.h +++ b/tools/editor/plugins/canvas_item_editor_plugin.h @@ -67,6 +67,7 @@ class CanvasItemEditor : public VBoxContainer { enum Tool { TOOL_SELECT, + TOOL_LIST_SELECT, TOOL_MOVE, TOOL_ROTATE, TOOL_PAN, @@ -240,6 +241,7 @@ class CanvasItemEditor : public VBoxContainer { List pose_clipboard; ToolButton *select_button; + ToolButton *list_select_button; ToolButton *move_button; ToolButton *rotate_button; @@ -309,6 +311,7 @@ class CanvasItemEditor : public VBoxContainer { void _clear_canvas_items(); void _visibility_changed(ObjectID p_canvas_item); void _key_move(const Vector2& p_dir, bool p_snap, KeyMoveMODE p_move_mode); + void _list_select(const InputEventMouseButton& b); DragType _find_drag_type(const Matrix32& p_xform, const Rect2& p_local_rect, const Point2& p_click, Vector2& r_point); diff --git a/tools/editor/plugins/spatial_editor_plugin.cpp b/tools/editor/plugins/spatial_editor_plugin.cpp index 7816efe89f..92ad991d96 100644 --- a/tools/editor/plugins/spatial_editor_plugin.cpp +++ b/tools/editor/plugins/spatial_editor_plugin.cpp @@ -736,6 +736,68 @@ void SpatialEditorViewport::_smouseenter() { surface->grab_focus(); } +void SpatialEditorViewport::_list_select(InputEventMouseButton b) { + + _find_items_at_pos(Vector2( b.x, b.y ),clicked_includes_current,selection_results,b.mod.shift); + + Node *scene=editor->get_edited_scene(); + + for(int i=0;iget_owner()!=scene && !scene->is_editable_instance(item->get_owner())) { + //invalid result + selection_results.remove(i); + i--; + } + + } + + + clicked_wants_append=b.mod.shift; + + if (selection_results.size() == 1) { + + clicked=selection_results[0].item->get_instance_ID(); + selection_results.clear(); + + if (clicked) { + _select_clicked(clicked_wants_append,true); + clicked=0; + } + + } else if (!selection_results.empty()) { + + NodePath root_path = get_tree()->get_edited_scene_root()->get_path(); + StringName root_name = root_path.get_name(root_path.get_name_count()-1); + + for (int i = 0; i < selection_results.size(); i++) { + + Spatial *spat=selection_results[i].item; + + Ref icon; + if (spat->has_meta("_editor_icon")) + icon=spat->get_meta("_editor_icon"); + else + icon=get_icon( has_icon(spat->get_type(),"EditorIcons")?spat->get_type():String("Object"),"EditorIcons"); + + String node_path="/"+root_name+"/"+root_path.rel_path_to(spat->get_path()); + + selection_menu->add_item(spat->get_name()); + selection_menu->set_item_icon(i, icon ); + selection_menu->set_item_metadata(i, node_path); + selection_menu->set_item_tooltip(i,String(spat->get_name())+ + "\nType: "+spat->get_type()+"\nPath: "+node_path); + } + + selection_menu->set_global_pos(Vector2( b.global_x, b.global_y )); + selection_menu->popup(); + selection_menu->call_deferred("grab_click_focus"); + selection_menu->set_invalidate_click_until_motion(); + + + + } +} void SpatialEditorViewport::_sinput(const InputEvent &p_event) { if (previewing) @@ -868,50 +930,9 @@ void SpatialEditorViewport::_sinput(const InputEvent &p_event) { if (nav_scheme == NAVIGATION_MAYA) break; - _find_items_at_pos(Vector2( b.x, b.y ),clicked_includes_current,selection_results,b.mod.shift); - - clicked_wants_append=b.mod.shift; - - if (selection_results.size() == 1) { - - clicked=selection_results[0].item->get_instance_ID(); - selection_results.clear(); - - if (clicked) { - _select_clicked(clicked_wants_append,true); - clicked=0; - } - - } else if (!selection_results.empty()) { - - NodePath root_path = get_tree()->get_edited_scene_root()->get_path(); - StringName root_name = root_path.get_name(root_path.get_name_count()-1); - - for (int i = 0; i < selection_results.size(); i++) { - - Spatial *spat=selection_results[i].item; - - Ref icon; - if (spat->has_meta("_editor_icon")) - icon=spat->get_meta("_editor_icon"); - else - icon=get_icon( has_icon(spat->get_type(),"EditorIcons")?spat->get_type():String("Object"),"EditorIcons"); + _list_select(b); + return; - String node_path="/"+root_name+"/"+root_path.rel_path_to(spat->get_path()); - - selection_menu->add_item(spat->get_name()); - selection_menu->set_item_icon(i, icon ); - selection_menu->set_item_metadata(i, node_path); - selection_menu->set_item_tooltip(i,String(spat->get_name())+ - "\nType: "+spat->get_type()+"\nPath: "+node_path); - } - - selection_menu->set_global_pos(Vector2( b.global_x, b.global_y )); - selection_menu->popup(); - selection_menu->call_deferred("grab_click_focus"); - - break; - } } } @@ -984,6 +1005,11 @@ void SpatialEditorViewport::_sinput(const InputEvent &p_event) { break; } + if (spatial_editor->get_tool_mode()==SpatialEditor::TOOL_MODE_LIST_SELECT) { + _list_select(b); + break; + } + _edit.mouse_pos=Point2(b.x,b.y); _edit.snap=false; _edit.mode=TRANSFORM_NONE; @@ -2841,13 +2867,14 @@ void SpatialEditor::_menu_item_pressed(int p_option) { case MENU_TOOL_SELECT: case MENU_TOOL_MOVE: case MENU_TOOL_ROTATE: - case MENU_TOOL_SCALE: { + case MENU_TOOL_SCALE: + case MENU_TOOL_LIST_SELECT: { - for(int i=0;i<4;i++) + for(int i=0;iset_pressed(i==p_option); tool_mode=(ToolMode)p_option; - static const char *_mode[]={"Selection Mode.","Translation Mode.","Rotation Mode.","Scale Mode."}; + static const char *_mode[]={"Selection Mode.","Translation Mode.","Rotation Mode.","Scale Mode.","List Selection Mode."}; // set_message(_mode[p_option],3); update_transform_gizmo(); @@ -3530,6 +3557,7 @@ void SpatialEditor::_notification(int p_what) { tool_button[SpatialEditor::TOOL_MODE_MOVE]->set_icon( get_icon("ToolMove","EditorIcons") ); tool_button[SpatialEditor::TOOL_MODE_ROTATE]->set_icon( get_icon("ToolRotate","EditorIcons") ); tool_button[SpatialEditor::TOOL_MODE_SCALE]->set_icon( get_icon("ToolScale","EditorIcons") ); + tool_button[SpatialEditor::TOOL_MODE_LIST_SELECT]->set_icon( get_icon("ListSelect","EditorIcons") ); instance_button->set_icon( get_icon("SpatialAdd","EditorIcons") ); instance_button->hide(); @@ -3807,7 +3835,7 @@ SpatialEditor::SpatialEditor(EditorNode *p_editor) { tool_button[TOOL_MODE_SELECT]->set_pressed(true); button_binds[0]=MENU_TOOL_SELECT; tool_button[TOOL_MODE_SELECT]->connect("pressed", this,"_menu_item_pressed",button_binds); - tool_button[TOOL_MODE_SELECT]->set_tooltip("Select Mode (Q)"); + tool_button[TOOL_MODE_SELECT]->set_tooltip("Select Mode (Q)\n"+keycode_get_string(KEY_MASK_CMD)+"Drag: Rotate\nAlt+Drag: Move\nAlt+RMB: Depth list selection"); tool_button[TOOL_MODE_MOVE] = memnew( ToolButton ); @@ -3839,10 +3867,22 @@ SpatialEditor::SpatialEditor(EditorNode *p_editor) { hbc_menu->add_child( instance_button ); instance_button->set_flat(true); instance_button->connect("pressed",this,"_instance_scene"); + instance_button->hide(); VSeparator *vs = memnew( VSeparator ); hbc_menu->add_child(vs); + tool_button[TOOL_MODE_LIST_SELECT] = memnew( ToolButton ); + hbc_menu->add_child( tool_button[TOOL_MODE_LIST_SELECT] ); + tool_button[TOOL_MODE_LIST_SELECT]->set_toggle_mode(true); + tool_button[TOOL_MODE_LIST_SELECT]->set_flat(true); + button_binds[0]=MENU_TOOL_LIST_SELECT; + tool_button[TOOL_MODE_LIST_SELECT]->connect("pressed", this,"_menu_item_pressed",button_binds); + tool_button[TOOL_MODE_LIST_SELECT]->set_tooltip("Show a list of all objects at the position clicked\n(same as Alt+RMB in selet mode)."); + + vs = memnew( VSeparator ); + hbc_menu->add_child(vs); + PopupMenu *p; diff --git a/tools/editor/plugins/spatial_editor_plugin.h b/tools/editor/plugins/spatial_editor_plugin.h index ebd3f77fe7..e7ea14ba6a 100644 --- a/tools/editor/plugins/spatial_editor_plugin.h +++ b/tools/editor/plugins/spatial_editor_plugin.h @@ -239,6 +239,7 @@ private: void _finish_gizmo_instances(); void _selection_result_pressed(int); void _selection_menu_hide(); + void _list_select(InputEventMouseButton b); protected: @@ -287,7 +288,9 @@ public: TOOL_MODE_SELECT, TOOL_MODE_MOVE, TOOL_MODE_ROTATE, - TOOL_MODE_SCALE + TOOL_MODE_SCALE, + TOOL_MODE_LIST_SELECT, + TOOL_MAX }; @@ -369,6 +372,7 @@ private: MENU_TOOL_MOVE, MENU_TOOL_ROTATE, MENU_TOOL_SCALE, + MENU_TOOL_LIST_SELECT, MENU_TRANSFORM_USE_SNAP, MENU_TRANSFORM_CONFIGURE_SNAP, MENU_TRANSFORM_LOCAL_COORDS, @@ -392,7 +396,7 @@ private: }; - Button *tool_button[4]; + Button *tool_button[TOOL_MAX]; Button *instance_button; -- cgit v1.2.3 From 7f96f0603e16a970c7b0ea1fba936e56baf80d4a Mon Sep 17 00:00:00 2001 From: Juan Linietsky Date: Sun, 13 Dec 2015 20:39:01 -0300 Subject: -scenes are properly reloaded when a dependency changes, fixes #2896 (it's clevery done so local changes to scenes are kept even if unsaved) --- core/resource.h | 2 +- scene/resources/packed_scene.cpp | 11 +++++ scene/resources/packed_scene.h | 10 ++++ tools/editor/editor_data.cpp | 90 +++++++++++++++++++++++++++++++++++ tools/editor/editor_data.h | 3 ++ tools/editor/editor_import_export.cpp | 1 + tools/editor/editor_node.cpp | 29 ++++++++++- tools/editor/editor_node.h | 1 + 8 files changed, 145 insertions(+), 2 deletions(-) diff --git a/core/resource.h b/core/resource.h index 3596abe673..cd28a51755 100644 --- a/core/resource.h +++ b/core/resource.h @@ -144,7 +144,7 @@ public: #ifdef TOOLS_ENABLED - void set_last_modified_time(uint64_t p_time) { last_modified_time=p_time; } + virtual void set_last_modified_time(uint64_t p_time) { last_modified_time=p_time; } uint64_t get_last_modified_time() const { return last_modified_time; } #endif diff --git a/scene/resources/packed_scene.cpp b/scene/resources/packed_scene.cpp index f8283bb5ca..443d1630a7 100644 --- a/scene/resources/packed_scene.cpp +++ b/scene/resources/packed_scene.cpp @@ -1537,6 +1537,7 @@ void SceneState::add_editable_instance(const NodePath& p_path){ SceneState::SceneState() { base_scene_idx=-1; + last_modified_time=0; } @@ -1596,6 +1597,15 @@ Node *PackedScene::instance(bool p_gen_edit_state) const { return s; } +void PackedScene::recreate_state() { + + state = Ref( memnew( SceneState )); + state->set_path(get_path()); +#ifdef TOOLS_ENABLED + state->set_last_modified_time(get_last_modified_time()); +#endif +} + Ref PackedScene::get_state() { return state; @@ -1607,6 +1617,7 @@ void PackedScene::set_path(const String& p_path,bool p_take_over) { Resource::set_path(p_path,p_take_over); } + void PackedScene::_bind_methods() { ObjectTypeDB::bind_method(_MD("pack","path:Node"),&PackedScene::pack); diff --git a/scene/resources/packed_scene.h b/scene/resources/packed_scene.h index f3ec0afb6d..67d0f4ba01 100644 --- a/scene/resources/packed_scene.h +++ b/scene/resources/packed_scene.h @@ -99,6 +99,8 @@ class SceneState : public Reference { String path; + uint64_t last_modified_time; + _FORCE_INLINE_ Ref _get_base_scene_state() const; static bool disable_placeholders; @@ -162,6 +164,9 @@ public: void add_connection(int p_from,int p_to, int p_signal, int p_method, int p_flags,const Vector& p_binds); void add_editable_instance(const NodePath& p_path); + virtual void set_last_modified_time(uint64_t p_time) { last_modified_time=p_time; } + uint64_t get_last_modified_time() const { return last_modified_time; } + SceneState(); }; @@ -189,8 +194,13 @@ public: bool can_instance() const; Node *instance(bool p_gen_edit_state=false) const; + void recreate_state(); + virtual void set_path(const String& p_path,bool p_take_over=false); +#ifdef TOOLS_ENABLED + virtual void set_last_modified_time(uint64_t p_time) { state->set_last_modified_time(p_time); } +#endif Ref get_state(); PackedScene(); diff --git a/tools/editor/editor_data.cpp b/tools/editor/editor_data.cpp index a6aedf2706..e9f9e09acd 100644 --- a/tools/editor/editor_data.cpp +++ b/tools/editor/editor_data.cpp @@ -31,6 +31,9 @@ #include "editor_settings.h" #include "os/dir_access.h" #include "io/resource_loader.h" +#include "scene/resources/packed_scene.h" +#include "os/file_access.h" +#include "editor_node.h" void EditorHistory::_cleanup_history() { @@ -493,6 +496,93 @@ void EditorData::remove_scene(int p_idx){ edited_scene.remove(p_idx); } + +bool EditorData::_find_updated_instances(Node* p_root,Node *p_node,Set &checked_paths) { + + if (p_root!=p_node && p_node->get_owner()!=p_root && !p_root->is_editable_instance(p_node->get_owner())) + return false; + + Ref ss; + + if (p_node==p_root) { + ss=p_node->get_scene_inherited_state(); + } else if (p_node->get_filename()!=String()){ + ss=p_node->get_scene_instance_state(); + } + + if (ss.is_valid()) { + String path = ss->get_path(); + + if (!checked_paths.has(path)) { + + uint64_t modified_time = FileAccess::get_modified_time(path); + if (modified_time!=ss->get_last_modified_time()) { + return true; //external scene changed + } + + checked_paths.insert(path); + } + + } + + for(int i=0;iget_child_count();i++) { + + bool found = _find_updated_instances(p_root,p_node->get_child(i),checked_paths); + if (found) + return true; + } + + return false; +} + + +bool EditorData::check_and_update_scene(int p_idx) { + + ERR_FAIL_INDEX_V(p_idx,edited_scene.size(),false); + if (!edited_scene[p_idx].root) + return false; + + Set checked_scenes; + + + bool must_reload = _find_updated_instances(edited_scene[p_idx].root,edited_scene[p_idx].root,checked_scenes); + + if (must_reload) { + Ref pscene; + pscene.instance(); + + EditorProgress ep("update_scene","Updating Scene",2); + ep.step("Storing local changes..",0); + //pack first, so it stores diffs to previous version of saved scene + Error err = pscene->pack(edited_scene[p_idx].root); + ERR_FAIL_COND_V(err!=OK,false); + ep.step("Updating scene..",1); + Node *new_scene = pscene->instance(true); + ERR_FAIL_COND_V(!new_scene,false); + + //transfer selection + List new_selection; + for (List::Element *E=edited_scene[p_idx].selection.front();E;E=E->next()) { + NodePath p = edited_scene[p_idx].root->get_path_to(E->get()); + Node *new_node = new_scene->get_node(p); + if (new_node) + new_selection.push_back(new_node); + } + + new_scene->set_filename( edited_scene[p_idx].root->get_filename() ); + + memdelete(edited_scene[p_idx].root); + edited_scene[p_idx].root=new_scene; + edited_scene[p_idx].selection=new_selection; + + return true; + + } + + return false; + +} + int EditorData::get_edited_scene() const { return current_edited_scene; diff --git a/tools/editor/editor_data.h b/tools/editor/editor_data.h index a90a071c39..51af7d41bd 100644 --- a/tools/editor/editor_data.h +++ b/tools/editor/editor_data.h @@ -144,6 +144,8 @@ private: Vector edited_scene; int current_edited_scene; + bool _find_updated_instances(Node* p_root,Node *p_node,Set &checked_paths); + public: EditorPlugin* get_editor(Object *p_object); @@ -193,6 +195,7 @@ public: void clear_edited_scenes(); void set_edited_scene_live_edit_root(const NodePath& p_root); NodePath get_edited_scene_live_edit_root(); + bool check_and_update_scene(int p_idx); void set_plugin_window_layout(Ref p_layout); diff --git a/tools/editor/editor_import_export.cpp b/tools/editor/editor_import_export.cpp index 3cd5cfd629..b6c68d05be 100644 --- a/tools/editor/editor_import_export.cpp +++ b/tools/editor/editor_import_export.cpp @@ -43,6 +43,7 @@ #include "tools/editor/plugins/script_editor_plugin.h" #include "io/zip_io.h" + String EditorImportPlugin::validate_source_path(const String& p_path) { String gp = Globals::get_singleton()->globalize_path(p_path); diff --git a/tools/editor/editor_node.cpp b/tools/editor/editor_node.cpp index 3dbca760f0..05df0a3e48 100644 --- a/tools/editor/editor_node.cpp +++ b/tools/editor/editor_node.cpp @@ -955,7 +955,23 @@ void EditorNode::_save_scene(String p_file) { _set_scene_metadata(); - Ref sdata = memnew( PackedScene ); + + + Ref sdata; + + if (ResourceCache::has(p_file)) { + // something may be referencing this resource and we are good with that. + // we must update it, but also let the previous scene state go, as + // old version still work for referencing changes in instanced or inherited scenes + + sdata = Ref( ResourceCache::get(p_file)->cast_to() ); + if (sdata.is_valid()) + sdata->recreate_state(); + else + sdata.instance(); + } else { + sdata.instance(); + } Error err = sdata->pack(scene); @@ -3414,8 +3430,18 @@ void EditorNode::set_current_version(uint64_t p_version) { bool EditorNode::is_changing_scene() const { return changing_scene; } + +void EditorNode::_clear_undo_history() { + + get_undo_redo()->clear_history(); +} + void EditorNode::set_current_scene(int p_idx) { + if (editor_data.check_and_update_scene(p_idx)) { + call_deferred("_clear_undo_history"); + } + changing_scene=true; editor_data.save_edited_scene_state(editor_selection,&editor_history,_get_main_scene_state()); @@ -4113,6 +4139,7 @@ void EditorNode::_bind_methods() { ObjectTypeDB::bind_method("_toggle_search_bar",&EditorNode::_toggle_search_bar); ObjectTypeDB::bind_method("_clear_search_box",&EditorNode::_clear_search_box); + ObjectTypeDB::bind_method("_clear_undo_history",&EditorNode::_clear_undo_history); ObjectTypeDB::bind_method(_MD("add_editor_import_plugin", "plugin"), &EditorNode::add_editor_import_plugin); ObjectTypeDB::bind_method(_MD("remove_editor_import_plugin", "plugin"), &EditorNode::remove_editor_import_plugin); diff --git a/tools/editor/editor_node.h b/tools/editor/editor_node.h index bd25f27c59..c4429f943b 100644 --- a/tools/editor/editor_node.h +++ b/tools/editor/editor_node.h @@ -540,6 +540,7 @@ class EditorNode : public Node { void _toggle_search_bar(bool p_pressed); void _clear_search_box(); + void _clear_undo_history(); protected: void _notification(int p_what); -- cgit v1.2.3 From 534c8e74b9e4990ac1f63ef701330552cecfc28f Mon Sep 17 00:00:00 2001 From: Juan Linietsky Date: Mon, 14 Dec 2015 08:21:18 -0300 Subject: do not open dominant script if external editor is selected, fixes #3067 --- tools/editor/plugins/script_editor_plugin.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/editor/plugins/script_editor_plugin.cpp b/tools/editor/plugins/script_editor_plugin.cpp index df6397ed1d..b95c837003 100644 --- a/tools/editor/plugins/script_editor_plugin.cpp +++ b/tools/editor/plugins/script_editor_plugin.cpp @@ -2256,6 +2256,9 @@ void ScriptEditor::_history_back(){ void ScriptEditor::set_scene_root_script( Ref