summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rwxr-xr-xtools/Godot.app/Contents/Info.plist8
-rw-r--r--tools/addheader/addheader.py2
-rw-r--r--tools/addheader/header.txt2
-rw-r--r--tools/collada/collada.cpp8
-rw-r--r--tools/collada/collada.h2
-rw-r--r--tools/doc/doc_data.cpp15
-rw-r--r--tools/doc/doc_data.h2
-rw-r--r--tools/docdump/class_list.xml13625
-rw-r--r--tools/docdump/doc_dump.cpp2
-rw-r--r--tools/docdump/doc_dump.h2
-rw-r--r--tools/docdump/doc_merge.py208
-rw-r--r--tools/docdump/locales/es/LC_MESSAGES/makedocs.mobin2321 -> 0 bytes
-rw-r--r--tools/docdump/locales/es/LC_MESSAGES/makedocs.po142
-rw-r--r--tools/docdump/main.css146
-rw-r--r--tools/docdump/makedocs.pot108
-rw-r--r--tools/docdump/makedocs.py382
-rw-r--r--tools/docdump/makedoku.py511
-rw-r--r--tools/docdump/makehtml.py717
-rw-r--r--tools/docdump/makemd.py345
-rw-r--r--tools/editor/animation_editor.cpp230
-rw-r--r--tools/editor/animation_editor.h14
-rw-r--r--tools/editor/array_property_edit.cpp19
-rw-r--r--tools/editor/array_property_edit.h2
-rw-r--r--tools/editor/call_dialog.cpp2
-rw-r--r--tools/editor/call_dialog.h2
-rw-r--r--tools/editor/code_editor.cpp4
-rw-r--r--tools/editor/code_editor.h2
-rw-r--r--tools/editor/connections_dialog.cpp28
-rw-r--r--tools/editor/connections_dialog.h4
-rw-r--r--tools/editor/console.cpp386
-rw-r--r--tools/editor/create_dialog.cpp2
-rw-r--r--tools/editor/create_dialog.h2
-rw-r--r--tools/editor/default_saver.cpp2
-rw-r--r--tools/editor/default_saver.h2
-rw-r--r--tools/editor/dependency_editor.cpp181
-rw-r--r--tools/editor/dependency_editor.h25
-rw-r--r--tools/editor/doc_code_font.h2
-rw-r--r--tools/editor/doc_font.h2
-rw-r--r--tools/editor/doc_title_font.h2
-rw-r--r--tools/editor/editor_data.cpp110
-rw-r--r--tools/editor/editor_data.h7
-rw-r--r--tools/editor/editor_dir_dialog.cpp19
-rw-r--r--tools/editor/editor_dir_dialog.h2
-rw-r--r--tools/editor/editor_file_dialog.cpp90
-rw-r--r--tools/editor/editor_file_dialog.h7
-rw-r--r--tools/editor/editor_file_system.cpp950
-rw-r--r--tools/editor/editor_file_system.h89
-rw-r--r--tools/editor/editor_fonts.cpp2
-rw-r--r--tools/editor/editor_fonts.h2
-rw-r--r--tools/editor/editor_help.cpp39
-rw-r--r--tools/editor/editor_help.h5
-rw-r--r--tools/editor/editor_icons.h2
-rw-r--r--tools/editor/editor_import_export.cpp200
-rw-r--r--tools/editor/editor_import_export.h30
-rw-r--r--tools/editor/editor_log.cpp57
-rw-r--r--tools/editor/editor_log.h12
-rw-r--r--tools/editor/editor_name_dialog.cpp89
-rw-r--r--tools/editor/editor_name_dialog.h (renamed from tools/editor/console.h)93
-rw-r--r--tools/editor/editor_node.cpp1013
-rw-r--r--tools/editor/editor_node.h91
-rw-r--r--tools/editor/editor_path.cpp2
-rw-r--r--tools/editor/editor_path.h2
-rw-r--r--tools/editor/editor_plugin.cpp2
-rw-r--r--tools/editor/editor_plugin.h3
-rw-r--r--tools/editor/editor_reimport_dialog.cpp2
-rw-r--r--tools/editor/editor_reimport_dialog.h2
-rw-r--r--tools/editor/editor_run.cpp2
-rw-r--r--tools/editor/editor_run.h2
-rw-r--r--tools/editor/editor_run_native.cpp2
-rw-r--r--tools/editor/editor_run_native.h2
-rw-r--r--tools/editor/editor_selection.cpp2
-rw-r--r--tools/editor/editor_selection.h2
-rw-r--r--tools/editor/editor_settings.cpp4
-rw-r--r--tools/editor/editor_settings.h3
-rw-r--r--tools/editor/editor_sub_scene.cpp14
-rw-r--r--tools/editor/editor_sub_scene.h2
-rw-r--r--tools/editor/editor_vu.cpp2
-rw-r--r--tools/editor/editor_vu.h2
-rw-r--r--tools/editor/file_type_cache.cpp2
-rw-r--r--tools/editor/file_type_cache.h2
-rw-r--r--tools/editor/groups_editor.cpp169
-rw-r--r--tools/editor/groups_editor.h38
-rw-r--r--tools/editor/icons/icon_add_track.pngbin446 -> 165 bytes
-rw-r--r--tools/editor/icons/icon_console.pngbin0 -> 640 bytes
-rw-r--r--tools/editor/icons/icon_create_new_scene_from.pngbin0 -> 588 bytes
-rw-r--r--tools/editor/icons/icon_edit_pivot.pngbin0 -> 407 bytes
-rw-r--r--tools/editor/icons/icon_key_invalid.pngbin0 -> 239 bytes
-rw-r--r--tools/editor/icons/icon_key_invalid_hover.pngbin0 -> 239 bytes
-rw-r--r--tools/editor/icons/icon_list_select.pngbin0 -> 470 bytes
-rw-r--r--tools/editor/icons/icon_pin.pngbin381 -> 428 bytes
-rw-r--r--tools/editor/import_settings.cpp2
-rw-r--r--tools/editor/import_settings.h2
-rw-r--r--tools/editor/io_plugins/editor_atlas.cpp2
-rw-r--r--tools/editor/io_plugins/editor_atlas.h2
-rw-r--r--tools/editor/io_plugins/editor_export_scene.cpp112
-rw-r--r--tools/editor/io_plugins/editor_export_scene.h16
-rw-r--r--tools/editor/io_plugins/editor_font_import_plugin.cpp28
-rw-r--r--tools/editor/io_plugins/editor_font_import_plugin.h2
-rw-r--r--tools/editor/io_plugins/editor_import_collada.cpp45
-rw-r--r--tools/editor/io_plugins/editor_import_collada.h2
-rw-r--r--tools/editor/io_plugins/editor_mesh_import_plugin.cpp39
-rw-r--r--tools/editor/io_plugins/editor_sample_import_plugin.cpp4
-rw-r--r--tools/editor/io_plugins/editor_sample_import_plugin.h2
-rw-r--r--tools/editor/io_plugins/editor_scene_import_plugin.cpp2
-rw-r--r--tools/editor/io_plugins/editor_scene_import_plugin.h2
-rw-r--r--tools/editor/io_plugins/editor_texture_import_plugin.cpp6
-rw-r--r--tools/editor/io_plugins/editor_texture_import_plugin.h2
-rw-r--r--tools/editor/io_plugins/editor_translation_import_plugin.cpp2
-rw-r--r--tools/editor/io_plugins/editor_translation_import_plugin.h2
-rw-r--r--tools/editor/optimized_save_dialog.cpp2
-rw-r--r--tools/editor/optimized_save_dialog.h2
-rw-r--r--tools/editor/output_strings.cpp2
-rw-r--r--tools/editor/output_strings.h2
-rw-r--r--tools/editor/pane_drag.cpp2
-rw-r--r--tools/editor/pane_drag.h2
-rw-r--r--tools/editor/plugins/animation_data_editor_plugin.cpp2
-rw-r--r--tools/editor/plugins/animation_data_editor_plugin.h2
-rw-r--r--tools/editor/plugins/animation_player_editor_plugin.cpp318
-rw-r--r--tools/editor/plugins/animation_player_editor_plugin.h21
-rw-r--r--tools/editor/plugins/animation_tree_editor_plugin.cpp25
-rw-r--r--tools/editor/plugins/animation_tree_editor_plugin.h3
-rw-r--r--tools/editor/plugins/camera_editor_plugin.cpp2
-rw-r--r--tools/editor/plugins/camera_editor_plugin.h2
-rw-r--r--tools/editor/plugins/canvas_item_editor_plugin.cpp400
-rw-r--r--tools/editor/plugins/canvas_item_editor_plugin.h11
-rw-r--r--tools/editor/plugins/collision_polygon_editor_plugin.cpp2
-rw-r--r--tools/editor/plugins/collision_polygon_editor_plugin.h2
-rw-r--r--tools/editor/plugins/color_ramp_editor_plugin.cpp17
-rw-r--r--tools/editor/plugins/color_ramp_editor_plugin.h3
-rw-r--r--tools/editor/plugins/control_editor_plugin.cpp2
-rw-r--r--tools/editor/plugins/control_editor_plugin.h2
-rw-r--r--tools/editor/plugins/cube_grid_theme_editor_plugin.cpp2
-rw-r--r--tools/editor/plugins/cube_grid_theme_editor_plugin.h2
-rw-r--r--tools/editor/plugins/editor_preview_plugins.cpp95
-rw-r--r--tools/editor/plugins/editor_preview_plugins.h11
-rw-r--r--tools/editor/plugins/item_list_editor_plugin.cpp367
-rw-r--r--tools/editor/plugins/item_list_editor_plugin.h140
-rw-r--r--tools/editor/plugins/mesh_editor_plugin.cpp134
-rw-r--r--tools/editor/plugins/mesh_editor_plugin.h13
-rw-r--r--tools/editor/plugins/multimesh_editor_plugin.cpp2
-rw-r--r--tools/editor/plugins/multimesh_editor_plugin.h2
-rw-r--r--tools/editor/plugins/particles_2d_editor_plugin.cpp2
-rw-r--r--tools/editor/plugins/particles_2d_editor_plugin.h2
-rw-r--r--tools/editor/plugins/particles_editor_plugin.cpp2
-rw-r--r--tools/editor/plugins/particles_editor_plugin.h2
-rw-r--r--tools/editor/plugins/path_2d_editor_plugin.cpp4
-rw-r--r--tools/editor/plugins/path_2d_editor_plugin.h2
-rw-r--r--tools/editor/plugins/path_editor_plugin.cpp2
-rw-r--r--tools/editor/plugins/path_editor_plugin.h2
-rw-r--r--tools/editor/plugins/polygon_2d_editor_plugin.cpp3
-rw-r--r--tools/editor/plugins/resource_preloader_editor_plugin.cpp20
-rw-r--r--tools/editor/plugins/resource_preloader_editor_plugin.h3
-rw-r--r--tools/editor/plugins/rich_text_editor_plugin.cpp2
-rw-r--r--tools/editor/plugins/rich_text_editor_plugin.h2
-rw-r--r--tools/editor/plugins/sample_editor_plugin.cpp2
-rw-r--r--tools/editor/plugins/sample_editor_plugin.h2
-rw-r--r--tools/editor/plugins/sample_library_editor_plugin.cpp22
-rw-r--r--tools/editor/plugins/sample_library_editor_plugin.h3
-rw-r--r--tools/editor/plugins/sample_player_editor_plugin.cpp2
-rw-r--r--tools/editor/plugins/sample_player_editor_plugin.h2
-rw-r--r--tools/editor/plugins/script_editor_plugin.cpp213
-rw-r--r--tools/editor/plugins/script_editor_plugin.h13
-rw-r--r--tools/editor/plugins/shader_editor_plugin.cpp12
-rw-r--r--tools/editor/plugins/shader_editor_plugin.h2
-rw-r--r--tools/editor/plugins/shader_graph_editor_plugin.cpp6
-rw-r--r--tools/editor/plugins/shader_graph_editor_plugin.h4
-rw-r--r--tools/editor/plugins/spatial_editor_plugin.cpp234
-rw-r--r--tools/editor/plugins/spatial_editor_plugin.h11
-rw-r--r--tools/editor/plugins/sprite_frames_editor_plugin.cpp21
-rw-r--r--tools/editor/plugins/sprite_frames_editor_plugin.h3
-rw-r--r--tools/editor/plugins/sprite_region_editor_plugin.cpp59
-rw-r--r--tools/editor/plugins/sprite_region_editor_plugin.h12
-rw-r--r--tools/editor/plugins/stream_editor_plugin.cpp2
-rw-r--r--tools/editor/plugins/stream_editor_plugin.h2
-rw-r--r--tools/editor/plugins/style_box_editor_plugin.cpp21
-rw-r--r--tools/editor/plugins/style_box_editor_plugin.h3
-rw-r--r--tools/editor/plugins/theme_editor_plugin.cpp17
-rw-r--r--tools/editor/plugins/theme_editor_plugin.h3
-rw-r--r--tools/editor/plugins/tile_map_editor_plugin.cpp65
-rw-r--r--tools/editor/plugins/tile_map_editor_plugin.h2
-rw-r--r--tools/editor/plugins/tile_set_editor_plugin.cpp49
-rw-r--r--tools/editor/plugins/tile_set_editor_plugin.h9
-rw-r--r--tools/editor/progress_dialog.cpp14
-rw-r--r--tools/editor/progress_dialog.h5
-rw-r--r--tools/editor/project_export.cpp64
-rw-r--r--tools/editor/project_export.h3
-rw-r--r--tools/editor/project_manager.cpp28
-rw-r--r--tools/editor/project_manager.h3
-rw-r--r--tools/editor/project_settings.cpp295
-rw-r--r--tools/editor/project_settings.h10
-rw-r--r--tools/editor/property_editor.cpp525
-rw-r--r--tools/editor/property_editor.h36
-rw-r--r--tools/editor/pvrtc_compress.cpp2
-rw-r--r--tools/editor/pvrtc_compress.h2
-rw-r--r--tools/editor/quick_open.cpp76
-rw-r--r--tools/editor/quick_open.h7
-rw-r--r--tools/editor/register_exporters.h2
-rw-r--r--tools/editor/reparent_dialog.cpp31
-rw-r--r--tools/editor/reparent_dialog.h9
-rw-r--r--tools/editor/resources_dock.cpp2
-rw-r--r--tools/editor/resources_dock.h2
-rw-r--r--tools/editor/run_settings_dialog.cpp2
-rw-r--r--tools/editor/run_settings_dialog.h2
-rw-r--r--tools/editor/scene_tree_dock.cpp190
-rw-r--r--tools/editor/scene_tree_dock.h8
-rw-r--r--tools/editor/scene_tree_editor.cpp17
-rw-r--r--tools/editor/scene_tree_editor.h2
-rw-r--r--tools/editor/scenes.cpp2
-rw-r--r--tools/editor/scenes.h2
-rw-r--r--tools/editor/scenes_dock.cpp14
-rw-r--r--tools/editor/scenes_dock.h3
-rw-r--r--tools/editor/script_create_dialog.cpp2
-rw-r--r--tools/editor/script_create_dialog.h2
-rw-r--r--tools/editor/script_editor_debugger.cpp62
-rw-r--r--tools/editor/script_editor_debugger.h12
-rw-r--r--tools/editor/settings_config_dialog.cpp14
-rw-r--r--tools/editor/settings_config_dialog.h4
-rw-r--r--tools/editor/spatial_editor_gizmos.cpp6
-rw-r--r--tools/editor/spatial_editor_gizmos.h2
-rw-r--r--tools/export/blender25/io_scene_dae/export_dae.py2
-rw-r--r--tools/html_fs/godot.html1647
-rw-r--r--tools/ios_xcode_template/godot_ios.xcodeproj/project.pbxproj2
-rw-r--r--tools/ios_xcode_template/godot_ios/godot_ios-Info.plist2
-rw-r--r--tools/ios_xcode_template/godot_ios/main.m35
-rw-r--r--tools/ios_xcode_template/godot_iosTests/godot_iosTests-Info.plist2
-rw-r--r--tools/ios_xcode_template/godot_iosTests/godot_iosTests.m35
-rw-r--r--tools/pck/pck_packer.cpp2
227 files changed, 5805 insertions, 20408 deletions
diff --git a/tools/Godot.app/Contents/Info.plist b/tools/Godot.app/Contents/Info.plist
index 3a4b51e2fe..cb2db17807 100755
--- a/tools/Godot.app/Contents/Info.plist
+++ b/tools/Godot.app/Contents/Info.plist
@@ -9,11 +9,11 @@
<key>CFBundleName</key>
<string>Godot</string>
<key>CFBundleGetInfoString</key>
- <string>(c) 2007-2014 Juan Linietsky, Ariel Manzur</string>
+ <string>(c) 2007-2016 Juan Linietsky, Ariel Manzur</string>
<key>CFBundleIconFile</key>
<string>Godot.icns</string>
<key>CFBundleIdentifier</key>
- <string>com.okamstudio.godot</string>
+ <string>org.godotengine.godot</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundlePackageType</key>
@@ -25,7 +25,7 @@
<key>CFBundleVersion</key>
<string>1.0.0</string>
<key>NSHumanReadableCopyright</key>
- <string>© 2007-2014 Juan Linietsky, Ariel Manzur</string>
+ <string>© 2007-2016 Juan Linietsky, Ariel Manzur</string>
<key>LSMinimumSystemVersion</key>
<string>10.6.0</string>
<key>LSMinimumSystemVersionByArchitecture</key>
@@ -61,7 +61,7 @@
<true/>
<key>LSItemContentTypes</key>
<array>
- <string>com.okamstudio.scn</string>
+ <string>org.godotengine.scn</string>
</array>
</dict>
</array>
diff --git a/tools/addheader/addheader.py b/tools/addheader/addheader.py
index 038cec96d0..0252eb396d 100644
--- a/tools/addheader/addheader.py
+++ b/tools/addheader/addheader.py
@@ -6,7 +6,7 @@ header="""\
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/tools/addheader/header.txt b/tools/addheader/header.txt
index 359949cc3b..e4efb2dcfc 100644
--- a/tools/addheader/header.txt
+++ b/tools/addheader/header.txt
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/*************************************************/
/* Source code within this file is: */
-/* (c) 2007-2010 Juan Linietsky, Ariel Manzur */
+/* (c) 2007-2016 Juan Linietsky, Ariel Manzur */
/* All Rights Reserved. */
/*************************************************/
diff --git a/tools/collada/collada.cpp b/tools/collada/collada.cpp
index deec5f60c7..07da72718e 100644
--- a/tools/collada/collada.cpp
+++ b/tools/collada/collada.cpp
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -1683,8 +1683,12 @@ Collada::Node* Collada::_parse_visual_scene_node(XMLParser& parser) {
if ( parser.has_attribute("sid") ) { //bones may not have sid
joint->sid=parser.get_attribute_value("sid");
// state.bone_map[joint->sid]=joint;
- } else if (state.idref_joints.has(name))
+ } else if (state.idref_joints.has(name)) {
joint->sid=name; //kind of a cheat but..
+ } else if (parser.has_attribute("name")) {
+ joint->sid=parser.get_attribute_value_safe("name");
+ }
+
if (joint->sid!="") {
state.sid_to_node_map[joint->sid]=id;
diff --git a/tools/collada/collada.h b/tools/collada/collada.h
index 81f51a1f3d..8983b8faf0 100644
--- a/tools/collada/collada.h
+++ b/tools/collada/collada.h
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/tools/doc/doc_data.cpp b/tools/doc/doc_data.cpp
index c1d3e5e314..11e4797747 100644
--- a/tools/doc/doc_data.cpp
+++ b/tools/doc/doc_data.cpp
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -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 {
@@ -585,7 +584,10 @@ void DocData::generate(bool p_basic_types) {
md.name=mi.name;
if (mi.return_val.name!="")
md.return_type=mi.return_val.name;
- else
+ else if (mi.name.find(":")!=-1) {
+ md.return_type=mi.name.get_slice(":",1);
+ md.name=mi.name.get_slice(":",0);
+ } else
md.return_type=Variant::get_type_name(mi.return_val.type);
for(int i=0;i<mi.arguments.size();i++) {
@@ -595,8 +597,9 @@ void DocData::generate(bool p_basic_types) {
ArgumentDoc ad;
ad.name=pi.name;
+
if (pi.type==Variant::NIL)
- ad.type="var";
+ ad.type="Variant";
else
ad.type=Variant::get_type_name( pi.type );
diff --git a/tools/doc/doc_data.h b/tools/doc/doc_data.h
index b62eb21b4a..877f30defb 100644
--- a/tools/doc/doc_data.h
+++ b/tools/doc/doc_data.h
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
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 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<doc version="0.99.1384-pre-beta" name="Engine Types">
-<class name="Animation" inherits="Resource" category="Resources">
- <brief_description>
- Contains data used to animate everything in the engine.
- </brief_description>
- <description>
- 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.
- </description>
- <methods>
- <method name="add_track" >
- <argument index="0" name="type" type="int">
- </argument>
- <argument index="1" name="arg1" type="int">
- </argument>
- <description>
- Add a track to the Animation. The track type must be specified as any of the values in te TYPE_* enumeration.
- </description>
- </method>
- <method name="remove_track" >
- <argument index="0" name="idx" type="int">
- </argument>
- <description>
- Remove a track by specifying the track index.
- </description>
- </method>
- <method name="get_track_count" qualifiers="const" >
- <return type="int">
- </return>
- <description>
- Return the amount of tracks in the animation.
- </description>
- </method>
- <method name="track_get_type" qualifiers="const" >
- <return type="int">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <description>
- Get the type of a track.
- </description>
- </method>
- <method name="track_get_path" qualifiers="const" >
- <return type="NodePath">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <description>
- Get the path of a track. for more information on the path format, see [method track_set_path]
- </description>
- </method>
- <method name="track_set_path" >
- <argument index="0" name="idx" type="int">
- </argument>
- <argument index="1" name="path" type="NodePath">
- </argument>
- <description>
- 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 &quot;:&quot;. Example: &quot;character/skeleton:ankle&quot; or &quot;character/mesh:transform/local:&quot;
- </description>
- </method>
- <method name="track_move_up" >
- <argument index="0" name="idx" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="track_move_down" >
- <argument index="0" name="idx" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="transform_track_insert_key" >
- <return type="int">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <argument index="1" name="time" type="real">
- </argument>
- <argument index="2" name="loc" type="Vector3">
- </argument>
- <argument index="3" name="rot" type="Quat">
- </argument>
- <argument index="4" name="scale" type="Vector3">
- </argument>
- <description>
- </description>
- </method>
- <method name="track_insert_key" >
- <argument index="0" name="idx" type="int">
- </argument>
- <argument index="1" name="key" type="real">
- </argument>
- <argument index="2" name="arg2" type="var">
- </argument>
- <argument index="3" name="arg3" type="real">
- </argument>
- <description>
- </description>
- </method>
- <method name="track_remove_key" >
- <argument index="0" name="idx" type="int">
- </argument>
- <argument index="1" name="key_idx" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="track_get_key_count" qualifiers="const" >
- <return type="int">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <description>
- Return the amount of keys in a given track.
- </description>
- </method>
- <method name="track_get_key_value" qualifiers="const" >
- <argument index="0" name="idx" type="int">
- </argument>
- <argument index="1" name="arg1" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="track_get_key_time" qualifiers="const" >
- <return type="real">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <argument index="1" name="arg1" type="int">
- </argument>
- <description>
- Return the time at which the key is located.
- </description>
- </method>
- <method name="track_find_key" qualifiers="const" >
- <return type="int">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <argument index="1" name="time" type="real">
- </argument>
- <argument index="2" name="exact" type="bool" default="false">
- </argument>
- <description>
- </description>
- </method>
- <method name="track_set_interpolation_type" >
- <argument index="0" name="idx" type="int">
- </argument>
- <argument index="1" name="interpolation" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="track_get_interpolation_type" qualifiers="const" >
- <return type="int">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="transform_track_interpolate" qualifiers="const" >
- <return type="Array">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <argument index="1" name="time_sec" type="real">
- </argument>
- <description>
- </description>
- </method>
- <method name="value_track_interpolate" qualifiers="const" >
- <argument index="0" name="idx" type="int">
- </argument>
- <argument index="1" name="time_sec" type="real">
- </argument>
- <description>
- </description>
- </method>
- <method name="blend_track_interpolate" qualifiers="const" >
- <return type="real">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <argument index="1" name="time_sec" type="real">
- </argument>
- <description>
- </description>
- </method>
- <method name="property_track_get_key_indices" qualifiers="const" >
- <return type="IntArray">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <argument index="1" name="time_sec" type="real">
- </argument>
- <argument index="2" name="delta" type="real">
- </argument>
- <description>
- </description>
- </method>
- <method name="property_track_get_key_value" qualifiers="const" >
- <argument index="0" name="idx" type="int">
- </argument>
- <argument index="1" name="key_idx" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="property_track_get_name" qualifiers="const" >
- <return type="String">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <argument index="1" name="key_idx" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="method_track_get_key_indices" qualifiers="const" >
- <return type="IntArray">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <argument index="1" name="time_sec" type="real">
- </argument>
- <argument index="2" name="delta" type="real">
- </argument>
- <description>
- </description>
- </method>
- <method name="method_track_get_name" qualifiers="const" >
- <return type="String">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <argument index="1" name="key_idx" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="method_track_get_params" qualifiers="const" >
- <return type="Array">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <argument index="1" name="key_idx" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_length" >
- <argument index="0" name="time_sec" type="real">
- </argument>
- <description>
- 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.
- </description>
- </method>
- <method name="get_length" qualifiers="const" >
- <return type="real">
- </return>
- <description>
- Return the total length of the animation (in seconds).
- </description>
- </method>
- <method name="set_loop" >
- <argument index="0" name="enabled" type="bool">
- </argument>
- <description>
- 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&apos;s over.
- </description>
- </method>
- <method name="has_loop" qualifiers="const" >
- <return type="bool">
- </return>
- <description>
- Return wether the animation has the loop flag set.
- </description>
- </method>
- </methods>
- <constants>
- <constant name="INTERPOLATION_CUBIC" value="2">
- </constant>
- <constant name="TYPE_TRANSFORM" value="0">
- Transform tracks are used to change node local transforms or skeleton pose bones. Transitions are Interpolated.
- </constant>
- <constant name="TYPE_BLEND" value="4">
- </constant>
- <constant name="TYPE_PROPERTY" value="2">
- TODO will be changed and bleh
- </constant>
- <constant name="TYPE_VALUE" value="1">
- Value tracks set values in node properties, but only those which can be Interpolated.
- </constant>
- <constant name="INTERPOLATION_NEAREST" value="0">
- </constant>
- <constant name="INTERPOLATION_LINEAR" value="1">
- </constant>
- <constant name="TYPE_METHOD" value="3">
- </constant>
- </constants>
-</class>
-<class name="AnimationPlayer" inherits="Misc" category="Nodes/Animation Nodes">
- <brief_description>
- Container and player of [Animaton] resources.
- </brief_description>
- <description>
- 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.
- </description>
- <methods>
- <method name="add_animation" >
- <return type="int">
- </return>
- <argument index="0" name="name" type="String">
- </argument>
- <argument index="1" name="animation" type="Object">
- </argument>
- <description>
- Add an animation resource to the player, which will be later referenced by the &quot;name&quot; argument.
- </description>
- </method>
- <method name="remove_animation" >
- <argument index="0" name="name" type="String">
- </argument>
- <description>
- Remove an animation from the player (by supplying the same name used to add it).
- </description>
- </method>
- <method name="rename_animation" >
- <argument index="0" name="name" type="String">
- </argument>
- <argument index="1" name="newname" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="has_animation" qualifiers="const" >
- <return type="bool">
- </return>
- <argument index="0" name="name" type="String">
- </argument>
- <description>
- Request wether an [Animation] name exist within the player.
- </description>
- </method>
- <method name="get_animation" qualifiers="const" >
- <return type="Object">
- </return>
- <argument index="0" name="name" type="String">
- </argument>
- <description>
- Get an [Animation] resource by requesting a name.
- </description>
- </method>
- <method name="get_animation_list" qualifiers="const" >
- <return type="StringArray">
- </return>
- <description>
- Get the list of names of the animations stored in the player.
- </description>
- </method>
- <method name="set_blend_time" >
- <argument index="0" name="anim_from" type="String">
- </argument>
- <argument index="1" name="anim_to" type="String">
- </argument>
- <argument index="2" name="sec" type="real">
- </argument>
- <description>
- Specify a blend time (in seconds) between two animations, referemced by their names.
- </description>
- </method>
- <method name="get_blend_time" qualifiers="const" >
- <return type="real">
- </return>
- <argument index="0" name="anim_from" type="String">
- </argument>
- <argument index="1" name="anim_to" type="String">
- </argument>
- <description>
- Get the blend time between two animations, referemced by their names.
- </description>
- </method>
- <method name="play" >
- <argument index="0" name="name" type="String" default="&quot;&quot;">
- </argument>
- <argument index="1" name="channel" type="int" default="0">
- </argument>
- <description>
- Start playback of an animation (referenced by &quot;name&quot;). Optionally a channel can be specified.
- </description>
- </method>
- <method name="stop" >
- <argument index="0" name="channel" type="int" default="0">
- </argument>
- <description>
- Start playback of an animation channel. (or channel 0 if none is provided).
- </description>
- </method>
- <method name="stop_all" >
- <description>
- Stop playback on all animation channels.
- </description>
- </method>
- <method name="is_playing" qualifiers="const" >
- <return type="bool">
- </return>
- <argument index="0" name="channel" type="int" default="0">
- </argument>
- <description>
- Return wether an animation chanel is playing (or channel 0 if none is provided).
- </description>
- </method>
- <method name="get_current_animation" qualifiers="const" >
- <return type="String">
- </return>
- <argument index="0" name="channel" type="int" default="0">
- </argument>
- <description>
- Return the name of the animation being played in a channel (or channel 0 if none is provided).
- </description>
- </method>
- <method name="set_pause" >
- <argument index="0" name="paused" type="bool">
- </argument>
- <description>
- Pause the playback in all animation channels.
- </description>
- </method>
- <method name="is_paused" qualifiers="const" >
- <return type="bool">
- </return>
- <description>
- Return [html i]true[html /i] if all playback is paused.
- </description>
- </method>
- <method name="set_speed" >
- <argument index="0" name="speed" type="real">
- </argument>
- <argument index="1" name="channel" type="int" default="0">
- </argument>
- <description>
- 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).
- </description>
- </method>
- <method name="get_speed" qualifiers="const" >
- <return type="real">
- </return>
- <argument index="0" name="channel" type="int" default="0">
- </argument>
- <description>
- 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).
- </description>
- </method>
- <method name="seek" >
- <argument index="0" name="pos_sec" type="real">
- </argument>
- <argument index="1" name="channel" type="int" default="0">
- </argument>
- <description>
- Seek the animation in an animation channel (or channel 0 if none is provided) to a specific position (in seconds).
- </description>
- </method>
- <method name="get_pos" qualifiers="const" >
- <return type="real">
- </return>
- <argument index="0" name="channel" type="int" default="0">
- </argument>
- <description>
- Return the playback position (in seconds) in an animation channel (or channel 0 if none is provided)
- </description>
- </method>
- <method name="find_animation" qualifiers="const" >
- <return type="String">
- </return>
- <argument index="0" name="animation" type="Object">
- </argument>
- <description>
- </description>
- </method>
- <method name="clear_caches" >
- <description>
- 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.
- </description>
- </method>
- </methods>
- <constants>
- <constant name="MAX_CHANNELS" value="8">
- Maximum amount of animation channels.
- </constant>
- </constants>
-</class>
-<class name="AnimationTreePlayer" inherits="Node" category="Nodes/Animation Nodes">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- <method name="add_node" >
- <argument index="0" name="type" type="int">
- </argument>
- <argument index="1" name="id" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_node_id" qualifiers="const" >
- <return type="int">
- </return>
- <argument index="0" name="name" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="node_set_name" >
- <argument index="0" name="id" type="int">
- </argument>
- <argument index="1" name="name" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="node_get_name" qualifiers="const" >
- <return type="String">
- </return>
- <argument index="0" name="id" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="node_get_input_count" qualifiers="const" >
- <return type="int">
- </return>
- <argument index="0" name="id" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="animation_node_set_animation" >
- <argument index="0" name="arg0" type="int">
- </argument>
- <argument index="1" name="arg1" type="Object">
- </argument>
- <description>
- </description>
- </method>
- <method name="animation_node_get_animation" qualifiers="const" >
- <return type="Object">
- </return>
- <argument index="0" name="arg0" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="oneshot_node_set_fadein_time" >
- <argument index="0" name="id" type="int">
- </argument>
- <argument index="1" name="time_sec" type="real">
- </argument>
- <description>
- </description>
- </method>
- <method name="oneshot_node_get_fadein_time" qualifiers="const" >
- <return type="real">
- </return>
- <argument index="0" name="id" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="oneshot_node_set_fadeout_time" >
- <argument index="0" name="id" type="int">
- </argument>
- <argument index="1" name="time_sec" type="real">
- </argument>
- <description>
- </description>
- </method>
- <method name="oneshot_node_get_fadeout_time" qualifiers="const" >
- <return type="real">
- </return>
- <argument index="0" name="id" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="oneshot_node_set_autorestart" >
- <argument index="0" name="id" type="int">
- </argument>
- <argument index="1" name="enable" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="oneshot_node_set_autorestart_delay" >
- <argument index="0" name="id" type="int">
- </argument>
- <argument index="1" name="delay_sec" type="real">
- </argument>
- <description>
- </description>
- </method>
- <method name="oneshot_node_set_autorestart_random_delay" >
- <argument index="0" name="id" type="int">
- </argument>
- <argument index="1" name="rand_sec" type="real">
- </argument>
- <description>
- </description>
- </method>
- <method name="oneshot_node_has_autorestart" qualifiers="const" >
- <return type="bool">
- </return>
- <argument index="0" name="id" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="oneshot_node_get_autorestart_delay" qualifiers="const" >
- <return type="real">
- </return>
- <argument index="0" name="id" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="oneshot_node_get_autorestart_random_delay" qualifiers="const" >
- <return type="real">
- </return>
- <argument index="0" name="id" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="oneshot_node_start" >
- <argument index="0" name="id" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="oneshot_node_stop" >
- <argument index="0" name="id" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="oneshot_node_is_active" qualifiers="const" >
- <return type="bool">
- </return>
- <argument index="0" name="id" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="mix_node_set_amount" >
- <argument index="0" name="id" type="int">
- </argument>
- <argument index="1" name="ratio" type="real">
- </argument>
- <description>
- </description>
- </method>
- <method name="mix_node_get_amount" qualifiers="const" >
- <return type="real">
- </return>
- <argument index="0" name="id" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="blend2_node_set_amount" >
- <argument index="0" name="id" type="int">
- </argument>
- <argument index="1" name="blend" type="real">
- </argument>
- <description>
- </description>
- </method>
- <method name="blend2_node_get_amount" qualifiers="const" >
- <return type="real">
- </return>
- <argument index="0" name="id" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="blend3_node_set_amount" >
- <argument index="0" name="id" type="int">
- </argument>
- <argument index="1" name="blend" type="real">
- </argument>
- <description>
- </description>
- </method>
- <method name="blend3_node_get_amount" qualifiers="const" >
- <return type="real">
- </return>
- <argument index="0" name="id" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="blend4_node_set_amount" >
- <argument index="0" name="id" type="int">
- </argument>
- <argument index="1" name="blend" type="Vector2">
- </argument>
- <description>
- </description>
- </method>
- <method name="blend4_node_get_amount" qualifiers="const" >
- <return type="Vector2">
- </return>
- <argument index="0" name="id" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="timescale_node_set_scale" >
- <argument index="0" name="id" type="int">
- </argument>
- <argument index="1" name="scale" type="real">
- </argument>
- <description>
- </description>
- </method>
- <method name="timescale_node_get_scale" qualifiers="const" >
- <return type="real">
- </return>
- <argument index="0" name="id" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="timeseek_node_seek" >
- <argument index="0" name="id" type="int">
- </argument>
- <argument index="1" name="pos_sec" type="real">
- </argument>
- <description>
- </description>
- </method>
- <method name="transition_node_set_input_count" >
- <argument index="0" name="id" type="int">
- </argument>
- <argument index="1" name="count" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="transition_node_get_input_count" qualifiers="const" >
- <return type="int">
- </return>
- <argument index="0" name="id" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="transition_node_delete_input" >
- <argument index="0" name="id" type="int">
- </argument>
- <argument index="1" name="input_idx" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="transition_node_set_input_auto_advance" >
- <argument index="0" name="id" type="int">
- </argument>
- <argument index="1" name="input_idx" type="int">
- </argument>
- <argument index="2" name="enable" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="transition_node_has_input_auto_advance" qualifiers="const" >
- <return type="bool">
- </return>
- <argument index="0" name="id" type="int">
- </argument>
- <argument index="1" name="input_idx" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="transition_node_set_xfade_time" >
- <argument index="0" name="id" type="int">
- </argument>
- <argument index="1" name="time_sec" type="real">
- </argument>
- <description>
- </description>
- </method>
- <method name="transition_node_get_xfade_time" qualifiers="const" >
- <return type="real">
- </return>
- <argument index="0" name="id" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="transition_node_set_current" >
- <argument index="0" name="id" type="int">
- </argument>
- <argument index="1" name="input_idx" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="transition_node_get_current" qualifiers="const" >
- <return type="int">
- </return>
- <argument index="0" name="id" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="node_set_pos" >
- <argument index="0" name="id" type="int">
- </argument>
- <argument index="1" name="screen_pos" type="Vector2">
- </argument>
- <description>
- </description>
- </method>
- <method name="node_get_pos" qualifiers="const" >
- <return type="Vector2">
- </return>
- <argument index="0" name="id" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="remove_node" >
- <argument index="0" name="id" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="connect" >
- <return type="int">
- </return>
- <argument index="0" name="id" type="int">
- </argument>
- <argument index="1" name="dst_id" type="int">
- </argument>
- <argument index="2" name="dst_input_idx" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="is_connected" qualifiers="const" >
- <return type="bool">
- </return>
- <argument index="0" name="id" type="int">
- </argument>
- <argument index="1" name="dst_id" type="int">
- </argument>
- <argument index="2" name="dst_input_idx" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="disconnect" >
- <argument index="0" name="id" type="int">
- </argument>
- <argument index="1" name="dst_input_idx" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_active" >
- <argument index="0" name="enabled" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="is_active" qualifiers="const" >
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="set_base_path" >
- <argument index="0" name="path" type="NodePath">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_base_path" qualifiers="const" >
- <return type="NodePath">
- </return>
- <description>
- </description>
- </method>
- <method name="reset" >
- <description>
- </description>
- </method>
- <method name="recompute_caches" >
- <description>
- </description>
- </method>
- </methods>
- <constants>
- </constants>
-</class>
-<class name="AudioServer" inherits="Object" category="Core">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- <method name="sample_create" >
- <return type="RID">
- </return>
- <argument index="0" name="format" type="int">
- </argument>
- <argument index="1" name="stereo" type="bool">
- </argument>
- <argument index="2" name="length" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="sample_set_description" >
- <argument index="0" name="sample" type="RID">
- </argument>
- <argument index="1" name="description" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="sample_get_description" qualifiers="const" >
- <return type="String">
- </return>
- <argument index="0" name="sample" type="RID">
- </argument>
- <argument index="1" name="arg1" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="sample_get_format" qualifiers="const" >
- <return type="int">
- </return>
- <argument index="0" name="sample" type="RID">
- </argument>
- <description>
- </description>
- </method>
- <method name="sample_is_stereo" qualifiers="const" >
- <return type="bool">
- </return>
- <argument index="0" name="sample" type="RID">
- </argument>
- <description>
- </description>
- </method>
- <method name="sample_get_length" qualifiers="const" >
- <return type="int">
- </return>
- <argument index="0" name="sample" type="RID">
- </argument>
- <description>
- </description>
- </method>
- <method name="sample_set_signed_data" >
- <argument index="0" name="sample" type="RID">
- </argument>
- <argument index="1" name="data" type="RealArray">
- </argument>
- <description>
- </description>
- </method>
- <method name="sample_set_data" >
- <argument index="0" name="sample" type="RID">
- </argument>
- <argument index="1" name="arg1" type="RawArray">
- </argument>
- <description>
- </description>
- </method>
- <method name="sample_get_data" qualifiers="const" >
- <return type="RawArray">
- </return>
- <argument index="0" name="sample" type="RID">
- </argument>
- <description>
- </description>
- </method>
- <method name="sample_set_mix_rate" >
- <argument index="0" name="sample" type="RID">
- </argument>
- <argument index="1" name="mix_rate" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="sample_get_mix_rate" qualifiers="const" >
- <return type="int">
- </return>
- <argument index="0" name="sample" type="RID">
- </argument>
- <description>
- </description>
- </method>
- <method name="sample_set_loop_format" >
- <argument index="0" name="sample" type="RID">
- </argument>
- <argument index="1" name="loop_format" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="sample_get_loop_format" qualifiers="const" >
- <return type="int">
- </return>
- <argument index="0" name="sample" type="RID">
- </argument>
- <description>
- </description>
- </method>
- <method name="sample_set_loop_begin" >
- <argument index="0" name="sample" type="RID">
- </argument>
- <argument index="1" name="pos" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="sample_get_loop_begin" qualifiers="const" >
- <return type="int">
- </return>
- <argument index="0" name="sample" type="RID">
- </argument>
- <description>
- </description>
- </method>
- <method name="sample_set_loop_end" >
- <argument index="0" name="sample" type="RID">
- </argument>
- <argument index="1" name="pos" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="sample_get_loop_end" qualifiers="const" >
- <return type="int">
- </return>
- <argument index="0" name="sample" type="RID">
- </argument>
- <description>
- </description>
- </method>
- <method name="voice_create" >
- <return type="RID">
- </return>
- <description>
- </description>
- </method>
- <method name="voice_play" >
- <argument index="0" name="voice" type="RID">
- </argument>
- <argument index="1" name="sample" type="RID">
- </argument>
- <description>
- </description>
- </method>
- <method name="voice_set_volume" >
- <argument index="0" name="voice" type="RID">
- </argument>
- <argument index="1" name="volume" type="real">
- </argument>
- <description>
- </description>
- </method>
- <method name="voice_set_pan" >
- <argument index="0" name="voice" type="RID">
- </argument>
- <argument index="1" name="pan" type="real">
- </argument>
- <argument index="2" name="depth" type="real" default="0">
- </argument>
- <argument index="3" name="height" type="real" default="0">
- </argument>
- <description>
- </description>
- </method>
- <method name="voice_set_filter" >
- <argument index="0" name="voice" type="RID">
- </argument>
- <argument index="1" name="type" type="int">
- </argument>
- <argument index="2" name="cutoff" type="real">
- </argument>
- <argument index="3" name="resonance" type="real">
- </argument>
- <argument index="4" name="gain" type="real" default="0">
- </argument>
- <description>
- </description>
- </method>
- <method name="voice_set_chorus" >
- <argument index="0" name="voice" type="RID">
- </argument>
- <argument index="1" name="chorus" type="real">
- </argument>
- <description>
- </description>
- </method>
- <method name="voice_set_reverb" >
- <argument index="0" name="voice" type="RID">
- </argument>
- <argument index="1" name="room" type="int">
- </argument>
- <argument index="2" name="reverb" type="real">
- </argument>
- <description>
- </description>
- </method>
- <method name="voice_set_mix_rate" >
- <argument index="0" name="voice" type="RID">
- </argument>
- <argument index="1" name="rate" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="voice_set_positional" >
- <argument index="0" name="voice" type="RID">
- </argument>
- <argument index="1" name="enabled" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="voice_get_volume" qualifiers="const" >
- <return type="real">
- </return>
- <argument index="0" name="voice" type="RID">
- </argument>
- <description>
- </description>
- </method>
- <method name="voice_get_pan" qualifiers="const" >
- <return type="real">
- </return>
- <argument index="0" name="voice" type="RID">
- </argument>
- <description>
- </description>
- </method>
- <method name="voice_get_pan_height" qualifiers="const" >
- <return type="real">
- </return>
- <argument index="0" name="voice" type="RID">
- </argument>
- <description>
- </description>
- </method>
- <method name="voice_get_pan_depth" qualifiers="const" >
- <return type="real">
- </return>
- <argument index="0" name="voice" type="RID">
- </argument>
- <description>
- </description>
- </method>
- <method name="voice_get_filter_type" qualifiers="const" >
- <return type="int">
- </return>
- <argument index="0" name="voice" type="RID">
- </argument>
- <description>
- </description>
- </method>
- <method name="voice_get_filter_cutoff" qualifiers="const" >
- <return type="real">
- </return>
- <argument index="0" name="voice" type="RID">
- </argument>
- <description>
- </description>
- </method>
- <method name="voice_get_filter_resonance" qualifiers="const" >
- <return type="real">
- </return>
- <argument index="0" name="voice" type="RID">
- </argument>
- <description>
- </description>
- </method>
- <method name="voice_get_chorus" qualifiers="const" >
- <return type="real">
- </return>
- <argument index="0" name="voice" type="RID">
- </argument>
- <description>
- </description>
- </method>
- <method name="voice_get_reverb_type" qualifiers="const" >
- <return type="int">
- </return>
- <argument index="0" name="voice" type="RID">
- </argument>
- <description>
- </description>
- </method>
- <method name="voice_get_reverb" qualifiers="const" >
- <return type="real">
- </return>
- <argument index="0" name="voice" type="RID">
- </argument>
- <description>
- </description>
- </method>
- <method name="voice_get_mix_rate" qualifiers="const" >
- <return type="int">
- </return>
- <argument index="0" name="voice" type="RID">
- </argument>
- <description>
- </description>
- </method>
- <method name="voice_is_positional" qualifiers="const" >
- <return type="bool">
- </return>
- <argument index="0" name="voice" type="RID">
- </argument>
- <description>
- </description>
- </method>
- <method name="voice_stop" >
- <argument index="0" name="voice" type="RID">
- </argument>
- <description>
- </description>
- </method>
- <method name="free" >
- <argument index="0" name="rid" type="RID">
- </argument>
- <description>
- </description>
- </method>
- </methods>
- <constants>
- <constant name="SAMPLE_LOOP_PING_PONG" value="2">
- </constant>
- <constant name="SAMPLE_FORMAT_IMA_ADPCM" value="2">
- </constant>
- <constant name="FILTER_HIPASS" value="3">
- </constant>
- <constant name="FILTER_NONE" value="0">
- </constant>
- <constant name="REVERB_HALL" value="3">
- </constant>
- <constant name="REVERB_MEDIUM" value="1">
- </constant>
- <constant name="REVERB_SMALL" value="0">
- </constant>
- <constant name="FILTER_LOWPASS" value="1">
- </constant>
- <constant name="SAMPLE_LOOP_FORWARD" value="1">
- </constant>
- <constant name="REVERB_LARGE" value="2">
- </constant>
- <constant name="SAMPLE_FORMAT_PCM16" value="1">
- </constant>
- <constant name="FILTER_BANDLIMIT" value="6">
- </constant>
- <constant name="FILTER_NOTCH" value="4">
- </constant>
- <constant name="FILTER_BANDPASS" value="2">
- </constant>
- <constant name="SAMPLE_FORMAT_PCM8" value="0">
- </constant>
- <constant name="SAMPLE_LOOP_NONE" value="0">
- </constant>
- </constants>
-</class>
-<class name="AudioServerSW" inherits="AudioServer" category="Core">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- </methods>
- <constants>
- </constants>
-</class>
-<class name="AudioStream" inherits="Resource" category="Resources">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- <method name="play" >
- <description>
- </description>
- </method>
- <method name="stop" >
- <description>
- </description>
- </method>
- <method name="is_playing" qualifiers="const" >
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="set_loop" >
- <argument index="0" name="enabled" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="has_loop" qualifiers="const" >
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="get_stream_name" qualifiers="const" >
- <return type="String">
- </return>
- <description>
- </description>
- </method>
- <method name="get_loop_count" qualifiers="const" >
- <return type="int">
- </return>
- <description>
- </description>
- </method>
- <method name="seek_pos" >
- <argument index="0" name="pos" type="real">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_pos" qualifiers="const" >
- <return type="real">
- </return>
- <description>
- </description>
- </method>
- <method name="get_update_mode" qualifiers="const" >
- <return type="int">
- </return>
- <description>
- </description>
- </method>
- <method name="update" >
- <description>
- </description>
- </method>
- </methods>
- <constants>
- <constant name="UPDATE_IDLE" value="1">
- </constant>
- <constant name="UPDATE_THREAD" value="2">
- </constant>
- <constant name="UPDATE_NONE" value="0">
- </constant>
- </constants>
-</class>
-<class name="AudioStreamOGG" inherits="AudioStream" category="Resources">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- </methods>
- <constants>
- </constants>
-</class>
-<class name="BCSFX" inherits="ScenarioFX" category="Nodes">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- </methods>
- <constants>
- </constants>
-</class>
-<class name="BGColorFX" inherits="ScenarioFX" category="Nodes">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- </methods>
- <constants>
- </constants>
-</class>
-<class name="BGImageFX" inherits="ScenarioFX" category="Nodes">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- </methods>
- <constants>
- </constants>
-</class>
-<class name="BaseButton" inherits="Control" category="Nodes/GUI Nodes">
- <brief_description>
- Provides a base class for different kinds of buttons.
- </brief_description>
- <description>
- BaseButton is the abstract base class for buttons, so it shouldn&apos;t be used directly (It doesnt display anything). Other types of buttons inherit from it.
- </description>
- <methods>
- <method name="set_pressed" >
- <argument index="0" name="pressed" type="bool">
- </argument>
- <description>
- Set the button to pressed state (only if toggle_mode is active).
- </description>
- </method>
- <method name="is_pressed" qualifiers="const" >
- <return type="bool">
- </return>
- <description>
- Return when the button is pressed (only if toggle_mode is active).
- </description>
- </method>
- <method name="set_toggle_mode" >
- <argument index="0" name="enabled" type="bool">
- </argument>
- <description>
- Set the button toggle_mode property. Toggle mode makes the button flip state between pressed and unpressed each time its area is clicked.
- </description>
- </method>
- <method name="is_toggle_mode" qualifiers="const" >
- <return type="bool">
- </return>
- <description>
- Return the toggle_mode property (see [method set_toggle_mode]).
- </description>
- </method>
- <method name="set_disabled" >
- <argument index="0" name="disabled" type="bool">
- </argument>
- <description>
- Set the button into disabled state. When a button is disabled, it can&apos;t be clicked or toggled.
- </description>
- </method>
- <method name="is_disabled" qualifiers="const" >
- <return type="bool">
- </return>
- <description>
- Return wether the button is in disabled state (see [method set_disabled]).
- </description>
- </method>
- <method name="set_click_on_press" >
- <argument index="0" name="enable" type="bool">
- </argument>
- <description>
- 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).
- </description>
- </method>
- <method name="get_click_on_press" qualifiers="const" >
- <return type="bool">
- </return>
- <description>
- Return the state of the click_on_press property (see [method set_click_on_press]).
- </description>
- </method>
- </methods>
- <signals>
- <signal name="toggled">
- <argument index="0" name="pressed" type="bool">
- </argument>
- <description>
- 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.
- </description>
- </signal>
- <signal name="pressed">
- <description>
- This signal is emitted every time the button is pressed or toggled.
- </description>
- </signal>
- </signals>
- <constants>
- </constants>
-</class>
-<class name="BodyShape" inherits="Spatial" category="Nodes/3D/3D Physics Nodes">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- </methods>
- <constants>
- </constants>
-</class>
-<class name="BoxShape" inherits="Shape" category="Resources">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- <method name="set_extents" >
- <argument index="0" name="extents" type="Vector3">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_extents" qualifiers="const" >
- <return type="Vector3">
- </return>
- <description>
- </description>
- </method>
- </methods>
- <constants>
- </constants>
-</class>
-<class name="Button" inherits="BaseButton" category="Nodes/GUI Nodes">
- <brief_description>
- Standard themed Button.
- </brief_description>
- <description>
- Button is just the standard themed button: [html image src=&quot;images/button_example.png&quot;/] It can contain a text and an icon, and will display them according to the current theme.
- </description>
- <methods>
- <method name="set_text" >
- <argument index="0" name="text" type="String">
- </argument>
- <description>
- Set the button text, which will be displayed inside the button area.
- </description>
- </method>
- <method name="get_text" qualifiers="const" >
- <return type="String">
- </return>
- <description>
- Return the button text.
- </description>
- </method>
- <method name="set_icon" >
- <argument index="0" name="texture" type="Object">
- </argument>
- <description>
- Set the button icon, which will be displayed to the left of the text.
- </description>
- </method>
- <method name="get_icon" qualifiers="const" >
- <return type="Object">
- </return>
- <description>
- Return the button icon.
- </description>
- </method>
- <method name="set_flat" >
- <argument index="0" name="enabled" type="bool">
- </argument>
- <description>
- Set the [html i]flat[html /i] property of a Button. Flat buttons don&apos;t display decoration unless hoevered or pressed.
- </description>
- </method>
- <method name="set_clip_text" >
- <argument index="0" name="enabled" type="bool">
- </argument>
- <description>
- 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.
- </description>
- </method>
- <method name="get_clip_text" qualifiers="const" >
- <return type="bool">
- </return>
- <description>
- Return the state of the [html i]clip_text[html /i] property (see [method set_clip_text])
- </description>
- </method>
- <method name="is_flat" qualifiers="const" >
- <return type="bool">
- </return>
- <description>
- Return the state of the [html i]flat[html /i] property (see [method set_flat])
- </description>
- </method>
- </methods>
- <constants>
- </constants>
-</class>
-<class name="Camera" inherits="Spatial" category="Nodes/3D">
- <brief_description>
- Camera node, displays from a point of view.
- </brief_description>
- <description>
- 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&apos;t be displayed.
- </description>
- <methods>
- <method name="project_ray_normal" qualifiers="const" >
- <return type="Vector3">
- </return>
- <argument index="0" name="screen_point" type="Vector2">
- </argument>
- <description>
- 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.
- </description>
- </method>
- <method name="project_ray_origin" qualifiers="const" >
- <return type="Vector3">
- </return>
- <argument index="0" name="screen_point" type="Vector2">
- </argument>
- <description>
- 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.
- </description>
- </method>
- <method name="unproject_position" qualifiers="const" >
- <return type="Vector2">
- </return>
- <argument index="0" name="world_point" type="Vector3">
- </argument>
- <description>
- Return how a 3D point in worldpsace maps to a 2D coordinate in the [Viewport] rectangle.
- </description>
- </method>
- <method name="set_perspective" >
- <argument index="0" name="fov" type="real">
- </argument>
- <argument index="1" name="z_near" type="real">
- </argument>
- <argument index="2" name="z_far" type="real">
- </argument>
- <description>
- 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.
- </description>
- </method>
- <method name="set_orthogonal" >
- <argument index="0" name="size" type="real">
- </argument>
- <argument index="1" name="z_near" type="real">
- </argument>
- <argument index="2" name="z_far" type="real">
- </argument>
- <description>
- 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)
- </description>
- </method>
- <method name="make_current" >
- <description>
- 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&apos;s added.
- </description>
- </method>
- <method name="clear_current" >
- <description>
- </description>
- </method>
- <method name="is_current" qualifiers="const" >
- <return type="bool">
- </return>
- <description>
- Return wether the Camera is the current one in the [Viewport], or plans to become current (if outside the scene tree).
- </description>
- </method>
- <method name="get_camera_transform" qualifiers="const" >
- <return type="Transform">
- </return>
- <description>
- Get the camera transform. Subclassed cameras (such as CharacterCamera) may provide different transforms than the [Node] transform.
- </description>
- </method>
- <method name="get_fov" qualifiers="const" >
- <return type="real">
- </return>
- <description>
- </description>
- </method>
- </methods>
- <constants>
- <constant name="PROJECTION_PERSPECTIVE" value="0">
- Perspective Projection (object&apos;s size on the screen becomes smaller when far away).
- </constant>
- <constant name="PROJECTION_ORTHOGONAL" value="1">
- Orthogonal Projection (objects remain the same size on the screen no matter how far away they are).
- </constant>
- </constants>
-</class>
-<class name="CanvasItem" inherits="Node" category="Core">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- <method name="edit_set_state" >
- <argument index="0" name="state" type="var">
- </argument>
- <description>
- </description>
- </method>
- <method name="edit_get" qualifiers="const" >
- <description>
- </description>
- </method>
- <method name="edit_set_rect" >
- <argument index="0" name="rect" type="Rect2">
- </argument>
- <description>
- </description>
- </method>
- <method name="edit_rotate" >
- <argument index="0" name="degrees" type="real">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_item_rect" qualifiers="const" >
- <return type="Rect2">
- </return>
- <description>
- </description>
- </method>
- <method name="get_canvas_item" qualifiers="const" >
- <return type="RID">
- </return>
- <description>
- </description>
- </method>
- <method name="is_visible" qualifiers="const" >
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="is_hidden" qualifiers="const" >
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="show" >
- <description>
- </description>
- </method>
- <method name="hide" >
- <description>
- </description>
- </method>
- <method name="update" >
- <description>
- </description>
- </method>
- <method name="set_as_toplevel" >
- <argument index="0" name="enable" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="is_set_as_toplevel" qualifiers="const" >
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="set_blend_mode" >
- <argument index="0" name="blend_mode" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_blend_mode" qualifiers="const" >
- <return type="int">
- </return>
- <description>
- </description>
- </method>
- <method name="set_opacity" >
- <argument index="0" name="opacity" type="real">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_opacity" qualifiers="const" >
- <return type="real">
- </return>
- <description>
- </description>
- </method>
- <method name="set_self_opacity" >
- <argument index="0" name="self_opacity" type="real">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_self_opacity" qualifiers="const" >
- <return type="real">
- </return>
- <description>
- </description>
- </method>
- </methods>
- <signals>
- <signal name="item_rect_changed">
- <description>
- </description>
- </signal>
- <signal name="draw">
- <description>
- </description>
- </signal>
- <signal name="visibility_changed">
- <description>
- </description>
- </signal>
- <signal name="hide">
- <description>
- </description>
- </signal>
- </signals>
- <constants>
- <constant name="NOTIFICATION_EXIT_CANVAS" value="33">
- </constant>
- <constant name="NOTIFICATION_DRAW" value="30">
- </constant>
- <constant name="BLEND_MODE_MUL" value="3">
- </constant>
- <constant name="BLEND_MODE_MIX" value="0">
- </constant>
- <constant name="NOTIFICATION_ENTER_CANVAS" value="32">
- </constant>
- <constant name="NOTIFICATION_VISIBILITY_CHANGED" value="31">
- </constant>
- <constant name="BLEND_MODE_ADD" value="1">
- </constant>
- <constant name="BLEND_MODE_SUB" value="2">
- </constant>
- </constants>
-</class>
-<class name="CapsuleShape" inherits="Shape" category="Resources">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- <method name="set_radius" >
- <argument index="0" name="radius" type="real">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_radius" qualifiers="const" >
- <return type="real">
- </return>
- <description>
- </description>
- </method>
- <method name="set_height" >
- <argument index="0" name="height" type="real">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_height" qualifiers="const" >
- <return type="real">
- </return>
- <description>
- </description>
- </method>
- </methods>
- <constants>
- </constants>
-</class>
-<class name="CheckButton" inherits="BaseButton" category="Nodes/GUI Nodes">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- <method name="set_text" >
- <argument index="0" name="text" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_text" qualifiers="const" >
- <return type="String">
- </return>
- <description>
- </description>
- </method>
- </methods>
- <constants>
- </constants>
-</class>
-<class name="ColorPicker" inherits="Control" category="Nodes/GUI Nodes">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- <method name="set_color" >
- <argument index="0" name="arg0" type="Color">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_color" qualifiers="const" >
- <return type="Color">
- </return>
- <description>
- </description>
- </method>
- </methods>
- <signals>
- <signal name="color_changed">
- <argument index="0" name="color" type="Color">
- </argument>
- <description>
- </description>
- </signal>
- </signals>
- <constants>
- </constants>
-</class>
-<class name="ConcavePolygonShape" inherits="Shape" category="Resources">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- <method name="set_faces" >
- <argument index="0" name="faces" type="Vector3Array">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_faces" qualifiers="const" >
- <return type="Vector3Array">
- </return>
- <description>
- </description>
- </method>
- </methods>
- <constants>
- </constants>
-</class>
-<class name="ConfirmationDialog" inherits="Popup" category="Nodes/GUI Nodes">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- <method name="get_ok" >
- <return type="Object">
- </return>
- <description>
- </description>
- </method>
- <method name="get_cancel" >
- <return type="Object">
- </return>
- <description>
- </description>
- </method>
- <method name="set_text" >
- <argument index="0" name="text" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_hide_on_ok" >
- <argument index="0" name="enabled" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_hide_on_ok" qualifiers="const" >
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="register_text_enter" >
- <argument index="0" name="line_edit" type="Object">
- </argument>
- <description>
- </description>
- </method>
- </methods>
- <signals>
- <signal name="confirmed">
- <description>
- </description>
- </signal>
- </signals>
- <constants>
- </constants>
-</class>
-<class name="Control" inherits="CanvasItem" category="Core">
- <brief_description>
- Control is the base class Node for all the GUI components.
- </brief_description>
- <description>
- 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/]&#10;&#9;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/]&#10;&#9;TODO: Explain margins and anchors[html br/]&#10;&#9;TODO: explain focus[html br/]
- </description>
- <methods>
- <method name="accept_event" >
- <description>
- </description>
- </method>
- <method name="get_minimum_size" qualifiers="const" >
- <return type="Vector2">
- </return>
- <description>
- Return the minimum size this Control can shrink to. A control will never be displayed or resized smaller than its minimum size.
- </description>
- </method>
- <method name="is_window" qualifiers="const" >
- <return type="bool">
- </return>
- <description>
- Return wether this control is a [html i]window[html /i]. Controls are considered windows when their parent [Node] is not a Control.
- </description>
- </method>
- <method name="get_window" qualifiers="const" >
- <return type="Object">
- </return>
- <description>
- Return the [html i]window[html /i] for this control, ascending the scene tree (see [method is_window]).
- </description>
- </method>
- <method name="set_anchor" >
- <argument index="0" name="margin" type="int">
- </argument>
- <argument index="1" name="anchor_mode" type="int">
- </argument>
- <description>
- 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]).
- </description>
- </method>
- <method name="get_anchor" qualifiers="const" >
- <return type="int">
- </return>
- <argument index="0" name="margin" type="int">
- </argument>
- <description>
- Return the anchor type (ANCHOR_BEGIN, ANCHOR_END, ANCHOR_RATIO) for a given margin (MARGIN_LEFT, MARGIN_TOP, MARGIN_RIGHT, MARGIN_BOTTOM).
- </description>
- </method>
- <method name="set_margin" >
- <argument index="0" name="margin" type="int">
- </argument>
- <argument index="1" name="offset" type="real">
- </argument>
- <description>
- 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.
- </description>
- </method>
- <method name="set_anchor_and_margin" >
- <argument index="0" name="margin" type="int">
- </argument>
- <argument index="1" name="anchor_mode" type="int">
- </argument>
- <argument index="2" name="offset" type="real">
- </argument>
- <description>
- 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]).
- </description>
- </method>
- <method name="set_begin" >
- <argument index="0" name="pos" type="Vector2">
- </argument>
- <description>
- Sets MARGIN_LEFT and MARGIN_TOP at the same time. This is a helper (see [method set_margin]).
- </description>
- </method>
- <method name="set_end" >
- <argument index="0" name="pos" type="Vector2">
- </argument>
- <description>
- Sets MARGIN_RIGHT and MARGIN_BOTTOM at the same time. This is a helper (see [method set_margin]).
- </description>
- </method>
- <method name="set_pos" >
- <argument index="0" name="pos" type="Vector2">
- </argument>
- <description>
- 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]).
- </description>
- </method>
- <method name="set_size" >
- <argument index="0" name="size" type="Vector2">
- </argument>
- <description>
- Changes MARGIN_RIGHT and MARGIN_BOTTOM to fit a given size. This is a helper (see [method set_margin]).
- </description>
- </method>
- <method name="set_global_pos" >
- <argument index="0" name="pos" type="Vector2">
- </argument>
- <description>
- 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]).
- </description>
- </method>
- <method name="get_margin" qualifiers="const" >
- <return type="real">
- </return>
- <argument index="0" name="margin" type="int">
- </argument>
- <description>
- 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.
- </description>
- </method>
- <method name="get_begin" qualifiers="const" >
- <return type="Vector2">
- </return>
- <description>
- </description>
- </method>
- <method name="get_end" qualifiers="const" >
- <return type="Vector2">
- </return>
- <description>
- Returns MARGIN_LEFT and MARGIN_TOP at the same time. This is a helper (see [method set_margin]).
- </description>
- </method>
- <method name="get_pos" qualifiers="const" >
- <return type="Vector2">
- </return>
- <description>
- Returns the Control position, relative to the top-left corner of the parent Control and independly of the anchor mode.
- </description>
- </method>
- <method name="get_size" qualifiers="const" >
- <return type="Vector2">
- </return>
- <description>
- 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]).
- </description>
- </method>
- <method name="get_global_pos" qualifiers="const" >
- <return type="Vector2">
- </return>
- <description>
- Returns the Control position, relative to the top-left corner of the parent Control and independent of the anchor mode.
- </description>
- </method>
- <method name="get_rect" qualifiers="const" >
- <return type="Rect2">
- </return>
- <description>
- 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]).
- </description>
- </method>
- <method name="get_global_rect" qualifiers="const" >
- <return type="Rect2">
- </return>
- <description>
- 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]).
- </description>
- </method>
- <method name="set_area_as_parent_rect" >
- <description>
- 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]).
- </description>
- </method>
- <method name="show_modal" >
- <argument index="0" name="exclusive" type="bool" default="false">
- </argument>
- <description>
- 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.
- </description>
- </method>
- <method name="set_focus_mode" >
- <argument index="0" name="mode" type="int">
- </argument>
- <description>
- 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.
- </description>
- </method>
- <method name="has_focus" qualifiers="const" >
- <return type="bool">
- </return>
- <description>
- Return wether the Control is the current focused control (see [method set_focus_mode]).
- </description>
- </method>
- <method name="grab_focus" >
- <description>
- Steal the focus from another control and become the focused control (see [method set_focus_mode]).
- </description>
- </method>
- <method name="set_theme" >
- <argument index="0" name="theme" type="Object">
- </argument>
- <description>
- Override whole the [Theme] for this Control and all its children controls.
- </description>
- </method>
- <method name="get_theme" qualifiers="const" >
- <return type="Object">
- </return>
- <description>
- Return a [Theme] override, if one exists (see [method set_theme]).
- </description>
- </method>
- <method name="add_icon_override" >
- <argument index="0" name="name" type="String">
- </argument>
- <argument index="1" name="texture" type="Object">
- </argument>
- <description>
- Override a single icon ([Texture]) in the theme of this Control. If texture is empty, override is cleared.
- </description>
- </method>
- <method name="add_style_override" >
- <argument index="0" name="name" type="String">
- </argument>
- <argument index="1" name="stylebox" type="Object">
- </argument>
- <description>
- Override a single stylebox ([Stylebox]) in the theme of this Control. If stylebox is empty, override is cleared.
- </description>
- </method>
- <method name="add_font_override" >
- <argument index="0" name="name" type="String">
- </argument>
- <argument index="1" name="font" type="Object">
- </argument>
- <description>
- Override a single font (font) in the theme of this Control. If font is empty, override is cleared.
- </description>
- </method>
- <method name="add_color_override" >
- <argument index="0" name="name" type="String">
- </argument>
- <argument index="1" name="color" type="Color">
- </argument>
- <description>
- </description>
- </method>
- <method name="add_constant_override" >
- <argument index="0" name="name" type="String">
- </argument>
- <argument index="1" name="constant" type="int">
- </argument>
- <description>
- Override a single constant (integer) in the theme of this Control. If constant equals Theme.INVALID_CONSTANT, override is cleared.
- </description>
- </method>
- <method name="get_parent_control" qualifiers="const" >
- <return type="Object">
- </return>
- <description>
- Return the parent Control. Unlike get_parent() in [Node], only returns a valid object if the parent is a Control.
- </description>
- </method>
- <method name="set_tooltip" >
- <argument index="0" name="tooltip" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_tooltip" qualifiers="const" >
- <return type="String">
- </return>
- <argument index="0" name="atpos" type="Vector2" default="Vector2(0,0)">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_default_cursor_shape" >
- <argument index="0" name="shape" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_default_cursor_shape" qualifiers="const" >
- <return type="int">
- </return>
- <description>
- </description>
- </method>
- <method name="get_cursor_shape" qualifiers="const" >
- <return type="int">
- </return>
- <argument index="0" name="pos" type="Vector2" default="Vector2(0,0)">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_focus_neighbour" >
- <argument index="0" name="margin" type="int">
- </argument>
- <argument index="1" name="neighbour" type="NodePath">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_focus_neighbour" qualifiers="const" >
- <return type="NodePath">
- </return>
- <argument index="0" name="margin" type="int">
- </argument>
- <description>
- </description>
- </method>
- </methods>
- <signals>
- <signal name="focus_enter">
- <description>
- </description>
- </signal>
- <signal name="mouse_enter">
- <description>
- </description>
- </signal>
- <signal name="resized">
- <description>
- </description>
- </signal>
- <signal name="focus_exit">
- <description>
- </description>
- </signal>
- <signal name="input_event">
- <description>
- </description>
- </signal>
- <signal name="mouse_exit">
- <description>
- </description>
- </signal>
- </signals>
- <constants>
- <constant name="CURSOR_FDIAGSIZE" value="12">
- </constant>
- <constant name="CURSOR_CAN_DROP" value="7">
- </constant>
- <constant name="CURSOR_DRAG" value="6">
- </constant>
- <constant name="CURSOR_IBEAM" value="1">
- </constant>
- <constant name="NOTIFICATION_FOCUS_ENTER" value="37">
- Control gained focus.
- </constant>
- <constant name="CURSOR_MOVE" value="13">
- </constant>
- <constant name="NOTIFICATION_MOUSE_ENTER" value="35">
- Mouse pointer entered the area of the Control.
- </constant>
- <constant name="NOTIFICATION_RESIZED" value="34">
- Control changed size (get_size() reports the new size).
- </constant>
- <constant name="FOCUS_CLICK" value="1">
- Control can acquire focus only if clicked.
- </constant>
- <constant name="CURSOR_HELP" value="16">
- </constant>
- <constant name="CURSOR_VSIZE" value="9">
- </constant>
- <constant name="CURSOR_VSPLIT" value="14">
- </constant>
- <constant name="CURSOR_BDIAGSIZE" value="11">
- </constant>
- <constant name="CURSOR_CROSS" value="3">
- </constant>
- <constant name="CURSOR_POINTING_HAND" value="2">
- </constant>
- <constant name="NOTIFICATION_FOCUS_EXIT" value="38">
- Control lost focus.
- </constant>
- <constant name="FOCUS_NONE" value="0">
- Control can&apos;t acquire focus.
- </constant>
- <constant name="ANCHOR_BEGIN" value="0">
- X is relative to MARGIN_LEFT, Y is relative to MARGIN_TOP,
- </constant>
- <constant name="CURSOR_HSIZE" value="10">
- </constant>
- <constant name="CURSOR_BUSY" value="5">
- </constant>
- <constant name="CURSOR_ARROW" value="0">
- </constant>
- <constant name="NOTIFICATION_MODAL_CLOSE" value="40">
- </constant>
- <constant name="NOTIFICATION_MOUSE_EXIT" value="36">
- Mouse pointer exited the area of the Control.
- </constant>
- <constant name="FOCUS_ALL" value="2">
- Control can acquire focus if clicked, or by pressing TAB/Directionals in the keyboard from another Control.
- </constant>
- <constant name="CURSOR_HSPLIT" value="15">
- </constant>
- <constant name="ANCHOR_RATIO" value="2">
- X and Y are a ratio (0 to 1) relative to the parent size 0 is left/top, 1 is right/bottom.
- </constant>
- <constant name="ANCHOR_END" value="1">
- X is relative to -MARGIN_RIGHT, Y is relative to -MARGIN_BOTTOM,
- </constant>
- <constant name="CURSOR_FORBIDDEN" value="8">
- </constant>
- <constant name="CURSOR_WAIT" value="4">
- </constant>
- <constant name="NOTIFICATION_THEME_CHANGED" value="39">
- </constant>
- </constants>
-</class>
-<class name="ConvexPolygonShape" inherits="Shape" category="Resources">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- <method name="set_planes" >
- <argument index="0" name="planes" type="Array">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_planes" qualifiers="const" >
- <return type="Array">
- </return>
- <description>
- </description>
- </method>
- </methods>
- <constants>
- </constants>
-</class>
-<class name="GridMap" inherits="Spatial" category="Nodes/3D">
- <brief_description>
- GridMap is like a tile map, but in 3D.
- </brief_description>
- <description>
- 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.
- </description>
- <methods>
- <method name="set_theme" >
- <argument index="0" name="theme" type="Object">
- </argument>
- <description>
- Set a MeshLibrary. Cell indices refer to items in the theme.
- </description>
- </method>
- <method name="get_theme" qualifiers="const" >
- <return type="Object">
- </return>
- <description>
- Get the current MeshLibrary (if exists).
- </description>
- </method>
- <method name="set_cell_size" >
- <argument index="0" name="size" type="real">
- </argument>
- <description>
- Set the size of a cell, in worldpsace units. All cells in a GridMap are the same size.
- </description>
- </method>
- <method name="get_cell_size" qualifiers="const" >
- <return type="real">
- </return>
- <description>
- Return the current cell size.
- </description>
- </method>
- <method name="set_octant_size" >
- <argument index="0" name="size" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_octant_size" qualifiers="const" >
- <return type="int">
- </return>
- <description>
- </description>
- </method>
- <method name="set_width" >
- <argument index="0" name="width" type="int">
- </argument>
- <description>
- Set the width of the GridMap. Width is the amount of cells i the direction of the X coordinate.
- </description>
- </method>
- <method name="get_width" qualifiers="const" >
- <return type="int">
- </return>
- <description>
- Get the width of the GridMap. Width is the amount of cells i the direction of the X coordinate.
- </description>
- </method>
- <method name="set_height" >
- <argument index="0" name="height" type="int">
- </argument>
- <description>
- Set the height of the GridMap. Height is the amount of cells i the direction of the Y coordinate.
- </description>
- </method>
- <method name="get_height" qualifiers="const" >
- <return type="int">
- </return>
- <description>
- Get the height of the GridMap. Height is the amount of cells i the direction of the Y coordinate.
- </description>
- </method>
- <method name="set_depth" >
- <argument index="0" name="depth" type="int">
- </argument>
- <description>
- Set the depth of the GridMap. Depth is the amount of cells i the direction of the Z coordinate.
- </description>
- </method>
- <method name="get_depth" qualifiers="const" >
- <return type="int">
- </return>
- <description>
- Get the depth of the GridMap. Depth is the amount of cells i the direction of the Z coordinate.
- </description>
- </method>
- <method name="set_cell_item" >
- <argument index="0" name="x" type="int">
- </argument>
- <argument index="1" name="y" type="int">
- </argument>
- <argument index="2" name="z" type="int">
- </argument>
- <argument index="3" name="item" type="int">
- </argument>
- <argument index="4" name="orientation" type="int" default="0">
- </argument>
- <description>
- Set a cell item (x,y,z pos). Cell items are indices to items in the [MeshLibrary].
- </description>
- </method>
- <method name="get_cell_item" qualifiers="const" >
- <return type="int">
- </return>
- <argument index="0" name="x" type="int">
- </argument>
- <argument index="1" name="y" type="int">
- </argument>
- <argument index="2" name="z" type="int">
- </argument>
- <description>
- Get a cell item (x,y,z pos). Cell items are indices to items in the [MeshLibrary].
- </description>
- </method>
- <method name="get_cell_item_orientation" qualifiers="const" >
- <return type="int">
- </return>
- <argument index="0" name="x" type="int">
- </argument>
- <argument index="1" name="y" type="int">
- </argument>
- <argument index="2" name="z" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="resource_changed" >
- <argument index="0" name="arg0" type="Object">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_center_x" >
- <argument index="0" name="enable" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_center_x" qualifiers="const" >
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="set_center_y" >
- <argument index="0" name="enable" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_center_y" qualifiers="const" >
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="set_center_z" >
- <argument index="0" name="enable" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_center_z" qualifiers="const" >
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="set_clip" >
- <argument index="0" name="enabled" type="bool">
- </argument>
- <argument index="1" name="clipabove" type="bool" default="true">
- </argument>
- <argument index="2" name="floor" type="int" default="0">
- </argument>
- <argument index="3" name="axis" type="int" default="0">
- </argument>
- <description>
- </description>
- </method>
- <method name="crate_area" >
- <return type="int">
- </return>
- <argument index="0" name="id" type="int">
- </argument>
- <argument index="1" name="area" type="AABB">
- </argument>
- <description>
- </description>
- </method>
- <method name="area_get_bounds" qualifiers="const" >
- <return type="AABB">
- </return>
- <argument index="0" name="area" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="area_set_exterior_portal" >
- <argument index="0" name="area" type="int">
- </argument>
- <argument index="1" name="enable" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="area_set_name" >
- <argument index="0" name="area" type="int">
- </argument>
- <argument index="1" name="name" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="area_get_name" qualifiers="const" >
- <return type="String">
- </return>
- <argument index="0" name="area" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="area_is_exterior_portal" qualifiers="const" >
- <return type="bool">
- </return>
- <argument index="0" name="area" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="area_set_portal_disable_distance" >
- <argument index="0" name="area" type="int">
- </argument>
- <argument index="1" name="distance" type="real">
- </argument>
- <description>
- </description>
- </method>
- <method name="area_get_portal_disable_distance" qualifiers="const" >
- <return type="real">
- </return>
- <argument index="0" name="area" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="area_set_portal_disable_color" >
- <argument index="0" name="area" type="int">
- </argument>
- <argument index="1" name="color" type="Color">
- </argument>
- <description>
- </description>
- </method>
- <method name="area_get_portal_disable_color" qualifiers="const" >
- <return type="Color">
- </return>
- <argument index="0" name="area" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="erase_area" >
- <argument index="0" name="area" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_unused_area_id" qualifiers="const" >
- <return type="int">
- </return>
- <description>
- </description>
- </method>
- </methods>
- <constants>
- <constant name="INVALID_CELL_ITEM" value="-1">
- Value indicating that a cell item is not used or invalid.
- </constant>
- </constants>
-</class>
-<class name="MeshLibrary" inherits="Resource" category="Resources">
- <brief_description>
- Theme for a [GridMap].
- </brief_description>
- <description>
- MeshLibrary is [Resource] containing the data used in a [GridMap]. It&apos;s filled with items, each containing a mesh and a collision shape.
- </description>
- <methods>
- <method name="create_item" >
- <argument index="0" name="id" type="int">
- </argument>
- <description>
- Create a new item, and assign it a given id.
- </description>
- </method>
- <method name="set_item_name" >
- <argument index="0" name="id" type="int">
- </argument>
- <argument index="1" name="name" type="String">
- </argument>
- <description>
- Set the name of an item, referenced by id.
- </description>
- </method>
- <method name="set_item_mesh" >
- <argument index="0" name="id" type="int">
- </argument>
- <argument index="1" name="mesh" type="Object">
- </argument>
- <description>
- Set the [Mesh] of an item, referenced by id.
- </description>
- </method>
- <method name="set_item_shape" >
- <argument index="0" name="id" type="int">
- </argument>
- <argument index="1" name="shape" type="Object">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_item_name" qualifiers="const" >
- <return type="String">
- </return>
- <argument index="0" name="id" type="int">
- </argument>
- <description>
- Get the name of an item, referenced by id.
- </description>
- </method>
- <method name="get_item_mesh" qualifiers="const" >
- <return type="Object">
- </return>
- <argument index="0" name="id" type="int">
- </argument>
- <description>
- Get the [Mesh] of an item, referenced by id.
- </description>
- </method>
- <method name="get_item_shape" qualifiers="const" >
- <return type="Object">
- </return>
- <argument index="0" name="id" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="remove_item" >
- <argument index="0" name="id" type="int">
- </argument>
- <description>
- Remove an item, referenced by id.
- </description>
- </method>
- <method name="clear" >
- <description>
- Clear all items contained in this resource.
- </description>
- </method>
- <method name="get_item_list" qualifiers="const" >
- <return type="IntArray">
- </return>
- <description>
- Get the list of item IDs contained in this theme.
- </description>
- </method>
- <method name="get_last_unused_item_id" qualifiers="const" >
- <return type="int">
- </return>
- <description>
- Get the last unused item id. This is useful for creating new item IDs.
- </description>
- </method>
- </methods>
- <constants>
- </constants>
-</class>
-<class name="CylinderShape" inherits="Shape" category="Resources">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- <method name="set_radius" >
- <argument index="0" name="radius" type="real">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_radius" qualifiers="const" >
- <return type="real">
- </return>
- <description>
- </description>
- </method>
- <method name="set_height" >
- <argument index="0" name="height" type="real">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_height" qualifiers="const" >
- <return type="real">
- </return>
- <description>
- </description>
- </method>
- </methods>
- <constants>
- </constants>
-</class>
-<class name="DOFBlurFX" inherits="ScenarioFX" category="Nodes">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- </methods>
- <constants>
- </constants>
-</class>
-<class name="DirectionalLight" inherits="Light" category="Nodes/3D/3D Visual Nodes/3D Light Nodes">
- <brief_description>
- Directional Light, such as the Sun or the Moon.
- </brief_description>
- <description>
- 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.
- </description>
- <methods>
- </methods>
- <constants>
- </constants>
-</class>
-<class name="DynamicBody" inherits="PhysicsBody" category="Nodes/3D">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- <method name="set_mass" >
- <argument index="0" name="mass" type="real">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_friction" >
- <argument index="0" name="friction" type="real">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_bounce" >
- <argument index="0" name="bounce" type="real">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_mass" qualifiers="const" >
- <return type="real">
- </return>
- <description>
- </description>
- </method>
- <method name="get_friction" qualifiers="const" >
- <return type="real">
- </return>
- <description>
- </description>
- </method>
- <method name="get_bounce" qualifiers="const" >
- <return type="real">
- </return>
- <description>
- </description>
- </method>
- <method name="set_linear_velocity" >
- <argument index="0" name="linear_velocity" type="Vector3">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_linear_velocity" qualifiers="const" >
- <return type="Vector3">
- </return>
- <description>
- </description>
- </method>
- <method name="set_angular_velocity" >
- <argument index="0" name="angular_velocity" type="Vector3">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_angular_velocity" qualifiers="const" >
- <return type="Vector3">
- </return>
- <description>
- </description>
- </method>
- <method name="set_sleeping" >
- <argument index="0" name="sleeping" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="is_sleeping" qualifiers="const" >
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="set_applied_force" >
- <argument index="0" name="applied_force" type="Vector3">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_applied_force" qualifiers="const" >
- <return type="Vector3">
- </return>
- <description>
- </description>
- </method>
- <method name="set_applied_torque" >
- <argument index="0" name="applied_torque" type="Vector3">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_applied_torque" qualifiers="const" >
- <return type="Vector3">
- </return>
- <description>
- </description>
- </method>
- <method name="apply_local_impulse" >
- <argument index="0" name="pos" type="Vector3">
- </argument>
- <argument index="1" name="impulse" type="Vector3">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_axis_velocity" >
- <argument index="0" name="axis_velocity" type="Vector3">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_direct_state_control" >
- <argument index="0" name="enabled" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="is_direct_state_control_enabled" qualifiers="const" >
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="set_omit_force_integration" >
- <argument index="0" name="enabled" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="is_omitting_force_integration" qualifiers="const" >
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- </methods>
- <constants>
- </constants>
-</class>
-<class name="DynamicCharacterBody" inherits="DynamicBody" category="Nodes/3D">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- </methods>
- <constants>
- </constants>
-</class>
-<class name="DynamicCustomBody" inherits="DynamicBody" category="Nodes/3D">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- <method name="set_mode" >
- <argument index="0" name="mode" type="int">
- </argument>
- <description>
- </description>
- </method>
- </methods>
- <constants>
- </constants>
-</class>
-<class name="DynamicRigidBody" inherits="DynamicBody" category="Nodes/3D">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- </methods>
- <constants>
- </constants>
-</class>
-<class name="FileDialog" inherits="Popup" category="Nodes/GUI Nodes">
- <brief_description>
- Dialog for selecting files or directories in the filesystem.
- </brief_description>
- <description>
- FileDialog is a preset dialog used to choose files and directories in the filesystem. It supports filter masks.
- </description>
- <methods>
- <method name="clear_filters" >
- <description>
- Clear all the added filters in the dialog.
- </description>
- </method>
- <method name="add_filter" >
- <argument index="0" name="filter" type="String">
- </argument>
- <description>
- Add a custom filter. Filter format is: &quot;mask ; description.
- </description>
- </method>
- <method name="get_current_dir" qualifiers="const" >
- <return type="String">
- </return>
- <description>
- Get the current working directory of the file dialog.
- </description>
- </method>
- <method name="get_current_file" qualifiers="const" >
- <return type="String">
- </return>
- <description>
- Get the current selected file of the file dialog (empty if none).
- </description>
- </method>
- <method name="get_current_path" qualifiers="const" >
- <return type="String">
- </return>
- <description>
- Get the current selected path (directory and file) of the file dialog (empty if none).
- </description>
- </method>
- <method name="set_current_dir" >
- <argument index="0" name="dir" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_current_file" >
- <argument index="0" name="file" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_current_path" >
- <argument index="0" name="path" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_mode" >
- <argument index="0" name="mode" type="int">
- </argument>
- <description>
- Set the file dialog mode from the MODE_* enum.
- </description>
- </method>
- <method name="get_mode" qualifiers="const" >
- <return type="int">
- </return>
- <description>
- Get the file dialog mode from the MODE_* enum.
- </description>
- </method>
- </methods>
- <signals>
- <signal name="dir_selected">
- <argument index="0" name="dir" type="String">
- </argument>
- <description>
- </description>
- </signal>
- <signal name="file_selected">
- <argument index="0" name="path" type="String">
- </argument>
- <description>
- Event emitted when the user selects a file (double clicks it or presses the OK button).
- </description>
- </signal>
- </signals>
- <constants>
- <constant name="MODE_OPEN_DIR" value="1">
- </constant>
- <constant name="MODE_OPEN_FILE" value="0">
- Editor will not allow to select nonexistent files.
- </constant>
- <constant name="MODE_SAVE_FILE" value="2">
- Editor will warn when a file exists.
- </constant>
- </constants>
-</class>
-<class name="FixedMaterial" inherits="Material" category="Resources">
- <brief_description>
- Simple Material with a fixed parameter set.
- </brief_description>
- <description>
- 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.
- </description>
- <methods>
- <method name="set_shader" >
- <argument index="0" name="shader" type="Object">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_shader" qualifiers="const" >
- <return type="Object">
- </return>
- <description>
- </description>
- </method>
- <method name="set_parameter" >
- <argument index="0" name="param" type="int">
- </argument>
- <argument index="1" name="value" type="var">
- </argument>
- <description>
- Set a parameter, parameters are defined in the PARAM_* enum. The type of each parameter may change, so it&apos;s best to check the enum.
- </description>
- </method>
- <method name="get_parameter" qualifiers="const" >
- <argument index="0" name="param" type="int">
- </argument>
- <description>
- Return a parameter, parameters are defined in the PARAM_* enum. The type of each parameter may change, so it&apos;s best to check the enum.
- </description>
- </method>
- <method name="set_texture" >
- <argument index="0" name="param" type="int">
- </argument>
- <argument index="1" name="texture" type="Object">
- </argument>
- <description>
- Set a texture. Textures change parameters per texel and are mapped to the model depending on the texcoord mode (see [method set_texcoord_mode]).
- </description>
- </method>
- <method name="get_texture" qualifiers="const" >
- <return type="Object">
- </return>
- <argument index="0" name="param" type="int">
- </argument>
- <description>
- Return a texture. Textures change parameters per texel and are mapped to the model depending on the texcoord mode (see [method set_texcoord_mode]).
- </description>
- </method>
- <method name="set_texgen_mode" >
- <argument index="0" name="mode" type="int">
- </argument>
- <description>
- 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]).
- </description>
- </method>
- <method name="get_texgen_mode" qualifiers="const" >
- <return type="int">
- </return>
- <description>
- 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]).
- </description>
- </method>
- <method name="set_texcoord_mode" >
- <argument index="0" name="param" type="int">
- </argument>
- <argument index="1" name="mode" type="int">
- </argument>
- <description>
- Set the texture coordinate mode. Each texture param (from the PARAM_* enum) has one. It defines how the textures are mapped to the object.
- </description>
- </method>
- <method name="get_texcoord_mode" qualifiers="const" >
- <return type="int">
- </return>
- <argument index="0" name="param" type="int">
- </argument>
- <description>
- Return the texture coordinate mode. Each texture param (from the PARAM_* enum) has one. It defines how the textures are mapped to the object.
- </description>
- </method>
- <method name="set_uv_transform" >
- <argument index="0" name="transform" type="Transform">
- </argument>
- <description>
- Sets a special transform used to post-transform UV coordinates of the uv_xfrom tecoord mode: TEXCOORD_UV_TRANSFORM
- </description>
- </method>
- <method name="get_uv_transform" qualifiers="const" >
- <return type="Transform">
- </return>
- <description>
- Returns the special transform used to post-transform UV coordinates of the uv_xfrom tecoord mode: TEXCOORD_UV_TRANSFORM
- </description>
- </method>
- </methods>
- <constants>
- <constant name="PARAM_SPECULAR_EXP" value="4">
- Specular Exponent (size of the specular dot)
- </constant>
- <constant name="PARAM_DETAIL" value="1">
- Detail Layer for diffuse lighting.
- </constant>
- <constant name="TEXCOORD_UV2" value="2">
- Read texture coordinates from the UV2 array.
- </constant>
- <constant name="TEXGEN_SCREENZ" value="3">
- Use the screen coordinates as UV, scaled by depth and the screenz coefficient.
- </constant>
- <constant name="TEXCOORD_UV_TRANSFORM" value="1">
- Read texture coordinates from the UV array and transform them by uv_xform.
- </constant>
- <constant name="TEXGEN_LOCAL_XY" value="0">
- Use object local X and Y coordinates as UV.
- </constant>
- <constant name="PARAM_SHADE_PARAM" value="8">
- </constant>
- <constant name="PARAM_MAX" value="9">
- Maximum amount of parameters
- </constant>
- <constant name="PARAM_DIFFUSE" value="0">
- Diffuse Lighting (light scattered from surface).
- </constant>
- <constant name="PARAM_EMISSION" value="3">
- Emission Lighting (light emitted from the surface)
- </constant>
- <constant name="PARAM_SPECULAR" value="2">
- Specular Lighting (light reflected from the surface).
- </constant>
- <constant name="PARAM_DETAIL_MIX" value="6">
- Mix coefficient for the detail layer.
- </constant>
- <constant name="TEXGEN_SPHERE" value="1">
- Use view normal reflected by object normal as UV.
- </constant>
- <constant name="PARAM_NORMAL" value="7">
- Normal Map (irregularity map).
- </constant>
- <constant name="PARAM_GLOW" value="5">
- Glow (Visible emitted scattered light).
- </constant>
- <constant name="TEXCOORD_UV" value="0">
- Read texture coordinates from the UV array.
- </constant>
- <constant name="TEXCOORD_TEXGEN" value="3">
- Use texture coordinates from the texgen.
- </constant>
- <constant name="TEXGEN_SCREEN" value="2">
- Use the screen coordinates as UV.
- </constant>
- </constants>
-</class>
-<class name="FogFX" inherits="ScenarioFX" category="Nodes">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- </methods>
- <constants>
- </constants>
-</class>
-<class name="FollowCamera" inherits="Camera" category="Nodes/3D">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- <method name="set_orbit" >
- <argument index="0" name="orbit" type="Vector2">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_orbit" qualifiers="const" >
- <return type="Vector2">
- </return>
- <description>
- </description>
- </method>
- <method name="set_orbit_x" >
- <argument index="0" name="x" type="real">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_orbit_y" >
- <argument index="0" name="y" type="real">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_min_orbit_x" >
- <argument index="0" name="x" type="real">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_min_orbit_x" qualifiers="const" >
- <return type="real">
- </return>
- <description>
- </description>
- </method>
- <method name="set_max_orbit_x" >
- <argument index="0" name="x" type="real">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_max_orbit_x" qualifiers="const" >
- <return type="real">
- </return>
- <description>
- </description>
- </method>
- <method name="set_height" >
- <argument index="0" name="height" type="real">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_height" qualifiers="const" >
- <return type="real">
- </return>
- <description>
- </description>
- </method>
- <method name="set_inclination" >
- <argument index="0" name="inclination" type="real">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_inclination" qualifiers="const" >
- <return type="real">
- </return>
- <description>
- </description>
- </method>
- <method name="rotate_orbit" >
- <argument index="0" name="arg0" type="Vector2">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_distance" >
- <argument index="0" name="distance" type="real">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_distance" qualifiers="const" >
- <return type="real">
- </return>
- <description>
- </description>
- </method>
- <method name="set_max_distance" >
- <argument index="0" name="max_distance" type="real">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_max_distance" qualifiers="const" >
- <return type="real">
- </return>
- <description>
- </description>
- </method>
- <method name="set_min_distance" >
- <argument index="0" name="min_distance" type="real">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_min_distance" qualifiers="const" >
- <return type="real">
- </return>
- <description>
- </description>
- </method>
- <method name="set_clip" >
- <argument index="0" name="enable" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="has_clip" qualifiers="const" >
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="set_autoturn" >
- <argument index="0" name="enable" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="has_autoturn" qualifiers="const" >
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="set_autoturn_tolerance" >
- <argument index="0" name="degrees" type="real">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_autoturn_tolerance" qualifiers="const" >
- <return type="real">
- </return>
- <description>
- </description>
- </method>
- <method name="set_autoturn_speed" >
- <argument index="0" name="speed" type="real">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_autoturn_speed" qualifiers="const" >
- <return type="real">
- </return>
- <description>
- </description>
- </method>
- <method name="set_smoothing" >
- <argument index="0" name="enable" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="has_smoothing" qualifiers="const" >
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="set_rotation_smoothing" >
- <argument index="0" name="amount" type="real">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_rotation_smoothing" qualifiers="const" >
- <return type="real">
- </return>
- <description>
- </description>
- </method>
- <method name="set_translation_smoothing" >
- <argument index="0" name="amount" type="real">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_translation_smoothing" qualifiers="const" >
- <return type="real">
- </return>
- <description>
- </description>
- </method>
- <method name="set_use_lookat_target" >
- <argument index="0" name="use" type="bool">
- </argument>
- <argument index="1" name="lookat" type="Vector3" default="Vector3(0, 0, 0)">
- </argument>
- <description>
- </description>
- </method>
- </methods>
- <constants>
- </constants>
-</class>
-<class name="Font" inherits="Resource" category="Resources">
- <brief_description>
- Internationalized font and text drawing support.
- </brief_description>
- <description>
- 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.
- </description>
- <methods>
- <method name="set_height" >
- <argument index="0" name="px" type="real">
- </argument>
- <description>
- Set the total font height (ascent plus descent) in pixels.
- </description>
- </method>
- <method name="get_height" qualifiers="const" >
- <return type="real">
- </return>
- <description>
- Return the total font height (ascent plus descent) in pixels.
- </description>
- </method>
- <method name="set_ascent" >
- <argument index="0" name="px" type="real">
- </argument>
- <description>
- Set the font ascent (number of pixels above the baseline).
- </description>
- </method>
- <method name="get_ascent" qualifiers="const" >
- <return type="real">
- </return>
- <description>
- Return the font ascent (number of pixels above the baseline).
- </description>
- </method>
- <method name="get_descent" qualifiers="const" >
- <return type="real">
- </return>
- <description>
- Return the font descent (number of pixels below the baseline).
- </description>
- </method>
- <method name="add_kerning_pair" >
- <argument index="0" name="char_a" type="int">
- </argument>
- <argument index="1" name="char_b" type="int">
- </argument>
- <argument index="2" name="kerning" type="int">
- </argument>
- <description>
- 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.
- </description>
- </method>
- <method name="get_kerning_pair" qualifiers="const" >
- <return type="int">
- </return>
- <argument index="0" name="arg0" type="int">
- </argument>
- <argument index="1" name="arg1" type="int">
- </argument>
- <description>
- Return a kerning pair as a difference. Kerning pairs are special cases where a typeface advance is determined by the next character.
- </description>
- </method>
- <method name="add_texture" >
- <argument index="0" name="texture" type="Object">
- </argument>
- <description>
- Add a texture to the [Font].
- </description>
- </method>
- <method name="add_char" >
- <argument index="0" name="character" type="int">
- </argument>
- <argument index="1" name="texture" type="int">
- </argument>
- <argument index="2" name="rect" type="Rect2">
- </argument>
- <argument index="3" name="align" type="Vector2" default="Vector2(0,0)">
- </argument>
- <argument index="4" name="advance" type="real" default="-1">
- </argument>
- <description>
- Add a character to the font, where &quot;character&quot; is the unicode value, &quot;texture&quot; is the texture index, &quot;rect&quot; is the region in the texture (in pixels!), &quot;align&quot; is the (optional) alignment for the character and &quot;advance&quot; is the (optional) advance.
- </description>
- </method>
- <method name="get_char_size" qualifiers="const" >
- <return type="Vector2">
- </return>
- <argument index="0" name="char" type="int">
- </argument>
- <argument index="1" name="next" type="int" default="0">
- </argument>
- <description>
- Return the size of a character, optionally taking kerning into account if the next character is provided.
- </description>
- </method>
- <method name="get_string_size" qualifiers="const" >
- <return type="Vector2">
- </return>
- <argument index="0" name="string" type="String">
- </argument>
- <description>
- Return the size of a string, taking kerning and advance into account.
- </description>
- </method>
- <method name="clear" >
- <description>
- Clear all the font data.
- </description>
- </method>
- <method name="draw" qualifiers="const" >
- <argument index="0" name="canvas_item" type="RID">
- </argument>
- <argument index="1" name="pos" type="Vector2">
- </argument>
- <argument index="2" name="string" type="String">
- </argument>
- <argument index="3" name="modulate" type="Color" default="Color(1,1,1,1)">
- </argument>
- <argument index="4" name="clip_w" type="int" default="-1">
- </argument>
- <description>
- Draw &quot;string&quot; into a canvas item using the font at a given &quot;pos&quot; position, with &quot;modulate&quot; color, and optionally clipping the width. &quot;pos&quot; specifies te baseline, not the top. To draw from the top, [html i]ascent[html /i] must be added to the Y axis.
- </description>
- </method>
- <method name="draw_char" qualifiers="const" >
- <return type="real">
- </return>
- <argument index="0" name="canvas_item" type="RID">
- </argument>
- <argument index="1" name="pos" type="Vector2">
- </argument>
- <argument index="2" name="char" type="int">
- </argument>
- <argument index="3" name="next" type="int" default="-1">
- </argument>
- <argument index="4" name="modulate" type="Color" default="Color(1,1,1,1)">
- </argument>
- <description>
- Draw character &quot;char&quot; into a canvas item using the font at a given &quot;pos&quot; position, with &quot;modulate&quot; color, and optionally kerning if &quot;next&quot; is apassed. clipping the width. &quot;pos&quot; 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.
- </description>
- </method>
- </methods>
- <constants>
- </constants>
-</class>
-<class name="GammaFX" inherits="ScenarioFX" category="Nodes">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- </methods>
- <constants>
- </constants>
-</class>
-<class name="_Geometry" inherits="Object" category="Core">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- <method name="build_box_planes" >
- <return type="Array">
- </return>
- <argument index="0" name="extents" type="Vector3">
- </argument>
- <description>
- </description>
- </method>
- <method name="build_cylinder_planes" >
- <return type="Array">
- </return>
- <argument index="0" name="radius" type="real">
- </argument>
- <argument index="1" name="height" type="real">
- </argument>
- <argument index="2" name="sides" type="int">
- </argument>
- <argument index="3" name="axis" type="int" default="2">
- </argument>
- <description>
- </description>
- </method>
- <method name="build_capsule_planes" >
- <return type="Array">
- </return>
- <argument index="0" name="radius" type="real">
- </argument>
- <argument index="1" name="height" type="real">
- </argument>
- <argument index="2" name="sides" type="int">
- </argument>
- <argument index="3" name="lats" type="int">
- </argument>
- <argument index="4" name="axis" type="int" default="2">
- </argument>
- <description>
- </description>
- </method>
- </methods>
- <constants>
- </constants>
-</class>
-<class name="Globals" inherits="Object" category="Core">
- <brief_description>
- Contains global variables accessible from everywhere.
- </brief_description>
- <description>
- Contains global variables accessible from everywhere. Use the normal [Object] API, such as &quot;Globals.get(variable)&quot;, &quot;Globals.set(variable,value)&quot; or &quot;Globals.has(variable)&quot; to access them. Variables stored in engine.cfg are also loaded into globals, making this object very useful for reading custom game configuration options.
- </description>
- <methods>
- <method name="has" qualifiers="const" >
- <return type="bool">
- </return>
- <argument index="0" name="name" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_order" >
- <argument index="0" name="name" type="String">
- </argument>
- <argument index="1" name="pos" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_order" qualifiers="const" >
- <return type="int">
- </return>
- <argument index="0" name="name" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_persisting" >
- <argument index="0" name="name" type="String">
- </argument>
- <argument index="1" name="enable" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="is_persisting" qualifiers="const" >
- <return type="bool">
- </return>
- <argument index="0" name="name" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="clear" >
- <argument index="0" name="name" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="localize_path" qualifiers="const" >
- <return type="String">
- </return>
- <argument index="0" name="path" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="globalize_path" qualifiers="const" >
- <return type="String">
- </return>
- <argument index="0" name="path" type="String">
- </argument>
- <description>
- </description>
- </method>
- </methods>
- <constants>
- </constants>
-</class>
-<class name="GlowFX" inherits="ScenarioFX" category="Nodes">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- </methods>
- <constants>
- </constants>
-</class>
-<class name="HDRFX" inherits="ScenarioFX" category="Nodes">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- </methods>
- <constants>
- </constants>
-</class>
-<class name="HScrollBar" inherits="ScrollBar" category="Nodes/GUI Nodes">
- <brief_description>
- Horizontal version of [ScrollBar], which goes from top (min) to bottom (max).
- </brief_description>
- <description>
- </description>
- <methods>
- </methods>
- <constants>
- </constants>
-</class>
-<class name="HSeparator" inherits="Separator" category="Nodes/GUI Nodes">
- <brief_description>
- Horizontal version of [Separator].
- </brief_description>
- <description>
- Horizontal version of [Separator]. It is used to separate objects vertiacally, though (but it looks horizontal!).
- </description>
- <methods>
- </methods>
- <constants>
- </constants>
-</class>
-<class name="HSlider" inherits="Slider" category="Nodes/GUI Nodes">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- </methods>
- <constants>
- </constants>
-</class>
-<class name="IP" inherits="Object" category="Networking">
- <brief_description>
- IP Protocol support functions.
- </brief_description>
- <description>
- 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.
- </description>
- <methods>
- <method name="resolve_hostname" >
- <return type="String">
- </return>
- <argument index="0" name="host" type="String">
- </argument>
- <description>
- Resolve a given hostname, blocking. Resolved hostname is returned as an IP.
- </description>
- </method>
- <method name="resolve_hostname_queue_item" >
- <return type="int">
- </return>
- <argument index="0" name="host" type="String">
- </argument>
- <description>
- Create a queue item for resolving a given hostname. The queue ID is returned, or RESOLVER_INVALID_ID on error.
- </description>
- </method>
- <method name="get_resolve_item_status" qualifiers="const" >
- <return type="int">
- </return>
- <argument index="0" name="id" type="int">
- </argument>
- <description>
- Return the status of hostname queued for resolving, given it&apos;s queue ID. Returned status can be any of the RESOLVER_STATUS_* enumeration.
- </description>
- </method>
- <method name="get_resolve_item_address" qualifiers="const" >
- <return type="String">
- </return>
- <argument index="0" name="id" type="int">
- </argument>
- <description>
- Return a resolved item address, or an empty string if an error happened or resolution didn&apos;t happen yet (see [method get_resolve_item_status]).
- </description>
- </method>
- <method name="erase_resolve_item" >
- <argument index="0" name="id" type="int">
- </argument>
- <description>
- 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.
- </description>
- </method>
- </methods>
- <constants>
- <constant name="RESOLVER_INVALID_ID" value="-1">
- </constant>
- <constant name="RESOLVER_MAX_QUERIES" value="32">
- </constant>
- <constant name="RESOLVER_STATUS_NONE" value="0">
- </constant>
- <constant name="RESOLVER_STATUS_ERROR" value="3">
- </constant>
- <constant name="RESOLVER_STATUS_WAITING" value="1">
- </constant>
- <constant name="RESOLVER_STATUS_DONE" value="2">
- </constant>
- </constants>
-</class>
-<class name="IP_Unix" inherits="IP" category="Networking">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- </methods>
- <constants>
- </constants>
-</class>
-<class name="InputMap" inherits="Object" category="Core">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- </methods>
- <constants>
- </constants>
-</class>
-<class name="Label" inherits="Range" category="Nodes/GUI Nodes">
- <brief_description>
- Control that displays formatted text.
- </brief_description>
- <description>
- 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.
- </description>
- <methods>
- <method name="set_align" >
- <argument index="0" name="align" type="int">
- </argument>
- <description>
- Set the alignmend mode to any of the ALIGN_* enumeration values.
- </description>
- </method>
- <method name="get_align" qualifiers="const" >
- <return type="int">
- </return>
- <description>
- Return the alignmend mode (any of the ALIGN_* enumeration values).
- </description>
- </method>
- <method name="set_text" >
- <argument index="0" name="text" type="String">
- </argument>
- <description>
- Set the label text. Text can contain newlines.
- </description>
- </method>
- <method name="get_text" qualifiers="const" >
- <return type="String">
- </return>
- <description>
- Return the label text. Text can contain newlines.
- </description>
- </method>
- <method name="set_autowrap" >
- <argument index="0" name="enable" type="bool">
- </argument>
- <description>
- 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.
- </description>
- </method>
- <method name="has_autowrap" qualifiers="const" >
- <return type="bool">
- </return>
- <description>
- Return the state of the [html i]autowrap[html /i] mode (see [method set_autowrap]).
- </description>
- </method>
- </methods>
- <constants>
- <constant name="ALIGN_CENTER" value="1">
- Align rows centered.
- </constant>
- <constant name="ALIGN_LEFT" value="0">
- Align rows to the left (default).
- </constant>
- <constant name="ALIGN_RIGHT" value="2">
- Align rows to the right (default).
- </constant>
- <constant name="ALIGN_FILL" value="3">
- Expand row whitespaces to fit the width.
- </constant>
- </constants>
-</class>
-<class name="Light" inherits="VisualInstance" category="Nodes/3D/3D Visual Nodes/3D Light Nodes">
- <brief_description>
- Provides a base class for different kinds of light nodes.
- </brief_description>
- <description>
- Light is the abstract base class for light nodes, so it shouldn&apos;t be used directly (It can&apos;t be instanced). Other types of light nodes inherit from it. Light contains the common variables and parameters used for lighting.
- </description>
- <methods>
- <method name="set_parameter" >
- <argument index="0" name="variable" type="int">
- </argument>
- <argument index="1" name="value" type="real">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_parameter" qualifiers="const" >
- <return type="real">
- </return>
- <argument index="0" name="arg0" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_color" >
- <argument index="0" name="color" type="int">
- </argument>
- <argument index="1" name="value" type="Color">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_color" qualifiers="const" >
- <return type="Color">
- </return>
- <argument index="0" name="arg0" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_project_shadows" >
- <argument index="0" name="enable" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="has_project_shadows" qualifiers="const" >
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="set_projector" >
- <argument index="0" name="projector" type="Object">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_projector" qualifiers="const" >
- <return type="Object">
- </return>
- <description>
- </description>
- </method>
- <method name="set_operator" >
- <argument index="0" name="operator" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_operator" qualifiers="const" >
- <return type="int">
- </return>
- <description>
- </description>
- </method>
- </methods>
- <constants>
- <constant name="COLOR_DIFFUSE" value="1">
- </constant>
- <constant name="PARAM_SPOT_ANGLE" value="1">
- </constant>
- <constant name="PARAM_ATTENUATION" value="4">
- </constant>
- <constant name="COLOR_SPECULAR" value="2">
- </constant>
- <constant name="COLOR_AMBIENT" value="0">
- </constant>
- <constant name="PARAM_SHADOW_DARKENING" value="5">
- </constant>
- <constant name="PARAM_RADIUS" value="2">
- </constant>
- <constant name="PARAM_SPOT_ATTENUATION" value="4">
- </constant>
- <constant name="PARAM_ENERGY" value="3">
- </constant>
- </constants>
-</class>
-<class name="LineEdit" inherits="Control" category="Nodes/GUI Nodes">
- <brief_description>
- Control that provides single line string editing.
- </brief_description>
- <description>
- LineEdit provides a single line string editor, used for text fields.
- </description>
- <methods>
- <method name="clear" >
- <description>
- Clear the [LineEdit] text.
- </description>
- </method>
- <method name="select_all" >
- <description>
- Select the whole string.
- </description>
- </method>
- <method name="set_text" >
- <argument index="0" name="text" type="String">
- </argument>
- <description>
- Set the text in the [LineEdit], clearing the existing one and the selection.
- </description>
- </method>
- <method name="get_text" qualifiers="const" >
- <return type="String">
- </return>
- <description>
- Return the text in the [LineEdit].
- </description>
- </method>
- <method name="set_cursor_pos" >
- <argument index="0" name="pos" type="int">
- </argument>
- <description>
- Set the cursor position inside the [LineEdit], causing it to scroll if needed.
- </description>
- </method>
- <method name="get_cursor_pos" qualifiers="const" >
- <return type="int">
- </return>
- <description>
- Return the cursor position inside the [LineEdit].
- </description>
- </method>
- <method name="set_max_length" >
- <argument index="0" name="chars" type="int">
- </argument>
- <description>
- 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.
- </description>
- </method>
- <method name="get_max_length" qualifiers="const" >
- <return type="int">
- </return>
- <description>
- Return the maximum amount of characters the [LineEdit] can edit. If 0 is returned, no limit exists.
- </description>
- </method>
- <method name="append_at_cursor" >
- <argument index="0" name="text" type="String">
- </argument>
- <description>
- Append text at cursor, scrolling the [LineEdit] when needed.
- </description>
- </method>
- <method name="set_editable" >
- <argument index="0" name="enabled" type="bool">
- </argument>
- <description>
- Set the [html i]editable[html /i] status of the [LineEdit]. When disabled, existing text can&apos;t be modified and new text can&apos;t be added.
- </description>
- </method>
- <method name="is_editable" qualifiers="const" >
- <return type="bool">
- </return>
- <description>
- Return the [html i]editable[html /i] status of the [LineEdit] (see [method set_editable]).
- </description>
- </method>
- <method name="set_secret" >
- <argument index="0" name="enabled" type="bool">
- </argument>
- <description>
- Set the [html i]secret[html /i] status of the [LineEdit]. When enabled, every character is displayed as &quot;*&quot;.
- </description>
- </method>
- <method name="is_secret" qualifiers="const" >
- <return type="bool">
- </return>
- <description>
- Return the [html i]secret[html /i] status of the [LineEdit] (see [method set_secret]).
- </description>
- </method>
- <method name="select" qualifiers="const" >
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- </methods>
- <signals>
- <signal name="text_entered">
- <argument index="0" name="text" type="String">
- </argument>
- <description>
- 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.
- </description>
- </signal>
- <signal name="text_changed">
- <argument index="0" name="text" type="String">
- </argument>
- <description>
- When the text changes, this signal is emitted.
- </description>
- </signal>
- </signals>
- <constants>
- </constants>
-</class>
-<class name="MainLoop" inherits="Object" category="Main Loop">
- <brief_description>
- Main loop is the abstract main loop base class.
- </brief_description>
- <description>
- 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].
- </description>
- <methods>
- </methods>
- <constants>
- <constant name="NOTIFICATION_WM_QUIT_REQUEST" value="7">
- </constant>
- <constant name="NOTIFICATION_WM_FOCUS_IN" value="5">
- </constant>
- <constant name="NOTIFICATION_WM_FOCUS_OUT" value="6">
- </constant>
- </constants>
-</class>
-<class name="Material" inherits="Resource" category="Resources">
- <brief_description>
- Abstract base [Resource] for coloring and shading geometry.
- </brief_description>
- <description>
- 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.
- </description>
- <methods>
- <method name="set_flag" >
- <argument index="0" name="flag" type="int">
- </argument>
- <argument index="1" name="enable" type="bool">
- </argument>
- <description>
- Set a [Material] flag, which toggles on or off a behavior when rendering. See enumeration FLAG_* for a list.
- </description>
- </method>
- <method name="get_flag" qualifiers="const" >
- <return type="bool">
- </return>
- <argument index="0" name="flag" type="int">
- </argument>
- <description>
- Return a [Material] flag, which toggles on or off a behavior when rendering. See enumeration FLAG_* for a list.
- </description>
- </method>
- <method name="set_hint" >
- <argument index="0" name="hint" type="int">
- </argument>
- <argument index="1" name="enable" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_hint" qualifiers="const" >
- <return type="bool">
- </return>
- <argument index="0" name="hint" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_blend_mode" >
- <argument index="0" name="mode" type="int">
- </argument>
- <description>
- 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.
- </description>
- </method>
- <method name="get_blend_mode" qualifiers="const" >
- <return type="int">
- </return>
- <description>
- 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.
- </description>
- </method>
- <method name="set_shade_model" >
- <argument index="0" name="model" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_shade_model" qualifiers="const" >
- <return type="int">
- </return>
- <description>
- </description>
- </method>
- <method name="set_line_width" >
- <argument index="0" name="width" type="real">
- </argument>
- <description>
- 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).
- </description>
- </method>
- <method name="get_line_width" qualifiers="const" >
- <return type="real">
- </return>
- <description>
- 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).
- </description>
- </method>
- <method name="set_shader_param" >
- <argument index="0" name="param" type="String">
- </argument>
- <argument index="1" name="arg1" type="var">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_shader_param" qualifiers="const" >
- <argument index="0" name="arg0" type="String">
- </argument>
- <description>
- </description>
- </method>
- </methods>
- <constants>
- <constant name="SHADE_MODEL_FRESNEL" value="2">
- </constant>
- <constant name="SHADE_MODEL_LAMBERT" value="0">
- </constant>
- <constant name="HINT_DECAL" value="0">
- </constant>
- <constant name="FLAG_WIREFRAME" value="5">
- Triangle geometry is drawn as lines if this flag is enabled.
- </constant>
- <constant name="SHADE_MODEL_TOON" value="3">
- </constant>
- <constant name="SHADE_MODEL_LAMBERT_WRAP" value="1">
- </constant>
- <constant name="HINT_NO_SHADOW" value="2">
- </constant>
- <constant name="FLAG_DOUBLE_SIDED" value="1">
- Both front facing and back facing triangles are rendered when this flag is enabled.
- </constant>
- <constant name="FLAG_BILLBOARD_TOGGLE" value="6">
- Geometry world transform is computed as billboard if this flag is enabled, often used for impostors.
- </constant>
- <constant name="FLAG_UNSHADED" value="3">
- Shading (lighting) is disabled when this flag is enabled.
- </constant>
- <constant name="BLEND_MODE_MIX" value="0">
- Use the regular alpha blending equation (source and dest colors are faded) (default).
- </constant>
- <constant name="SHADE_MODEL_CUSTOM_0" value="4">
- </constant>
- <constant name="SHADE_MODEL_CUSTOM_1" value="5">
- </constant>
- <constant name="FLAG_MAX" value="7">
- Maximum amount of flags
- </constant>
- <constant name="FLAG_VISIBLE" value="0">
- Geometry is visible when this flag is enabled (default).
- </constant>
- <constant name="SHADE_MODEL_CUSTOM_2" value="6">
- </constant>
- <constant name="HINT_MAX" value="4">
- </constant>
- <constant name="HINT_NO_DEPTH_DRAW" value="3">
- </constant>
- <constant name="BLEND_MODE_ADD" value="1">
- Use additive blending equation, often used for particle effects such as fire or light decals.
- </constant>
- <constant name="SHADE_MODEL_CUSTOM_3" value="7">
- </constant>
- <constant name="HINT_OPAQUE_PRE_PASS" value="1">
- </constant>
- <constant name="FLAG_ONTOP" value="4">
- </constant>
- <constant name="BLEND_MODE_SUB" value="2">
- Use substractive blending equation, often used for some smoke effects or types of glass.
- </constant>
- <constant name="FLAG_INVERT_FACES" value="2">
- Front facing and back facing order is swapped when this flag is enabled.
- </constant>
- </constants>
-</class>
-<class name="MenuButton" inherits="Button" category="Nodes/GUI Nodes">
- <brief_description>
- Special button that brings up a [PopupMenu] when clicked.
- </brief_description>
- <description>
- Special button that brings up a [PopupMenu] when clicked. That&apos;s pretty much all it does, as it&apos;s just a helper class when bulding GUIs.
- </description>
- <methods>
- <method name="get_popup" >
- <return type="Object">
- </return>
- <description>
- Return the [PopupMenu] contained in this button.
- </description>
- </method>
- </methods>
- <signals>
- <signal name="about_to_show">
- <description>
- </description>
- </signal>
- </signals>
- <constants>
- </constants>
-</class>
-<class name="Mesh" inherits="Resource" category="Resources">
- <brief_description>
- A [Resource] that contains vertex-array based geometry.
- </brief_description>
- <description>
- 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.
- </description>
- <methods>
- <method name="add_morph_target" >
- <argument index="0" name="name" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_morph_target_count" qualifiers="const" >
- <return type="int">
- </return>
- <description>
- </description>
- </method>
- <method name="get_morph_target" qualifiers="const" >
- <return type="String">
- </return>
- <argument index="0" name="index" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="clear_morph_targets" >
- <description>
- </description>
- </method>
- <method name="add_surface" >
- <argument index="0" name="primitive" type="int">
- </argument>
- <argument index="1" name="format" type="int">
- </argument>
- <argument index="2" name="array_len" type="int">
- </argument>
- <argument index="3" name="index_array_len" type="int">
- </argument>
- <description>
- Create a new surface ([method get_surface_count] will become surf_idx for this.[html br/]&#10;&#9;&#9;&#9;Surfaces are created to be rendered using a &quot;primitive&quot;, 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/]&#10;&#9;&#9;&#9;The format of a surface determines which arrays it will allocate and hold, so &quot;format&quot; is a combination of ARRAY_FORMAT_* mask constants ORed together. ARRAY_FORMAT_VERTEX must be always present. &quot;array_len&quot; 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 &quot;index_array_len&quot; must be passed.
- </description>
- </method>
- <method name="get_surface_count" qualifiers="const" >
- <return type="int">
- </return>
- <description>
- Return the amount of surfaces that the [Mesh] holds.
- </description>
- </method>
- <method name="surface_remove" >
- <argument index="0" name="surf_idx" type="int">
- </argument>
- <description>
- Remove a surface at position surf_idx, shifting greater surfaces one surf_idx slot down.
- </description>
- </method>
- <method name="surface_set_array" >
- <return type="int">
- </return>
- <argument index="0" name="surf_idx" type="int">
- </argument>
- <argument index="1" name="array" type="int">
- </argument>
- <argument index="2" name="data" type="var">
- </argument>
- <description>
- Set a surface array, array must be defined in the format (see [method add_surface]), and which array being set in &quot;data&quot; must be indicated passing a value from the ARRAY_* enum (NOT THE ARRAY_FORMAT_ enum!!). A Mesh can&apos;t be displayed (error will be reported) if an array that is present in the format was not set.
- </description>
- </method>
- <method name="surface_get_array" qualifiers="const" >
- <argument index="0" name="surf_idx" type="int">
- </argument>
- <argument index="1" name="array" type="int">
- </argument>
- <description>
- 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]).
- </description>
- </method>
- <method name="surface_get_array_len" qualifiers="const" >
- <return type="int">
- </return>
- <argument index="0" name="surf_idx" type="int">
- </argument>
- <description>
- Return the length in vertices of the vertex array in the requested surface (see [method add_surface]).
- </description>
- </method>
- <method name="surface_get_array_index_len" qualifiers="const" >
- <return type="int">
- </return>
- <argument index="0" name="surf_idx" type="int">
- </argument>
- <description>
- Return the length in indices of the index array in the requested surface (see [method add_surface]).
- </description>
- </method>
- <method name="surface_get_format" qualifiers="const" >
- <return type="int">
- </return>
- <argument index="0" name="surf_idx" type="int">
- </argument>
- <description>
- Return the format mask of the requested surface (see [method add_surface]).
- </description>
- </method>
- <method name="surface_get_primitive_type" qualifiers="const" >
- <return type="int">
- </return>
- <argument index="0" name="surf_idx" type="int">
- </argument>
- <description>
- Return the primitive type of the requested surface (see [method add_surface]).
- </description>
- </method>
- <method name="surface_set_material" >
- <argument index="0" name="surf_idx" type="int">
- </argument>
- <argument index="1" name="arg1" type="Object">
- </argument>
- <description>
- Set a [Material] for a given surface. Surface will be rendered using this material.
- </description>
- </method>
- <method name="surface_get_material" qualifiers="const" >
- <return type="Object">
- </return>
- <argument index="0" name="surf_idx" type="int">
- </argument>
- <description>
- Return a [Material] in a given surface. Surface is rendered using this material.
- </description>
- </method>
- </methods>
- <constants>
- <constant name="PRIMITIVE_LINES" value="1">
- Render array as lines (every two vertices a line is created).
- </constant>
- <constant name="ARRAY_FORMAT_TEX_UV2" value="32">
- </constant>
- <constant name="ARRAY_TEX_UV2" value="5">
- </constant>
- <constant name="ARRAY_WEIGHTS_SIZE" value="4">
- Amount of weights/bone indices per vertex (always 4).
- </constant>
- <constant name="ARRAY_FORMAT_VERTEX" value="1">
- Array format will include vertices (mandatory).
- </constant>
- <constant name="ARRAY_VERTEX" value="0">
- Vertex array (array of [Vector3]() vertices).
- </constant>
- <constant name="PRIMITIVE_POINTS" value="0">
- Render array as points (one vertex equals one point).
- </constant>
- <constant name="ARRAY_FORMAT_BONES" value="64">
- Array format will include bone indices.
- </constant>
- <constant name="ARRAY_FORMAT_COLOR" value="8">
- Array format will include a color array.
- </constant>
- <constant name="ARRAY_BONES" value="6">
- Array of bone indices, as a float array. Each element in groups of 4 floats.
- </constant>
- <constant name="ARRAY_COLOR" value="3">
- Vertex array (array of [Color]() colors).
- </constant>
- <constant name="ARRAY_FORMAT_INDEX" value="256">
- Index array will be used.
- </constant>
- <constant name="ARRAY_INDEX" value="8">
- Array of integers, used as indices referencing vertices. No index can be beyond the vertex array size.
- </constant>
- <constant name="PRIMITIVE_TRIANGLE_STRIP" value="5">
- Render array as triangle strips.
- </constant>
- <constant name="ARRAY_FORMAT_TANGENT" value="4">
- Array format will include tangents
- </constant>
- <constant name="ARRAY_FORMAT_NORMAL" value="2">
- Array format will include normals
- </constant>
- <constant name="ARRAY_TANGENT" value="2">
- Tangent array, array of groups of 4 floats. first 3 floats determine the tangent, and the last the binormal direction as -1 or 1.
- </constant>
- <constant name="ARRAY_NORMAL" value="1">
- Normal array (array of [Vector3]() normals).
- </constant>
- <constant name="PRIMITIVE_TRIANGLES" value="4">
- Render array as triangles (every three vertices a triangle is created).
- </constant>
- <constant name="PRIMITIVE_LINE_LOOP" value="3">
- Render array as line loop (like line strip, but closed).
- </constant>
- <constant name="PRIMITIVE_LINE_STRIP" value="2">
- Render array as line strip.
- </constant>
- <constant name="ARRAY_FORMAT_WEIGHTS" value="128">
- Array format will include bone weights.
- </constant>
- <constant name="ARRAY_FORMAT_TEX_UV" value="16">
- Array format will include UVs.
- </constant>
- <constant name="ARRAY_WEIGHTS" value="7">
- Array of bone weights, as a float array. Each element in groups of 4 floats.
- </constant>
- <constant name="ARRAY_TEX_UV" value="4">
- UV array (array of [Vector3]() UVs or float array of groups of 2 floats (u,v)).
- </constant>
- <constant name="PRIMITIVE_TRIANGLE_FAN" value="6">
- Render array as triangle fans.
- </constant>
- <constant name="NO_INDEX_ARRAY" value="-1">
- Default value used for index_array_len when no indices are present.
- </constant>
- </constants>
-</class>
-<class name="MeshInstance" inherits="VisualInstance" category="Nodes/3D/3D Visual Nodes">
- <brief_description>
- Node that instances meshes into a [Scenario].
- </brief_description>
- <description>
- 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.
- </description>
- <methods>
- <method name="set_mesh" >
- <argument index="0" name="mesh" type="Object">
- </argument>
- <description>
- Set the [Mesh] resource for the instance.
- </description>
- </method>
- <method name="get_mesh" qualifiers="const" >
- <return type="Object">
- </return>
- <description>
- Return the current [Mesh] resource for the instance.
- </description>
- </method>
- <method name="get_aabb" qualifiers="const" >
- <return type="AABB">
- </return>
- <description>
- Return the AABB of the mesh, in local coordinates.
- </description>
- </method>
- <method name="create_trimesh_collision" >
- <description>
- This helper creates a [StaticBody] child [Node] using the mesh geometry as collision. It&apos;s mainly used for testing.
- </description>
- </method>
- </methods>
- <constants>
- </constants>
-</class>
-<class name="Misc" inherits="Node" category="Core">
- <brief_description>
- Soon to be removed, bye bye.
- </brief_description>
- <description>
- </description>
- <methods>
- </methods>
- <constants>
- </constants>
-</class>
-<class name="MultiMesh" inherits="Resource" category="Resources">
- <brief_description>
- Provides high perfomance mesh instancing.
- </brief_description>
- <description>
- 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].
- </description>
- <methods>
- <method name="set_mesh" >
- <argument index="0" name="arg0" type="Object">
- </argument>
- <description>
- Set the [Mesh] resource to be drawn in multiple instances.
- </description>
- </method>
- <method name="get_mesh" qualifiers="const" >
- <return type="Object">
- </return>
- <description>
- Return the [Mesh] resource drawn as multiple instances.
- </description>
- </method>
- <method name="set_instance_count" >
- <argument index="0" name="arg0" type="int">
- </argument>
- <description>
- Set the amount of instnces that is going to be drawn. Changing this number will erase all the existing instance transform and color data.
- </description>
- </method>
- <method name="get_instance_count" qualifiers="const" >
- <return type="int">
- </return>
- <description>
- Return the amount of instnces that is going to be drawn.
- </description>
- </method>
- <method name="set_instance_transform" >
- <argument index="0" name="arg0" type="int">
- </argument>
- <argument index="1" name="arg1" type="Transform">
- </argument>
- <description>
- Set the transform for a specific instance.
- </description>
- </method>
- <method name="get_instance_transform" qualifiers="const" >
- <return type="Transform">
- </return>
- <argument index="0" name="arg0" type="int">
- </argument>
- <description>
- Return the transform of a specific instance.
- </description>
- </method>
- <method name="set_instance_color" >
- <argument index="0" name="arg0" type="int">
- </argument>
- <argument index="1" name="arg1" type="Color">
- </argument>
- <description>
- Set the color of a specific instance.
- </description>
- </method>
- <method name="get_instance_color" qualifiers="const" >
- <return type="Color">
- </return>
- <argument index="0" name="arg0" type="int">
- </argument>
- <description>
- Get the color of a specific instance.
- </description>
- </method>
- <method name="set_aabb" >
- <argument index="0" name="arg0" type="AABB">
- </argument>
- <description>
- Set the visibility AABB. If not provided, MultiMesh will not be visible.
- </description>
- </method>
- <method name="get_aabb" qualifiers="const" >
- <return type="AABB">
- </return>
- <description>
- Return the visibility AABB.
- </description>
- </method>
- <method name="generate_aabb" >
- <description>
- 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.
- </description>
- </method>
- </methods>
- <constants>
- </constants>
-</class>
-<class name="MultiMeshInstance" inherits="VisualInstance" category="Nodes/3D/3D Visual Nodes">
- <brief_description>
- Node that instances a [MultiMesh].
- </brief_description>
- <description>
- 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).
- </description>
- <methods>
- <method name="set_multimesh" >
- <argument index="0" name="multimesh" type="Object">
- </argument>
- <description>
- Set the [MultiMesh] to be instance.
- </description>
- </method>
- <method name="get_multimesh" qualifiers="const" >
- <return type="Object">
- </return>
- <description>
- Return the [MultiMesh] that is used for instancing.
- </description>
- </method>
- </methods>
- <constants>
- </constants>
-</class>
-<class name="Node" inherits="Object" category="Nodes">
- <brief_description>
- Base class for all the &quot;Scene&quot; elements.
- </brief_description>
- <description>
- Nodes can be set as children of other nodes, resulting in a tree arrangement. Any tree of nodes is called a &quot;Scene&quot;.[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 &quot;active&quot; and part of the &quot;Scene Tree&quot; once they are added as children of a [RootNode].[html br/][html br/]&#10;&#9;As an illustrative example, a Scene (tree of nodes):&#10;&#9;[html div align=&quot;center&quot;][html img src=&quot;images/scene.png&quot;/][html /div]&#10;&#9;This scene will was edited separatedly, then is added as part of a game (by instancing it), becoming part of a &quot;Scene Tree&quot;:&#10;&#9;[html div align=&quot;center&quot;][html img src=&quot;images/scene_tree.png&quot;/][html /div]&#10;&#9;In short, nodes are an effective all-in-one way to create and organize assets, gameplay and game data.&#10;&#9;When a Node is freed (deleted), it will delete all its children&#10;&#9;nodes.&#10;&#9;TODO: explain better process/signal/group call ordering
- </description>
- <methods>
- <method name="set_name" >
- <argument index="0" name="name" type="String">
- </argument>
- <description>
- 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.
- </description>
- </method>
- <method name="get_name" qualifiers="const" >
- <return type="String">
- </return>
- <description>
- Return the name of the [Node]. Name is be unique within parent.
- </description>
- </method>
- <method name="add_child" >
- <argument index="0" name="node" type="Node">
- </argument>
- <description>
- 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.
- </description>
- </method>
- <method name="remove_child" >
- <argument index="0" name="node" type="Node">
- </argument>
- <description>
- Remove a child [Node]. Node is NOT deleted and will have to be deleted manually.
- </description>
- </method>
- <method name="get_child_count" qualifiers="const" >
- <return type="int">
- </return>
- <description>
- Return the amount of children nodes.
- </description>
- </method>
- <method name="get_child" qualifiers="const" >
- <return type="Object">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <description>
- Return a children node by it&apos;s index (see [method get_child_count]). This method is often used for iterating all children of a node.
- </description>
- </method>
- <method name="has_node" qualifiers="const" >
- <return type="bool">
- </return>
- <argument index="0" name="path" type="NodePath">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_node" qualifiers="const" >
- <return type="Object">
- </return>
- <argument index="0" name="path" type="NodePath">
- </argument>
- <description>
- Fetch a node. &quot;path&quot; 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(&quot;Sword&quot;) , get_node(&quot;../Swamp/Alligator&quot;) , get_node(&quot;/MyGame&quot;). [html br/]Note: fetching absolute paths only works when the node is inside the scene tree (see [method is_inside_tree]).
- </description>
- </method>
- <method name="get_parent" qualifiers="const" >
- <return type="Object">
- </return>
- <description>
- Return the parent [Node] of the current [Node], or an empty Object if the node lacks a parent.
- </description>
- </method>
- <method name="is_inside_scene" qualifiers="const" >
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="is_a_parent_of" qualifiers="const" >
- <return type="bool">
- </return>
- <argument index="0" name="node" type="Node">
- </argument>
- <description>
- Return [html i]true[html /i] if the &quot;node&quot; argument is a direct or indirect child of the current node, otherwise return [html i]false[html /i].
- </description>
- </method>
- <method name="is_greater_than" qualifiers="const" >
- <return type="bool">
- </return>
- <argument index="0" name="node" type="Node">
- </argument>
- <description>
- Return [html i]true[html /i] if &quot;node&quot; occurs later in the scene hierarchy than the current node, otherwise return [html i]false[html /i].
- </description>
- </method>
- <method name="get_path" qualifiers="const" >
- <return type="NodePath">
- </return>
- <description>
- 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]).
- </description>
- </method>
- <method name="get_path_to" qualifiers="const" >
- <return type="NodePath">
- </return>
- <argument index="0" name="node" type="Node">
- </argument>
- <description>
- Return the relative path from the current node to the specified node in &quot;node&quot; argument. Both nodes must be in the same scene, or else the function will fail.
- </description>
- </method>
- <method name="add_to_group" >
- <argument index="0" name="group" type="String">
- </argument>
- <argument index="1" name="arg1" type="bool">
- </argument>
- <description>
- Add a node to a group. Groups are helpers to name and organize group of nodes, like for example: &quot;Enemies&quot; &quot;Collectables&quot;, 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]).
- </description>
- </method>
- <method name="remove_from_group" >
- <argument index="0" name="group" type="String">
- </argument>
- <description>
- Remove a node from a group.
- </description>
- </method>
- <method name="move_child" >
- <argument index="0" name="child_node" type="Node">
- </argument>
- <argument index="1" name="to_pos" type="int">
- </argument>
- <description>
- 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.
- </description>
- </method>
- <method name="raise" >
- <description>
- 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.
- </description>
- </method>
- <method name="set_owner" >
- <argument index="0" name="arg0" type="Object">
- </argument>
- <description>
- 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.
- </description>
- </method>
- <method name="get_owner" qualifiers="const" >
- <return type="Object">
- </return>
- <description>
- Get the node owner (see [method set_node_owner]).
- </description>
- </method>
- <method name="remove_and_skip" >
- <description>
- 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.
- </description>
- </method>
- <method name="get_index" qualifiers="const" >
- <return type="int">
- </return>
- <description>
- Get the node index in the parent (assuming it has a parent).
- </description>
- </method>
- <method name="print_tree" >
- <description>
- Print the screne to stdout. Used mainly for debugging purposes.
- </description>
- </method>
- <method name="set_filename" >
- <argument index="0" name="filename" type="String">
- </argument>
- <description>
- 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.
- </description>
- </method>
- <method name="get_filename" qualifiers="const" >
- <return type="String">
- </return>
- <description>
- 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]).
- </description>
- </method>
- <method name="propagate_notification" >
- <argument index="0" name="what" type="int">
- </argument>
- <description>
- Notify the current node and all its chldren recursively by calling notification() in all of them.
- </description>
- </method>
- <method name="set_process" >
- <argument index="0" name="enable" type="bool">
- </argument>
- <description>
- 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).
- </description>
- </method>
- <method name="get_process_time" qualifiers="const" >
- <return type="real">
- </return>
- <description>
- Return the amount of time elapsed (in seconds) between two succesive NOTIFICATION_PROCESS notifications.
- </description>
- </method>
- <method name="is_processing" qualifiers="const" >
- <return type="bool">
- </return>
- <description>
- Return wether processing is enabled in the current node.
- </description>
- </method>
- <method name="set_idle_process" >
- <argument index="0" name="enable" type="bool">
- </argument>
- <description>
- 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.
- </description>
- </method>
- <method name="get_idle_process_time" qualifiers="const" >
- <return type="real">
- </return>
- <description>
- Return the amount of time elapsed (in seconds) between two succesive NOTIFICATION_IDLE_PROCESS notifications.
- </description>
- </method>
- <method name="is_idle_processing" qualifiers="const" >
- <return type="bool">
- </return>
- <description>
- Return wether idle processing is enabled in the current node.
- </description>
- </method>
- <method name="set_process_input" >
- <argument index="0" name="enable" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="is_processing_input" qualifiers="const" >
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="set_process_unhandled_input" >
- <argument index="0" name="enable" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="is_processing_unhandled_input" qualifiers="const" >
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="set_process_mode" >
- <argument index="0" name="mode" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_process_mode" qualifiers="const" >
- <return type="int">
- </return>
- <description>
- </description>
- </method>
- <method name="set_world" >
- <argument index="0" name="world" type="Object">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_world" qualifiers="const" >
- <return type="Object">
- </return>
- <description>
- </description>
- </method>
- <method name="get_current_world" qualifiers="const" >
- <return type="Object">
- </return>
- <description>
- </description>
- </method>
- <method name="get_scene" qualifiers="const" >
- <return type="Object">
- </return>
- <description>
- </description>
- </method>
- <method name="duplicate" qualifiers="const" >
- <return type="Object">
- </return>
- <argument index="0" name="arg0" type="Object">
- </argument>
- <argument index="1" name="arg1" type="bool" default="NULL">
- </argument>
- <description>
- Return a duplicate of the scene, with all nodes and parameters copied. Subscriptions will not be duplicated.
- </description>
- </method>
- <method name="replace_by" >
- <argument index="0" name="node" type="Node">
- </argument>
- <argument index="1" name="keep_data" type="bool" default="false">
- </argument>
- <description>
- Replace a node in a scene by a given one. Subscriptions that pass through this node will be lost.
- </description>
- </method>
- </methods>
- <signals>
- <signal name="enter_scene">
- <description>
- </description>
- </signal>
- <signal name="renamed">
- <description>
- </description>
- </signal>
- <signal name="exit_scene">
- <description>
- </description>
- </signal>
- </signals>
- <constants>
- <constant name="NOTIFICATION_ENTER_WORLD" value="20">
- </constant>
- <constant name="PROCESS_PAUSE" value="1">
- </constant>
- <constant name="NOTIFICATION_UNPARENTED" value="19">
- Notification received when a node is unparented (parent removed it from the list of children).
- </constant>
- <constant name="NOTIFICATION_CHILDREN_CONFIGURED" value="14">
- </constant>
- <constant name="NOTIFICATION_PROCESS" value="16">
- Notification received every frame when the process flag is set (see [method set_process]).
- </constant>
- <constant name="NOTIFICATION_EXIT_SCENE" value="11">
- </constant>
- <constant name="PROCESS_ALWAYS" value="2">
- </constant>
- <constant name="PROCESS_NORMAL" value="0">
- </constant>
- <constant name="NOTIFICATION_EXIT_WORLD" value="21">
- </constant>
- <constant name="NOTIFICATION_MOVED_IN_PARENT" value="12">
- </constant>
- <constant name="NOTIFICATION_PARENTED" value="18">
- Notification received when a node is set as a child of another node. Note that this doesn&apos;t mean that a node entered the Scene Tree.
- </constant>
- <constant name="NOTIFICATION_ENTER_SCENE" value="10">
- </constant>
- <constant name="NOTIFICATION_IDLE_PROCESS" value="17">
- Notification received every time the application enters idle when the idle process flag is set (see [method set_process]).
- </constant>
- </constants>
-</class>
-<class name="Node2D" inherits="CanvasItem" category="Nodes">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- <method name="set_pos" >
- <argument index="0" name="pos" type="Vector2">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_rot" >
- <argument index="0" name="rot" type="real">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_scale" >
- <argument index="0" name="scale" type="Vector2">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_pos" qualifiers="const" >
- <return type="Vector2">
- </return>
- <description>
- </description>
- </method>
- <method name="get_rot" qualifiers="const" >
- <return type="real">
- </return>
- <description>
- </description>
- </method>
- <method name="get_scale" qualifiers="const" >
- <return type="Vector2">
- </return>
- <description>
- </description>
- </method>
- </methods>
- <constants>
- <constant name="NOTIFICATION_DRAW" value="30">
- </constant>
- </constants>
-</class>
-<class name="_OS" inherits="Object" category="Core">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- <method name="set_mouse_show" >
- <argument index="0" name="show" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_mouse_grab" >
- <argument index="0" name="grab" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="is_mouse_grab_enabled" qualifiers="const" >
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="get_mouse_pos" qualifiers="const" >
- <return type="Vector2">
- </return>
- <description>
- </description>
- </method>
- <method name="set_clipboard" >
- <argument index="0" name="clipboard" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_clipboard" qualifiers="const" >
- <return type="String">
- </return>
- <description>
- </description>
- </method>
- <method name="set_video_mode" >
- <argument index="0" name="size" type="Vector2">
- </argument>
- <argument index="1" name="fullscreen" type="bool">
- </argument>
- <argument index="2" name="resizable" type="bool">
- </argument>
- <argument index="3" name="screen" type="int" default="0">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_video_mode_size" qualifiers="const" >
- <return type="Vector2">
- </return>
- <argument index="0" name="screen" type="int" default="0">
- </argument>
- <description>
- </description>
- </method>
- <method name="is_video_mode_fullscreen" qualifiers="const" >
- <return type="bool">
- </return>
- <argument index="0" name="screen" type="int" default="0">
- </argument>
- <description>
- </description>
- </method>
- <method name="is_video_mode_resizable" qualifiers="const" >
- <return type="bool">
- </return>
- <argument index="0" name="screen" type="int" default="0">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_fullscreen_mode_list" qualifiers="const" >
- <return type="Array">
- </return>
- <argument index="0" name="screen" type="int" default="0">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_iterations_per_second" >
- <argument index="0" name="iterations_per_second" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_iterations_per_second" qualifiers="const" >
- <return type="int">
- </return>
- <description>
- </description>
- </method>
- <method name="set_low_processor_usage_mode" >
- <argument index="0" name="enable" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="is_in_low_processor_usage_mode" qualifiers="const" >
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="get_executable_path" qualifiers="const" >
- <return type="String">
- </return>
- <description>
- </description>
- </method>
- <method name="execute" >
- <return type="int">
- </return>
- <argument index="0" name="path" type="String">
- </argument>
- <argument index="1" name="arguments" type="StringArray">
- </argument>
- <argument index="2" name="blocking" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="kill" >
- <return type="int">
- </return>
- <argument index="0" name="pid" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_environment" qualifiers="const" >
- <return type="String">
- </return>
- <argument index="0" name="environment" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="has_environment" qualifiers="const" >
- <return type="bool">
- </return>
- <argument index="0" name="environment" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_name" qualifiers="const" >
- <return type="String">
- </return>
- <description>
- </description>
- </method>
- <method name="get_cmdline_args" >
- <return type="StringArray">
- </return>
- <description>
- </description>
- </method>
- <method name="get_main_loop" qualifiers="const" >
- <return type="Object">
- </return>
- <description>
- </description>
- </method>
- <method name="get_date" qualifiers="const" >
- <return type="Dictionary">
- </return>
- <description>
- </description>
- </method>
- <method name="get_time" qualifiers="const" >
- <return type="Dictionary">
- </return>
- <description>
- </description>
- </method>
- <method name="delay_usec" qualifiers="const" >
- <argument index="0" name="usec" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_ticks_msec" qualifiers="const" >
- <return type="int">
- </return>
- <description>
- </description>
- </method>
- <method name="can_draw" qualifiers="const" >
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="get_frames_drawn" >
- <return type="int">
- </return>
- <description>
- </description>
- </method>
- <method name="is_stdout_verbose" qualifiers="const" >
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- </methods>
- <constants>
- <constant name="MONTH_NOVEMBER" value="10">
- </constant>
- <constant name="MONTH_OCTOBER" value="9">
- </constant>
- <constant name="MONTH_DECEMBER" value="11">
- </constant>
- <constant name="MONTH_SEPTEMBER" value="8">
- </constant>
- <constant name="MONTH_MAY" value="4">
- </constant>
- <constant name="DAY_FRIDAY" value="5">
- </constant>
- <constant name="DAY_TUESDAY" value="2">
- </constant>
- <constant name="MONTH_APRIL" value="3">
- </constant>
- <constant name="MONTH_FEBRUARY" value="1">
- </constant>
- <constant name="DAY_MONDAY" value="1">
- </constant>
- <constant name="MONTH_AUGUST" value="7">
- </constant>
- <constant name="MONTH_JUNE" value="5">
- </constant>
- <constant name="MONTH_JANUARY" value="0">
- </constant>
- <constant name="MONTH_MARCH" value="2">
- </constant>
- <constant name="MONTH_JULY" value="6">
- </constant>
- <constant name="DAY_THURSDAY" value="4">
- </constant>
- <constant name="DAY_WEDNESDAY" value="3">
- </constant>
- <constant name="DAY_SUNDAY" value="0">
- </constant>
- <constant name="DAY_SATURDAY" value="6">
- </constant>
- </constants>
-</class>
-<class name="Object" category="Core">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- <method name="get_type" qualifiers="const" >
- <return type="String">
- </return>
- <description>
- </description>
- </method>
- <method name="is_type" qualifiers="const" >
- <return type="bool">
- </return>
- <argument index="0" name="type" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="set" >
- <argument index="0" name="property" type="String">
- </argument>
- <argument index="1" name="value" type="var">
- </argument>
- <description>
- </description>
- </method>
- <method name="get" qualifiers="const" >
- <argument index="0" name="property" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_property_list" qualifiers="const" >
- <return type="Array">
- </return>
- <description>
- </description>
- </method>
- <method name="notification" >
- <argument index="0" name="what" type="int">
- </argument>
- <argument index="1" name="arg1" type="bool" default="false">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_instance_ID" qualifiers="const" >
- <return type="int">
- </return>
- <description>
- </description>
- </method>
- <method name="set_script" >
- <argument index="0" name="script" type="Object">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_script" qualifiers="const" >
- <return type="Object">
- </return>
- <description>
- </description>
- </method>
- <method name="set_meta" >
- <argument index="0" name="name" type="String">
- </argument>
- <argument index="1" name="value" type="var">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_meta" qualifiers="const" >
- <argument index="0" name="name" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="has_meta" qualifiers="const" >
- <return type="bool">
- </return>
- <argument index="0" name="name" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_meta_list" qualifiers="const" >
- <return type="StringArray">
- </return>
- <description>
- </description>
- </method>
- <method name="call" >
- <argument index="0" name="method" type="String">
- </argument>
- <argument index="1" name="arg1" type="var" default="NULL">
- </argument>
- <argument index="2" name="arg2" type="var" default="NULL">
- </argument>
- <argument index="3" name="arg3" type="var" default="NULL">
- </argument>
- <argument index="4" name="arg4" type="var" default="NULL">
- </argument>
- <description>
- </description>
- </method>
- <method name="call_deferred" >
- <argument index="0" name="method" type="String">
- </argument>
- <argument index="1" name="arg1" type="var" default="NULL">
- </argument>
- <argument index="2" name="arg2" type="var" default="NULL">
- </argument>
- <argument index="3" name="arg3" type="var" default="NULL">
- </argument>
- <argument index="4" name="arg4" type="var" default="NULL">
- </argument>
- <description>
- </description>
- </method>
- <method name="add_user_signal" >
- <argument index="0" name="signal" type="String">
- </argument>
- <argument index="1" name="arguments" type="Array" default="Array()">
- </argument>
- <description>
- </description>
- </method>
- <method name="emit_signal" >
- <argument index="0" name="signal" type="String">
- </argument>
- <argument index="1" name="arguments" type="Array" default="Array()">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_signal_list" qualifiers="const" >
- <return type="Array">
- </return>
- <description>
- </description>
- </method>
- <method name="connect" >
- <argument index="0" name="signal" type="String">
- </argument>
- <argument index="1" name="target" type="Object">
- </argument>
- <argument index="2" name="method" type="String">
- </argument>
- <argument index="3" name="binds" type="Array" default="Array()">
- </argument>
- <argument index="4" name="flags" type="int" default="0">
- </argument>
- <description>
- </description>
- </method>
- <method name="disconnect" >
- <argument index="0" name="signal" type="String">
- </argument>
- <argument index="1" name="target" type="Object">
- </argument>
- <argument index="2" name="method" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_block_signals" >
- <argument index="0" name="enable" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="is_blocking_signals" qualifiers="const" >
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- </methods>
- <constants>
- <constant name="NOTIFICATION_POSTINITIALIZE" value="0">
- </constant>
- <constant name="NOTIFICATION_PREDELETE" value="1">
- </constant>
- </constants>
-</class>
-<class name="OmniLight" inherits="Light" category="Nodes/3D/3D Visual Nodes/3D Light Nodes">
- <brief_description>
- OmniDirectional Light, such as a lightbulb or a candle.
- </brief_description>
- <description>
- 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.
- </description>
- <methods>
- </methods>
- <constants>
- </constants>
-</class>
-<class name="OptionButton" inherits="Button" category="Nodes/GUI Nodes">
- <brief_description>
- Button control that provides selectable options when pressed.
- </brief_description>
- <description>
- OptionButton is a type button that provides a selectable list of items when pressed. The item selected becomes the &quot;current&quot; item and is displayed as the button text.
- </description>
- <methods>
- <method name="add_item" >
- <argument index="0" name="label" type="String">
- </argument>
- <argument index="1" name="id" type="int" default="-1">
- </argument>
- <description>
- Add an item, with text &quot;label&quot; and (optionally) id. If no &quot;id&quot; is passed, &quot;id&quot; becomes the item index. New items are appended at the end.
- </description>
- </method>
- <method name="add_icon_item" >
- <argument index="0" name="texture" type="Object">
- </argument>
- <argument index="1" name="label" type="String">
- </argument>
- <argument index="2" name="id" type="int">
- </argument>
- <description>
- Add an item, with a &quot;texture&quot; icon, text &quot;label&quot; and (optionally) id. If no &quot;id&quot; is passed, &quot;id&quot; becomes the item index. New items are appended at the end.
- </description>
- </method>
- <method name="set_item_text" >
- <argument index="0" name="idx" type="int">
- </argument>
- <argument index="1" name="text" type="String">
- </argument>
- <description>
- Set the text of an item at index &quot;idx&quot;.
- </description>
- </method>
- <method name="set_item_icon" >
- <argument index="0" name="idx" type="int">
- </argument>
- <argument index="1" name="texture" type="Object">
- </argument>
- <description>
- Set the icon of an item at index &quot;idx&quot;.
- </description>
- </method>
- <method name="set_item_disabled" >
- <argument index="0" name="idx" type="int">
- </argument>
- <argument index="1" name="disabled" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_item_ID" >
- <argument index="0" name="idx" type="int">
- </argument>
- <argument index="1" name="id" type="int">
- </argument>
- <description>
- Set the ID of an item at index &quot;idx&quot;.
- </description>
- </method>
- <method name="set_item_metadata" >
- <argument index="0" name="idx" type="int">
- </argument>
- <argument index="1" name="metadata" type="var">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_item_text" qualifiers="const" >
- <return type="String">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <description>
- Return the text of the item at index &quot;idx&quot;.
- </description>
- </method>
- <method name="get_item_icon" qualifiers="const" >
- <return type="Object">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <description>
- Return the icon of the item at index &quot;idx&quot;.
- </description>
- </method>
- <method name="get_item_ID" qualifiers="const" >
- <return type="int">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <description>
- Return the ID of the item at index &quot;idx&quot;.
- </description>
- </method>
- <method name="get_item_metadata" qualifiers="const" >
- <argument index="0" name="idx" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="is_item_disabled" qualifiers="const" >
- <return type="bool">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_item_count" qualifiers="const" >
- <return type="int">
- </return>
- <description>
- Return the amount of items in the OptionButton.
- </description>
- </method>
- <method name="add_separator" >
- <description>
- 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.
- </description>
- </method>
- <method name="clear" >
- <description>
- Clear all the items in the [OptionButton].
- </description>
- </method>
- <method name="select" >
- <argument index="0" name="arg0" type="int">
- </argument>
- <description>
- Select an item by index and make it the current item.
- </description>
- </method>
- <method name="get_selected" qualifiers="const" >
- <return type="int">
- </return>
- <description>
- Return the current item index
- </description>
- </method>
- <method name="get_selected_ID" qualifiers="const" >
- <return type="int">
- </return>
- <description>
- </description>
- </method>
- <method name="get_selected_metadata" qualifiers="const" >
- <description>
- </description>
- </method>
- </methods>
- <signals>
- <signal name="item_selected">
- <argument index="0" name="ID" type="int">
- </argument>
- <description>
- 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).
- </description>
- </signal>
- </signals>
- <constants>
- </constants>
-</class>
-<class name="PacketPeer" inherits="Object" category="Core">
- <brief_description>
- Abstraction and base class for packet-based protocols.
- </brief_description>
- <description>
- 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.
- </description>
- <methods>
- </methods>
- <constants>
- </constants>
-</class>
-<class name="PacketPeerStream" inherits="PacketPeer" category="Core">
- <brief_description>
- Wrapper to use a PacketPeer over a StreamPeer.
- </brief_description>
- <description>
- 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.
- </description>
- <methods>
- <method name="set_stream_peer" >
- <argument index="0" name="peer" type="Object">
- </argument>
- <description>
- Set the StreamPeer object to be wrapped
- </description>
- </method>
- </methods>
- <constants>
- </constants>
-</class>
-<class name="Panel" inherits="Control" category="Nodes/GUI Nodes">
- <brief_description>
- Provides an opaque background for [Control] children.
- </brief_description>
- <description>
- Panel is a [Control] that displays an opaque background. It&apos;s commoly used as a parent and container for other types of [Control] nodes.&#10;&#9;[html div align=&quot;center&quot;][html img src=&quot;images/panel_example.png&quot;/][html /div]
- </description>
- <methods>
- </methods>
- <constants>
- </constants>
-</class>
-<class name="Particles" inherits="VisualInstance" category="Nodes/3D/3D Visual Nodes">
- <brief_description>
- Particle system 3D Node
- </brief_description>
- <description>
- 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).
- </description>
- <methods>
- <method name="set_amount" >
- <argument index="0" name="amount" type="int">
- </argument>
- <description>
- Set total amount of particles in the system.
- </description>
- </method>
- <method name="get_amount" qualifiers="const" >
- <return type="int">
- </return>
- <description>
- Return the total amount of particles in the system.
- </description>
- </method>
- <method name="set_emitting" >
- <argument index="0" name="enabled" type="bool">
- </argument>
- <description>
- Set the &quot;emitting&quot; property state. When emitting, the particle system generates new particles at constant rate.
- </description>
- </method>
- <method name="is_emitting" qualifiers="const" >
- <return type="bool">
- </return>
- <description>
- Return the &quot;emitting&quot; property state (see [method set_emitting]).
- </description>
- </method>
- <method name="set_visibility_aabb" >
- <argument index="0" name="aabb" type="AABB">
- </argument>
- <description>
- Set the visibility AABB for the particle system, since the default one will not work properly most of the time.
- </description>
- </method>
- <method name="get_visibility_aabb" qualifiers="const" >
- <return type="AABB">
- </return>
- <description>
- Return the current visibility AABB.
- </description>
- </method>
- <method name="set_emission_half_extents" >
- <argument index="0" name="half_extents" type="Vector3">
- </argument>
- <description>
- Set the half extents for the emission box.
- </description>
- </method>
- <method name="get_emission_half_extents" qualifiers="const" >
- <return type="Vector3">
- </return>
- <description>
- Return the half extents for the emission box.
- </description>
- </method>
- <method name="set_emission_points" >
- <argument index="0" name="points" type="Vector3Array">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_emission_points" qualifiers="const" >
- <return type="Vector3Array">
- </return>
- <description>
- </description>
- </method>
- <method name="set_gravity_normal" >
- <argument index="0" name="normal" type="Vector3">
- </argument>
- <description>
- Set the normal vector towards where gravity is pulling (by default, negative Y).
- </description>
- </method>
- <method name="get_gravity_normal" qualifiers="const" >
- <return type="Vector3">
- </return>
- <description>
- Return the normal vector towards where gravity is pulling (by default, negative Y).
- </description>
- </method>
- <method name="set_variable" >
- <argument index="0" name="variable" type="int">
- </argument>
- <argument index="1" name="value" type="real">
- </argument>
- <description>
- Set a specific variable for the particle system (see VAR_* enum).
- </description>
- </method>
- <method name="get_variable" qualifiers="const" >
- <return type="real">
- </return>
- <argument index="0" name="variable" type="int">
- </argument>
- <description>
- Return a specific variable for the particle system (see VAR_* enum).
- </description>
- </method>
- <method name="set_randomness" >
- <argument index="0" name="variable" type="int">
- </argument>
- <argument index="1" name="randomness" type="real">
- </argument>
- <description>
- Set the randomness for a specific variable of the particle system. Randomness produces small changes from the default each time a particle is emitted.
- </description>
- </method>
- <method name="get_randomness" qualifiers="const" >
- <return type="real">
- </return>
- <argument index="0" name="arg0" type="int">
- </argument>
- <description>
- Return the randomness for a specific variable of the particle system. Randomness produces small changes from the default each time a particle is emitted.
- </description>
- </method>
- <method name="set_color_phase_pos" >
- <argument index="0" name="phase" type="int">
- </argument>
- <argument index="1" name="pos" type="real">
- </argument>
- <description>
- Set the position of a color phase (0 to 1)
- </description>
- </method>
- <method name="get_color_phase_pos" qualifiers="const" >
- <return type="real">
- </return>
- <argument index="0" name="phase" type="int">
- </argument>
- <description>
- Return the position of a color phase (0 to 1)
- </description>
- </method>
- <method name="set_color_phase_color" >
- <argument index="0" name="phase" type="int">
- </argument>
- <argument index="1" name="color" type="Color">
- </argument>
- <description>
- Set the color of a color phase.
- </description>
- </method>
- <method name="get_color_phase_color" qualifiers="const" >
- <return type="Color">
- </return>
- <argument index="0" name="phase" type="int">
- </argument>
- <description>
- Return the color of a color phase.
- </description>
- </method>
- <method name="set_material" >
- <argument index="0" name="material" type="Object">
- </argument>
- <description>
- Set the material used to draw particles
- </description>
- </method>
- <method name="get_material" qualifiers="const" >
- <return type="Object">
- </return>
- <description>
- Return the material used to draw particles
- </description>
- </method>
- <method name="set_emit_timeout" >
- <argument index="0" name="arg0" type="real">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_emit_timeout" qualifiers="const" >
- <return type="real">
- </return>
- <description>
- </description>
- </method>
- <method name="set_height_from_velocity" >
- <argument index="0" name="enable" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="has_height_from_velocity" qualifiers="const" >
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="set_color_phases" >
- <argument index="0" name="count" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_color_phases" qualifiers="const" >
- <return type="int">
- </return>
- <description>
- </description>
- </method>
- </methods>
- <constants>
- <constant name="VAR_FINAL_SIZE" value="9">
- </constant>
- <constant name="VAR_INITIAL_SIZE" value="8">
- </constant>
- <constant name="VAR_LINEAR_ACCELERATION" value="5">
- </constant>
- <constant name="VAR_MAX" value="13">
- </constant>
- <constant name="VAR_DRAG" value="6">
- </constant>
- <constant name="VAR_GRAVITY" value="2">
- </constant>
- <constant name="VAR_SPREAD" value="1">
- </constant>
- <constant name="VAR_LIFETIME" value="0">
- </constant>
- <constant name="VAR_HEIGHT_SPEED_SCALE" value="12">
- </constant>
- <constant name="VAR_INITIAL_ANGLE" value="10">
- </constant>
- <constant name="VAR_TANGENTIAL_ACCELERATION" value="7">
- </constant>
- <constant name="VAR_ANGULAR_VELOCITY" value="4">
- </constant>
- <constant name="VAR_HEIGHT" value="11">
- </constant>
- <constant name="VAR_LINEAR_VELOCITY" value="3">
- </constant>
- </constants>
-</class>
-<class name="Particles2D" inherits="Node2D" category="Nodes">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- <method name="set_emitting" >
- <argument index="0" name="active" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="is_emitting" qualifiers="const" >
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="set_amount" >
- <argument index="0" name="amount" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_amount" qualifiers="const" >
- <return type="int">
- </return>
- <description>
- </description>
- </method>
- <method name="set_lifetime" >
- <argument index="0" name="lifetime" type="real">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_lifetime" qualifiers="const" >
- <return type="real">
- </return>
- <description>
- </description>
- </method>
- <method name="set_param" >
- <argument index="0" name="param" type="int">
- </argument>
- <argument index="1" name="value" type="real">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_param" qualifiers="const" >
- <return type="real">
- </return>
- <argument index="0" name="param" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_randomness" >
- <argument index="0" name="param" type="int">
- </argument>
- <argument index="1" name="value" type="real">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_randomness" qualifiers="const" >
- <return type="real">
- </return>
- <argument index="0" name="param" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_texture" >
- <argument index="0" name="texture" type="Object">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_texture" qualifiers="const" >
- <return type="Object">
- </return>
- <description>
- </description>
- </method>
- <method name="set_emissor_offset" >
- <argument index="0" name="offset" type="Vector2">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_emissor_offset" qualifiers="const" >
- <return type="Vector2">
- </return>
- <description>
- </description>
- </method>
- <method name="set_initial_color" >
- <argument index="0" name="initial_color" type="Color">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_initial_color" qualifiers="const" >
- <return type="Color">
- </return>
- <description>
- </description>
- </method>
- <method name="set_final_color" >
- <argument index="0" name="final_color" type="Color">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_final_color" qualifiers="const" >
- <return type="Color">
- </return>
- <description>
- </description>
- </method>
- <method name="set_use_parent_space" >
- <argument index="0" name="enable" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="is_using_parent_space" qualifiers="const" >
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- </methods>
- <constants>
- <constant name="PARAM_FINAL_SIZE" value="9">
- </constant>
- <constant name="PARAM_INITIAL_SIZE" value="8">
- </constant>
- <constant name="PARAM_RADIAL_ACCEL" value="6">
- </constant>
- <constant name="PARAM_GRAVITY_STRENGTH" value="5">
- </constant>
- <constant name="PARAM_MAX" value="11">
- </constant>
- <constant name="PARAM_HUE_VARIATION" value="10">
- </constant>
- <constant name="PARAM_TANGENTIAL_ACCEL" value="7">
- </constant>
- <constant name="PARAM_GRAVITY_DIRECTION" value="4">
- </constant>
- <constant name="PARAM_SPREAD" value="1">
- </constant>
- <constant name="PARAM_SPIN_VELOCITY" value="3">
- </constant>
- <constant name="PARAM_LINEAR_VELOCITY" value="2">
- </constant>
- <constant name="PARAM_DIRECTION" value="0">
- </constant>
- </constants>
-</class>
-<class name="PhysicsBody" inherits="Spatial" category="Nodes/3D">
- <brief_description>
- Base class for differnt types of Physics bodies.
- </brief_description>
- <description>
- PhysicsBody is an abstract base class for implementing a physics body. All PhysicsBody types inherit from it.
- </description>
- <methods>
- <method name="add_shape" >
- <argument index="0" name="shape" type="Object">
- </argument>
- <argument index="1" name="transform" type="Transform" default="Transform()">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_shape_count" qualifiers="const" >
- <return type="int">
- </return>
- <description>
- </description>
- </method>
- <method name="set_shape" >
- <argument index="0" name="shape_idx" type="int">
- </argument>
- <argument index="1" name="shape" type="Object">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_shape_transform" >
- <argument index="0" name="shape_idx" type="int">
- </argument>
- <argument index="1" name="transform" type="Transform">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_shape" qualifiers="const" >
- <return type="Object">
- </return>
- <argument index="0" name="shape_idx" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_shape_transform" qualifiers="const" >
- <return type="Transform">
- </return>
- <argument index="0" name="shape_idx" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="remove_shape" >
- <argument index="0" name="shape_idx" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="clear_shapes" >
- <description>
- </description>
- </method>
- <method name="get_body" qualifiers="const" >
- <return type="RID">
- </return>
- <description>
- </description>
- </method>
- <method name="set_max_contacts_reported" >
- <argument index="0" name="contacts" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_max_contacts_reported" qualifiers="const" >
- <return type="int">
- </return>
- <description>
- </description>
- </method>
- <method name="set_contacts_reported_depth_treshold" >
- <argument index="0" name="depth" type="real">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_contacts_reported_depth_treshold" qualifiers="const" >
- <return type="real">
- </return>
- <description>
- </description>
- </method>
- </methods>
- <constants>
- </constants>
-</class>
-<class name="PhysicsDirectBodyState" inherits="Object" category="Core">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- <method name="get_total_gravity" qualifiers="const" >
- <return type="Vector3">
- </return>
- <description>
- </description>
- </method>
- <method name="get_total_density" qualifiers="const" >
- <return type="real">
- </return>
- <description>
- </description>
- </method>
- <method name="get_inverse_mass" qualifiers="const" >
- <return type="real">
- </return>
- <description>
- </description>
- </method>
- <method name="get_inverse_inertia_tensor" qualifiers="const" >
- <return type="Matrix3">
- </return>
- <description>
- </description>
- </method>
- <method name="set_linear_velocity" >
- <argument index="0" name="velocity" type="Vector3">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_linear_velocity" qualifiers="const" >
- <return type="Vector3">
- </return>
- <description>
- </description>
- </method>
- <method name="set_angular_velocity" >
- <argument index="0" name="velocity" type="Vector3">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_angular_velocity" qualifiers="const" >
- <return type="Vector3">
- </return>
- <description>
- </description>
- </method>
- <method name="set_transform" >
- <argument index="0" name="transform" type="Transform">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_transform" qualifiers="const" >
- <return type="Transform">
- </return>
- <description>
- </description>
- </method>
- <method name="set_sleep_state" >
- <argument index="0" name="enabled" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="is_sleeping" qualifiers="const" >
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="get_contact_count" qualifiers="const" >
- <return type="int">
- </return>
- <description>
- </description>
- </method>
- <method name="get_contact_local_pos" qualifiers="const" >
- <return type="Vector3">
- </return>
- <argument index="0" name="contact_idx" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_contact_local_normal" qualifiers="const" >
- <return type="Vector3">
- </return>
- <argument index="0" name="contact_idx" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_contact_local_shape" qualifiers="const" >
- <return type="int">
- </return>
- <argument index="0" name="contact_idx" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_contact_collider" qualifiers="const" >
- <return type="RID">
- </return>
- <argument index="0" name="contact_idx" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_contact_collider_pos" qualifiers="const" >
- <return type="Vector3">
- </return>
- <argument index="0" name="contact_idx" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_contact_collider_id" qualifiers="const" >
- <return type="int">
- </return>
- <argument index="0" name="contact_idx" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_contact_collider_shape" qualifiers="const" >
- <return type="int">
- </return>
- <argument index="0" name="contact_idx" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_contact_collider_velocity_at_pos" qualifiers="const" >
- <return type="Vector3">
- </return>
- <argument index="0" name="contact_idx" type="int">
- </argument>
- <description>
- </description>
- </method>
- </methods>
- <constants>
- </constants>
-</class>
-<class name="PhysicsDirectBodyStateSW" inherits="PhysicsDirectBodyState" category="Core">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- </methods>
- <constants>
- </constants>
-</class>
-<class name="PhysicsServer" inherits="Object" category="Core">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- <method name="shape_create" >
- <return type="RID">
- </return>
- <argument index="0" name="shape_type" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="shape_set_data" >
- <argument index="0" name="shape" type="RID">
- </argument>
- <argument index="1" name="data" type="var">
- </argument>
- <argument index="2" name="margin" type="real" default="-1">
- </argument>
- <description>
- </description>
- </method>
- <method name="shape_get_type" qualifiers="const" >
- <return type="int">
- </return>
- <argument index="0" name="shape" type="RID">
- </argument>
- <description>
- </description>
- </method>
- <method name="shape_get_data" qualifiers="const" >
- <argument index="0" name="shape" type="RID">
- </argument>
- <description>
- </description>
- </method>
- <method name="space_create" >
- <return type="RID">
- </return>
- <description>
- </description>
- </method>
- <method name="area_create" >
- <return type="RID">
- </return>
- <argument index="0" name="space" type="int">
- </argument>
- <argument index="1" name="arg1" type="bool" default="RID()">
- </argument>
- <description>
- </description>
- </method>
- <method name="area_set_param" >
- <argument index="0" name="area" type="RID">
- </argument>
- <argument index="1" name="param" type="int">
- </argument>
- <argument index="2" name="value" type="var">
- </argument>
- <description>
- </description>
- </method>
- <method name="area_set_shape" >
- <argument index="0" name="area" type="RID">
- </argument>
- <argument index="1" name="shape" type="RID">
- </argument>
- <description>
- </description>
- </method>
- <method name="area_set_bounds" >
- <argument index="0" name="area" type="RID">
- </argument>
- <argument index="1" name="bounds" type="Dictionary">
- </argument>
- <description>
- </description>
- </method>
- <method name="area_set_transform" >
- <argument index="0" name="area" type="RID">
- </argument>
- <argument index="1" name="transform" type="Transform">
- </argument>
- <description>
- </description>
- </method>
- <method name="area_get_param" qualifiers="const" >
- <argument index="0" name="area" type="RID">
- </argument>
- <argument index="1" name="param" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="area_get_shape" qualifiers="const" >
- <return type="RID">
- </return>
- <argument index="0" name="area" type="RID">
- </argument>
- <description>
- </description>
- </method>
- <method name="area_get_bounds" qualifiers="const" >
- <return type="Dictionary">
- </return>
- <argument index="0" name="area" type="RID">
- </argument>
- <description>
- </description>
- </method>
- <method name="area_get_transform" qualifiers="const" >
- <return type="Transform">
- </return>
- <argument index="0" name="area" type="RID">
- </argument>
- <description>
- </description>
- </method>
- <method name="body_create" >
- <return type="RID">
- </return>
- <argument index="0" name="space" type="int">
- </argument>
- <argument index="1" name="arg1" type="bool" default="RID()">
- </argument>
- <description>
- </description>
- </method>
- <method name="body_set_mode" >
- <argument index="0" name="body" type="RID">
- </argument>
- <argument index="1" name="mode" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="body_get_mode" qualifiers="const" >
- <return type="int">
- </return>
- <argument index="0" name="body" type="RID">
- </argument>
- <argument index="1" name="arg1" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="body_add_shape" >
- <argument index="0" name="body" type="RID">
- </argument>
- <argument index="1" name="shape" type="RID">
- </argument>
- <argument index="2" name="transform" type="Transform" default="Transform()">
- </argument>
- <description>
- </description>
- </method>
- <method name="body_set_shape" >
- <argument index="0" name="body" type="RID">
- </argument>
- <argument index="1" name="shape_idx" type="int">
- </argument>
- <argument index="2" name="shape" type="RID">
- </argument>
- <description>
- </description>
- </method>
- <method name="body_set_shape_transform" >
- <argument index="0" name="body" type="RID">
- </argument>
- <argument index="1" name="shape_idx" type="int">
- </argument>
- <argument index="2" name="transform" type="Transform">
- </argument>
- <description>
- </description>
- </method>
- <method name="body_get_shape_count" qualifiers="const" >
- <return type="int">
- </return>
- <argument index="0" name="body" type="RID">
- </argument>
- <description>
- </description>
- </method>
- <method name="body_get_shape" qualifiers="const" >
- <return type="RID">
- </return>
- <argument index="0" name="body" type="RID">
- </argument>
- <argument index="1" name="shape_idx" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="body_get_shape_transform" qualifiers="const" >
- <return type="Transform">
- </return>
- <argument index="0" name="body" type="RID">
- </argument>
- <argument index="1" name="shape_idx" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="body_attach_object_instance_ID" >
- <argument index="0" name="body" type="RID">
- </argument>
- <argument index="1" name="ID" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="body_get_object_instance_ID" qualifiers="const" >
- <return type="int">
- </return>
- <argument index="0" name="body" type="RID">
- </argument>
- <description>
- </description>
- </method>
- <method name="body_set_user_flags" >
- <argument index="0" name="body" type="RID">
- </argument>
- <argument index="1" name="user_flags" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="body_get_user_flags" qualifiers="const" >
- <return type="int">
- </return>
- <argument index="0" name="body" type="RID">
- </argument>
- <argument index="1" name="arg1" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="body_set_param" >
- <argument index="0" name="body" type="RID">
- </argument>
- <argument index="1" name="param" type="int">
- </argument>
- <argument index="2" name="value" type="real">
- </argument>
- <description>
- </description>
- </method>
- <method name="body_get_param" qualifiers="const" >
- <return type="real">
- </return>
- <argument index="0" name="body" type="RID">
- </argument>
- <argument index="1" name="param" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="body_static_simulate_motion" >
- <argument index="0" name="body" type="RID">
- </argument>
- <argument index="1" name="motion" type="Transform">
- </argument>
- <description>
- </description>
- </method>
- <method name="body_set_state" >
- <argument index="0" name="body" type="RID">
- </argument>
- <argument index="1" name="state" type="int">
- </argument>
- <argument index="2" name="value" type="var">
- </argument>
- <description>
- </description>
- </method>
- <method name="body_get_state" qualifiers="const" >
- <argument index="0" name="body" type="RID">
- </argument>
- <argument index="1" name="state" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="body_set_applied_force" >
- <argument index="0" name="body" type="RID">
- </argument>
- <argument index="1" name="applied_force" type="Vector3">
- </argument>
- <description>
- </description>
- </method>
- <method name="body_get_applied_force" qualifiers="const" >
- <return type="Vector3">
- </return>
- <argument index="0" name="body" type="RID">
- </argument>
- <description>
- </description>
- </method>
- <method name="body_set_applied_torque" >
- <argument index="0" name="body" type="RID">
- </argument>
- <argument index="1" name="applied_torque" type="Vector3">
- </argument>
- <description>
- </description>
- </method>
- <method name="body_get_applied_torque" qualifiers="const" >
- <return type="Vector3">
- </return>
- <argument index="0" name="body" type="RID">
- </argument>
- <description>
- </description>
- </method>
- <method name="body_set_axis_velocity" >
- <argument index="0" name="body" type="RID">
- </argument>
- <argument index="1" name="axis_velocity" type="Vector3">
- </argument>
- <description>
- </description>
- </method>
- <method name="body_apply_impulse" >
- <argument index="0" name="body" type="RID">
- </argument>
- <argument index="1" name="pos" type="Vector3">
- </argument>
- <argument index="2" name="impulse" type="Vector3">
- </argument>
- <description>
- </description>
- </method>
- <method name="body_add_collision_exception" >
- <argument index="0" name="body" type="RID">
- </argument>
- <argument index="1" name="against_body" type="RID">
- </argument>
- <description>
- </description>
- </method>
- <method name="body_remove_collision_exception" >
- <argument index="0" name="body" type="RID">
- </argument>
- <argument index="1" name="against_body" type="RID">
- </argument>
- <description>
- </description>
- </method>
- <method name="query_create" >
- <return type="RID">
- </return>
- <argument index="0" name="receiver" type="Object">
- </argument>
- <argument index="1" name="callback" type="String">
- </argument>
- <argument index="2" name="userdata" type="var">
- </argument>
- <argument index="3" name="persist" type="bool" default="true">
- </argument>
- <description>
- </description>
- </method>
- <method name="query_body_state" >
- <argument index="0" name="query" type="RID">
- </argument>
- <argument index="1" name="body" type="RID">
- </argument>
- <description>
- </description>
- </method>
- <method name="query_body_direct_state" >
- <argument index="0" name="query" type="RID">
- </argument>
- <argument index="1" name="body" type="RID">
- </argument>
- <description>
- </description>
- </method>
- <method name="query_area" >
- <argument index="0" name="query" type="RID">
- </argument>
- <argument index="1" name="area" type="RID">
- </argument>
- <description>
- </description>
- </method>
- <method name="query_intersection" >
- <argument index="0" name="query" type="RID">
- </argument>
- <argument index="1" name="space" type="RID">
- </argument>
- <argument index="2" name="exclude" type="Array" default="Array()">
- </argument>
- <argument index="3" name="usermask" type="int" default="0">
- </argument>
- <description>
- </description>
- </method>
- <method name="query_intersection_ray" >
- <argument index="0" name="query" type="RID">
- </argument>
- <argument index="1" name="origin" type="Vector3">
- </argument>
- <argument index="2" name="dir" type="Vector3">
- </argument>
- <description>
- </description>
- </method>
- <method name="query_intersection_segment" >
- <argument index="0" name="query" type="RID">
- </argument>
- <argument index="1" name="from" type="Vector3">
- </argument>
- <argument index="2" name="to" type="Vector3">
- </argument>
- <description>
- </description>
- </method>
- <method name="query_intersection_shape" >
- <argument index="0" name="query" type="RID">
- </argument>
- <argument index="1" name="shape" type="RID">
- </argument>
- <argument index="2" name="arg2" type="Transform">
- </argument>
- <description>
- </description>
- </method>
- <method name="query_intersection_bounds" >
- <argument index="0" name="query" type="RID">
- </argument>
- <argument index="1" name="bounds" type="Dictionary">
- </argument>
- <argument index="2" name="arg2" type="Transform">
- </argument>
- <description>
- </description>
- </method>
- <method name="query_clear" >
- <argument index="0" name="query" type="RID">
- </argument>
- <description>
- </description>
- </method>
- <method name="query_get_type" qualifiers="const" >
- <return type="int">
- </return>
- <argument index="0" name="query" type="RID">
- </argument>
- <description>
- </description>
- </method>
- <method name="query_get_target" qualifiers="const" >
- <return type="RID">
- </return>
- <argument index="0" name="query" type="RID">
- </argument>
- <description>
- </description>
- </method>
- <method name="free" >
- <argument index="0" name="rid" type="RID">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_active" >
- <argument index="0" name="active" type="bool">
- </argument>
- <description>
- </description>
- </method>
- </methods>
- <constants>
- <constant name="QUERY_BODY_STATE" value="1">
- </constant>
- <constant name="BODY_PARAM_FRICTION" value="1">
- </constant>
- <constant name="AREA_PARAM_OVERRIDE_PARAMS" value="0">
- </constant>
- <constant name="SHAPE_CUSTOM" value="9">
- </constant>
- <constant name="QUERY_INTERSECTION" value="4">
- </constant>
- <constant name="BODY_STATE_SLEEPING" value="3">
- </constant>
- <constant name="QUERY_AREA_MONITOR" value="3">
- </constant>
- <constant name="QUERY_BODY_DIRECT_STATE" value="2">
- </constant>
- <constant name="QUERY_NONE" value="0">
- </constant>
- <constant name="CONE_TWIST_VAR_RELAXATION" value="4">
- </constant>
- <constant name="CONE_TWIST_VAR_BIAS" value="3">
- </constant>
- <constant name="CONE_TWIST_VAR_SWING_SPAN_LIMIT_1" value="0">
- </constant>
- <constant name="HINGE_VAR_MOTOR_ENABLED" value="5">
- </constant>
- <constant name="HINGE_VAR_LIMIT_SOFTNESS" value="3">
- </constant>
- <constant name="HINGE_VAR_ANGULAR_ONLY" value="0">
- </constant>
- <constant name="BODY_STATE_ANGULAR_VELOCITY" value="2">
- </constant>
- <constant name="SHAPE_CAPSULE" value="5">
- </constant>
- <constant name="CONE_TWIST_VAR_SWING_SPAN_LIMIT_2" value="1">
- </constant>
- <constant name="BODY_STATE_LINEAR_VELOCITY" value="1">
- </constant>
- <constant name="BODY_MODE_CHARACTER" value="2">
- </constant>
- <constant name="AREA_PARAM_GRAVITY" value="1">
- </constant>
- <constant name="SHAPE_CONCAVE_POLYGON" value="7">
- </constant>
- <constant name="TYPE_BODY" value="0">
- </constant>
- <constant name="HINGE_VAR_MOTOR_TARGET_VELOCITY" value="6">
- </constant>
- <constant name="HINGE_VAR_HIGHER_LIMIT" value="2">
- </constant>
- <constant name="SHAPE_HEIGHTMAP" value="8">
- </constant>
- <constant name="SHAPE_SPHERE" value="2">
- </constant>
- <constant name="CONE_TWIST_VAR_TWIST_SPAN_LIMIT" value="2">
- </constant>
- <constant name="BODY_MODE_RIGID" value="1">
- </constant>
- <constant name="AREA_PARAM_DENSITY" value="5">
- </constant>
- <constant name="AREA_PARAM_GRAVITY_VECTOR" value="2">
- </constant>
- <constant name="SHAPE_PLANE" value="0">
- </constant>
- <constant name="HINGE_VAR_MOTOR_IMPULSE" value="7">
- </constant>
- <constant name="HINGE_VAR_RELAXATION" value="4">
- </constant>
- <constant name="HINGE_VAR_LOWER_LIMIT" value="1">
- </constant>
- <constant name="BODY_STATE_TRANSFORM" value="0">
- </constant>
- <constant name="BODY_PARAM_MASS" value="2">
- </constant>
- <constant name="BODY_PARAM_BOUNCE" value="0">
- </constant>
- <constant name="BODY_MODE_STATIC" value="0">
- </constant>
- <constant name="SHAPE_BOX" value="3">
- </constant>
- <constant name="TYPE_AREA" value="1">
- </constant>
- <constant name="AREA_PARAM_PRIORITY" value="6">
- </constant>
- <constant name="AREA_PARAM_GRAVITY_POINT_ATTENUATION" value="4">
- </constant>
- <constant name="AREA_PARAM_GRAVITY_IS_POINT" value="3">
- </constant>
- <constant name="SHAPE_CONVEX_POLYGON" value="6">
- </constant>
- <constant name="SHAPE_CYLINDER" value="4">
- </constant>
- </constants>
-</class>
-<class name="PhysicsServerSW" inherits="PhysicsServer" category="Core">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- </methods>
- <constants>
- </constants>
-</class>
-<class name="PlaneShape" inherits="Shape" category="Resources">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- <method name="set_plane" >
- <argument index="0" name="plane" type="Plane">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_plane" qualifiers="const" >
- <return type="Plane">
- </return>
- <description>
- </description>
- </method>
- </methods>
- <constants>
- </constants>
-</class>
-<class name="Popup" inherits="Control" category="Core">
- <brief_description>
- Base container control for popups and dialogs.
- </brief_description>
- <description>
- PopUp is a base [Control] used to show dialogs and popups. It&apos;s a subwindow and modal by default (see [Control]) and has helpers for custom popup behavior.
- </description>
- <methods>
- <method name="popup_centered" >
- <argument index="0" name="size" type="Vector2" default="Vector2(0,0)">
- </argument>
- <description>
- Popup (show the control in modal form) in the center of the screen, at the curent size, or at a size determined by &quot;size&quot;.
- </description>
- </method>
- <method name="popup_centered_ratio" >
- <argument index="0" name="ratio" type="real" default="0.75">
- </argument>
- <description>
- Popup (show the control in modal form) in the center of the screen, scalled at a ratio of size of the screen.
- </description>
- </method>
- <method name="popup" >
- <description>
- Popup (show the control in modal form).
- </description>
- </method>
- <method name="set_exclusive" >
- <argument index="0" name="enable" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="is_exclusive" qualifiers="const" >
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- </methods>
- <signals>
- <signal name="about_to_show">
- <description>
- 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).
- </description>
- </signal>
- </signals>
- <constants>
- </constants>
-</class>
-<class name="PopupDialog" inherits="Popup" category="Nodes/GUI Nodes">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- </methods>
- <constants>
- </constants>
-</class>
-<class name="PopupMenu" inherits="Popup" category="Nodes/GUI Nodes">
- <brief_description>
- PopupMenu displays a list of options.
- </brief_description>
- <description>
- PopupMenu is the typical Control that displays a list of options. They are popular in toolbars or context menus.
- </description>
- <methods>
- <method name="add_icon_item" >
- <argument index="0" name="texture" type="Object">
- </argument>
- <argument index="1" name="label" type="String">
- </argument>
- <argument index="2" name="id" type="int" default="-1">
- </argument>
- <argument index="3" name="accel" type="int" default="0">
- </argument>
- <description>
- Add a new item with text &quot;label&quot; and icon &quot;texture. An id can optonally be provided, as well as an accelerator. If no id is provided, one will be created from the index.
- </description>
- </method>
- <method name="add_item" >
- <argument index="0" name="label" type="String">
- </argument>
- <argument index="1" name="id" type="int" default="-1">
- </argument>
- <argument index="2" name="accel" type="int" default="0">
- </argument>
- <description>
- Add a new item with text &quot;label&quot;. An id can optonally be provided, as well as an accelerator. If no id is provided, one will be created from the index.
- </description>
- </method>
- <method name="add_icon_check_item" >
- <argument index="0" name="texture" type="Object">
- </argument>
- <argument index="1" name="label" type="String">
- </argument>
- <argument index="2" name="id" type="int" default="-1">
- </argument>
- <argument index="3" name="accel" type="int" default="0">
- </argument>
- <description>
- Add a new checkable item with text &quot;label&quot; and icon &quot;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&apos;t have any built-in checking behavior and must be checked/unchecked manually.
- </description>
- </method>
- <method name="add_check_item" >
- <argument index="0" name="label" type="String">
- </argument>
- <argument index="1" name="id" type="int" default="-1">
- </argument>
- <argument index="2" name="accel" type="int" default="0">
- </argument>
- <description>
- Add a new checkable item with text &quot;label&quot;. 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&apos;t have any built-in checking behavior and must be checked/unchecked manually.
- </description>
- </method>
- <method name="set_item_text" >
- <argument index="0" name="idx" type="int">
- </argument>
- <argument index="1" name="text" type="String">
- </argument>
- <description>
- Set the text of the item at index &quot;idx&quot;.
- </description>
- </method>
- <method name="set_item_icon" >
- <argument index="0" name="idx" type="int">
- </argument>
- <argument index="1" name="icon" type="Object">
- </argument>
- <description>
- Set the icon of the item at index &quot;idx&quot;.
- </description>
- </method>
- <method name="set_item_accelerator" >
- <argument index="0" name="idx" type="int">
- </argument>
- <argument index="1" name="accel" type="int">
- </argument>
- <description>
- Set the accelerator of the item at index &quot;idx&quot;. Accelerators are special combinations of keys that activate the item, no matter which control is fucused.
- </description>
- </method>
- <method name="set_item_metadata" >
- <argument index="0" name="idx" type="int">
- </argument>
- <argument index="1" name="metadata" type="var">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_item_checked" >
- <argument index="0" name="idx" type="int">
- </argument>
- <argument index="1" name="arg1" type="bool">
- </argument>
- <description>
- Set the checkstate status of the item at index &quot;idx&quot;.
- </description>
- </method>
- <method name="set_item_disabled" >
- <argument index="0" name="idx" type="int">
- </argument>
- <argument index="1" name="arg1" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_item_ID" >
- <argument index="0" name="idx" type="int">
- </argument>
- <argument index="1" name="id" type="int">
- </argument>
- <description>
- Set the id of the item at index &quot;idx&quot;.
- </description>
- </method>
- <method name="get_item_text" qualifiers="const" >
- <return type="String">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <description>
- Return the text of the item at index &quot;idx&quot;.
- </description>
- </method>
- <method name="get_item_icon" qualifiers="const" >
- <return type="Object">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <description>
- Return the icon of the item at index &quot;idx&quot;.
- </description>
- </method>
- <method name="get_item_metadata" qualifiers="const" >
- <argument index="0" name="idx" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_item_accelerator" qualifiers="const" >
- <return type="int">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <description>
- Return the accelerator of the item at index &quot;idx&quot;. Accelerators are special combinations of keys that activate the item, no matter which control is fucused.
- </description>
- </method>
- <method name="is_item_checked" qualifiers="const" >
- <return type="bool">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <description>
- Return the checkstate status of the item at index &quot;idx&quot;.
- </description>
- </method>
- <method name="is_item_disabled" qualifiers="const" >
- <return type="bool">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_item_ID" qualifiers="const" >
- <return type="int">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <description>
- Return the id of the item at index &quot;idx&quot;.
- </description>
- </method>
- <method name="get_item_index" qualifiers="const" >
- <return type="int">
- </return>
- <argument index="0" name="id" type="int">
- </argument>
- <description>
- Find and return the index of the item containing a given id.
- </description>
- </method>
- <method name="get_item_count" qualifiers="const" >
- <return type="int">
- </return>
- <description>
- Return the amount of items.
- </description>
- </method>
- <method name="add_separator" >
- <description>
- Add a separator between items. Separators also occupy an index.
- </description>
- </method>
- <method name="clear" >
- <description>
- Clear the popup menu.
- </description>
- </method>
- </methods>
- <signals>
- <signal name="item_pressed">
- <argument index="0" name="ID" type="int">
- </argument>
- <description>
- 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.
- </description>
- </signal>
- </signals>
- <constants>
- </constants>
-</class>
-<class name="PopupPanel" inherits="Popup" category="Nodes/GUI Nodes">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- </methods>
- <constants>
- </constants>
-</class>
-<class name="Portal" inherits="VisualInstance" category="Nodes/3D/3D Visual Nodes">
- <brief_description>
- Portals provide virtual openings to rooms.
- </brief_description>
- <description>
- 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 &quot;connect&quot; and form &quot;doors&quot; (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.
- </description>
- <methods>
- <method name="set_shape" >
- <argument index="0" name="points" type="Array">
- </argument>
- <description>
- Set the portal shape. The shape is an array of [Point2] points, representing a convex polygon in the X,Y plane.
- </description>
- </method>
- <method name="get_shape" qualifiers="const" >
- <return type="Array">
- </return>
- <description>
- Return the portal shape. The shape is an array of [Point2] points, representing a convex polygon in the X,Y plane.
- </description>
- </method>
- <method name="set_enabled" >
- <argument index="0" name="enable" type="bool">
- </argument>
- <description>
- 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.
- </description>
- </method>
- <method name="is_enabled" qualifiers="const" >
- <return type="bool">
- </return>
- <description>
- Return wether the portal is active. When disabled it causes the parent [RoomInstance] to not be visible any longer when looking through the portal.
- </description>
- </method>
- <method name="set_disable_distance" >
- <argument index="0" name="distance" type="real">
- </argument>
- <description>
- Set the distance threshold for disabling the portal. Every time that the portal goes beyond &quot;distance&quot;, it disables itself, becoming the opaque color (see [method set_disabled_color]).
- </description>
- </method>
- <method name="get_disable_distance" qualifiers="const" >
- <return type="real">
- </return>
- <description>
- Return the distance threshold for disabling the portal. Every time that the portal goes beyond &quot;distance&quot;, it disables itself, becoming the opaque color (see [method set_disabled_color]).
- </description>
- </method>
- <method name="set_disabled_color" >
- <argument index="0" name="color" type="Color">
- </argument>
- <description>
- When the portal goes beyond the disable distance (see [method set_disable_distance]), it becomes opaque and displayed with color &quot;color&quot;.
- </description>
- </method>
- <method name="get_disabled_color" qualifiers="const" >
- <return type="Color">
- </return>
- <description>
- Return the color for when the portal goes beyond the disable distance (see [method set_disable_distance]) and becomes disabled.
- </description>
- </method>
- <method name="set_connect_range" >
- <argument index="0" name="range" type="real">
- </argument>
- <description>
- Set the range for auto-connecting two portals from different rooms sharing the same space.
- </description>
- </method>
- <method name="get_connect_range" qualifiers="const" >
- <return type="real">
- </return>
- <description>
- Return the range for auto-connecting two portals from different rooms sharing the same space.
- </description>
- </method>
- </methods>
- <constants>
- </constants>
-</class>
-<class name="Range" inherits="Control" category="Core">
- <brief_description>
- Abstract base class for range-based controls.
- </brief_description>
- <description>
- 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].
- </description>
- <methods>
- <method name="get_val" qualifiers="const" >
- <return type="real">
- </return>
- <description>
- Return the current value.
- </description>
- </method>
- <method name="get_min" qualifiers="const" >
- <return type="real">
- </return>
- <description>
- Return the minimum value.
- </description>
- </method>
- <method name="get_max" qualifiers="const" >
- <return type="real">
- </return>
- <description>
- Return the maximum value.
- </description>
- </method>
- <method name="get_step" qualifiers="const" >
- <return type="real">
- </return>
- <description>
- Return the stepping, if step is 0, stepping is disabled.
- </description>
- </method>
- <method name="get_page" qualifiers="const" >
- <return type="real">
- </return>
- <description>
- Return the page size, if page is 0, paging is disabled.
- </description>
- </method>
- <method name="get_unit_value" qualifiers="const" >
- <return type="real">
- </return>
- <description>
- Return value mapped to 0 to 1 (unit) range.
- </description>
- </method>
- <method name="set_val" >
- <argument index="0" name="value" type="real">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_min" >
- <argument index="0" name="minimum" type="real">
- </argument>
- <description>
- Set minimum value, clamped range value to it if it&apos;s less.
- </description>
- </method>
- <method name="set_max" >
- <argument index="0" name="maximum" type="real">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_step" >
- <argument index="0" name="step" type="real">
- </argument>
- <description>
- Set step value. If step is 0, stepping will be disabled.
- </description>
- </method>
- <method name="set_page" >
- <argument index="0" name="pagesize" type="real">
- </argument>
- <description>
- Set page size. Page is mainly used for scrollbars or anything that controls text scrolling.
- </description>
- </method>
- <method name="set_unit_value" >
- <argument index="0" name="value" type="real">
- </argument>
- <description>
- Set value mapped to 0 to 1 (unit) range, it will then be converted to the actual value within min and max.
- </description>
- </method>
- <method name="share" >
- <argument index="0" name="with" type="Object">
- </argument>
- <description>
- </description>
- </method>
- <method name="unshare" >
- <description>
- </description>
- </method>
- </methods>
- <signals>
- <signal name="value_changed">
- <argument index="0" name="value" type="real">
- </argument>
- <description>
- This signal is emitted when value changes.
- </description>
- </signal>
- <signal name="changed">
- <description>
- This signal is emitted when min, max, range or step change.
- </description>
- </signal>
- </signals>
- <constants>
- </constants>
-</class>
-<class name="RayShape" inherits="Shape" category="Resources">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- <method name="set_length" >
- <argument index="0" name="length" type="real">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_length" qualifiers="const" >
- <return type="real">
- </return>
- <description>
- </description>
- </method>
- </methods>
- <constants>
- </constants>
-</class>
-<class name="Reference" inherits="Object" category="Core">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- </methods>
- <constants>
- </constants>
-</class>
-<class name="Resource" inherits="Reference" category="Resources">
- <brief_description>
- Base class for all resources.
- </brief_description>
- <description>
- 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.
- </description>
- <methods>
- <method name="set_path" >
- <argument index="0" name="path" type="String">
- </argument>
- <description>
- Set the path of the resource. This is useful mainly for editors when saving/loading, and shouldn&apos;t be changed by anything else.
- </description>
- </method>
- <method name="get_path" qualifiers="const" >
- <return type="String">
- </return>
- <description>
- Return the path of the resource. This is useful mainly for editors when saving/loading, and shouldn&apos;t be changed by anything else.
- </description>
- </method>
- <method name="set_name" >
- <argument index="0" name="name" type="String">
- </argument>
- <description>
- Set the name of the resources, any name is ok (it doesn&apos;t have to be unique). Name is for descriptive purposes only.
- </description>
- </method>
- <method name="get_name" qualifiers="const" >
- <return type="String">
- </return>
- <description>
- Return the name of the resources, any name is ok (it doesn&apos;t have to be unique). Name is for descriptive purposes only.
- </description>
- </method>
- <method name="get_rid" qualifiers="const" >
- <return type="RID">
- </return>
- <description>
- 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.
- </description>
- </method>
- </methods>
- <signals>
- <signal name="changed">
- <description>
- </description>
- </signal>
- </signals>
- <constants>
- </constants>
-</class>
-<class name="_ResourceLoader" inherits="Object" category="Core">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- <method name="load" >
- <return type="Object">
- </return>
- <argument index="0" name="path" type="String">
- </argument>
- <argument index="1" name="type_hint" type="String" default="&quot;&quot;">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_recognized_extensions_for_type" >
- <return type="StringArray">
- </return>
- <argument index="0" name="type" type="String">
- </argument>
- <description>
- </description>
- </method>
- </methods>
- <constants>
- </constants>
-</class>
-<class name="_ResourceSaver" inherits="Object" category="Core">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- <method name="save" >
- <return type="int">
- </return>
- <argument index="0" name="path" type="String">
- </argument>
- <argument index="1" name="resource" type="Object">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_recognized_extensions" >
- <return type="StringArray">
- </return>
- <argument index="0" name="type" type="Object">
- </argument>
- <description>
- </description>
- </method>
- </methods>
- <constants>
- </constants>
-</class>
-<class name="RichTextLabel" inherits="Control" category="Nodes/GUI Nodes">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- <method name="add_text" >
- <argument index="0" name="text" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="add_image" >
- <argument index="0" name="image" type="Texture">
- </argument>
- <description>
- </description>
- </method>
- <method name="newline" >
- <description>
- </description>
- </method>
- <method name="push_font" >
- <argument index="0" name="font" type="Object">
- </argument>
- <description>
- </description>
- </method>
- <method name="push_color" >
- <argument index="0" name="color" type="Color">
- </argument>
- <description>
- </description>
- </method>
- <method name="push_align" >
- <argument index="0" name="align" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="push_indent" >
- <argument index="0" name="level" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="push_list" >
- <argument index="0" name="type" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="push_meta" >
- <argument index="0" name="data" type="var">
- </argument>
- <description>
- </description>
- </method>
- <method name="push_underline" >
- <description>
- </description>
- </method>
- <method name="pop" >
- <description>
- </description>
- </method>
- <method name="clear" >
- <description>
- </description>
- </method>
- <method name="set_meta_underline" >
- <argument index="0" name="enable" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="is_meta_underlined" qualifiers="const" >
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="set_scroll_active" >
- <argument index="0" name="active" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="is_scroll_active" qualifiers="const" >
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="set_scroll_follow" >
- <argument index="0" name="follow" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="is_scroll_following" qualifiers="const" >
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="set_tab_size" >
- <argument index="0" name="spaces" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_tab_size" qualifiers="const" >
- <return type="int">
- </return>
- <description>
- </description>
- </method>
- </methods>
- <signals>
- <signal name="meta_clicked">
- <argument index="0" name="meta" type="Nil">
- </argument>
- <description>
- </description>
- </signal>
- </signals>
- <constants>
- <constant name="ITEM_TEXT" value="1">
- </constant>
- <constant name="ITEM_MAIN" value="0">
- </constant>
- <constant name="ALIGN_CENTER" value="1">
- </constant>
- <constant name="ITEM_UNDERLINE" value="6">
- </constant>
- <constant name="ITEM_META" value="10">
- </constant>
- <constant name="ITEM_COLOR" value="5">
- </constant>
- <constant name="ITEM_FONT" value="4">
- </constant>
- <constant name="LIST_DOTS" value="2">
- </constant>
- <constant name="ALIGN_LEFT" value="0">
- </constant>
- <constant name="LIST_LETTERS" value="1">
- </constant>
- <constant name="LIST_NUMBERS" value="0">
- </constant>
- <constant name="ITEM_INDENT" value="8">
- </constant>
- <constant name="ITEM_NEWLINE" value="3">
- </constant>
- <constant name="ALIGN_RIGHT" value="2">
- </constant>
- <constant name="ITEM_ALIGN" value="7">
- </constant>
- <constant name="ITEM_IMAGE" value="2">
- </constant>
- <constant name="ALIGN_FILL" value="3">
- </constant>
- <constant name="ITEM_LIST" value="9">
- </constant>
- </constants>
-</class>
-<class name="Room" inherits="Resource" category="Resources">
- <brief_description>
- Room data resource.
- </brief_description>
- <description>
- 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.
- </description>
- <methods>
- <method name="set_bounds" >
- <argument index="0" name="bsp_tree" type="Dictionary">
- </argument>
- <description>
- 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).
- </description>
- </method>
- <method name="get_bounds" qualifiers="const" >
- <return type="Dictionary">
- </return>
- <description>
- 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).
- </description>
- </method>
- <method name="set_geometry_hint" >
- <argument index="0" name="triangles" type="Vector3Array">
- </argument>
- <description>
- Set the &quot;geometry&quot; hint of the room. This means, how the room actually looks (an array of [Vector3]s, forming triangles).
- </description>
- </method>
- <method name="get_geometry_hint" qualifiers="const" >
- <return type="Vector3Array">
- </return>
- <description>
- Return the &quot;geometry&quot; hint of the room. This means, how the room actually looks (an array of [Vector3]s, forming triangles).
- </description>
- </method>
- </methods>
- <constants>
- </constants>
-</class>
-<class name="RoomInstance" inherits="VisualInstance" category="Nodes/3D/3D Visual Nodes">
- <brief_description>
- Node that instances a Room.
- </brief_description>
- <description>
- 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.&#10;[html div align=&quot;center&quot;][html img src=&quot;images/portals_example.png&quot;/][html /div]
- </description>
- <methods>
- <method name="set_room" >
- <argument index="0" name="room" type="Object">
- </argument>
- <description>
- Set the [Room] resource, containing the room bounds.
- </description>
- </method>
- <method name="get_room" qualifiers="const" >
- <return type="Object">
- </return>
- <description>
- Return the [Room] resource, containing the room bounds.
- </description>
- </method>
- <method name="compute_room_from_subtree" >
- <description>
- This helper function computes a [Room] from the shapes of all the children [VisualInstance] nodes, and sets it to the node.
- </description>
- </method>
- <method name="set_simulate_acoustics" >
- <argument index="0" name="enable" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="is_simulating_acoustics" qualifiers="const" >
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- </methods>
- <constants>
- </constants>
-</class>
-<class name="SSAOFX" inherits="ScenarioFX" category="Nodes">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- </methods>
- <constants>
- </constants>
-</class>
-<class name="Sample" inherits="Resource" category="Resources">
- <brief_description>
- Audio Sample (sound) class.
- </brief_description>
- <description>
- 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.
- </description>
- <methods>
- <method name="create" >
- <argument index="0" name="format" type="int">
- </argument>
- <argument index="1" name="stereo" type="bool">
- </argument>
- <argument index="2" name="length" type="int">
- </argument>
- <description>
- Create new data for the sample, with format &quot;format&quot; (see FORMAT_* enum), stereo hint, and length in frames (not samples or bytes!) &quot;frame&quot;. Calling create overrides previous existing data if it exists. Stereo samples are interleaved pairs of left and right (in that order) points
- </description>
- </method>
- <method name="get_format" qualifiers="const" >
- <return type="int">
- </return>
- <description>
- Return the sample format (see FORMAT_* enum).
- </description>
- </method>
- <method name="is_stereo" qualifiers="const" >
- <return type="bool">
- </return>
- <description>
- Return true if the sample was created stereo.
- </description>
- </method>
- <method name="get_length" qualifiers="const" >
- <return type="int">
- </return>
- <description>
- Return the sample length in frames.
- </description>
- </method>
- <method name="set_data" >
- <argument index="0" name="data" type="RawArray">
- </argument>
- <description>
- 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.
- </description>
- </method>
- <method name="get_data" qualifiers="const" >
- <return type="RawArray">
- </return>
- <description>
- 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.
- </description>
- </method>
- <method name="set_mix_rate" >
- <argument index="0" name="hz" type="int">
- </argument>
- <description>
- Set the mix rate for the sample (expected playback frequency).
- </description>
- </method>
- <method name="get_mix_rate" qualifiers="const" >
- <return type="int">
- </return>
- <description>
- Return the mix rate for the sample (expected playback frequency).
- </description>
- </method>
- <method name="set_loop_format" >
- <argument index="0" name="format" type="int">
- </argument>
- <description>
- Set the loop format, see LOOP_* enum
- </description>
- </method>
- <method name="get_loop_format" qualifiers="const" >
- <return type="int">
- </return>
- <description>
- Return the loop format, see LOOP_* enum.
- </description>
- </method>
- <method name="set_loop_begin" >
- <argument index="0" name="pos" type="int">
- </argument>
- <description>
- Set the loop begin position, it must be a valid frame and less than the loop end position.
- </description>
- </method>
- <method name="get_loop_begin" qualifiers="const" >
- <return type="int">
- </return>
- <description>
- Return the loop begin position.
- </description>
- </method>
- <method name="set_loop_end" >
- <argument index="0" name="pos" type="int">
- </argument>
- <description>
- Set the loop end position, it must be a valid frame and greater than the loop begin position.
- </description>
- </method>
- <method name="get_loop_end" qualifiers="const" >
- <return type="int">
- </return>
- <description>
- Return the loop begin position.
- </description>
- </method>
- </methods>
- <constants>
- <constant name="FORMAT_IMA_ADPCM" value="2">
- Ima-ADPCM Audio.
- </constant>
- <constant name="LOOP_FORWARD" value="1">
- Forward looping (when playback reaches loop end, goes back to loop begin)
- </constant>
- <constant name="FORMAT_PCM16" value="1">
- 16-Bits signed little endian PCM audio.
- </constant>
- <constant name="FORMAT_PCM8" value="0">
- 8-Bits signed little endian PCM audio.
- </constant>
- <constant name="LOOP_NONE" value="0">
- No loop enabled.
- </constant>
- <constant name="LOOP_PING_PONG" value="2">
- Ping-Pong looping (when playback reaches loop end, plays backward untilloop begin). Not available in all platforms.
- </constant>
- </constants>
-</class>
-<class name="SampleLibrary" inherits="Resource" category="Resources">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- <method name="add_sample" >
- <argument index="0" name="name" type="String">
- </argument>
- <argument index="1" name="sample" type="Object">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_sample" qualifiers="const" >
- <return type="Object">
- </return>
- <argument index="0" name="name" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="has_sample" qualifiers="const" >
- <return type="bool">
- </return>
- <argument index="0" name="name" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="remove_sample" >
- <argument index="0" name="name" type="String">
- </argument>
- <description>
- </description>
- </method>
- </methods>
- <constants>
- </constants>
-</class>
-<class name="SamplePlayer" inherits="Node" category="Nodes/Audio Nodes">
- <brief_description>
- Sample Player node.
- </brief_description>
- <description>
- SamplePlayer is a [Node] meant for simple sample playback. A library of samples is loaded and played back &quot;as is&quot;, without positioning or anything.
- </description>
- <methods>
- <method name="set_sample_library" >
- <argument index="0" name="library" type="Object">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_sample_library" qualifiers="const" >
- <return type="Object">
- </return>
- <description>
- </description>
- </method>
- <method name="set_voice_count" >
- <argument index="0" name="max_voices" type="int">
- </argument>
- <description>
- Set the amount of simultaneous voices that will be used for playback.
- </description>
- </method>
- <method name="get_voice_count" qualifiers="const" >
- <return type="int">
- </return>
- <description>
- Return the amount of simultaneous voices that will be used for playback.
- </description>
- </method>
- <method name="play" >
- <return type="int">
- </return>
- <argument index="0" name="name" type="String">
- </argument>
- <argument index="1" name="unique" type="bool" default="false">
- </argument>
- <description>
- Play back sample, given it&apos;s identifier &quot;name&quot;. if &quot;unique&quot; is true, all othere previous samples will be stopped. The voice allocated for playback will be returned.
- </description>
- </method>
- <method name="stop" >
- <argument index="0" name="voice" type="int">
- </argument>
- <description>
- Stop a voice &quot;voice&quot;. (see [method play]).
- </description>
- </method>
- <method name="stop_all" >
- <description>
- </description>
- </method>
- <method name="set_mix_rate" >
- <argument index="0" name="voice" type="int">
- </argument>
- <argument index="1" name="hz" type="int">
- </argument>
- <description>
- Change the mix rate of a voice &quot;voice&quot; to given &quot;hz&quot;.
- </description>
- </method>
- <method name="set_pitch_scale" >
- <argument index="0" name="voice" type="int">
- </argument>
- <argument index="1" name="ratio" type="real">
- </argument>
- <description>
- Scale the pitch (mix rate) of a voice by a ratio value &quot;ratio&quot;. A ratio of 1.0 means the voice is unscaled.
- </description>
- </method>
- <method name="set_volume" >
- <argument index="0" name="voice" type="int">
- </argument>
- <argument index="1" name="nrg" type="real">
- </argument>
- <description>
- Set the volume of a voice, 0db is maximum volume (every about -6db, volume is reduced in half). &quot;db&quot; does in fact go from zero to negative.
- </description>
- </method>
- <method name="set_volume_db" >
- <argument index="0" name="voice" type="int">
- </argument>
- <argument index="1" name="nrg" type="real">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_pan" >
- <argument index="0" name="voice" type="int">
- </argument>
- <argument index="1" name="pan" type="real">
- </argument>
- <argument index="2" name="depth" type="real" default="0">
- </argument>
- <argument index="3" name="height" type="real" default="0">
- </argument>
- <description>
- 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).
- </description>
- </method>
- <method name="set_filter" >
- <argument index="0" name="voice" type="int">
- </argument>
- <argument index="1" name="type" type="int">
- </argument>
- <argument index="2" name="cutoff_hz" type="real">
- </argument>
- <argument index="3" name="resonance" type="real">
- </argument>
- <argument index="4" name="gain" type="real" default="0">
- </argument>
- <description>
- Set and enable a filter of a voice, with type &quot;type&quot; (see FILTER_* enum), cutoff (0 to 22khz) frequency and resonance (0+).
- </description>
- </method>
- <method name="set_chorus" >
- <argument index="0" name="voice" type="int">
- </argument>
- <argument index="1" name="send" type="real">
- </argument>
- <description>
- Set the chorus send level of a voice (0 to 1). For setting chorus parameters, see [AudioServer].
- </description>
- </method>
- <method name="set_reverb" >
- <argument index="0" name="voice" type="int">
- </argument>
- <argument index="1" name="room_type" type="int">
- </argument>
- <argument index="2" name="send" type="real">
- </argument>
- <description>
- Set the reverb send level and type of a voice (0 to 1). (see REVERB_* enum for type).
- </description>
- </method>
- <method name="get_mix_rate" qualifiers="const" >
- <return type="int">
- </return>
- <argument index="0" name="voice" type="int">
- </argument>
- <description>
- Return the current mix rate for a given voice.
- </description>
- </method>
- <method name="get_pitch_scale" qualifiers="const" >
- <return type="real">
- </return>
- <argument index="0" name="voice" type="int">
- </argument>
- <description>
- Return the current pitch scale for a given voice.
- </description>
- </method>
- <method name="get_volume" qualifiers="const" >
- <return type="real">
- </return>
- <argument index="0" name="voice" type="int">
- </argument>
- <description>
- Return the current volume (in db) for a given voice. 0db is maximum volume (every about -6db, volume is reduced in half). &quot;db&quot; does in fact go from zero to negative.
- </description>
- </method>
- <method name="get_volume_db" qualifiers="const" >
- <return type="real">
- </return>
- <argument index="0" name="voice" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_pan" qualifiers="const" >
- <return type="real">
- </return>
- <argument index="0" name="voice" type="int">
- </argument>
- <description>
- Return the current panning for a given voice. Panning goes from -1 (left) to +1 (right).
- </description>
- </method>
- <method name="get_pan_depth" qualifiers="const" >
- <return type="real">
- </return>
- <argument index="0" name="voice" type="int">
- </argument>
- <description>
- Return the current pan depth for a given voice (not used unless the hardware supports 3D sound)
- </description>
- </method>
- <method name="get_pan_height" qualifiers="const" >
- <return type="real">
- </return>
- <argument index="0" name="voice" type="int">
- </argument>
- <description>
- Return the current pan height for a given voice (not used unless the hardware supports 3D sound)
- </description>
- </method>
- <method name="get_filter_type" qualifiers="const" >
- <return type="int">
- </return>
- <argument index="0" name="voice" type="int">
- </argument>
- <description>
- Return the current filter type in use (see FILTER_* enum) for a given voice.
- </description>
- </method>
- <method name="get_filter_cutoff" qualifiers="const" >
- <return type="real">
- </return>
- <argument index="0" name="voice" type="int">
- </argument>
- <description>
- Return the current filter cutoff for a given voice. Cutoff goes from 0 to 22khz.
- </description>
- </method>
- <method name="get_filter_resonance" qualifiers="const" >
- <return type="real">
- </return>
- <argument index="0" name="voice" type="int">
- </argument>
- <description>
- Return the current filter resonance for a given voice. Resonance goes from 0 up.
- </description>
- </method>
- <method name="get_filter_gain" qualifiers="const" >
- <return type="real">
- </return>
- <argument index="0" name="voice" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_chorus" qualifiers="const" >
- <return type="real">
- </return>
- <argument index="0" name="voice" type="int">
- </argument>
- <description>
- Return the current chorus send level for a given voice. (0 to 1).
- </description>
- </method>
- <method name="get_reverb_room" qualifiers="const" >
- <return type="real">
- </return>
- <argument index="0" name="voice" type="int">
- </argument>
- <description>
- Return the current reverb room type for a given voice (see REVERB_* enum).
- </description>
- </method>
- <method name="get_reverb" qualifiers="const" >
- <return type="real">
- </return>
- <argument index="0" name="voice" type="int">
- </argument>
- <description>
- Return the current reverb send level for a given voice. (0 to 1).
- </description>
- </method>
- <method name="set_default_pitch_scale" >
- <argument index="0" name="ratio" type="real">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_default_volume" >
- <argument index="0" name="nrg" type="real">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_default_volume_db" >
- <argument index="0" name="db" type="real">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_default_pan" >
- <argument index="0" name="pan" type="real">
- </argument>
- <argument index="1" name="depth" type="real" default="0">
- </argument>
- <argument index="2" name="height" type="real" default="0">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_default_filter" >
- <argument index="0" name="type" type="int">
- </argument>
- <argument index="1" name="cutoff_hz" type="real">
- </argument>
- <argument index="2" name="resonance" type="real">
- </argument>
- <argument index="3" name="gain" type="real" default="0">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_default_chorus" >
- <argument index="0" name="send" type="real">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_default_reverb" >
- <argument index="0" name="room_type" type="int">
- </argument>
- <argument index="1" name="send" type="real">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_default_pitch_scale" qualifiers="const" >
- <return type="real">
- </return>
- <description>
- </description>
- </method>
- <method name="get_default_volume" qualifiers="const" >
- <return type="real">
- </return>
- <description>
- </description>
- </method>
- <method name="get_default_volume_db" qualifiers="const" >
- <return type="real">
- </return>
- <description>
- </description>
- </method>
- <method name="get_default_pan" qualifiers="const" >
- <return type="real">
- </return>
- <description>
- </description>
- </method>
- <method name="get_default_pan_depth" qualifiers="const" >
- <return type="real">
- </return>
- <description>
- </description>
- </method>
- <method name="get_default_pan_height" qualifiers="const" >
- <return type="real">
- </return>
- <description>
- </description>
- </method>
- <method name="get_default_filter_type" qualifiers="const" >
- <return type="int">
- </return>
- <description>
- </description>
- </method>
- <method name="get_default_filter_cutoff" qualifiers="const" >
- <return type="real">
- </return>
- <description>
- </description>
- </method>
- <method name="get_default_filter_resonance" qualifiers="const" >
- <return type="real">
- </return>
- <description>
- </description>
- </method>
- <method name="get_default_filter_gain" qualifiers="const" >
- <return type="real">
- </return>
- <description>
- </description>
- </method>
- <method name="get_default_chorus" qualifiers="const" >
- <return type="real">
- </return>
- <description>
- </description>
- </method>
- <method name="get_default_reverb_room" qualifiers="const" >
- <return type="real">
- </return>
- <description>
- </description>
- </method>
- <method name="get_default_reverb" qualifiers="const" >
- <return type="real">
- </return>
- <description>
- </description>
- </method>
- </methods>
- <constants>
- <constant name="FILTER_HIPASS" value="3">
- HighPass filter is used for voice.
- </constant>
- <constant name="FILTER_NONE" value="0">
- Filter is disabled for voice.
- </constant>
- <constant name="REVERB_HALL" value="3">
- Huge reverb room (cathedral, warehouse).
- </constant>
- <constant name="REVERB_MEDIUM" value="1">
- Medium reverb room (street)
- </constant>
- <constant name="REVERB_SMALL" value="0">
- Small reverb room (house room).
- </constant>
- <constant name="FILTER_HIGH_SHELF" value="8">
- </constant>
- <constant name="FILTER_PEAK" value="5">
- </constant>
- <constant name="FILTER_LOWPASS" value="1">
- Lowpass filter is used for voice.
- </constant>
- <constant name="REVERB_LARGE" value="2">
- Large reverb room (Theather)
- </constant>
- <constant name="FILTER_LOW_SHELF" value="7">
- </constant>
- <constant name="FILTER_BANDLIMIT" value="6">
- Band-Limit filter is used for voice, in this case resonance is the highpass cutoff.
- </constant>
- <constant name="FILTER_NOTCH" value="4">
- Notch filter is used for voice.
- </constant>
- <constant name="FILTER_BANDPASS" value="2">
- Bandpass filter is used for voice.
- </constant>
- </constants>
-</class>
-<class name="ScenarioFX" inherits="Node" category="Nodes">
- <brief_description>
- </brief_description>
- <description>
- Deprecated, will go away.
- </description>
- <methods>
- </methods>
- <constants>
- </constants>
-</class>
-<class name="SceneMainLoop" inherits="MainLoop" category="Main Loop">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- <method name="set_editor_hint" >
- <argument index="0" name="enable" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="is_editor_hint" qualifiers="const" >
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="set_pause" >
- <argument index="0" name="enable" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="is_paused" qualifiers="const" >
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="quit" >
- <description>
- </description>
- </method>
- </methods>
- <signals>
- <signal name="screen_resized">
- <description>
- </description>
- </signal>
- <signal name="node_removed">
- <argument index="0" name="node" type="Object">
- </argument>
- <description>
- </description>
- </signal>
- <signal name="tree_changed">
- <description>
- </description>
- </signal>
- </signals>
- <constants>
- </constants>
-</class>
-<class name="Script" inherits="Resource" category="Core">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- </methods>
- <constants>
- </constants>
-</class>
-<class name="ScrollBar" inherits="Range" category="Core">
- <brief_description>
- Base class for scroll bars.
- </brief_description>
- <description>
- Scrollbars are a [Range] based [Control], that display a draggable area (the size of the page). Horizontal ([HScrollBar]) and Vertical ([VScrollBar]) versions are available.
- </description>
- <methods>
- </methods>
- <constants>
- </constants>
-</class>
-<class name="Separator" inherits="Control" category="Nodes/GUI Nodes">
- <brief_description>
- Base class for separators.
- </brief_description>
- <description>
- Separator is a [Control] used for sepataring other controls. It&apos;s purely a visual decoration. Horizontal ([HSeparator]) and Vertical ([VSeparator]) versions are available.
- </description>
- <methods>
- </methods>
- <constants>
- </constants>
-</class>
-<class name="Shader" inherits="Resource" category="Resources">
- <brief_description>
- To be changed, ignore.
- </brief_description>
- <description>
- To be changed, ignore.
- </description>
- <methods>
- <method name="set_mode" >
- <argument index="0" name="mode" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_mode" qualifiers="const" >
- <return type="int">
- </return>
- <description>
- </description>
- </method>
- <method name="set_vertex_code" >
- <argument index="0" name="code" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_vertex_code" qualifiers="const" >
- <return type="String">
- </return>
- <description>
- </description>
- </method>
- <method name="set_fragment_code" >
- <argument index="0" name="code" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_fragment_code" qualifiers="const" >
- <return type="String">
- </return>
- <description>
- </description>
- </method>
- <method name="set_use_world_transform" >
- <argument index="0" name="enable" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="is_using_world_transform" qualifiers="const" >
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="set_param" >
- <argument index="0" name="param" type="String">
- </argument>
- <argument index="1" name="value" type="var">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_param" qualifiers="const" >
- <argument index="0" name="param" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_param_list" qualifiers="const" >
- <return type="StringArray">
- </return>
- <description>
- </description>
- </method>
- </methods>
- <constants>
- <constant name="MODE_MATERIAL" value="0">
- </constant>
- <constant name="MODE_POST_PROCESS" value="1">
- </constant>
- </constants>
-</class>
-<class name="ShaderMaterial" inherits="Material" category="Resources">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- <method name="set_shader" >
- <argument index="0" name="shader" type="Object">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_shader" qualifiers="const" >
- <return type="Object">
- </return>
- <description>
- </description>
- </method>
- </methods>
- <constants>
- </constants>
-</class>
-<class name="Shape" inherits="Resource" category="Core">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- </methods>
- <constants>
- </constants>
-</class>
-<class name="Skeleton" inherits="Spatial" category="Nodes/3D">
- <brief_description>
- Skeleton for characters and animated objects.
- </brief_description>
- <description>
- Skeleton provides a hierachial interface for managing bones, including pose, rest and animation (see [Animation]). Skeleton will support rag doll dynamics in the future.
- </description>
- <methods>
- <method name="add_bone" >
- <argument index="0" name="name" type="String">
- </argument>
- <description>
- Add a bone, with name &quot;name&quot;. [method get_bone_count] will become the bone index.
- </description>
- </method>
- <method name="find_bone" qualifiers="const" >
- <return type="int">
- </return>
- <argument index="0" name="name" type="String">
- </argument>
- <description>
- Return the bone index that matches &quot;name&quot; as its name.
- </description>
- </method>
- <method name="get_bone_name" qualifiers="const" >
- <return type="String">
- </return>
- <argument index="0" name="bone_idx" type="int">
- </argument>
- <description>
- Return the name of the bone at index &quot;index&quot;
- </description>
- </method>
- <method name="get_bone_parent" qualifiers="const" >
- <return type="int">
- </return>
- <argument index="0" name="bone_idx" type="int">
- </argument>
- <description>
- Return the bone index which is the parent of the bone at &quot;bone_idx&quot;. If -1, then bone has no parent. Note that the parent bone returned will always be less than &quot;bone_idx&quot;.
- </description>
- </method>
- <method name="set_bone_parent" >
- <argument index="0" name="bone_idx" type="int">
- </argument>
- <argument index="1" name="parent_idx" type="int">
- </argument>
- <description>
- Set the bone index &quot;parent_idx&quot; as the parent of the bone at &quot;bone_idx&quot;. If -1, then bone has no parent. Note: &quot;parent_idx&quot; must be less than &quot;bone_idx&quot;.
- </description>
- </method>
- <method name="get_bone_count" qualifiers="const" >
- <return type="int">
- </return>
- <description>
- Return the amount of bones in the skeleton.
- </description>
- </method>
- <method name="get_bone_rest" qualifiers="const" >
- <return type="Transform">
- </return>
- <argument index="0" name="bone_idx" type="int">
- </argument>
- <description>
- Return the rest transform for a bone &quot;bone_idx&quot;.
- </description>
- </method>
- <method name="set_bone_rest" >
- <argument index="0" name="bone_idx" type="int">
- </argument>
- <argument index="1" name="rest" type="Transform">
- </argument>
- <description>
- Set the rest transform for bone &quot;bone_idx&quot;
- </description>
- </method>
- <method name="bind_child_node_to_bone" >
- <argument index="0" name="bone_idx" type="int">
- </argument>
- <argument index="1" name="node" type="Object">
- </argument>
- <description>
- Deprecated soon
- </description>
- </method>
- <method name="unbind_child_node_from_bone" >
- <argument index="0" name="bone_idx" type="int">
- </argument>
- <argument index="1" name="node" type="Object">
- </argument>
- <description>
- Deprecated soon
- </description>
- </method>
- <method name="get_bound_child_nodes_to_bone" qualifiers="const" >
- <return type="Array">
- </return>
- <argument index="0" name="bone_idx" type="int">
- </argument>
- <description>
- Deprecated Soon
- </description>
- </method>
- <method name="clear_bones" >
- <description>
- Clear all the bones in this skeleton.
- </description>
- </method>
- <method name="get_bone_pose" qualifiers="const" >
- <return type="Transform">
- </return>
- <argument index="0" name="bone_idx" type="int">
- </argument>
- <description>
- Return the pose transform for bone &quot;bone_idx&quot;.
- </description>
- </method>
- <method name="set_bone_pose" >
- <argument index="0" name="bone_idx" type="int">
- </argument>
- <argument index="1" name="pose" type="Transform">
- </argument>
- <description>
- Return the pose transform for bone &quot;bone_idx&quot;.
- </description>
- </method>
- <method name="get_bone_custom_pose" qualifiers="const" >
- <return type="Transform">
- </return>
- <argument index="0" name="bone_idx" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_bone_custom_pose" >
- <argument index="0" name="bone_idx" type="int">
- </argument>
- <argument index="1" name="custom_pose" type="Transform">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_bone_transform" qualifiers="const" >
- <return type="Transform">
- </return>
- <argument index="0" name="bone_idx" type="int">
- </argument>
- <description>
- </description>
- </method>
- </methods>
- <constants>
- <constant name="NOTIFICATION_UPDATE_SKELETON" value="50">
- </constant>
- </constants>
-</class>
-<class name="SkyBoxFX" inherits="ScenarioFX" category="Nodes">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- </methods>
- <constants>
- </constants>
-</class>
-<class name="Slider" inherits="Range" category="Core">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- </methods>
- <constants>
- </constants>
-</class>
-<class name="SoundRoomParams" inherits="Node" category="Nodes">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- <method name="set_param" >
- <argument index="0" name="param" type="int">
- </argument>
- <argument index="1" name="value" type="real">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_param" qualifiers="const" >
- <return type="real">
- </return>
- <argument index="0" name="param" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_reverb_mode" >
- <argument index="0" name="reverb_mode" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_reverb_mode" qualifiers="const" >
- <return type="int">
- </return>
- <description>
- </description>
- </method>
- <method name="set_force_params_to_all_sources" >
- <argument index="0" name="enabled" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="is_forcing_params_to_all_sources" >
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- </methods>
- <constants>
- </constants>
-</class>
-<class name="Spatial" inherits="Node" category="Nodes/3D">
- <brief_description>
- Base class for all 3D nodes.
- </brief_description>
- <description>
- 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.
- </description>
- <methods>
- <method name="set_transform" >
- <argument index="0" name="local" type="Transform">
- </argument>
- <description>
- Set the transform locally, relative to the parent spatial node.
- </description>
- </method>
- <method name="get_transform" qualifiers="const" >
- <return type="Transform">
- </return>
- <description>
- Return the local transform, relative to the bone parent.
- </description>
- </method>
- <method name="set_global_transform" >
- <argument index="0" name="global" type="Transform">
- </argument>
- <description>
- Set the transform globally, relative to worldspace.
- </description>
- </method>
- <method name="get_global_transform" qualifiers="const" >
- <return type="Transform">
- </return>
- <description>
- Return the gloal transform, relative to worldspace.
- </description>
- </method>
- <method name="get_parent_spatial" qualifiers="const" >
- <return type="Object">
- </return>
- <description>
- Return the parent [Spatial], or an empty [Object] if no parent exists or parent is not of type [Spatial.
- </description>
- </method>
- <method name="update_gizmo" >
- <description>
- </description>
- </method>
- </methods>
- <constants>
- <constant name="NOTIFICATION_SCENARIO_CHANGED" value="41">
- Spatial nodes receive this notification when the viewport next to it in ascending hierarchy changed the [Scenario].
- </constant>
- <constant name="NOTIFICATION_TRANSFORM_CHANGED" value="40">
- Spatial nodes receive this notifacation with their global transform changes. This means that either the current or a parent node changed it&apos;s transform.
- </constant>
- </constants>
-</class>
-<class name="SpatialPlayer" inherits="Spatial" category="Core">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- </methods>
- <constants>
- </constants>
-</class>
-<class name="SpatialSamplePlayer" inherits="SpatialPlayer" category="Nodes/3D">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- <method name="set_sample_library" >
- <argument index="0" name="library" type="Object">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_sample_library" qualifiers="const" >
- <return type="Object">
- </return>
- <description>
- </description>
- </method>
- <method name="set_polyphony" >
- <argument index="0" name="voices" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_polyphony" qualifiers="const" >
- <return type="int">
- </return>
- <description>
- </description>
- </method>
- <method name="play" >
- <return type="int">
- </return>
- <argument index="0" name="sample" type="String">
- </argument>
- <argument index="1" name="voice" type="int" default="-2">
- </argument>
- <description>
- </description>
- </method>
- <method name="voice_set_pitch_scale" >
- <argument index="0" name="voice" type="int">
- </argument>
- <argument index="1" name="ratio" type="real">
- </argument>
- <description>
- </description>
- </method>
- <method name="voice_set_volume_scale_db" >
- <argument index="0" name="voice" type="int">
- </argument>
- <argument index="1" name="db" type="real">
- </argument>
- <description>
- </description>
- </method>
- <method name="is_voice_active" qualifiers="const" >
- <return type="bool">
- </return>
- <argument index="0" name="voice" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="stop_voice" >
- <argument index="0" name="voice" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="stop_all" >
- <description>
- </description>
- </method>
- </methods>
- <constants>
- <constant name="NEXT_VOICE" value="-2">
- </constant>
- <constant name="INVALID_VOICE" value="-1">
- </constant>
- </constants>
-</class>
-<class name="SpatialSoundServer" inherits="Object" category="Core">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- </methods>
- <constants>
- </constants>
-</class>
-<class name="SpatialSoundServerSW" inherits="SpatialSoundServer" category="Core">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- </methods>
- <constants>
- </constants>
-</class>
-<class name="SpatialStreamPlayer" inherits="SpatialPlayer" category="Nodes/3D">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- <method name="set_stream" >
- <argument index="0" name="stream" type="Object">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_stream" qualifiers="const" >
- <return type="Object">
- </return>
- <description>
- </description>
- </method>
- <method name="play" >
- <description>
- </description>
- </method>
- <method name="stop" >
- <description>
- </description>
- </method>
- <method name="is_playing" qualifiers="const" >
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="set_loop" >
- <argument index="0" name="enabled" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="has_loop" qualifiers="const" >
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="get_stream_name" qualifiers="const" >
- <return type="String">
- </return>
- <description>
- </description>
- </method>
- <method name="get_loop_count" qualifiers="const" >
- <return type="int">
- </return>
- <description>
- </description>
- </method>
- <method name="get_pos" qualifiers="const" >
- <return type="real">
- </return>
- <description>
- </description>
- </method>
- <method name="seek_pos" >
- <argument index="0" name="time" type="real">
- </argument>
- <description>
- </description>
- </method>
- </methods>
- <constants>
- </constants>
-</class>
-<class name="SphereShape" inherits="Shape" category="Resources">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- <method name="set_radius" >
- <argument index="0" name="radius" type="real">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_radius" qualifiers="const" >
- <return type="real">
- </return>
- <description>
- </description>
- </method>
- </methods>
- <constants>
- </constants>
-</class>
-<class name="SpinBox" inherits="Range" category="Nodes/GUI Nodes">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- <method name="set_suffix" >
- <argument index="0" name="suffix" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_suffix" qualifiers="const" >
- <return type="String">
- </return>
- <description>
- </description>
- </method>
- <method name="set_prefix" >
- <argument index="0" name="prefix" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_prefix" qualifiers="const" >
- <return type="String">
- </return>
- <description>
- </description>
- </method>
- <method name="set_editable" >
- <argument index="0" name="editable" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="is_editable" qualifiers="const" >
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- </methods>
- <constants>
- </constants>
-</class>
-<class name="SpotLight" inherits="Light" category="Nodes/3D/3D Visual Nodes/3D Light Nodes">
- <brief_description>
- Spotlight Light, such as a reflector spotlight or a latern.
- </brief_description>
- <description>
- 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.
- </description>
- <methods>
- </methods>
- <constants>
- </constants>
-</class>
-<class name="Sprite" inherits="Node2D" category="Nodes">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- <method name="set_texture" >
- <argument index="0" name="texture" type="Object">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_texture" qualifiers="const" >
- <return type="Object">
- </return>
- <description>
- </description>
- </method>
- <method name="set_centered" >
- <argument index="0" name="centered" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="is_centered" qualifiers="const" >
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="set_flip_h" >
- <argument index="0" name="flip_h" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="is_flipped_h" qualifiers="const" >
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="set_flip_v" >
- <argument index="0" name="flip_v" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="is_flipped_v" qualifiers="const" >
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="set_frame" >
- <argument index="0" name="frame" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_frame" qualifiers="const" >
- <return type="int">
- </return>
- <description>
- </description>
- </method>
- <method name="set_vframes" >
- <argument index="0" name="vframes" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_vframes" qualifiers="const" >
- <return type="int">
- </return>
- <description>
- </description>
- </method>
- <method name="set_hframes" >
- <argument index="0" name="hframes" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_hframes" qualifiers="const" >
- <return type="int">
- </return>
- <description>
- </description>
- </method>
- <method name="set_modulate" >
- <argument index="0" name="modulate" type="Color">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_modulate" qualifiers="const" >
- <return type="Color">
- </return>
- <description>
- </description>
- </method>
- </methods>
- <constants>
- </constants>
-</class>
-<class name="SquirrelScript" inherits="Script" category="Resources">
- <brief_description>
- Squirrel script language support.
- </brief_description>
- <description>
- [html a href=&quot;http://squirrel-lang.org/&quot;]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.
- </description>
- <methods>
- </methods>
- <constants>
- </constants>
-</class>
-<class name="StaticBody" inherits="PhysicsBody" category="Nodes/3D">
- <brief_description>
- PhysicsBody for static collision objects.
- </brief_description>
- <description>
- 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].
- </description>
- <methods>
- <method name="set_simulated_motion" >
- <argument index="0" name="enabled" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="is_simulating_motion" qualifiers="const" >
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="simulate_motion" >
- <argument index="0" name="new_transform" type="Transform">
- </argument>
- <description>
- </description>
- </method>
- <method name="create_shapes_from_child_meshes" >
- <description>
- </description>
- </method>
- </methods>
- <constants>
- </constants>
-</class>
-<class name="StreamPeer" inherits="Object" category="Networking">
- <brief_description>
- Abstraction and base class for stream-based protocols.
- </brief_description>
- <description>
- 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.
- </description>
- <methods>
- <method name="put_data" >
- <return type="int">
- </return>
- <argument index="0" name="data" type="RawArray">
- </argument>
- <description>
- Send a chunk of data through the connection, blocking if necesary until the data is done sending. This function returns an [Error] code.
- </description>
- </method>
- <method name="put_partial_data" >
- <return type="Array">
- </return>
- <argument index="0" name="data" type="RawArray">
- </argument>
- <description>
- 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.
- </description>
- </method>
- <method name="get_data" >
- <return type="Array">
- </return>
- <argument index="0" name="bytes" type="int">
- </argument>
- <description>
- Return a chunk data with the received bytes. The amount of bytes to be received can be requested in the &quot;bytes&quot; 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.
- </description>
- </method>
- <method name="get_partial_data" >
- <return type="Array">
- </return>
- <argument index="0" name="bytes" type="int">
- </argument>
- <description>
- Return a chunk data with the received bytes. The amount of bytes to be received can be requested in the &quot;bytes&quot; 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.
- </description>
- </method>
- </methods>
- <constants>
- </constants>
-</class>
-<class name="StreamPeerTCP" inherits="StreamPeer" category="Networking/Networking">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- <method name="connect" >
- <return type="int">
- </return>
- <argument index="0" name="host" type="String">
- </argument>
- <argument index="1" name="ip" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="is_connected" qualifiers="const" >
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="get_connected_host" qualifiers="const" >
- <return type="String">
- </return>
- <description>
- </description>
- </method>
- <method name="get_connected_port" qualifiers="const" >
- <return type="int">
- </return>
- <description>
- </description>
- </method>
- <method name="disconnect" >
- <description>
- </description>
- </method>
- </methods>
- <constants>
- </constants>
-</class>
-<class name="StreamPlayer" inherits="Node" category="Nodes">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- <method name="set_stream" >
- <argument index="0" name="stream" type="Object">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_stream" qualifiers="const" >
- <return type="Object">
- </return>
- <description>
- </description>
- </method>
- <method name="play" >
- <description>
- </description>
- </method>
- <method name="stop" >
- <description>
- </description>
- </method>
- <method name="is_playing" qualifiers="const" >
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="set_loop" >
- <argument index="0" name="enabled" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="has_loop" qualifiers="const" >
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="set_volume" >
- <argument index="0" name="volume" type="real">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_volume" qualifiers="const" >
- <return type="real">
- </return>
- <description>
- </description>
- </method>
- <method name="set_volume_db" >
- <argument index="0" name="db" type="real">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_volume_db" qualifiers="const" >
- <return type="real">
- </return>
- <description>
- </description>
- </method>
- <method name="get_stream_name" qualifiers="const" >
- <return type="String">
- </return>
- <description>
- </description>
- </method>
- <method name="get_loop_count" qualifiers="const" >
- <return type="int">
- </return>
- <description>
- </description>
- </method>
- <method name="get_pos" qualifiers="const" >
- <return type="real">
- </return>
- <description>
- </description>
- </method>
- <method name="seek_pos" >
- <argument index="0" name="time" type="real">
- </argument>
- <description>
- </description>
- </method>
- </methods>
- <constants>
- </constants>
-</class>
-<class name="StyleBox" inherits="Resource" category="Core">
- <brief_description>
- Base class for dawing stylized boxes for the UI.
- </brief_description>
- <description>
- 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.
- </description>
- <methods>
- <method name="test_mask" qualifiers="const" >
- <return type="bool">
- </return>
- <argument index="0" name="point" type="Vector2">
- </argument>
- <argument index="1" name="rect" type="Rect2">
- </argument>
- <description>
- Test a position in a rectangle, return wether it pases the mask test.
- </description>
- </method>
- <method name="set_default_margin" >
- <argument index="0" name="margin" type="int">
- </argument>
- <argument index="1" name="offset" type="real">
- </argument>
- <description>
- Set the default offset &quot;offset&quot; of the margin &quot;margin&quot; (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.
- </description>
- </method>
- <method name="get_default_margin" qualifiers="const" >
- <return type="real">
- </return>
- <argument index="0" name="margin" type="int">
- </argument>
- <description>
- Return the default offset of the margin &quot;margin&quot; (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.
- </description>
- </method>
- <method name="get_margin" qualifiers="const" >
- <return type="real">
- </return>
- <argument index="0" name="margin" type="int">
- </argument>
- <description>
- Return the offset of margin &quot;margin&quot; (see MARGIN_* enum).
- </description>
- </method>
- <method name="get_minimum_size" qualifiers="const" >
- <return type="Vector2">
- </return>
- <description>
- Return the minimum size that this stylebox can be shrunk to.
- </description>
- </method>
- <method name="get_offset" qualifiers="const" >
- <return type="Vector2">
- </return>
- <description>
- Return the &quot;offset&quot; of a stylebox, this is a helper function, like writing Point2( style.get_margin(MARGIN_LEFT), style.get_margin(MARGIN_TOP) )
- </description>
- </method>
- </methods>
- <constants>
- </constants>
-</class>
-<class name="StyleBoxEmpty" inherits="StyleBox" category="Resources">
- <brief_description>
- Empty stylebox (does not display anything).
- </brief_description>
- <description>
- Empty stylebox (really does not display anything).
- </description>
- <methods>
- </methods>
- <constants>
- </constants>
-</class>
-<class name="StyleBoxFlat" inherits="StyleBox" category="Resources">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- <method name="set_bg_color" >
- <argument index="0" name="color" type="Color">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_bg_color" qualifiers="const" >
- <return type="Color">
- </return>
- <description>
- </description>
- </method>
- <method name="set_light_color" >
- <argument index="0" name="color" type="Color">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_light_color" qualifiers="const" >
- <return type="Color">
- </return>
- <description>
- </description>
- </method>
- <method name="set_dark_color" >
- <argument index="0" name="color" type="Color">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_dark_color" qualifiers="const" >
- <return type="Color">
- </return>
- <description>
- </description>
- </method>
- <method name="set_border_size" >
- <argument index="0" name="size" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_border_size" qualifiers="const" >
- <return type="int">
- </return>
- <description>
- </description>
- </method>
- <method name="set_border_blend" >
- <argument index="0" name="blend" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_border_blend" qualifiers="const" >
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="set_draw_center" >
- <argument index="0" name="size" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_draw_center" qualifiers="const" >
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- </methods>
- <constants>
- </constants>
-</class>
-<class name="StyleBoxImageMask" inherits="StyleBox" category="Resources">
- <brief_description>
- Image mask based StyleBox, for mask test.
- </brief_description>
- <description>
- 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.
- </description>
- <methods>
- <method name="set_image" >
- <argument index="0" name="image" type="Image">
- </argument>
- <description>
- Set the image used for mask testing. Pixels (converted to grey) that have a value, less than 0.5 will fail the test.
- </description>
- </method>
- <method name="get_image" qualifiers="const" >
- <return type="Image">
- </return>
- <description>
- Return the image used for mask testing. (see [method set_imag]).
- </description>
- </method>
- <method name="set_expand" >
- <argument index="0" name="expand" type="bool">
- </argument>
- <description>
- 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.
- </description>
- </method>
- <method name="get_expand" qualifiers="const" >
- <return type="bool">
- </return>
- <description>
- 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.
- </description>
- </method>
- <method name="set_expand_margin_size" >
- <argument index="0" name="margin" type="int">
- </argument>
- <argument index="1" name="size" type="real">
- </argument>
- <description>
- 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.
- </description>
- </method>
- <method name="get_expand_margin_size" qualifiers="const" >
- <return type="real">
- </return>
- <argument index="0" name="arg0" type="int">
- </argument>
- <description>
- 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.
- </description>
- </method>
- </methods>
- <constants>
- </constants>
-</class>
-<class name="StyleBoxTexture" inherits="StyleBox" category="Resources">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- <method name="set_texture" >
- <argument index="0" name="texture" type="Object">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_texture" qualifiers="const" >
- <return type="Object">
- </return>
- <description>
- </description>
- </method>
- <method name="set_margin_size" >
- <argument index="0" name="margin" type="int">
- </argument>
- <argument index="1" name="size" type="real">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_margin_size" qualifiers="const" >
- <return type="real">
- </return>
- <argument index="0" name="arg0" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_expand_margin_size" >
- <argument index="0" name="margin" type="int">
- </argument>
- <argument index="1" name="size" type="real">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_expand_margin_size" qualifiers="const" >
- <return type="real">
- </return>
- <argument index="0" name="arg0" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_draw_center" >
- <argument index="0" name="enable" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_draw_center" qualifiers="const" >
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="get_center_size" qualifiers="const" >
- <return type="Vector2">
- </return>
- <description>
- </description>
- </method>
- <method name="draw" qualifiers="const" >
- <argument index="0" name="arg0" type="RID">
- </argument>
- <argument index="1" name="arg1" type="Rect2">
- </argument>
- <description>
- </description>
- </method>
- </methods>
- <constants>
- </constants>
-</class>
-<class name="SurfaceTool" inherits="Reference" category="Core">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- <method name="begin" >
- <argument index="0" name="primitive" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="add_vertex" >
- <argument index="0" name="vertex" type="Vector3">
- </argument>
- <description>
- </description>
- </method>
- <method name="add_color" >
- <argument index="0" name="color" type="Color">
- </argument>
- <description>
- </description>
- </method>
- <method name="add_normal" >
- <argument index="0" name="normal" type="Vector3">
- </argument>
- <description>
- </description>
- </method>
- <method name="add_tangent" >
- <argument index="0" name="tangent" type="Plane">
- </argument>
- <description>
- </description>
- </method>
- <method name="add_uv" >
- <argument index="0" name="uv" type="Vector3">
- </argument>
- <description>
- </description>
- </method>
- <method name="add_uv2" >
- <argument index="0" name="uv2" type="Vector3">
- </argument>
- <description>
- </description>
- </method>
- <method name="add_bones" >
- <argument index="0" name="bones" type="IntArray">
- </argument>
- <description>
- </description>
- </method>
- <method name="add_weights" >
- <argument index="0" name="weights" type="RealArray">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_material" >
- <argument index="0" name="material" type="Object">
- </argument>
- <description>
- </description>
- </method>
- <method name="index" >
- <description>
- </description>
- </method>
- <method name="deindex" >
- <description>
- </description>
- </method>
- <method name="generate_flat_normals" >
- <description>
- </description>
- </method>
- <method name="generate_smooth_normals" >
- <description>
- </description>
- </method>
- <method name="generate_tangents" >
- <description>
- </description>
- </method>
- <method name="commit" >
- <return type="Object">
- </return>
- <argument index="0" name="existing" type="Object" default="Object()">
- </argument>
- <description>
- </description>
- </method>
- <method name="clear" >
- <description>
- </description>
- </method>
- </methods>
- <constants>
- </constants>
-</class>
-<class name="TCP_Server" inherits="Object" category="Core">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- <method name="listen" >
- <return type="int">
- </return>
- <argument index="0" name="port" type="int">
- </argument>
- <argument index="1" name="accepted_hosts" type="StringArray" default="StringArray()">
- </argument>
- <description>
- </description>
- </method>
- <method name="is_connection_available" qualifiers="const" >
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="take_connection" >
- <return type="Object">
- </return>
- <description>
- </description>
- </method>
- <method name="stop" >
- <description>
- </description>
- </method>
- </methods>
- <constants>
- </constants>
-</class>
-<class name="TabContainer" inherits="Control" category="Nodes/GUI Nodes">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- <method name="get_tab_count" qualifiers="const" >
- <return type="int">
- </return>
- <description>
- </description>
- </method>
- <method name="set_current_tab" >
- <argument index="0" name="tab_idx" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_current_tab" qualifiers="const" >
- <return type="int">
- </return>
- <description>
- </description>
- </method>
- <method name="set_tab_align" >
- <argument index="0" name="align" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_tab_align" qualifiers="const" >
- <return type="int">
- </return>
- <description>
- </description>
- </method>
- <method name="set_tabs_visible" >
- <argument index="0" name="visible" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="are_tabs_visible" qualifiers="const" >
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="set_tab_title" >
- <argument index="0" name="tab_idx" type="int">
- </argument>
- <argument index="1" name="title" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_tab_title" qualifiers="const" >
- <return type="String">
- </return>
- <argument index="0" name="tab_idx" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_tab_icon" >
- <argument index="0" name="tab_idx" type="int">
- </argument>
- <argument index="1" name="icon" type="Object">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_tab_icon" qualifiers="const" >
- <return type="Object">
- </return>
- <argument index="0" name="tab_idx" type="int">
- </argument>
- <description>
- </description>
- </method>
- </methods>
- <signals>
- <signal name="tab_changed">
- <argument index="0" name="tab" type="int">
- </argument>
- <description>
- </description>
- </signal>
- </signals>
- <constants>
- </constants>
-</class>
-<class name="TestCube" inherits="VisualInstance" category="Nodes/3D/3D Visual Nodes">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- </methods>
- <constants>
- </constants>
-</class>
-<class name="TextEdit" inherits="Control" category="Nodes/GUI Nodes">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- <method name="set_text" >
- <argument index="0" name="text" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="insert_text_at_cursor" >
- <argument index="0" name="text" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_line_count" qualifiers="const" >
- <return type="int">
- </return>
- <description>
- </description>
- </method>
- <method name="get_text" >
- <return type="String">
- </return>
- <description>
- </description>
- </method>
- <method name="get_line" >
- <return type="String">
- </return>
- <argument index="0" name="arg0" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="cursor_set_column" >
- <argument index="0" name="column" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="cursor_set_line" >
- <argument index="0" name="line" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="cursor_get_column" qualifiers="const" >
- <return type="int">
- </return>
- <description>
- </description>
- </method>
- <method name="cursor_get_line" qualifiers="const" >
- <return type="int">
- </return>
- <description>
- </description>
- </method>
- <method name="set_readonly" >
- <argument index="0" name="enable" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_wrap" >
- <argument index="0" name="enable" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_max_chars" >
- <argument index="0" name="amount" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="cut" >
- <description>
- </description>
- </method>
- <method name="copy" >
- <description>
- </description>
- </method>
- <method name="paste" >
- <description>
- </description>
- </method>
- <method name="select_all" >
- <description>
- </description>
- </method>
- <method name="select" >
- <argument index="0" name="from_line" type="int">
- </argument>
- <argument index="1" name="from_column" type="int">
- </argument>
- <argument index="2" name="to_line" type="int">
- </argument>
- <argument index="3" name="to_column" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="is_selection_active" qualifiers="const" >
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="get_selection_from_line" qualifiers="const" >
- <return type="int">
- </return>
- <description>
- </description>
- </method>
- <method name="get_selection_from_column" qualifiers="const" >
- <return type="int">
- </return>
- <description>
- </description>
- </method>
- <method name="get_selection_to_line" qualifiers="const" >
- <return type="int">
- </return>
- <description>
- </description>
- </method>
- <method name="get_selection_to_column" qualifiers="const" >
- <return type="int">
- </return>
- <description>
- </description>
- </method>
- <method name="get_selection_text" qualifiers="const" >
- <return type="String">
- </return>
- <description>
- </description>
- </method>
- <method name="search" qualifiers="const" >
- <return type="IntArray">
- </return>
- <argument index="0" name="flags" type="String">
- </argument>
- <argument index="1" name="from_line" type="int">
- </argument>
- <argument index="2" name="from_column" type="int">
- </argument>
- <argument index="3" name="to_line" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="undo" >
- <description>
- </description>
- </method>
- <method name="redo" >
- <description>
- </description>
- </method>
- <method name="clear_undo_history" >
- <description>
- </description>
- </method>
- <method name="set_syntax_coloring" >
- <argument index="0" name="enable" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="is_syntax_coloring_enabled" qualifiers="const" >
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="add_keyword_color" >
- <argument index="0" name="keyword" type="String">
- </argument>
- <argument index="1" name="color" type="Color">
- </argument>
- <description>
- </description>
- </method>
- <method name="add_color_region" >
- <argument index="0" name="begin_key" type="String">
- </argument>
- <argument index="1" name="end_key" type="String">
- </argument>
- <argument index="2" name="color" type="Color">
- </argument>
- <argument index="3" name="line_only" type="bool" default="false">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_symbol_color" >
- <argument index="0" name="color" type="Color">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_custom_bg_color" >
- <argument index="0" name="color" type="Color">
- </argument>
- <description>
- </description>
- </method>
- <method name="clear_colors" >
- <description>
- </description>
- </method>
- </methods>
- <signals>
- <signal name="text_changed">
- <description>
- </description>
- </signal>
- <signal name="cursor_changed">
- <description>
- </description>
- </signal>
- </signals>
- <constants>
- <constant name="SEARCH_MATCH_CASE" value="1">
- </constant>
- <constant name="SEARCH_BACKWARDS" value="4">
- </constant>
- <constant name="SEARCH_WHOLE_WORDS" value="2">
- </constant>
- </constants>
-</class>
-<class name="Texture" inherits="Resource" category="Resources">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- <method name="create" >
- <argument index="0" name="width" type="int">
- </argument>
- <argument index="1" name="height" type="int">
- </argument>
- <argument index="2" name="format" type="int">
- </argument>
- <argument index="3" name="flags" type="int" default="7">
- </argument>
- <description>
- </description>
- </method>
- <method name="create_from_image" >
- <argument index="0" name="image" type="Image">
- </argument>
- <argument index="1" name="flags" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_flags" >
- <argument index="0" name="flags" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_flags" qualifiers="const" >
- <return type="int">
- </return>
- <description>
- </description>
- </method>
- <method name="get_format" qualifiers="const" >
- <return type="int">
- </return>
- <description>
- </description>
- </method>
- <method name="load" >
- <argument index="0" name="path" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="blit_rect" >
- <argument index="0" name="x" type="int">
- </argument>
- <argument index="1" name="y" type="int">
- </argument>
- <argument index="2" name="image" type="Image">
- </argument>
- <argument index="3" name="cube_side" type="int" default="0">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_rect" qualifiers="const" >
- <return type="Image">
- </return>
- <argument index="0" name="x" type="int">
- </argument>
- <argument index="1" name="y" type="int">
- </argument>
- <argument index="2" name="width" type="int">
- </argument>
- <argument index="3" name="height" type="int">
- </argument>
- <argument index="4" name="cube_side" type="int" default="0">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_width" qualifiers="const" >
- <return type="int">
- </return>
- <description>
- </description>
- </method>
- <method name="get_height" qualifiers="const" >
- <return type="int">
- </return>
- <description>
- </description>
- </method>
- <method name="get_size" qualifiers="const" >
- <return type="Vector2">
- </return>
- <description>
- </description>
- </method>
- <method name="get_rid" qualifiers="const" >
- <return type="RID">
- </return>
- <description>
- </description>
- </method>
- <method name="has_alpha" qualifiers="const" >
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="draw" qualifiers="const" >
- <argument index="0" name="canvas_item" type="RID">
- </argument>
- <argument index="1" name="pos" type="Vector2">
- </argument>
- <argument index="2" name="modulate" type="Color" default="Color(1,1,1,1)">
- </argument>
- <description>
- </description>
- </method>
- </methods>
- <constants>
- <constant name="CUBEMAP_BACK" value="5">
- </constant>
- <constant name="CUBEMAP_FRONT" value="4">
- </constant>
- <constant name="FLAG_CUBEMAP" value="8">
- </constant>
- <constant name="CUBEMAP_TOP" value="3">
- </constant>
- <constant name="CUBEMAP_LEFT" value="0">
- </constant>
- <constant name="FLAG_FILTER" value="4">
- </constant>
- <constant name="FLAG_MIPMAPS" value="1">
- </constant>
- <constant name="CUBEMAP_BOTTOM" value="2">
- </constant>
- <constant name="FLAGS_DEFAULT" value="7">
- </constant>
- <constant name="CUBEMAP_RIGHT" value="1">
- </constant>
- <constant name="FLAG_REPEAT" value="2">
- </constant>
- </constants>
-</class>
-<class name="TextureButton" inherits="BaseButton" category="Nodes/GUI Nodes">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- <method name="set_normal_texture" >
- <argument index="0" name="texture" type="Object">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_pressed_texture" >
- <argument index="0" name="texture" type="Object">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_hover_texture" >
- <argument index="0" name="texture" type="Object">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_disabled_texture" >
- <argument index="0" name="texture" type="Object">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_focused_texture" >
- <argument index="0" name="texture" type="Object">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_click_mask" >
- <argument index="0" name="texture" type="Image">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_normal_texture" qualifiers="const" >
- <return type="Object">
- </return>
- <description>
- </description>
- </method>
- <method name="get_pressed_texture" qualifiers="const" >
- <return type="Object">
- </return>
- <description>
- </description>
- </method>
- <method name="get_hover_texture" qualifiers="const" >
- <return type="Object">
- </return>
- <description>
- </description>
- </method>
- <method name="get_disabled_texture" qualifiers="const" >
- <return type="Object">
- </return>
- <description>
- </description>
- </method>
- <method name="get_focused_texture" qualifiers="const" >
- <return type="Object">
- </return>
- <description>
- </description>
- </method>
- <method name="get_click_mask" qualifiers="const" >
- <return type="Image">
- </return>
- <description>
- </description>
- </method>
- </methods>
- <constants>
- </constants>
-</class>
-<class name="TextureFrame" inherits="Control" category="Nodes/GUI Nodes">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- <method name="set_texture" >
- <argument index="0" name="texture" type="Object">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_texture" qualifiers="const" >
- <return type="Object">
- </return>
- <description>
- </description>
- </method>
- <method name="set_expand" >
- <argument index="0" name="enable" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="has_expand" qualifiers="const" >
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- </methods>
- <constants>
- </constants>
-</class>
-<class name="Theme" inherits="Resource" category="Resources">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- <method name="set_icon" >
- <argument index="0" name="name" type="String">
- </argument>
- <argument index="1" name="type" type="String">
- </argument>
- <argument index="2" name="texture" type="Object">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_icon" qualifiers="const" >
- <return type="Object">
- </return>
- <argument index="0" name="name" type="String">
- </argument>
- <argument index="1" name="type" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="has_icon" qualifiers="const" >
- <return type="bool">
- </return>
- <argument index="0" name="name" type="String">
- </argument>
- <argument index="1" name="type" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="clear_icon" >
- <argument index="0" name="name" type="String">
- </argument>
- <argument index="1" name="type" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_icon_list" qualifiers="const" >
- <return type="StringArray">
- </return>
- <argument index="0" name="arg0" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_stylebox" >
- <argument index="0" name="name" type="String">
- </argument>
- <argument index="1" name="type" type="String">
- </argument>
- <argument index="2" name="texture" type="Object">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_stylebox" qualifiers="const" >
- <return type="Object">
- </return>
- <argument index="0" name="name" type="String">
- </argument>
- <argument index="1" name="type" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="has_stylebox" qualifiers="const" >
- <return type="bool">
- </return>
- <argument index="0" name="name" type="String">
- </argument>
- <argument index="1" name="type" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="clear_stylebox" >
- <argument index="0" name="name" type="String">
- </argument>
- <argument index="1" name="type" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_stylebox_list" qualifiers="const" >
- <return type="StringArray">
- </return>
- <argument index="0" name="arg0" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_font" >
- <argument index="0" name="name" type="String">
- </argument>
- <argument index="1" name="type" type="String">
- </argument>
- <argument index="2" name="font" type="Object">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_font" qualifiers="const" >
- <return type="Object">
- </return>
- <argument index="0" name="name" type="String">
- </argument>
- <argument index="1" name="type" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="has_font" qualifiers="const" >
- <return type="bool">
- </return>
- <argument index="0" name="name" type="String">
- </argument>
- <argument index="1" name="type" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="clear_font" >
- <argument index="0" name="name" type="String">
- </argument>
- <argument index="1" name="type" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_font_list" qualifiers="const" >
- <return type="StringArray">
- </return>
- <argument index="0" name="arg0" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_color" >
- <argument index="0" name="name" type="String">
- </argument>
- <argument index="1" name="type" type="String">
- </argument>
- <argument index="2" name="color" type="Color">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_color" qualifiers="const" >
- <return type="Color">
- </return>
- <argument index="0" name="name" type="String">
- </argument>
- <argument index="1" name="type" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="has_color" qualifiers="const" >
- <return type="bool">
- </return>
- <argument index="0" name="name" type="String">
- </argument>
- <argument index="1" name="type" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="clear_color" >
- <argument index="0" name="name" type="String">
- </argument>
- <argument index="1" name="type" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_color_list" qualifiers="const" >
- <return type="StringArray">
- </return>
- <argument index="0" name="arg0" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_constant" >
- <argument index="0" name="name" type="String">
- </argument>
- <argument index="1" name="type" type="String">
- </argument>
- <argument index="2" name="constant" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_constant" qualifiers="const" >
- <return type="int">
- </return>
- <argument index="0" name="name" type="String">
- </argument>
- <argument index="1" name="type" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="has_constant" qualifiers="const" >
- <return type="bool">
- </return>
- <argument index="0" name="name" type="String">
- </argument>
- <argument index="1" name="type" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="clear_constant" >
- <argument index="0" name="name" type="String">
- </argument>
- <argument index="1" name="type" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_constant_list" qualifiers="const" >
- <return type="StringArray">
- </return>
- <argument index="0" name="arg0" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_type_list" qualifiers="const" >
- <return type="StringArray">
- </return>
- <argument index="0" name="arg0" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="copy_default_theme" >
- <description>
- </description>
- </method>
- </methods>
- <constants>
- </constants>
-</class>
-<class name="Timer" inherits="Node" category="Nodes">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- <method name="set_wait_time" >
- <argument index="0" name="time_sec" type="real">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_wait_time" qualifiers="const" >
- <return type="real">
- </return>
- <description>
- </description>
- </method>
- <method name="set_one_shot" >
- <argument index="0" name="enable" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="is_one_shot" qualifiers="const" >
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="set_autostart" >
- <argument index="0" name="enable" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="has_autostart" qualifiers="const" >
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="start" >
- <description>
- </description>
- </method>
- <method name="stop" >
- <description>
- </description>
- </method>
- <method name="get_time_left" qualifiers="const" >
- <return type="real">
- </return>
- <description>
- </description>
- </method>
- </methods>
- <signals>
- <signal name="timeout">
- <description>
- </description>
- </signal>
- </signals>
- <constants>
- </constants>
-</class>
-<class name="Tree" inherits="Control" category="Nodes/GUI Nodes">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- <method name="clear" >
- <description>
- </description>
- </method>
- <method name="create_item" >
- <return type="Object">
- </return>
- <argument index="0" name="arg0" type="Object">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_root" >
- <return type="Object">
- </return>
- <description>
- </description>
- </method>
- <method name="set_column_min_width" >
- <argument index="0" name="arg0" type="int">
- </argument>
- <argument index="1" name="arg1" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_column_expand" >
- <argument index="0" name="arg0" type="int">
- </argument>
- <argument index="1" name="arg1" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_column_width" qualifiers="const" >
- <return type="int">
- </return>
- <argument index="0" name="arg0" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_hide_root" >
- <argument index="0" name="arg0" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_next_selected" >
- <return type="Object">
- </return>
- <argument index="0" name="arg0" type="Object">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_selected" qualifiers="const" >
- <return type="Object">
- </return>
- <description>
- </description>
- </method>
- <method name="get_selected_column" qualifiers="const" >
- <return type="int">
- </return>
- <description>
- </description>
- </method>
- <method name="get_pressed_button" qualifiers="const" >
- <return type="int">
- </return>
- <description>
- </description>
- </method>
- <method name="set_select_mode" >
- <argument index="0" name="arg0" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_columns" >
- <argument index="0" name="amount" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_columns" qualifiers="const" >
- <return type="int">
- </return>
- <description>
- </description>
- </method>
- <method name="get_edited" qualifiers="const" >
- <return type="Object">
- </return>
- <description>
- </description>
- </method>
- <method name="get_edited_column" qualifiers="const" >
- <return type="int">
- </return>
- <description>
- </description>
- </method>
- <method name="get_custom_popup_rect" qualifiers="const" >
- <return type="Rect2">
- </return>
- <description>
- </description>
- </method>
- <method name="get_item_rect" qualifiers="const" >
- <return type="Rect2">
- </return>
- <argument index="0" name="item" type="Object">
- </argument>
- <argument index="1" name="column" type="int" default="-1">
- </argument>
- <description>
- </description>
- </method>
- <method name="ensure_cursor_is_visible" >
- <description>
- </description>
- </method>
- <method name="set_column_titles_visible" >
- <argument index="0" name="visible" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="are_column_titles_visible" qualifiers="const" >
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="set_column_title" >
- <argument index="0" name="column" type="int">
- </argument>
- <argument index="1" name="title" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_column_title" qualifiers="const" >
- <return type="String">
- </return>
- <argument index="0" name="column" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_scroll" qualifiers="const" >
- <return type="Vector2">
- </return>
- <description>
- </description>
- </method>
- </methods>
- <signals>
- <signal name="multi_selected">
- <description>
- </description>
- </signal>
- <signal name="custom_popup_edited">
- <argument index="0" name="arrow_clicked" type="bool">
- </argument>
- <description>
- </description>
- </signal>
- <signal name="item_edited">
- <description>
- </description>
- </signal>
- <signal name="item_selected">
- <description>
- </description>
- </signal>
- <signal name="item_doubleclicked">
- <description>
- </description>
- </signal>
- <signal name="cell_selected">
- <description>
- </description>
- </signal>
- <signal name="button_pressed">
- <argument index="0" name="item" type="Object">
- </argument>
- <argument index="1" name="column" type="int">
- </argument>
- <argument index="2" name="id" type="int">
- </argument>
- <description>
- </description>
- </signal>
- </signals>
- <constants>
- <constant name="SELECT_ROW" value="1">
- </constant>
- <constant name="SELECT_SINGLE" value="0">
- </constant>
- <constant name="SELECT_MULTI" value="2">
- </constant>
- </constants>
-</class>
-<class name="TreeItem" inherits="Object" category="Core">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- <method name="set_cell_mode" >
- <argument index="0" name="column" type="int">
- </argument>
- <argument index="1" name="mode" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_cell_mode" qualifiers="const" >
- <return type="int">
- </return>
- <argument index="0" name="column" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_checked" >
- <argument index="0" name="column" type="int">
- </argument>
- <argument index="1" name="checked" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="is_checked" qualifiers="const" >
- <return type="bool">
- </return>
- <argument index="0" name="column" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_text" >
- <argument index="0" name="column" type="int">
- </argument>
- <argument index="1" name="text" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_text" qualifiers="const" >
- <return type="String">
- </return>
- <argument index="0" name="column" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_icon" >
- <argument index="0" name="column" type="int">
- </argument>
- <argument index="1" name="texture" type="Object">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_icon" qualifiers="const" >
- <return type="Object">
- </return>
- <argument index="0" name="column" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_range" >
- <argument index="0" name="column" type="int">
- </argument>
- <argument index="1" name="value" type="real">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_range" qualifiers="const" >
- <return type="real">
- </return>
- <argument index="0" name="column" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_range_config" >
- <argument index="0" name="column" type="int">
- </argument>
- <argument index="1" name="min" type="real">
- </argument>
- <argument index="2" name="max" type="real">
- </argument>
- <argument index="3" name="step" type="real">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_range_config" >
- <return type="Dictionary">
- </return>
- <argument index="0" name="column" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_metadata" >
- <argument index="0" name="column" type="int">
- </argument>
- <argument index="1" name="meta" type="var">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_metadata" qualifiers="const" >
- <argument index="0" name="column" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_collapsed" >
- <argument index="0" name="enable" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="is_collapsed" >
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="get_next" >
- <return type="Object">
- </return>
- <description>
- </description>
- </method>
- <method name="get_prev" >
- <return type="Object">
- </return>
- <description>
- </description>
- </method>
- <method name="get_parent" >
- <return type="Object">
- </return>
- <description>
- </description>
- </method>
- <method name="get_children" >
- <return type="Object">
- </return>
- <description>
- </description>
- </method>
- <method name="get_next_visible" >
- <return type="Object">
- </return>
- <description>
- </description>
- </method>
- <method name="get_prev_visible" >
- <return type="Object">
- </return>
- <description>
- </description>
- </method>
- <method name="remove_child" >
- <argument index="0" name="child" type="Object">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_selectable" >
- <argument index="0" name="column" type="int">
- </argument>
- <argument index="1" name="selectable" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="is_selected" >
- <return type="bool">
- </return>
- <argument index="0" name="column" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="select" >
- <argument index="0" name="column" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="deselect" >
- <argument index="0" name="column" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_editable" >
- <argument index="0" name="column" type="int">
- </argument>
- <argument index="1" name="enabled" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="is_editable" >
- <return type="bool">
- </return>
- <argument index="0" name="column" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_custom_color" >
- <argument index="0" name="column" type="int">
- </argument>
- <argument index="1" name="color" type="Color">
- </argument>
- <description>
- </description>
- </method>
- <method name="clear_custom_color" >
- <argument index="0" name="column" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_custom_bg_color" >
- <argument index="0" name="column" type="int">
- </argument>
- <argument index="1" name="color" type="Color">
- </argument>
- <description>
- </description>
- </method>
- <method name="clear_custom_bg_color" >
- <argument index="0" name="column" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="add_button" >
- <argument index="0" name="column" type="int">
- </argument>
- <argument index="1" name="button" type="Object">
- </argument>
- <argument index="2" name="arg2" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_button_count" qualifiers="const" >
- <return type="int">
- </return>
- <argument index="0" name="column" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_button" qualifiers="const" >
- <return type="Object">
- </return>
- <argument index="0" name="column" type="int">
- </argument>
- <argument index="1" name="button_idx" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="erase_button" >
- <argument index="0" name="column" type="int">
- </argument>
- <argument index="1" name="button_idx" type="int">
- </argument>
- <description>
- </description>
- </method>
- </methods>
- <constants>
- <constant name="CELL_MODE_ICON" value="3">
- </constant>
- <constant name="CELL_MODE_CUSTOM" value="4">
- </constant>
- <constant name="CELL_MODE_RANGE" value="2">
- </constant>
- <constant name="CELL_MODE_CHECK" value="1">
- </constant>
- <constant name="CELL_MODE_STRING" value="0">
- </constant>
- </constants>
-</class>
-<class name="VScrollBar" inherits="ScrollBar" category="Nodes/GUI Nodes">
- <brief_description>
- Vertical version of [ScrollBar], which goes from left (min) to right (max).
- </brief_description>
- <description>
- </description>
- <methods>
- </methods>
- <constants>
- </constants>
-</class>
-<class name="VSeparator" inherits="Separator" category="Nodes/GUI Nodes">
- <brief_description>
- Vertical version of [Separator].
- </brief_description>
- <description>
- Vertical version of [Separator]. It is used to separate objects horizontally, though (but it looks vertical!).
- </description>
- <methods>
- </methods>
- <constants>
- </constants>
-</class>
-<class name="VSlider" inherits="Slider" category="Nodes/GUI Nodes">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- </methods>
- <constants>
- </constants>
-</class>
-<class name="Viewport" inherits="Node" category="Nodes">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- <method name="set_rect" >
- <argument index="0" name="rect" type="Rect2">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_rect" qualifiers="const" >
- <return type="Rect2">
- </return>
- <description>
- </description>
- </method>
- <method name="get_visible_rect" qualifiers="const" >
- <return type="Rect2">
- </return>
- <description>
- </description>
- </method>
- <method name="get_viewport" qualifiers="const" >
- <return type="RID">
- </return>
- <description>
- </description>
- </method>
- </methods>
- <constants>
- </constants>
-</class>
-<class name="VisualInstance" inherits="Spatial" category="Nodes/3D/3D Visual Nodes">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- <method name="override_material_param" >
- <argument index="0" name="param" type="String">
- </argument>
- <argument index="1" name="value" type="var">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_visible" >
- <argument index="0" name="visible" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="is_visible" qualifiers="const" >
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
- <method name="set_base" >
- <argument index="0" name="base" type="RID">
- </argument>
- <description>
- </description>
- </method>
- </methods>
- <constants>
- </constants>
-</class>
-<class name="VisualServer" inherits="Object" category="Core">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- <method name="texture_create" >
- <return type="RID">
- </return>
- <description>
- </description>
- </method>
- <method name="texture_create_from_image" >
- <return type="RID">
- </return>
- <argument index="0" name="arg0" type="Image">
- </argument>
- <argument index="1" name="arg1" type="int" default="7">
- </argument>
- <description>
- </description>
- </method>
- <method name="texture_allocate" >
- <argument index="0" name="arg0" type="RID">
- </argument>
- <argument index="1" name="arg1" type="int">
- </argument>
- <argument index="2" name="arg2" type="int">
- </argument>
- <argument index="3" name="arg3" type="int">
- </argument>
- <argument index="4" name="arg4" type="int" default="7">
- </argument>
- <description>
- </description>
- </method>
- <method name="texture_blit_rect" >
- <argument index="0" name="arg0" type="RID">
- </argument>
- <argument index="1" name="arg1" type="int">
- </argument>
- <argument index="2" name="arg2" type="int">
- </argument>
- <argument index="3" name="arg3" type="Image">
- </argument>
- <argument index="4" name="arg4" type="int" default="0">
- </argument>
- <description>
- </description>
- </method>
- <method name="texture_set_flags" >
- <argument index="0" name="arg0" type="RID">
- </argument>
- <argument index="1" name="arg1" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="texture_get_flags" qualifiers="const" >
- <return type="int">
- </return>
- <argument index="0" name="arg0" type="RID">
- </argument>
- <description>
- </description>
- </method>
- <method name="texture_get_width" qualifiers="const" >
- <return type="int">
- </return>
- <argument index="0" name="arg0" type="RID">
- </argument>
- <description>
- </description>
- </method>
- <method name="texture_get_height" qualifiers="const" >
- <return type="int">
- </return>
- <argument index="0" name="arg0" type="RID">
- </argument>
- <description>
- </description>
- </method>
- <method name="shader_create" >
- <return type="RID">
- </return>
- <argument index="0" name="mode" type="int" default="0">
- </argument>
- <description>
- </description>
- </method>
- <method name="shader_set_mode" >
- <argument index="0" name="shader" type="RID">
- </argument>
- <argument index="1" name="mode" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="shader_get_mode" qualifiers="const" >
- <return type="int">
- </return>
- <argument index="0" name="shader" type="RID">
- </argument>
- <description>
- </description>
- </method>
- <method name="shader_set_vertex_code" >
- <argument index="0" name="shader" type="RID">
- </argument>
- <argument index="1" name="code" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="shader_get_vertex_code" qualifiers="const" >
- <return type="String">
- </return>
- <argument index="0" name="shader" type="RID">
- </argument>
- <description>
- </description>
- </method>
- <method name="shader_set_fragment_code" >
- <argument index="0" name="shader" type="RID">
- </argument>
- <argument index="1" name="code" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="shader_get_fragment_code" qualifiers="const" >
- <return type="String">
- </return>
- <argument index="0" name="shader" type="RID">
- </argument>
- <description>
- </description>
- </method>
- <method name="shader_set_param" >
- <argument index="0" name="shader" type="RID">
- </argument>
- <argument index="1" name="param" type="String">
- </argument>
- <argument index="2" name="value" type="var">
- </argument>
- <description>
- </description>
- </method>
- <method name="shader_get_param" qualifiers="const" >
- <argument index="0" name="shader" type="RID">
- </argument>
- <argument index="1" name="param" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="shader_get_param_list" qualifiers="const" >
- <return type="StringArray">
- </return>
- <argument index="0" name="shader" type="RID">
- </argument>
- <description>
- </description>
- </method>
- <method name="shader_set_use_world_transform" >
- <argument index="0" name="shader" type="RID">
- </argument>
- <argument index="1" name="enable" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="shader_is_using_world_transform" qualifiers="const" >
- <return type="bool">
- </return>
- <argument index="0" name="shader" type="RID">
- </argument>
- <description>
- </description>
- </method>
- <method name="material_create" >
- <return type="RID">
- </return>
- <description>
- </description>
- </method>
- <method name="material_set_shader" >
- <argument index="0" name="shader" type="RID">
- </argument>
- <argument index="1" name="arg1" type="RID">
- </argument>
- <description>
- </description>
- </method>
- <method name="material_get_shader" qualifiers="const" >
- <return type="RID">
- </return>
- <argument index="0" name="arg0" type="RID">
- </argument>
- <description>
- </description>
- </method>
- <method name="material_set_param" >
- <argument index="0" name="arg0" type="RID">
- </argument>
- <argument index="1" name="arg1" type="String">
- </argument>
- <argument index="2" name="arg2" type="var">
- </argument>
- <description>
- </description>
- </method>
- <method name="material_get_param" qualifiers="const" >
- <argument index="0" name="arg0" type="RID">
- </argument>
- <argument index="1" name="arg1" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="material_set_flag" >
- <argument index="0" name="arg0" type="RID">
- </argument>
- <argument index="1" name="arg1" type="int">
- </argument>
- <argument index="2" name="arg2" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="material_get_flag" qualifiers="const" >
- <return type="bool">
- </return>
- <argument index="0" name="arg0" type="RID">
- </argument>
- <argument index="1" name="arg1" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="material_set_blend_mode" >
- <argument index="0" name="arg0" type="RID">
- </argument>
- <argument index="1" name="arg1" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="material_get_blend_mode" qualifiers="const" >
- <return type="int">
- </return>
- <argument index="0" name="arg0" type="RID">
- </argument>
- <description>
- </description>
- </method>
- <method name="material_set_line_width" >
- <argument index="0" name="arg0" type="RID">
- </argument>
- <argument index="1" name="arg1" type="real">
- </argument>
- <description>
- </description>
- </method>
- <method name="material_get_line_width" qualifiers="const" >
- <return type="real">
- </return>
- <argument index="0" name="arg0" type="RID">
- </argument>
- <description>
- </description>
- </method>
- <method name="fixed_material_set_parameter" >
- <argument index="0" name="arg0" type="RID">
- </argument>
- <argument index="1" name="arg1" type="int">
- </argument>
- <argument index="2" name="arg2" type="var">
- </argument>
- <description>
- </description>
- </method>
- <method name="fixed_material_get_parameter" qualifiers="const" >
- <argument index="0" name="arg0" type="RID">
- </argument>
- <argument index="1" name="arg1" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="fixed_material_set_texture" >
- <argument index="0" name="arg0" type="RID">
- </argument>
- <argument index="1" name="arg1" type="int">
- </argument>
- <argument index="2" name="arg2" type="RID">
- </argument>
- <description>
- </description>
- </method>
- <method name="fixed_material_get_texture" qualifiers="const" >
- <return type="RID">
- </return>
- <argument index="0" name="arg0" type="RID">
- </argument>
- <argument index="1" name="arg1" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="fixed_material_set_texgen_mode" >
- <argument index="0" name="arg0" type="RID">
- </argument>
- <argument index="1" name="arg1" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="fixed_material_get_texgen_mode" qualifiers="const" >
- <return type="int">
- </return>
- <argument index="0" name="arg0" type="RID">
- </argument>
- <description>
- </description>
- </method>
- <method name="fixed_material_set_texcoord_mode" >
- <argument index="0" name="arg0" type="RID">
- </argument>
- <argument index="1" name="arg1" type="int">
- </argument>
- <argument index="2" name="arg2" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="fixed_material_get_texcoord_mode" qualifiers="const" >
- <return type="int">
- </return>
- <argument index="0" name="arg0" type="RID">
- </argument>
- <argument index="1" name="arg1" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="fixed_material_set_uv_transform" >
- <argument index="0" name="arg0" type="RID">
- </argument>
- <argument index="1" name="arg1" type="Transform">
- </argument>
- <description>
- </description>
- </method>
- <method name="fixed_material_get_uv_transform" qualifiers="const" >
- <return type="Transform">
- </return>
- <argument index="0" name="arg0" type="RID">
- </argument>
- <description>
- </description>
- </method>
- <method name="mesh_create" >
- <return type="RID">
- </return>
- <description>
- </description>
- </method>
- <method name="mesh_surface_set_array" >
- <return type="int">
- </return>
- <argument index="0" name="arg0" type="RID">
- </argument>
- <argument index="1" name="arg1" type="int">
- </argument>
- <argument index="2" name="arg2" type="int">
- </argument>
- <argument index="3" name="arg3" type="var">
- </argument>
- <description>
- </description>
- </method>
- <method name="mesh_surface_get_array" qualifiers="const" >
- <argument index="0" name="arg0" type="RID">
- </argument>
- <argument index="1" name="arg1" type="int">
- </argument>
- <argument index="2" name="arg2" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="mesh_surface_set_material" >
- <argument index="0" name="arg0" type="RID">
- </argument>
- <argument index="1" name="arg1" type="int">
- </argument>
- <argument index="2" name="arg2" type="RID">
- </argument>
- <argument index="3" name="arg3" type="bool" default="false">
- </argument>
- <description>
- </description>
- </method>
- <method name="mesh_surface_get_material" qualifiers="const" >
- <return type="RID">
- </return>
- <argument index="0" name="arg0" type="RID">
- </argument>
- <argument index="1" name="arg1" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="mesh_surface_get_array_len" qualifiers="const" >
- <return type="int">
- </return>
- <argument index="0" name="arg0" type="RID">
- </argument>
- <argument index="1" name="arg1" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="mesh_surface_get_array_index_len" qualifiers="const" >
- <return type="int">
- </return>
- <argument index="0" name="arg0" type="RID">
- </argument>
- <argument index="1" name="arg1" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="mesh_surface_get_format" qualifiers="const" >
- <return type="int">
- </return>
- <argument index="0" name="arg0" type="RID">
- </argument>
- <argument index="1" name="arg1" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="mesh_surface_get_primitive_type" qualifiers="const" >
- <return type="int">
- </return>
- <argument index="0" name="arg0" type="RID">
- </argument>
- <argument index="1" name="arg1" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="mesh_erase_surface" >
- <argument index="0" name="arg0" type="RID">
- </argument>
- <argument index="1" name="arg1" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="mesh_get_surface_count" qualifiers="const" >
- <return type="int">
- </return>
- <argument index="0" name="arg0" type="RID">
- </argument>
- <description>
- </description>
- </method>
- <method name="multimesh_create" >
- <return type="RID">
- </return>
- <description>
- </description>
- </method>
- <method name="multimesh_set_mesh" >
- <argument index="0" name="arg0" type="RID">
- </argument>
- <argument index="1" name="arg1" type="RID">
- </argument>
- <description>
- </description>
- </method>
- <method name="multimesh_set_aabb" >
- <argument index="0" name="arg0" type="RID">
- </argument>
- <argument index="1" name="arg1" type="AABB">
- </argument>
- <description>
- </description>
- </method>
- <method name="multimesh_instance_set_transform" >
- <argument index="0" name="arg0" type="RID">
- </argument>
- <argument index="1" name="arg1" type="int">
- </argument>
- <argument index="2" name="arg2" type="Transform">
- </argument>
- <description>
- </description>
- </method>
- <method name="multimesh_instance_set_color" >
- <argument index="0" name="arg0" type="RID">
- </argument>
- <argument index="1" name="arg1" type="int">
- </argument>
- <argument index="2" name="arg2" type="Color">
- </argument>
- <description>
- </description>
- </method>
- <method name="multimesh_get_mesh" qualifiers="const" >
- <return type="RID">
- </return>
- <argument index="0" name="arg0" type="RID">
- </argument>
- <description>
- </description>
- </method>
- <method name="multimesh_get_aabb" qualifiers="const" >
- <return type="AABB">
- </return>
- <argument index="0" name="arg0" type="RID">
- </argument>
- <argument index="1" name="arg1" type="AABB">
- </argument>
- <description>
- </description>
- </method>
- <method name="multimesh_instance_get_transform" qualifiers="const" >
- <return type="Transform">
- </return>
- <argument index="0" name="arg0" type="RID">
- </argument>
- <argument index="1" name="arg1" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="multimesh_instance_get_color" qualifiers="const" >
- <return type="Color">
- </return>
- <argument index="0" name="arg0" type="RID">
- </argument>
- <argument index="1" name="arg1" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="poly_create" >
- <return type="RID">
- </return>
- <description>
- </description>
- </method>
- <method name="poly_set_material" >
- <argument index="0" name="arg0" type="RID">
- </argument>
- <argument index="1" name="arg1" type="RID">
- </argument>
- <argument index="2" name="arg2" type="bool" default="false">
- </argument>
- <description>
- </description>
- </method>
- <method name="poly_add_primitive" >
- <argument index="0" name="arg0" type="RID">
- </argument>
- <argument index="1" name="arg1" type="Vector3Array">
- </argument>
- <argument index="2" name="arg2" type="Vector3Array">
- </argument>
- <argument index="3" name="arg3" type="ColorArray">
- </argument>
- <argument index="4" name="arg4" type="Vector3Array">
- </argument>
- <description>
- </description>
- </method>
- <method name="poly_clear" >
- <argument index="0" name="arg0" type="RID">
- </argument>
- <description>
- </description>
- </method>
- <method name="particles_create" >
- <return type="RID">
- </return>
- <description>
- </description>
- </method>
- <method name="particles_set_amount" >
- <argument index="0" name="arg0" type="RID">
- </argument>
- <argument index="1" name="arg1" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="particles_get_amount" qualifiers="const" >
- <return type="int">
- </return>
- <argument index="0" name="arg0" type="RID">
- </argument>
- <description>
- </description>
- </method>
- <method name="particles_set_emitting" >
- <argument index="0" name="arg0" type="RID">
- </argument>
- <argument index="1" name="arg1" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="particles_is_emitting" qualifiers="const" >
- <return type="bool">
- </return>
- <argument index="0" name="arg0" type="RID">
- </argument>
- <description>
- </description>
- </method>
- <method name="particles_set_visibility_aabb" >
- <argument index="0" name="arg0" type="RID">
- </argument>
- <argument index="1" name="arg1" type="AABB">
- </argument>
- <description>
- </description>
- </method>
- <method name="particles_get_visibility_aabb" qualifiers="const" >
- <return type="AABB">
- </return>
- <argument index="0" name="arg0" type="RID">
- </argument>
- <description>
- </description>
- </method>
- <method name="particles_set_variable" >
- <argument index="0" name="arg0" type="RID">
- </argument>
- <argument index="1" name="arg1" type="int">
- </argument>
- <argument index="2" name="arg2" type="real">
- </argument>
- <description>
- </description>
- </method>
- <method name="particles_get_variable" qualifiers="const" >
- <return type="real">
- </return>
- <argument index="0" name="arg0" type="RID">
- </argument>
- <argument index="1" name="arg1" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="particles_set_randomness" >
- <argument index="0" name="arg0" type="RID">
- </argument>
- <argument index="1" name="arg1" type="int">
- </argument>
- <argument index="2" name="arg2" type="real">
- </argument>
- <description>
- </description>
- </method>
- <method name="particles_get_randomness" qualifiers="const" >
- <return type="real">
- </return>
- <argument index="0" name="arg0" type="RID">
- </argument>
- <argument index="1" name="arg1" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="particles_set_color_phases" >
- <argument index="0" name="arg0" type="RID">
- </argument>
- <argument index="1" name="arg1" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="particles_get_color_phases" qualifiers="const" >
- <return type="int">
- </return>
- <argument index="0" name="arg0" type="RID">
- </argument>
- <description>
- </description>
- </method>
- <method name="particles_set_color_phase_pos" >
- <argument index="0" name="arg0" type="RID">
- </argument>
- <argument index="1" name="arg1" type="int">
- </argument>
- <argument index="2" name="arg2" type="real">
- </argument>
- <description>
- </description>
- </method>
- <method name="particles_get_color_phase_pos" qualifiers="const" >
- <return type="real">
- </return>
- <argument index="0" name="arg0" type="RID">
- </argument>
- <argument index="1" name="arg1" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="particles_set_color_phase_color" >
- <argument index="0" name="arg0" type="RID">
- </argument>
- <argument index="1" name="arg1" type="int">
- </argument>
- <argument index="2" name="arg2" type="Color">
- </argument>
- <description>
- </description>
- </method>
- <method name="particles_get_color_phase_color" qualifiers="const" >
- <return type="Color">
- </return>
- <argument index="0" name="arg0" type="RID">
- </argument>
- <argument index="1" name="arg1" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="particles_set_attractors" >
- <argument index="0" name="arg0" type="RID">
- </argument>
- <argument index="1" name="arg1" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="particles_get_attractors" qualifiers="const" >
- <return type="int">
- </return>
- <argument index="0" name="arg0" type="RID">
- </argument>
- <description>
- </description>
- </method>
- <method name="particles_set_attractor_pos" >
- <argument index="0" name="arg0" type="RID">
- </argument>
- <argument index="1" name="arg1" type="int">
- </argument>
- <argument index="2" name="arg2" type="Vector3">
- </argument>
- <description>
- </description>
- </method>
- <method name="particles_get_attractor_pos" qualifiers="const" >
- <return type="Vector3">
- </return>
- <argument index="0" name="arg0" type="RID">
- </argument>
- <argument index="1" name="arg1" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="particles_set_attractor_strength" >
- <argument index="0" name="arg0" type="RID">
- </argument>
- <argument index="1" name="arg1" type="int">
- </argument>
- <argument index="2" name="arg2" type="real">
- </argument>
- <description>
- </description>
- </method>
- <method name="particles_get_attractor_strength" qualifiers="const" >
- <return type="real">
- </return>
- <argument index="0" name="arg0" type="RID">
- </argument>
- <argument index="1" name="arg1" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="particles_set_material" >
- <argument index="0" name="arg0" type="RID">
- </argument>
- <argument index="1" name="arg1" type="RID">
- </argument>
- <argument index="2" name="arg2" type="bool" default="false">
- </argument>
- <description>
- </description>
- </method>
- <method name="particles_set_height_from_velocity" >
- <argument index="0" name="arg0" type="RID">
- </argument>
- <argument index="1" name="arg1" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="particles_has_height_from_velocity" qualifiers="const" >
- <return type="bool">
- </return>
- <argument index="0" name="arg0" type="RID">
- </argument>
- <description>
- </description>
- </method>
- <method name="light_create" >
- <return type="RID">
- </return>
- <argument index="0" name="arg0" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="light_get_type" qualifiers="const" >
- <return type="int">
- </return>
- <argument index="0" name="arg0" type="RID">
- </argument>
- <description>
- </description>
- </method>
- <method name="light_set_color" >
- <argument index="0" name="arg0" type="RID">
- </argument>
- <argument index="1" name="arg1" type="int">
- </argument>
- <argument index="2" name="arg2" type="Color">
- </argument>
- <description>
- </description>
- </method>
- <method name="light_get_color" qualifiers="const" >
- <return type="Color">
- </return>
- <argument index="0" name="arg0" type="RID">
- </argument>
- <argument index="1" name="arg1" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="light_set_shadow" >
- <argument index="0" name="arg0" type="RID">
- </argument>
- <argument index="1" name="arg1" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="light_has_shadow" qualifiers="const" >
- <return type="bool">
- </return>
- <argument index="0" name="arg0" type="RID">
- </argument>
- <description>
- </description>
- </method>
- <method name="light_set_volumetric" >
- <argument index="0" name="arg0" type="RID">
- </argument>
- <argument index="1" name="arg1" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="light_is_volumetric" qualifiers="const" >
- <return type="bool">
- </return>
- <argument index="0" name="arg0" type="RID">
- </argument>
- <description>
- </description>
- </method>
- <method name="light_set_projector" >
- <argument index="0" name="arg0" type="RID">
- </argument>
- <argument index="1" name="arg1" type="RID">
- </argument>
- <description>
- </description>
- </method>
- <method name="light_get_projector" qualifiers="const" >
- <return type="RID">
- </return>
- <argument index="0" name="arg0" type="RID">
- </argument>
- <description>
- </description>
- </method>
- <method name="light_set_var" >
- <argument index="0" name="arg0" type="RID">
- </argument>
- <argument index="1" name="arg1" type="int">
- </argument>
- <argument index="2" name="arg2" type="real">
- </argument>
- <description>
- </description>
- </method>
- <method name="light_get_var" qualifiers="const" >
- <return type="real">
- </return>
- <argument index="0" name="arg0" type="RID">
- </argument>
- <argument index="1" name="arg1" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="skeleton_create" >
- <return type="RID">
- </return>
- <description>
- </description>
- </method>
- <method name="skeleton_resize" >
- <argument index="0" name="arg0" type="RID">
- </argument>
- <argument index="1" name="arg1" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="skeleton_get_bone_count" qualifiers="const" >
- <return type="int">
- </return>
- <argument index="0" name="arg0" type="RID">
- </argument>
- <description>
- </description>
- </method>
- <method name="skeleton_bone_set_transform" >
- <argument index="0" name="arg0" type="RID">
- </argument>
- <argument index="1" name="arg1" type="int">
- </argument>
- <argument index="2" name="arg2" type="Transform">
- </argument>
- <description>
- </description>
- </method>
- <method name="skeleton_bone_get_transform" >
- <return type="Transform">
- </return>
- <argument index="0" name="arg0" type="RID">
- </argument>
- <argument index="1" name="arg1" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="room_create" >
- <return type="RID">
- </return>
- <description>
- </description>
- </method>
- <method name="room_set_bounds" >
- <argument index="0" name="arg0" type="RID">
- </argument>
- <argument index="1" name="arg1" type="Dictionary">
- </argument>
- <description>
- </description>
- </method>
- <method name="room_get_bounds" qualifiers="const" >
- <return type="Dictionary">
- </return>
- <argument index="0" name="arg0" type="RID">
- </argument>
- <description>
- </description>
- </method>
- <method name="portal_create" >
- <return type="RID">
- </return>
- <description>
- </description>
- </method>
- <method name="portal_set_shape" >
- <argument index="0" name="arg0" type="RID">
- </argument>
- <argument index="1" name="arg1" type="Array">
- </argument>
- <description>
- </description>
- </method>
- <method name="portal_get_shape" qualifiers="const" >
- <return type="Array">
- </return>
- <argument index="0" name="arg0" type="RID">
- </argument>
- <description>
- </description>
- </method>
- <method name="portal_set_enabled" >
- <argument index="0" name="arg0" type="RID">
- </argument>
- <argument index="1" name="arg1" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="portal_is_enabled" qualifiers="const" >
- <return type="bool">
- </return>
- <argument index="0" name="arg0" type="RID">
- </argument>
- <description>
- </description>
- </method>
- <method name="portal_set_disable_distance" >
- <argument index="0" name="arg0" type="RID">
- </argument>
- <argument index="1" name="arg1" type="real">
- </argument>
- <description>
- </description>
- </method>
- <method name="portal_get_disable_distance" qualifiers="const" >
- <return type="real">
- </return>
- <argument index="0" name="arg0" type="RID">
- </argument>
- <description>
- </description>
- </method>
- <method name="portal_set_disabled_color" >
- <argument index="0" name="arg0" type="RID">
- </argument>
- <argument index="1" name="arg1" type="Color">
- </argument>
- <description>
- </description>
- </method>
- <method name="portal_get_disabled_color" qualifiers="const" >
- <return type="Color">
- </return>
- <argument index="0" name="arg0" type="RID">
- </argument>
- <description>
- </description>
- </method>
- <method name="camera_create" >
- <return type="RID">
- </return>
- <description>
- </description>
- </method>
- <method name="camera_set_perspective" >
- <argument index="0" name="arg0" type="RID">
- </argument>
- <argument index="1" name="arg1" type="real">
- </argument>
- <argument index="2" name="arg2" type="real">
- </argument>
- <argument index="3" name="arg3" type="real">
- </argument>
- <description>
- </description>
- </method>
- <method name="camera_set_orthogonal" >
- <argument index="0" name="arg0" type="RID">
- </argument>
- <argument index="1" name="arg1" type="real">
- </argument>
- <argument index="2" name="arg2" type="real">
- </argument>
- <argument index="3" name="arg3" type="real">
- </argument>
- <description>
- </description>
- </method>
- <method name="camera_set_transform" >
- <argument index="0" name="arg0" type="RID">
- </argument>
- <argument index="1" name="arg1" type="Transform">
- </argument>
- <description>
- </description>
- </method>
- <method name="viewport_create" >
- <return type="RID">
- </return>
- <description>
- </description>
- </method>
- <method name="viewport_set_rect" >
- <argument index="0" name="arg0" type="RID">
- </argument>
- <argument index="1" name="arg1" type="Rect2">
- </argument>
- <description>
- </description>
- </method>
- <method name="viewport_get_rect" qualifiers="const" >
- <return type="Rect2">
- </return>
- <argument index="0" name="arg0" type="RID">
- </argument>
- <description>
- </description>
- </method>
- <method name="viewport_attach_camera" >
- <argument index="0" name="arg0" type="RID">
- </argument>
- <argument index="1" name="arg1" type="RID" default="RID()">
- </argument>
- <description>
- </description>
- </method>
- <method name="viewport_get_attached_camera" qualifiers="const" >
- <return type="RID">
- </return>
- <argument index="0" name="arg0" type="RID">
- </argument>
- <description>
- </description>
- </method>
- <method name="viewport_get_scenario" qualifiers="const" >
- <return type="RID">
- </return>
- <argument index="0" name="arg0" type="RID">
- </argument>
- <description>
- </description>
- </method>
- <method name="viewport_attach_canvas" >
- <argument index="0" name="arg0" type="RID">
- </argument>
- <argument index="1" name="arg1" type="RID">
- </argument>
- <description>
- </description>
- </method>
- <method name="viewport_remove_canvas" >
- <argument index="0" name="arg0" type="RID">
- </argument>
- <argument index="1" name="arg1" type="RID">
- </argument>
- <description>
- </description>
- </method>
- <method name="viewport_move_canvas_to_top" >
- <argument index="0" name="arg0" type="RID">
- </argument>
- <argument index="1" name="arg1" type="RID">
- </argument>
- <description>
- </description>
- </method>
- <method name="viewport_move_canvas_to_bottom" >
- <argument index="0" name="arg0" type="RID">
- </argument>
- <argument index="1" name="arg1" type="RID">
- </argument>
- <description>
- </description>
- </method>
- <method name="scenario_create" >
- <return type="RID">
- </return>
- <description>
- </description>
- </method>
- <method name="scenario_set_debug" >
- <argument index="0" name="arg0" type="RID">
- </argument>
- <argument index="1" name="arg1" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="scenario_fx_get_effects" qualifiers="const" >
- <return type="StringArray">
- </return>
- <argument index="0" name="arg0" type="RID">
- </argument>
- <description>
- </description>
- </method>
- <method name="scenario_fx_set_active" >
- <argument index="0" name="arg0" type="RID">
- </argument>
- <argument index="1" name="arg1" type="String">
- </argument>
- <argument index="2" name="arg2" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="scenario_fx_is_active" qualifiers="const" >
- <return type="bool">
- </return>
- <argument index="0" name="arg0" type="RID">
- </argument>
- <argument index="1" name="arg1" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="scenario_fx_get_effect_params" qualifiers="const" >
- <return type="Array">
- </return>
- <argument index="0" name="arg0" type="RID">
- </argument>
- <argument index="1" name="arg1" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="scenario_fx_get_effect_param" qualifiers="const" >
- <argument index="0" name="arg0" type="RID">
- </argument>
- <argument index="1" name="arg1" type="String">
- </argument>
- <argument index="2" name="arg2" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="scenario_fx_set_effect_param" >
- <argument index="0" name="arg0" type="RID">
- </argument>
- <argument index="1" name="arg1" type="String">
- </argument>
- <argument index="2" name="arg2" type="String">
- </argument>
- <argument index="3" name="arg3" type="var">
- </argument>
- <description>
- </description>
- </method>
- <method name="instance_create" >
- <return type="RID">
- </return>
- <description>
- </description>
- </method>
- <method name="instance_get_base" qualifiers="const" >
- <return type="RID">
- </return>
- <argument index="0" name="arg0" type="RID">
- </argument>
- <description>
- </description>
- </method>
- <method name="instance_get_base_aabb" qualifiers="const" >
- <return type="RID">
- </return>
- <argument index="0" name="arg0" type="RID">
- </argument>
- <description>
- </description>
- </method>
- <method name="instance_set_transform" >
- <argument index="0" name="arg0" type="RID">
- </argument>
- <argument index="1" name="arg1" type="Transform">
- </argument>
- <description>
- </description>
- </method>
- <method name="instance_get_transform" qualifiers="const" >
- <return type="Transform">
- </return>
- <argument index="0" name="arg0" type="RID">
- </argument>
- <description>
- </description>
- </method>
- <method name="instance_attach_object_instance_ID" >
- <argument index="0" name="arg0" type="RID">
- </argument>
- <argument index="1" name="arg1" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="instance_get_object_instance_ID" qualifiers="const" >
- <return type="int">
- </return>
- <argument index="0" name="arg0" type="RID">
- </argument>
- <description>
- </description>
- </method>
- <method name="instance_attach_skeleton" >
- <argument index="0" name="arg0" type="RID">
- </argument>
- <argument index="1" name="arg1" type="RID">
- </argument>
- <description>
- </description>
- </method>
- <method name="instance_get_skeleton" qualifiers="const" >
- <return type="RID">
- </return>
- <argument index="0" name="arg0" type="RID">
- </argument>
- <description>
- </description>
- </method>
- <method name="instance_set_room" >
- <argument index="0" name="arg0" type="RID">
- </argument>
- <argument index="1" name="arg1" type="RID">
- </argument>
- <description>
- </description>
- </method>
- <method name="instance_get_room" qualifiers="const" >
- <return type="RID">
- </return>
- <argument index="0" name="arg0" type="RID">
- </argument>
- <description>
- </description>
- </method>
- <method name="instance_set_exterior" >
- <argument index="0" name="arg0" type="RID">
- </argument>
- <argument index="1" name="arg1" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="instance_is_exterior" qualifiers="const" >
- <return type="bool">
- </return>
- <argument index="0" name="arg0" type="RID">
- </argument>
- <description>
- </description>
- </method>
- <method name="instances_cull_aabb" qualifiers="const" >
- <return type="Array">
- </return>
- <argument index="0" name="arg0" type="AABB">
- </argument>
- <argument index="1" name="arg1" type="RID">
- </argument>
- <description>
- </description>
- </method>
- <method name="instances_cull_ray" qualifiers="const" >
- <return type="Array">
- </return>
- <argument index="0" name="arg0" type="Vector3">
- </argument>
- <argument index="1" name="arg1" type="Vector3">
- </argument>
- <argument index="2" name="arg2" type="RID">
- </argument>
- <description>
- </description>
- </method>
- <method name="instances_cull_convex" qualifiers="const" >
- <return type="Array">
- </return>
- <argument index="0" name="arg0" type="Vector3">
- </argument>
- <argument index="1" name="arg1" type="Vector3">
- </argument>
- <argument index="2" name="arg2" type="RID">
- </argument>
- <description>
- </description>
- </method>
- <method name="instance_geometry_set_visible" >
- <argument index="0" name="arg0" type="RID">
- </argument>
- <argument index="1" name="arg1" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="instance_geometry_is_visible" qualifiers="const" >
- <return type="bool">
- </return>
- <argument index="0" name="arg0" type="RID">
- </argument>
- <description>
- </description>
- </method>
- <method name="instance_geometry_override_material_param" qualifiers="const" >
- <return type="RID">
- </return>
- <argument index="0" name="arg0" type="RID">
- </argument>
- <description>
- </description>
- </method>
- <method name="instance_geometry_get_material_param" qualifiers="const" >
- <return type="RID">
- </return>
- <argument index="0" name="arg0" type="RID">
- </argument>
- <description>
- </description>
- </method>
- <method name="canvas_create" >
- <return type="RID">
- </return>
- <description>
- </description>
- </method>
- <method name="canvas_item_create" >
- <return type="RID">
- </return>
- <description>
- </description>
- </method>
- <method name="canvas_item_set_parent" >
- <argument index="0" name="arg0" type="RID">
- </argument>
- <argument index="1" name="arg1" type="RID">
- </argument>
- <description>
- </description>
- </method>
- <method name="canvas_item_get_parent" qualifiers="const" >
- <return type="RID">
- </return>
- <argument index="0" name="arg0" type="RID">
- </argument>
- <description>
- </description>
- </method>
- <method name="canvas_item_set_custom_rect" >
- <argument index="0" name="arg0" type="RID">
- </argument>
- <argument index="1" name="arg1" type="bool">
- </argument>
- <argument index="2" name="arg2" type="Rect2">
- </argument>
- <description>
- </description>
- </method>
- <method name="canvas_item_set_clip" >
- <argument index="0" name="arg0" type="RID">
- </argument>
- <argument index="1" name="arg1" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="canvas_item_set_opacity" >
- <argument index="0" name="arg0" type="RID">
- </argument>
- <argument index="1" name="arg1" type="real">
- </argument>
- <description>
- </description>
- </method>
- <method name="canvas_item_get_opacity" qualifiers="const" >
- <return type="real">
- </return>
- <argument index="0" name="arg0" type="RID">
- </argument>
- <argument index="1" name="arg1" type="real">
- </argument>
- <description>
- </description>
- </method>
- <method name="canvas_item_set_self_opacity" >
- <argument index="0" name="arg0" type="RID">
- </argument>
- <argument index="1" name="arg1" type="real">
- </argument>
- <description>
- </description>
- </method>
- <method name="canvas_item_get_self_opacity" qualifiers="const" >
- <return type="real">
- </return>
- <argument index="0" name="arg0" type="RID">
- </argument>
- <argument index="1" name="arg1" type="real">
- </argument>
- <description>
- </description>
- </method>
- <method name="canvas_item_add_line" >
- <argument index="0" name="arg0" type="RID">
- </argument>
- <argument index="1" name="arg1" type="Vector2">
- </argument>
- <argument index="2" name="arg2" type="Vector2">
- </argument>
- <argument index="3" name="arg3" type="Color">
- </argument>
- <argument index="4" name="arg4" type="real" default="1">
- </argument>
- <description>
- </description>
- </method>
- <method name="canvas_item_add_rect" >
- <argument index="0" name="arg0" type="RID">
- </argument>
- <argument index="1" name="arg1" type="Rect2">
- </argument>
- <argument index="2" name="arg2" type="Color">
- </argument>
- <description>
- </description>
- </method>
- <method name="canvas_item_add_texture_rect" >
- <argument index="0" name="arg0" type="RID">
- </argument>
- <argument index="1" name="arg1" type="Rect2">
- </argument>
- <argument index="2" name="arg2" type="RID">
- </argument>
- <argument index="3" name="arg3" type="bool">
- </argument>
- <argument index="4" name="arg4" type="Color" default="Color(1,1,1,1)">
- </argument>
- <description>
- </description>
- </method>
- <method name="canvas_item_add_texture_rect_region" >
- <argument index="0" name="arg0" type="RID">
- </argument>
- <argument index="1" name="arg1" type="Rect2">
- </argument>
- <argument index="2" name="arg2" type="RID">
- </argument>
- <argument index="3" name="arg3" type="Rect2">
- </argument>
- <argument index="4" name="arg4" type="Color" default="Color(1,1,1,1)">
- </argument>
- <description>
- </description>
- </method>
- <method name="canvas_item_add_style_box" >
- <argument index="0" name="arg0" type="RID">
- </argument>
- <argument index="1" name="arg1" type="Rect2">
- </argument>
- <argument index="2" name="arg2" type="RID">
- </argument>
- <argument index="3" name="arg3" type="RealArray">
- </argument>
- <argument index="4" name="arg4" type="Color" default="Color(1,1,1,1)">
- </argument>
- <description>
- </description>
- </method>
- <method name="canvas_item_add_primitive" >
- <argument index="0" name="arg0" type="RID">
- </argument>
- <argument index="1" name="arg1" type="Array">
- </argument>
- <argument index="2" name="arg2" type="ColorArray">
- </argument>
- <argument index="3" name="arg3" type="Array" default="Array()">
- </argument>
- <argument index="4" name="arg4" type="RID" default="RID()">
- </argument>
- <description>
- </description>
- </method>
- <method name="canvas_item_clear" >
- <argument index="0" name="arg0" type="RID">
- </argument>
- <description>
- </description>
- </method>
- <method name="canvas_item_raise" >
- <argument index="0" name="arg0" type="RID">
- </argument>
- <description>
- </description>
- </method>
- <method name="cursor_set_rotation" >
- <argument index="0" name="arg0" type="real">
- </argument>
- <argument index="1" name="arg1" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="cursor_set_texture" >
- <argument index="0" name="arg0" type="RID">
- </argument>
- <argument index="1" name="arg1" type="Vector2">
- </argument>
- <argument index="2" name="arg2" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="cursor_set_visible" >
- <argument index="0" name="arg0" type="bool">
- </argument>
- <argument index="1" name="arg1" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="cursor_set_pos" >
- <argument index="0" name="arg0" type="Vector2">
- </argument>
- <argument index="1" name="arg1" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="make_sphere_mesh" >
- <return type="RID">
- </return>
- <argument index="0" name="arg0" type="int">
- </argument>
- <argument index="1" name="arg1" type="int">
- </argument>
- <argument index="2" name="arg2" type="real">
- </argument>
- <description>
- </description>
- </method>
- <method name="mesh_add_surface_from_planes" >
- <argument index="0" name="arg0" type="RID">
- </argument>
- <argument index="1" name="arg1" type="Array">
- </argument>
- <description>
- </description>
- </method>
- <method name="free" >
- <argument index="0" name="arg0" type="RID">
- </argument>
- <description>
- </description>
- </method>
- </methods>
- <constants>
- <constant name="INSTANCE_GEOMETRY_MASK" value="30">
- </constant>
- <constant name="INSTANCE_PARTICLES" value="4">
- </constant>
- <constant name="SCENARIO_DEBUG_WIREFRAME" value="1">
- </constant>
- <constant name="LIGHT_VAR_ATTENUATION" value="4">
- </constant>
- <constant name="LIGHT_VAR_SPOT_ANGLE" value="1">
- </constant>
- <constant name="LIGHT_COLOR_DIFFUSE" value="1">
- </constant>
- <constant name="PARTICLE_ANGULAR_VELOCITY" value="4">
- </constant>
- <constant name="INSTANCE_LIGHT" value="5">
- </constant>
- <constant name="INSTANCE_MULTIMESH" value="2">
- </constant>
- <constant name="PARTICLE_HEIGHT" value="11">
- </constant>
- <constant name="PARTICLE_LINEAR_VELOCITY" value="3">
- </constant>
- <constant name="FIXED_MATERIAL_PARAM_SPECULAR" value="2">
- </constant>
- <constant name="ARRAY_VERTEX" value="0">
- </constant>
- <constant name="LIGHT_SPOT" value="2">
- </constant>
- <constant name="CUBEMAP_BACK" value="5">
- </constant>
- <constant name="MATERIAL_FLAG_MAX" value="7">
- </constant>
- <constant name="FIXED_MATERIAL_PARAM_DETAIL_MIX" value="6">
- </constant>
- <constant name="ARRAY_COLOR" value="3">
- </constant>
- <constant name="ARRAY_FORMAT_BONES" value="64">
- </constant>
- <constant name="PRIMITIVE_MAX" value="7">
- </constant>
- <constant name="FIXED_MATERIAL_TEXGEN_SPHERE" value="1">
- </constant>
- <constant name="ARRAY_FORMAT_INDEX" value="256">
- </constant>
- <constant name="PRIMITIVE_TRIANGLE_STRIP" value="5">
- </constant>
- <constant name="MAX_PARTICLE_ATTRACTORS" value="4">
- </constant>
- <constant name="TEXTURE_FLAG_FILTER" value="4">
- </constant>
- <constant name="CUBEMAP_TOP" value="3">
- </constant>
- <constant name="MATERIAL_BLEND_MODE_ADD" value="1">
- </constant>
- <constant name="FIXED_MATERIAL_TEXCOORD_TEXGEN" value="3">
- </constant>
- <constant name="FIXED_MATERIAL_TEXCOORD_UV" value="0">
- </constant>
- <constant name="ARRAY_TANGENT" value="2">
- </constant>
- <constant name="ARRAY_FORMAT_NORMAL" value="2">
- </constant>
- <constant name="INFO_VIDEO_MEM_USED" value="3">
- </constant>
- <constant name="LIGHT_VAR_SPOT_ATTENUATION" value="0">
- </constant>
- <constant name="TEXTURE_FLAG_MIPMAPS" value="1">
- </constant>
- <constant name="MATERIAL_FLAG_INVERT_FACES" value="2">
- </constant>
- <constant name="MATERIAL_BLEND_MODE_SUB" value="2">
- </constant>
- <constant name="FIXED_MATERIAL_PARAM_DETAIL" value="1">
- </constant>
- <constant name="INSTANCE_ROOM" value="6">
- </constant>
- <constant name="INSTANCE_MESH" value="1">
- </constant>
- <constant name="SCENARIO_DEBUG_DISABLED" value="0">
- </constant>
- <constant name="PARTICLE_VAR_MAX" value="13">
- </constant>
- <constant name="PRIMITIVE_TRIANGLES" value="4">
- </constant>
- <constant name="PRIMITIVE_LINE_STRIP" value="2">
- </constant>
- <constant name="TEXTURE_FLAGS_DEFAULT" value="7">
- </constant>
- <constant name="CUBEMAP_BOTTOM" value="2">
- </constant>
- <constant name="FIXED_MATERIAL_TEXGEN_SCREENZ" value="3">
- </constant>
- <constant name="FIXED_MATERIAL_TEXCOORD_UV2" value="2">
- </constant>
- <constant name="ARRAY_FORMAT_TEX_UV" value="16">
- </constant>
- <constant name="ARRAY_FORMAT_WEIGHTS" value="128">
- </constant>
- <constant name="INFO_MATERIAL_CHANGES_IN_FRAME" value="1">
- </constant>
- <constant name="PARTICLE_SPREAD" value="1">
- </constant>
- <constant name="PARTICLE_LIFETIME" value="0">
- </constant>
- <constant name="PRIMITIVE_TRIANGLE_FAN" value="6">
- </constant>
- <constant name="NO_INDEX_ARRAY" value="-1">
- </constant>
- <constant name="MATERIAL_FLAG_BILLBOARD" value="6">
- </constant>
- <constant name="FIXED_MATERIAL_TEXGEN_LOCAL_XY" value="0">
- </constant>
- <constant name="SCENARIO_DEBUG_OVERDRAW" value="2">
- </constant>
- <constant name="PARTICLE_HEIGHT_SPEED_SCALE" value="12">
- </constant>
- <constant name="PARTICLE_INITIAL_ANGLE" value="10">
- </constant>
- <constant name="PARTICLE_TANGENTIAL_ACCELERATION" value="7">
- </constant>
- <constant name="PRIMITIVE_LINES" value="1">
- </constant>
- <constant name="CUSTOM_ARRAY_SIZE" value="8">
- </constant>
- <constant name="ARRAY_WEIGHTS_SIZE" value="4">
- </constant>
- <constant name="MATERIAL_FLAG_UNSHADED" value="3">
- </constant>
- <constant name="FIXED_MATERIAL_PARAM_DIFFUSE" value="0">
- </constant>
- <constant name="FIXED_MATERIAL_PARAM_MAX" value="9">
- </constant>
- <constant name="LIGHT_COLOR_SPECULAR" value="2">
- </constant>
- <constant name="MATERIAL_BLEND_MODE_MIX" value="0">
- </constant>
- <constant name="MATERIAL_BLEND_MODE_MUL" value="3">
- </constant>
- <constant name="FIXED_MATERIAL_PARAM_EMISSION" value="3">
- </constant>
- <constant name="ARRAY_MAX" value="9">
- </constant>
- <constant name="ARRAY_FORMAT_VERTEX" value="1">
- </constant>
- <constant name="INFO_OBJECTS_IN_FRAME" value="0">
- </constant>
- <constant name="LIGHT_VAR_MAX" value="6">
- </constant>
- <constant name="LIGHT_COLOR_AMBIENT" value="0">
- </constant>
- <constant name="LIGHT_DIRECTIONAL" value="0">
- </constant>
- <constant name="PRIMITIVE_POINTS" value="0">
- </constant>
- <constant name="CUBEMAP_FRONT" value="4">
- </constant>
- <constant name="SHADER_MATERIAL" value="0">
- </constant>
- <constant name="MATERIAL_FLAG_VISIBLE" value="0">
- </constant>
- <constant name="ARRAY_BONES" value="6">
- </constant>
- <constant name="ARRAY_FORMAT_COLOR" value="8">
- </constant>
- <constant name="INSTANCE_PORTAL" value="7">
- </constant>
- <constant name="MAX_CURSORS" value="8">
- </constant>
- <constant name="TEXTURE_FLAG_CUBEMAP" value="8">
- </constant>
- <constant name="FIXED_MATERIAL_PARAM_GLOW" value="5">
- </constant>
- <constant name="FIXED_MATERIAL_PARAM_NORMAL" value="7">
- </constant>
- <constant name="ARRAY_INDEX" value="8">
- </constant>
- <constant name="INFO_VERTEX_MEM_USED" value="5">
- </constant>
- <constant name="INFO_USAGE_VIDEO_MEM_TOTAL" value="2">
- </constant>
- <constant name="LIGHT_VAR_RADIUS" value="2">
- </constant>
- <constant name="PARTICLE_FINAL_SIZE" value="9">
- </constant>
- <constant name="PARTICLE_INITIAL_SIZE" value="8">
- </constant>
- <constant name="PARTICLE_LINEAR_ACCELERATION" value="5">
- </constant>
- <constant name="CUBEMAP_LEFT" value="0">
- </constant>
- <constant name="MATERIAL_FLAG_ONTOP" value="4">
- </constant>
- <constant name="FIXED_MATERIAL_TEXGEN_SCREEN" value="2">
- </constant>
- <constant name="ARRAY_NORMAL" value="1">
- </constant>
- <constant name="ARRAY_FORMAT_TANGENT" value="4">
- </constant>
- <constant name="INSTANCE_POLY" value="3">
- </constant>
- <constant name="FIXED_MATERIAL_PARAM_SPECULAR_EXP" value="4">
- </constant>
- <constant name="LIGHT_VAR_ENERGY" value="3">
- </constant>
- <constant name="PARTICLE_RADIAL_ACCELERATION" value="6">
- </constant>
- <constant name="PARTICLE_GRAVITY" value="2">
- </constant>
- <constant name="PRIMITIVE_LINE_LOOP" value="3">
- </constant>
- <constant name="MATERIAL_FLAG_WIREFRAME" value="5">
- </constant>
- <constant name="ARRAY_TEX_UV" value="4">
- </constant>
- <constant name="ARRAY_WEIGHTS" value="7">
- </constant>
- <constant name="INFO_TEXTURE_MEM_USED" value="4">
- </constant>
- <constant name="LIGHT_OMNI" value="1">
- </constant>
- <constant name="MAX_PARTICLE_COLOR_PHASES" value="4">
- </constant>
- <constant name="TEXTURE_FLAG_REPEAT" value="2">
- </constant>
- <constant name="CUBEMAP_RIGHT" value="1">
- </constant>
- <constant name="SHADER_POST_PROCESS" value="1">
- </constant>
- <constant name="MATERIAL_FLAG_DOUBLE_SIDED" value="1">
- </constant>
- <constant name="FIXED_MATERIAL_TEXCOORD_UV_TRANSFORM" value="1">
- </constant>
- </constants>
-</class>
-<class name="World" inherits="Resource" category="Resources">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- </methods>
- <constants>
- </constants>
-</class>
-</doc>
diff --git a/tools/docdump/doc_dump.cpp b/tools/docdump/doc_dump.cpp
index 5f108ee9c8..f8e035e3fa 100644
--- a/tools/docdump/doc_dump.cpp
+++ b/tools/docdump/doc_dump.cpp
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/tools/docdump/doc_dump.h b/tools/docdump/doc_dump.h
index cb18289e31..372f5e0969 100644
--- a/tools/docdump/doc_dump.h
+++ b/tools/docdump/doc_dump.h
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
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("&","&amp;");
- ret=ret.replace("<","&gt;");
- ret=ret.replace(">","&lt;");
- ret=ret.replace("'","&apos;");
- ret=ret.replace("\"","&quot;");
- return ret
-
-
-def inc_tab():
- global tab
- tab+=1
-
-def dec_tab():
- global tab
- tab-=1
-
-write_string(f,'<?xml version="1.0" encoding="UTF-8" ?>')
-write_string(f,'<doc version="'+new_doc.attrib["version"]+'">')
-
-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,'<class name="'+class_name+'" '+category+inherits+'>')
- inc_tab()
-
- write_string(f,"<brief_description>")
-
- 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,"</brief_description>")
-
- write_string(f,"<description>")
- 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,"</description>")
-
- methods = c.find("methods")
- if(methods!=None and len(list(methods))>0):
-
- write_string(f,"<methods>")
- inc_tab()
-
- for m in list(methods):
- qualifiers=get_tag(m,"qualifiers")
-
- write_string(f,'<method name="'+escape(m.attrib["name"])+'" ' +qualifiers+'>')
- inc_tab()
-
- for a in list(m):
- if (a.tag=="return"):
- typ=get_tag(a,"type")
- write_string(f,'<return'+typ+'>');
- write_string(f,'</return>');
- elif (a.tag=="argument"):
-
- default=get_tag(a,"default")
-
- write_string(f,'<argument index="'+a.attrib["index"]+'" name="'+escape(a.attrib["name"])+'" type="'+a.attrib["type"]+'"' +default+'>');
- write_string(f,'</argument>');
-
- write_string(f,'<description>');
- 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,'</description>');
- dec_tab()
- write_string(f,"</method>")
- dec_tab()
- write_string(f,"</methods>")
-
- signals = c.find("signals")
- if(signals!=None and len(list(signals))>0):
-
- write_string(f,"<signals>")
- inc_tab()
-
- for m in list(signals):
-
- write_string(f,'<signal name="'+escape(m.attrib["name"])+'">')
- inc_tab()
-
- for a in list(m):
- if (a.tag=="argument"):
-
- write_string(f,'<argument index="'+a.attrib["index"]+'" name="'+escape(a.attrib["name"])+'" type="'+a.attrib["type"]+'">');
- write_string(f,'</argument>');
-
- write_string(f,'<description>');
- 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,'</description>');
- dec_tab()
- write_string(f,"</signal>")
- dec_tab()
- write_string(f,"</signals>")
-
- constants = c.find("constants")
- if(constants!=None and len(list(constants))>0):
-
- write_string(f,"<constants>")
- inc_tab()
-
- for m in list(constants):
-
- write_string(f,'<constant name="'+escape(m.attrib["name"])+'" value="'+m.attrib["value"]+'">')
- 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,"</constant>")
-
- dec_tab()
- write_string(f,"</constants>")
-
- dec_tab()
- write_string(f,"</class>")
-
-for c in list(old_doc):
- old_classes[c.attrib["name"]]=c
-
-for c in list(new_doc):
- write_class(c)
-write_string(f,'</doc>\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
--- a/tools/docdump/locales/es/LC_MESSAGES/makedocs.mo
+++ /dev/null
Binary files 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 <EMAIL@ADDRESS>, 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 <elcorreo@deshackra.com>\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 ""
-"\"<code>{gclass}</code>(Go to page of class {gclass})\":/class_{lkclass}"
-msgstr ""
-"\"<code>{gclass}</code>(Ir a la pagina de la clase {gclass})\":/"
-"class_{lkclass}"
-
-#: makedocs.py:76
-msgid ""
-"\"<code>{gclass}.{method}</code>(Go to page {gclass}, section {method})\":/"
-"class_{lkclass}#{lkmethod}"
-msgstr ""
-"\"<code>{gclass}.{method}</code>(Ir a la pagina {gclass}, sección "
-"{method})\":/class_{lkclass}#{lkmethod}"
-
-#: makedocs.py:79
-msgid "\"<code>{method}</code>(Jump to method {method})\":#{lkmethod}"
-msgstr "\"<code>{method}</code>(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} <b>(</b> "
-msgstr ""
-"\"*{funcname}*(Saltar a la descripción para el nodo {funcname})\":#{link} "
-"<b>(</b> "
-
-#: makedocs.py:87
-msgid "h4. Inherits: "
-msgstr "h4. Hereda de: "
-
-#: makedocs.py:232
-msgid "<doc>'s version attribute missing"
-msgstr "El atributo version de <doc> 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 <EMAIL@ADDRESS>, 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 <EMAIL@ADDRESS>\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 "\"<code>{gclass}</code>(Go to page of class {gclass})\":/class_{lkclass}"
-msgstr ""
-
-#: makedocs.py:76
-msgid "\"<code>{gclass}.{method}</code>(Go to page {gclass}, section {method})\":/class_{lkclass}#{lkmethod}"
-msgstr ""
-
-#: makedocs.py:79
-msgid "\"<code>{method}</code>(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} <b>(</b> "
-msgstr ""
-
-#: makedocs.py:87
-msgid "h4. Inherits: "
-msgstr ""
-
-#: makedocs.py:232
-msgid "<doc>'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 <elcorreo@deshackra.com>
-#
-
-# 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 = _("\"<code>{gclass}</code>(Go to page of class"
- " {gclass})\":/class_{lkclass}")
-MC_LINK = _("\"<code>{gclass}.{method}</code>(Go "
- "to page {gclass}, section {method})\""
- ":/class_{lkclass}#{lkmethod}")
-TM_JUMP = _("\"<code>{method}</code>(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} <b>(</b> ")
-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<command>/?\w+/?)(\]| |=)?(\]| |=)?(?P<a'
- 'rg>\w+)?(\]| |=)?(?P<value>"[^"]+")?/?\]'), 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<class>[aA0-zZ9_]+)(?:\.))'
- r'?(?P<method>[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<class>[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}* <b>(</b>".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 += " <b>)</b>"
- # 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 <doc>
-if "version" not in root.attrib:
- logging.critical(_("<doc>'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: <members> 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 <class_list.xml>")
- 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 = {
- '"': "&quot;",
- "'": "&apos;"
-}
-
-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 <class_list.xml>")
- 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='<a href="#'+tag_text+'">'+tag_text+'</a>'
- else:
- tag_text='<a href="'+tag_text+'.html">'+tag_text+'</a>'
- 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='<a href="'+class_param+'.html#'+class_param+"_"+method_param+'">'+class_param+'.'+method_param+'()</a>'
- else:
- tag_text=tag_text='<a href="#'+class_name+"_"+param+'">'+class_name+'.'+param+'()</a>'
- elif (cmd.find("image=")==0):
- print("found image: "+cmd)
- tag_text="<img src="+cmd[6:]+"/>"
- elif (cmd.find("url=")==0):
- tag_text="<a href="+cmd[4:]+">"
- elif (cmd=="/url"):
- tag_text="</a>"
- elif (cmd=="center"):
- tag_text="<div align=\"center\">"
- elif (cmd=="/center"):
- tag_text="</div>"
- elif (cmd=="br"):
- tag_text="<br/>"
- 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="<div class=\"description\">"+text+"</div>"
- 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 <class_list.xml>'
- 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("_","&#95;")+'](' + class_param.lower() + '#' \
- + method_param + ')'
- else:
- tag_text = '[' + param.replace("_","&#95;") + '](#' + 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("_","&#95;")+'** '
- else:
- s += ' **['+ m.attrib['name'].replace("_","&#95;")+'](#' + 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#### <a name="'+m.attrib['name']+'">' + m.attrib['name'] + '</a>\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/editor/animation_editor.cpp b/tools/editor/animation_editor.cpp
index ace6fda696..cdce910665 100644
--- a/tools/editor/animation_editor.cpp
+++ b/tools/editor/animation_editor.cpp
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -34,6 +34,7 @@
#include "pair.h"
#include "scene/gui/separator.h"
#include "editor_node.h"
+#include "tools/editor/plugins/animation_player_editor_plugin.h"
/* Missing to fix:
*Set
@@ -903,6 +904,23 @@ void AnimationKeyEditor::_menu_track(int p_type) {
optimize_dialog->popup_centered(Size2(250,180));
} break;
+ case TRACK_MENU_CLEAN_UP: {
+
+ cleanup_dialog->popup_centered_minsize(Size2(300,0));
+ } break;
+ case TRACK_MENU_CLEAN_UP_CONFIRM: {
+
+ if (cleanup_all->is_pressed()) {
+ List<StringName> names;
+ AnimationPlayerEditor::singleton->get_player()->get_animation_list(&names);
+ for (List<StringName>::Element *E=names.front();E;E=E->next()) {
+ _cleanup_animation(AnimationPlayerEditor::singleton->get_player()->get_animation(E->get()));
+ }
+ } else {
+ _cleanup_animation(animation);
+
+ }
+ } break;
case CURVE_SET_LINEAR: {
curve_edit->force_transition(1.0);
@@ -933,6 +951,57 @@ void AnimationKeyEditor::_menu_track(int p_type) {
}
+void AnimationKeyEditor::_cleanup_animation(Ref<Animation> p_animation) {
+
+
+ for(int i=0;i<p_animation->get_track_count();i++) {
+
+ bool prop_exists=false;
+ Variant::Type valid_type=Variant::NIL;
+ Object *obj=NULL;
+
+ RES res;
+ Node *node = root->get_node_and_resource(p_animation->track_get_path(i),res);
+
+ if (res.is_valid()) {
+ obj=res.ptr();
+ } else if (node) {
+ obj=node;
+ }
+
+ if (obj && p_animation->track_get_type(i)==Animation::TYPE_VALUE) {
+ valid_type=obj->get_static_property_type(p_animation->track_get_path(i).get_property(),&prop_exists);
+ }
+
+ if (!obj && cleanup_tracks->is_pressed()) {
+
+ p_animation->remove_track(i);
+ i--;
+ continue;
+ }
+
+ if (!prop_exists || p_animation->track_get_type(i)!=Animation::TYPE_VALUE || cleanup_keys->is_pressed()==false)
+ continue;
+
+ for(int j=0;j<p_animation->track_get_key_count(i);j++) {
+
+ Variant v = p_animation->track_get_key_value(i,j);
+
+ if (!Variant::can_convert(v.get_type(),valid_type)) {
+ p_animation->track_remove_key(i,j);
+ j--;
+ }
+ }
+
+ if (p_animation->track_get_key_count(i)==0 && cleanup_tracks->is_pressed()) {
+ p_animation->remove_track(i);
+ i--;
+ }
+ }
+
+ undo_redo->clear_history();
+ _update_paths();
+}
void AnimationKeyEditor::_animation_optimize() {
@@ -1016,6 +1085,7 @@ void AnimationKeyEditor::_track_editor_draw() {
move_up_button->set_disabled(true);
move_down_button->set_disabled(true);
remove_button->set_disabled(true);
+
return;
}
@@ -1042,6 +1112,7 @@ void AnimationKeyEditor::_track_editor_draw() {
timecolor = Color::html("ff4a414f");
Color hover_color = Color(1,1,1,0.05);
Color select_color = Color(1,1,1,0.1);
+ Color invalid_path_color = Color(1,0.6,0.4,0.5);
Color track_select_color =Color::html("ffbd8e8e");
Ref<Texture> remove_icon = get_icon("Remove","EditorIcons");
@@ -1068,6 +1139,9 @@ void AnimationKeyEditor::_track_editor_draw() {
get_icon("KeyCall","EditorIcons")
};
+ Ref<Texture> invalid_icon = get_icon("KeyInvalid","EditorIcons");
+ Ref<Texture> invalid_icon_hover = get_icon("KeyInvalidHover","EditorIcons");
+
Ref<Texture> hsize_icon = get_icon("Hsize","EditorIcons");
Ref<Texture> type_hover=get_icon("KeyHover","EditorIcons");
@@ -1254,6 +1328,23 @@ void AnimationKeyEditor::_track_editor_draw() {
break;
int y = h+i*h+sep;
+ bool prop_exists=false;
+ Variant::Type valid_type=Variant::NIL;
+ Object *obj=NULL;
+
+ RES res;
+ Node *node = root->get_node_and_resource(animation->track_get_path(idx),res);
+
+ if (res.is_valid()) {
+ obj=res.ptr();
+ } else if (node) {
+ obj=node;
+ }
+
+ if (obj && animation->track_get_type(idx)==Animation::TYPE_VALUE) {
+ valid_type=obj->get_static_property_type(animation->track_get_path(idx).get_property(),&prop_exists);
+ }
+
if (/*mouse_over.over!=MouseOver::OVER_NONE &&*/ idx==mouse_over.track) {
Color sepc=hover_color;
@@ -1274,6 +1365,8 @@ void AnimationKeyEditor::_track_editor_draw() {
ncol=track_select_color;
te->draw_string(font,Point2(ofs+Point2(type_icon[0]->get_width()+sep,y+font->get_ascent()+(sep/2))).floor(),np,ncol,name_limit-(type_icon[0]->get_width()+sep)-5);
+ if (!obj)
+ te->draw_line(ofs+Point2(0,y+h/2),ofs+Point2(name_limit,y+h/2),invalid_path_color);
te->draw_line(ofs+Point2(0,y+h),ofs+Point2(size.width,y+h),sepcolor);
@@ -1339,6 +1432,8 @@ void AnimationKeyEditor::_track_editor_draw() {
int kc=animation->track_get_key_count(idx);
bool first=true;
+
+
for(int i=0;i<kc;i++) {
@@ -1386,7 +1481,21 @@ void AnimationKeyEditor::_track_editor_draw() {
}
- te->draw_texture(tex,ofs+Point2(x,y+key_vofs).floor());
+ if (prop_exists && !Variant::can_convert(value.get_type(),valid_type)) {
+ te->draw_texture(invalid_icon,ofs+Point2(x,y+key_vofs).floor());
+ }
+
+ if (prop_exists && !Variant::can_convert(value.get_type(),valid_type)) {
+ if (tex==type_hover)
+ te->draw_texture(invalid_icon_hover,ofs+Point2(x,y+key_vofs).floor());
+ else
+ te->draw_texture(invalid_icon,ofs+Point2(x,y+key_vofs).floor());
+ } else {
+
+ te->draw_texture(tex,ofs+Point2(x,y+key_vofs).floor());
+ }
+
+
first=false;
}
@@ -1594,7 +1703,7 @@ bool AnimationKeyEditor::_edit_if_single_selection() {
if (selection.size()==0) {
curve_edit->set_mode(AnimationCurveEdit::MODE_DISABLED);
- print_line("disable");
+ //print_line("disable");
} else {
curve_edit->set_mode(AnimationCurveEdit::MODE_MULTIPLE);
@@ -1605,13 +1714,13 @@ bool AnimationKeyEditor::_edit_if_single_selection() {
curve_edit->set_multiple(animation->track_get_key_transition(E->key().track,E->key().key));
}
- print_line("multiple");
+ //print_line("multiple");
}
return false;
}
curve_edit->set_mode(AnimationCurveEdit::MODE_SINGLE);
- print_line("regular");
+ //print_line("regular");
int idx = selection.front()->key().track;
int key = selection.front()->key().key;
@@ -2555,6 +2664,8 @@ void AnimationKeyEditor::_track_editor_input_event(const InputEvent& p_input) {
String text;
text="time: "+rtos(animation->track_get_key_time(idx,mouse_over.over_key))+"\n";
+
+
switch(animation->track_get_type(idx)) {
case Animation::TYPE_TRANSFORM: {
@@ -2569,8 +2680,33 @@ void AnimationKeyEditor::_track_editor_input_event(const InputEvent& p_input) {
} break;
case Animation::TYPE_VALUE: {
- Variant v = animation->track_get_key_value(idx,mouse_over.over_key);
- text+="value: "+String(v)+"\n";
+ Variant v = animation->track_get_key_value(idx,mouse_over.over_key);;
+ //text+="value: "+String(v)+"\n";
+
+ bool prop_exists=false;
+ Variant::Type valid_type=Variant::NIL;
+ Object *obj=NULL;
+
+ RES res;
+ Node *node = root->get_node_and_resource(animation->track_get_path(idx),res);
+
+ if (res.is_valid()) {
+ obj=res.ptr();
+ } else if (node) {
+ obj=node;
+ }
+
+ if (obj) {
+ valid_type=obj->get_static_property_type(animation->track_get_path(idx).get_property(),&prop_exists);
+ }
+
+ text+="type: "+Variant::get_type_name(v.get_type())+"\n";
+ if (prop_exists && !Variant::can_convert(v.get_type(),valid_type)) {
+ text+="value: "+String(v)+" (Invalid, expected type: "+Variant::get_type_name(valid_type)+")\n";
+ } else {
+ text+="value: "+String(v)+"\n";
+ }
+
} break;
case Animation::TYPE_METHOD: {
@@ -2593,6 +2729,9 @@ void AnimationKeyEditor::_track_editor_input_event(const InputEvent& p_input) {
} break;
}
text+="easing: "+rtos(animation->track_get_key_transition(idx,mouse_over.over_key));
+
+
+
track_editor->set_tooltip(text);
return;
@@ -2668,9 +2807,15 @@ void AnimationKeyEditor::_notification(int p_what) {
switch(p_what) {
+ case NOTIFICATION_VISIBILITY_CHANGED: {
+
+ EditorNode::get_singleton()->update_keying();
+ } break;
case NOTIFICATION_ENTER_TREE: {
+ key_editor->edit(key_edit);
+
zoomicon->set_texture( get_icon("Zoom","EditorIcons") );
menu_add_track->set_icon(get_icon("AddTrack","EditorIcons"));
@@ -2703,6 +2848,7 @@ void AnimationKeyEditor::_notification(int p_what) {
//menu_track->get_popup()->add_submenu_item("Set Transitions..","Transitions");
//menu_track->get_popup()->add_separator();
menu_track->get_popup()->add_item("Optimize Animation",TRACK_MENU_OPTIMIZE);
+ menu_track->get_popup()->add_item("Clean-Up Animation",TRACK_MENU_CLEAN_UP);
curve_linear->set_icon(get_icon("CurveLinear","EditorIcons"));
curve_in->set_icon(get_icon("CurveIn","EditorIcons"));
@@ -2849,6 +2995,8 @@ void AnimationKeyEditor::set_animation(const Ref<Animation>& p_anim) {
_update_menu();
selected_track=-1;
_edit_if_single_selection();
+
+ EditorNode::get_singleton()->update_keying();
}
void AnimationKeyEditor::set_root(Node *p_root) {
@@ -2878,13 +3026,13 @@ void AnimationKeyEditor::set_keying(bool p_enabled) {
keying=p_enabled;
_update_menu();
- emit_signal("keying_changed",p_enabled);
+ emit_signal("keying_changed");
}
bool AnimationKeyEditor::has_keying() const {
- return keying;
+ return is_visible() && animation.is_valid();
}
void AnimationKeyEditor::_query_insert(const InsertData& p_id) {
@@ -3213,6 +3361,7 @@ Ref<Animation> AnimationKeyEditor::get_current_animation() const {
void AnimationKeyEditor::_animation_len_changed(float p_len) {
+
if (updating)
return;
@@ -3340,8 +3489,10 @@ void AnimationKeyEditor::_insert_delay() {
void AnimationKeyEditor::_step_changed(float p_len) {
updating=true;
- if (!animation.is_null())
+ if (!animation.is_null()) {
animation->set_step(p_len);
+ emit_signal("animation_step_changed",animation->get_step());
+ }
updating=false;
}
@@ -3552,21 +3703,33 @@ void AnimationKeyEditor::_bind_methods() {
ADD_SIGNAL( MethodInfo("keying_changed" ) );
ADD_SIGNAL( MethodInfo("timeline_changed", PropertyInfo(Variant::REAL,"pos") ) );
ADD_SIGNAL( MethodInfo("animation_len_changed", PropertyInfo(Variant::REAL,"len") ) );
+ ADD_SIGNAL( MethodInfo("animation_step_changed", PropertyInfo(Variant::REAL,"step") ) );
ADD_SIGNAL( MethodInfo("key_edited", PropertyInfo(Variant::INT,"track"), PropertyInfo(Variant::INT,"key") ) );
}
-AnimationKeyEditor::AnimationKeyEditor(UndoRedo *p_undo_redo, EditorHistory *p_history,EditorSelection *p_selection) {
+AnimationKeyEditor::AnimationKeyEditor() {
alc="animation_len_changed";
- editor_selection=p_selection;
+ editor_selection=EditorNode::get_singleton()->get_editor_selection();
selected_track=-1;
updating=false;
te_drawing=false;
- undo_redo=p_undo_redo;
- history=p_history;
+ undo_redo=EditorNode::get_singleton()->get_undo_redo();
+ history=EditorNode::get_singleton()->get_editor_history();
+
+ ec = memnew (Control);
+ ec->set_custom_minimum_size(Size2(0,150));
+ add_child(ec);
+ ec->set_v_size_flags(SIZE_EXPAND_FILL);
+
+ h_scroll = memnew( HScrollBar );
+ h_scroll->connect("value_changed",this,"_scroll_changed");
+ add_child(h_scroll);
+ h_scroll->set_val(0);
+
HBoxContainer *hb = memnew( HBoxContainer );
add_child(hb);
@@ -3724,10 +3887,6 @@ AnimationKeyEditor::AnimationKeyEditor(UndoRedo *p_undo_redo, EditorHistory *p_h
// menu->get_popup()->connect("item_pressed",this,"_menu_callback");
- ec = memnew (Control);
- ec->set_custom_minimum_size(Size2(0,150));
- add_child(ec);
- ec->set_v_size_flags(SIZE_EXPAND_FILL);
hb = memnew( HBoxContainer);
hb->set_area_as_parent_rect();
@@ -3767,7 +3926,7 @@ AnimationKeyEditor::AnimationKeyEditor(UndoRedo *p_undo_redo, EditorHistory *p_h
key_edit = memnew( AnimationKeyEdit );
key_edit->undo_redo=undo_redo;
//key_edit->ke_dialog=key_edit_dialog;
- key_editor->edit(key_edit);
+
type_menu = memnew( PopupMenu );
add_child(type_menu);
for(int i=0;i<Variant::VARIANT_MAX;i++)
@@ -3804,12 +3963,6 @@ AnimationKeyEditor::AnimationKeyEditor(UndoRedo *p_undo_redo, EditorHistory *p_h
curve_edit->set_v_size_flags(SIZE_EXPAND_FILL);
key_editor_tab->add_child(curve_vb);
- h_scroll = memnew( HScrollBar );
- h_scroll->connect("value_changed",this,"_scroll_changed");
- add_child(h_scroll);
- h_scroll->set_val(0);
-
-
track_name = memnew( LineEdit );
track_name->set_as_toplevel(true);
track_name->hide();
@@ -3862,6 +4015,33 @@ AnimationKeyEditor::AnimationKeyEditor(UndoRedo *p_undo_redo, EditorHistory *p_h
add_child(call_select);
call_select->set_title("Call Functions in Which Node?");
+ cleanup_dialog = memnew( ConfirmationDialog );
+ add_child(cleanup_dialog);
+ VBoxContainer *cleanup_vb = memnew( VBoxContainer );
+ cleanup_dialog->add_child(cleanup_vb);
+ cleanup_dialog->set_child_rect(cleanup_vb);
+ cleanup_keys = memnew( CheckButton );
+ cleanup_keys->set_text("Remove invalid keys");
+ cleanup_keys->set_pressed(true);
+ cleanup_vb->add_child(cleanup_keys);
+
+ cleanup_tracks = memnew( CheckButton );
+ cleanup_tracks->set_text("Remove unresolved and empty tracks");
+ cleanup_tracks->set_pressed(true);
+ cleanup_vb->add_child(cleanup_tracks);
+
+ cleanup_all = memnew( CheckButton );
+ cleanup_all->set_text("Clean-Up all animations");
+ cleanup_vb->add_child(cleanup_all);
+
+ cleanup_dialog->set_title("Clean up Animation(s) (NO UNDO!)");
+ cleanup_dialog->get_ok()->set_text("Clean-Up");
+
+ cleanup_dialog->connect("confirmed",this,"_menu_track",varray(TRACK_MENU_CLEAN_UP_CONFIRM));
+
+ add_constant_override("separation",get_constant("separation","VBoxContainer"));
+
+
}
AnimationKeyEditor::~AnimationKeyEditor() {
diff --git a/tools/editor/animation_editor.h b/tools/editor/animation_editor.h
index 629377d78e..c8a539179e 100644
--- a/tools/editor/animation_editor.h
+++ b/tools/editor/animation_editor.h
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -89,6 +89,8 @@ class AnimationKeyEditor : public VBoxContainer {
TRACK_MENU_NEXT_STEP,
TRACK_MENU_PREV_STEP,
TRACK_MENU_OPTIMIZE,
+ TRACK_MENU_CLEAN_UP,
+ TRACK_MENU_CLEAN_UP_CONFIRM,
CURVE_SET_LINEAR,
CURVE_SET_IN,
CURVE_SET_OUT,
@@ -190,6 +192,11 @@ class AnimationKeyEditor : public VBoxContainer {
SpinBox *optimize_angular_error;
SpinBox *optimize_max_angle;
+ ConfirmationDialog *cleanup_dialog;
+ CheckButton *cleanup_keys;
+ CheckButton *cleanup_tracks;
+ CheckButton *cleanup_all;
+
SpinBox *step;
MenuButton *menu_add_track;
@@ -255,7 +262,7 @@ class AnimationKeyEditor : public VBoxContainer {
EditorSelection *editor_selection;
- AnimationKeyEditor();
+
float _get_zoom_scale() const;
@@ -284,6 +291,7 @@ class AnimationKeyEditor : public VBoxContainer {
void _animation_changed();
void _animation_optimize();
+ void _cleanup_animation(Ref<Animation> p_animation);
void _scroll_changed(double);
@@ -326,7 +334,7 @@ public:
void insert_value_key(const String& p_property, const Variant& p_value, bool p_advance);
void insert_transform_key(Spatial *p_node,const String& p_sub,const Transform& p_xform);
- AnimationKeyEditor(UndoRedo *p_undo_redo, EditorHistory *p_history, EditorSelection *p_selection);
+ AnimationKeyEditor();
~AnimationKeyEditor();
};
diff --git a/tools/editor/array_property_edit.cpp b/tools/editor/array_property_edit.cpp
index 9cd443270b..66c2782da5 100644
--- a/tools/editor/array_property_edit.cpp
+++ b/tools/editor/array_property_edit.cpp
@@ -72,6 +72,15 @@ bool ArrayPropertyEdit::_set(const StringName& p_name, const Variant& p_value){
ur->add_undo_method(this,"_set_value",i,arr.get(i));
}
+ } else if (newsize>size && size) {
+
+ Variant init;
+ Variant::CallError ce;
+ init = Variant::construct(arr.get(size-1).get_type(),NULL,0,ce);
+ for(int i=size;i<newsize;i++) {
+ ur->add_do_method(this,"_set_value",i,init);
+ }
+
}
ur->add_do_method(this,"_notif_change");
ur->add_undo_method(this,"_notif_change");
@@ -83,6 +92,7 @@ bool ArrayPropertyEdit::_set(const StringName& p_name, const Variant& p_value){
_change_notify();
return true;
}
+
} else if (pn.begins_with("indices")) {
if (pn.find("_")!=-1) {
@@ -209,6 +219,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<Node>();
+}
+
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/call_dialog.cpp b/tools/editor/call_dialog.cpp
index 0e3abcf4ef..edcd7371f2 100644
--- a/tools/editor/call_dialog.cpp
+++ b/tools/editor/call_dialog.cpp
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/tools/editor/call_dialog.h b/tools/editor/call_dialog.h
index fe69847796..2d04e7b6cd 100644
--- a/tools/editor/call_dialog.h
+++ b/tools/editor/call_dialog.h
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/tools/editor/code_editor.cpp b/tools/editor/code_editor.cpp
index 685763cadb..fe863bfebc 100644
--- a/tools/editor/code_editor.cpp
+++ b/tools/editor/code_editor.cpp
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -612,8 +612,10 @@ CodeTextEditor::CodeTextEditor() {
if (!font_overrode)
text_editor->add_font_override("font",get_font("source","Fonts"));
+
text_editor->set_show_line_numbers(true);
text_editor->set_brace_matching(true);
+ text_editor->set_auto_indent(true);
line_col = memnew( Label );
add_child(line_col);
diff --git a/tools/editor/code_editor.h b/tools/editor/code_editor.h
index 0c32aeb68f..5ed7ce9052 100644
--- a/tools/editor/code_editor.h
+++ b/tools/editor/code_editor.h
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/tools/editor/connections_dialog.cpp b/tools/editor/connections_dialog.cpp
index b0bacdae61..1e530b21c2 100644
--- a/tools/editor/connections_dialog.cpp
+++ b/tools/editor/connections_dialog.cpp
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -96,7 +96,11 @@ void ConnectDialog::_notification(int p_what) {
RID ci = get_canvas_item();
get_stylebox("panel","PopupMenu")->draw(ci,Rect2(Point2(),get_size()));
- }
+ }
+
+ if (p_what==NOTIFICATION_ENTER_TREE) {
+ bind_editor->edit(cdbinds);
+ }
}
void ConnectDialog::_tree_node_selected() {
@@ -163,6 +167,7 @@ void ConnectDialog::edit(Node *p_node) {
dst_path->set_text("");
dst_method->set_text("");
deferred->set_pressed(false);
+ oneshot->set_pressed(false);
cdbinds->params.clear();
cdbinds->notify_changed();
}
@@ -196,6 +201,11 @@ bool ConnectDialog::get_deferred() const {
return deferred->is_pressed();
}
+bool ConnectDialog::get_oneshot() const {
+
+ return oneshot->is_pressed();
+}
+
StringName ConnectDialog::get_dst_method() const {
String txt=dst_method->get_text();
@@ -423,12 +433,13 @@ ConnectDialog::ConnectDialog() {
dstm_hb->add_child(make_callback);
deferred = memnew( CheckButton );
- deferred->set_toggle_mode(true);
- deferred->set_pressed(true);
deferred->set_text("Deferred");
dstm_hb->add_child(deferred);
-
+ oneshot = memnew( CheckButton );
+ oneshot->set_text("Oneshot");
+ dstm_hb->add_child(oneshot);
+
/*
realtime = memnew( CheckButton );
realtime->set_anchor( MARGIN_TOP, ANCHOR_END );
@@ -449,7 +460,6 @@ ConnectDialog::ConnectDialog() {
set_as_toplevel(true);
cdbinds = memnew( ConnectDialogBinds );
- bind_editor->edit(cdbinds);
error = memnew( ConfirmationDialog );
add_child(error);
@@ -496,11 +506,13 @@ void ConnectionsDialog::_connect() {
StringName dst_method=connect_dialog->get_dst_method();
bool defer=connect_dialog->get_deferred();
+ bool oshot=connect_dialog->get_oneshot();
Vector<Variant> binds = connect_dialog->get_binds();
StringArray args = it->get_metadata(0).operator Dictionary()["args"];
+ int flags = CONNECT_PERSIST | (defer?CONNECT_DEFERRED:0) | (oshot?CONNECT_ONESHOT:0);
undo_redo->create_action("Connect '"+signal+"' to '"+String(dst_method)+"'");
- undo_redo->add_do_method(node,"connect",signal,target,dst_method,binds,CONNECT_PERSIST | (defer?CONNECT_DEFERRED:0));
+ undo_redo->add_do_method(node,"connect",signal,target,dst_method,binds,flags);
undo_redo->add_undo_method(node,"disconnect",signal,target,dst_method);
undo_redo->add_do_method(this,"update_tree");
undo_redo->add_undo_method(this,"update_tree");
@@ -731,6 +743,8 @@ void ConnectionsDialog::update_tree() {
String path = String(node->get_path_to(target))+" :: "+c.method+"()";
if (c.flags&CONNECT_DEFERRED)
path+=" (deferred)";
+ if (c.flags&CONNECT_ONESHOT)
+ path+=" (oneshot)";
if (c.binds.size()) {
path+=" binds( ";
diff --git a/tools/editor/connections_dialog.h b/tools/editor/connections_dialog.h
index 68b13bf07a..d5e228e799 100644
--- a/tools/editor/connections_dialog.h
+++ b/tools/editor/connections_dialog.h
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -58,6 +58,7 @@ class ConnectDialog : public ConfirmationDialog {
//MenuButton *dst_method_list;
OptionButton *type_list;
CheckButton *deferred;
+ CheckButton *oneshot;
CheckButton *make_callback;
PropertyEditor *bind_editor;
Node *node;
@@ -80,6 +81,7 @@ public:
NodePath get_dst_path() const;
StringName get_dst_method() const;
bool get_deferred() const;
+ bool get_oneshot() const;
Vector<Variant> get_binds() const;
void set_dst_method(const StringName& p_method);
void set_dst_node(Node* p_node);
diff --git a/tools/editor/console.cpp b/tools/editor/console.cpp
deleted file mode 100644
index 0c98f05706..0000000000
--- a/tools/editor/console.cpp
+++ /dev/null
@@ -1,386 +0,0 @@
-/*************************************************************************/
-/* console.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* http://www.godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
-#include "console.h"
-#include "os/os.h"
-#include "os/keyboard.h"
-
-#include "editor_icons.h"
-#include "scene/gui/label.h"
-#include "globals.h"
-
-
-void Console::_stats_update_timer_callback() {
-
- if (!status->is_visible())
- return;
-
- VisualServer *vs = VisualServer::get_singleton();
-
- stats.render_objects_in_frame->set_text(1,String::num(vs->get_render_info( VisualServer::INFO_OBJECTS_IN_FRAME ) ) );
- stats.material_changes_in_frame->set_text(1,String::num(vs->get_render_info( VisualServer::INFO_MATERIAL_CHANGES_IN_FRAME ) ) );
-
- int64_t total_vmem = vs->get_render_info( VisualServer::INFO_USAGE_VIDEO_MEM_TOTAL );
- if (total_vmem<0)
- stats.usage_video_mem_total->set_text(1, "Unknown");
- else
- stats.usage_video_mem_total->set_text(1,String::humanize_size( total_vmem ) );
-
- stats.usage_video_mem_used->set_text(1,String::humanize_size( vs->get_render_info( VisualServer::INFO_VIDEO_MEM_USED ) ) );
- stats.usage_texture_mem_used->set_text(1,String::humanize_size( vs->get_render_info( VisualServer::INFO_TEXTURE_MEM_USED ) ) );
- stats.usage_vertex_mem_used->set_text(1,String::humanize_size( vs->get_render_info( VisualServer::INFO_VERTEX_MEM_USED ) ) );
-
-
- stats.usage_static_memory_total->set_text(1,String::humanize_size( Memory::get_static_mem_available() ) );
- stats.usage_static_memory->set_text(1,String::humanize_size( Memory::get_static_mem_usage() ) );
- stats.usage_dynamic_memory_total->set_text(1,String::humanize_size( Memory::get_dynamic_mem_available() ) );
- stats.usage_dynamic_memory->set_text(1,String::humanize_size( Memory::get_dynamic_mem_usage() ) );
- stats.usage_objects_instanced->set_text(1,String::num( ObjectDB::get_object_count()) );
-
-
-}
-
-void Console::_print_handle(void *p_this,const String& p_string) {
-
-
- return;
- Console *self = (Console*)p_this;
-
- OutputQueue oq;
- oq.text=p_string;
- oq.type=OutputStrings::LINE_NORMAL;
-
-
- if (self->output_queue_mutex)
- self->output_queue_mutex->lock();
-
- self->output_queue.push_back(oq);
-
- if (self->output_queue_mutex)
- self->output_queue_mutex->unlock();
-
-}
-void Console::_error_handle(void *p_this,const char*p_function,const char* p_file,int p_line,const char *p_error, const char *p_explanation,ErrorHandlerType p_type) {
-
-
- Console *self = (Console*)p_this;
-
- OutputQueue oq;
- oq.text="ERROR: "+String(p_file)+":"+itos(p_line)+", in function: "+String(p_function);
- oq.text+="\n "+String(p_error)+".";
- if (p_explanation && p_explanation[0])
- oq.text+="\n Reason: "+String(p_explanation);
- oq.text+="\n";
- oq.type=OutputStrings::LINE_ERROR;
-
-
- if (self->output_queue_mutex)
- self->output_queue_mutex->lock();
-
- self->output_queue.push_back(oq);
-
- if (self->output_queue_mutex)
- self->output_queue_mutex->unlock();
-
-
-}
-
-void Console::_window_input_event(InputEvent p_event) {
-
- Control::_window_input_event(p_event);
-
- if (p_event.type==InputEvent::KEY && p_event.key.pressed) {
-
- if (p_event.key.scancode==KEY_QUOTELEFT && p_event.key.mod.control) {
-
- if (is_visible())
- hide();
- else {
- globals_property_editor->edit( NULL );
- globals_property_editor->edit( Globals::get_singleton() );
- show();
- };
- }
-
- if (p_event.key.scancode==KEY_ESCAPE && !window_has_modal_stack() && is_visible()) {
- hide();
- get_tree()->call_group(0,"windows","_cancel_input_ID",p_event.ID);
- }
-
-
- }
-}
-
-void Console::_window_resize_event() {
-
-// Control::_window_resize_event();
- _resized();
-}
-
-
-void Console::_resized() {
-
- set_pos( Point2( 0, OS::get_singleton()->get_video_mode().height-height) );
- set_size( Size2( OS::get_singleton()->get_video_mode().width, height) );
-}
-
-void Console::_notification(int p_what) {
-
- switch(p_what) {
-
- case NOTIFICATION_ENTER_TREE: {
-
- _resized();
- show();
- globals_property_editor->edit( Globals::get_singleton() );
-
- } break;
-
- case NOTIFICATION_PROCESS: {
- //pop messies
-
- if (output_queue_mutex)
- output_queue_mutex->lock();
-
- while(output_queue.size()) {
-
- OutputQueue q = output_queue.front()->get();
- if (q.type==OutputStrings::LINE_ERROR || q.type==OutputStrings::LINE_WARNING)
- errors->add_line(q.text,q.meta,q.type);
- output->add_line(q.text,q.meta,q.type);
- output_queue.pop_front();
- }
-
- if (output_queue_mutex)
- output_queue_mutex->unlock();
-
- } break;
- case NOTIFICATION_DRAW: {
-
- RID ci = get_canvas_item();
- get_stylebox("panel","Panel")->draw(ci,Rect2(Point2(),get_size()));
-
- } break;
- }
-}
-
-
-void Console::_close_pressed() {
-
- hide();
-}
-
-void Console::_inspector_node_selected() {
-
-
- Node *node = inspect_tree_editor->get_selected();
-
- if (!node)
- inspect_property_editor->edit(NULL);
- else {
-
- inspect_history.add_object(node->get_instance_ID());
-
- inspect_property_editor->edit(node);
- }
-
-}
-
-void Console::_bind_methods() {
-
- ObjectTypeDB::bind_method("_stats_update_timer_callback",&Console::_stats_update_timer_callback);
- ObjectTypeDB::bind_method("_close_pressed",&Console::_close_pressed);
- ObjectTypeDB::bind_method("_inspector_node_selected",&Console::_inspector_node_selected);
-}
-
-
-Console::Console() {
-
- Ref<Theme> theme( memnew( Theme ) );
- set_theme( theme );
- editor_register_icons(theme);
-
- height=300;
- tabs = memnew( TabContainer );
- tabs->set_tab_align(TabContainer::ALIGN_LEFT);
- add_child(tabs);
- tabs->set_area_as_parent_rect();
-
- output = memnew( OutputStrings );
- output->set_name("Output");
- tabs->add_child(output);
- errors = memnew( OutputStrings );
- errors->set_name("Errors");
- tabs->add_child(errors);
- status = memnew( Control );
- status->set_name("Stats");
- tabs->add_child(status);
- inspect = memnew( Control );
- inspect->set_name("Inspect");
- tabs->add_child(inspect);
- globals = memnew( Control );
- globals->set_name("Globals");
- tabs->add_child(globals);
-
- // stats
-
- stats_tree = memnew( Tree );
- stats_tree->set_hide_root(true);
- stats_tree->set_columns(2);
- status->add_child(stats_tree);
- stats_tree->set_anchor( MARGIN_BOTTOM, ANCHOR_END );
- stats_tree->set_anchor( MARGIN_RIGHT, ANCHOR_RATIO );
- stats_tree->set_margin( MARGIN_RIGHT, 0.5 );
- stats_tree->set_begin( Point2( 20,25 ) );
- stats_tree->set_end( Point2( 0.5,5 ) );
-
- Label *stats_label = memnew( Label );
- stats_label->set_text("Engine Statistics:");
- stats_label->set_pos( Point2( 5,5 ) );
- status->add_child(stats_label);
-
- TreeItem *stats_tree_root = stats_tree->create_item(NULL);
-
- {
- //system items
- TreeItem *system_item = stats_tree->create_item(stats_tree_root);
- system_item->set_text(0,"System");
-
- stats.usage_static_memory_total = stats_tree->create_item(system_item);
- stats.usage_static_memory_total->set_text(0,"Total Static Mem");;
- stats.usage_static_memory = stats_tree->create_item(system_item);
- stats.usage_static_memory->set_text(0,"Static Mem Usage");;
- stats.usage_dynamic_memory_total = stats_tree->create_item(system_item);
- stats.usage_dynamic_memory_total->set_text(0,"Total Dynamic Mem");;
- stats.usage_dynamic_memory = stats_tree->create_item(system_item);
- stats.usage_dynamic_memory->set_text(0,"Dynamic Mem Usage");
- stats.usage_objects_instanced = stats_tree->create_item(system_item);
- stats.usage_objects_instanced->set_text(0,"Instanced Objects");
-
- //render items
- TreeItem *render_item = stats_tree->create_item(stats_tree_root);
- render_item->set_text(0,"Render");
- stats.render_objects_in_frame = stats_tree->create_item(render_item);
- stats.render_objects_in_frame->set_text(0,"Visible Objects");
- stats.material_changes_in_frame = stats_tree->create_item(render_item);
- stats.material_changes_in_frame->set_text(0,"Material Changes");
- stats.usage_video_mem_total = stats_tree->create_item(render_item);
- stats.usage_video_mem_total->set_text(0,"Total Video Mem");
- stats.usage_texture_mem_used = stats_tree->create_item(render_item);
- stats.usage_texture_mem_used->set_text(0,"Texture Mem Usage");
- stats.usage_vertex_mem_used = stats_tree->create_item(render_item);
- stats.usage_vertex_mem_used->set_text(0,"Vertex Mem Usage");
- stats.usage_video_mem_used = stats_tree->create_item(render_item);
- stats.usage_video_mem_used->set_text(0,"Combined Mem Usage");
- }
-
- {
-
- inspect_tree_editor = memnew( SceneTreeEditor );
- inspect_tree_editor->set_anchor( MARGIN_RIGHT, ANCHOR_RATIO );
- inspect_tree_editor->set_anchor( MARGIN_BOTTOM, ANCHOR_END );
- inspect_tree_editor->set_begin( Point2( 20, 5 ) );
- inspect_tree_editor->set_end( Point2( 0.49, 5 ) );
- inspect->add_child(inspect_tree_editor);
-
- inspect_property_editor = memnew( PropertyEditor );
- inspect_property_editor->set_anchor( MARGIN_LEFT, ANCHOR_RATIO );
- inspect_property_editor->set_anchor( MARGIN_RIGHT, ANCHOR_END );
- inspect_property_editor->set_anchor( MARGIN_BOTTOM, ANCHOR_END );
- inspect_property_editor->set_begin( Point2( 0.51, 5 ) );
- inspect_property_editor->set_end( Point2( 5, 5 ) );
- inspect->add_child(inspect_property_editor);
- }
-
-
- { //globals
-
- globals_property_editor = memnew( PropertyEditor );
- globals_property_editor->set_anchor( MARGIN_RIGHT, ANCHOR_END );
- globals_property_editor->set_anchor( MARGIN_BOTTOM, ANCHOR_END );
- globals_property_editor->set_begin( Point2( 15, 5 ) );
- globals_property_editor->set_end( Point2( 5, 5 ) );
- globals_property_editor->get_top_label()->set_text("Globals Editor:");
- globals->add_child(globals_property_editor);
-
- }
-
-
-#ifndef NO_THREADS
- output_queue_mutex = Mutex::create();
-#else
- output_queue_mutex = NULL;
-#endif
-
-
- hide();
- set_process(true);
-
- close = memnew( Button );
- add_child(close);
- close->set_anchor( MARGIN_LEFT, ANCHOR_END);
- close->set_anchor( MARGIN_RIGHT, ANCHOR_END);
- close->set_begin( Point2( 25, 3 ) );
- close->set_end( Point2( 5, 3 ) );
- close->set_flat(true);
- close->connect("pressed", this,"_close_pressed");
-
-
- close->set_icon( get_icon("close","Icons") );
-// force_top_viewport(true);
-
-
- err_handler.userdata=this;
- err_handler.errfunc=_error_handle;
- add_error_handler(&err_handler);
-
- print_handler.userdata=this;
- print_handler.printfunc=_print_handle;
- add_print_handler(&print_handler);
-
- Timer *timer = memnew( Timer );
- add_child(timer);
- timer->set_wait_time(1);
- timer->start();
- timer->connect("timeout", this,"_stats_update_timer_callback");
- inspect_tree_editor->connect("node_selected", this,"_inspector_node_selected");
-
-
-
-}
-
-
-Console::~Console() {
-
- if (output_queue_mutex)
- memdelete(output_queue_mutex);
-
- remove_error_handler(&err_handler);
- remove_print_handler(&print_handler);
-
-}
diff --git a/tools/editor/create_dialog.cpp b/tools/editor/create_dialog.cpp
index a9119349c8..0f39d72308 100644
--- a/tools/editor/create_dialog.cpp
+++ b/tools/editor/create_dialog.cpp
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/tools/editor/create_dialog.h b/tools/editor/create_dialog.h
index f200e1caf5..6f959fd467 100644
--- a/tools/editor/create_dialog.h
+++ b/tools/editor/create_dialog.h
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/tools/editor/default_saver.cpp b/tools/editor/default_saver.cpp
index c865adb1eb..611232e04b 100644
--- a/tools/editor/default_saver.cpp
+++ b/tools/editor/default_saver.cpp
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/tools/editor/default_saver.h b/tools/editor/default_saver.h
index 4e11ff5592..2b1a1edb23 100644
--- a/tools/editor/default_saver.h
+++ b/tools/editor/default_saver.h
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/tools/editor/dependency_editor.cpp b/tools/editor/dependency_editor.cpp
index c04e82a08a..7e63cfb1b4 100644
--- a/tools/editor/dependency_editor.cpp
+++ b/tools/editor/dependency_editor.cpp
@@ -510,3 +510,184 @@ DependencyErrorDialog::DependencyErrorDialog() {
set_title("Errors loading!");
}
+
+//////////////////////////////////////////////////////////////////////
+
+
+
+void OrphanResourcesDialog::ok_pressed() {
+
+ paths.clear();
+
+ _find_to_delete(files->get_root(),paths);
+ if (paths.empty())
+ return;
+
+ delete_confirm->set_text("Permanently Delete "+itos(paths.size())+" Item(s) ? (No Undo!!)");
+ delete_confirm->popup_centered_minsize();
+}
+
+bool OrphanResourcesDialog::_fill_owners(EditorFileSystemDirectory *efsd,HashMap<String,int>& refs,TreeItem* p_parent){
+
+
+ if (!efsd)
+ return false;
+
+ bool has_childs=false;
+
+ for(int i=0;i<efsd->get_subdir_count();i++) {
+
+ TreeItem *dir_item=NULL;
+ if (p_parent) {
+ dir_item = files->create_item(p_parent);
+ dir_item->set_text(0,efsd->get_subdir(i)->get_name());
+ dir_item->set_icon(0,get_icon("folder","FileDialog"));
+
+ }
+ bool children = _fill_owners(efsd->get_subdir(i),refs,dir_item);
+
+ if (p_parent) {
+ if (!children) {
+ memdelete(dir_item);
+ } else {
+ has_childs=true;
+ }
+ }
+
+ }
+
+
+ for(int i=0;i<efsd->get_file_count();i++) {
+
+ if (!p_parent) {
+ Vector<String> deps = efsd->get_file_deps(i);
+ //print_line(":::"+efsd->get_file_path(i));
+ for(int j=0;j<deps.size();j++) {
+
+ if (!refs.has(deps[j])) {
+ refs[deps[j]]=1;
+ }
+ }
+ } else {
+
+ String path = efsd->get_file_path(i);
+ if (!refs.has(path)) {
+ TreeItem *ti=files->create_item(p_parent);
+ ti->set_cell_mode(0,TreeItem::CELL_MODE_CHECK);
+ ti->set_text(0,efsd->get_file(i));
+ ti->set_editable(0,true);
+
+ String type=efsd->get_file_type(i);
+
+ Ref<Texture> icon;
+ if (has_icon(type,"EditorIcons")) {
+ icon=get_icon(type,"EditorIcons");
+ } else {
+ icon=get_icon("Object","EditorIcons");
+ }
+ ti->set_icon(0,icon);
+ int ds = efsd->get_file_deps(i).size();
+ ti->set_text(1,itos(ds));
+ if (ds) {
+ ti->add_button(1,get_icon("Visible","EditorIcons"));
+ }
+ ti->set_metadata(0,path);
+ has_childs=true;
+ }
+ }
+
+ }
+
+ return has_childs;
+}
+
+
+void OrphanResourcesDialog::refresh() {
+ HashMap<String,int> refs;
+ _fill_owners(EditorFileSystem::get_singleton()->get_filesystem(),refs,NULL);
+ files->clear();
+ TreeItem *root=files->create_item();
+ _fill_owners(EditorFileSystem::get_singleton()->get_filesystem(),refs,root);
+}
+
+
+void OrphanResourcesDialog::show(){
+
+ refresh();
+ popup_centered_ratio();
+}
+
+
+void OrphanResourcesDialog::_find_to_delete(TreeItem* p_item,List<String>& paths) {
+
+ while(p_item) {
+
+ if (p_item->get_cell_mode(0)==TreeItem::CELL_MODE_CHECK && p_item->is_checked(0)) {
+ paths.push_back(p_item->get_metadata(0));
+ }
+
+ if (p_item->get_children()) {
+ _find_to_delete(p_item->get_children(),paths);
+ }
+
+ p_item=p_item->get_next();
+ }
+
+
+}
+
+void OrphanResourcesDialog::_delete_confirm() {
+
+ DirAccess *da = DirAccess::create(DirAccess::ACCESS_RESOURCES);
+ for (List<String>::Element *E=paths.front();E;E=E->next()) {
+
+ da->remove(E->get());
+ EditorFileSystem::get_singleton()->update_file(E->get());
+ }
+ memdelete(da);
+ refresh();
+}
+
+void OrphanResourcesDialog::_button_pressed(Object *p_item,int p_column, int p_id) {
+
+ TreeItem *ti=p_item->cast_to<TreeItem>();
+
+ String path = ti->get_metadata(0);
+ dep_edit->edit(path);
+
+}
+
+void OrphanResourcesDialog::_bind_methods() {
+
+ ObjectTypeDB::bind_method(_MD("_delete_confirm"),&OrphanResourcesDialog::_delete_confirm);
+ ObjectTypeDB::bind_method(_MD("_button_pressed"),&OrphanResourcesDialog::_button_pressed);
+
+}
+
+OrphanResourcesDialog::OrphanResourcesDialog(){
+
+ VBoxContainer *vbc = memnew( VBoxContainer );
+ add_child(vbc);
+ set_child_rect(vbc);
+ files = memnew( Tree );
+ files->set_columns(2);
+ files->set_column_titles_visible(true);
+ files->set_column_min_width(1,100);
+ files->set_column_expand(0,true);
+ files->set_column_expand(1,false);
+ files->set_column_title(0,"Resource");
+ files->set_column_title(1,"Owns");
+ files->set_hide_root(true);
+ vbc->add_margin_child("Resources Without Explicit Ownership:",files,true);
+ set_title("Orphan Resource Explorer");
+ delete_confirm = memnew( ConfirmationDialog );
+ delete_confirm->set_text("Delete selected files?");
+ get_ok()->set_text("Delete");
+ add_child(delete_confirm);
+ dep_edit = memnew( DependencyEditor );
+ add_child(dep_edit);
+ files->connect("button_pressed",this,"_button_pressed");
+ delete_confirm->connect("confirmed",this,"_delete_confirm");
+ set_hide_on_ok(false);
+
+}
diff --git a/tools/editor/dependency_editor.h b/tools/editor/dependency_editor.h
index 1c328e7a93..c372025ca0 100644
--- a/tools/editor/dependency_editor.h
+++ b/tools/editor/dependency_editor.h
@@ -91,4 +91,29 @@ public:
DependencyErrorDialog();
};
+
+
+class OrphanResourcesDialog : public ConfirmationDialog {
+ OBJ_TYPE(OrphanResourcesDialog,ConfirmationDialog);
+
+ DependencyEditor *dep_edit;
+ Tree *files;
+ ConfirmationDialog *delete_confirm;
+ void ok_pressed();
+
+ bool _fill_owners(EditorFileSystemDirectory *efsd, HashMap<String,int>& refs, TreeItem *p_parent);
+
+ List<String> paths;
+ void _find_to_delete(TreeItem* p_item,List<String>& paths);
+ void _delete_confirm();
+ void _button_pressed(Object *p_item,int p_column, int p_id);
+
+ void refresh();
+ static void _bind_methods();
+public:
+
+ void show();
+ OrphanResourcesDialog();
+};
+
#endif // DEPENDENCY_EDITOR_H
diff --git a/tools/editor/doc_code_font.h b/tools/editor/doc_code_font.h
index 91f67c4a41..879c873ea1 100644
--- a/tools/editor/doc_code_font.h
+++ b/tools/editor/doc_code_font.h
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/tools/editor/doc_font.h b/tools/editor/doc_font.h
index f2e5e7950b..a3c3b58b21 100644
--- a/tools/editor/doc_font.h
+++ b/tools/editor/doc_font.h
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/tools/editor/doc_title_font.h b/tools/editor/doc_title_font.h
index fb6b4eaf5b..75a3f049f0 100644
--- a/tools/editor/doc_title_font.h
+++ b/tools/editor/doc_title_font.h
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/tools/editor/editor_data.cpp b/tools/editor/editor_data.cpp
index 673ee30adb..c872b1c3ca 100644
--- a/tools/editor/editor_data.cpp
+++ b/tools/editor/editor_data.cpp
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -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() {
@@ -338,6 +341,14 @@ void EditorData::set_editor_states(const Dictionary& p_states) {
}
+void EditorData::notify_edited_scene_changed() {
+
+ for(int i=0;i<editor_plugins.size();i++) {
+
+ editor_plugins[i]->edited_scene_changed();
+ }
+}
+
void EditorData::clear_editor_states() {
for(int i=0;i<editor_plugins.size();i++) {
@@ -485,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<String> &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<SceneState> 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;i<p_node->get_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<String> checked_scenes;
+
+
+ bool must_reload = _find_updated_instances(edited_scene[p_idx].root,edited_scene[p_idx].root,checked_scenes);
+
+ if (must_reload) {
+ Ref<PackedScene> 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<Node*> new_selection;
+ for (List<Node*>::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;
@@ -537,6 +635,16 @@ String EditorData::get_scene_type(int p_idx) const {
return edited_scene[p_idx].root->get_type();
}
+void EditorData::move_edited_scene_to_index(int p_idx) {
+
+ ERR_FAIL_INDEX(current_edited_scene,edited_scene.size());
+ ERR_FAIL_INDEX(p_idx,edited_scene.size());
+
+ EditedScene es=edited_scene[current_edited_scene];
+ edited_scene.remove(current_edited_scene);
+ edited_scene.insert(p_idx,es);
+ current_edited_scene=p_idx;
+}
Ref<Script> EditorData::get_scene_root_script(int p_idx) const {
diff --git a/tools/editor/editor_data.h b/tools/editor/editor_data.h
index c5ee83ae63..fcc8ccef06 100644
--- a/tools/editor/editor_data.h
+++ b/tools/editor/editor_data.h
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -144,6 +144,8 @@ private:
Vector<EditedScene> edited_scene;
int current_edited_scene;
+ bool _find_updated_instances(Node* p_root,Node *p_node,Set<String> &checked_paths);
+
public:
EditorPlugin* get_editor(Object *p_object);
@@ -193,6 +195,8 @@ 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 move_edited_scene_to_index(int p_idx);
void set_plugin_window_layout(Ref<ConfigFile> p_layout);
@@ -200,6 +204,7 @@ public:
void save_edited_scene_state(EditorSelection *p_selection,EditorHistory *p_history,const Dictionary& p_custom);
Dictionary restore_edited_scene_state(EditorSelection *p_selection, EditorHistory *p_history);
+ void notify_edited_scene_changed();
EditorData();
diff --git a/tools/editor/editor_dir_dialog.cpp b/tools/editor/editor_dir_dialog.cpp
index a8421acff8..8512154485 100644
--- a/tools/editor/editor_dir_dialog.cpp
+++ b/tools/editor/editor_dir_dialog.cpp
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -205,31 +205,36 @@ void EditorDirDialog::_bind_methods() {
EditorDirDialog::EditorDirDialog() {
+ updating=false;
+
set_title("Choose a Directory");
+ set_hide_on_ok(false);
+
tree = memnew( Tree );
add_child(tree);
set_child_rect(tree);
- updating=false;
- get_ok()->set_text("Choose");
- set_hide_on_ok(false);
-
-
+ tree->connect("item_activated",this,"_ok");
makedir = add_button("Create Folder",OS::get_singleton()->get_swap_ok_cancel()?true:false,"makedir");
makedir->connect("pressed",this,"_make_dir");
makedialog = memnew( ConfirmationDialog );
makedialog->set_title("Create Folder");
+ add_child(makedialog);
+
VBoxContainer *makevb= memnew( VBoxContainer );
makedialog->add_child(makevb);
makedialog->set_child_rect(makevb);
+
makedirname = memnew( LineEdit );
makevb->add_margin_child("Name:",makedirname);
- add_child(makedialog);
makedialog->register_text_enter(makedirname);
makedialog->connect("confirmed",this,"_make_dir_confirm");
+
mkdirerr = memnew( AcceptDialog );
mkdirerr->set_text("Could not create folder.");
add_child(mkdirerr);
+ get_ok()->set_text("Choose");
+
}
diff --git a/tools/editor/editor_dir_dialog.h b/tools/editor/editor_dir_dialog.h
index 8ac83b86e8..1c2593219c 100644
--- a/tools/editor/editor_dir_dialog.h
+++ b/tools/editor/editor_dir_dialog.h
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/tools/editor/editor_file_dialog.cpp b/tools/editor/editor_file_dialog.cpp
index c62347d129..a9b23767f1 100644
--- a/tools/editor/editor_file_dialog.cpp
+++ b/tools/editor/editor_file_dialog.cpp
@@ -6,6 +6,8 @@
#include "editor_resource_preview.h"
#include "editor_settings.h"
#include "scene/gui/margin_container.h"
+#include "os/file_access.h"
+
EditorFileDialog::GetIconFunc EditorFileDialog::get_icon_func=NULL;
EditorFileDialog::GetIconFunc EditorFileDialog::get_large_icon_func=NULL;
@@ -27,14 +29,14 @@ void EditorFileDialog::_notification(int p_what) {
dir_prev->set_icon(get_icon("ArrowLeft","EditorIcons"));
dir_next->set_icon(get_icon("ArrowRight","EditorIcons"));
dir_up->set_icon(get_icon("ArrowUp","EditorIcons"));
+ refresh->set_icon(get_icon("Reload","EditorIcons"));
favorite->set_icon(get_icon("Favorites","EditorIcons"));
fav_up->set_icon(get_icon("MoveUp","EditorIcons"));
fav_down->set_icon(get_icon("MoveDown","EditorIcons"));
fav_rm->set_icon(get_icon("RemoveSmall","EditorIcons"));
- }
- if (p_what==NOTIFICATION_PROCESS) {
+ } else if (p_what==NOTIFICATION_PROCESS) {
if (preview_waiting) {
preview_wheel_timeout-=get_process_delta_time();
@@ -47,12 +49,57 @@ void EditorFileDialog::_notification(int p_what) {
preview_wheel_timeout=0.1;
}
}
- }
-
- if (p_what==NOTIFICATION_DRAW) {
+ } else if (p_what==NOTIFICATION_DRAW) {
//RID ci = get_canvas_item();
//get_stylebox("panel","PopupMenu")->draw(ci,Rect2(Point2(),get_size()));
+ } else if (p_what==NOTIFICATION_POPUP_HIDE) {
+
+ set_process_unhandled_input(false);
+
+ } else if (p_what==EditorSettings::NOTIFICATION_EDITOR_SETTINGS_CHANGED) {
+
+ bool show_hidden=EditorSettings::get_singleton()->get("file_dialog/show_hidden_files");
+ if (show_hidden_files!=show_hidden)
+ set_show_hidden_files(show_hidden);
+ set_display_mode((DisplayMode)EditorSettings::get_singleton()->get("file_dialog/display_mode").operator int());
+ }
+}
+
+void EditorFileDialog::_unhandled_input(const InputEvent& p_event) {
+
+ if (p_event.type==InputEvent::KEY && is_window_modal_on_top()) {
+
+ const InputEventKey &k=p_event.key;
+
+ if (k.pressed) {
+
+ bool handled=true;
+
+ switch (k.scancode) {
+
+ case KEY_H: {
+
+ if (k.mod.command) {
+
+ bool show=!show_hidden_files;
+ set_show_hidden_files(show);
+ EditorSettings::get_singleton()->set("file_dialog/show_hidden_files",show);
+ } else {
+ handled=false;
+ }
+
+ } break;
+ case KEY_F5: {
+
+ invalidate();
+ } break;
+ default: { handled=false; }
+ }
+
+ if (handled)
+ accept_event();
+ }
}
}
@@ -147,6 +194,8 @@ void EditorFileDialog::_post_popup() {
_update_favorites();
}
+ set_process_unhandled_input(true);
+
}
void EditorFileDialog::_thumbnail_result(const String& p_path,const Ref<Texture>& p_preview, const Variant& p_udata) {
@@ -189,6 +238,9 @@ void EditorFileDialog::_thumbnail_done(const String& p_path,const Ref<Texture>&
void EditorFileDialog::_request_single_thumbnail(const String& p_path) {
+ if (!FileAccess::exists(p_path))
+ return;
+
EditorResourcePreview::get_singleton()->queue_resource_preview(p_path,this,"_thumbnail_done",p_path);
//print_line("want file "+p_path);
set_process(true);
@@ -430,6 +482,8 @@ void EditorFileDialog::update_file_list() {
}
+ String cdir = dir_access->get_current_dir();
+ bool skip_pp = access==ACCESS_RESOURCES && cdir=="res://";
dir_access->list_dir_begin();
@@ -450,7 +504,7 @@ void EditorFileDialog::update_file_list() {
if (show_hidden || !ishidden) {
if (!isdir)
files.push_back(item);
- else
+ else if (item!=".." || !skip_pp)
dirs.push_back(item);
}
}
@@ -1012,7 +1066,9 @@ void EditorFileDialog::_go_forward(){
}
-bool EditorFileDialog::default_show_hidden_files=true;
+bool EditorFileDialog::default_show_hidden_files=false;
+
+EditorFileDialog::DisplayMode EditorFileDialog::default_display_mode=DISPLAY_THUMBNAILS;
void EditorFileDialog::set_display_mode(DisplayMode p_mode) {
@@ -1038,6 +1094,8 @@ EditorFileDialog::DisplayMode EditorFileDialog::get_display_mode() const{
void EditorFileDialog::_bind_methods() {
+ ObjectTypeDB::bind_method(_MD("_unhandled_input"),&EditorFileDialog::_unhandled_input);
+
ObjectTypeDB::bind_method(_MD("_item_selected"),&EditorFileDialog::_item_selected);
ObjectTypeDB::bind_method(_MD("_item_db_selected"),&EditorFileDialog::_item_dc_selected);
ObjectTypeDB::bind_method(_MD("_dir_entered"),&EditorFileDialog::_dir_entered);
@@ -1060,7 +1118,7 @@ void EditorFileDialog::_bind_methods() {
ObjectTypeDB::bind_method(_MD("get_vbox:VBoxContainer"),&EditorFileDialog::get_vbox);
ObjectTypeDB::bind_method(_MD("set_access","access"),&EditorFileDialog::set_access);
ObjectTypeDB::bind_method(_MD("get_access"),&EditorFileDialog::get_access);
- ObjectTypeDB::bind_method(_MD("set_show_hidden_files"),&EditorFileDialog::set_show_hidden_files);
+ ObjectTypeDB::bind_method(_MD("set_show_hidden_files","show"),&EditorFileDialog::set_show_hidden_files);
ObjectTypeDB::bind_method(_MD("is_showing_hidden_files"),&EditorFileDialog::is_showing_hidden_files);
ObjectTypeDB::bind_method(_MD("_select_drive"),&EditorFileDialog::_select_drive);
ObjectTypeDB::bind_method(_MD("_make_dir"),&EditorFileDialog::_make_dir);
@@ -1113,6 +1171,10 @@ void EditorFileDialog::set_default_show_hidden_files(bool p_show) {
default_show_hidden_files=p_show;
}
+void EditorFileDialog::set_default_display_mode(DisplayMode p_mode) {
+ default_display_mode=p_mode;
+}
+
void EditorFileDialog::_save_to_recent() {
String dir = get_current_dir();
@@ -1141,8 +1203,8 @@ void EditorFileDialog::_save_to_recent() {
EditorFileDialog::EditorFileDialog() {
- show_hidden_files=true;
- display_mode=DISPLAY_THUMBNAILS;
+ show_hidden_files=default_show_hidden_files;
+ display_mode=default_display_mode;
local_history_pos=0;
VBoxContainer *vbc = memnew( VBoxContainer );
@@ -1170,6 +1232,10 @@ EditorFileDialog::EditorFileDialog() {
pathhb->add_child(dir);
dir->set_h_size_flags(SIZE_EXPAND_FILL);
+ refresh = memnew( ToolButton );
+ refresh->connect("pressed",this,"_update_file_list");
+ pathhb->add_child(refresh);
+
favorite = memnew( ToolButton );
favorite->set_toggle_mode(true);
favorite->connect("toggled",this,"_favorite_toggled");
@@ -1178,11 +1244,13 @@ EditorFileDialog::EditorFileDialog() {
mode_thumbnails = memnew( ToolButton );
mode_thumbnails->connect("pressed",this,"set_display_mode",varray(DISPLAY_THUMBNAILS));
mode_thumbnails->set_toggle_mode(true);
- mode_thumbnails->set_pressed(true);
+ mode_thumbnails->set_pressed(display_mode==DISPLAY_THUMBNAILS);
pathhb->add_child(mode_thumbnails);
+
mode_list = memnew( ToolButton );
mode_list->connect("pressed",this,"set_display_mode",varray(DISPLAY_LIST));
mode_list->set_toggle_mode(true);
+ mode_list->set_pressed(display_mode==DISPLAY_LIST);
pathhb->add_child(mode_list);
drives = memnew( OptionButton );
diff --git a/tools/editor/editor_file_dialog.h b/tools/editor/editor_file_dialog.h
index 6cfd970516..3590964a51 100644
--- a/tools/editor/editor_file_dialog.h
+++ b/tools/editor/editor_file_dialog.h
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -108,6 +108,7 @@ private:
ToolButton *mode_list;
+ ToolButton *refresh;
ToolButton *favorite;
ToolButton *fav_up;
@@ -127,6 +128,7 @@ private:
int preview_wheel_index;
float preview_wheel_timeout;
static bool default_show_hidden_files;
+ static DisplayMode default_display_mode;
bool show_hidden_files;
DisplayMode display_mode;
@@ -174,6 +176,8 @@ private:
void _thumbnail_done(const String& p_path,const Ref<Texture>& p_preview, const Variant& p_udata);
void _request_single_thumbnail(const String& p_path);
+ void _unhandled_input(const InputEvent& p_event);
+
protected:
void _notification(int p_what);
@@ -210,6 +214,7 @@ public:
bool is_showing_hidden_files() const;
static void set_default_show_hidden_files(bool p_show);
+ static void set_default_display_mode(DisplayMode p_mode);
void invalidate();
diff --git a/tools/editor/editor_file_system.cpp b/tools/editor/editor_file_system.cpp
index 33e4a15c85..c7c1a48e34 100644
--- a/tools/editor/editor_file_system.cpp
+++ b/tools/editor/editor_file_system.cpp
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -37,6 +37,31 @@
EditorFileSystem *EditorFileSystem::singleton=NULL;
+void EditorFileSystemDirectory::sort_files() {
+
+ files.sort_custom<FileInfoSort>();
+}
+
+int EditorFileSystemDirectory::find_file_index(const String& p_file) const {
+
+ for(int i=0;i<files.size();i++) {
+ if (files[i]->file==p_file)
+ return i;
+ }
+ return -1;
+
+}
+int EditorFileSystemDirectory::find_dir_index(const String& p_dir) const{
+
+
+ for(int i=0;i<subdirs.size();i++) {
+ if (subdirs[i]->name==p_dir)
+ return i;
+ }
+
+ return -1;
+}
+
int EditorFileSystemDirectory::get_subdir_count() const {
@@ -59,7 +84,7 @@ String EditorFileSystemDirectory::get_file(int p_idx) const{
ERR_FAIL_INDEX_V(p_idx,files.size(),"");
- return files[p_idx].file;
+ return files[p_idx]->file;
}
String EditorFileSystemDirectory::get_path() const {
@@ -91,22 +116,22 @@ String EditorFileSystemDirectory::get_file_path(int p_idx) const {
bool EditorFileSystemDirectory::get_file_meta(int p_idx) const {
ERR_FAIL_INDEX_V(p_idx,files.size(),"");
- return files[p_idx].meta.enabled;
+ return files[p_idx]->meta.enabled;
}
Vector<String> EditorFileSystemDirectory::get_file_deps(int p_idx) const {
ERR_FAIL_INDEX_V(p_idx,files.size(),Vector<String>());
- return files[p_idx].meta.deps;
+ return files[p_idx]->meta.deps;
}
Vector<String> EditorFileSystemDirectory::get_missing_sources(int p_idx) const {
ERR_FAIL_INDEX_V(p_idx,files.size(),Vector<String>());
Vector<String> missing;
- for(int i=0;i<files[p_idx].meta.sources.size();i++) {
- if (files[p_idx].meta.sources[i].missing)
- missing.push_back(files[p_idx].meta.sources[i].path);
+ for(int i=0;i<files[p_idx]->meta.sources.size();i++) {
+ if (files[p_idx]->meta.sources[i].missing)
+ missing.push_back(files[p_idx]->meta.sources[i].path);
}
return missing;
@@ -116,8 +141,8 @@ Vector<String> EditorFileSystemDirectory::get_missing_sources(int p_idx) const {
bool EditorFileSystemDirectory::is_missing_sources(int p_idx) const {
ERR_FAIL_INDEX_V(p_idx,files.size(),false);
- for(int i=0;i<files[p_idx].meta.sources.size();i++) {
- if (files[p_idx].meta.sources[i].missing)
+ for(int i=0;i<files[p_idx]->meta.sources.size();i++) {
+ if (files[p_idx]->meta.sources[i].missing)
return true;
}
@@ -127,7 +152,7 @@ bool EditorFileSystemDirectory::is_missing_sources(int p_idx) const {
StringName EditorFileSystemDirectory::get_file_type(int p_idx) const {
ERR_FAIL_INDEX_V(p_idx,files.size(),"");
- return files[p_idx].type;
+ return files[p_idx]->type;
}
String EditorFileSystemDirectory::get_name() {
@@ -157,11 +182,17 @@ void EditorFileSystemDirectory::_bind_methods() {
EditorFileSystemDirectory::EditorFileSystemDirectory() {
+ modified_time=0;
parent=NULL;
}
EditorFileSystemDirectory::~EditorFileSystemDirectory() {
+ for(int i=0;i<files.size();i++) {
+
+ memdelete(files[i]);
+ }
+
for(int i=0;i<subdirs.size();i++) {
memdelete(subdirs[i]);
@@ -173,19 +204,6 @@ EditorFileSystemDirectory::~EditorFileSystemDirectory() {
-
-
-EditorFileSystem::DirItem::~DirItem() {
-
- for(int i=0;i<dirs.size();i++) {
- memdelete(dirs[i]);
- }
-
- for(int i=0;i<files.size();i++) {
- memdelete(files[i]);
- }
-}
-
EditorFileSystemDirectory::ImportMeta EditorFileSystem::_get_meta(const String& p_path) {
Ref<ResourceImportMetadata> imd = ResourceLoader::load_import_metadata(p_path);
@@ -214,160 +232,16 @@ EditorFileSystemDirectory::ImportMeta EditorFileSystem::_get_meta(const String&
return m;
}
-EditorFileSystem::DirItem* EditorFileSystem::_scan_dir(DirAccess *da,Set<String> &extensions,String p_name,float p_from,float p_range,const String& p_path,HashMap<String,FileCache> &file_cache,HashMap<String,DirCache> &dir_cache,EditorProgressBG& p_prog) {
- if (abort_scan)
- return NULL;
-
- if (p_path!=String()) {
- if (FileAccess::exists(("res://"+p_path).plus_file("engine.cfg"))) {
- return NULL;
- }
- }
-
- List<String> dirs;
- List<String> files;
- Set<String> pngs;
-
- String path=p_path;
- if (path.ends_with("/"))
- path=path.substr(0,path.length()-1);
- String global_path = Globals::get_singleton()->get_resource_path().plus_file(path);
-
- path="res://"+path;
- uint64_t mtime = FileAccess::get_modified_time(global_path);
-
- DirCache *dc = dir_cache.getptr(path);
-
-
- if (false && dc && dc->modification_time==mtime) {
- //use the cached files, since directory did not change
- for (Set<String>::Element *E=dc->subdirs.front();E;E=E->next()) {
- dirs.push_back(E->get());
- }
- for (Set<String>::Element *E=dc->files.front();E;E=E->next()) {
- files.push_back(E->get());
- }
-
- } else {
- //use the filesystem, some files may have changed
- Error err = da->change_dir(global_path);
- if (err!=OK) {
- print_line("Can't change to: "+path);
- ERR_FAIL_COND_V(err!=OK,NULL);
- }
+void EditorFileSystem::_scan_filesystem() {
-
- da->list_dir_begin();
- while (true) {
-
- bool isdir;
- String f = da->get_next(&isdir);
- if (f=="")
- break;
- if (isdir) {
- dirs.push_back(f);
- } else {
- String ext = f.extension().to_lower();
- if (extensions.has(ext))
- files.push_back(f);
-
- }
-
- }
-
- da->list_dir_end();
- files.sort();
- dirs.sort();
-
- }
-
-
-
- //print_line(da->get_current_dir()+": dirs: "+itos(dirs.size())+" files:"+itos(files.size()) );
-
- //find subdirs
- Vector<DirItem*> subdirs;
-
- //String current = da->get_current_dir();
- float idx=0;
- for (List<String>::Element *E=dirs.front();E;E=E->next(),idx+=1.0) {
-
- String d = E->get();
- if (d.begins_with(".")) //ignore hidden and . / ..
- continue;
-
- //ERR_CONTINUE( da->change_dir(d)!= OK );
- DirItem *sdi = _scan_dir(da,extensions,d,p_from+(idx/dirs.size())*p_range,p_range/dirs.size(),p_path+d+"/",file_cache,dir_cache,p_prog);
- if (sdi) {
- subdirs.push_back(sdi);
- }
- //da->change_dir(current);
- }
-
-
- if (subdirs.empty() && files.empty()) {
- total=p_from+p_range;
- p_prog.step(total*100);
- return NULL; //give up, nothing to do here
- }
-
- DirItem *di = memnew( DirItem );
- di->path=path;
- di->name=p_name;
- di->dirs=subdirs;
- di->modified_time=mtime;
-
- //add files
- for (List<String>::Element *E=files.front();E;E=E->next()) {
-
- SceneItem * si = memnew( SceneItem );
- si->file=E->get();
- si->path="res://"+p_path+si->file;
- FileCache *fc = file_cache.getptr(si->path);
- uint64_t mt = FileAccess::get_modified_time(si->path);
-
- if (fc && fc->modification_time == mt) {
-
- si->meta=fc->meta;
- si->type=fc->type;
- si->modified_time=fc->modification_time;
- } else {
- si->meta=_get_meta(si->path);
- si->type=ResourceLoader::get_resource_type(si->path);
- si->modified_time=mt;
-
- }
-
- if (si->meta.enabled) {
- md_count++;
- if (_check_meta_sources(si->meta)) {
- sources_changed.push_back(si->path);
- }
- }
- di->files.push_back(si);
- }
-
- total=p_from+p_range;
- p_prog.step(total*100);
-
- return di;
-}
-
-
-void EditorFileSystem::_scan_scenes() {
-
- ERR_FAIL_COND(!scanning || scandir);
+ ERR_FAIL_COND(!scanning || new_filesystem);
//read .fscache
- HashMap<String,FileCache> file_cache;
- HashMap<String,DirCache> dir_cache;
- DirCache *dc=NULL;
String cpath;
sources_changed.clear();
-
-
+ file_cache.clear();
String project=Globals::get_singleton()->get_resource_path();
@@ -387,26 +261,7 @@ void EditorFileSystem::_scan_scenes() {
ERR_CONTINUE( split.size() != 3);
String name = split[1];
- dir_cache[name]=DirCache();
- dc=&dir_cache[name];
- dc->modification_time=split[2].to_int64();
-
- if (name!="res://") {
-
- cpath=name+"/";
-
- int sp=name.find_last("/");
- if (sp==5)
- sp=6;
- String pd = name.substr(0,sp);
- DirCache *dcp = dir_cache.getptr(pd);
- ERR_CONTINUE(!dcp);
- dcp->subdirs.insert(name.get_file());
- } else {
-
- cpath=name;
- }
-
+ cpath=name;
} else {
Vector<String> split = l.split("::");
@@ -414,12 +269,8 @@ void EditorFileSystem::_scan_scenes() {
String name = split[0];
String file;
- if (!name.begins_with("res://")) {
- file=name;
- name=cpath+name;
- } else {
- file=name.get_file();
- }
+ file=name;
+ name=cpath.plus_file(name);
FileCache fc;
fc.type=split[1];
@@ -453,8 +304,6 @@ void EditorFileSystem::_scan_scenes() {
file_cache[name]=fc;
- ERR_CONTINUE(!dc);
- dc->files.insert(file);
}
}
@@ -465,39 +314,31 @@ void EditorFileSystem::_scan_scenes() {
+ EditorProgressBG scan_progress("efs","ScanFS",1000);
+ ScanProgress sp;
+ sp.low=0;
+ sp.hi=1;
+ sp.progress=&scan_progress;
- total=0;
- DirAccess *da = DirAccess::create(DirAccess::ACCESS_FILESYSTEM);
- //da->change_dir( Globals::get_singleton()->get_resource_path() );
+ new_filesystem = memnew( EditorFileSystemDirectory );
+ new_filesystem->parent=NULL;
+ DirAccess *d = DirAccess::create(DirAccess::ACCESS_RESOURCES);
+ d->change_dir("res://");
+ _scan_new_dir(new_filesystem,d,sp);
- List<String> extensionsl;
- ResourceLoader::get_recognized_extensions_for_type("",&extensionsl);
- Set<String> extensions;
- for(List<String>::Element *E = extensionsl.front();E;E=E->next()) {
+ file_cache.clear(); //clear caches, no longer needed
- extensions.insert(E->get());
- }
-
- EditorProgressBG scan_progress("efs","ScanFS",100);
-
- md_count=0;
- scandir=_scan_dir(da,extensions,"",0,1,"",file_cache,dir_cache,scan_progress);
- memdelete(da);
- if (abort_scan && scandir) {
- memdelete(scandir);
- scandir=NULL;
-
- }
+ memdelete(d);
//save back the findings
// String fscache = EditorSettings::get_singleton()->get_project_settings_path().plus_file("file_cache");
f=FileAccess::open(fscache,FileAccess::WRITE);
- _save_type_cache_fs(scandir,f);
+ _save_filesystem_cache(new_filesystem,f);
f->close();
memdelete(f);
@@ -510,7 +351,95 @@ void EditorFileSystem::_scan_scenes() {
void EditorFileSystem::_thread_func(void *_userdata) {
EditorFileSystem *sd = (EditorFileSystem*)_userdata;
- sd->_scan_scenes();
+ sd->_scan_filesystem();
+
+}
+
+bool EditorFileSystem::_update_scan_actions() {
+
+ sources_changed.clear();
+
+ bool fs_changed=false;
+
+ for (List<ItemAction>::Element *E=scan_actions.front();E;E=E->next()) {
+
+ ItemAction&ia = E->get();
+
+ switch(ia.action) {
+ case ItemAction::ACTION_NONE: {
+
+ } break;
+ case ItemAction::ACTION_DIR_ADD: {
+
+ //print_line("*ACTION ADD DIR: "+ia.new_dir->get_name());
+ int idx=0;
+ for(int i=0;i<ia.dir->subdirs.size();i++) {
+
+ if (ia.new_dir->name<ia.dir->subdirs[i]->name)
+ break;
+ idx++;
+ }
+ if (idx==ia.dir->subdirs.size()) {
+ ia.dir->subdirs.push_back(ia.new_dir);
+ } else {
+ ia.dir->subdirs.insert(idx,ia.new_dir);
+ }
+
+ fs_changed=true;
+ } break;
+ case ItemAction::ACTION_DIR_REMOVE: {
+
+ ERR_CONTINUE(!ia.dir->parent);
+ //print_line("*ACTION REMOVE DIR: "+ia.dir->get_name());
+ ia.dir->parent->subdirs.erase(ia.dir);
+ memdelete( ia.dir );
+ fs_changed=true;
+ } break;
+ case ItemAction::ACTION_FILE_ADD: {
+
+ int idx=0;
+ for(int i=0;i<ia.dir->files.size();i++) {
+
+ if (ia.new_file->file<ia.dir->files[i]->file)
+ break;
+ idx++;
+ }
+ if (idx==ia.dir->files.size()) {
+ ia.dir->files.push_back(ia.new_file);
+ } else {
+ ia.dir->files.insert(idx,ia.new_file);
+ }
+
+ fs_changed=true;
+ //print_line("*ACTION ADD FILE: "+ia.new_file->file);
+
+ } break;
+ case ItemAction::ACTION_FILE_REMOVE: {
+
+ int idx = ia.dir->find_file_index(ia.file);
+ ERR_CONTINUE(idx==-1);
+ memdelete( ia.dir->files[idx] );
+ ia.dir->files.remove(idx);
+
+ fs_changed=true;
+ //print_line("*ACTION REMOVE FILE: "+ia.file);
+
+ } break;
+ case ItemAction::ACTION_FILE_SOURCES_CHANGED: {
+
+ int idx = ia.dir->find_file_index(ia.file);
+ ERR_CONTINUE(idx==-1);
+ String full_path = ia.dir->get_file_path(idx);
+ sources_changed.push_back(full_path);
+
+ } break;
+
+ }
+ }
+
+ scan_actions.clear();
+
+ return fs_changed;
}
@@ -526,19 +455,15 @@ void EditorFileSystem::scan() {
abort_scan=false;
if (!use_threads) {
scanning=true;
- _scan_scenes();
- if (rootdir)
- memdelete(rootdir);
- rootdir=scandir;
+ scan_total=0;
+ _scan_filesystem();
if (filesystem)
memdelete(filesystem);
// file_type_cache.clear();
- filesystem=_update_tree(rootdir);
-
- if (rootdir)
- memdelete(rootdir);
- rootdir=NULL;
- scanning=false;
+ filesystem=new_filesystem;
+ new_filesystem=NULL;
+ _update_scan_actions();
+ scanning=false;
emit_signal("filesystem_changed");
emit_signal("sources_changed",sources_changed.size()>0);
@@ -548,6 +473,7 @@ void EditorFileSystem::scan() {
set_process(true);
Thread::Settings s;
scanning=true;
+ scan_total=0;
s.priority=Thread::PRIORITY_LOW;
thread = Thread::create(_thread_func,this,s);
//tree->hide();
@@ -559,14 +485,10 @@ void EditorFileSystem::scan() {
}
-bool EditorFileSystem::_check_meta_sources(EditorFileSystemDirectory::ImportMeta & p_meta,EditorProgressBG *ep) {
+bool EditorFileSystem::_check_meta_sources(EditorFileSystemDirectory::ImportMeta & p_meta) {
if (p_meta.enabled) {
- if (ep) {
- ep->step(ss_amount++);
- }
-
for(int j=0;j<p_meta.sources.size();j++) {
@@ -584,9 +506,9 @@ bool EditorFileSystem::_check_meta_sources(EditorFileSystemDirectory::ImportMeta
if (mt!=p_meta.sources[j].modified_time) {
//scan
String md5 = FileAccess::get_md5(src);
- print_line("checking: "+src);
- print_line("md5: "+md5);
- print_line("vs: "+p_meta.sources[j].md5);
+ //print_line("checking: "+src);
+ //print_line("md5: "+md5);
+ //print_line("vs: "+p_meta.sources[j].md5);
if (md5!=p_meta.sources[j].md5) {
//really changed
return true;
@@ -599,18 +521,300 @@ bool EditorFileSystem::_check_meta_sources(EditorFileSystemDirectory::ImportMeta
return false;
}
-void EditorFileSystem::_scan_sources(EditorFileSystemDirectory *p_dir,EditorProgressBG *ep) {
+void EditorFileSystem::ScanProgress::update(int p_current,int p_total) const {
+
+ float ratio = low + ((hi-low)/p_total)*p_current;
+ progress->step(ratio*1000);
+ EditorFileSystem::singleton->scan_total=ratio;
+}
+
+EditorFileSystem::ScanProgress EditorFileSystem::ScanProgress::get_sub(int p_current,int p_total) const{
+
+ ScanProgress sp=*this;
+ float slice = (sp.hi-sp.low)/p_total;
+ sp.low+=slice*p_current;
+ sp.hi=slice;
+ return sp;
+
+
+}
+
+
+void EditorFileSystem::_scan_new_dir(EditorFileSystemDirectory *p_dir,DirAccess *da,const ScanProgress& p_progress) {
+
+ List<String> dirs;
+ List<String> files;
+
+ String cd = da->get_current_dir();
+
+ p_dir->modified_time = FileAccess::get_modified_time(cd);
+
+
+ da->list_dir_begin();
+ while (true) {
+
+ bool isdir;
+ String f = da->get_next(&isdir);
+ if (f=="")
+ break;
+
+ if (isdir) {
+
+ if (f.begins_with(".")) //ignore hidden and . / ..
+ continue;
+
+ if (FileAccess::exists(cd.plus_file(f).plus_file("engine.cfg"))) // skip if another project inside this
+ continue;
+
+ dirs.push_back(f);
+
+ } else {
+
+ files.push_back(f);
+ }
+
+ }
+
+ da->list_dir_end();
+
+ dirs.sort();
+ files.sort();
+
+ int total = dirs.size()+files.size();
+ int idx=0;
+
+ for (List<String>::Element *E=dirs.front();E;E=E->next(),idx++) {
+
+ if (da->change_dir(E->get())==OK) {
+
+ EditorFileSystemDirectory *efd = memnew( EditorFileSystemDirectory );
+
+ efd->parent=p_dir;
+ efd->name=E->get();
+
+ _scan_new_dir(efd,da,p_progress.get_sub(idx,total));
+
+ int idx=0;
+ for(int i=0;i<p_dir->subdirs.size();i++) {
+
+ if (efd->name<p_dir->subdirs[i]->name)
+ break;
+ idx++;
+ }
+ if (idx==p_dir->subdirs.size()) {
+ p_dir->subdirs.push_back(efd);
+ } else {
+ p_dir->subdirs.insert(idx,efd);
+ }
+
+ da->change_dir("..");
+ } else {
+ ERR_PRINTS("Can't go into subdir: "+E->get());
+ }
+
+ p_progress.update(idx,total);
+
+ }
+
+ for (List<String>::Element*E=files.front();E;E=E->next(),idx++) {
+
+ String ext = E->get().extension().to_lower();
+ if (!valid_extensions.has(ext))
+ continue; //invalid
+
+ EditorFileSystemDirectory::FileInfo *fi = memnew( EditorFileSystemDirectory::FileInfo );
+ fi->file=E->get();
+
+ String path = cd.plus_file(fi->file);
+
+ FileCache *fc = file_cache.getptr(path);
+ uint64_t mt = FileAccess::get_modified_time(path);
+
+ if (fc && fc->modification_time == mt) {
+
+ fi->meta=fc->meta;
+ fi->type=fc->type;
+ fi->modified_time=fc->modification_time;
+ } else {
+ fi->meta=_get_meta(path);
+ fi->type=ResourceLoader::get_resource_type(path);
+ fi->modified_time=mt;
+
+ }
+
+ if (fi->meta.enabled) {
+ if (_check_meta_sources(fi->meta)) {
+ ItemAction ia;
+ ia.action=ItemAction::ACTION_FILE_SOURCES_CHANGED;
+ ia.dir=p_dir;
+ ia.file=E->get();
+ scan_actions.push_back(ia);
+ }
+ }
+
+ p_dir->files.push_back(fi);
+ p_progress.update(idx,total);
+ }
+
+}
+
+
+void EditorFileSystem::_scan_fs_changes(EditorFileSystemDirectory *p_dir,const ScanProgress& p_progress) {
+
+ uint64_t current_mtime = FileAccess::get_modified_time(p_dir->get_path());
+
+ bool updated_dir=false;
+
+ //print_line("dir: "+p_dir->get_path()+" MODTIME: "+itos(p_dir->modified_time)+" CTIME: "+itos(current_mtime));
+
+ if (current_mtime!=p_dir->modified_time) {
+
+ updated_dir=true;
+ p_dir->modified_time=current_mtime;
+ //ooooops, dir changed, see what's going on
+
+ //first mark everything as veryfied
+
+ for(int i=0;i<p_dir->files.size();i++) {
+
+ p_dir->files[i]->verified=false;
+ }
+
+ for(int i=0;i<p_dir->subdirs.size();i++) {
+
+ p_dir->get_subdir(i)->verified=false;
+ }
+
+ //then scan files and directories and check what's different
+
+ DirAccess *da = DirAccess::create(DirAccess::ACCESS_RESOURCES);
+ String cd = p_dir->get_path();
+ da->change_dir(cd);
+ da->list_dir_begin();
+ while (true) {
+
+ bool isdir;
+ String f = da->get_next(&isdir);
+ if (f=="")
+ break;
+
+ if (isdir) {
+
+ if (f.begins_with(".")) //ignore hidden and . / ..
+ continue;
+
+ int idx = p_dir->find_dir_index(f);
+ if (idx==-1) {
+
+ if (FileAccess::exists(cd.plus_file(f).plus_file("engine.cfg"))) // skip if another project inside this
+ continue;
+
+ EditorFileSystemDirectory *efd = memnew( EditorFileSystemDirectory );
+
+ efd->parent=p_dir;
+ efd->name=f;
+ DirAccess *d = DirAccess::create(DirAccess::ACCESS_RESOURCES);
+ d->change_dir(cd.plus_file(f));
+ _scan_new_dir(efd,d,p_progress.get_sub(1,1));
+ memdelete(d);
+
+
+ ItemAction ia;
+ ia.action=ItemAction::ACTION_DIR_ADD;
+ ia.dir=p_dir;
+ ia.file=f;
+ ia.new_dir=efd;
+ scan_actions.push_back(ia);
+ } else {
+ p_dir->subdirs[idx]->verified=true;
+ }
+
+
+ } else {
+ String ext = f.extension().to_lower();
+ if (!valid_extensions.has(ext))
+ continue; //invalid
+
+ int idx = p_dir->find_file_index(f);
+
+ if (idx==-1) {
+ //never seen this file, add actition to add it
+ EditorFileSystemDirectory::FileInfo *fi = memnew( EditorFileSystemDirectory::FileInfo );
+ fi->file=f;
+
+ String path = cd.plus_file(fi->file);
+ fi->modified_time=FileAccess::get_modified_time(path);
+ fi->meta=_get_meta(path);
+ fi->type=ResourceLoader::get_resource_type(path);
+
+ {
+ ItemAction ia;
+ ia.action=ItemAction::ACTION_FILE_ADD;
+ ia.dir=p_dir;
+ ia.file=f;
+ ia.new_file=fi;
+ scan_actions.push_back(ia);
+ }
+
+ //take the chance and scan sources
+ if (_check_meta_sources(fi->meta)) {
+
+ ItemAction ia;
+ ia.action=ItemAction::ACTION_FILE_SOURCES_CHANGED;
+ ia.dir=p_dir;
+ ia.file=f;
+ scan_actions.push_back(ia);
+ }
+
+ } else {
+ p_dir->files[idx]->verified=true;
+ }
+
+
+ }
+
+ }
+ da->list_dir_end();
+ memdelete(da);
+
+
+
+
+ }
for(int i=0;i<p_dir->files.size();i++) {
- if (_check_meta_sources(p_dir->files[i].meta,ep)) {
- sources_changed.push_back(p_dir->get_file_path(i));
+ if (updated_dir && !p_dir->files[i]->verified) {
+ //this file was removed, add action to remove it
+ ItemAction ia;
+ ia.action=ItemAction::ACTION_FILE_REMOVE;
+ ia.dir=p_dir;
+ ia.file=p_dir->files[i]->file;
+ scan_actions.push_back(ia);
+ continue;
+
+ }
+ if (_check_meta_sources(p_dir->files[i]->meta)) {
+ ItemAction ia;
+ ia.action=ItemAction::ACTION_FILE_SOURCES_CHANGED;
+ ia.dir=p_dir;
+ ia.file=p_dir->files[i]->file;
+ scan_actions.push_back(ia);
}
}
for(int i=0;i<p_dir->subdirs.size();i++) {
- _scan_sources(p_dir->get_subdir(i),ep);
+ if (updated_dir && !p_dir->subdirs[i]->verified) {
+ //this directory was removed, add action to remove it
+ ItemAction ia;
+ ia.action=ItemAction::ACTION_DIR_REMOVE;
+ ia.dir=p_dir->subdirs[i];
+ scan_actions.push_back(ia);
+ continue;
+
+ }
+ _scan_fs_changes(p_dir->get_subdir(i),p_progress);
}
}
@@ -619,9 +823,12 @@ void EditorFileSystem::_thread_func_sources(void *_userdata) {
EditorFileSystem *efs = (EditorFileSystem*)_userdata;
if (efs->filesystem) {
- EditorProgressBG pr("sources","ScanSources",efs->md_count);
- efs->ss_amount=0;
- efs->_scan_sources(efs->filesystem,&pr);
+ EditorProgressBG pr("sources","ScanSources",1000);
+ ScanProgress sp;
+ sp.progress=&pr;
+ sp.hi=1;
+ sp.low=0;
+ efs->_scan_fs_changes(efs->filesystem,sp);
}
efs->scanning_sources_done=true;
}
@@ -643,8 +850,17 @@ void EditorFileSystem::scan_sources() {
abort_scan=false;
if (!use_threads) {
- if (filesystem)
- _scan_sources(filesystem,NULL);
+ if (filesystem) {
+ EditorProgressBG pr("sources","ScanSources",1000);
+ ScanProgress sp;
+ sp.progress=&pr;
+ sp.hi=1;
+ sp.low=0;
+ scan_total=0;
+ _scan_fs_changes(filesystem,sp);
+ if (_update_scan_actions())
+ emit_signal("filesystem_changed");
+ }
scanning_sources=false;
scanning_sources_done=true;
emit_signal("sources_changed",sources_changed.size()>0);
@@ -652,8 +868,8 @@ void EditorFileSystem::scan_sources() {
ERR_FAIL_COND(thread_sources);
set_process(true);
+ scan_total=0;
Thread::Settings s;
- ss_amount=0;
s.priority=Thread::PRIORITY_LOW;
thread_sources = Thread::create(_thread_func_sources,this,s);
//tree->hide();
@@ -665,53 +881,14 @@ void EditorFileSystem::scan_sources() {
}
-EditorFileSystemDirectory* EditorFileSystem::_update_tree(DirItem *p_item) {
-
- EditorFileSystemDirectory *efd = memnew( EditorFileSystemDirectory );
-
- if (!p_item)
- return efd; //empty likely
- efd->name=p_item->name;
-
- for(int i=0;i<p_item->files.size();i++) {
-
- String s = p_item->files[i]->type;
- //if (p_item->files[i]->meta)
- // s="*"+s;
-
-// file_type_cache[p_item->files[i]->path]=s;
- if (p_item->files[i]->type=="")
- continue; //ignore because it's invalid
- EditorFileSystemDirectory::FileInfo fi;
- fi.file=p_item->files[i]->file;
- fi.type=p_item->files[i]->type;
- fi.meta=p_item->files[i]->meta;
- fi.modified_time=p_item->files[i]->modified_time;
-
- efd->files.push_back(fi);
-
- }
-
- for(int i=0;i<p_item->dirs.size();i++) {
-
- EditorFileSystemDirectory *efsd =_update_tree(p_item->dirs[i]);
- efsd->parent=efd;
- efd->subdirs.push_back( efsd );
-
- }
-
-
- return efd;
-}
-
void EditorFileSystem::_notification(int p_what) {
switch(p_what) {
case NOTIFICATION_ENTER_TREE: {
- _load_type_cache();
- scan();
+
+ scan();
} break;
case NOTIFICATION_EXIT_TREE: {
if (use_threads && thread) {
@@ -727,13 +904,13 @@ void EditorFileSystem::_notification(int p_what) {
set_process(false);
}
- if (rootdir)
- memdelete(rootdir);
- rootdir=NULL;
if (filesystem)
memdelete(filesystem);
+ if (new_filesystem)
+ memdelete(new_filesystem);
filesystem=NULL;
+ new_filesystem=NULL;
} break;
case NOTIFICATION_PROCESS: {
@@ -751,6 +928,8 @@ void EditorFileSystem::_notification(int p_what) {
Thread::wait_to_finish(thread_sources);
memdelete(thread_sources);
thread_sources=NULL;
+ if (_update_scan_actions())
+ emit_signal("filesystem_changed");
//print_line("sources changed: "+itos(sources_changed.size()));
emit_signal("sources_changed",sources_changed.size()>0);
}
@@ -758,21 +937,14 @@ void EditorFileSystem::_notification(int p_what) {
set_process(false);
- if (rootdir)
- memdelete(rootdir);
if (filesystem)
memdelete(filesystem);
- rootdir=scandir;
- scandir=NULL;
-// file_type_cache.clear();
- filesystem=_update_tree(rootdir);
-
- if (rootdir)
- memdelete(rootdir);
- rootdir=NULL;
+ filesystem=new_filesystem;
+ new_filesystem=NULL;
Thread::wait_to_finish(thread);
memdelete(thread);
thread=NULL;
+ _update_scan_actions();
emit_signal("filesystem_changed");
emit_signal("sources_changed",sources_changed.size()>0);
//print_line("initial sources changed: "+itos(sources_changed.size()));
@@ -794,7 +966,7 @@ bool EditorFileSystem::is_scanning() const {
}
float EditorFileSystem::get_scanning_progress() const {
- return total;
+ return scan_total;
}
EditorFileSystemDirectory *EditorFileSystem::get_filesystem() {
@@ -802,12 +974,12 @@ EditorFileSystemDirectory *EditorFileSystem::get_filesystem() {
return filesystem;
}
-void EditorFileSystem::_save_type_cache_fs(DirItem *p_dir,FileAccess *p_file) {
+void EditorFileSystem::_save_filesystem_cache(EditorFileSystemDirectory*p_dir,FileAccess *p_file) {
if (!p_dir)
return; //none
- p_file->store_line("::"+p_dir->path+"::"+String::num(p_dir->modified_time));
+ p_file->store_line("::"+p_dir->get_path()+"::"+String::num(p_dir->modified_time));
for(int i=0;i<p_dir->files.size();i++) {
@@ -832,126 +1004,96 @@ void EditorFileSystem::_save_type_cache_fs(DirItem *p_dir,FileAccess *p_file) {
p_file->store_line(s);
}
- for(int i=0;i<p_dir->dirs.size();i++) {
+ for(int i=0;i<p_dir->subdirs.size();i++) {
- _save_type_cache_fs(p_dir->dirs[i],p_file);
+ _save_filesystem_cache(p_dir->subdirs[i],p_file);
}
}
-void EditorFileSystem::_load_type_cache(){
-
- GLOBAL_LOCK_FUNCTION
-
-
-#if 0
- //this is not good, removed for now as it interferes with metadata stored in files
-
- String project=Globals::get_singleton()->get_resource_path();
- FileAccess *f =FileAccess::open(project+"/types.cache",FileAccess::READ);
-
- if (!f) {
-
- WARN_PRINT("Can't open types.cache.");
- return;
- }
-
- file_type_cache.clear();
- while(!f->eof_reached()) {
-
- String path=f->get_line();
- if (f->eof_reached())
- break;
- String type=f->get_line();
- file_type_cache[path]=type;
- }
-
- memdelete(f);
-#endif
-}
bool EditorFileSystem::_find_file(const String& p_file,EditorFileSystemDirectory ** r_d, int &r_file_pos) const {
//todo make faster
- if (!filesystem || scanning)
- return false;
+ if (!filesystem || scanning)
+ return false;
- String f = Globals::get_singleton()->localize_path(p_file);
+ String f = Globals::get_singleton()->localize_path(p_file);
- if (!f.begins_with("res://"))
- return false;
- f=f.substr(6,f.length());
- f=f.replace("\\","/");
+ if (!f.begins_with("res://"))
+ return false;
+ f=f.substr(6,f.length());
+ f=f.replace("\\","/");
- Vector<String> path = f.split("/");
+ Vector<String> path = f.split("/");
- if (path.size()==0)
- return false;
- String file=path[path.size()-1];
- path.resize(path.size()-1);
+ if (path.size()==0)
+ return false;
+ String file=path[path.size()-1];
+ path.resize(path.size()-1);
- EditorFileSystemDirectory *fs=filesystem;
+ EditorFileSystemDirectory *fs=filesystem;
- for(int i=0;i<path.size();i++) {
+ for(int i=0;i<path.size();i++) {
- int idx=-1;
- for(int j=0;j<fs->get_subdir_count();j++) {
+ int idx=-1;
+ for(int j=0;j<fs->get_subdir_count();j++) {
- if (fs->get_subdir(j)->get_name()==path[i]) {
- idx=j;
- break;
- }
- }
+ if (fs->get_subdir(j)->get_name()==path[i]) {
+ idx=j;
+ break;
+ }
+ }
- if (idx==-1) {
- //does not exist, create i guess?
- EditorFileSystemDirectory *efsd = memnew( EditorFileSystemDirectory );
- efsd->name=path[i];
- int idx2=0;
- for(int j=0;j<fs->get_subdir_count();j++) {
+ if (idx==-1) {
+ //does not exist, create i guess?
+ EditorFileSystemDirectory *efsd = memnew( EditorFileSystemDirectory );
+ efsd->name=path[i];
+ int idx2=0;
+ for(int j=0;j<fs->get_subdir_count();j++) {
- if (efsd->name<fs->get_subdir(j)->get_name())
- break;
- idx2++;
- }
+ if (efsd->name<fs->get_subdir(j)->get_name())
+ break;
+ idx2++;
+ }
- if (idx2==fs->get_subdir_count())
- fs->subdirs.push_back(efsd);
- else
- fs->subdirs.insert(idx2,efsd);
- fs=efsd;
- } else {
+ if (idx2==fs->get_subdir_count())
+ fs->subdirs.push_back(efsd);
+ else
+ fs->subdirs.insert(idx2,efsd);
+ fs=efsd;
+ } else {
- fs=fs->get_subdir(idx);
+ fs=fs->get_subdir(idx);
+ }
}
- }
- int cpos=-1;
- for(int i=0;i<fs->files.size();i++) {
+ int cpos=-1;
+ for(int i=0;i<fs->files.size();i++) {
- if (fs->files[i].file==file) {
- cpos=i;
- break;
+ if (fs->files[i]->file==file) {
+ cpos=i;
+ break;
+ }
}
- }
r_file_pos=cpos;
*r_d=fs;
- if (cpos!=-1) {
+ if (cpos!=-1) {
- return true;
- } else {
+ return true;
+ } else {
- return false;
- }
+ return false;
+ }
}
@@ -967,7 +1109,7 @@ String EditorFileSystem::get_file_type(const String& p_file) const {
}
- return fs->files[cpos].type;
+ return fs->files[cpos]->type;
}
@@ -1024,16 +1166,16 @@ EditorFileSystemDirectory *EditorFileSystem::get_path(const String& p_path) {
void EditorFileSystem::_resource_saved(const String& p_path){
- print_line("resource saved: "+p_path);
+ //print_line("resource saved: "+p_path);
EditorFileSystem::get_singleton()->update_file(p_path);
}
String EditorFileSystem::_find_first_from_source(EditorFileSystemDirectory* p_dir,const String &p_src) const {
for(int i=0;i<p_dir->files.size();i++) {
- for(int j=0;j<p_dir->files[i].meta.sources.size();j++) {
+ for(int j=0;j<p_dir->files[i]->meta.sources.size();j++) {
- if (p_dir->files[i].meta.sources[j].path==p_src)
+ if (p_dir->files[i]->meta.sources[j].path==p_src)
return p_dir->get_file_path(i);
}
}
@@ -1070,6 +1212,7 @@ void EditorFileSystem::update_file(const String& p_file) {
if (!FileAccess::exists(p_file)) {
//was removed
+ memdelete( fs->files[cpos] );
fs->files.remove(cpos);
call_deferred("emit_signal","filesystem_changed"); //update later
return;
@@ -1083,13 +1226,13 @@ void EditorFileSystem::update_file(const String& p_file) {
int idx=0;
for(int i=0;i<fs->files.size();i++) {
- if (p_file<fs->files[i].file)
+ if (p_file<fs->files[i]->file)
break;
idx++;
}
- EditorFileSystemDirectory::FileInfo fi;
- fi.file=p_file.get_file();
+ EditorFileSystemDirectory::FileInfo *fi = memnew( EditorFileSystemDirectory::FileInfo );
+ fi->file=p_file.get_file();
if (idx==fs->files.size()) {
fs->files.push_back(fi);
@@ -1102,10 +1245,10 @@ void EditorFileSystem::update_file(const String& p_file) {
}
- print_line("UPDATING: "+p_file);
- fs->files[cpos].type=type;
- fs->files[cpos].modified_time=FileAccess::get_modified_time(p_file);
- fs->files[cpos].meta=_get_meta(p_file);
+ //print_line("UPDATING: "+p_file);
+ fs->files[cpos]->type=type;
+ fs->files[cpos]->modified_time=FileAccess::get_modified_time(p_file);
+ fs->files[cpos]->meta=_get_meta(p_file);
call_deferred("emit_signal","filesystem_changed"); //update later
@@ -1128,15 +1271,22 @@ EditorFileSystem::EditorFileSystem() {
thread = NULL;
scanning=false;
- scandir=NULL;
- rootdir=NULL;
use_threads=true;
thread_sources=NULL;
+ new_filesystem=NULL;
scanning_sources=false;
ResourceSaver::set_save_callback(_resource_saved);
+ List<String> extensionsl;
+ ResourceLoader::get_recognized_extensions_for_type("",&extensionsl);
+ for(List<String>::Element *E = extensionsl.front();E;E=E->next()) {
+
+ valid_extensions.insert(E->get());
+ }
+
+ scan_total=0;
}
EditorFileSystem::~EditorFileSystem() {
diff --git a/tools/editor/editor_file_system.h b/tools/editor/editor_file_system.h
index f79dd209ef..d11fa0cfb1 100644
--- a/tools/editor/editor_file_system.h
+++ b/tools/editor/editor_file_system.h
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -42,6 +42,8 @@ class EditorFileSystemDirectory : public Object {
OBJ_TYPE( EditorFileSystemDirectory,Object );
String name;
+ uint64_t modified_time;
+ bool verified; //used for checking changes
EditorFileSystemDirectory *parent;
Vector<EditorFileSystemDirectory*> subdirs;
@@ -68,11 +70,20 @@ class EditorFileSystemDirectory : public Object {
String file;
StringName type;
uint64_t modified_time;
-
ImportMeta meta;
+ bool verified; //used for checking changes
+
+ };
+
+ struct FileInfoSort {
+ bool operator()(const FileInfo *p_a,const FileInfo *p_b) const {
+ return p_a->file<p_b->file;
+ }
};
- Vector<FileInfo> files;
+ void sort_files();
+
+ Vector<FileInfo*> files;
static void _bind_methods();
@@ -96,6 +107,9 @@ public:
EditorFileSystemDirectory *get_parent();
+ int find_file_index(const String& p_file) const;
+ int find_dir_index(const String& p_dir) const;
+
EditorFileSystemDirectory();
~EditorFileSystemDirectory();
@@ -107,45 +121,47 @@ class EditorFileSystem : public Node {
_THREAD_SAFE_CLASS_
- struct SceneItem {
+
+ struct ItemAction {
+
+ enum Action {
+ ACTION_NONE,
+ ACTION_DIR_ADD,
+ ACTION_DIR_REMOVE,
+ ACTION_FILE_ADD,
+ ACTION_FILE_REMOVE,
+ ACTION_FILE_SOURCES_CHANGED
+ };
+
+ Action action;
+ EditorFileSystemDirectory *dir;
String file;
- String path;
- String type;
- uint64_t modified_time;
- EditorFileSystemDirectory::ImportMeta meta;
- };
+ EditorFileSystemDirectory *new_dir;
+ EditorFileSystemDirectory::FileInfo *new_file;
- struct DirItem {
+ ItemAction() { action=ACTION_NONE; dir=NULL; new_dir=NULL; new_file=NULL; }
- uint64_t modified_time;
- String path;
- String name;
- Vector<DirItem*> dirs;
- Vector<SceneItem*> files;
- ~DirItem();
};
- float total;
bool use_threads;
Thread *thread;
static void _thread_func(void *_userdata);
- DirItem *scandir;
- DirItem *rootdir;
+ EditorFileSystemDirectory *new_filesystem;
bool abort_scan;
bool scanning;
+ float scan_total;
- EditorFileSystemDirectory* _update_tree(DirItem *p_item);
- void _scan_scenes();
- void _load_type_cache();
+ void _scan_filesystem();
EditorFileSystemDirectory *filesystem;
static EditorFileSystem *singleton;
+ /* Used for reading the filesystem cache file */
struct FileCache {
String type;
@@ -154,34 +170,43 @@ class EditorFileSystem : public Node {
Vector<String> deps;
};
- struct DirCache {
+ HashMap<String,FileCache> file_cache;
- uint64_t modification_time;
- Set<String> files;
- Set<String> subdirs;
- };
+ struct ScanProgress {
+ float low;
+ float hi;
+ mutable EditorProgressBG *progress;
+ void update(int p_current,int p_total) const;
+ ScanProgress get_sub(int p_current,int p_total) const;
+ };
static EditorFileSystemDirectory::ImportMeta _get_meta(const String& p_path);
- bool _check_meta_sources(EditorFileSystemDirectory::ImportMeta & p_meta,EditorProgressBG *ep=NULL);
+ bool _check_meta_sources(EditorFileSystemDirectory::ImportMeta & p_meta);
- DirItem* _scan_dir(DirAccess *da,Set<String> &extensions,String p_name,float p_from,float p_range,const String& p_path,HashMap<String,FileCache> &file_cache,HashMap<String,DirCache> &dir_cache,EditorProgressBG& p_prog);
- void _save_type_cache_fs(DirItem *p_dir,FileAccess *p_file);
+ void _save_filesystem_cache(EditorFileSystemDirectory *p_dir,FileAccess *p_file);
bool _find_file(const String& p_file,EditorFileSystemDirectory ** r_d, int &r_file_pos) const;
- void _scan_sources(EditorFileSystemDirectory *p_dir,EditorProgressBG *ep);
+ void _scan_fs_changes(EditorFileSystemDirectory *p_dir, const ScanProgress &p_progress);
int md_count;
+ Set<String> valid_extensions;
+
+ void _scan_new_dir(EditorFileSystemDirectory *p_dir,DirAccess *da,const ScanProgress& p_progress);
Thread *thread_sources;
bool scanning_sources;
bool scanning_sources_done;
- int ss_amount;
+
static void _thread_func_sources(void *_userdata);
+
List<String> sources_changed;
+ List<ItemAction> scan_actions;
+
+ bool _update_scan_actions();
static void _resource_saved(const String& p_path);
String _find_first_from_source(EditorFileSystemDirectory* p_dir,const String &p_src) const;
diff --git a/tools/editor/editor_fonts.cpp b/tools/editor/editor_fonts.cpp
index f145f1ddef..b12b041f16 100644
--- a/tools/editor/editor_fonts.cpp
+++ b/tools/editor/editor_fonts.cpp
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/tools/editor/editor_fonts.h b/tools/editor/editor_fonts.h
index cc990a560c..3b2422c3e3 100644
--- a/tools/editor/editor_fonts.h
+++ b/tools/editor/editor_fonts.h
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/tools/editor/editor_help.cpp b/tools/editor/editor_help.cpp
index 808199e175..2ece518f8d 100644
--- a/tools/editor/editor_help.cpp
+++ b/tools/editor/editor_help.cpp
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -36,6 +36,14 @@
#include "os/keyboard.h"
+void EditorHelpSearch::popup() {
+ popup_centered_ratio(0.6);
+ if (search_box->get_text()!="") {
+ search_box->select_all();
+ _update_search();
+ }
+ search_box->grab_focus();
+}
void EditorHelpSearch::popup(const String& p_term) {
@@ -263,7 +271,7 @@ void EditorHelpSearch::_confirmed() {
String mdata=ti->get_metadata(0);
emit_signal("go_to_help",mdata);
- editor->call("_editor_select",3); // in case EditorHelpSearch beeen invoked on top of other editor window
+ editor->call("_editor_select",EditorNode::EDITOR_SCRIPT); // in case EditorHelpSearch beeen invoked on top of other editor window
// go to that
hide();
}
@@ -682,16 +690,28 @@ Error EditorHelp::_goto_desc(const String& p_class,int p_vscr) {
class_desc->pop();
//class_desc->add_newline();
- class_desc->add_newline();
+// class_desc->add_newline();
class_desc->push_indent(1);
+ class_desc->push_table(2);
+ class_desc->set_table_column_expand(1,1);
for(int i=0;i<cd.methods.size();i++) {
+ class_desc->push_cell();
+
+
method_line[cd.methods[i].name]=class_desc->get_line_count()-2; //gets overriden if description
+ class_desc->push_align(RichTextLabel::ALIGN_RIGHT);
class_desc->push_font(doc_code_font);
_add_type(cd.methods[i].return_type);
- class_desc->add_text(" ");
+ //class_desc->add_text(" ");
+ class_desc->pop(); //align
+ class_desc->pop(); //font
+ class_desc->pop(); //cell
+ class_desc->push_cell();
+ class_desc->push_font(doc_code_font);
+
if (cd.methods[i].description!="") {
method_descr=true;
class_desc->push_meta("@"+cd.methods[i].name);
@@ -734,12 +754,14 @@ Error EditorHelp::_goto_desc(const String& p_class,int p_vscr) {
}
class_desc->pop();//monofont
- class_desc->add_newline();
+// class_desc->add_newline();
+ class_desc->pop(); //cell
}
-
+ class_desc->pop(); //table
class_desc->pop();
class_desc->add_newline();
+ class_desc->add_newline();
}
@@ -1049,7 +1071,7 @@ Error EditorHelp::_goto_desc(const String& p_class,int p_vscr) {
void EditorHelp::_request_help(const String& p_string) {
Error err = _goto_desc(p_string);
if (err==OK) {
- editor->call("_editor_select",3);
+ editor->call("_editor_select",EditorNode::EDITOR_SCRIPT);
}
//100 palabras
}
@@ -1089,7 +1111,7 @@ void EditorHelp::_help_callback(const String& p_topic) {
line=constant_line[name];
}
- class_desc->scroll_to_line(line);
+ class_desc->call_deferred("scroll_to_line", line);
}
@@ -1350,7 +1372,6 @@ void EditorHelp::_notification(int p_what) {
// forward->set_icon(get_icon("Forward","EditorIcons"));
// back->set_icon(get_icon("Back","EditorIcons"));
_update_doc();
- editor->connect("request_help",this,"_request_help");
} break;
}
diff --git a/tools/editor/editor_help.h b/tools/editor/editor_help.h
index b5ee6eca6c..059a7ae11d 100644
--- a/tools/editor/editor_help.h
+++ b/tools/editor/editor_help.h
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -68,7 +68,8 @@ protected:
static void _bind_methods();
public:
- void popup(const String& p_term="");
+ void popup();
+ void popup(const String& p_term);
EditorHelpSearch();
};
diff --git a/tools/editor/editor_icons.h b/tools/editor/editor_icons.h
index 910febc895..191b908682 100644
--- a/tools/editor/editor_icons.h
+++ b/tools/editor/editor_icons.h
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/tools/editor/editor_import_export.cpp b/tools/editor/editor_import_export.cpp
index f52c6e67a2..77331256f3 100644
--- a/tools/editor/editor_import_export.cpp
+++ b/tools/editor/editor_import_export.cpp
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -41,6 +41,8 @@
#include "io/md5.h"
#include "io_plugins/editor_texture_import_plugin.h"
#include "tools/editor/plugins/script_editor_plugin.h"
+#include "io/zip_io.h"
+
String EditorImportPlugin::validate_source_path(const String& p_path) {
@@ -399,6 +401,40 @@ Vector<StringName> EditorExportPlatform::get_dependencies(bool p_bundles) const
}
+String EditorExportPlatform::find_export_template(String template_file_name, String *err) const {
+ String user_file = EditorSettings::get_singleton()->get_settings_path()
+ +"/templates/"+template_file_name;
+ String system_file=OS::get_singleton()->get_installed_templates_path();
+ bool has_system_path=(system_file!="");
+ system_file+=template_file_name;
+
+ // Prefer user file
+ if (FileAccess::exists(user_file)) {
+ return user_file;
+ }
+
+ // Now check system file
+ if (has_system_path) {
+ if (FileAccess::exists(system_file)) {
+ return system_file;
+ }
+ }
+
+ // Not found
+ if (err) {
+ *err+="No export template found at \""+user_file+"\"";
+ if (has_system_path)
+ *err+="\n or \""+system_file+"\".";
+ else
+ *err+=".";
+ }
+ return "";
+}
+
+bool EditorExportPlatform::exists_export_template(String template_file_name, String *err) const {
+ return find_export_template(template_file_name,err)!="";
+}
+
///////////////////////////////////////
@@ -419,6 +455,9 @@ bool EditorExportPlatformPC::_set(const StringName& p_name, const Variant& p_val
} else if (n=="resources/pack_mode") {
export_mode=ExportMode(int(p_value));
+ } else if (n=="resources/bundle_dependencies_(for_optical_disc)") {
+
+ bundle=p_value;
} else if (n=="binary/64_bits") {
use64=p_value;
@@ -442,6 +481,9 @@ bool EditorExportPlatformPC::_get(const StringName& p_name,Variant &r_ret) const
} else if (n=="resources/pack_mode") {
r_ret=export_mode;
+ } else if (n=="resources/bundle_dependencies_(for_optical_disc)") {
+
+ r_ret=bundle;
} else if (n=="binary/64_bits") {
r_ret=use64;
@@ -456,7 +498,8 @@ void EditorExportPlatformPC::_get_property_list( List<PropertyInfo> *p_list) con
p_list->push_back( PropertyInfo( Variant::STRING, "custom_binary/debug", PROPERTY_HINT_GLOBAL_FILE,binary_extension));
p_list->push_back( PropertyInfo( Variant::STRING, "custom_binary/release", PROPERTY_HINT_GLOBAL_FILE,binary_extension));
- p_list->push_back( PropertyInfo( Variant::INT, "resources/pack_mode", PROPERTY_HINT_ENUM,"Single Exec.,Exec+Pack (.pck),Copy,Bundles (Optical)"));
+ p_list->push_back( PropertyInfo( Variant::INT, "resources/pack_mode", PROPERTY_HINT_ENUM,"Pack into executable,Pack into binary file (.pck),Pack into archive file (.zip)"));
+ p_list->push_back( PropertyInfo( Variant::BOOL, "resources/bundle_dependencies_(for_optical_disc)"));
p_list->push_back( PropertyInfo( Variant::BOOL, "binary/64_bits"));
}
@@ -957,6 +1000,9 @@ void EditorExportPlatform::gen_export_flags(Vector<String> &r_flags, int p_flags
String host = EditorSettings::get_singleton()->get("network/debug_host");
+ if (p_flags&EXPORT_REMOTE_DEBUG_LOCALHOST)
+ host="localhost";
+
if (p_flags&EXPORT_DUMB_CLIENT) {
int port = EditorSettings::get_singleton()->get("file_server/port");
String passwd = EditorSettings::get_singleton()->get("file_server/password");
@@ -971,6 +1017,7 @@ void EditorExportPlatform::gen_export_flags(Vector<String> &r_flags, int p_flags
if (p_flags&EXPORT_REMOTE_DEBUG) {
r_flags.push_back("-rdebug");
+
r_flags.push_back(host+":"+String::num(GLOBAL_DEF("debug/debug_port", 6007)));
List<String> breakpoints;
@@ -1028,7 +1075,7 @@ Error EditorExportPlatform::save_pack_file(void *p_userdata,const String& p_path
MD5Final(&ctx);
pd->f->store_buffer(ctx.digest,16);
}
- pd->ep->step("Storing File: "+p_path,2+p_file*100/p_total);
+ pd->ep->step("Storing File: "+p_path,2+p_file*100/p_total,false);
pd->count++;
pd->ftmp->store_buffer(p_data.ptr(),p_data.size());
if (pd->alignment > 1) {
@@ -1043,6 +1090,58 @@ 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<uint8_t>& 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,
+ path.utf8().get_data(),
+ NULL,
+ NULL,
+ 0,
+ NULL,
+ 0,
+ NULL,
+ Z_DEFLATED,
+ Z_DEFAULT_COMPRESSION);
+
+ zipWriteInFileInZip(zip,p_data.ptr(),p_data.size());
+ zipCloseFileInZip(zip);
+
+ zd->ep->step("Storing File: "+p_path,2+p_file*100/p_total,false);
+ zd->count++;
+ return OK;
+
+}
+
+Error EditorExportPlatform::save_zip(const String& p_path, bool p_make_bundles) {
+
+ EditorProgress ep("savezip","Packing",102);
+
+ //FileAccess *tmp = FileAccess::open(tmppath,FileAccess::WRITE);
+
+ FileAccess *src_f;
+ zlib_filefunc_def io = zipio_create_io_from_file(&src_f);
+ zipFile zip=zipOpen2(p_path.utf8().get_data(),APPEND_STATUS_CREATE,NULL,&io);
+
+ ZipData zd;
+ zd.count=0;
+ zd.ep=&ep;
+ zd.zip=zip;
+
+
+ Error err = export_project_files(save_zip_file,&zd,p_make_bundles);
+
+ zipClose(zip,NULL);
+
+ return err;
+}
+
Error EditorExportPlatform::save_pack(FileAccess *dst,bool p_make_bundles, int p_alignment) {
EditorProgress ep("savepack","Packing",102);
@@ -1131,19 +1230,32 @@ Error EditorExportPlatformPC::export_project(const String& p_path, bool p_debug,
ep.step("Setting Up..",0);
- String exe_path = EditorSettings::get_singleton()->get_settings_path()+"/templates/";
- if (use64) {
- if (p_debug)
- exe_path=custom_debug_binary!=""?custom_debug_binary:exe_path+debug_binary64;
- else
- exe_path=custom_release_binary!=""?custom_release_binary:exe_path+release_binary64;
- } else {
+ String exe_path="";
- if (p_debug)
- exe_path=custom_debug_binary!=""?custom_debug_binary:exe_path+debug_binary32;
- else
- exe_path=custom_release_binary!=""?custom_release_binary:exe_path+release_binary32;
+ if (p_debug)
+ exe_path=custom_debug_binary;
+ else
+ exe_path=custom_release_binary;
+ if (exe_path=="") {
+ String fname;
+ if (use64) {
+ if (p_debug)
+ fname=debug_binary64;
+ else
+ fname=release_binary64;
+ } else {
+ if (p_debug)
+ fname=debug_binary32;
+ else
+ fname=release_binary32;
+ }
+ String err="";
+ exe_path=find_export_template(fname,&err);
+ if (exe_path=="") {
+ EditorNode::add_io_error(err);
+ return ERR_FILE_CANT_READ;
+ }
}
FileAccess *src_exe=FileAccess::open(exe_path,FileAccess::READ);
@@ -1173,26 +1285,32 @@ Error EditorExportPlatformPC::export_project(const String& p_path, bool p_debug,
}
}
+ String dstfile = p_path.replace_first("res://","").replace("\\","/");
if (export_mode!=EXPORT_EXE) {
- String dstfile=p_path.replace_first("res://","").replace("\\","/");
+ String dstfile_extension=export_mode==EXPORT_ZIP?".zip":".pck";
if (dstfile.find("/")!=-1)
- dstfile=dstfile.get_base_dir()+"/data.pck";
+ dstfile=dstfile.get_base_dir()+"/data"+dstfile_extension;
else
- dstfile="data.pck";
+ dstfile="data"+dstfile_extension;
+ if (export_mode==EXPORT_PACK) {
- memdelete(dst);
- dst=FileAccess::open(dstfile,FileAccess::WRITE);
- if (!dst) {
+ memdelete(dst);
- EditorNode::add_io_error("Can't write data pack to:\n "+p_path);
- return ERR_FILE_CANT_WRITE;
+ dst=FileAccess::open(dstfile,FileAccess::WRITE);
+ if (!dst) {
+
+ EditorNode::add_io_error("Can't write data pack to:\n "+p_path);
+ return ERR_FILE_CANT_WRITE;
+ }
}
}
+
+
memdelete(src_exe);
- Error err = save_pack(dst,export_mode==EXPORT_BUNDLES);
+ Error err = export_mode==EXPORT_ZIP?save_zip(dstfile,bundle):save_pack(dst,bundle);
memdelete(dst);
return err;
}
@@ -1207,14 +1325,12 @@ bool EditorExportPlatformPC::can_export(String *r_error) const {
String err;
bool valid=true;
- String exe_path = EditorSettings::get_singleton()->get_settings_path()+"/templates/";
-
- if (use64 && (!FileAccess::exists(exe_path+debug_binary64) || !FileAccess::exists(exe_path+release_binary64))) {
+ if (use64 && (!exists_export_template(debug_binary64)) || !exists_export_template(release_binary64)) {
valid=false;
err="No 64 bits export templates found.\nDownload and install export templates.\n";
}
- if (!use64 && (!FileAccess::exists(exe_path+debug_binary32) || !FileAccess::exists(exe_path+release_binary32))) {
+ if (!use64 && (!exists_export_template(debug_binary32) || !exists_export_template(release_binary32))) {
valid=false;
err="No 32 bits export templates found.\nDownload and install export templates.\n";
}
@@ -1562,6 +1678,17 @@ void EditorImportExport::image_export_get_images_in_group(const StringName& p_gr
}
}
+void EditorImportExport::set_convert_text_scenes(bool p_convert) {
+
+ convert_text_scenes=p_convert;
+}
+
+bool EditorImportExport::get_convert_text_scenes() const{
+
+ return convert_text_scenes;
+}
+
+
void EditorImportExport::load_config() {
Ref<ConfigFile> cf = memnew( ConfigFile );
@@ -1604,6 +1731,12 @@ void EditorImportExport::load_config() {
}
}
+ if (cf->has_section("convert_scenes")) {
+
+ convert_text_scenes = cf->get_value("convert_scenes","convert_text_scenes");
+ }
+
+
if (cf->has_section("export_filter_files")) {
@@ -1720,6 +1853,15 @@ void EditorImportExport::load_config() {
if (cf->has_section("convert_samples")) {
+ if (cf->has_section_key("convert_samples","action")) {
+ String action = cf->get_value("convert_samples","action");
+ if (action=="none") {
+ sample_action=SAMPLE_ACTION_NONE;
+ } else if (action=="compress_ram") {
+ sample_action=SAMPLE_ACTION_COMPRESS_RAM;
+ }
+ }
+
if (cf->has_section_key("convert_samples","max_hz"))
sample_action_max_hz=cf->get_value("convert_samples","max_hz");
@@ -1837,6 +1979,8 @@ void EditorImportExport::save_config() {
case SCRIPT_ACTION_ENCRYPT: cf->set_value("script","action","encrypt"); break;
}
+ cf->set_value("convert_scenes","convert_text_scenes",convert_text_scenes);
+
cf->set_value("script","encrypt_key",script_key);
switch(sample_action) {
@@ -1935,6 +2079,8 @@ EditorImportExport::EditorImportExport() {
sample_action_max_hz=44100;
sample_action_trim=false;
+ convert_text_scenes=true;
+
}
diff --git a/tools/editor/editor_import_export.h b/tools/editor/editor_import_export.h
index 1a3171e66b..272464d9b0 100644
--- a/tools/editor/editor_import_export.h
+++ b/tools/editor/editor_import_export.h
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -33,6 +33,7 @@
#include "scene/main/node.h"
#include "scene/resources/texture.h"
+
class EditorExportPlatform;
class FileAccess;
class EditorProgress;
@@ -86,6 +87,8 @@ protected:
Vector<uint8_t> get_exported_file_default(String& p_fname) const;
virtual Vector<uint8_t> get_exported_file(String& p_fname) const;
virtual Vector<StringName> get_dependencies(bool p_bundles) const;
+ virtual String find_export_template(String template_file_name, String *err=NULL) const;
+ virtual bool exists_export_template(String template_file_name, String *err=NULL) const;
struct TempData {
@@ -105,8 +108,17 @@ protected:
};
+ struct ZipData {
+
+ void* zip;
+ EditorProgress *ep;
+ int count;
+
+ };
+
void gen_export_flags(Vector<String> &r_flags, int p_flags);
static Error save_pack_file(void *p_userdata,const String& p_path, const Vector<uint8_t>& p_data,int p_file,int p_total);
+ static Error save_zip_file(void *p_userdata,const String& p_path, const Vector<uint8_t>& p_data,int p_file,int p_total);
public:
@@ -124,14 +136,17 @@ public:
enum ExportFlags {
EXPORT_DUMB_CLIENT=1,
EXPORT_REMOTE_DEBUG=2,
- EXPORT_VIEW_COLLISONS=4,
- EXPORT_VIEW_NAVIGATION=8
+ EXPORT_REMOTE_DEBUG_LOCALHOST=4,
+ EXPORT_VIEW_COLLISONS=8,
+ EXPORT_VIEW_NAVIGATION=16,
};
Error export_project_files(EditorExportSaveFunction p_func, void* p_udata,bool p_make_bundles);
Error save_pack(FileAccess *p_where, bool p_make_bundles=false, int p_alignment = 1);
+ Error save_zip(const String& p_path, bool p_make_bundles=false);
+
virtual String get_name() const =0;
virtual ImageCompression get_image_compression() const=0;
virtual Ref<Texture> get_logo() const =0;
@@ -161,8 +176,7 @@ public:
enum ExportMode {
EXPORT_EXE,
EXPORT_PACK,
- EXPORT_COPY,
- EXPORT_BUNDLES
+ EXPORT_ZIP
};
@@ -184,6 +198,7 @@ private:
Ref<Texture> logo;
ExportMode export_mode;
+ bool bundle;
protected:
bool _set(const StringName& p_name, const Variant& p_value);
@@ -284,6 +299,8 @@ protected:
int sample_action_max_hz;
bool sample_action_trim;
+ bool convert_text_scenes;
+
static EditorImportExport* singleton;
static void _bind_methods();
@@ -362,6 +379,9 @@ public:
void sample_set_trim(bool p_trim);
bool sample_get_trim() const;
+ void set_convert_text_scenes(bool p_convert);
+ bool get_convert_text_scenes() const;
+
void load_config();
void save_config();
diff --git a/tools/editor/editor_log.cpp b/tools/editor/editor_log.cpp
index 264117eecd..bcdafbb06a 100644
--- a/tools/editor/editor_log.cpp
+++ b/tools/editor/editor_log.cpp
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -79,8 +79,6 @@ void EditorLog::_notification(int p_what) {
if (p_what==NOTIFICATION_ENTER_TREE) {
log->add_color_override("default_color",get_color("font_color","Tree"));
- tb->set_normal_texture( get_icon("Collapse","EditorIcons"));
- tb->set_hover_texture( get_icon("CollapseHl","EditorIcons"));
//button->set_icon(get_icon("Console","EditorIcons"));
}
@@ -98,11 +96,6 @@ void EditorLog::_notification(int p_what) {
}
-void EditorLog::_close_request() {
-
- _flip_request();
-
-}
void EditorLog::_clear_request() {
@@ -122,17 +115,17 @@ void EditorLog::add_message(const String& p_msg,bool p_error) {
if (p_error) {
Ref<Texture> icon = get_icon("Error","EditorIcons");
log->add_image( icon );
- button->set_icon(icon);
+ //button->set_icon(icon);
log->push_color(get_color("fg_error","Editor"));
} else {
- button->set_icon(Ref<Texture>());
+ //button->set_icon(Ref<Texture>());
}
log->add_newline();
log->add_text(p_msg);
- button->set_text(p_msg);
+// button->set_text(p_msg);
if (p_error)
log->pop();
@@ -156,21 +149,7 @@ void EditorLog::_dragged(const Point2& p_ofs) {
*/
-Button *EditorLog::get_button() {
- return button;
-}
-
-void EditorLog::_flip_request() {
-
- if (is_visible()) {
- hide();
- button->show();
- } else {
- show();
- button->hide();
- }
-}
void EditorLog::_undo_redo_cbk(void *p_self,const String& p_name) {
@@ -181,21 +160,16 @@ void EditorLog::_undo_redo_cbk(void *p_self,const String& p_name) {
void EditorLog::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("_close_request"),&EditorLog::_close_request );
- ObjectTypeDB::bind_method(_MD("_flip_request"),&EditorLog::_flip_request );
ObjectTypeDB::bind_method(_MD("_clear_request"),&EditorLog::_clear_request );
//ObjectTypeDB::bind_method(_MD("_dragged"),&EditorLog::_dragged );
- ADD_SIGNAL( MethodInfo("close_request"));
- ADD_SIGNAL( MethodInfo("show_request"));
ADD_SIGNAL( MethodInfo("clear_request"));
}
EditorLog::EditorLog() {
- VBoxContainer *vb = memnew( VBoxContainer);
- add_child(vb);
- vb->set_v_size_flags(SIZE_EXPAND_FILL);
+ VBoxContainer *vb = this;
+ add_constant_override("separation",get_constant("separation","VBoxContainer"));
HBoxContainer *hb = memnew( HBoxContainer );
vb->add_child(hb);
@@ -204,14 +178,6 @@ EditorLog::EditorLog() {
title->set_h_size_flags(SIZE_EXPAND_FILL);
hb->add_child(title);
-
- button = memnew( Button );
- button->set_text_align(Button::ALIGN_LEFT);
- button->connect("pressed",this,"_flip_request");
- button->set_focus_mode(FOCUS_NONE);
- button->set_clip_text(true);
- button->set_tooltip("Open/Close output panel.");
-
//pd = memnew( PaneDrag );
//hb->add_child(pd);
//pd->connect("dragged",this,"_dragged");
@@ -222,14 +188,9 @@ EditorLog::EditorLog() {
clearbutton->set_text("Clear");
clearbutton->connect("pressed", this,"_clear_request");
- tb = memnew( TextureButton );
- hb->add_child(tb);
- tb->connect("pressed",this,"_close_request");
-
-
ec = memnew( Control);
vb->add_child(ec);
- ec->set_custom_minimum_size(Size2(0,100));
+ ec->set_custom_minimum_size(Size2(0,180));
ec->set_v_size_flags(SIZE_EXPAND_FILL);
@@ -243,9 +204,8 @@ EditorLog::EditorLog() {
log->set_selection_enabled(true);
log->set_focus_mode(FOCUS_CLICK);
pc->add_child(log);
- add_message(VERSION_FULL_NAME" (c) 2008-2015 Juan Linietsky, Ariel Manzur.");
+ add_message(VERSION_FULL_NAME" (c) 2008-2016 Juan Linietsky, Ariel Manzur.");
//log->add_text("Initialization Complete.\n"); //because it looks cool.
- add_style_override("panel",get_stylebox("panelf","Panel"));
eh.errfunc=_error_handler;
eh.userdata=this;
@@ -255,7 +215,6 @@ EditorLog::EditorLog() {
EditorNode::get_undo_redo()->set_commit_notify_callback(_undo_redo_cbk,this);
- hide();
}
diff --git a/tools/editor/editor_log.h b/tools/editor/editor_log.h
index 93044f9a2d..699be710d8 100644
--- a/tools/editor/editor_log.h
+++ b/tools/editor/editor_log.h
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -40,15 +40,13 @@
#include "scene/gui/tool_button.h"
#include "pane_drag.h"
#include "os/thread.h"
-class EditorLog : public PanelContainer {
+class EditorLog : public VBoxContainer {
- OBJ_TYPE( EditorLog, PanelContainer );
+ OBJ_TYPE( EditorLog, VBoxContainer );
- Button *button;
Button *clearbutton;
Label *title;
RichTextLabel *log;
- TextureButton *tb;
HBoxContainer *title_hb;
// PaneDrag *pd;
Control *ec;
@@ -60,8 +58,6 @@ class EditorLog : public PanelContainer {
Thread::ID current;
// void _dragged(const Point2& p_ofs);
- void _close_request();
- void _flip_request();
void _clear_request();
static void _undo_redo_cbk(void *p_self,const String& p_name);
protected:
@@ -73,7 +69,7 @@ public:
void add_message(const String& p_msg, bool p_error=false);
void deinit();
- Button *get_button();
+
void clear();
EditorLog();
~EditorLog();
diff --git a/tools/editor/editor_name_dialog.cpp b/tools/editor/editor_name_dialog.cpp
new file mode 100644
index 0000000000..c221b908e0
--- /dev/null
+++ b/tools/editor/editor_name_dialog.cpp
@@ -0,0 +1,89 @@
+/*************************************************************************/
+/* editor_name_dialog.cpp */
+/*************************************************************************/
+/* This file is part of: */
+/* GODOT ENGINE */
+/* http://www.godotengine.org */
+/*************************************************************************/
+/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* */
+/* Permission is hereby granted, free of charge, to any person obtaining */
+/* a copy of this software and associated documentation files (the */
+/* "Software"), to deal in the Software without restriction, including */
+/* without limitation the rights to use, copy, modify, merge, publish, */
+/* distribute, sublicense, and/or sell copies of the Software, and to */
+/* permit persons to whom the Software is furnished to do so, subject to */
+/* the following conditions: */
+/* */
+/* The above copyright notice and this permission notice shall be */
+/* included in all copies or substantial portions of the Software. */
+/* */
+/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
+/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
+/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
+/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
+/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
+/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
+/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
+/*************************************************************************/
+
+#include "editor_name_dialog.h"
+#include "object_type_db.h"
+#include "os/keyboard.h"
+
+void EditorNameDialog::_line_input_event(const InputEvent& p_event) {
+
+ if (p_event.type == InputEvent::KEY) {
+
+ if (!p_event.key.pressed)
+ return;
+
+ switch (p_event.key.scancode) {
+ case KEY_ENTER:
+ case KEY_RETURN: {
+
+ if (get_hide_on_ok())
+ hide();
+ ok_pressed();
+ accept_event();
+ } break;
+ case KEY_ESCAPE: {
+
+ hide();
+ accept_event();
+ } break;
+ }
+ }
+}
+
+void EditorNameDialog::_post_popup() {
+
+ ConfirmationDialog::_post_popup();
+ name->clear();
+ name->grab_focus();
+}
+
+void EditorNameDialog::ok_pressed() {
+
+ if (name->get_text()!="") {
+ emit_signal("name_confirmed", name->get_text());
+ }
+}
+
+void EditorNameDialog::_bind_methods() {
+
+ ObjectTypeDB::bind_method("_line_input_event",&EditorNameDialog::_line_input_event);
+
+ ADD_SIGNAL(MethodInfo("name_confirmed",PropertyInfo( Variant::STRING,"name")));
+}
+
+EditorNameDialog::EditorNameDialog()
+{
+ name = memnew( LineEdit );
+ add_child(name);
+ move_child(name, get_label()->get_index()+1);
+ name->set_margin(MARGIN_TOP,5);
+ name->set_anchor_and_margin(MARGIN_LEFT,ANCHOR_BEGIN,5);
+ name->set_anchor_and_margin(MARGIN_RIGHT,ANCHOR_END,5);
+ name->connect("input_event", this, "_line_input_event");
+}
diff --git a/tools/editor/console.h b/tools/editor/editor_name_dialog.h
index aff425fcde..9e66908899 100644
--- a/tools/editor/console.h
+++ b/tools/editor/editor_name_dialog.h
@@ -1,11 +1,11 @@
/*************************************************************************/
-/* console.h */
+/* editor_name_dialog.h */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -26,91 +26,32 @@
/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
-#ifndef CONSOLE_H
-#define CONSOLE_H
-#include "scene/gui/popup.h"
-#include "scene/gui/button.h"
-#include "scene/gui/tab_container.h"
-#include "scene/gui/tree.h"
-#include "scene/main/timer.h"
-#include "output_strings.h"
-#include "property_editor.h"
-#include "scene_tree_editor.h"
-#include "editor_data.h"
+#ifndef EDITOR_NAME_DIALOG_H
+#define EDITOR_NAME_DIALOG_H
-class Console : public Popup {
+#include "scene/gui/dialogs.h"
+#include "scene/gui/line_edit.h"
- OBJ_TYPE( Console, Popup );
+class EditorNameDialog : public ConfirmationDialog {
- TabContainer *tabs;
- OutputStrings *output;
- OutputStrings *errors;
- Control *status;
- Control *inspect;
- Control *globals;
- Button *close;
- int height;
+ OBJ_TYPE( EditorNameDialog, ConfirmationDialog );
- EditorHistory inspect_history;
- SceneTreeEditor *inspect_tree_editor;
- PropertyEditor *inspect_property_editor;
- PropertyEditor *globals_property_editor;
+ LineEdit *name;
- Tree *stats_tree;
-
- struct StatsItems {
-
- TreeItem *render_objects_in_frame;
- TreeItem *material_changes_in_frame;
-
- TreeItem *usage_video_mem_total;
- TreeItem *usage_video_mem_used;
- TreeItem *usage_texture_mem_used;
- TreeItem *usage_vertex_mem_used;
-
- TreeItem *usage_static_memory_total;
- TreeItem *usage_static_memory;
- TreeItem *usage_dynamic_memory_total;
- TreeItem *usage_dynamic_memory;
- TreeItem *usage_objects_instanced;
-
- } stats;
-
- struct OutputQueue {
-
- OutputStrings::LineType type;
- Variant meta;
- String text;
- };
-
- Mutex *output_queue_mutex;
- List<OutputQueue> output_queue;
-
-
- ErrorHandlerList err_handler;
- PrintHandlerList print_handler;
-
- void _inspector_node_selected();
-
- static void _error_handle(void *p_this,const char*p_function,const char* p_file,int p_line,const char *p_error, const char *p_explanation,ErrorHandlerType p_type);
- static void _print_handle(void *p_this,const String& p_string);
+ void _line_input_event(const InputEvent& p_event);
protected:
- virtual void _window_input_event(InputEvent p_event);
- virtual void _window_resize_event();
+ static void _bind_methods();
+ virtual void ok_pressed();
+ virtual void _post_popup();
- void _stats_update_timer_callback();
- void _resized();
- void _close_pressed();
+public:
- void _notification(int p_what);
+ LineEdit* get_line_edit() { return name; }
- static void _bind_methods();
-public:
- Console();
- ~Console();
+ EditorNameDialog();
};
-#endif // CONSOLE_H
+#endif // EDITOR_NAME_DIALOG_H
diff --git a/tools/editor/editor_node.cpp b/tools/editor/editor_node.cpp
index 4e22592880..79f5e66401 100644
--- a/tools/editor/editor_node.cpp
+++ b/tools/editor/editor_node.cpp
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -55,6 +55,7 @@
#include "bind/core_bind.h"
#include "io/zip_io.h"
#include "io/config_file.h"
+#include "animation_editor.h"
// plugins
#include "plugins/sprite_frames_editor_plugin.h"
@@ -102,6 +103,7 @@
#include "tools/editor/io_plugins/editor_sample_import_plugin.h"
#include "tools/editor/io_plugins/editor_translation_import_plugin.h"
#include "tools/editor/io_plugins/editor_mesh_import_plugin.h"
+#include "tools/editor/io_plugins/editor_export_scene.h"
#include "plugins/editor_preview_plugins.h"
@@ -142,6 +144,7 @@ void EditorNode::_update_scene_tabs() {
}
scene_tabs->set_current_tab(editor_data.get_edited_scene());
+ scene_tabs->ensure_tab_visible(editor_data.get_edited_scene());
}
@@ -161,17 +164,26 @@ void EditorNode::_update_title() {
void EditorNode::_unhandled_input(const InputEvent& p_event) {
- if (p_event.type==InputEvent::KEY && p_event.key.pressed && !p_event.key.echo) {
+ if (p_event.type==InputEvent::KEY && p_event.key.pressed && !p_event.key.echo && !gui_base->get_viewport()->gui_has_modal_stack()) {
switch(p_event.key.scancode) {
/*case KEY_F1:
if (!p_event.key.mod.shift && !p_event.key.mod.command)
- _editor_select(3);
+ _editor_select(EDITOR_SCRIPT);
break;*/
- case KEY_F1: _editor_select(0); break;
- case KEY_F2: _editor_select(1); break;
- case KEY_F3: _editor_select(2); break;
+ case KEY_F1:
+ if (!p_event.key.mod.shift && !p_event.key.mod.command)
+ _editor_select(EDITOR_2D);
+ break;
+ case KEY_F2:
+ if (!p_event.key.mod.shift && !p_event.key.mod.command)
+ _editor_select(EDITOR_3D);
+ break;
+ case KEY_F3:
+ if (!p_event.key.mod.shift && !p_event.key.mod.command)
+ _editor_select(EDITOR_SCRIPT);
+ break;
case KEY_F5: _menu_option_confirm((p_event.key.mod.control&&p_event.key.mod.shift)?RUN_PLAY_CUSTOM_SCENE:RUN_PLAY,true); break;
case KEY_F6: _menu_option_confirm(RUN_PLAY_SCENE,true); break;
case KEY_F7: _menu_option_confirm(RUN_PAUSE,true); break;
@@ -289,7 +301,7 @@ void EditorNode::_notification(int p_what) {
VisualServer::get_singleton()->viewport_set_hide_canvas(get_scene_root()->get_viewport(),true);
VisualServer::get_singleton()->viewport_set_disable_environment(get_viewport()->get_viewport_rid(),true);
- _editor_select(1);
+ _editor_select(EDITOR_3D);
if (defer_load_scene!="") {
@@ -405,7 +417,7 @@ void EditorNode::_rebuild_import_menu()
{
PopupMenu* p = import_menu->get_popup();
p->clear();
- p->add_item("Sub-Scene", FILE_IMPORT_SUBSCENE);
+ p->add_item("Node from scene", FILE_IMPORT_SUBSCENE);
p->add_separator();
for (int i = 0; i < editor_import_export->get_import_plugin_count(); i++) {
p->add_item(editor_import_export->get_import_plugin(i)->get_visible_name(), IMPORT_PLUGIN_BASE + i);
@@ -501,13 +513,21 @@ void EditorNode::save_resource_as(const Ref<Resource>& p_resource) {
file->set_mode(EditorFileDialog::MODE_SAVE_FILE);
bool relpaths = (p_resource->has_meta("__editor_relpaths__") && p_resource->get_meta("__editor_relpaths__").operator bool());
+ current_option=RESOURCE_SAVE_AS;
List<String> extensions;
Ref<PackedScene> sd = memnew( PackedScene );
ResourceSaver::get_recognized_extensions(p_resource,&extensions);
file->clear_filters();
+
+ List<String> preferred;
for(int i=0;i<extensions.size();i++) {
+ if (p_resource->is_type("Script") && (extensions[i]=="tres" || extensions[i]=="res" || extensions[i]=="xml")) {
+ //this serves no purpose and confused people
+ continue;
+ }
file->add_filter("*."+extensions[i]+" ; "+extensions[i].to_upper());
+ preferred.push_back(extensions[i]);
}
//file->set_current_path(current_path);
@@ -519,11 +539,11 @@ void EditorNode::save_resource_as(const Ref<Resource>& p_resource) {
file->set_current_path(p_resource->get_path().replacen("."+ext,"."+extensions.front()->get()));
}
}
- } else {
+ } else if (preferred.size()) {
String existing;
if (extensions.size()) {
- existing="new_"+p_resource->get_type().to_lower()+"."+extensions.front()->get().to_lower();
+ existing="new_"+p_resource->get_type().to_lower()+"."+preferred.front()->get().to_lower();
}
file->set_current_path(existing);
@@ -533,7 +553,6 @@ void EditorNode::save_resource_as(const Ref<Resource>& p_resource) {
}
-
void EditorNode::_menu_option(int p_option) {
_menu_option_confirm(p_option,false);
@@ -575,59 +594,66 @@ void EditorNode::_dialog_display_file_error(String p_file,Error p_error) {
}
-void EditorNode::_get_scene_metadata() {
+void EditorNode::_get_scene_metadata(const String& p_file) {
Node *scene = editor_data.get_edited_scene_root();
if (!scene)
return;
+ String path = EditorSettings::get_singleton()->get_project_settings_path().plus_file(p_file.get_file()+"-editstate-"+p_file.md5_text()+".cfg");
- if (scene->has_meta("__editor_plugin_states__")) {
+ Ref<ConfigFile> cf;
+ cf.instance();
- Dictionary md = scene->get_meta("__editor_plugin_states__");
- editor_data.set_editor_states(md);
+ Error err = cf->load(path);
+ if (err!=OK)
+ return; //must not exist
- }
+ List<String> esl;
+ cf->get_section_keys("editor_states",&esl);
- if (scene->has_meta("__editor_run_settings__")) {
+ Dictionary md;
+ for (List<String>::Element *E=esl.front();E;E=E->next()) {
- Dictionary md = scene->get_meta("__editor_run_settings__");
- if (md.has("run_mode"))
- run_settings_dialog->set_run_mode(md["run_mode"]);
- if (md.has("custom_args"))
- run_settings_dialog->set_custom_arguments(md["custom_args"]);
+ Variant st=cf->get_value("editor_states",E->get());
+ if (st.get_type()) {
+ md[E->get()]=st;
+ }
}
+
+ editor_data.set_editor_states(md);
+
}
-void EditorNode::_set_scene_metadata() {
+void EditorNode::_set_scene_metadata(const String& p_file) {
Node *scene = editor_data.get_edited_scene_root();
if (!scene)
return;
- { /* Editor States */
- Dictionary md = editor_data.get_editor_states();
+ scene->set_meta("__editor_run_settings__",Variant()); //clear it (no point in keeping it)
+ scene->set_meta("__editor_plugin_states__",Variant());
- if (!md.empty()) {
- scene->set_meta("__editor_plugin_states__",md);
- }
- }
+ String path = EditorSettings::get_singleton()->get_project_settings_path().plus_file(p_file.get_file()+"-editstate-"+p_file.md5_text()+".cfg");
- { /* Run Settings */
+ Ref<ConfigFile> cf;
+ cf.instance();
+ Dictionary md = editor_data.get_editor_states();
+ List<Variant> keys;
+ md.get_key_list(&keys);
- Dictionary md;
- md["run_mode"]=run_settings_dialog->get_run_mode();
- md["custom_args"]=run_settings_dialog->get_custom_arguments();
- scene->set_meta("__editor_run_settings__",md);
- }
-
+ for(List<Variant>::Element *E=keys.front();E;E=E->next()) {
+ cf->set_value("editor_states",E->get(),md[E->get()]);
+ }
+ Error err = cf->save(path);
+ ERR_FAIL_COND(err!=OK);
}
@@ -879,7 +905,7 @@ void EditorNode::_save_scene_with_preview(String p_file) {
}
}
- _editor_select(is2d?0:1);
+ _editor_select(is2d?EDITOR_2D:EDITOR_3D);
VS::get_singleton()->viewport_queue_screen_capture(viewport);
save.step("Creating Thumbnail",2);
@@ -945,8 +971,24 @@ void EditorNode::_save_scene(String p_file) {
}
- _set_scene_metadata();
- Ref<PackedScene> sdata = memnew( PackedScene );
+ _set_scene_metadata(p_file);
+
+
+ Ref<PackedScene> 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<PackedScene>( ResourceCache::get(p_file)->cast_to<PackedScene>() );
+ if (sdata.is_valid())
+ sdata->recreate_state();
+ else
+ sdata.instance();
+ } else {
+ sdata.instance();
+ }
Error err = sdata->pack(scene);
@@ -1153,75 +1195,6 @@ void EditorNode::_dialog_action(String p_file) {
save_translatable_strings(p_file);
} break;
- case FILE_SAVE_SUBSCENE: {
-
- List<Node*> selection = editor_selection->get_selected_node_list();
-
- if (selection.size()!=1) {
-
- current_option=-1;
- //confirmation->get_cancel()->hide();
- accept->get_ok()->set_text("I see..");
- accept->set_text("This operation requieres a single selected node.");
- accept->popup_centered_minsize();
- break;
- }
-
- Node *base = selection.front()->get();
-
- Map<Node*,Node*> reown;
- reown[editor_data.get_edited_scene_root()]=base;
- Node *copy = base->duplicate_and_reown(reown);
- if (copy) {
-
- Ref<PackedScene> sdata = memnew( PackedScene );
- Error err = sdata->pack(copy);
- memdelete(copy);
-
- if (err!=OK) {
-
-
- current_option=-1;
- //accept->get_cancel()->hide();
- accept->get_ok()->set_text("I see..");
- accept->set_text("Couldn't save subscene. Likely dependencies (instances) couldn't be satisfied.");
- accept->popup_centered_minsize();
- return;
- }
-
- int flg=0;
- if (EditorSettings::get_singleton()->get("on_save/compress_binary_resources"))
- flg|=ResourceSaver::FLAG_COMPRESS;
- if (EditorSettings::get_singleton()->get("on_save/save_paths_as_relative"))
- flg|=ResourceSaver::FLAG_RELATIVE_PATHS;
-
-
- err = ResourceSaver::save(p_file,sdata,flg);
- if (err!=OK) {
-
- current_option=-1;
- //confirmation->get_cancel()->hide();
- accept->get_ok()->set_text("I see..");
- accept->set_text("Error saving scene.");
- accept->popup_centered_minsize();
- break;
- }
- //EditorFileSystem::get_singleton()->update_file(p_file,sdata->get_type());
-
- } else {
-
- current_option=-1;
- //confirmation->get_cancel()->hide();
- accept->get_ok()->set_text("I see..");
- accept->set_text("Error duplicating scene to save it.");
- accept->popup_centered_minsize();
- break;
-
- }
-
-
- } break;
-
case FILE_SAVE_SCENE:
case FILE_SAVE_AS_SCENE: {
@@ -1281,10 +1254,18 @@ void EditorNode::_dialog_action(String p_file) {
case FILE_EXPORT_TILESET: {
Ref<TileSet> ml;
- if (file_export_lib_merge->is_pressed() && FileAccess::exists(p_file)) {
+ if (FileAccess::exists(p_file)) {
ml=ResourceLoader::load(p_file,"TileSet");
- if (ml.is_null()) {
+ if (!file_export_lib_merge->is_pressed()) {
+ ml->clear();
+ }
+
+ }
+
+ if (ml.is_null()) {
+
+ if (file_export_lib_merge->is_pressed()) {
current_option=-1;
//accept->get_cancel()->hide();
accept->get_ok()->set_text("I see..");
@@ -1293,9 +1274,6 @@ void EditorNode::_dialog_action(String p_file) {
return;
}
- }
-
- if (ml.is_null()) {
ml = Ref<TileSet>( memnew( TileSet ));
}
@@ -1400,6 +1378,65 @@ void EditorNode::_dialog_action(String p_file) {
save_resource_in_path(current_res,p_file);
} break;
+ case SETTINGS_LAYOUT_SAVE: {
+
+ if (p_file.empty())
+ return;
+
+ Ref<ConfigFile> config;
+ config.instance();
+ Error err = config->load(EditorSettings::get_singleton()->get_settings_path().plus_file("editor_layouts.cfg"));
+
+ if (err==ERR_CANT_OPEN) {
+ config.instance(); // new config
+ } else if (err!=OK) {
+ show_warning("Error trying to save layout!");
+ return;
+ }
+
+ _save_docks_to_config(config, p_file);
+
+ config->save(EditorSettings::get_singleton()->get_settings_path().plus_file("editor_layouts.cfg"));
+
+ layout_dialog->hide();
+ _update_layouts_menu();
+
+ if (p_file=="Default") {
+ show_warning("Default editor layout overridden.");
+ }
+
+ } break;
+ case SETTINGS_LAYOUT_DELETE: {
+
+ if (p_file.empty())
+ return;
+
+ Ref<ConfigFile> config;
+ config.instance();
+ Error err = config->load(EditorSettings::get_singleton()->get_settings_path().plus_file("editor_layouts.cfg"));
+
+ if (err!=OK || !config->has_section(p_file)) {
+ show_warning("Layout name not found!");
+ return;
+ }
+
+ // erase
+ List<String> keys;
+ config->get_section_keys(p_file, &keys);
+ for (List<String>::Element *E=keys.front();E;E=E->next()) {
+ config->set_value(p_file, E->get(), Variant());
+ }
+
+ config->save(EditorSettings::get_singleton()->get_settings_path().plus_file("editor_layouts.cfg"));
+
+ layout_dialog->hide();
+ _update_layouts_menu();
+
+ if (p_file=="Default") {
+ show_warning("Restored Default layout to base settings.");
+ }
+
+ } break;
default: { //save scene?
if (file->get_mode()==FileDialog::MODE_SAVE_FILE) {
@@ -1553,6 +1590,10 @@ void EditorNode::_edit_current() {
scene_tree_dock->set_selected(NULL);
property_editor->edit( NULL );
object_menu->set_disabled(true);
+
+ if (editor_plugin_over)
+ editor_plugin_over->make_visible(false);
+
return;
}
@@ -1701,7 +1742,7 @@ void EditorNode::_edit_current() {
//p->add_item("All Methods",OBJECT_CALL_METHOD);
- _update_keying();
+ update_keying();
}
void EditorNode::_resource_created() {
@@ -1740,7 +1781,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"));
@@ -1967,21 +2008,21 @@ void EditorNode::_menu_option_confirm(int p_option,bool p_confirmed) {
} break;
case FILE_QUICK_OPEN_SCENE: {
- quick_open->popup("PackedScene");
+ quick_open->popup("PackedScene", true);
quick_open->set_title("Quick Open Scene..");
} break;
case FILE_QUICK_OPEN_SCRIPT: {
- quick_open->popup("Script");
+ quick_open->popup("Script", true);
quick_open->set_title("Quick Open Script..");
} break;
case FILE_QUICK_OPEN_FILE: {
- quick_open->popup("Resource",false,true);
+ quick_open->popup("Resource", false, true);
quick_open->set_title("Quick Search File..");
} break;
@@ -1999,7 +2040,7 @@ void EditorNode::_menu_option_confirm(int p_option,bool p_confirmed) {
} break;
case FILE_CLOSE: {
- if (!p_confirmed) {
+ if (!p_confirmed && unsaved_cache) {
confirmation->get_ok()->set_text("Yes");
//confirmation->get_cancel()->show();
confirmation->set_text("Close scene? (Unsaved changes will be lost)");
@@ -2028,7 +2069,7 @@ void EditorNode::_menu_option_confirm(int p_option,bool p_confirmed) {
return;
};
// fallthrough to save_as
- } break;
+ };
case FILE_SAVE_AS_SCENE: {
Node *scene = editor_data.get_edited_scene_root();
@@ -2132,70 +2173,6 @@ void EditorNode::_menu_option_confirm(int p_option,bool p_confirmed) {
file->set_title("Save Translatable Strings");
file->popup_centered_ratio();
-
- } break;
-
- case FILE_SAVE_SUBSCENE: {
-
- Node *scene = editor_data.get_edited_scene_root();
-
- if (!scene) {
-
- current_option=-1;
- //confirmation->get_cancel()->hide();
- accept->get_ok()->set_text("I see..");
- accept->set_text("This operation can't be done without a scene.");
- accept->popup_centered_minsize();
- break;
- }
-
-
- List<Node*> selection = editor_selection->get_selected_node_list();
-
- if (selection.size()!=1) {
-
- current_option=-1;
- //confirmation->get_cancel()->hide();
- accept->get_ok()->set_text("I see..");
- accept->set_text("This operation requieres a single selected node.");
- accept->popup_centered_minsize();
- break;
- }
-
- Node *tocopy = selection.front()->get();
-
- if (tocopy!=editor_data.get_edited_scene_root() && tocopy->get_filename()!="") {
-
-
- current_option=-1;
- //confirmation->get_cancel()->hide();
- accept->get_ok()->set_text("I see..");
- accept->set_text("This operation can't be done on instanced scenes.");
- accept->popup_centered_minsize();
- break;
- }
-
- file->set_mode(EditorFileDialog::MODE_SAVE_FILE);
-
- List<String> extensions;
- Ref<PackedScene> sd = memnew( PackedScene );
- ResourceSaver::get_recognized_extensions(sd,&extensions);
- file->clear_filters();
- for(int i=0;i<extensions.size();i++) {
-
- file->add_filter("*."+extensions[i]+" ; "+extensions[i].to_upper());
- }
-
-
- String existing;
- if (extensions.size()) {
- existing="new_scene."+extensions.front()->get().to_lower();
- }
- file->set_current_path(existing);
-
-
- file->popup_centered_ratio();
- file->set_title("Save Sub-Scene As..");
} break;
case FILE_SAVE_OPTIMIZED: {
Node *scene = editor_data.get_edited_scene_root();
@@ -2379,6 +2356,10 @@ void EditorNode::_menu_option_confirm(int p_option,bool p_confirmed) {
log->add_message("REDO: "+action);
} break;
+ case TOOLS_ORPHAN_RESOURCES: {
+
+ orphan_resources->show();
+ } break;
case EDIT_REVERT: {
@@ -2386,7 +2367,14 @@ void EditorNode::_menu_option_confirm(int p_option,bool p_confirmed) {
if (!scene)
break;
-
+
+ String filename = scene->get_filename();
+
+ if (filename==String()) {
+ show_warning("Can't reload a scene that was never saved..");
+ break;
+ }
+
if (unsaved_cache && !p_confirmed) {
confirmation->get_ok()->set_text("Revert");
confirmation->set_text("This action cannot be undone. Revert anyway?");
@@ -2394,7 +2382,13 @@ void EditorNode::_menu_option_confirm(int p_option,bool p_confirmed) {
break;
}
- Error err = load_scene(scene->get_filename());
+
+ int cur_idx = editor_data.get_edited_scene();
+ _remove_edited_scene();
+ Error err = load_scene(filename);
+ editor_data.move_edited_scene_to_index(cur_idx);
+ get_undo_redo()->clear_history();
+ scene_tabs->set_current_tab(cur_idx);
} break;
@@ -2519,7 +2513,7 @@ void EditorNode::_menu_option_confirm(int p_option,bool p_confirmed) {
case OBJECT_REQUEST_HELP: {
if (current) {
- _editor_select(3);
+ _editor_select(EDITOR_SCRIPT);
emit_signal("request_help",current->get_type());
}
@@ -2608,7 +2602,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);
@@ -2733,11 +2727,6 @@ void EditorNode::_menu_option_confirm(int p_option,bool p_confirmed) {
//optimized_presets->popup_centered_ratio();
} break;
- case SETTINGS_SHOW_ANIMATION: {
-
- animation_panel_make_visible( ! animation_panel->is_visible() );
-
- } break;
case SETTINGS_LOAD_EXPORT_TEMPLATES: {
@@ -2987,7 +2976,7 @@ void EditorNode::set_edited_scene(Node *p_scene) {
if (get_editor_data().get_edited_scene_root()) {
if (get_editor_data().get_edited_scene_root()->get_parent()==scene_root)
scene_root->remove_child(get_editor_data().get_edited_scene_root());
- animation_editor->set_root(NULL);
+
}
get_editor_data().set_edited_scene_root(p_scene);
@@ -3000,7 +2989,7 @@ void EditorNode::set_edited_scene(Node *p_scene) {
if (p_scene) {
if (p_scene->get_parent()!=scene_root)
scene_root->add_child(p_scene);
- animation_editor->set_root(p_scene);
+
}
}
@@ -3056,7 +3045,7 @@ Error EditorNode::save_translatable_strings(const String& p_to_file) {
OS::Time time = OS::get_singleton()->get_time();
f->store_line("# Translation Strings Dump.");
f->store_line("# Created By.");
- f->store_line("# \t" VERSION_FULL_NAME " (c) 2008-2015 Juan Linietsky, Ariel Manzur.");
+ f->store_line("# \t" VERSION_FULL_NAME " (c) 2008-2016 Juan Linietsky, Ariel Manzur.");
f->store_line("# From Scene: ");
f->store_line("# \t"+get_edited_scene()->get_filename());
f->store_line("");
@@ -3296,9 +3285,9 @@ void EditorNode::_set_main_scene_state(Dictionary p_state) {
int n2d=0,n3d=0;
_find_node_types(get_edited_scene(),n2d,n3d);
if (n2d>n3d) {
- _editor_select(0);
+ _editor_select(EDITOR_2D);
} else if (n3d>n2d) {
- _editor_select(1);
+ _editor_select(EDITOR_3D);
}
}
@@ -3319,6 +3308,8 @@ void EditorNode::_set_main_scene_state(Dictionary p_state) {
//changing_scene=true; //avoid script change from opening editor
ScriptEditor::get_singleton()->get_debugger()->update_live_edit_root();
ScriptEditor::get_singleton()->set_scene_root_script( editor_data.get_scene_root_script(editor_data.get_edited_scene()) );
+ editor_data.notify_edited_scene_changed();
+
//changing_scene=false;
}
@@ -3332,15 +3323,25 @@ 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());
if (get_editor_data().get_edited_scene_root()) {
if (get_editor_data().get_edited_scene_root()->get_parent()==scene_root)
scene_root->remove_child(get_editor_data().get_edited_scene_root());
- animation_editor->set_root(NULL);
+
}
//print_line("set current 2 ");
@@ -3362,7 +3363,7 @@ void EditorNode::set_current_scene(int p_idx) {
if (new_scene) {
if (new_scene->get_parent()!=scene_root)
scene_root->add_child(new_scene);
- animation_editor->set_root(new_scene);
+
}
//print_line("set current 4 ");
@@ -3410,11 +3411,13 @@ Error EditorNode::load_scene(const String& p_scene, bool p_ignore_broken_deps,bo
}
- for(int i=0;i<editor_data.get_edited_scene_count();i++) {
+ if(!p_set_inherited) {
+ for(int i=0;i<editor_data.get_edited_scene_count();i++) {
- if (editor_data.get_scene_path(i)==p_scene) {
- _scene_tab_changed(i);
- return OK;
+ if (editor_data.get_scene_path(i)==p_scene) {
+ _scene_tab_changed(i);
+ return OK;
+ }
}
}
@@ -3496,7 +3499,18 @@ Error EditorNode::load_scene(const String& p_scene, bool p_ignore_broken_deps,bo
add_io_error(txt);
}
- sdata->set_path(lpath,true); //take over path
+ if (ResourceCache::has(lpath)) {
+ //used from somewhere else? no problem! update state and replace sdata
+ Ref<PackedScene> ps = Ref<PackedScene>( ResourceCache::get(lpath)->cast_to<PackedScene>() );
+ if (ps.is_valid()) {
+ ps->replace_state( sdata->get_state() );
+ ps->set_last_modified_time( sdata->get_last_modified_time() );
+ sdata=ps;
+ }
+
+ } else {
+ sdata->set_path(lpath,true); //take over path
+ }
Node*new_scene=sdata->instance(true);
@@ -3534,16 +3548,17 @@ Error EditorNode::load_scene(const String& p_scene, bool p_ignore_broken_deps,bo
if (p_set_inherited) {
Ref<SceneState> state = sdata->get_state();
- state->set_path(lpath);
+ state->set_path(lpath);
new_scene->set_scene_inherited_state(state);
new_scene->set_filename(String());
- if (new_scene->get_scene_instance_state().is_valid())
- new_scene->get_scene_instance_state()->set_path(String());
+ //if (new_scene->get_scene_instance_state().is_valid())
+ // new_scene->get_scene_instance_state()->set_path(String());
}
+ new_scene->set_scene_instance_state(Ref<SceneState>());
set_edited_scene(new_scene);
- _get_scene_metadata();
+ _get_scene_metadata(p_scene);
/*
editor_data.set_edited_scene_root(new_scene);
@@ -3614,7 +3629,7 @@ void EditorNode::_instance_request(const String& p_path){
void EditorNode::_property_keyed(const String& p_keyed,const Variant& p_value,bool p_advance) {
- animation_editor->insert_value_key(p_keyed,p_value,p_advance);
+ AnimationPlayerEditor::singleton->get_key_editor()->insert_value_key(p_keyed,p_value,p_advance);
}
void EditorNode::_transform_keyed(Object *sp,const String& p_sub,const Transform& p_key) {
@@ -3622,16 +3637,16 @@ void EditorNode::_transform_keyed(Object *sp,const String& p_sub,const Transform
Spatial *s=sp->cast_to<Spatial>();
if (!s)
return;
- animation_editor->insert_transform_key(s,p_sub,p_key);
+ AnimationPlayerEditor::singleton->get_key_editor()->insert_transform_key(s,p_sub,p_key);
}
-void EditorNode::_update_keying() {
+void EditorNode::update_keying() {
//print_line("KR: "+itos(p_enabled));
bool valid=false;
- if (animation_editor->has_keying()) {
+ if (AnimationPlayerEditor::singleton->get_key_editor()->has_keying()) {
if (editor_history.get_path_size()>=1) {
@@ -3665,6 +3680,7 @@ void EditorNode::_show_messages() {
}
+#if 0
void EditorNode::animation_panel_make_visible(bool p_visible) {
if (!p_visible) {
@@ -3677,6 +3693,7 @@ void EditorNode::animation_panel_make_visible(bool p_visible) {
settings_menu->get_popup()->set_item_checked(idx,p_visible);
}
+
void EditorNode::animation_editor_make_visible(bool p_visible) {
if (p_visible) {
@@ -3698,10 +3715,9 @@ void EditorNode::animation_editor_make_visible(bool p_visible) {
}
animation_editor->set_keying(p_visible);
- _update_keying();
}
-
+#endif
void EditorNode::_add_to_recent_scenes(const String& p_scene) {
String base="_"+Globals::get_singleton()->get_resource_path().replace("\\","::").replace("/","::");
@@ -3794,24 +3810,26 @@ void EditorNode::_update_recent_scenes() {
}
-void EditorNode::hide_animation_player_editors() {
-
- emit_signal("hide_animation_player_editors");
-}
-
-void EditorNode::_quick_opened(const String& p_resource) {
+void EditorNode::_quick_opened() {
if (current_option==FILE_QUICK_OPEN_FILE) {
- scenes_dock->open(p_resource);
+ String res_path = quick_open->get_selected();
+
+ scenes_dock->open(res_path);
return;
}
- if (quick_open->get_base_type()=="PackedScene") {
- open_request(p_resource);
- } else {
- load_resource(p_resource);
- }
+ Vector<String> files = quick_open->get_selected_files();
+ for (int i = 0; i < files.size(); i++) {
+ String res_path = files[i];
+
+ if (quick_open->get_base_type()=="PackedScene") {
+ open_request(res_path);
+ } else {
+ load_resource(res_path);
+ }
+ }
}
void EditorNode::_quick_run(const String& p_resource) {
@@ -3857,7 +3875,8 @@ bool EditorNode::_find_editing_changed_scene(Node *p_from) {
void EditorNode::add_io_error(const String& p_error) {
-
+ CharString err_ut = p_error.utf8();
+ ERR_PRINT(err_ut.get_data());
_load_error_notify(singleton,p_error);
}
@@ -3930,9 +3949,9 @@ void EditorNode::progress_add_task(const String& p_task,const String& p_label, i
singleton->progress_dialog->add_task(p_task,p_label,p_steps);
}
-void EditorNode::progress_task_step(const String& p_task, const String& p_state, int p_step) {
+void EditorNode::progress_task_step(const String& p_task, const String& p_state, int p_step,bool p_force_redraw) {
- singleton->progress_dialog->task_step(p_task,p_state,p_step);
+ singleton->progress_dialog->task_step(p_task,p_state,p_step,p_force_redraw);
}
@@ -3961,87 +3980,6 @@ void EditorNode::progress_end_task_bg(const String& p_task) {
}
-void EditorNode::_bind_methods() {
-
-
- ObjectTypeDB::bind_method("_menu_option",&EditorNode::_menu_option);
- ObjectTypeDB::bind_method("_menu_confirm_current",&EditorNode::_menu_confirm_current);
- ObjectTypeDB::bind_method("_dialog_action",&EditorNode::_dialog_action);
- ObjectTypeDB::bind_method("_resource_selected",&EditorNode::_resource_selected,DEFVAL(""));
- ObjectTypeDB::bind_method("_property_editor_forward",&EditorNode::_property_editor_forward);
- ObjectTypeDB::bind_method("_property_editor_back",&EditorNode::_property_editor_back);
- ObjectTypeDB::bind_method("_editor_select",&EditorNode::_editor_select);
- ObjectTypeDB::bind_method("_node_renamed",&EditorNode::_node_renamed);
- ObjectTypeDB::bind_method("edit_node",&EditorNode::edit_node);
- ObjectTypeDB::bind_method("_imported",&EditorNode::_imported);
- ObjectTypeDB::bind_method("_unhandled_input",&EditorNode::_unhandled_input);
-
- ObjectTypeDB::bind_method("_get_scene_metadata",&EditorNode::_get_scene_metadata);
- ObjectTypeDB::bind_method("set_edited_scene",&EditorNode::set_edited_scene);
- ObjectTypeDB::bind_method("open_request",&EditorNode::open_request);
- ObjectTypeDB::bind_method("_instance_request",&EditorNode::_instance_request);
- ObjectTypeDB::bind_method("_update_keying",&EditorNode::_update_keying);
- ObjectTypeDB::bind_method("_property_keyed",&EditorNode::_property_keyed);
- ObjectTypeDB::bind_method("_transform_keyed",&EditorNode::_transform_keyed);
- ObjectTypeDB::bind_method("_close_messages",&EditorNode::_close_messages);
- ObjectTypeDB::bind_method("_show_messages",&EditorNode::_show_messages);
- ObjectTypeDB::bind_method("_vp_resized",&EditorNode::_vp_resized);
- ObjectTypeDB::bind_method("_quick_opened",&EditorNode::_quick_opened);
- ObjectTypeDB::bind_method("_quick_run",&EditorNode::_quick_run);
-
- ObjectTypeDB::bind_method("_resource_created",&EditorNode::_resource_created);
-
- ObjectTypeDB::bind_method("_import_action",&EditorNode::_import_action);
- //ObjectTypeDB::bind_method("_import",&EditorNode::_import);
-// ObjectTypeDB::bind_method("_import_conflicts_solved",&EditorNode::_import_conflicts_solved);
- ObjectTypeDB::bind_method("_open_recent_scene",&EditorNode::_open_recent_scene);
-// ObjectTypeDB::bind_method("_open_recent_scene_confirm",&EditorNode::_open_recent_scene_confirm);
-
- ObjectTypeDB::bind_method("_save_optimized",&EditorNode::_save_optimized);
- ObjectTypeDB::bind_method(_MD("animation_panel_make_visible","enable"),&EditorNode::animation_panel_make_visible);
-
- ObjectTypeDB::bind_method("stop_child_process",&EditorNode::stop_child_process);
-
- ObjectTypeDB::bind_method("_sources_changed",&EditorNode::_sources_changed);
- ObjectTypeDB::bind_method("_fs_changed",&EditorNode::_fs_changed);
- ObjectTypeDB::bind_method("_dock_select_draw",&EditorNode::_dock_select_draw);
- ObjectTypeDB::bind_method("_dock_select_input",&EditorNode::_dock_select_input);
- ObjectTypeDB::bind_method("_dock_pre_popup",&EditorNode::_dock_pre_popup);
- ObjectTypeDB::bind_method("_dock_split_dragged",&EditorNode::_dock_split_dragged);
- ObjectTypeDB::bind_method("_save_docks",&EditorNode::_save_docks);
- ObjectTypeDB::bind_method("_dock_popup_exit",&EditorNode::_dock_popup_exit);
- ObjectTypeDB::bind_method("_dock_move_left",&EditorNode::_dock_move_left);
- ObjectTypeDB::bind_method("_dock_move_right",&EditorNode::_dock_move_right);
-
- ObjectTypeDB::bind_method("set_current_scene",&EditorNode::set_current_scene);
- ObjectTypeDB::bind_method("set_current_version",&EditorNode::set_current_version);
- ObjectTypeDB::bind_method("_scene_tab_changed",&EditorNode::_scene_tab_changed);
- ObjectTypeDB::bind_method("_scene_tab_closed",&EditorNode::_scene_tab_closed);
- ObjectTypeDB::bind_method("_scene_tab_script_edited",&EditorNode::_scene_tab_script_edited);
- ObjectTypeDB::bind_method("_set_main_scene_state",&EditorNode::_set_main_scene_state);
- ObjectTypeDB::bind_method("_update_scene_tabs",&EditorNode::_update_scene_tabs);
-
- ObjectTypeDB::bind_method("_prepare_history",&EditorNode::_prepare_history);
- ObjectTypeDB::bind_method("_select_history",&EditorNode::_select_history);
-
- ObjectTypeDB::bind_method("_toggle_search_bar",&EditorNode::_toggle_search_bar);
- ObjectTypeDB::bind_method("_clear_search_box",&EditorNode::_clear_search_box);
-
- 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);
- ObjectTypeDB::bind_method(_MD("get_gui_base"), &EditorNode::get_gui_base);
-
- ADD_SIGNAL( MethodInfo("play_pressed") );
- ADD_SIGNAL( MethodInfo("pause_pressed") );
- ADD_SIGNAL( MethodInfo("stop_pressed") );
- ADD_SIGNAL( MethodInfo("hide_animation_player_editors") );
- ADD_SIGNAL( MethodInfo("request_help") );
- ADD_SIGNAL( MethodInfo("script_add_function_request",PropertyInfo(Variant::OBJECT,"obj"),PropertyInfo(Variant::STRING,"function"),PropertyInfo(Variant::STRING_ARRAY,"args")) );
- ADD_SIGNAL( MethodInfo("resource_saved",PropertyInfo(Variant::OBJECT,"obj")) );
-
-
-
-}
Ref<Texture> EditorNode::_file_dialog_get_icon(const String& p_path) {
@@ -4307,6 +4245,15 @@ void EditorNode::_save_docks() {
Ref<ConfigFile> config;
config.instance();
+ _save_docks_to_config(config, "docks");
+ editor_data.get_plugin_window_layout(config);
+
+ config->save(EditorSettings::get_singleton()->get_project_settings_path().plus_file("editor_layout.cfg"));
+
+}
+
+void EditorNode::_save_docks_to_config(Ref<ConfigFile> p_layout, const String& p_section) {
+
for(int i=0;i<DOCK_SLOT_MAX;i++) {
String names;
for(int j=0;j<dock_slot[i]->get_tab_count();j++) {
@@ -4317,7 +4264,7 @@ void EditorNode::_save_docks() {
}
if (names!="") {
- config->set_value("docks","dock_"+itos(i+1),names);
+ p_layout->set_value(p_section,"dock_"+itos(i+1),names);
}
}
@@ -4331,7 +4278,7 @@ void EditorNode::_save_docks() {
for(int i=0;i<DOCK_SLOT_MAX/2;i++) {
if (splits[i]->is_visible()) {
- config->set_value("docks","dock_split_"+itos(i+1),splits[i]->get_split_offset());
+ p_layout->set_value(p_section,"dock_split_"+itos(i+1),splits[i]->get_split_offset());
}
}
@@ -4345,13 +4292,9 @@ void EditorNode::_save_docks() {
for(int i=0;i<4;i++) {
- config->set_value("docks","dock_hsplit_"+itos(i+1),h_splits[i]->get_split_offset());
+ p_layout->set_value(p_section,"dock_hsplit_"+itos(i+1),h_splits[i]->get_split_offset());
}
- editor_data.get_plugin_window_layout(config);
-
- config->save(EditorSettings::get_singleton()->get_project_settings_path().plus_file("editor_layout.cfg"));
-
}
void EditorNode::save_layout() {
@@ -4370,15 +4313,26 @@ void EditorNode::_load_docks() {
config.instance();
Error err = config->load(EditorSettings::get_singleton()->get_project_settings_path().plus_file("editor_layout.cfg"));
if (err!=OK) {
- return; //no config
+ //no config
+ if (overridden_default_layout>=0) {
+ _layout_menu_option(overridden_default_layout);
+ }
+ return;
}
+ _load_docks_from_config(config, "docks");
+ editor_data.set_plugin_window_layout(config);
+
+}
+
+void EditorNode::_load_docks_from_config(Ref<ConfigFile> p_layout, const String& p_section) {
+
for(int i=0;i<DOCK_SLOT_MAX;i++) {
- if (!config->has_section_key("docks","dock_"+itos(i+1)))
+ if (!p_layout->has_section_key(p_section,"dock_"+itos(i+1)))
continue;
- Vector<String> names = String(config->get_value("docks","dock_"+itos(i+1))).split(",");
+ Vector<String> names = String(p_layout->get_value(p_section,"dock_"+itos(i+1))).split(",");
for(int j=0;j<names.size();j++) {
@@ -4398,7 +4352,7 @@ void EditorNode::_load_docks() {
if (atidx==-1) //well, it's not anywhere
continue;
- if (atidx==j) {
+ if (atidx==i) {
node->raise();
continue;
}
@@ -4413,7 +4367,6 @@ void EditorNode::_load_docks() {
dock_slot[i]->add_child(node);
dock_slot[i]->show();
}
-
}
VSplitContainer*splits[DOCK_SLOT_MAX/2]={
@@ -4425,14 +4378,14 @@ void EditorNode::_load_docks() {
for(int i=0;i<DOCK_SLOT_MAX/2;i++) {
- if (!config->has_section_key("docks","dock_split_"+itos(i+1)))
+ if (!p_layout->has_section_key(p_section,"dock_split_"+itos(i+1)))
continue;
- int ofs = config->get_value("docks","dock_split_"+itos(i+1));
+ int ofs = p_layout->get_value(p_section,"dock_split_"+itos(i+1));
splits[i]->set_split_offset(ofs);
}
- HSplitContainer *h_splits[4]={
+ HSplitContainer*h_splits[4]={
left_l_hsplit,
left_r_hsplit,
main_hsplit,
@@ -4440,9 +4393,9 @@ void EditorNode::_load_docks() {
};
for(int i=0;i<4;i++) {
- if (!config->has_section_key("docks","dock_hsplit_"+itos(i+1)))
+ if (!p_layout->has_section_key(p_section,"dock_hsplit_"+itos(i+1)))
continue;
- int ofs = config->get_value("docks","dock_hsplit_"+itos(i+1));
+ int ofs = p_layout->get_value(p_section,"dock_hsplit_"+itos(i+1));
h_splits[i]->set_split_offset(ofs);
}
@@ -4460,8 +4413,80 @@ void EditorNode::_load_docks() {
dock_slot[i]->set_current_tab(0);
}
}
+}
- editor_data.set_plugin_window_layout(config);
+
+void EditorNode::_update_layouts_menu() {
+
+ editor_layouts->clear();
+ overridden_default_layout=-1;
+
+ editor_layouts->set_size(Vector2());
+ editor_layouts->add_item("Save Layout", SETTINGS_LAYOUT_SAVE);
+ editor_layouts->add_item("Delete Layout", SETTINGS_LAYOUT_DELETE);
+ editor_layouts->add_separator();
+ editor_layouts->add_item("Default", SETTINGS_LAYOUT_DEFAULT);
+
+ Ref<ConfigFile> config;
+ config.instance();
+ Error err = config->load(EditorSettings::get_singleton()->get_settings_path().plus_file("editor_layouts.cfg"));
+ if (err!=OK) {
+ return; //no config
+ }
+
+ List<String> layouts;
+ config.ptr()->get_sections(&layouts);
+
+ for (List<String>::Element *E=layouts.front();E;E=E->next()) {
+
+ String layout=E->get();
+
+ if (layout=="Default") {
+ editor_layouts->remove_item(editor_layouts->get_item_index(SETTINGS_LAYOUT_DEFAULT));
+ overridden_default_layout=editor_layouts->get_item_count();
+ }
+
+ editor_layouts->add_item(layout);
+ }
+
+}
+
+void EditorNode::_layout_menu_option(int p_id) {
+
+ switch (p_id) {
+
+ case SETTINGS_LAYOUT_SAVE: {
+
+ current_option=p_id;
+ layout_dialog->set_title("Save Layout");
+ layout_dialog->get_ok()->set_text("Save");
+ layout_dialog->popup_centered();
+ } break;
+ case SETTINGS_LAYOUT_DELETE: {
+
+ current_option=p_id;
+ layout_dialog->set_title("Delete Layout");
+ layout_dialog->get_ok()->set_text("Delete");
+ layout_dialog->popup_centered();
+ } break;
+ case SETTINGS_LAYOUT_DEFAULT: {
+
+ _load_docks_from_config(default_layout, "docks");
+ _save_docks();
+ } break;
+ default: {
+
+ Ref<ConfigFile> config;
+ config.instance();
+ Error err = config->load(EditorSettings::get_singleton()->get_settings_path().plus_file("editor_layouts.cfg"));
+ if (err!=OK) {
+ return; //no config
+ }
+
+ _load_docks_from_config(config, editor_layouts->get_item_text(p_id));
+ _save_docks();
+ }
+ }
}
@@ -4508,12 +4533,14 @@ void EditorNode::_scene_tab_changed(int p_tab) {
editor_data.get_undo_redo().create_action("Switch Scene Tab");
editor_data.get_undo_redo().add_do_method(this,"set_current_version",unsaved?saved_version:0);
editor_data.get_undo_redo().add_do_method(this,"set_current_scene",p_tab);
- editor_data.get_undo_redo().add_do_method(scene_tabs,"set_current_tab",p_tab);
+ //editor_data.get_undo_redo().add_do_method(scene_tabs,"set_current_tab",p_tab);
+ //editor_data.get_undo_redo().add_do_method(scene_tabs,"ensure_tab_visible",p_tab);
editor_data.get_undo_redo().add_do_method(this,"set_current_version",next_scene_version==0?editor_data.get_undo_redo().get_version()+1:next_scene_version);
editor_data.get_undo_redo().add_undo_method(this,"set_current_version",next_scene_version);
editor_data.get_undo_redo().add_undo_method(this,"set_current_scene",editor_data.get_edited_scene());
- editor_data.get_undo_redo().add_undo_method(scene_tabs,"set_current_tab",editor_data.get_edited_scene());
+ //editor_data.get_undo_redo().add_undo_method(scene_tabs,"set_current_tab",editor_data.get_edited_scene());
+ //editor_data.get_undo_redo().add_undo_method(scene_tabs,"ensure_tab_visible",p_tab,editor_data.get_edited_scene());
editor_data.get_undo_redo().add_undo_method(this,"set_current_version",saved_version);
editor_data.get_undo_redo().commit_action();
@@ -4543,6 +4570,183 @@ void EditorNode::_clear_search_box() {
property_editor->update_tree();
}
+ToolButton *EditorNode::add_bottom_panel_item(String p_text,Control *p_item) {
+
+ ToolButton *tb = memnew( ToolButton );
+ tb->connect("toggled",this,"_bottom_panel_switch",varray(bottom_panel_items.size()));
+ tb->set_text(p_text);
+ tb->set_toggle_mode(true);
+ tb->set_focus_mode(Control::FOCUS_NONE);
+ bottom_panel_vb->add_child(p_item);
+ bottom_panel_hb->raise();
+ bottom_panel_hb->add_child(tb);
+ p_item->set_v_size_flags(Control::SIZE_EXPAND_FILL);
+ p_item->hide();
+ BottomPanelItem bpi;
+ bpi.button=tb;
+ bpi.control=p_item;
+ bpi.name=p_text;
+ bottom_panel_items.push_back(bpi);
+
+ return tb;
+
+}
+
+bool EditorNode::are_bottom_panels_hidden() const {
+
+ for(int i=0;i<bottom_panel_items.size();i++) {
+ if (bottom_panel_items[i].button->is_pressed())
+ return false;
+ }
+
+ return true;
+}
+
+void EditorNode::hide_bottom_panel() {
+
+ _bottom_panel_switch(false,0);
+
+}
+
+void EditorNode::make_bottom_panel_item_visible(Control *p_item) {
+
+ for(int i=0;i<bottom_panel_items.size();i++) {
+
+ if (bottom_panel_items[i].control==p_item) {
+ _bottom_panel_switch(true,i);
+ break;
+ }
+ }
+}
+
+void EditorNode::raise_bottom_panel_item(Control *p_item) {
+
+ for(int i=0;i<bottom_panel_items.size();i++) {
+
+ if (bottom_panel_items[i].control==p_item) {
+ bottom_panel_items[i].button->raise();
+ SWAP( bottom_panel_items[i], bottom_panel_items[bottom_panel_items.size()-1]);
+ break;
+ }
+ }
+
+ for(int i=0;i<bottom_panel_items.size();i++) {
+ bottom_panel_items[i].button->disconnect("toggled",this,"_bottom_panel_switch");
+ bottom_panel_items[i].button->connect("toggled",this,"_bottom_panel_switch",varray(i));
+ }
+
+}
+
+void EditorNode::_bottom_panel_switch(bool p_enable,int p_idx) {
+
+ ERR_FAIL_INDEX(p_idx,bottom_panel_items.size());
+
+
+
+ if (p_enable) {
+ for(int i=0;i<bottom_panel_items.size();i++) {
+
+ bottom_panel_items[i].button->set_pressed(i==p_idx);
+ bottom_panel_items[i].control->set_hidden(i!=p_idx);
+ }
+ center_split->set_dragger_visibility(SplitContainer::DRAGGER_VISIBLE);
+ center_split->set_collapsed(false);
+ } else {
+ for(int i=0;i<bottom_panel_items.size();i++) {
+
+ bottom_panel_items[i].button->set_pressed(false);
+ bottom_panel_items[i].control->set_hidden(true);
+ }
+ center_split->set_dragger_visibility(SplitContainer::DRAGGER_HIDDEN);
+ center_split->set_collapsed(true);
+ }
+}
+
+void EditorNode::_bind_methods() {
+
+
+ ObjectTypeDB::bind_method("_menu_option",&EditorNode::_menu_option);
+ ObjectTypeDB::bind_method("_menu_confirm_current",&EditorNode::_menu_confirm_current);
+ ObjectTypeDB::bind_method("_dialog_action",&EditorNode::_dialog_action);
+ ObjectTypeDB::bind_method("_resource_selected",&EditorNode::_resource_selected,DEFVAL(""));
+ ObjectTypeDB::bind_method("_property_editor_forward",&EditorNode::_property_editor_forward);
+ ObjectTypeDB::bind_method("_property_editor_back",&EditorNode::_property_editor_back);
+ ObjectTypeDB::bind_method("_editor_select",&EditorNode::_editor_select);
+ ObjectTypeDB::bind_method("_node_renamed",&EditorNode::_node_renamed);
+ ObjectTypeDB::bind_method("edit_node",&EditorNode::edit_node);
+ ObjectTypeDB::bind_method("_imported",&EditorNode::_imported);
+ ObjectTypeDB::bind_method("_unhandled_input",&EditorNode::_unhandled_input);
+
+ ObjectTypeDB::bind_method("_get_scene_metadata",&EditorNode::_get_scene_metadata);
+ ObjectTypeDB::bind_method("set_edited_scene",&EditorNode::set_edited_scene);
+ ObjectTypeDB::bind_method("open_request",&EditorNode::open_request);
+ ObjectTypeDB::bind_method("_instance_request",&EditorNode::_instance_request);
+ ObjectTypeDB::bind_method("update_keying",&EditorNode::update_keying);
+ ObjectTypeDB::bind_method("_property_keyed",&EditorNode::_property_keyed);
+ ObjectTypeDB::bind_method("_transform_keyed",&EditorNode::_transform_keyed);
+ ObjectTypeDB::bind_method("_close_messages",&EditorNode::_close_messages);
+ ObjectTypeDB::bind_method("_show_messages",&EditorNode::_show_messages);
+ ObjectTypeDB::bind_method("_vp_resized",&EditorNode::_vp_resized);
+ ObjectTypeDB::bind_method("_quick_opened",&EditorNode::_quick_opened);
+ ObjectTypeDB::bind_method("_quick_run",&EditorNode::_quick_run);
+
+ ObjectTypeDB::bind_method("_resource_created",&EditorNode::_resource_created);
+
+ ObjectTypeDB::bind_method("_import_action",&EditorNode::_import_action);
+ //ObjectTypeDB::bind_method("_import",&EditorNode::_import);
+// ObjectTypeDB::bind_method("_import_conflicts_solved",&EditorNode::_import_conflicts_solved);
+ ObjectTypeDB::bind_method("_open_recent_scene",&EditorNode::_open_recent_scene);
+// ObjectTypeDB::bind_method("_open_recent_scene_confirm",&EditorNode::_open_recent_scene_confirm);
+
+ ObjectTypeDB::bind_method("_save_optimized",&EditorNode::_save_optimized);
+
+ ObjectTypeDB::bind_method("stop_child_process",&EditorNode::stop_child_process);
+
+ ObjectTypeDB::bind_method("_sources_changed",&EditorNode::_sources_changed);
+ ObjectTypeDB::bind_method("_fs_changed",&EditorNode::_fs_changed);
+ ObjectTypeDB::bind_method("_dock_select_draw",&EditorNode::_dock_select_draw);
+ ObjectTypeDB::bind_method("_dock_select_input",&EditorNode::_dock_select_input);
+ ObjectTypeDB::bind_method("_dock_pre_popup",&EditorNode::_dock_pre_popup);
+ ObjectTypeDB::bind_method("_dock_split_dragged",&EditorNode::_dock_split_dragged);
+ ObjectTypeDB::bind_method("_save_docks",&EditorNode::_save_docks);
+ ObjectTypeDB::bind_method("_dock_popup_exit",&EditorNode::_dock_popup_exit);
+ ObjectTypeDB::bind_method("_dock_move_left",&EditorNode::_dock_move_left);
+ ObjectTypeDB::bind_method("_dock_move_right",&EditorNode::_dock_move_right);
+
+ ObjectTypeDB::bind_method("_layout_menu_option",&EditorNode::_layout_menu_option);
+
+ ObjectTypeDB::bind_method("set_current_scene",&EditorNode::set_current_scene);
+ ObjectTypeDB::bind_method("set_current_version",&EditorNode::set_current_version);
+ ObjectTypeDB::bind_method("_scene_tab_changed",&EditorNode::_scene_tab_changed);
+ ObjectTypeDB::bind_method("_scene_tab_closed",&EditorNode::_scene_tab_closed);
+ ObjectTypeDB::bind_method("_scene_tab_script_edited",&EditorNode::_scene_tab_script_edited);
+ ObjectTypeDB::bind_method("_set_main_scene_state",&EditorNode::_set_main_scene_state);
+ ObjectTypeDB::bind_method("_update_scene_tabs",&EditorNode::_update_scene_tabs);
+
+ ObjectTypeDB::bind_method("_prepare_history",&EditorNode::_prepare_history);
+ ObjectTypeDB::bind_method("_select_history",&EditorNode::_select_history);
+
+ 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);
+ ObjectTypeDB::bind_method(_MD("get_gui_base"), &EditorNode::get_gui_base);
+ ObjectTypeDB::bind_method(_MD("_bottom_panel_switch"), &EditorNode::_bottom_panel_switch);
+
+
+ ADD_SIGNAL( MethodInfo("play_pressed") );
+ ADD_SIGNAL( MethodInfo("pause_pressed") );
+ ADD_SIGNAL( MethodInfo("stop_pressed") );
+ ADD_SIGNAL( MethodInfo("request_help") );
+ ADD_SIGNAL( MethodInfo("script_add_function_request",PropertyInfo(Variant::OBJECT,"obj"),PropertyInfo(Variant::STRING,"function"),PropertyInfo(Variant::STRING_ARRAY,"args")) );
+ ADD_SIGNAL( MethodInfo("resource_saved",PropertyInfo(Variant::OBJECT,"obj")) );
+
+
+
+}
+
EditorNode::EditorNode() {
EditorHelp::generate_doc(); //before any editor classes are crated
@@ -4574,6 +4778,8 @@ EditorNode::EditorNode() {
ResourceLoader::set_abort_on_missing_resources(false);
FileDialog::set_default_show_hidden_files(EditorSettings::get_singleton()->get("file_dialog/show_hidden_files"));
+ EditorFileDialog::set_default_show_hidden_files(EditorSettings::get_singleton()->get("file_dialog/show_hidden_files"));
+ EditorFileDialog::set_default_display_mode((EditorFileDialog::DisplayMode)EditorSettings::get_singleton()->get("file_dialog/display_mode").operator int());
ResourceLoader::set_error_notify_func(this,_load_error_notify);
ResourceLoader::set_dependency_error_notify_func(this,_dependency_error_report);
@@ -4827,7 +5033,7 @@ EditorNode::EditorNode() {
scene_tabs=memnew( Tabs );
scene_tabs->add_tab("unsaved");
scene_tabs->set_tab_align(Tabs::ALIGN_CENTER);
- scene_tabs->set_tab_close_display_policy(Tabs::SHOW_ACTIVE_ONLY);
+ scene_tabs->set_tab_close_display_policy(Tabs::CLOSE_BUTTON_SHOW_ACTIVE_ONLY);
scene_tabs->connect("tab_changed",this,"_scene_tab_changed");
scene_tabs->connect("right_button_pressed",this,"_scene_tab_script_edited");
scene_tabs->connect("tab_close", this, "_scene_tab_closed");
@@ -4857,8 +5063,9 @@ EditorNode::EditorNode() {
//scene_root_base->add_child(scene_root);
- scene_root->set_meta("_editor_disable_input",true);
+ //scene_root->set_meta("_editor_disable_input",true);
VisualServer::get_singleton()->viewport_set_hide_scenario(scene_root->get_viewport(),true);
+ scene_root->set_disable_input(true);
scene_root->set_as_audio_listener_2d(true);
scene_root->set_size_override(true,Size2(Globals::get_singleton()->get("display/width"),Globals::get_singleton()->get("display/height")));
@@ -4873,44 +5080,6 @@ EditorNode::EditorNode() {
scene_root_parent->add_child(viewport);
- PanelContainer *pc = memnew( PanelContainer );
- top_split->add_child(pc);
- animation_vb = memnew( VBoxContainer );
- animation_vb->set_v_size_flags(Control::SIZE_EXPAND_FILL);
- pc->add_child(animation_vb);
- animation_panel=pc;
- animation_panel->hide();
-
-
- HBoxContainer *animation_hb = memnew( HBoxContainer);
- animation_vb->add_child(animation_hb);
-
- Label *l= memnew( Label );
- l->set_text("Animation:");
- //l->set_h_size_flags(Control::SIZE_);
- animation_hb->add_child(l);
-
- animation_panel_hb = memnew( HBoxContainer );
- animation_hb->add_child(animation_panel_hb);
- animation_panel_hb->set_h_size_flags(Control::SIZE_EXPAND_FILL);
-
-
- /*pd_anim = memnew( PaneDrag );
- animation_hb->add_child(pd_anim);
- pd_anim->connect("dragged",this,"_dragged");
- pd_anim->set_default_cursor_shape(Control::CURSOR_MOVE);
- pd_anim->hide();*/
-
- anim_close = memnew( TextureButton );
- animation_hb->add_child(anim_close);
- anim_close->connect("pressed",this,"animation_panel_make_visible",make_binds(false));
- anim_close->set_normal_texture( anim_close->get_icon("Close","EditorIcons"));
- anim_close->set_hover_texture( anim_close->get_icon("CloseHover","EditorIcons"));
- anim_close->set_pressed_texture( anim_close->get_icon("Close","EditorIcons"));
-
-
-
-
PanelContainer *top_region = memnew( PanelContainer );
top_region->add_style_override("panel",gui_base->get_stylebox("hover","Button"));
HBoxContainer *left_menu_hb = memnew( HBoxContainer );
@@ -4962,7 +5131,6 @@ EditorNode::EditorNode() {
pm_export->set_name("Export");
p->add_child(pm_export);
p->add_submenu_item("Convert To..","Export");
- pm_export->add_item("Subscene..",FILE_SAVE_SUBSCENE);
pm_export->add_item("Translatable Strings..",FILE_DUMP_STRINGS);
pm_export->add_separator();
pm_export->add_item("MeshLibrary..",FILE_EXPORT_MESH_LIBRARY);
@@ -4979,7 +5147,11 @@ EditorNode::EditorNode() {
p->add_separator();
p->add_item("Revert Scene",EDIT_REVERT);
p->add_separator();
- p->add_item("Quit to Project List",RUN_PROJECT_MANAGER,KEY_MASK_SHIFT+KEY_MASK_CMD+KEY_Q);
+#ifdef OSX_ENABLED
+ p->add_item("Quit to Project List",RUN_PROJECT_MANAGER,KEY_MASK_SHIFT+KEY_MASK_ALT+KEY_Q);
+#else
+ p->add_item("Quit to Project List",RUN_PROJECT_MANAGER,KEY_MASK_SHIFT+KEY_MASK_CTRL+KEY_Q);
+#endif
p->add_item("Quit",FILE_QUIT,KEY_MASK_CMD+KEY_Q);
recent_scenes = memnew( PopupMenu );
@@ -5037,6 +5209,17 @@ EditorNode::EditorNode() {
p=import_menu->get_popup();
p->connect("item_pressed",this,"_menu_option");
+ tool_menu = memnew( MenuButton );
+ tool_menu->set_tooltip("Miscelaneous project or scene wide tools.");
+ tool_menu->set_text("Tools");
+
+ //tool_menu->set_icon(gui_base->get_icon("Save","EditorIcons"));
+ left_menu_hb->add_child( tool_menu );
+
+ p=tool_menu->get_popup();
+ p->connect("item_pressed",this,"_menu_option");
+ p->add_item("Orphan Resource Explorer",TOOLS_ORPHAN_RESOURCES);
+
export_button = memnew( ToolButton );
export_button->set_tooltip("Export the project to many platforms.");
export_button->set_text("Export");
@@ -5205,17 +5388,25 @@ EditorNode::EditorNode() {
right_menu_hb->add_child( settings_menu );
p=settings_menu->get_popup();
-
//p->add_item("Export Settings",SETTINGS_EXPORT_PREFERENCES);
p->add_item("Editor Settings",SETTINGS_PREFERENCES);
//p->add_item("Optimization Presets",SETTINGS_OPTIMIZED_PRESETS);
p->add_separator();
- p->add_check_item("Show Animation",SETTINGS_SHOW_ANIMATION,KEY_MASK_CMD+KEY_N);
+ editor_layouts = memnew( PopupMenu );
+ editor_layouts->set_name("Layouts");
+ p->add_child(editor_layouts);
+ editor_layouts->connect("item_pressed",this,"_layout_menu_option");
+ p->add_submenu_item("Editor Layout", "Layouts");
p->add_separator();
p->add_item("Install Export Templates",SETTINGS_LOAD_EXPORT_TEMPLATES);
p->add_separator();
p->add_item("About",SETTINGS_ABOUT);
+ layout_dialog = memnew( EditorNameDialog );
+ gui_base->add_child(layout_dialog);
+ layout_dialog->set_hide_on_ok(false);
+ layout_dialog->set_size(Size2(175, 70));
+ layout_dialog->connect("name_confirmed", this,"_dialog_action");
sources_button = memnew( ToolButton );
right_menu_hb->add_child(sources_button);
@@ -5370,7 +5561,7 @@ EditorNode::EditorNode() {
prop_editor_base->add_child(search_bar);
search_bar->hide();
- l = memnew( Label("Search: ") );
+ Label *l = memnew( Label("Search: ") );
search_bar->add_child(l);
search_box = memnew( LineEdit );
@@ -5397,44 +5588,61 @@ EditorNode::EditorNode() {
scenes_dock = memnew( ScenesDock(this) );
scenes_dock->set_name("FileSystem");
+ scenes_dock->set_use_thumbnails(int(EditorSettings::get_singleton()->get("file_dialog/display_mode"))==EditorFileDialog::DISPLAY_THUMBNAILS);
dock_slot[DOCK_SLOT_LEFT_BR]->add_child(scenes_dock);
//prop_pallete->add_child(scenes_dock);
scenes_dock->connect("open",this,"open_request");
scenes_dock->connect("instance",this,"_instance_request");
+ const String docks_section = "docks";
+ overridden_default_layout=-1;
+ default_layout.instance();
+ default_layout->set_value(docks_section, "dock_3", "Scene");
+ default_layout->set_value(docks_section, "dock_4", "FileSystem");
+ default_layout->set_value(docks_section, "dock_5", "Inspector");
- log = memnew( EditorLog );
- center_split->add_child(log);
- log->connect("close_request",this,"_close_messages");
- log->connect("show_request",this,"_show_messages");
- //left_split->set_dragger_visible(false);
+ for(int i=0;i<DOCK_SLOT_MAX/2;i++)
+ default_layout->set_value(docks_section, "dock_hsplit_"+itos(i+1), 0);
+ for(int i=0;i<DOCK_SLOT_MAX/2;i++)
+ default_layout->set_value(docks_section, "dock_split_"+itos(i+1), 0);
+ _update_layouts_menu();
- old_split_ofs=0;
+ bottom_panel = memnew( PanelContainer );
+ bottom_panel->add_style_override("panel",gui_base->get_stylebox("panelf","Panel"));
+ center_split->add_child(bottom_panel);
+ center_split->set_dragger_visibility(SplitContainer::DRAGGER_HIDDEN);
+ bottom_panel_vb = memnew( VBoxContainer );
+ bottom_panel->add_child(bottom_panel_vb);
+ //bottom_panel_vb->set_v_size_flags(Control::SIZE_EXPAND_FILL);
- animation_editor = memnew( AnimationKeyEditor(get_undo_redo(),&editor_history,editor_selection) );
- animation_editor->set_anchor_and_margin(MARGIN_RIGHT,Control::ANCHOR_END,0);
- animation_editor->set_margin(MARGIN_BOTTOM,200);
- animation_editor->connect("keying_changed",this,"_update_keying");
+ bottom_panel_hb = memnew( HBoxContainer );
+ bottom_panel_vb->add_child(bottom_panel_hb);
- animation_editor->set_v_size_flags(Control::SIZE_EXPAND_FILL);
- animation_vb->add_child(animation_editor);
- center_split->connect("resized",this,"_vp_resized");
+ log = memnew( EditorLog );
+
+ add_bottom_panel_item("Output",log);
+
+ //left_split->set_dragger_visible(false);
- animation_editor->hide();
+ old_split_ofs=0;
+
+ center_split->connect("resized",this,"_vp_resized");
+
/*PanelContainer *bottom_pc = memnew( PanelContainer );
srt->add_child(bottom_pc);
bottom_hb = memnew( HBoxContainer );
bottom_pc->add_child(bottom_hb);*/
- center_vb->add_child( log->get_button() );
- log->get_button()->set_h_size_flags(Control::SIZE_EXPAND_FILL);
+
+// center_vb->add_child( log->get_button() );
+// log->get_button()->set_h_size_flags(Control::SIZE_EXPAND_FILL);
//progress_hb->set_h_size_flags(Control::SIZE_EXPAND_FILL);
@@ -5465,7 +5673,8 @@ EditorNode::EditorNode() {
-
+ orphan_resources = memnew( OrphanResourcesDialog );
+ gui_base->add_child(orphan_resources);
@@ -5542,7 +5751,7 @@ EditorNode::EditorNode() {
about->get_ok()->set_text("Thanks!");
about->set_hide_on_ok(true);
Label *about_text = memnew( Label );
- about_text->set_text(VERSION_FULL_NAME"\n(c) 2008-2015 Juan Linietsky, Ariel Manzur.\n");
+ about_text->set_text(VERSION_FULL_NAME"\n(c) 2008-2016 Juan Linietsky, Ariel Manzur.\n");
about_text->set_pos(Point2(gui_base->get_icon("Logo","EditorIcons")->get_size().width+30,20));
gui_base->add_child(about);
about->add_child(about_text);
@@ -5633,7 +5842,7 @@ EditorNode::EditorNode() {
file_templates->connect("file_selected", this,"_dialog_action");
property_editor->connect("resource_selected", this,"_resource_selected");
property_editor->connect("property_keyed", this,"_property_keyed");
- animation_editor->connect("resource_selected", this,"_resource_selected");
+
//plugin stuff
file_server = memnew( EditorFileServer );
@@ -5657,11 +5866,17 @@ EditorNode::EditorNode() {
editor_import_export->add_export_plugin( Ref<EditorTextureExportPlugin>( memnew(EditorTextureExportPlugin)));
editor_import_export->add_export_plugin( Ref<EditorSampleExportPlugin>( memnew(EditorSampleExportPlugin)));
+ editor_import_export->add_export_plugin( Ref<EditorSceneExportPlugin>( memnew(EditorSceneExportPlugin)));
+
+ add_editor_plugin( memnew( AnimationPlayerEditorPlugin(this) ) );
add_editor_plugin( memnew( CanvasItemEditorPlugin(this) ) );
add_editor_plugin( memnew( SpatialEditorPlugin(this) ) );
add_editor_plugin( memnew( ScriptEditorPlugin(this) ) );
- add_editor_plugin( memnew( AnimationPlayerEditorPlugin(this) ) );
+
+ //more visually meaningful to have this later
+ raise_bottom_panel_item(AnimationPlayerEditor::singleton);
+
add_editor_plugin( memnew( ShaderGraphEditorPlugin(this,true) ) );
add_editor_plugin( memnew( ShaderGraphEditorPlugin(this,false) ) );
add_editor_plugin( memnew( ShaderEditorPlugin(this,true) ) );
@@ -5694,7 +5909,8 @@ EditorNode::EditorNode() {
add_editor_plugin( memnew( Polygon2DEditorPlugin(this) ) );
add_editor_plugin( memnew( LightOccluder2DEditorPlugin(this) ) );
add_editor_plugin( memnew( NavigationPolygonEditorPlugin(this) ) );
- add_editor_plugin( memnew( ColorRampEditorPlugin(this) ) );
+ add_editor_plugin( memnew( ColorRampEditorPlugin(this,true) ) );
+ add_editor_plugin( memnew( ColorRampEditorPlugin(this,false) ) );
add_editor_plugin( memnew( CollisionShape2DEditorPlugin(this) ) );
for(int i=0;i<EditorPlugins::get_plugin_count();i++)
@@ -5707,9 +5923,10 @@ EditorNode::EditorNode() {
resource_preview->add_preview_generator( Ref<EditorScriptPreviewPlugin>( memnew(EditorScriptPreviewPlugin )));
resource_preview->add_preview_generator( Ref<EditorSamplePreviewPlugin>( memnew(EditorSamplePreviewPlugin )));
resource_preview->add_preview_generator( Ref<EditorMeshPreviewPlugin>( memnew(EditorMeshPreviewPlugin )));
+ resource_preview->add_preview_generator( Ref<EditorBitmapPreviewPlugin>( memnew(EditorBitmapPreviewPlugin )));
circle_step_msec=OS::get_singleton()->get_ticks_msec();
- circle_step_frame=OS::get_singleton()->get_frames_drawn();;
+ circle_step_frame=OS::get_singleton()->get_frames_drawn();
circle_step=0;
_rebuild_import_menu();
diff --git a/tools/editor/editor_node.h b/tools/editor/editor_node.h
index 7d8b97688e..c687643d30 100644
--- a/tools/editor/editor_node.h
+++ b/tools/editor/editor_node.h
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -56,7 +56,7 @@
#include "tools/editor/editor_run.h"
#include "tools/editor/pane_drag.h"
-#include "tools/editor/animation_editor.h"
+
#include "tools/editor/script_create_dialog.h"
#include "tools/editor/run_settings_dialog.h"
#include "tools/editor/project_settings.h"
@@ -76,6 +76,7 @@
#include "editor_reimport_dialog.h"
#include "import_settings.h"
#include "tools/editor/editor_plugin.h"
+#include "tools/editor/editor_name_dialog.h"
#include "fileserver/editor_file_server.h"
#include "editor_resource_preview.h"
@@ -99,13 +100,12 @@ typedef void (*EditorNodeInitCallback)();
class EditorNode : public Node {
OBJ_TYPE( EditorNode, Node );
-
+
enum {
-
- HISTORY_SIZE=64
+ HISTORY_SIZE=64
};
+
enum MenuOptions {
-
FILE_NEW_SCENE,
FILE_NEW_INHERITED_SCENE,
FILE_OPEN_SCENE,
@@ -118,7 +118,6 @@ class EditorNode : public Node {
FILE_EXPORT_MESH_LIBRARY,
FILE_EXPORT_TILESET,
FILE_SAVE_OPTIMIZED,
- FILE_SAVE_SUBSCENE,
FILE_DUMP_STRINGS,
FILE_OPEN_RECENT,
FILE_OPEN_OLD_SCENE,
@@ -133,6 +132,7 @@ class EditorNode : public Node {
EDIT_UNDO,
EDIT_REDO,
EDIT_REVERT,
+ TOOLS_ORPHAN_RESOURCES,
RESOURCE_NEW,
RESOURCE_LOAD,
RESOURCE_SAVE,
@@ -166,7 +166,9 @@ class EditorNode : public Node {
SETTINGS_EXPORT_PREFERENCES,
SETTINGS_PREFERENCES,
SETTINGS_OPTIMIZED_PRESETS,
- SETTINGS_SHOW_ANIMATION,
+ SETTINGS_LAYOUT_SAVE,
+ SETTINGS_LAYOUT_DELETE,
+ SETTINGS_LAYOUT_DEFAULT,
SETTINGS_LOAD_EXPORT_TEMPLATES,
SETTINGS_HELP,
SETTINGS_ABOUT,
@@ -227,7 +229,6 @@ class EditorNode : public Node {
Control *vp_base;
PaneDrag *pd;
//PaneDrag *pd_anim;
- TextureButton *anim_close;
Panel *menu_panel;
@@ -237,6 +238,7 @@ class EditorNode : public Node {
Control *viewport;
MenuButton *file_menu;
MenuButton *import_menu;
+ MenuButton *tool_menu;
ToolButton *export_button;
ToolButton *prev_scene;
MenuButton *object_menu;
@@ -246,7 +248,6 @@ class EditorNode : public Node {
ToolButton *pause_button;
ToolButton *stop_button;
ToolButton *run_settings_button;
- ToolButton *animation_menu;
ToolButton *play_scene_button;
ToolButton *play_custom_scene_button;
MenuButton *debug_button;
@@ -282,6 +283,11 @@ class EditorNode : public Node {
AcceptDialog *about;
AcceptDialog *warning;
+ int overridden_default_layout;
+ Ref<ConfigFile> default_layout;
+ PopupMenu *editor_layouts;
+ EditorNameDialog *layout_dialog;
+
//OptimizedPresetsDialog *optimized_presets;
EditorSettingsDialog *settings_config_dialog;
RunSettingsDialog *run_settings_dialog;
@@ -307,15 +313,12 @@ class EditorNode : public Node {
String defer_export_platform;
bool defer_export_debug;
Node *_last_instanced_scene;
- PanelContainer *animation_panel;
- HBoxContainer *animation_panel_hb;
- VBoxContainer *animation_vb;
EditorPath *editor_path;
ToolButton *resource_new_button;
ToolButton *resource_load_button;
MenuButton *resource_save_button;
MenuButton *editor_history_menu;
- AnimationKeyEditor *animation_editor;
+
EditorLog *log;
CenterContainer *tabs_center;
EditorQuickOpen *quick_open;
@@ -333,6 +336,7 @@ class EditorNode : public Node {
DependencyErrorDialog *dependency_error;
DependencyEditor *dependency_fixer;
+ OrphanResourcesDialog *orphan_resources;
TabContainer *dock_slot[DOCK_SLOT_MAX];
Rect2 dock_select_rect[DOCK_SLOT_MAX];
@@ -377,6 +381,21 @@ class EditorNode : public Node {
EditorFileServer *file_server;
+
+ struct BottomPanelItem {
+ String name;
+ Control *control;
+ ToolButton *button;
+ };
+
+ Vector<BottomPanelItem> bottom_panel_items;
+
+ PanelContainer *bottom_panel;
+ HBoxContainer *bottom_panel_hb;
+ VBoxContainer *bottom_panel_vb;
+
+ void _bottom_panel_switch(bool p_enable, int p_idx);
+
String external_file;
List<String> previous_scenes;
bool opening_prev;
@@ -408,8 +427,8 @@ class EditorNode : public Node {
void _node_renamed();
void _editor_select(int p_which);
- void _set_scene_metadata();
- void _get_scene_metadata();
+ void _set_scene_metadata(const String &p_file);
+ void _get_scene_metadata(const String& p_file);
void _update_title();
void _update_scene_tabs();
void _close_messages();
@@ -426,9 +445,8 @@ class EditorNode : public Node {
void _property_keyed(const String& p_keyed, const Variant& p_value, bool p_advance);
void _transform_keyed(Object *sp,const String& p_sub,const Transform& p_key);
- void _update_keying();
void _hide_top_editors();
- void _quick_opened(const String& p_resource);
+ void _quick_opened();
void _quick_run(const String& p_resource);
void _run(bool p_current=false, const String &p_custom="");
@@ -520,15 +538,27 @@ class EditorNode : public Node {
void _save_docks();
void _load_docks();
+ void _save_docks_to_config(Ref<ConfigFile> p_layout, const String& p_section);
+ void _load_docks_from_config(Ref<ConfigFile> p_layout, const String& p_section);
+
+ void _update_layouts_menu();
+ void _layout_menu_option(int p_idx);
void _toggle_search_bar(bool p_pressed);
void _clear_search_box();
+ void _clear_undo_history();
protected:
void _notification(int p_what);
- static void _bind_methods();
+ static void _bind_methods();
public:
+ enum EditorTable {
+ EDITOR_2D = 0,
+ EDITOR_3D,
+ EDITOR_SCRIPT
+ };
+
static EditorNode* get_singleton() { return singleton; }
@@ -564,13 +594,10 @@ public:
static EditorLog *get_log() { return singleton->log; }
Control* get_viewport();
- AnimationKeyEditor *get_animation_editor() const { return animation_editor; }
- Control *get_animation_panel() { return animation_vb; }
- HBoxContainer *get_animation_panel_hb() { return animation_panel_hb; }
- void animation_editor_make_visible(bool p_visible);
- void hide_animation_player_editors();
- void animation_panel_make_visible(bool p_visible);
+ //void animation_editor_make_visible(bool p_visible);
+ //void hide_animation_player_editors();
+ //void animation_panel_make_visible(bool p_visible);
void set_edited_scene(Node *p_scene);
@@ -590,6 +617,7 @@ public:
void set_current_scene(int p_idx);
static EditorData& get_editor_data() { return singleton->editor_data; }
+ EditorHistory * get_editor_history() { return &editor_history; }
static VSplitContainer *get_top_split() { return singleton->top_split; }
@@ -623,7 +651,7 @@ public:
static void add_io_error(const String& p_error);
static void progress_add_task(const String& p_task,const String& p_label, int p_steps);
- static void progress_task_step(const String& p_task,const String& p_state, int p_step=-1);
+ static void progress_task_step(const String& p_task,const String& p_state, int p_step=-1,bool p_force_refresh=true);
static void progress_end_task(const String& p_task);
static void progress_add_task_bg(const String& p_task,const String& p_label, int p_steps);
@@ -638,6 +666,15 @@ public:
void save_layout();
+ void update_keying();
+
+
+ ToolButton* add_bottom_panel_item(String p_text,Control *p_item);
+ bool are_bottom_panels_hidden() const;
+ void make_bottom_panel_item_visible(Control *p_item);
+ void raise_bottom_panel_item(Control *p_item);
+ void hide_bottom_panel();
+
EditorNode();
~EditorNode();
void get_singleton(const char* arg1, bool arg2);
@@ -650,7 +687,7 @@ public:
struct EditorProgress {
String task;
- void step(const String& p_state, int p_step=-1) { EditorNode::progress_task_step(task,p_state,p_step); }
+ void step(const String& p_state, int p_step=-1,bool p_force_refresh=true) { EditorNode::progress_task_step(task,p_state,p_step,p_force_refresh); }
EditorProgress(const String& p_task,const String& p_label,int p_amount) { EditorNode::progress_add_task(p_task,p_label,p_amount); task=p_task; }
~EditorProgress() { EditorNode::progress_end_task(task); }
};
diff --git a/tools/editor/editor_path.cpp b/tools/editor/editor_path.cpp
index 94e2efe346..4cf98e832c 100644
--- a/tools/editor/editor_path.cpp
+++ b/tools/editor/editor_path.cpp
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/tools/editor/editor_path.h b/tools/editor/editor_path.h
index 2edaeb92a3..11e1005ba3 100644
--- a/tools/editor/editor_path.h
+++ b/tools/editor/editor_path.h
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/tools/editor/editor_plugin.cpp b/tools/editor/editor_plugin.cpp
index 7417d707bb..b7ccb452e9 100644
--- a/tools/editor/editor_plugin.cpp
+++ b/tools/editor/editor_plugin.cpp
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/tools/editor/editor_plugin.h b/tools/editor/editor_plugin.h
index 0f3a1e2e3c..bf1e185a37 100644
--- a/tools/editor/editor_plugin.h
+++ b/tools/editor/editor_plugin.h
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -92,6 +92,7 @@ public:
virtual bool get_remove_list(List<Node*> *p_list);
virtual void set_window_layout(Ref<ConfigFile> p_layout);
virtual void get_window_layout(Ref<ConfigFile> p_layout);
+ virtual void edited_scene_changed(){}; // if changes are pending in editor, apply them
virtual void restore_global_state();
virtual void save_global_state();
diff --git a/tools/editor/editor_reimport_dialog.cpp b/tools/editor/editor_reimport_dialog.cpp
index 8842a485b3..eab5a5e32d 100644
--- a/tools/editor/editor_reimport_dialog.cpp
+++ b/tools/editor/editor_reimport_dialog.cpp
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/tools/editor/editor_reimport_dialog.h b/tools/editor/editor_reimport_dialog.h
index 9726bac805..0c2d0eb52c 100644
--- a/tools/editor/editor_reimport_dialog.h
+++ b/tools/editor/editor_reimport_dialog.h
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/tools/editor/editor_run.cpp b/tools/editor/editor_run.cpp
index b635cea84b..fb0f24c084 100644
--- a/tools/editor/editor_run.cpp
+++ b/tools/editor/editor_run.cpp
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/tools/editor/editor_run.h b/tools/editor/editor_run.h
index e1b0b081c7..0b96a2c91c 100644
--- a/tools/editor/editor_run.h
+++ b/tools/editor/editor_run.h
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/tools/editor/editor_run_native.cpp b/tools/editor/editor_run_native.cpp
index 2eedba93dc..234dd03087 100644
--- a/tools/editor/editor_run_native.cpp
+++ b/tools/editor/editor_run_native.cpp
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/tools/editor/editor_run_native.h b/tools/editor/editor_run_native.h
index 77d6dc198e..04dad6b6aa 100644
--- a/tools/editor/editor_run_native.h
+++ b/tools/editor/editor_run_native.h
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/tools/editor/editor_selection.cpp b/tools/editor/editor_selection.cpp
index d8fd8735fc..f3fbdba907 100644
--- a/tools/editor/editor_selection.cpp
+++ b/tools/editor/editor_selection.cpp
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/tools/editor/editor_selection.h b/tools/editor/editor_selection.h
index f10f313a4e..d238d86567 100644
--- a/tools/editor/editor_selection.h
+++ b/tools/editor/editor_selection.h
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/tools/editor/editor_settings.cpp b/tools/editor/editor_settings.cpp
index 15de6e7266..4195ba97e6 100644
--- a/tools/editor/editor_settings.cpp
+++ b/tools/editor/editor_settings.cpp
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -515,6 +515,8 @@ void EditorSettings::_load_defaults() {
set("text_editor/create_signal_callbacks",true);
set("file_dialog/show_hidden_files", false);
+ set("file_dialog/display_mode", 0);
+ hints["file_dialog/display_mode"]=PropertyInfo(Variant::INT,"file_dialog/display_mode",PROPERTY_HINT_ENUM,"Thumbnails,List");
set("file_dialog/thumbnail_size", 64);
hints["file_dialog/thumbnail_size"]=PropertyInfo(Variant::INT,"file_dialog/thumbnail_size",PROPERTY_HINT_RANGE,"32,128,16");
diff --git a/tools/editor/editor_settings.h b/tools/editor/editor_settings.h
index 4ba940cd1c..d1a11360af 100644
--- a/tools/editor/editor_settings.h
+++ b/tools/editor/editor_settings.h
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -107,6 +107,7 @@ public:
static EditorSettings *get_singleton();
void erase(String p_var);
String get_settings_path() const;
+ String get_global_settings_path() const;
String get_project_settings_path() const;
const Map<String,Plugin>& get_plugins() const { return plugins; }
diff --git a/tools/editor/editor_sub_scene.cpp b/tools/editor/editor_sub_scene.cpp
index 2a6eba2554..e58e2c1351 100644
--- a/tools/editor/editor_sub_scene.cpp
+++ b/tools/editor/editor_sub_scene.cpp
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -196,7 +196,11 @@ void EditorSubScene::_bind_methods() {
EditorSubScene::EditorSubScene() {
+ scene=NULL;
+
set_title("Select Sub-Scene..");
+ set_hide_on_ok(false);
+
VBoxContainer *vb = memnew( VBoxContainer );
add_child(vb);
set_child_rect(vb);
@@ -211,9 +215,11 @@ EditorSubScene::EditorSubScene() {
hb->add_child(b);
b->connect("pressed",this,"_path_browse");
vb->add_margin_child("Scene Path:",hb);
+
tree = memnew( Tree );
tree->set_v_size_flags(SIZE_EXPAND_FILL);
- vb->add_margin_child("Import From Node:",tree)->set_v_size_flags(SIZE_EXPAND_FILL);
+ vb->add_margin_child("Import From Node:",tree,true);
+ tree->connect("item_activated",this,"_ok");
file_dialog = memnew( EditorFileDialog );
List<String> extensions;
@@ -228,8 +234,4 @@ EditorSubScene::EditorSubScene() {
add_child(file_dialog);
file_dialog->connect("file_selected",this,"_path_selected");
- scene=NULL;
-
- set_hide_on_ok(false);
-
}
diff --git a/tools/editor/editor_sub_scene.h b/tools/editor/editor_sub_scene.h
index dfd6c531e2..3dd86eefda 100644
--- a/tools/editor/editor_sub_scene.h
+++ b/tools/editor/editor_sub_scene.h
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/tools/editor/editor_vu.cpp b/tools/editor/editor_vu.cpp
index ac11aceb21..7a133c9736 100644
--- a/tools/editor/editor_vu.cpp
+++ b/tools/editor/editor_vu.cpp
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/tools/editor/editor_vu.h b/tools/editor/editor_vu.h
index 4c51ac31c0..78fe3eda86 100644
--- a/tools/editor/editor_vu.h
+++ b/tools/editor/editor_vu.h
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/tools/editor/file_type_cache.cpp b/tools/editor/file_type_cache.cpp
index a86400a560..7044a9900c 100644
--- a/tools/editor/file_type_cache.cpp
+++ b/tools/editor/file_type_cache.cpp
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/tools/editor/file_type_cache.h b/tools/editor/file_type_cache.h
index efc6d22b25..18451cbe19 100644
--- a/tools/editor/file_type_cache.h
+++ b/tools/editor/file_type_cache.h
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/tools/editor/groups_editor.cpp b/tools/editor/groups_editor.cpp
index 2e82854014..4b1096148a 100644
--- a/tools/editor/groups_editor.cpp
+++ b/tools/editor/groups_editor.cpp
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -27,151 +27,132 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
#include "groups_editor.h"
-#include "scene/gui/box_container.h"
+#include "scene/gui/box_container.h"
#include "scene/gui/label.h"
+void GroupsEditor::_add_group(const String& p_group) {
-#include "print_string.h"
+ if (!node)
+ return;
-void GroupsEditor::_notification(int p_what) {
-
- if (p_what==NOTIFICATION_ENTER_TREE) {
- connect("confirmed", this,"_close");
- }
- if (p_what==NOTIFICATION_EXIT_TREE) {
- disconnect("confirmed", this,"_close");
- }
-}
+ String name = group_name->get_text();
+ if (name.strip_edges()=="")
+ return;
-void GroupsEditor::_close() {
-
- hide();
-
-}
-void GroupsEditor::_add() {
-
- if (!node)
+ if (node->is_in_group(name))
return;
-
- undo_redo->create_action("Add To Group");
- undo_redo->add_do_method(node,"add_to_group",group_name->get_text(),true);
- undo_redo->add_undo_method(node,"remove_from_group",group_name->get_text());
+ undo_redo->create_action("Add to Group");
+
+ undo_redo->add_do_method(node,"add_to_group",name,true);
undo_redo->add_do_method(this,"update_tree");
+ undo_redo->add_undo_method(node,"remove_from_group",name,get_text());
undo_redo->add_undo_method(this,"update_tree");
undo_redo->commit_action();
+
+ group_name->clear();
}
+void GroupsEditor::_remove_group(Object *p_item, int p_column, int p_id) {
-void GroupsEditor::_remove() {
-
- if (!tree->get_selected())
- return;
if (!node)
return;
- TreeItem *sel = tree->get_selected();
- if (!sel)
+ TreeItem *ti = p_item->cast_to<TreeItem>();
+ if (!ti)
return;
-
- node->remove_from_group( sel->get_text(0) );
- update_tree();
+
+ String name = ti->get_text(0);
+
+ undo_redo->create_action("Remove from Group");
+
+ undo_redo->add_do_method(node,"remove_from_group",name);
+ undo_redo->add_do_method(this,"update_tree");
+ undo_redo->add_undo_method(node,"add_to_group",name,true);
+ undo_redo->add_undo_method(this,"update_tree");
+
+ undo_redo->commit_action();
}
+struct _GroupInfoComparator {
+
+ bool operator()(const Node::GroupInfo& p_a, const Node::GroupInfo& p_b) const {
+ return p_a.name.operator String() < p_b.name.operator String();
+ }
+};
+
void GroupsEditor::update_tree() {
-
tree->clear();
-
+
if (!node)
return;
-
- List<GroupInfo> groups;
+
+ List<Node::GroupInfo> groups;
node->get_groups(&groups);
-
+ groups.sort_custom<_GroupInfoComparator>();
+
TreeItem *root=tree->create_item();
-
+
for(List<GroupInfo>::Element *E=groups.front();E;E=E->next()) {
-
- if (!E->get().persistent)
+
+ Node::GroupInfo gi = E->get();
+ if (!gi.persistent)
continue;
+
TreeItem *item=tree->create_item(root);
- item->set_text(0, E->get().name);
-
+ item->set_text(0, gi.name);
+ item->add_button(0, get_icon("Remove", "EditorIcons"), 0);
}
-
}
void GroupsEditor::set_current(Node* p_node) {
-
+
node=p_node;
update_tree();
-
}
void GroupsEditor::_bind_methods() {
-
- ObjectTypeDB::bind_method("_add",&GroupsEditor::_add);
- ObjectTypeDB::bind_method("_close",&GroupsEditor::_close);
- ObjectTypeDB::bind_method("_remove",&GroupsEditor::_remove);
+
+ ObjectTypeDB::bind_method("_add_group",&GroupsEditor::_add_group);
+ ObjectTypeDB::bind_method("_remove_group",&GroupsEditor::_remove_group);
ObjectTypeDB::bind_method("update_tree",&GroupsEditor::update_tree);
}
GroupsEditor::GroupsEditor() {
+ node=NULL;
+
set_title("Group Editor");
-
- Label * label = memnew( Label );
- label->set_pos( Point2( 8,11) );
- label->set_text("Groups:");
-
- add_child(label);
-
- group_name = memnew(LineEdit);
- group_name->set_anchor( MARGIN_RIGHT, ANCHOR_END );
- group_name->set_begin( Point2( 15,28) );
- group_name->set_end( Point2( 94,48 ) );
-
- add_child(group_name);
-
- tree = memnew( Tree );
- tree->set_anchor( MARGIN_RIGHT, ANCHOR_END );
- tree->set_anchor( MARGIN_BOTTOM, ANCHOR_END );
- tree->set_begin( Point2( 15,52) );
- tree->set_end( Point2( 94,42 ) );
- tree->set_hide_root(true);
- add_child(tree);
-
+
+ VBoxContainer *vbc = memnew( VBoxContainer );
+ add_child(vbc);
+ set_child_rect(vbc);
+
+ HBoxContainer *hbc = memnew( HBoxContainer );
+ vbc->add_margin_child("Group", hbc);
+
+ group_name = memnew( LineEdit );
+ group_name->set_h_size_flags(SIZE_EXPAND_FILL);
+ hbc->add_child(group_name);
+ group_name->connect("text_entered",this,"_add_group");
+
add = memnew( Button );
- add->set_anchor( MARGIN_LEFT, ANCHOR_END );
- add->set_anchor( MARGIN_RIGHT, ANCHOR_END );
- add->set_begin( Point2( 90, 28 ) );
- add->set_end( Point2( 15, 48 ) );
add->set_text("Add");
-
- add_child(add);
-
- remove = memnew( Button );
- remove->set_anchor( MARGIN_LEFT, ANCHOR_END );
- remove->set_anchor( MARGIN_RIGHT, ANCHOR_END );
- remove->set_begin( Point2( 90, 52 ) );
- remove->set_end( Point2( 15, 72 ) );
- remove->set_text("Remove");
-
- add_child(remove);
+ hbc->add_child(add);
+ add->connect("pressed", this,"_add_group", varray(String()));
- get_ok()->set_text("Close");
-
- add->connect("pressed", this,"_add");
- remove->connect("pressed", this,"_remove");
+ tree = memnew( Tree );
+ tree->set_hide_root(true);
+ tree->set_v_size_flags(SIZE_EXPAND_FILL);
+ vbc->add_margin_child("Node Group(s)", tree, true);
+ tree->connect("button_pressed",this,"_remove_group");
-
- node=NULL;
+ get_ok()->set_text("Close");
}
-
GroupsEditor::~GroupsEditor()
{
}
diff --git a/tools/editor/groups_editor.h b/tools/editor/groups_editor.h
index 09883a150f..b5bccb2766 100644
--- a/tools/editor/groups_editor.h
+++ b/tools/editor/groups_editor.h
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -29,42 +29,42 @@
#ifndef GROUPS_EDITOR_H
#define GROUPS_EDITOR_H
-
#include "scene/gui/dialogs.h"
#include "scene/gui/button.h"
#include "scene/gui/tree.h"
#include "scene/gui/line_edit.h"
#include "undo_redo.h"
+
/**
@author Juan Linietsky <reduzio@gmail.com>
*/
-class GroupsEditor : public ConfirmationDialog {
-
- OBJ_TYPE( GroupsEditor, ConfirmationDialog );
-
+
+class GroupsEditor : public AcceptDialog {
+
+ OBJ_TYPE(GroupsEditor,AcceptDialog);
+
+ Node *node;
+
LineEdit *group_name;
- Tree *tree;
Button *add;
- Button *remove;
- Node *node;
+ Tree *tree;
+
UndoRedo *undo_redo;
-
+
void update_tree();
- void _add();
- void _remove();
+ void _add_group(const String& p_group="");
+ void _remove_group(Object *p_item, int p_column, int p_id);
void _close();
-
protected:
-
- void _notification(int p_what);
- static void _bind_methods();
+
+ static void _bind_methods();
public:
-
+
void set_undo_redo(UndoRedo *p_undoredo) { undo_redo=p_undoredo; }
void set_current(Node* p_node);
-
+
GroupsEditor();
~GroupsEditor();
-
};
+
#endif
diff --git a/tools/editor/icons/icon_add_track.png b/tools/editor/icons/icon_add_track.png
index 3862597828..6a90950173 100644
--- a/tools/editor/icons/icon_add_track.png
+++ b/tools/editor/icons/icon_add_track.png
Binary files differ
diff --git a/tools/editor/icons/icon_console.png b/tools/editor/icons/icon_console.png
new file mode 100644
index 0000000000..7dc7407ef7
--- /dev/null
+++ b/tools/editor/icons/icon_console.png
Binary files differ
diff --git a/tools/editor/icons/icon_create_new_scene_from.png b/tools/editor/icons/icon_create_new_scene_from.png
new file mode 100644
index 0000000000..e747c4f59f
--- /dev/null
+++ b/tools/editor/icons/icon_create_new_scene_from.png
Binary files differ
diff --git a/tools/editor/icons/icon_edit_pivot.png b/tools/editor/icons/icon_edit_pivot.png
new file mode 100644
index 0000000000..d68f7bbf25
--- /dev/null
+++ b/tools/editor/icons/icon_edit_pivot.png
Binary files differ
diff --git a/tools/editor/icons/icon_key_invalid.png b/tools/editor/icons/icon_key_invalid.png
new file mode 100644
index 0000000000..e8e6c87180
--- /dev/null
+++ b/tools/editor/icons/icon_key_invalid.png
Binary files differ
diff --git a/tools/editor/icons/icon_key_invalid_hover.png b/tools/editor/icons/icon_key_invalid_hover.png
new file mode 100644
index 0000000000..6f0396d96a
--- /dev/null
+++ b/tools/editor/icons/icon_key_invalid_hover.png
Binary files differ
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
--- /dev/null
+++ b/tools/editor/icons/icon_list_select.png
Binary files differ
diff --git a/tools/editor/icons/icon_pin.png b/tools/editor/icons/icon_pin.png
index 037352137d..4862ee8f71 100644
--- a/tools/editor/icons/icon_pin.png
+++ b/tools/editor/icons/icon_pin.png
Binary files differ
diff --git a/tools/editor/import_settings.cpp b/tools/editor/import_settings.cpp
index 36d7828be0..2bbd1e3805 100644
--- a/tools/editor/import_settings.cpp
+++ b/tools/editor/import_settings.cpp
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/tools/editor/import_settings.h b/tools/editor/import_settings.h
index 31237dd8cf..5a383a1a1a 100644
--- a/tools/editor/import_settings.h
+++ b/tools/editor/import_settings.h
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/tools/editor/io_plugins/editor_atlas.cpp b/tools/editor/io_plugins/editor_atlas.cpp
index 7e9acd193d..f894e7e8b2 100644
--- a/tools/editor/io_plugins/editor_atlas.cpp
+++ b/tools/editor/io_plugins/editor_atlas.cpp
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/tools/editor/io_plugins/editor_atlas.h b/tools/editor/io_plugins/editor_atlas.h
index 716faff0c6..0135e76622 100644
--- a/tools/editor/io_plugins/editor_atlas.h
+++ b/tools/editor/io_plugins/editor_atlas.h
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/tools/editor/io_plugins/editor_export_scene.cpp b/tools/editor/io_plugins/editor_export_scene.cpp
new file mode 100644
index 0000000000..dff41a59ed
--- /dev/null
+++ b/tools/editor/io_plugins/editor_export_scene.cpp
@@ -0,0 +1,112 @@
+#include "editor_export_scene.h"
+#include "io/resource_loader.h"
+#include "io/resource_saver.h"
+#include "os/dir_access.h"
+#include "os/file_access.h"
+#include "tools/editor/editor_settings.h"
+#include "scene/resources/packed_scene.h"
+#include "globals.h"
+
+Vector<uint8_t> EditorSceneExportPlugin::custom_export(String& p_path,const Ref<EditorExportPlatform> &p_platform) {
+
+ if (!EditorImportExport::get_singleton()->get_convert_text_scenes()) {
+ return Vector<uint8_t>();
+ }
+
+
+ String extension = p_path.extension();
+
+ //step 1 check if scene
+
+ if (extension=="xml" || extension=="xres") {
+
+ String type = ResourceLoader::get_resource_type(p_path);
+
+ if (type!="PackedScene")
+ return Vector<uint8_t>();
+
+ } else if (extension!="tscn" && extension!="xscn") {
+ return Vector<uint8_t>();
+ }
+
+ //step 2 check if cached
+
+ uint64_t sd=0;
+ String smd5;
+ String gp = Globals::get_singleton()->globalize_path(p_path);
+ String md5=gp.md5_text();
+ String tmp_path = EditorSettings::get_singleton()->get_settings_path().plus_file("tmp/");
+
+ bool valid=false;
+ {
+ //if existing, make sure it's valid
+ FileAccessRef f = FileAccess::open(tmp_path+"scnexp-"+md5+".txt",FileAccess::READ);
+ if (f) {
+
+ uint64_t d = f->get_line().strip_edges().to_int64();
+ sd = FileAccess::get_modified_time(p_path);
+
+ if (d==sd) {
+ valid=true;
+ } else {
+ String cmd5 = f->get_line().strip_edges();
+ smd5 = FileAccess::get_md5(p_path);
+ if (cmd5==smd5) {
+ valid=true;
+ }
+ }
+
+
+ }
+ }
+
+ if (!valid) {
+ //cache failed, convert
+ DirAccess *da = DirAccess::create(DirAccess::ACCESS_RESOURCES);
+
+ String copy = p_path+".convert."+extension;
+
+ // a copy will allow loading the internal resources without conflicting with opened scenes
+ da->copy(p_path,copy);
+
+ //@todo for tscn use something more efficient
+
+ Ref<PackedScene> copyres = ResourceLoader::load(copy,"PackedScene");
+
+ da->remove(copy);
+
+ memdelete(da);
+
+ ERR_FAIL_COND_V(!copyres.is_valid(),Vector<uint8_t>());
+
+ Error err = ResourceSaver::save(tmp_path+"scnexp-"+md5+".scn",copyres);
+
+ copyres=Ref<PackedScene>();
+
+ ERR_FAIL_COND_V(err!=OK,Vector<uint8_t>());
+
+ FileAccessRef f = FileAccess::open(tmp_path+"scnexp-"+md5+".txt",FileAccess::WRITE);
+
+ if (sd==0)
+ sd = FileAccess::get_modified_time(p_path);
+ if (smd5==String())
+ smd5 = FileAccess::get_md5(p_path);
+
+ f->store_line(String::num(sd));
+ f->store_line(smd5);
+ f->store_line(gp); //source path for reference
+ }
+
+
+ Vector<uint8_t> ret = FileAccess::get_file_as_array(tmp_path+"scnexp-"+md5+".scn");
+
+ p_path+=".converted.scn";
+
+ return ret;
+
+}
+
+
+EditorSceneExportPlugin::EditorSceneExportPlugin()
+{
+}
diff --git a/tools/editor/io_plugins/editor_export_scene.h b/tools/editor/io_plugins/editor_export_scene.h
new file mode 100644
index 0000000000..134da6c234
--- /dev/null
+++ b/tools/editor/io_plugins/editor_export_scene.h
@@ -0,0 +1,16 @@
+#ifndef EDITOR_EXPORT_SCENE_H
+#define EDITOR_EXPORT_SCENE_H
+
+#include "tools/editor/editor_import_export.h"
+
+
+class EditorSceneExportPlugin : public EditorExportPlugin {
+ OBJ_TYPE( EditorSceneExportPlugin, EditorExportPlugin );
+public:
+
+ virtual Vector<uint8_t> custom_export(String& p_path,const Ref<EditorExportPlatform> &p_platform);
+
+ EditorSceneExportPlugin();
+};
+
+#endif // EDITOR_EXPORT_SCENE_H
diff --git a/tools/editor/io_plugins/editor_font_import_plugin.cpp b/tools/editor/io_plugins/editor_font_import_plugin.cpp
index 10a3877529..9b4ca246e7 100644
--- a/tools/editor/io_plugins/editor_font_import_plugin.cpp
+++ b/tools/editor/io_plugins/editor_font_import_plugin.cpp
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -520,6 +520,10 @@ class EditorFontImportDialog : public ConfirmationDialog {
return;
}
+ if (dest->get_line_edit()->get_text().get_file()==".fnt") {
+ dest->get_line_edit()->set_text(dest->get_line_edit()->get_text().get_base_dir() + "/" + source->get_line_edit()->get_text().get_file().basename() + ".fnt" );
+ }
+
Ref<ResourceImportMetadata> rimd = get_rimd();
if (rimd.is_null()) {
@@ -617,6 +621,7 @@ public:
source->get_file_dialog()->set_mode(EditorFileDialog::MODE_OPEN_FILE);
source->get_file_dialog()->add_filter("*.ttf;TrueType");
source->get_file_dialog()->add_filter("*.otf;OpenType");
+ source->get_file_dialog()->add_filter("*.fnt;BMFont");
source->get_line_edit()->connect("text_entered",this,"_src_changed");
vbl->add_margin_child("Source Font:",source);
@@ -872,10 +877,31 @@ static unsigned char get_SDF_radial(
Ref<Font> EditorFontImportPlugin::generate_font(const Ref<ResourceImportMetadata>& p_from, const String &p_existing) {
+
+
Ref<ResourceImportMetadata> from = p_from;
ERR_FAIL_COND_V(from->get_source_count()!=1,Ref<Font>());
String src_path = EditorImportPlugin::expand_source_path(from->get_source_path(0));
+
+ if (src_path.extension().to_lower()=="fnt") {
+
+ if (ResourceLoader::load(src_path).is_valid()) {
+ EditorNode::get_singleton()->show_warning("Path: "+src_path+"\nIs a Godot font file, please supply a BMFont type file instead.");
+ return Ref<Font>();
+ }
+
+ Ref<Font> font;
+ font.instance();
+ Error err = font->create_from_fnt(src_path);
+ if (err) {
+ EditorNode::get_singleton()->show_warning("Path: "+src_path+"\nFailed opening as BMFont file.");
+ return Ref<Font>();
+ }
+
+ return font;
+ }
+
int size = from->get_option("font/size");
#ifdef FREETYPE_ENABLED
diff --git a/tools/editor/io_plugins/editor_font_import_plugin.h b/tools/editor/io_plugins/editor_font_import_plugin.h
index 451f01080e..814897c5f0 100644
--- a/tools/editor/io_plugins/editor_font_import_plugin.h
+++ b/tools/editor/io_plugins/editor_font_import_plugin.h
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/tools/editor/io_plugins/editor_import_collada.cpp b/tools/editor/io_plugins/editor_import_collada.cpp
index d57cff850e..7de9d978f2 100644
--- a/tools/editor/io_plugins/editor_import_collada.cpp
+++ b/tools/editor/io_plugins/editor_import_collada.cpp
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -68,6 +68,7 @@ struct ColladaImport {
Map<String,NodeMap> node_map; //map from collada node to engine node
+ Map<String,String> node_name_map; //map from collada node to engine node
Map<String, Ref<Mesh> > mesh_cache;
Map<String, Ref<Curve3D> > curve_cache;
Map<String, Ref<Material> > material_cache;
@@ -124,6 +125,7 @@ Error ColladaImport::_populate_skeleton(Skeleton *p_skeleton,Collada::Node *p_no
nm.node=p_skeleton;
nm.bone = r_bone;
node_map[p_node->id]=nm;
+ node_name_map[p_node->name]=p_node->id;
skeleton_bone_map[p_skeleton][joint->sid]=r_bone;
@@ -345,6 +347,7 @@ Error ColladaImport::_create_scene(Collada::Node *p_node, Spatial *p_parent) {
NodeMap nm;
nm.node=node;
node_map[p_node->id]=nm;
+ node_name_map[p_node->name]=p_node->id;
Transform xf = p_node->default_transform;
xf = collada.fix_transform( xf ) * p_node->post_transform;
@@ -1906,9 +1909,20 @@ void ColladaImport::create_animations(bool p_make_tracks_in_all_bones) {
Collada::AnimationTrack &at = collada.state.animation_tracks[i];
//print_line("CHANNEL: "+at.target+" PARAM: "+at.param);
+
+ String node;
+
if (!node_map.has(at.target)) {
- print_line("Coudlnt find node: "+at.target);
- continue;
+
+ if (node_name_map.has(at.target)) {
+
+ node=node_name_map[at.target];
+ } else {
+ print_line("Coudlnt find node: "+at.target);
+ continue;
+ }
+ } else {
+ node=at.target;
}
@@ -1917,8 +1931,9 @@ void ColladaImport::create_animations(bool p_make_tracks_in_all_bones) {
valid_animated_properties.push_back(i);
} else {
- node_map[at.target].anim_tracks.push_back(i);
- valid_animated_nodes.insert(at.target);
+
+ node_map[node].anim_tracks.push_back(i);
+ valid_animated_nodes.insert(node);
}
}
@@ -1934,6 +1949,7 @@ void ColladaImport::create_animation(int p_clip, bool p_make_tracks_in_all_bones
Ref<Animation> animation = Ref<Animation>( memnew( Animation ));
+
if (p_clip==-1) {
//print_line("default");
@@ -2007,10 +2023,12 @@ void ColladaImport::create_animation(int p_clip, bool p_make_tracks_in_all_bones
while(f<anim_length) {
base_snapshots.push_back(f);
+
f+=snapshot_interval;
if (f>=anim_length) {
base_snapshots.push_back(anim_length);
+
}
}
@@ -2019,11 +2037,17 @@ void ColladaImport::create_animation(int p_clip, bool p_make_tracks_in_all_bones
bool tracks_found=false;
+
+
for(Set<String>::Element* E=valid_animated_nodes.front();E;E=E->next()) {
// take snapshots
- if (!collada.state.scene_map.has(E->get()))
+
+
+ if (!collada.state.scene_map.has(E->get())) {
+
continue;
+ }
NodeMap &nm = node_map[E->get()];
String path = scene->get_path_to(nm.node);
@@ -2039,7 +2063,7 @@ void ColladaImport::create_animation(int p_clip, bool p_make_tracks_in_all_bones
Collada::Node *cn = collada.state.scene_map[E->get()];
if (cn->ignore_anim) {
- //print_line("warning, ignoring animation on node: "+path);
+
continue;
}
@@ -2058,20 +2082,23 @@ void ColladaImport::create_animation(int p_clip, bool p_make_tracks_in_all_bones
for(int i=0;i<at.keys.size();i++)
snapshots.push_back(at.keys[i].time);
- print_line("using anim snapshots");
}
for(int i=0;i<snapshots.size();i++) {
+
for(List<int>::Element *ET=nm.anim_tracks.front();ET;ET=ET->next()) {
//apply tracks
+
if (p_clip==-1) {
- if (track_filter.has(ET->get()))
+ if (track_filter.has(ET->get())) {
+
continue;
+ }
} else {
if (!track_filter.has(ET->get()))
diff --git a/tools/editor/io_plugins/editor_import_collada.h b/tools/editor/io_plugins/editor_import_collada.h
index 243cd043a0..de45dc38f4 100644
--- a/tools/editor/io_plugins/editor_import_collada.h
+++ b/tools/editor/io_plugins/editor_import_collada.h
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/tools/editor/io_plugins/editor_mesh_import_plugin.cpp b/tools/editor/io_plugins/editor_mesh_import_plugin.cpp
index 2139513025..b32ab8cb0b 100644
--- a/tools/editor/io_plugins/editor_mesh_import_plugin.cpp
+++ b/tools/editor/io_plugins/editor_mesh_import_plugin.cpp
@@ -128,7 +128,7 @@ class EditorMeshImportDialog : public ConfirmationDialog {
LineEdit *save_path;
EditorFileDialog *file_select;
EditorDirDialog *save_select;
- ConfirmationDialog *error_dialog;
+ AcceptDialog *error_dialog;
PropertyEditor *option_editor;
_EditorMeshImportOptions *options;
@@ -169,13 +169,12 @@ public:
void _browse_target() {
save_select->popup_centered_ratio();
-
}
-
void popup_import(const String& p_path) {
popup_centered(Size2(400,400));
+
if (p_path!="") {
Ref<ResourceImportMetadata> rimd = ResourceLoader::load_import_metadata(p_path);
@@ -199,14 +198,13 @@ public:
}
}
-
void _import() {
Vector<String> meshes = import_path->get_text().split(",");
-
if (meshes.size()==0) {
error_dialog->set_text("No meshes to import!");
- error_dialog->popup_centered(Size2(200,100));
+ error_dialog->popup_centered_minsize();
+ return;
}
for(int i=0;i<meshes.size();i++) {
@@ -229,19 +227,18 @@ public:
String dst = save_path->get_text();
if (dst=="") {
error_dialog->set_text("Save path is empty!");
- error_dialog->popup_centered(Size2(200,100));
+ error_dialog->popup_centered_minsize();
+ return;
}
dst = dst.plus_file(meshes[i].get_file().basename()+".msh");
- Error err = plugin->import(dst,imd);
+ plugin->import(dst,imd);
}
hide();
-
}
-
void _notification(int p_what) {
@@ -253,27 +250,24 @@ public:
static void _bind_methods() {
-
ObjectTypeDB::bind_method("_choose_files",&EditorMeshImportDialog::_choose_files);
ObjectTypeDB::bind_method("_choose_save_dir",&EditorMeshImportDialog::_choose_save_dir);
ObjectTypeDB::bind_method("_import",&EditorMeshImportDialog::_import);
ObjectTypeDB::bind_method("_browse",&EditorMeshImportDialog::_browse);
ObjectTypeDB::bind_method("_browse_target",&EditorMeshImportDialog::_browse_target);
- // ADD_SIGNAL( MethodInfo("imported",PropertyInfo(Variant::OBJECT,"scene")) );
}
EditorMeshImportDialog(EditorMeshImportPlugin *p_plugin) {
plugin=p_plugin;
-
set_title("Single Mesh Import");
+ set_hide_on_ok(false);
VBoxContainer *vbc = memnew( VBoxContainer );
add_child(vbc);
set_child_rect(vbc);
-
HBoxContainer *hbc = memnew( HBoxContainer );
vbc->add_margin_child("Source Mesh(es):",hbc);
@@ -300,28 +294,23 @@ public:
save_choose->connect("pressed", this,"_browse_target");
- file_select = memnew(EditorFileDialog);
+ file_select = memnew( EditorFileDialog );
file_select->set_access(EditorFileDialog::ACCESS_FILESYSTEM);
- add_child(file_select);
file_select->set_mode(EditorFileDialog::MODE_OPEN_FILES);
- file_select->connect("files_selected", this,"_choose_files");
file_select->add_filter("*.obj ; Wavefront OBJ");
- save_select = memnew( EditorDirDialog );
- add_child(save_select);
+ add_child(file_select);
+ file_select->connect("files_selected", this,"_choose_files");
- // save_select->set_mode(EditorFileDialog::MODE_OPEN_DIR);
+ save_select = memnew( EditorDirDialog );
+ add_child(save_select);
save_select->connect("dir_selected", this,"_choose_save_dir");
get_ok()->connect("pressed", this,"_import");
get_ok()->set_text("Import");
-
- error_dialog = memnew ( ConfirmationDialog );
+ error_dialog = memnew( AcceptDialog );
add_child(error_dialog);
- error_dialog->get_ok()->set_text("Accept");
- // error_dialog->get_cancel()->hide();
- set_hide_on_ok(false);
options = memnew( _EditorMeshImportOptions );
option_editor = memnew( PropertyEditor );
diff --git a/tools/editor/io_plugins/editor_sample_import_plugin.cpp b/tools/editor/io_plugins/editor_sample_import_plugin.cpp
index 7888246956..b81c88c817 100644
--- a/tools/editor/io_plugins/editor_sample_import_plugin.cpp
+++ b/tools/editor/io_plugins/editor_sample_import_plugin.cpp
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -859,7 +859,7 @@ Vector<uint8_t> EditorSampleExportPlugin::custom_export(String& p_path,const Ref
ERR_FAIL_COND_V(err!=OK,Vector<uint8_t>());
- 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_sample_import_plugin.h b/tools/editor/io_plugins/editor_sample_import_plugin.h
index 89319affa0..b31562af76 100644
--- a/tools/editor/io_plugins/editor_sample_import_plugin.h
+++ b/tools/editor/io_plugins/editor_sample_import_plugin.h
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/tools/editor/io_plugins/editor_scene_import_plugin.cpp b/tools/editor/io_plugins/editor_scene_import_plugin.cpp
index ca44df269b..a3b6827cd4 100644
--- a/tools/editor/io_plugins/editor_scene_import_plugin.cpp
+++ b/tools/editor/io_plugins/editor_scene_import_plugin.cpp
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/tools/editor/io_plugins/editor_scene_import_plugin.h b/tools/editor/io_plugins/editor_scene_import_plugin.h
index 71efab9503..1f3b73fe7f 100644
--- a/tools/editor/io_plugins/editor_scene_import_plugin.h
+++ b/tools/editor/io_plugins/editor_scene_import_plugin.h
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/tools/editor/io_plugins/editor_texture_import_plugin.cpp b/tools/editor/io_plugins/editor_texture_import_plugin.cpp
index 8d5a4f1dcf..29273ebd06 100644
--- a/tools/editor/io_plugins/editor_texture_import_plugin.cpp
+++ b/tools/editor/io_plugins/editor_texture_import_plugin.cpp
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -1666,7 +1666,7 @@ EditorTextureImportPlugin::EditorTextureImportPlugin(EditorNode *p_editor, Mode
if (pl.is_valid()) {
Vector<uint8_t> 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<uint8_t> 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;
}
}
diff --git a/tools/editor/io_plugins/editor_texture_import_plugin.h b/tools/editor/io_plugins/editor_texture_import_plugin.h
index 38fd671e9d..cb63ba98c8 100644
--- a/tools/editor/io_plugins/editor_texture_import_plugin.h
+++ b/tools/editor/io_plugins/editor_texture_import_plugin.h
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/tools/editor/io_plugins/editor_translation_import_plugin.cpp b/tools/editor/io_plugins/editor_translation_import_plugin.cpp
index d152d71af4..1edfe697b6 100644
--- a/tools/editor/io_plugins/editor_translation_import_plugin.cpp
+++ b/tools/editor/io_plugins/editor_translation_import_plugin.cpp
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/tools/editor/io_plugins/editor_translation_import_plugin.h b/tools/editor/io_plugins/editor_translation_import_plugin.h
index f3c2884534..cadcdc03b3 100644
--- a/tools/editor/io_plugins/editor_translation_import_plugin.h
+++ b/tools/editor/io_plugins/editor_translation_import_plugin.h
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/tools/editor/optimized_save_dialog.cpp b/tools/editor/optimized_save_dialog.cpp
index 687d3675fc..4814b3b021 100644
--- a/tools/editor/optimized_save_dialog.cpp
+++ b/tools/editor/optimized_save_dialog.cpp
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/tools/editor/optimized_save_dialog.h b/tools/editor/optimized_save_dialog.h
index 739d0e1506..bdc36eddc1 100644
--- a/tools/editor/optimized_save_dialog.h
+++ b/tools/editor/optimized_save_dialog.h
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/tools/editor/output_strings.cpp b/tools/editor/output_strings.cpp
index 30569d11b0..a19352f4ec 100644
--- a/tools/editor/output_strings.cpp
+++ b/tools/editor/output_strings.cpp
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/tools/editor/output_strings.h b/tools/editor/output_strings.h
index ad893534fa..3d5deb1646 100644
--- a/tools/editor/output_strings.h
+++ b/tools/editor/output_strings.h
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/tools/editor/pane_drag.cpp b/tools/editor/pane_drag.cpp
index fb137de5ce..8e8c2941ec 100644
--- a/tools/editor/pane_drag.cpp
+++ b/tools/editor/pane_drag.cpp
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/tools/editor/pane_drag.h b/tools/editor/pane_drag.h
index a6cd9b6662..24f2ef7ed8 100644
--- a/tools/editor/pane_drag.h
+++ b/tools/editor/pane_drag.h
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/tools/editor/plugins/animation_data_editor_plugin.cpp b/tools/editor/plugins/animation_data_editor_plugin.cpp
index d8d65b875a..a73c75056b 100644
--- a/tools/editor/plugins/animation_data_editor_plugin.cpp
+++ b/tools/editor/plugins/animation_data_editor_plugin.cpp
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/tools/editor/plugins/animation_data_editor_plugin.h b/tools/editor/plugins/animation_data_editor_plugin.h
index 0daa67d0a5..0a12638474 100644
--- a/tools/editor/plugins/animation_data_editor_plugin.h
+++ b/tools/editor/plugins/animation_data_editor_plugin.h
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/tools/editor/plugins/animation_player_editor_plugin.cpp b/tools/editor/plugins/animation_player_editor_plugin.cpp
index 6542fc8b4a..43b4276d45 100644
--- a/tools/editor/plugins/animation_player_editor_plugin.cpp
+++ b/tools/editor/plugins/animation_player_editor_plugin.cpp
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -32,20 +32,20 @@
#include "io/resource_saver.h"
#include "os/keyboard.h"
#include "tools/editor/editor_settings.h"
+#include "tools/editor/animation_editor.h"
void AnimationPlayerEditor::_node_removed(Node *p_node) {
if (player && player == p_node) {
player=NULL;
- hide();
+
set_process(false);
- if (edit_anim->is_pressed()) {
- editor->get_animation_editor()->set_animation(Ref<Animation>());
- editor->get_animation_editor()->set_root(NULL);
- editor->animation_editor_make_visible(false);
- edit_anim->set_pressed(false);
- }
+ key_editor->set_animation(Ref<Animation>());
+ key_editor->set_root(NULL);
+ _update_player();
+ //editor->animation_editor_make_visible(false);
+
}
}
@@ -72,19 +72,18 @@ void AnimationPlayerEditor::_notification(int p_what) {
Ref<Animation> anim = player->get_animation(animname);
if (!anim.is_null()) {
- seek->set_max(anim->get_length());
+ frame->set_max(anim->get_length());
}
}
}
- seek->set_val(player->get_current_animation_pos());
- if (edit_anim->is_pressed())
- editor->get_animation_editor()->set_anim_pos(player->get_current_animation_pos());
+ frame->set_val(player->get_current_animation_pos());
+ key_editor->set_anim_pos(player->get_current_animation_pos());
EditorNode::get_singleton()->get_property_editor()->refresh();
} else if (last_active) {
//need the last frame after it stopped
- seek->set_val(player->get_current_animation_pos());
+ frame->set_val(player->get_current_animation_pos());
}
last_active=player->is_playing();
@@ -94,7 +93,7 @@ void AnimationPlayerEditor::_notification(int p_what) {
if (p_what==NOTIFICATION_ENTER_TREE) {
- editor->connect("hide_animation_player_editors",this,"_hide_anim_editors");
+// editor->connect("hide_animation_player_editors",this,"_hide_anim_editors");
add_anim->set_icon( get_icon("New","EditorIcons") );
rename_anim->set_icon( get_icon("Rename","EditorIcons") );
duplicate_anim->set_icon( get_icon("Duplicate","EditorIcons") );
@@ -103,7 +102,7 @@ void AnimationPlayerEditor::_notification(int p_what) {
save_anim->set_icon(get_icon("Save", "EditorIcons"));
save_anim->get_popup()->connect("item_pressed", this, "_animation_save_menu");
remove_anim->set_icon( get_icon("Remove","EditorIcons") );
- edit_anim->set_icon( get_icon("Edit","EditorIcons") );
+
blend_anim->set_icon( get_icon("Blend","EditorIcons") );
play->set_icon( get_icon("PlayStart","EditorIcons") );
play_from->set_icon( get_icon("Play","EditorIcons") );
@@ -113,13 +112,14 @@ void AnimationPlayerEditor::_notification(int p_what) {
autoplay_icon=get_icon("AutoPlay","EditorIcons");
stop->set_icon( get_icon("Stop","EditorIcons") );
resource_edit_anim->set_icon( get_icon("EditResource","EditorIcons") );
- pin->set_normal_texture(get_icon("Pin","EditorIcons") );
- pin->set_pressed_texture( get_icon("PinPressed","EditorIcons") );
+ pin->set_icon(get_icon("Pin","EditorIcons") );
tool_anim->set_icon(get_icon("Tools","EditorIcons"));
tool_anim->get_popup()->connect("item_pressed",this,"_animation_tool_menu");
blend_editor.next->connect("text_changed",this,"_blend_editor_next_changed");
+ nodename->set_icon(get_icon("AnimationPlayer","EditorIcons"));
+
/*
anim_editor_load->set_normal_texture( get_icon("AnimGet","EditorIcons"));
anim_editor_store->set_normal_texture( get_icon("AnimSet","EditorIcons"));
@@ -295,22 +295,25 @@ void AnimationPlayerEditor::_animation_selected(int p_which) {
player->set_current_animation( current );
Ref<Animation> anim = player->get_animation(current);
- if (edit_anim->is_pressed()) {
- Ref<Animation> anim = player->get_animation(current);
- editor->get_animation_editor()->set_animation(anim);
+ {
+
+ key_editor->set_animation(anim);
Node *root = player->get_node(player->get_root());
if (root) {
- editor->get_animation_editor()->set_root(root);
+ key_editor->set_root(root);
}
}
- seek->set_max(anim->get_length());
+ frame->set_max(anim->get_length());
+ if (anim->get_step())
+ frame->set_step(anim->get_step());
+ else
+ frame->set_step(0.00001);
+
} else {
- if (edit_anim->is_pressed()) {
- editor->get_animation_editor()->set_animation(Ref<Animation>());
- editor->get_animation_editor()->set_root(NULL);
- }
+ key_editor->set_animation(Ref<Animation>());
+ key_editor->set_root(NULL);
}
@@ -631,7 +634,7 @@ Dictionary AnimationPlayerEditor::get_state() const {
if (is_visible() && player) {
d["player"]=EditorNode::get_singleton()->get_edited_scene()->get_path_to(player);
d["animation"]=player->get_current_animation();
- d["editing"]=edit_anim->is_pressed();
+
}
return d;
@@ -648,16 +651,12 @@ void AnimationPlayerEditor::set_state(const Dictionary& p_state) {
show();
set_process(true);
ensure_visibility();
- EditorNode::get_singleton()->animation_panel_make_visible(true);
+// EditorNode::get_singleton()->animation_panel_make_visible(true);
if (p_state.has("animation")) {
String anim = p_state["animation"];
_select_anim_by_name(anim);
- if (p_state.has("editing") && p_state["editing"]) {
-
- edit_anim->set_pressed(true);
- _animation_edit();
- }
+ _animation_edit();
}
}
@@ -678,36 +677,22 @@ void AnimationPlayerEditor::_animation_resource_edit() {
void AnimationPlayerEditor::_animation_edit() {
-// if (animation->get_item_count()==0)
-// return;
-
- if (edit_anim->is_pressed()) {
- editor->animation_editor_make_visible(true);
-
- //editor->get_animation_editor()->set_root(player->get_roo); - get root pending
- if (animation->get_item_count()) {
- String current = animation->get_item_text(animation->get_selected());
- Ref<Animation> anim = player->get_animation(current);
- editor->get_animation_editor()->set_animation(anim);
- Node *root = player->get_node(player->get_root());
- if (root) {
- editor->get_animation_editor()->set_root(root);
- }
+ if (animation->get_item_count()) {
+ String current = animation->get_item_text(animation->get_selected());
+ Ref<Animation> anim = player->get_animation(current);
+ key_editor->set_animation(anim);
+ Node *root = player->get_node(player->get_root());
+ if (root) {
+ key_editor->set_root(root);
+ }
- } else {
+ } else {
- editor->get_animation_editor()->set_animation(Ref<Animation>());
- editor->get_animation_editor()->set_root(NULL);
+ key_editor->set_animation(Ref<Animation>());
+ key_editor->set_root(NULL);
- }
- } else {
- editor->animation_editor_make_visible(false);
- editor->get_animation_editor()->set_animation(Ref<Animation>());
- editor->get_animation_editor()->set_root(NULL);
}
- //get_scene()->get_root_node()->call("_resource_selected",anim,"");
-
}
void AnimationPlayerEditor::_dialog_action(String p_file) {
@@ -800,16 +785,21 @@ void AnimationPlayerEditor::_update_animation() {
void AnimationPlayerEditor::_update_player() {
- if (!player)
- return;
updating=true;
List<StringName> animlist;
- player->get_animation_list(&animlist);
+ if (player)
+ player->get_animation_list(&animlist);
animation->clear();
- nodename->set_text(player->get_name());
+ if (player)
+ nodename->set_text(player->get_name());
+ else
+ nodename->set_text("<empty>");
+
+ add_anim->set_disabled(player==NULL);
+ load_anim->set_disabled(player==NULL);
stop->set_disabled(animlist.size()==0);
play->set_disabled(animlist.size()==0);
play_bw->set_disabled(animlist.size()==0);
@@ -837,6 +827,9 @@ void AnimationPlayerEditor::_update_player() {
}
+ if (!player)
+ return;
+
updating=false;
if (active_idx!=-1) {
animation->select(active_idx);
@@ -852,17 +845,14 @@ void AnimationPlayerEditor::_update_player() {
//pause->set_pressed(player->is_paused());
- if (edit_anim->is_pressed()) {
-
- if (animation->get_item_count()) {
- String current = animation->get_item_text(animation->get_selected());
- Ref<Animation> anim = player->get_animation(current);
- editor->get_animation_editor()->set_animation(anim);
- Node *root = player->get_node(player->get_root());
- if (root) {
- editor->get_animation_editor()->set_root(root);
- }
+ if (animation->get_item_count()) {
+ String current = animation->get_item_text(animation->get_selected());
+ Ref<Animation> anim = player->get_animation(current);
+ key_editor->set_animation(anim);
+ Node *root = player->get_node(player->get_root());
+ if (root) {
+ key_editor->set_root(root);
}
}
@@ -958,7 +948,7 @@ void AnimationPlayerEditor::_seek_value_changed(float p_value) {
Ref<Animation> anim;
anim=player->get_animation(current);
- float pos = anim->get_length() * (p_value / seek->get_max());
+ float pos = anim->get_length() * (p_value / frame->get_max());
if (player->is_valid()) {
float cpos = player->get_current_animation_pos();
@@ -968,8 +958,7 @@ void AnimationPlayerEditor::_seek_value_changed(float p_value) {
player->seek(pos,true);
}
- if (edit_anim->is_pressed())
- editor->get_animation_editor()->set_anim_pos(pos);
+ key_editor->set_anim_pos(pos);
updating=true;
};
@@ -999,19 +988,19 @@ void AnimationPlayerEditor::_editor_store() {
String current = animation->get_item_text(animation->get_selected());
Ref<Animation> anim = player->get_animation(current);
- if (editor->get_animation_editor()->get_current_animation()==anim)
+ if (key_editor->get_current_animation()==anim)
return; //already there
undo_redo->create_action("Store anim in editor");
- undo_redo->add_do_method(editor->get_animation_editor(),"set_animation",anim);
- undo_redo->add_undo_method(editor->get_animation_editor(),"remove_animation",anim);
+ undo_redo->add_do_method(key_editor,"set_animation",anim);
+ undo_redo->add_undo_method(key_editor,"remove_animation",anim);
undo_redo->commit_action();
}
void AnimationPlayerEditor::_editor_load(){
- Ref<Animation> anim = editor->get_animation_editor()->get_current_animation();
+ Ref<Animation> anim = key_editor->get_current_animation();
if (anim.is_null())
return;
@@ -1059,7 +1048,16 @@ void AnimationPlayerEditor::_editor_load(){
void AnimationPlayerEditor::_animation_key_editor_anim_len_changed(float p_len) {
- seek->set_max(p_len);
+ frame->set_max(p_len);
+
+}
+
+void AnimationPlayerEditor::_animation_key_editor_anim_step_changed(float p_len) {
+
+ if (p_len)
+ frame->set_step(p_len);
+ else
+ frame->set_step(0.00001);
}
@@ -1074,7 +1072,7 @@ void AnimationPlayerEditor::_animation_key_editor_seek(float p_pos) {
if (player->is_playing() )
return;
- seek->set_val(p_pos);
+ frame->set_val(p_pos);
EditorNode::get_singleton()->get_property_editor()->refresh();
@@ -1087,13 +1085,11 @@ void AnimationPlayerEditor::_hide_anim_editors() {
player=NULL;
hide();
set_process(false);
- if (edit_anim->is_pressed()) {
- editor->get_animation_editor()->set_animation(Ref<Animation>());
- editor->get_animation_editor()->set_root(NULL);
- editor->animation_editor_make_visible(false);
- edit_anim->set_pressed(false);
- }
+ key_editor->set_animation(Ref<Animation>());
+ key_editor->set_root(NULL);
+// editor->animation_editor_make_visible(false);
+
}
@@ -1238,6 +1234,7 @@ void AnimationPlayerEditor::_bind_methods() {
ObjectTypeDB::bind_method(_MD("_list_changed"),&AnimationPlayerEditor::_list_changed);
ObjectTypeDB::bind_method(_MD("_animation_key_editor_seek"),&AnimationPlayerEditor::_animation_key_editor_seek);
ObjectTypeDB::bind_method(_MD("_animation_key_editor_anim_len_changed"),&AnimationPlayerEditor::_animation_key_editor_anim_len_changed);
+ ObjectTypeDB::bind_method(_MD("_animation_key_editor_anim_step_changed"),&AnimationPlayerEditor::_animation_key_editor_anim_step_changed);
ObjectTypeDB::bind_method(_MD("_hide_anim_editors"),&AnimationPlayerEditor::_hide_anim_editors);
ObjectTypeDB::bind_method(_MD("_animation_duplicate"),&AnimationPlayerEditor::_animation_duplicate);
ObjectTypeDB::bind_method(_MD("_blend_editor_next_changed"),&AnimationPlayerEditor::_blend_editor_next_changed);
@@ -1250,8 +1247,15 @@ void AnimationPlayerEditor::_bind_methods() {
}
+AnimationPlayerEditor *AnimationPlayerEditor::singleton=NULL;
+
+AnimationPlayer *AnimationPlayerEditor::get_player() const {
+
+ return player;
+}
AnimationPlayerEditor::AnimationPlayerEditor(EditorNode *p_editor) {
editor=p_editor;
+ singleton=this;
updating=false;
@@ -1271,6 +1275,50 @@ AnimationPlayerEditor::AnimationPlayerEditor(EditorNode *p_editor) {
add_child(hb);
+ play_bw_from = memnew( ToolButton );
+ play_bw_from->set_tooltip("Play backwards selected animation from current pos. (A)");
+ hb->add_child(play_bw_from);
+
+ play_bw = memnew( ToolButton );
+ play_bw->set_tooltip("Play backwards selected animation from end. (Shift+A)");
+ hb->add_child(play_bw);
+
+ stop = memnew( ToolButton );
+ stop->set_toggle_mode(true);
+ hb->add_child(stop);
+ stop->set_tooltip("Stop animation playback. (S)");
+
+ play = memnew( ToolButton );
+ play->set_tooltip("Play selected animation from start. (Shift+D)");
+ hb->add_child(play);
+
+
+ play_from = memnew( ToolButton );
+ play_from->set_tooltip("Play selected animation from current pos. (D)");
+ hb->add_child(play_from);
+
+
+
+ //pause = memnew( Button );
+ //pause->set_toggle_mode(true);
+ //hb->add_child(pause);
+
+ frame = memnew( SpinBox );
+ hb->add_child(frame);
+ frame->set_custom_minimum_size(Size2(80,0));
+ frame->set_stretch_ratio(2);
+ frame->set_tooltip("Animation position (in seconds).");
+
+ hb->add_child( memnew( VSeparator));
+
+ scale = memnew( LineEdit );
+ hb->add_child(scale);
+ scale->set_h_size_flags(SIZE_EXPAND_FILL);
+ scale->set_stretch_ratio(1);
+ scale->set_tooltip("Scale animation playback globally for the node.");
+ scale->hide();
+
+
add_anim = memnew( ToolButton );
add_anim->set_tooltip("Create new animation in player.");
@@ -1330,67 +1378,13 @@ AnimationPlayerEditor::AnimationPlayerEditor(EditorNode *p_editor) {
//tool_anim->get_popup()->add_item("Edit Anim Resource",TOOL_PASTE_ANIM);
hb->add_child(tool_anim);
-
- edit_anim = memnew( ToolButton );
- edit_anim->set_toggle_mode(true);
- hb->add_child(edit_anim);
- edit_anim->set_tooltip("Open animation editor.\nProperty editor will displays all editable keys too.");
-
-
- hb = memnew (HBoxContainer);
- add_child(hb);
-
- play_bw_from = memnew( ToolButton );
- play_bw_from->set_tooltip("Play backwards selected animation from current pos. (A)");
- hb->add_child(play_bw_from);
-
- play_bw = memnew( ToolButton );
- play_bw->set_tooltip("Play backwards selected animation from end. (Shift+A)");
- hb->add_child(play_bw);
-
- stop = memnew( ToolButton );
- stop->set_toggle_mode(true);
- hb->add_child(stop);
- stop->set_tooltip("Stop animation playback. (S)");
-
- play = memnew( ToolButton );
- play->set_tooltip("Play selected animation from start. (Shift+D)");
- hb->add_child(play);
+ nodename = memnew( Button );
+ hb->add_child(nodename);
+ pin = memnew( ToolButton );
+ pin->set_toggle_mode(true);
+ hb->add_child(pin);
- play_from = memnew( ToolButton );
- play_from->set_tooltip("Play selected animation from current pos. (D)");
- hb->add_child(play_from);
-
-
-
- //pause = memnew( Button );
- //pause->set_toggle_mode(true);
- //hb->add_child(pause);
-
- seek = memnew( HSlider );
- seek->set_val(0);
- seek->set_step(0.01);
- hb->add_child(seek);
- seek->set_h_size_flags(SIZE_EXPAND_FILL);
- seek->set_stretch_ratio(8);
- seek->set_tooltip("Seek animation (when stopped).");
-
- frame = memnew( SpinBox );
- hb->add_child(frame);
- frame->set_h_size_flags(SIZE_EXPAND_FILL);
- frame->set_stretch_ratio(2);
- frame->set_tooltip("Animation position (in seconds).");
- seek->share(frame);
-
-
-
- scale = memnew( LineEdit );
- hb->add_child(scale);
- scale->set_h_size_flags(SIZE_EXPAND_FILL);
- scale->set_stretch_ratio(1);
- scale->set_tooltip("Scale animation playback globally for the node.");
- scale->hide();
resource_edit_anim= memnew( Button );
hb->add_child(resource_edit_anim);
@@ -1457,30 +1451,31 @@ AnimationPlayerEditor::AnimationPlayerEditor(EditorNode *p_editor) {
load_anim->connect("pressed", this,"_animation_load");
duplicate_anim->connect("pressed", this,"_animation_duplicate");
//frame->connect("text_entered", this,"_seek_frame_changed");
- edit_anim->connect("pressed", this,"_animation_edit");
+
blend_anim->connect("pressed", this,"_animation_blend");
remove_anim->connect("pressed", this,"_animation_remove");
animation->connect("item_selected", this,"_animation_selected",Vector<Variant>(),true);
resource_edit_anim->connect("pressed", this,"_animation_resource_edit");
file->connect("file_selected", this,"_dialog_action");
- seek->connect("value_changed", this, "_seek_value_changed",Vector<Variant>(),true);
+ frame->connect("value_changed", this, "_seek_value_changed",Vector<Variant>(),true);
scale->connect("text_entered", this, "_scale_changed",Vector<Variant>(),true);
- editor->get_animation_editor()->connect("timeline_changed",this,"_animation_key_editor_seek");
- editor->get_animation_editor()->connect("animation_len_changed",this,"_animation_key_editor_anim_len_changed");
-
- HBoxContainer *ahb = editor->get_animation_panel_hb();
- nodename = memnew( Label );
- ahb->add_child(nodename);
- nodename->set_h_size_flags(SIZE_EXPAND_FILL);
- nodename->set_opacity(0.5);
- pin = memnew( TextureButton );
- pin->set_toggle_mode(true);
- ahb->add_child(pin);
+
+
renaming=false;
last_active=false;
set_process_unhandled_key_input(true);
+
+ key_editor = memnew( AnimationKeyEditor);
+ add_child(key_editor);
+ add_constant_override("separation",get_constant("separation","VBoxContainer"));
+ key_editor->set_v_size_flags(SIZE_EXPAND_FILL);
+ key_editor->connect("timeline_changed",this,"_animation_key_editor_seek");
+ key_editor->connect("animation_len_changed",this,"_animation_key_editor_anim_len_changed");
+ key_editor->connect("animation_step_changed",this,"_animation_key_editor_anim_step_changed");
+
+ _update_player();
}
@@ -1503,7 +1498,7 @@ void AnimationPlayerEditorPlugin::make_visible(bool p_visible) {
anim_editor->show();
anim_editor->set_process(true);
anim_editor->ensure_visibility();
- editor->animation_panel_make_visible(true);
+// editor->animation_panel_make_visible(true);
} else {
// anim_editor->hide();
@@ -1517,7 +1512,8 @@ AnimationPlayerEditorPlugin::AnimationPlayerEditorPlugin(EditorNode *p_node) {
editor=p_node;
anim_editor = memnew( AnimationPlayerEditor(editor) );
anim_editor->set_undo_redo(editor->get_undo_redo());
- editor->get_animation_panel()->add_child(anim_editor);
+
+ editor->add_bottom_panel_item("Animation",anim_editor);
/*
editor->get_viewport()->add_child(anim_editor);
anim_editor->set_area_as_parent_rect();
diff --git a/tools/editor/plugins/animation_player_editor_plugin.h b/tools/editor/plugins/animation_player_editor_plugin.h
index ac4d1ab6ba..0ad849c2f9 100644
--- a/tools/editor/plugins/animation_player_editor_plugin.h
+++ b/tools/editor/plugins/animation_player_editor_plugin.h
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -41,7 +41,7 @@
/**
@author Juan Linietsky <reduzio@gmail.com>
*/
-
+class AnimationKeyEditor;
class AnimationPlayerEditor : public VBoxContainer {
OBJ_TYPE(AnimationPlayerEditor, VBoxContainer );
@@ -78,17 +78,16 @@ class AnimationPlayerEditor : public VBoxContainer {
Button *autoplay;
Button *rename_anim;
Button *duplicate_anim;
- Button *edit_anim;
+
Button *resource_edit_anim;
Button *load_anim;
MenuButton *save_anim;
Button *blend_anim;
Button *remove_anim;
MenuButton *tool_anim;
- TextureButton *pin;
- Label *nodename;
+ ToolButton *pin;
+ Button *nodename;
SpinBox *frame;
- HSlider *seek;
LineEdit *scale;
LineEdit *name;
Label *name_title;
@@ -117,6 +116,9 @@ class AnimationPlayerEditor : public VBoxContainer {
bool updating;
bool updating_blends;
+ AnimationKeyEditor *key_editor;
+
+
void _select_anim_by_name(const String& p_anim);
void _play_pressed();
void _play_from_pressed();
@@ -158,10 +160,13 @@ class AnimationPlayerEditor : public VBoxContainer {
void _animation_key_editor_seek(float p_pos);
void _animation_key_editor_anim_len_changed(float p_new);
+ void _animation_key_editor_anim_step_changed(float p_len);
+
void _unhandled_key_input(const InputEvent& p_ev);
void _animation_tool_menu(int p_option);
void _animation_save_menu(int p_option);
+
AnimationPlayerEditor();
protected:
@@ -171,6 +176,10 @@ protected:
static void _bind_methods();
public:
+ AnimationPlayer *get_player() const;
+ static AnimationPlayerEditor *singleton;
+
+ AnimationKeyEditor* get_key_editor() { return key_editor; }
Dictionary get_state() const;
void set_state(const Dictionary& p_state);
diff --git a/tools/editor/plugins/animation_tree_editor_plugin.cpp b/tools/editor/plugins/animation_tree_editor_plugin.cpp
index 382bc44726..d85553b4db 100644
--- a/tools/editor/plugins/animation_tree_editor_plugin.cpp
+++ b/tools/editor/plugins/animation_tree_editor_plugin.cpp
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -1498,18 +1498,17 @@ bool AnimationTreeEditorPlugin::handles(Object *p_object) const {
void AnimationTreeEditorPlugin::make_visible(bool p_visible) {
if (p_visible) {
- editor->hide_animation_player_editors();
- editor->animation_panel_make_visible(true);
- anim_tree_editor->show();
+// editor->hide_animation_player_editors();
+// editor->animation_panel_make_visible(true);
+ button->show();
+ editor->make_bottom_panel_item_visible(anim_tree_editor);
anim_tree_editor->set_fixed_process(true);
- EditorNode::get_top_split()->set_collapsed(false);
-
} else {
- anim_tree_editor->hide();
+ if (anim_tree_editor->is_visible())
+ editor->hide_bottom_panel();
+ button->hide();
anim_tree_editor->set_fixed_process(false);
- editor->animation_panel_make_visible(false);
- EditorNode::get_top_split()->set_collapsed(true);
}
}
@@ -1517,12 +1516,10 @@ AnimationTreeEditorPlugin::AnimationTreeEditorPlugin(EditorNode *p_node) {
editor=p_node;
anim_tree_editor = memnew( AnimationTreeEditor );
- //editor->get_viewport()->add_child(anim_tree_editor);
- //anim_tree_editor->set_area_as_parent_rect();
- editor->get_animation_panel()->add_child(anim_tree_editor);
- anim_tree_editor->set_v_size_flags(Control::SIZE_EXPAND_FILL);
- anim_tree_editor->hide();
+ anim_tree_editor->set_custom_minimum_size(Size2(0,300));
+ button=editor->add_bottom_panel_item("AnimationTree",anim_tree_editor);
+ button->hide();
diff --git a/tools/editor/plugins/animation_tree_editor_plugin.h b/tools/editor/plugins/animation_tree_editor_plugin.h
index bd29530c7a..4884a22d90 100644
--- a/tools/editor/plugins/animation_tree_editor_plugin.h
+++ b/tools/editor/plugins/animation_tree_editor_plugin.h
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -176,6 +176,7 @@ class AnimationTreeEditorPlugin : public EditorPlugin {
AnimationTreeEditor *anim_tree_editor;
EditorNode *editor;
+ Button *button;
public:
diff --git a/tools/editor/plugins/camera_editor_plugin.cpp b/tools/editor/plugins/camera_editor_plugin.cpp
index 08ed2c745d..7433264b16 100644
--- a/tools/editor/plugins/camera_editor_plugin.cpp
+++ b/tools/editor/plugins/camera_editor_plugin.cpp
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/tools/editor/plugins/camera_editor_plugin.h b/tools/editor/plugins/camera_editor_plugin.h
index afb8f9415d..ea016ecb4d 100644
--- a/tools/editor/plugins/camera_editor_plugin.h
+++ b/tools/editor/plugins/camera_editor_plugin.h
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/tools/editor/plugins/canvas_item_editor_plugin.cpp b/tools/editor/plugins/canvas_item_editor_plugin.cpp
index e3f4edf967..0afea26957 100644
--- a/tools/editor/plugins/canvas_item_editor_plugin.cpp
+++ b/tools/editor/plugins/canvas_item_editor_plugin.cpp
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -37,6 +37,8 @@
#include "os/input.h"
#include "tools/editor/editor_settings.h"
#include "scene/gui/grid_container.h"
+#include "tools/editor/animation_editor.h"
+#include "tools/editor/plugins/animation_player_editor_plugin.h"
class SnapDialog : public ConfirmationDialog {
@@ -152,9 +154,49 @@ public:
}
};
+void CanvasItemEditor::_edit_set_pivot(const Vector2& mouse_pos) {
+ List<Node*> &selection = editor_selection->get_selected_node_list();
+
+ undo_redo->create_action("Move Pivot");
+
+ for(List<Node*>::Element *E=selection.front();E;E=E->next()) {
+
+ Node2D *n2d = E->get()->cast_to<Node2D>();
+
+ if (n2d && n2d->edit_has_pivot()) {
+
+ Vector2 offset = n2d->edit_get_pivot();
+ Vector2 gpos = n2d->get_global_pos();
+
+ Vector2 local_mouse_pos = n2d->get_canvas_transform().affine_inverse().xform(mouse_pos);
+
+ Vector2 motion_ofs = gpos-local_mouse_pos;
+
+ undo_redo->add_do_method(n2d,"set_global_pos",local_mouse_pos);
+ undo_redo->add_do_method(n2d,"edit_set_pivot",offset+n2d->get_global_transform().affine_inverse().basis_xform(motion_ofs));
+ undo_redo->add_undo_method(n2d,"set_global_pos",gpos);
+ undo_redo->add_undo_method(n2d,"edit_set_pivot",offset);
+ for(int i=0;i<n2d->get_child_count();i++) {
+ Node2D *n2dc = n2d->get_child(i)->cast_to<Node2D>();
+ if (!n2dc)
+ continue;
+
+ undo_redo->add_do_method(n2dc,"set_global_pos",n2dc->get_global_pos());
+ undo_redo->add_undo_method(n2dc,"set_global_pos",n2dc->get_global_pos());
+
+ }
+
+ }
+
+ }
+
+ undo_redo->commit_action();
+
+}
+
void CanvasItemEditor::_unhandled_key_input(const InputEvent& p_ev) {
- if (!is_visible())
+ if (!is_visible() || get_viewport()->gui_has_modal_stack())
return;
if (p_ev.key.mod.control)
// prevent to change tool mode when control key is pressed
@@ -179,38 +221,7 @@ void CanvasItemEditor::_unhandled_key_input(const InputEvent& p_ev) {
mouse_pos=transform.affine_inverse().xform(mouse_pos);
mouse_pos=snap_point(mouse_pos);
- undo_redo->create_action("Move Pivot");
-
- for(List<Node*>::Element *E=selection.front();E;E=E->next()) {
-
- Node2D *n2d = E->get()->cast_to<Node2D>();
-
- if (n2d && n2d->edit_has_pivot()) {
-
- Vector2 offset = n2d->edit_get_pivot();
- Vector2 gpos = n2d->get_global_pos();
-
- Vector2 motion_ofs = gpos-mouse_pos;
-
- undo_redo->add_do_method(n2d,"set_global_pos",mouse_pos);
- undo_redo->add_do_method(n2d,"edit_set_pivot",offset+n2d->get_global_transform().affine_inverse().basis_xform(motion_ofs));
- undo_redo->add_undo_method(n2d,"set_global_pos",gpos);
- undo_redo->add_undo_method(n2d,"edit_set_pivot",offset);
- for(int i=0;i<n2d->get_child_count();i++) {
- Node2D *n2dc = n2d->get_child(i)->cast_to<Node2D>();
- if (!n2dc)
- continue;
-
- undo_redo->add_do_method(n2dc,"set_global_pos",n2dc->get_global_pos());
- undo_redo->add_undo_method(n2dc,"set_global_pos",n2dc->get_global_pos());
-
- }
-
- }
-
- }
-
- undo_redo->commit_action();
+ _edit_set_pivot(mouse_pos);
}
}
@@ -221,7 +232,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,pivot_button,pan_button};
for(int i=0;i<TOOL_MAX;i++) {
tb[i]->set_pressed(i==p_index);
@@ -396,9 +407,9 @@ void CanvasItemEditor::_node_removed(Node *p_node) {
#endif
}
-void CanvasItemEditor::_keying_changed(bool p_changed) {
+void CanvasItemEditor::_keying_changed() {
- if (p_changed)
+ if (AnimationPlayerEditor::singleton->get_key_editor()->has_keying())
animation_hb->show();
else
animation_hb->hide();
@@ -423,8 +434,6 @@ CanvasItem* CanvasItemEditor::_select_canvas_item_at_pos(const Point2& p_pos,Nod
r=_select_canvas_item_at_pos(p_pos,p_node->get_child(i),p_parent_xform * c->get_transform(),p_canvas_xform);
else {
CanvasLayer *cl = p_node->cast_to<CanvasLayer>();
- if (cl)
- return NULL;
r=_select_canvas_item_at_pos(p_pos,p_node->get_child(i),transform ,cl ? cl->get_transform() : p_canvas_xform); //use base transform
}
@@ -433,7 +442,7 @@ CanvasItem* CanvasItemEditor::_select_canvas_item_at_pos(const Point2& p_pos,Nod
}
- if (c && c->is_visible() && !c->has_meta("_edit_lock_")) {
+ if (c && c->is_visible() && !c->has_meta("_edit_lock_") && !c->cast_to<CanvasLayer>()) {
Rect2 rect = c->get_item_rect();
Point2 local_pos = (p_parent_xform * p_canvas_xform * c->get_transform()).affine_inverse().xform(p_pos);
@@ -461,14 +470,12 @@ void CanvasItemEditor::_find_canvas_items_at_pos(const Point2 &p_pos,Node* p_nod
_find_canvas_items_at_pos(p_pos,p_node->get_child(i),p_parent_xform * c->get_transform(),p_canvas_xform, r_items);
else {
CanvasLayer *cl = p_node->cast_to<CanvasLayer>();
- if (cl)
- return;
_find_canvas_items_at_pos(p_pos,p_node->get_child(i),transform ,cl ? cl->get_transform() : p_canvas_xform, r_items); //use base transform
}
}
- if (c && c->is_visible() && !c->has_meta("_edit_lock_")) {
+ if (c && c->is_visible() && !c->has_meta("_edit_lock_") && !c->cast_to<CanvasLayer>()) {
Rect2 rect = c->get_item_rect();
Point2 local_pos = (p_parent_xform * p_canvas_xform * c->get_transform()).affine_inverse().xform(p_pos);
@@ -505,14 +512,12 @@ void CanvasItemEditor::_find_canvas_items_at_rect(const Rect2& p_rect,Node* p_no
_find_canvas_items_at_rect(p_rect,p_node->get_child(i),p_parent_xform * c->get_transform(),p_canvas_xform,r_items);
else {
CanvasLayer *cl = p_node->cast_to<CanvasLayer>();
- if (cl)
- return;
_find_canvas_items_at_rect(p_rect,p_node->get_child(i),transform,cl?cl->get_transform():p_canvas_xform,r_items);
}
}
- if (c && c->is_visible() && !c->has_meta("_edit_lock_")) {
+ if (c && c->is_visible() && !c->has_meta("_edit_lock_") && !c->cast_to<CanvasLayer>()) {
Rect2 rect = c->get_item_rect();
Matrix32 xform = p_parent_xform * p_canvas_xform * c->get_transform();
@@ -598,6 +603,9 @@ bool CanvasItemEditor::_select(CanvasItem *item, Point2 p_click_pos, bool p_appe
CanvasItem *canvas_item = E->get()->cast_to<CanvasItem>();
if (!canvas_item || !canvas_item->is_visible())
continue;
+ if (canvas_item->get_viewport()!=EditorNode::get_singleton()->get_scene_root())
+ continue;
+
CanvasItemEditorSelectedItem *se=editor_selection->get_node_editor_data<CanvasItemEditorSelectedItem>(canvas_item);
if (!se)
continue;
@@ -638,6 +646,9 @@ void CanvasItemEditor::_key_move(const Vector2& p_dir, bool p_snap, KeyMoveMODE
CanvasItem *canvas_item = E->get()->cast_to<CanvasItem>();
if (!canvas_item || !canvas_item->is_visible())
continue;
+ if (canvas_item->get_viewport()!=EditorNode::get_singleton()->get_scene_root())
+ continue;
+
CanvasItemEditorSelectedItem *se=editor_selection->get_node_editor_data<CanvasItemEditorSelectedItem>(canvas_item);
if (!se)
continue;
@@ -697,6 +708,9 @@ Point2 CanvasItemEditor::_find_topleftmost_point() {
CanvasItem *canvas_item = E->get()->cast_to<CanvasItem>();
if (!canvas_item || !canvas_item->is_visible())
continue;
+ if (canvas_item->get_viewport()!=EditorNode::get_singleton()->get_scene_root())
+ continue;
+
@@ -726,6 +740,9 @@ int CanvasItemEditor::get_item_count() {
if (!canvas_item || !canvas_item->is_visible())
continue;
+ if (canvas_item->get_viewport()!=EditorNode::get_singleton()->get_scene_root())
+ continue;
+
ic++;
};
@@ -744,6 +761,8 @@ CanvasItem *CanvasItemEditor::get_single_item() {
CanvasItem *canvas_item = E->key()->cast_to<CanvasItem>();
if (!canvas_item || !canvas_item->is_visible())
continue;
+ if (canvas_item->get_viewport()!=EditorNode::get_singleton()->get_scene_root())
+ continue;
if (single_item)
return NULL; //morethan one
@@ -944,6 +963,75 @@ bool CanvasItemEditor::get_remove_list(List<Node*> *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;i<selection_results.size();i++) {
+ CanvasItem *item=selection_results[i].item;
+ if (item!=scene && item->get_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<Texture> 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) {
{
@@ -999,59 +1087,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++) {
-
- CanvasItem *item=selection_results[i].item;
-
- Ref<Texture> 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());
+ if (b.pressed && (tool==TOOL_SELECT && b.mod.alt)) {
- 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) {
@@ -1076,6 +1116,9 @@ void CanvasItemEditor::_viewport_input_event(const InputEvent& p_event) {
CanvasItem *canvas_item = E->get()->cast_to<CanvasItem>();
if (!canvas_item || !canvas_item->is_visible())
continue;
+ if (canvas_item->get_viewport()!=EditorNode::get_singleton()->get_scene_root())
+ continue;
+
CanvasItemEditorSelectedItem *se=editor_selection->get_node_editor_data<CanvasItemEditorSelectedItem>(canvas_item);
if (!se)
@@ -1109,6 +1152,26 @@ 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 (b.button_index==BUTTON_LEFT && tool==TOOL_EDIT_PIVOT) {
+ if (b.pressed) {
+
+ Point2 mouse_pos(b.x,b.y);
+ mouse_pos=transform.affine_inverse().xform(mouse_pos);
+ mouse_pos=snap_point(mouse_pos);
+ _edit_set_pivot(mouse_pos);
+ }
+ return;
+ }
+
+
+
if (tool==TOOL_PAN || b.button_index!=BUTTON_LEFT || Input::get_singleton()->is_key_pressed(KEY_SPACE))
return;
@@ -1148,6 +1211,9 @@ void CanvasItemEditor::_viewport_input_event(const InputEvent& p_event) {
CanvasItem *canvas_item = E->get()->cast_to<CanvasItem>();
if (!canvas_item || !canvas_item->is_visible())
continue;
+ if (canvas_item->get_viewport()!=EditorNode::get_singleton()->get_scene_root())
+ continue;
+
CanvasItemEditorSelectedItem *se=editor_selection->get_node_editor_data<CanvasItemEditorSelectedItem>(canvas_item);
if (!se)
continue;
@@ -1354,6 +1420,9 @@ void CanvasItemEditor::_viewport_input_event(const InputEvent& p_event) {
CanvasItem *canvas_item = E->get()->cast_to<CanvasItem>();
if (!canvas_item || !canvas_item->is_visible())
continue;
+ if (canvas_item->get_viewport()!=EditorNode::get_singleton()->get_scene_root())
+ continue;
+
CanvasItemEditorSelectedItem *se=editor_selection->get_node_editor_data<CanvasItemEditorSelectedItem>(canvas_item);
if (!se)
continue;
@@ -1461,6 +1530,9 @@ void CanvasItemEditor::_viewport_input_event(const InputEvent& p_event) {
CanvasItem *canvas_item = E->get()->cast_to<CanvasItem>();
if (!canvas_item || !canvas_item->is_visible())
continue;
+ if (canvas_item->get_viewport()!=EditorNode::get_singleton()->get_scene_root())
+ continue;
+
CanvasItemEditorSelectedItem *se=editor_selection->get_node_editor_data<CanvasItemEditorSelectedItem>(canvas_item);
if (!se)
continue;
@@ -1497,6 +1569,7 @@ void CanvasItemEditor::_viewport_input_event(const InputEvent& p_event) {
continue;
}
+
dfrom = drag_point_from;
dto = snap_point(dto - (drag == DRAG_ALL ? drag_from - drag_point_from : Vector2(0, 0)), drag_point_from);
@@ -1504,30 +1577,35 @@ void CanvasItemEditor::_viewport_input_event(const InputEvent& p_event) {
canvas_item->get_global_transform_with_canvas().affine_inverse().xform(dto) -
canvas_item->get_global_transform_with_canvas().affine_inverse().xform(dfrom);
-
Rect2 local_rect = canvas_item->get_item_rect();
-
- if (false && drag!=DRAG_ALL && m.mod.alt) {
- float aspect = local_rect.size.get_aspect();
- if (aspect!=0) {
- if (ABS(drag_vector.x) > ABS(drag_vector.y)) {
-
- drag_vector.y = ABS(drag_vector.x)/aspect * SGN(drag_vector.y);
- } else {
-
- drag_vector.x = ABS(drag_vector.y)*aspect * SGN(drag_vector.x);
- }
- }
- }
-
-
-
Vector2 begin=local_rect.pos;
Vector2 end=local_rect.pos+local_rect.size;
Vector2 minsize = canvas_item->edit_get_minimum_size();
bool uniform = m.mod.shift;
bool symmetric=m.mod.alt;
+ if (uniform) {
+ float aspect = local_rect.size.get_aspect();
+ switch(drag) {
+ case DRAG_BOTTOM_LEFT:
+ case DRAG_TOP_RIGHT: {
+ if (aspect > 1.0) { // width > height, take x as reference
+ drag_vector.y = -drag_vector.x/aspect;
+ } else { // height > width, take y as reference
+ drag_vector.x = -drag_vector.y*aspect;
+ }
+ } break;
+ case DRAG_BOTTOM_RIGHT:
+ case DRAG_TOP_LEFT: {
+ if (aspect > 1.0) { // width > height, take x as reference
+ drag_vector.y = drag_vector.x/aspect;
+ } else { // height > width, take y as reference
+ drag_vector.x = drag_vector.y*aspect;
+ }
+ } break;
+ default: {}
+ }
+ }
switch(drag) {
case DRAG_ALL: {
@@ -1546,19 +1624,11 @@ void CanvasItemEditor::_viewport_input_event(const InputEvent& p_event) {
} break;
case DRAG_BOTTOM_RIGHT: {
- if (uniform) {
- drag_vector.y=drag_vector.x;
- minsize.y=minsize.x;
- }
incend(begin.x,end.x,drag_vector.x,minsize.x,symmetric);
incend(begin.y,end.y,drag_vector.y,minsize.y,symmetric);
- } break;
+ } break;
case DRAG_TOP_LEFT: {
- if (uniform) {
- drag_vector.y=drag_vector.x;
- minsize.y=minsize.x;
- }
incbeg(begin.x,end.x,drag_vector.x,minsize.x,symmetric);
incbeg(begin.y,end.y,drag_vector.y,minsize.y,symmetric);
} break;
@@ -1574,20 +1644,12 @@ void CanvasItemEditor::_viewport_input_event(const InputEvent& p_event) {
} break;
case DRAG_TOP_RIGHT: {
- if (uniform) {
- drag_vector.x=-drag_vector.y;
- minsize.x=minsize.y;
- }
incbeg(begin.y,end.y,drag_vector.y,minsize.y,symmetric);
incend(begin.x,end.x,drag_vector.x,minsize.x,symmetric);
} break;
case DRAG_BOTTOM_LEFT: {
- if (uniform) {
- drag_vector.x=-drag_vector.y;
- minsize.x=minsize.y;
- }
incbeg(begin.x,end.x,drag_vector.x,minsize.x,symmetric);
incend(begin.y,end.y,drag_vector.y,minsize.y,symmetric);
} break;
@@ -1837,12 +1899,16 @@ void CanvasItemEditor::_viewport_draw() {
CanvasItem *single_item=NULL;
+ bool pivot_found=false;
+
for(Map<Node*,Object*>::Element *E=selection.front();E;E=E->next()) {
CanvasItem *canvas_item = E->key()->cast_to<CanvasItem>();
if (!canvas_item || !canvas_item->is_visible())
continue;
+ if (canvas_item->get_viewport()!=EditorNode::get_singleton()->get_scene_root())
+ continue;
CanvasItemEditorSelectedItem *se=editor_selection->get_node_editor_data<CanvasItemEditorSelectedItem>(canvas_item);
if (!se)
continue;
@@ -1878,7 +1944,7 @@ void CanvasItemEditor::_viewport_draw() {
viewport->draw_line(endpoints[i],endpoints[(i+1)%4],c,2);
}
- if (single && (tool==TOOL_SELECT || tool == TOOL_MOVE || tool == TOOL_ROTATE)) { //kind of sucks
+ if (single && (tool==TOOL_SELECT || tool == TOOL_MOVE || tool == TOOL_ROTATE || tool==TOOL_EDIT_PIVOT)) { //kind of sucks
if (canvas_item->cast_to<Node2D>()) {
@@ -1886,6 +1952,7 @@ void CanvasItemEditor::_viewport_draw() {
if (canvas_item->cast_to<Node2D>()->edit_has_pivot()) {
viewport->draw_texture(pivot,xform.get_origin()+(-pivot->get_size()/2).floor());
can_move_pivot=true;
+ pivot_found=true;
}
}
@@ -1920,6 +1987,7 @@ void CanvasItemEditor::_viewport_draw() {
//E->get().last_rect = rect;
}
+ pivot_button->set_disabled(!pivot_found);
VisualServer::get_singleton()->canvas_item_add_set_transform(ci,Matrix32());
@@ -2064,6 +2132,9 @@ void CanvasItemEditor::_notification(int p_what) {
if (!canvas_item || !canvas_item->is_visible())
continue;
+ if (canvas_item->get_viewport()!=EditorNode::get_singleton()->get_scene_root())
+ continue;
+
if (canvas_item->cast_to<Control>())
has_control=true;
else
@@ -2124,9 +2195,11 @@ 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"));
+ pivot_button->set_icon( get_icon("EditPivot", "EditorIcons"));
select_handle=get_icon("EditorHandle","EditorIcons");
lock_button->set_icon(get_icon("Lock","EditorIcons"));
unlock_button->set_icon(get_icon("Unlock","EditorIcons"));
@@ -2467,6 +2540,9 @@ void CanvasItemEditor::_popup_callback(int p_op) {
if (!canvas_item || !canvas_item->is_visible())
continue;
+ if (canvas_item->get_viewport()!=EditorNode::get_singleton()->get_scene_root())
+ continue;
+
canvas_item->set_meta("_edit_lock_",true);
emit_signal("item_lock_status_changed");
}
@@ -2482,6 +2558,9 @@ void CanvasItemEditor::_popup_callback(int p_op) {
if (!canvas_item || !canvas_item->is_visible())
continue;
+ if (canvas_item->get_viewport()!=EditorNode::get_singleton()->get_scene_root())
+ continue;
+
canvas_item->set_meta("_edit_lock_",Variant());
emit_signal("item_lock_status_changed");
@@ -2500,6 +2579,9 @@ void CanvasItemEditor::_popup_callback(int p_op) {
if (!canvas_item || !canvas_item->is_visible())
continue;
+ if (canvas_item->get_viewport()!=EditorNode::get_singleton()->get_scene_root())
+ continue;
+
canvas_item->set_meta("_edit_group_",true);
emit_signal("item_group_status_changed");
}
@@ -2515,6 +2597,9 @@ void CanvasItemEditor::_popup_callback(int p_op) {
if (!canvas_item || !canvas_item->is_visible())
continue;
+ if (canvas_item->get_viewport()!=EditorNode::get_singleton()->get_scene_root())
+ continue;
+
canvas_item->set_meta("_edit_group_",Variant());
emit_signal("item_group_status_changed");
}
@@ -2533,6 +2618,9 @@ void CanvasItemEditor::_popup_callback(int p_op) {
if (!canvas_item || !canvas_item->is_visible())
continue;
+ if (canvas_item->get_viewport()!=EditorNode::get_singleton()->get_scene_root())
+ continue;
+
Control *c = canvas_item->cast_to<Control>();
if (!c)
@@ -2651,15 +2739,18 @@ void CanvasItemEditor::_popup_callback(int p_op) {
if (!canvas_item || !canvas_item->is_visible())
continue;
+ if (canvas_item->get_viewport()!=EditorNode::get_singleton()->get_scene_root())
+ continue;
+
if (canvas_item->cast_to<Node2D>()) {
Node2D *n2d = canvas_item->cast_to<Node2D>();
if (key_pos)
- editor->get_animation_editor()->insert_node_value_key(n2d,"transform/pos",n2d->get_pos(),existing);
+ AnimationPlayerEditor::singleton->get_key_editor()->insert_node_value_key(n2d,"transform/pos",n2d->get_pos(),existing);
if (key_rot)
- editor->get_animation_editor()->insert_node_value_key(n2d,"transform/rot",Math::rad2deg(n2d->get_rot()),existing);
+ AnimationPlayerEditor::singleton->get_key_editor()->insert_node_value_key(n2d,"transform/rot",Math::rad2deg(n2d->get_rot()),existing);
if (key_scale)
- editor->get_animation_editor()->insert_node_value_key(n2d,"transform/scale",n2d->get_scale(),existing);
+ AnimationPlayerEditor::singleton->get_key_editor()->insert_node_value_key(n2d,"transform/scale",n2d->get_scale(),existing);
if (n2d->has_meta("_edit_bone_") && n2d->get_parent_item()) {
@@ -2687,11 +2778,11 @@ void CanvasItemEditor::_popup_callback(int p_op) {
for(List<Node2D*>::Element *F=ik_chain.front();F;F=F->next()) {
if (key_pos)
- editor->get_animation_editor()->insert_node_value_key(F->get(),"transform/pos",F->get()->get_pos(),existing);
+ AnimationPlayerEditor::singleton->get_key_editor()->insert_node_value_key(F->get(),"transform/pos",F->get()->get_pos(),existing);
if (key_rot)
- editor->get_animation_editor()->insert_node_value_key(F->get(),"transform/rot",Math::rad2deg(F->get()->get_rot()),existing);
+ AnimationPlayerEditor::singleton->get_key_editor()->insert_node_value_key(F->get(),"transform/rot",Math::rad2deg(F->get()->get_rot()),existing);
if (key_scale)
- editor->get_animation_editor()->insert_node_value_key(F->get(),"transform/scale",F->get()->get_scale(),existing);
+ AnimationPlayerEditor::singleton->get_key_editor()->insert_node_value_key(F->get(),"transform/scale",F->get()->get_scale(),existing);
}
@@ -2703,9 +2794,9 @@ void CanvasItemEditor::_popup_callback(int p_op) {
Control *ctrl = canvas_item->cast_to<Control>();
if (key_pos)
- editor->get_animation_editor()->insert_node_value_key(ctrl,"rect/pos",ctrl->get_pos(),existing);
+ AnimationPlayerEditor::singleton->get_key_editor()->insert_node_value_key(ctrl,"rect/pos",ctrl->get_pos(),existing);
if (key_scale)
- editor->get_animation_editor()->insert_node_value_key(ctrl,"rect/size",ctrl->get_size(),existing);
+ AnimationPlayerEditor::singleton->get_key_editor()->insert_node_value_key(ctrl,"rect/size",ctrl->get_size(),existing);
}
}
@@ -2761,6 +2852,8 @@ void CanvasItemEditor::_popup_callback(int p_op) {
if (!canvas_item || !canvas_item->is_visible())
continue;
+ if (canvas_item->get_viewport()!=EditorNode::get_singleton()->get_scene_root())
+ continue;
if (canvas_item->cast_to<Node2D>()) {
@@ -2811,6 +2904,9 @@ void CanvasItemEditor::_popup_callback(int p_op) {
if (!canvas_item || !canvas_item->is_visible())
continue;
+ if (canvas_item->get_viewport()!=EditorNode::get_singleton()->get_scene_root())
+ continue;
+
if (canvas_item->cast_to<Node2D>()) {
Node2D *n2d = canvas_item->cast_to<Node2D>();
@@ -2827,7 +2923,7 @@ void CanvasItemEditor::_popup_callback(int p_op) {
if (key_pos)
ctrl->set_pos(Point2());
//if (key_scale)
- // editor->get_animation_editor()->insert_node_value_key(ctrl,"rect/size",ctrl->get_size());
+ // AnimationPlayerEditor::singleton->get_key_editor()->insert_node_value_key(ctrl,"rect/size",ctrl->get_size());
}
}
@@ -2845,6 +2941,9 @@ void CanvasItemEditor::_popup_callback(int p_op) {
for(Map<Node*,Object*>::Element *E=selection.front();E;E=E->next()) {
CanvasItem *canvas_item = E->key()->cast_to<CanvasItem>();
if (!canvas_item) continue;
+ if (canvas_item->get_viewport()!=EditorNode::get_singleton()->get_scene_root())
+ continue;
+
// counting invisible items, for now
//if (!canvas_item->is_visible()) continue;
@@ -2937,6 +3036,8 @@ void CanvasItemEditor::_popup_callback(int p_op) {
if (!canvas_item || !canvas_item->is_visible())
continue;
+ if (canvas_item->get_viewport()!=EditorNode::get_singleton()->get_scene_root())
+ continue;
canvas_item->set_meta("_edit_ik_",true);
@@ -3161,7 +3262,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);
@@ -3177,6 +3279,18 @@ 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).");
+
+ pivot_button = memnew( ToolButton );
+ pivot_button->set_toggle_mode(true);
+ hb->add_child(pivot_button);
+ pivot_button->connect("pressed",this,"_tool_select",make_binds(TOOL_EDIT_PIVOT));
+ pivot_button->set_tooltip("Click to change object's rotation pivot");
+
pan_button = memnew( ToolButton );
pan_button->set_toggle_mode(true);
hb->add_child(pan_button);
@@ -3363,7 +3477,7 @@ CanvasItemEditor::CanvasItemEditor(EditorNode *p_editor) {
box_selecting=false;
//zoom=0.5;
singleton=this;
- editor->get_animation_editor()->connect("keying_changed",this,"_keying_changed");
+ AnimationPlayerEditor::singleton->get_key_editor()->connect("keying_changed",this,"_keying_changed");
set_process_unhandled_key_input(true);
can_move_pivot=false;
drag=DRAG_NONE;
diff --git a/tools/editor/plugins/canvas_item_editor_plugin.h b/tools/editor/plugins/canvas_item_editor_plugin.h
index b96d36f7dc..df24734fd7 100644
--- a/tools/editor/plugins/canvas_item_editor_plugin.h
+++ b/tools/editor/plugins/canvas_item_editor_plugin.h
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -67,8 +67,10 @@ class CanvasItemEditor : public VBoxContainer {
enum Tool {
TOOL_SELECT,
+ TOOL_LIST_SELECT,
TOOL_MOVE,
TOOL_ROTATE,
+ TOOL_EDIT_PIVOT,
TOOL_PAN,
TOOL_MAX
};
@@ -240,9 +242,11 @@ class CanvasItemEditor : public VBoxContainer {
List<PoseClipboard> pose_clipboard;
ToolButton *select_button;
+ ToolButton *list_select_button;
ToolButton *move_button;
ToolButton *rotate_button;
+ ToolButton *pivot_button;
ToolButton *pan_button;
ToolButton *lock_button;
@@ -264,6 +268,7 @@ class CanvasItemEditor : public VBoxContainer {
PopupMenu *selection_menu;
+
//PopupMenu *popup;
DragType drag;
Point2 drag_from;
@@ -304,11 +309,13 @@ class CanvasItemEditor : public VBoxContainer {
CanvasItem *ref_item;
+ void _edit_set_pivot(const Vector2& mouse_pos);
void _add_canvas_item(CanvasItem *p_canvas_item);
void _remove_canvas_item(CanvasItem *p_canvas_item);
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);
@@ -337,7 +344,7 @@ class CanvasItemEditor : public VBoxContainer {
CanvasItem *get_single_item();
int get_item_count();
- void _keying_changed(bool p_changed);
+ void _keying_changed();
void _unhandled_key_input(const InputEvent& p_ev);
diff --git a/tools/editor/plugins/collision_polygon_editor_plugin.cpp b/tools/editor/plugins/collision_polygon_editor_plugin.cpp
index 60683f4eda..d4198f3166 100644
--- a/tools/editor/plugins/collision_polygon_editor_plugin.cpp
+++ b/tools/editor/plugins/collision_polygon_editor_plugin.cpp
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/tools/editor/plugins/collision_polygon_editor_plugin.h b/tools/editor/plugins/collision_polygon_editor_plugin.h
index 20a0b3c3f6..45e287ef00 100644
--- a/tools/editor/plugins/collision_polygon_editor_plugin.h
+++ b/tools/editor/plugins/collision_polygon_editor_plugin.h
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/tools/editor/plugins/color_ramp_editor_plugin.cpp b/tools/editor/plugins/color_ramp_editor_plugin.cpp
index df50535402..42ff1b1de9 100644
--- a/tools/editor/plugins/color_ramp_editor_plugin.cpp
+++ b/tools/editor/plugins/color_ramp_editor_plugin.cpp
@@ -3,14 +3,20 @@
*/
#include "color_ramp_editor_plugin.h"
+#include "spatial_editor_plugin.h"
+#include "canvas_item_editor_plugin.h"
-ColorRampEditorPlugin::ColorRampEditorPlugin(EditorNode *p_node) {
+ColorRampEditorPlugin::ColorRampEditorPlugin(EditorNode *p_node, bool p_2d) {
editor=p_node;
ramp_editor = memnew( ColorRampEdit );
- add_custom_control(CONTAINER_CANVAS_EDITOR_BOTTOM,ramp_editor);
- //add_custom_control(CONTAINER_SPATIAL_EDITOR_BOTTOM,ramp_editor);
+ _2d=p_2d;
+ if (p_2d)
+ add_custom_control(CONTAINER_CANVAS_EDITOR_BOTTOM,ramp_editor);
+ else
+ add_custom_control(CONTAINER_SPATIAL_EDITOR_BOTTOM,ramp_editor);
+
ramp_editor->set_custom_minimum_size(Size2(100, 48));
ramp_editor->hide();
ramp_editor->connect("ramp_changed", this, "ramp_changed");
@@ -27,7 +33,10 @@ void ColorRampEditorPlugin::edit(Object *p_object) {
bool ColorRampEditorPlugin::handles(Object *p_object) const {
- return p_object->is_type("ColorRamp");
+ if (_2d)
+ return p_object->is_type("ColorRamp") && CanvasItemEditor::get_singleton()->is_visible() == true;
+ else
+ return p_object->is_type("ColorRamp") && SpatialEditor::get_singleton()->is_visible() == true;
}
void ColorRampEditorPlugin::make_visible(bool p_visible) {
diff --git a/tools/editor/plugins/color_ramp_editor_plugin.h b/tools/editor/plugins/color_ramp_editor_plugin.h
index e39a5d65fe..f07dbabeb3 100644
--- a/tools/editor/plugins/color_ramp_editor_plugin.h
+++ b/tools/editor/plugins/color_ramp_editor_plugin.h
@@ -13,6 +13,7 @@ class ColorRampEditorPlugin : public EditorPlugin {
OBJ_TYPE( ColorRampEditorPlugin, EditorPlugin );
+ bool _2d;
Ref<ColorRamp> color_ramp_ref;
ColorRampEdit *ramp_editor;
EditorNode *editor;
@@ -29,7 +30,7 @@ public:
virtual bool handles(Object *p_node) const;
virtual void make_visible(bool p_visible);
- ColorRampEditorPlugin(EditorNode *p_node);
+ ColorRampEditorPlugin(EditorNode *p_node, bool p_2d);
~ColorRampEditorPlugin();
};
diff --git a/tools/editor/plugins/control_editor_plugin.cpp b/tools/editor/plugins/control_editor_plugin.cpp
index 7348a69665..375622a89c 100644
--- a/tools/editor/plugins/control_editor_plugin.cpp
+++ b/tools/editor/plugins/control_editor_plugin.cpp
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/tools/editor/plugins/control_editor_plugin.h b/tools/editor/plugins/control_editor_plugin.h
index 074298d0df..94cffc8d8d 100644
--- a/tools/editor/plugins/control_editor_plugin.h
+++ b/tools/editor/plugins/control_editor_plugin.h
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/tools/editor/plugins/cube_grid_theme_editor_plugin.cpp b/tools/editor/plugins/cube_grid_theme_editor_plugin.cpp
index c118485083..c861a5841a 100644
--- a/tools/editor/plugins/cube_grid_theme_editor_plugin.cpp
+++ b/tools/editor/plugins/cube_grid_theme_editor_plugin.cpp
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/tools/editor/plugins/cube_grid_theme_editor_plugin.h b/tools/editor/plugins/cube_grid_theme_editor_plugin.h
index 583ddf6e14..72ee171e19 100644
--- a/tools/editor/plugins/cube_grid_theme_editor_plugin.h
+++ b/tools/editor/plugins/cube_grid_theme_editor_plugin.h
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/tools/editor/plugins/editor_preview_plugins.cpp b/tools/editor/plugins/editor_preview_plugins.cpp
index 5f52d4c3e7..f3b5272571 100644
--- a/tools/editor/plugins/editor_preview_plugins.cpp
+++ b/tools/editor/plugins/editor_preview_plugins.cpp
@@ -6,16 +6,30 @@
#include "scene/resources/material.h"
#include "scene/resources/sample.h"
#include "scene/resources/mesh.h"
+#include "scene/resources/bit_mask.h"
bool EditorTexturePreviewPlugin::handles(const String& p_type) const {
- return ObjectTypeDB::is_type(p_type,"ImageTexture");
+ return (ObjectTypeDB::is_type(p_type,"ImageTexture") || ObjectTypeDB::is_type(p_type, "AtlasTexture"));
}
Ref<Texture> EditorTexturePreviewPlugin::generate(const RES& p_from) {
- Ref<ImageTexture> tex =p_from;
- Image img = tex->get_data();
+ Image img;
+ Ref<AtlasTexture> atex = p_from;
+ if (atex.is_valid()) {
+ Ref<ImageTexture> tex = atex->get_atlas();
+ if (!tex.is_valid()) {
+ return Ref<Texture>();
+ }
+ Image atlas = tex->get_data();
+ img = atlas.get_rect(atex->get_region());
+ }
+ else {
+ Ref<ImageTexture> tex = p_from;
+ img = tex->get_data();
+ }
+
if (img.empty())
return Ref<Texture>();
@@ -58,6 +72,81 @@ EditorTexturePreviewPlugin::EditorTexturePreviewPlugin() {
}
+////////////////////////////////////////////////////////////////////////////
+
+bool EditorBitmapPreviewPlugin::handles(const String& p_type) const {
+
+ return ObjectTypeDB::is_type(p_type,"BitMap");
+}
+
+Ref<Texture> EditorBitmapPreviewPlugin::generate(const RES& p_from) {
+
+ Ref<BitMap> bm =p_from;
+
+ if (bm->get_size()==Size2()) {
+ return Ref<Texture>();
+ }
+
+ DVector<uint8_t> data;
+
+ data.resize(bm->get_size().width*bm->get_size().height);
+
+ {
+ DVector<uint8_t>::Write w=data.write();
+
+ for(int i=0;i<bm->get_size().width;i++) {
+ for(int j=0;j<bm->get_size().height;j++) {
+ if (bm->get_bit(Point2i(i,j))) {
+ w[j*bm->get_size().width+i]=255;
+ } else {
+ w[j*bm->get_size().width+i]=0;
+
+ }
+ }
+
+ }
+ }
+
+
+ Image img(bm->get_size().width,bm->get_size().height,0,Image::FORMAT_GRAYSCALE,data);
+
+ int thumbnail_size = EditorSettings::get_singleton()->get("file_dialog/thumbnail_size");
+ if (img.is_compressed()) {
+ if (img.decompress()!=OK)
+ return Ref<Texture>();
+ } else if (img.get_format()!=Image::FORMAT_RGB && img.get_format()!=Image::FORMAT_RGBA) {
+ img.convert(Image::FORMAT_RGBA);
+ }
+
+ int width,height;
+ if (img.get_width() > thumbnail_size && img.get_width() >= img.get_height()) {
+
+ width=thumbnail_size;
+ height = img.get_height() * thumbnail_size / img.get_width();
+ } else if (img.get_height() > thumbnail_size && img.get_height() >= img.get_width()) {
+
+ height=thumbnail_size;
+ width = img.get_width() * thumbnail_size / img.get_height();
+ } else {
+
+ width=img.get_width();
+ height=img.get_height();
+ }
+
+ img.resize(width,height);
+
+ Ref<ImageTexture> ptex = Ref<ImageTexture>( memnew( ImageTexture ));
+
+ ptex->create_from_image(img,0);
+ return ptex;
+
+}
+
+EditorBitmapPreviewPlugin::EditorBitmapPreviewPlugin() {
+
+
+}
+
///////////////////////////////////////////////////////////////////////////
diff --git a/tools/editor/plugins/editor_preview_plugins.h b/tools/editor/plugins/editor_preview_plugins.h
index 98071e2a0e..b3bfda8045 100644
--- a/tools/editor/plugins/editor_preview_plugins.h
+++ b/tools/editor/plugins/editor_preview_plugins.h
@@ -13,6 +13,17 @@ public:
};
+class EditorBitmapPreviewPlugin : public EditorResourcePreviewGenerator {
+public:
+
+ virtual bool handles(const String& p_type) const;
+ virtual Ref<Texture> generate(const RES& p_from);
+
+ EditorBitmapPreviewPlugin();
+};
+
+
+
class EditorPackedScenePreviewPlugin : public EditorResourcePreviewGenerator {
Ref<Texture> _gen_from_imd(Ref<ResourceImportMetadata> p_imd);
diff --git a/tools/editor/plugins/item_list_editor_plugin.cpp b/tools/editor/plugins/item_list_editor_plugin.cpp
index fa261edea3..6f0db959ba 100644
--- a/tools/editor/plugins/item_list_editor_plugin.cpp
+++ b/tools/editor/plugins/item_list_editor_plugin.cpp
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -30,7 +30,6 @@
#include "io/resource_loader.h"
-
bool ItemListPlugin::_set(const StringName& p_name, const Variant& p_value) {
String name = p_name;
@@ -45,12 +44,10 @@ bool ItemListPlugin::_set(const StringName& p_name, const Variant& p_value) {
set_item_checkable(idx,p_value);
else if (what=="checked")
set_item_checked(idx,p_value);
- else if (what=="enabled")
- set_item_enabled(idx,p_value);
- else if (what=="accel")
- set_item_accel(idx,p_value);
else if (what=="id")
set_item_id(idx,p_value);
+ else if (what=="enabled")
+ set_item_enabled(idx,p_value);
else if (what=="separator")
set_item_separator(idx,p_value);
else
@@ -60,6 +57,7 @@ bool ItemListPlugin::_set(const StringName& p_name, const Variant& p_value) {
}
bool ItemListPlugin::_get(const StringName& p_name,Variant &r_ret) const {
+
String name = p_name;
int idx = name.get_slice("/",0).to_int();
String what=name.get_slice("/",1);
@@ -72,12 +70,10 @@ bool ItemListPlugin::_get(const StringName& p_name,Variant &r_ret) const {
r_ret=is_item_checkable(idx);
else if (what=="checked")
r_ret=is_item_checked(idx);
- else if (what=="enabled")
- r_ret=is_item_enabled(idx);
- else if (what=="accel")
- r_ret=get_item_accel(idx);
else if (what=="id")
r_ret=get_item_id(idx);
+ else if (what=="enabled")
+ r_ret=is_item_enabled(idx);
else if (what=="separator")
r_ret=is_item_separator(idx);
else
@@ -93,66 +89,119 @@ void ItemListPlugin::_get_property_list( List<PropertyInfo> *p_list) const {
p_list->push_back( PropertyInfo(Variant::STRING,base+"text") );
p_list->push_back( PropertyInfo(Variant::OBJECT,base+"icon",PROPERTY_HINT_RESOURCE_TYPE,"Texture") );
- if (get_flags()&FLAG_CHECKABLE) {
+ int flags = get_flags();
+
+ if (flags&FLAG_CHECKABLE) {
p_list->push_back( PropertyInfo(Variant::BOOL,base+"checkable") );
p_list->push_back( PropertyInfo(Variant::BOOL,base+"checked") );
-
}
- if (get_flags()&FLAG_ENABLE) {
+ if (flags&FLAG_ID)
+ p_list->push_back( PropertyInfo(Variant::INT,base+"id",PROPERTY_HINT_RANGE,"-1,4096") );
+
+ if (flags&FLAG_ENABLE)
p_list->push_back( PropertyInfo(Variant::BOOL,base+"enabled") );
- }
- if (get_flags()&FLAG_ACCEL) {
+ if (flags&FLAG_SEPARATOR)
+ p_list->push_back( PropertyInfo(Variant::BOOL,base+"separator") );
+ }
+}
- p_list->push_back( PropertyInfo(Variant::INT,base+"accel",PROPERTY_HINT_KEY_ACCEL) );
+///////////////////////////////////////////////////////////////
+///////////////////////// PLUGINS /////////////////////////////
+///////////////////////////////////////////////////////////////
- }
- if (get_flags()&FLAG_ID) {
+void ItemListOptionButtonPlugin::set_object(Object *p_object) {
- p_list->push_back( PropertyInfo(Variant::INT,base+"id",PROPERTY_HINT_RANGE,"-1,4096") );
+ ob = p_object->cast_to<OptionButton>();
+}
- }
- if (get_flags()&FLAG_SEPARATOR) {
+bool ItemListOptionButtonPlugin::handles(Object *p_object) const {
- p_list->push_back( PropertyInfo(Variant::BOOL,base+"separator") );
+ return p_object->is_type("OptionButton");
+}
- }
- }
+int ItemListOptionButtonPlugin::get_flags() const {
+
+ return FLAG_ICON|FLAG_ID|FLAG_ENABLE;
}
-void ItemListEditor::_node_removed(Node *p_node) {
+void ItemListOptionButtonPlugin::add_item() {
- if(p_node==item_list) {
- item_list=NULL;
- hide();
- dialog->hide();
- }
+ ob->add_item( "Item "+itos(ob->get_item_count()));
+ _change_notify();
+}
+int ItemListOptionButtonPlugin::get_item_count() const {
+ return ob->get_item_count();
}
-void ItemListEditor::_delete_pressed() {
+void ItemListOptionButtonPlugin::erase(int p_idx) {
- String p = prop_editor->get_selected_path();
+ ob->remove_item(p_idx);
+ _change_notify();
+}
- if (p.find("/")!=-1) {
+ItemListOptionButtonPlugin::ItemListOptionButtonPlugin() {
- if (selected_idx<0 || selected_idx>=item_plugins.size())
- return;
+ ob=NULL;
+}
- item_plugins[selected_idx]->erase(p.get_slice("/",0).to_int());;
- }
+///////////////////////////////////////////////////////////////
+
+void ItemListPopupMenuPlugin::set_object(Object *p_object) {
+ if (p_object->is_type("MenuButton"))
+ pp = p_object->cast_to<MenuButton>()->get_popup();
+ else
+ pp = p_object->cast_to<PopupMenu>();
}
-void ItemListEditor::_add_pressed() {
+bool ItemListPopupMenuPlugin::handles(Object *p_object) const {
- if (selected_idx<0 || selected_idx>=item_plugins.size())
- return;
+ return p_object->is_type("PopupMenu") || p_object->is_type("MenuButton");
+}
- item_plugins[selected_idx]->add_item();
+int ItemListPopupMenuPlugin::get_flags() const {
+
+ return FLAG_ICON|FLAG_CHECKABLE|FLAG_ID|FLAG_ENABLE|FLAG_SEPARATOR;
+}
+
+void ItemListPopupMenuPlugin::add_item() {
+
+ pp->add_item( "Item "+itos(pp->get_item_count()));
+ _change_notify();
+}
+
+int ItemListPopupMenuPlugin::get_item_count() const {
+
+ return pp->get_item_count();
+}
+
+void ItemListPopupMenuPlugin::erase(int p_idx) {
+
+ pp->remove_item(p_idx);
+ _change_notify();
+}
+
+ItemListPopupMenuPlugin::ItemListPopupMenuPlugin() {
+
+ pp=NULL;
+}
+
+///////////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////////
+
+void ItemListEditor::_node_removed(Node *p_node) {
+
+ if(p_node==item_list) {
+ item_list=NULL;
+ hide();
+ dialog->hide();
+ }
}
void ItemListEditor::_notification(int p_notification) {
@@ -160,57 +209,73 @@ void ItemListEditor::_notification(int p_notification) {
if (p_notification==NOTIFICATION_ENTER_TREE) {
add_button->set_icon(get_icon("Add","EditorIcons"));
- del_button->set_icon(get_icon("Del","EditorIcons"));
+ del_button->set_icon(get_icon("Remove","EditorIcons"));
}
}
+void ItemListEditor::_add_pressed() {
-void ItemListEditor::_menu_option(int p_option) {
+ if (selected_idx==-1)
+ return;
+ item_plugins[selected_idx]->add_item();
+}
- switch(p_option) {
+void ItemListEditor::_delete_pressed() {
- case MENU_EDIT_ITEMS: {
+ TreeItem *ti = tree->get_selected();
- dialog->popup_centered_ratio();
- } break;
- }
+ if (!ti)
+ return;
+
+ if (ti->get_parent()!=tree->get_root())
+ return;
+
+ int idx = ti->get_text(0).to_int();
+
+ if (selected_idx==-1)
+ return;
+
+ item_plugins[selected_idx]->erase(idx);
}
+void ItemListEditor::_edit_items() {
+
+ dialog->popup_centered(Vector2(300, 400));
+}
void ItemListEditor::edit(Node *p_item_list) {
item_list=p_item_list;
+ if (!item_list) {
+ selected_idx=-1;
+ property_editor->edit(NULL);
+ return;
+ }
+
for(int i=0;i<item_plugins.size();i++) {
if (item_plugins[i]->handles(p_item_list)) {
item_plugins[i]->set_object(p_item_list);
- prop_editor->edit(item_plugins[i]);
+ property_editor->edit(item_plugins[i]);
+
+ if (has_icon(item_list->get_type(), "EditorIcons"))
+ toolbar_button->set_icon(get_icon(item_list->get_type(), "EditorIcons"));
+ else
+ toolbar_button->set_icon(Ref<Texture>());
+
selected_idx=i;
return;
}
}
selected_idx=-1;
-
- prop_editor->edit(NULL);
-
-}
-
-
-void ItemListEditor::_bind_methods() {
-
- ObjectTypeDB::bind_method("_menu_option",&ItemListEditor::_menu_option);
- ObjectTypeDB::bind_method("_add_button",&ItemListEditor::_add_pressed);
- ObjectTypeDB::bind_method("_delete_button",&ItemListEditor::_delete_pressed);
-
- //ObjectTypeDB::bind_method("_populate",&ItemListEditor::_populate);
-
+ property_editor->edit(NULL);
}
bool ItemListEditor::handles(Object *p_object) const {
- return false;
+
for(int i=0;i<item_plugins.size();i++) {
if (item_plugins[i]->handles(p_object)) {
return true;
@@ -218,57 +283,65 @@ bool ItemListEditor::handles(Object *p_object) const {
}
return false;
+}
+void ItemListEditor::_bind_methods() {
+
+ ObjectTypeDB::bind_method("_edit_items",&ItemListEditor::_edit_items);
+ ObjectTypeDB::bind_method("_add_button",&ItemListEditor::_add_pressed);
+ ObjectTypeDB::bind_method("_delete_button",&ItemListEditor::_delete_pressed);
}
+
ItemListEditor::ItemListEditor() {
selected_idx=-1;
- options = memnew( MenuButton );
- add_child(options);
- options->set_area_as_parent_rect();
- options->set_text("Items");
- options->get_popup()->add_item("Edit Items",MENU_EDIT_ITEMS);
- //options->get_popup()->add_item("Clear",MENU_CLEAR);
+ add_child( memnew( VSeparator ) );
- options->get_popup()->connect("item_pressed", this,"_menu_option");
+ toolbar_button = memnew( ToolButton );
+ toolbar_button->set_text("Items");
+ add_child(toolbar_button);
+ toolbar_button->connect("pressed",this,"_edit_items");
dialog = memnew( AcceptDialog );
+ dialog->set_title("Item List Editor");
add_child( dialog );
-
+ VBoxContainer *vbc = memnew( VBoxContainer );
+ dialog->add_child(vbc);
+ dialog->set_child_rect(vbc);
HBoxContainer *hbc = memnew( HBoxContainer );
-
- dialog->add_child(hbc);
- dialog->set_child_rect(hbc);
-
- prop_editor = memnew( PropertyEditor );
-
- hbc->add_child(prop_editor);
- prop_editor->set_h_size_flags(SIZE_EXPAND_FILL);
-
- VBoxContainer *vbc = memnew( VBoxContainer );
- hbc->add_child(vbc);
+ hbc->set_h_size_flags(SIZE_EXPAND_FILL);
+ vbc->add_child(hbc);
add_button = memnew( Button );
- //add_button->set_text("Add");
+ add_button->set_text("Add");
+ hbc->add_child(add_button);
add_button->connect("pressed",this,"_add_button");
- vbc->add_child(add_button);
+
+ hbc->add_spacer();
del_button = memnew( Button );
- //del_button->set_text("Del");
+ del_button->set_text("Delete");
+ hbc->add_child(del_button);
del_button->connect("pressed",this,"_delete_button");
- vbc->add_child(del_button);
- dialog->set_title("Item List");
- prop_editor->hide_top_label();
+ property_editor = memnew( PropertyEditor );
+ property_editor->hide_top_label();
+ property_editor->set_subsection_selectable(true);
+ vbc->add_child(property_editor);
+ property_editor->set_v_size_flags(SIZE_EXPAND_FILL);
+ tree = property_editor->get_scene_tree();
+}
+ItemListEditor::~ItemListEditor() {
+ for(int i=0;i<item_plugins.size();i++)
+ memdelete( item_plugins[i] );
}
-
void ItemListEditorPlugin::edit(Object *p_object) {
item_list_editor->edit(p_object->cast_to<Node>());
@@ -288,127 +361,19 @@ void ItemListEditorPlugin::make_visible(bool p_visible) {
item_list_editor->hide();
item_list_editor->edit(NULL);
}
-
-}
-
-
-ItemListEditor::~ItemListEditor() {
-
- for(int i=0;i<item_plugins.size();i++)
- memdelete( item_plugins[i] );
}
-///////////////////////// PLUGINS /////////////////////////////
-///////////////////////// PLUGINS /////////////////////////////
-///////////////////////// PLUGINS /////////////////////////////
-///////////////////////// PLUGINS /////////////////////////////
-///////////////////////// PLUGINS /////////////////////////////
-
-
-class ItemListOptionButtonPlugin : public ItemListPlugin {
-
- OBJ_TYPE(ItemListOptionButtonPlugin,ItemListPlugin);
-
- OptionButton *ob;
-public:
-
- virtual void set_object(Object *p_object) { ob = p_object->cast_to<OptionButton>(); }
-
- virtual bool handles(Object *p_object) const { return p_object->cast_to<OptionButton>()!=NULL; }
-
- virtual int get_flags() const { return FLAG_ICON|FLAG_ID|FLAG_ENABLE; }
-
- virtual void set_item_text(int p_idx,const String& p_text){ ob->set_item_text(p_idx,p_text);}
- virtual void set_item_icon(int p_idx,const Ref<Texture>& p_tex){ ob->set_item_icon(p_idx,p_tex);}
- virtual void set_item_enabled(int p_idx,int p_enabled){ ob->set_item_disabled(p_idx,!p_enabled);}
- virtual void set_item_id(int p_idx,int p_id){ ob->set_item_ID(p_idx,p_id);}
-
-
- virtual String get_item_text(int p_idx) const{ return ob->get_item_text(p_idx); };
- virtual Ref<Texture> get_item_icon(int p_idx) const{ return ob->get_item_icon(p_idx); };
- virtual bool is_item_enabled(int p_idx) const{ return !ob->is_item_disabled(p_idx); };
- virtual int get_item_id(int p_idx) const{ return ob->get_item_ID(p_idx); };
-
- virtual void add_item() { ob->add_item( "New Item "+itos(ob->get_item_count())); _change_notify();}
- virtual int get_item_count() const { return ob->get_item_count(); }
- virtual void erase(int p_idx) { ob->remove_item(p_idx); _change_notify();}
-
-
- ItemListOptionButtonPlugin() { ob=NULL; }
-};
-
-class ItemListPopupMenuPlugin : public ItemListPlugin {
-
- OBJ_TYPE(ItemListPopupMenuPlugin,ItemListPlugin);
-
- PopupMenu *pp;
-public:
-
- virtual void set_object(Object *p_object) {
- if (p_object->cast_to<MenuButton>())
- pp = p_object->cast_to<MenuButton>()->get_popup();
- else
- pp = p_object->cast_to<PopupMenu>();
- }
-
- virtual bool handles(Object *p_object) const { return p_object->cast_to<PopupMenu>()!=NULL || p_object->cast_to<MenuButton>()!=NULL; }
-
- virtual int get_flags() const { return FLAG_ICON|FLAG_ID|FLAG_ENABLE|FLAG_CHECKABLE|FLAG_SEPARATOR|FLAG_ACCEL; }
-
- virtual void set_item_text(int p_idx,const String& p_text){ pp->set_item_text(p_idx,p_text); }
- virtual void set_item_icon(int p_idx,const Ref<Texture>& p_tex){ pp->set_item_icon(p_idx,p_tex);}
- virtual void set_item_checkable(int p_idx,bool p_check){ pp->set_item_as_checkable(p_idx,p_check);}
- virtual void set_item_checked(int p_idx,bool p_checked){ pp->set_item_checked(p_idx,p_checked);}
- virtual void set_item_accel(int p_idx,int p_accel){ pp->set_item_accelerator(p_idx,p_accel);}
- virtual void set_item_enabled(int p_idx,int p_enabled){ pp->set_item_disabled(p_idx,!p_enabled);}
- virtual void set_item_id(int p_idx,int p_id){ pp->set_item_ID(p_idx,p_idx);}
- virtual void set_item_separator(int p_idx,bool p_separator){ pp->set_item_as_separator(p_idx,p_separator);}
-
-
- virtual String get_item_text(int p_idx) const{ return pp->get_item_text(p_idx); };
- virtual Ref<Texture> get_item_icon(int p_idx) const{ return pp->get_item_icon(p_idx); };
- virtual bool is_item_checkable(int p_idx) const{ return pp->is_item_checkable(p_idx); };
- virtual bool is_item_checked(int p_idx) const{ return pp->is_item_checked(p_idx); };
- virtual int get_item_accel(int p_idx) const{ return pp->get_item_accelerator(p_idx); };
- virtual bool is_item_enabled(int p_idx) const{ return !pp->is_item_disabled(p_idx); };
- virtual int get_item_id(int p_idx) const{ return pp->get_item_ID(p_idx); };
- virtual bool is_item_separator(int p_idx) const{ return pp->is_item_separator(p_idx); };
-
-
-
- virtual void add_item() { pp->add_item( "New Item "+itos(pp->get_item_count())); _change_notify();}
- virtual int get_item_count() const { return pp->get_item_count(); }
- virtual void erase(int p_idx) { pp->remove_item(p_idx); _change_notify();}
-
-
- ItemListPopupMenuPlugin() { pp=NULL; }
-};
-
-
-
-
-
-
ItemListEditorPlugin::ItemListEditorPlugin(EditorNode *p_node) {
editor=p_node;
item_list_editor = memnew( ItemListEditor );
- editor->get_viewport()->add_child(item_list_editor);
-
-// item_list_editor->set_anchor(MARGIN_LEFT,Control::ANCHOR_END);
-// item_list_editor->set_anchor(MARGIN_RIGHT,Control::ANCHOR_END);
- item_list_editor->set_margin(MARGIN_LEFT,180);
- item_list_editor->set_margin(MARGIN_RIGHT,230);
- item_list_editor->set_margin(MARGIN_TOP,0);
- item_list_editor->set_margin(MARGIN_BOTTOM,10);
-
+ CanvasItemEditor::get_singleton()->add_control_to_menu_panel(item_list_editor);
item_list_editor->hide();
- item_list_editor->add_plugin( memnew( ItemListOptionButtonPlugin) );
- item_list_editor->add_plugin( memnew( ItemListPopupMenuPlugin) );
+ item_list_editor->add_plugin( memnew( ItemListOptionButtonPlugin ) );
+ item_list_editor->add_plugin( memnew( ItemListPopupMenuPlugin ) );
}
-
ItemListEditorPlugin::~ItemListEditorPlugin()
{
}
diff --git a/tools/editor/plugins/item_list_editor_plugin.h b/tools/editor/plugins/item_list_editor_plugin.h
index 351dbb800d..95d316b199 100644
--- a/tools/editor/plugins/item_list_editor_plugin.h
+++ b/tools/editor/plugins/item_list_editor_plugin.h
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -31,10 +31,11 @@
#include "tools/editor/editor_plugin.h"
#include "tools/editor/editor_node.h"
+#include "canvas_item_editor_plugin.h"
+
#include "scene/gui/option_button.h"
#include "scene/gui/menu_button.h"
#include "scene/gui/popup_menu.h"
-#include "scene/gui/spin_box.h"
/**
@author Juan Linietsky <reduzio@gmail.com>
@@ -51,43 +52,42 @@ protected:
bool _get(const StringName& p_name,Variant &r_ret) const;
void _get_property_list( List<PropertyInfo> *p_list) const;
-
public:
enum Flags {
FLAG_ICON=1,
FLAG_CHECKABLE=2,
- FLAG_ACCEL=4,
- FLAG_ID=8,
- FLAG_ENABLE=16,
- FLAG_SEPARATOR=32
+ FLAG_ID=4,
+ FLAG_ENABLE=8,
+ FLAG_SEPARATOR=16
};
virtual void set_object(Object *p_object)=0;
-
virtual bool handles(Object *p_object) const=0;
virtual int get_flags() const=0;
- virtual void set_item_text(int p_idx,const String& p_text){}
- virtual void set_item_icon(int p_idx,const Ref<Texture>& p_tex){}
- virtual void set_item_checkable(int p_idx,bool p_check){}
- virtual void set_item_checked(int p_idx,bool p_checked){}
- virtual void set_item_accel(int p_idx,int p_accel){}
- virtual void set_item_enabled(int p_idx,int p_enabled){}
- virtual void set_item_id(int p_idx,int p_id){}
- virtual void set_item_separator(int p_idx,bool p_separator){}
-
-
+ virtual void set_item_text(int p_idx, const String& p_text) {}
virtual String get_item_text(int p_idx) const{ return ""; };
+
+ virtual void set_item_icon(int p_idx, const Ref<Texture>& p_tex) {}
virtual Ref<Texture> get_item_icon(int p_idx) const{ return Ref<Texture>(); };
+
+ virtual void set_item_checkable(int p_idx, bool p_check) {}
virtual bool is_item_checkable(int p_idx) const{ return false; };
+
+ virtual void set_item_checked(int p_idx, bool p_checked) {}
virtual bool is_item_checked(int p_idx) const{ return false; };
- virtual int get_item_accel(int p_idx) const{ return 0; };
+
+ virtual void set_item_enabled(int p_idx, int p_enabled) {}
virtual bool is_item_enabled(int p_idx) const{ return false; };
+
+ virtual void set_item_id(int p_idx, int p_id) {}
virtual int get_item_id(int p_idx) const{ return -1; };
- virtual bool is_item_separator(int p_idx) const{ return false; };
+
+ virtual void set_item_separator(int p_idx, bool p_separator) {}
+ virtual bool is_item_separator(int p_idx) const { return false; };
virtual void add_item()=0;
virtual int get_item_count() const=0;
@@ -96,41 +96,107 @@ public:
ItemListPlugin() {}
};
-class ItemListEditor : public Control {
+///////////////////////////////////////////////////////////////
- OBJ_TYPE(ItemListEditor, Control );
+class ItemListOptionButtonPlugin : public ItemListPlugin {
- Node *item_list;
+ OBJ_TYPE(ItemListOptionButtonPlugin,ItemListPlugin);
- enum {
+ OptionButton *ob;
+public:
- MENU_EDIT_ITEMS,
- MENU_CLEAR
- };
+ virtual void set_object(Object *p_object);
+ virtual bool handles(Object *p_object) const;
+ virtual int get_flags() const;
- AcceptDialog *dialog;
+ virtual void set_item_text(int p_idx, const String& p_text) { ob->set_item_text(p_idx,p_text); }
+ virtual String get_item_text(int p_idx) const { return ob->get_item_text(p_idx); }
- PropertyEditor *prop_editor;
+ virtual void set_item_icon(int p_idx, const Ref<Texture>& p_tex) { ob->set_item_icon(p_idx, p_tex); }
+ virtual Ref<Texture> get_item_icon(int p_idx) const { return ob->get_item_icon(p_idx); }
- MenuButton * options;
- int selected_idx;
+ virtual void set_item_enabled(int p_idx, int p_enabled) { ob->set_item_disabled(p_idx, !p_enabled); }
+ virtual bool is_item_enabled(int p_idx) const { return !ob->is_item_disabled(p_idx); }
+
+ virtual void set_item_id(int p_idx, int p_id) { ob->set_item_ID(p_idx,p_id); }
+ virtual int get_item_id(int p_idx) const { return ob->get_item_ID(p_idx); }
+
+ virtual void add_item();
+ virtual int get_item_count() const;
+ virtual void erase(int p_idx);
+
+ ItemListOptionButtonPlugin();
+};
+
+class ItemListPopupMenuPlugin : public ItemListPlugin {
+
+ OBJ_TYPE(ItemListPopupMenuPlugin,ItemListPlugin);
+
+ PopupMenu *pp;
+public:
+
+ virtual void set_object(Object *p_object);
+ virtual bool handles(Object *p_object) const;
+ virtual int get_flags() const;
+ virtual void set_item_text(int p_idx, const String& p_text) { pp->set_item_text(p_idx,p_text); }
+ virtual String get_item_text(int p_idx) const { return pp->get_item_text(p_idx); }
+
+ virtual void set_item_icon(int p_idx, const Ref<Texture>& p_tex) { pp->set_item_icon(p_idx,p_tex); }
+ virtual Ref<Texture> get_item_icon(int p_idx) const { return pp->get_item_icon(p_idx); }
+
+ virtual void set_item_checkable(int p_idx, bool p_check) { pp->set_item_as_checkable(p_idx,p_check); }
+ virtual bool is_item_checkable(int p_idx) const { return pp->is_item_checkable(p_idx); }
+
+ virtual void set_item_checked(int p_idx, bool p_checked) { pp->set_item_checked(p_idx,p_checked); }
+ virtual bool is_item_checked(int p_idx) const { return pp->is_item_checked(p_idx); }
+
+ virtual void set_item_enabled(int p_idx, int p_enabled) { pp->set_item_disabled(p_idx,!p_enabled); }
+ virtual bool is_item_enabled(int p_idx) const { return !pp->is_item_disabled(p_idx); }
+
+ virtual void set_item_id(int p_idx, int p_id) { pp->set_item_ID(p_idx,p_idx); }
+ virtual int get_item_id(int p_idx) const { return pp->get_item_ID(p_idx); }
+
+ virtual void set_item_separator(int p_idx, bool p_separator) { pp->set_item_as_separator(p_idx,p_separator); }
+ virtual bool is_item_separator(int p_idx) const { return pp->is_item_separator(p_idx); }
+
+ virtual void add_item();
+ virtual int get_item_count() const;
+ virtual void erase(int p_idx);
+
+ ItemListPopupMenuPlugin();
+};
+
+///////////////////////////////////////////////////////////////
+
+class ItemListEditor : public HBoxContainer {
+
+ OBJ_TYPE(ItemListEditor,HBoxContainer);
+
+ Node *item_list;
+
+ ToolButton *toolbar_button;
+
+ AcceptDialog *dialog;
+ PropertyEditor *property_editor;
+ Tree *tree;
Button *add_button;
Button *del_button;
-
-// FileDialog *emission_file_dialog;
- void _menu_option(int);
+ int selected_idx;
Vector<ItemListPlugin*> item_plugins;
- void _node_removed(Node *p_node);
+ void _edit_items();
+
void _add_pressed();
void _delete_pressed();
+
+ void _node_removed(Node *p_node);
+
protected:
void _notification(int p_notification);
-
static void _bind_methods();
public:
@@ -143,7 +209,7 @@ public:
class ItemListEditorPlugin : public EditorPlugin {
- OBJ_TYPE( ItemListEditorPlugin, EditorPlugin );
+ OBJ_TYPE(ItemListEditorPlugin,EditorPlugin);
ItemListEditor *item_list_editor;
EditorNode *editor;
diff --git a/tools/editor/plugins/mesh_editor_plugin.cpp b/tools/editor/plugins/mesh_editor_plugin.cpp
index cea774f94b..5314529a23 100644
--- a/tools/editor/plugins/mesh_editor_plugin.cpp
+++ b/tools/editor/plugins/mesh_editor_plugin.cpp
@@ -1,13 +1,8 @@
#include "mesh_editor_plugin.h"
-#include "tools/editor/editor_plugin.h"
-#include "tools/editor/editor_node.h"
-#include "scene/3d/mesh_instance.h"
#include "scene/3d/physics_body.h"
#include "scene/3d/body_shape.h"
-#include "scene/gui/spin_box.h"
#include "scene/gui/box_container.h"
-#include "scene/3d/mesh_instance.h"
#include "scene/3d/navigation_mesh.h"
#include "spatial_editor_plugin.h"
@@ -38,92 +33,106 @@ void MeshInstanceEditor::_menu_option(int p_option) {
}
switch(p_option) {
- case MENU_OPTION_CREATE_STATIC_TRIMESH_BODY: {
+ case MENU_OPTION_CREATE_STATIC_TRIMESH_BODY:
+ case MENU_OPTION_CREATE_STATIC_CONVEX_BODY: {
- Ref<Shape> shape = mesh->create_trimesh_shape();
- if (shape.is_null())
- return;
- StaticBody *body = memnew( StaticBody );
- CollisionShape *cshape = memnew( CollisionShape );
- cshape->set_shape(shape);
- body->add_child(cshape);
- Node *owner = node==get_tree()->get_edited_scene_root() ? node : node->get_owner();
+ bool trimesh_shape = (p_option==MENU_OPTION_CREATE_STATIC_TRIMESH_BODY);
+ EditorSelection *editor_selection = EditorNode::get_singleton()->get_editor_selection();
UndoRedo *ur = EditorNode::get_singleton()->get_undo_redo();
- ur->create_action("Create Static Trimesh");
- ur->add_do_method(node,"add_child",body);
- ur->add_do_method(body,"set_owner",owner);
- ur->add_do_method(cshape,"set_owner",owner);
- ur->add_do_reference(body);
- ur->add_undo_method(node,"remove_child",body);
- ur->commit_action();
- } break;
- case MENU_OPTION_CREATE_STATIC_CONVEX_BODY: {
+ List<Node*> selection = editor_selection->get_selected_node_list();
- Ref<Shape> shape = mesh->create_convex_shape();
- if (shape.is_null())
- return;
- StaticBody *body = memnew( StaticBody );
- CollisionShape *cshape = memnew( CollisionShape );
- cshape->set_shape(shape);
- body->add_child(cshape);
- Node *owner = node==get_tree()->get_edited_scene_root() ? node : node->get_owner();
+ if (selection.empty()) {
+ Ref<Shape> shape = trimesh_shape ? mesh->create_trimesh_shape() : mesh->create_convex_shape();
+ if (shape.is_null())
+ return;
- UndoRedo *ur = EditorNode::get_singleton()->get_undo_redo();
- ur->create_action("Create Static Trimesh");
- ur->add_do_method(node,"add_child",body);
- ur->add_do_method(body,"set_owner",owner);
- ur->add_do_method(cshape,"set_owner",owner);
- ur->add_do_reference(body);
- ur->add_undo_method(node,"remove_child",body);
- ur->commit_action();
+ CollisionShape *cshape = memnew( CollisionShape );
+ cshape->set_shape(shape);
+ StaticBody *body = memnew( StaticBody );
+ body->add_child(cshape);
- } break;
- case MENU_OPTION_CREATE_TRIMESH_COLLISION_SHAPE: {
+ Node *owner = node==get_tree()->get_edited_scene_root() ? node : node->get_owner();
+ if (trimesh_shape)
+ ur->create_action("Create Static Trimesh Body");
+ else
+ ur->create_action("Create Static Convex Body");
- if (node==get_tree()->get_edited_scene_root()) {
- err_dialog->set_text("This doesn't work on scene root!");
- err_dialog->popup_centered_minsize();
+ ur->add_do_method(node,"add_child",body);
+ ur->add_do_method(body,"set_owner",owner);
+ ur->add_do_method(cshape,"set_owner",owner);
+ ur->add_do_reference(body);
+ ur->add_undo_method(node,"remove_child",body);
+ ur->commit_action();
return;
}
- Ref<Shape> shape = mesh->create_trimesh_shape();
- if (shape.is_null())
- return;
- CollisionShape *cshape = memnew( CollisionShape );
- cshape->set_shape(shape);
- Node *owner = node->get_owner();
+ if (trimesh_shape)
+ ur->create_action("Create Static Trimesh Body");
+ else
+ ur->create_action("Create Static Convex Body");
+
+ for (List<Node*>::Element *E=selection.front();E;E=E->next()) {
+
+ MeshInstance *instance = E->get()->cast_to<MeshInstance>();
+ if (!instance)
+ continue;
+
+ Ref<Mesh> m = instance->get_mesh();
+ if (m.is_null())
+ continue;
+
+ Ref<Shape> shape = trimesh_shape ? m->create_trimesh_shape() : m->create_convex_shape();
+ if (shape.is_null())
+ continue;
+
+ CollisionShape *cshape = memnew( CollisionShape );
+ cshape->set_shape(shape);
+ StaticBody *body = memnew( StaticBody );
+ body->add_child(cshape);
+
+ Node *owner = instance==get_tree()->get_edited_scene_root() ? instance : instance->get_owner();
+
+ ur->add_do_method(instance,"add_child",body);
+ ur->add_do_method(body,"set_owner",owner);
+ ur->add_do_method(cshape,"set_owner",owner);
+ ur->add_do_reference(body);
+ ur->add_undo_method(instance,"remove_child",body);
+ }
- UndoRedo *ur = EditorNode::get_singleton()->get_undo_redo();
- ur->create_action("Create Static Trimesh");
- ur->add_do_method(node->get_parent(),"add_child",cshape);
- ur->add_do_method(node->get_parent(),"move_child",cshape,node->get_index()+1);
- ur->add_do_method(cshape,"set_owner",owner);
- ur->add_do_reference(cshape);
- ur->add_undo_method(node->get_parent(),"remove_child",cshape);
ur->commit_action();
} break;
- case MENU_OPTION_CREATE_CONVEX_COLLISION_SHAPE: {
+ case MENU_OPTION_CREATE_TRIMESH_COLLISION_SHAPE:
+ case MENU_OPTION_CREATE_CONVEX_COLLISION_SHAPE: {
if (node==get_tree()->get_edited_scene_root()) {
err_dialog->set_text("This doesn't work on scene root!");
err_dialog->popup_centered_minsize();
return;
}
- Ref<Shape> shape = mesh->create_convex_shape();
+
+ bool trimesh_shape = (p_option==MENU_OPTION_CREATE_TRIMESH_COLLISION_SHAPE);
+
+ Ref<Shape> shape = trimesh_shape ? mesh->create_trimesh_shape() : mesh->create_convex_shape();
if (shape.is_null())
return;
+
CollisionShape *cshape = memnew( CollisionShape );
cshape->set_shape(shape);
Node *owner = node->get_owner();
UndoRedo *ur = EditorNode::get_singleton()->get_undo_redo();
- ur->create_action("Create Static Trimesh");
+
+ if (trimesh_shape)
+ ur->create_action("Create Trimesh Shape");
+ else
+ ur->create_action("Create Convex Shape");
+
ur->add_do_method(node->get_parent(),"add_child",cshape);
ur->add_do_method(node->get_parent(),"move_child",cshape,node->get_index()+1);
ur->add_do_method(cshape,"set_owner",owner);
@@ -132,10 +141,8 @@ void MeshInstanceEditor::_menu_option(int p_option) {
ur->commit_action();
} break;
- case MENU_OPTION_CREATE_NAVMESH: {
-
-
+ case MENU_OPTION_CREATE_NAVMESH: {
Ref<NavigationMesh> nmesh = memnew( NavigationMesh );
@@ -158,6 +165,7 @@ void MeshInstanceEditor::_menu_option(int p_option) {
ur->add_undo_method(node,"remove_child",nmi);
ur->commit_action();
} break;
+
case MENU_OPTION_CREATE_OUTLINE_MESH: {
outline_dialog->popup_centered(Vector2(200, 90));
diff --git a/tools/editor/plugins/mesh_editor_plugin.h b/tools/editor/plugins/mesh_editor_plugin.h
index e502b5dc2b..6b3e23f31f 100644
--- a/tools/editor/plugins/mesh_editor_plugin.h
+++ b/tools/editor/plugins/mesh_editor_plugin.h
@@ -23,24 +23,19 @@ class MeshInstanceEditor : public Node {
MENU_OPTION_CREATE_OUTLINE_MESH,
};
+ MeshInstance *node;
+
+ MenuButton *options;
+
ConfirmationDialog *outline_dialog;
SpinBox *outline_size;
AcceptDialog *err_dialog;
-
- Panel *panel;
- MeshInstance *node;
-
- LineEdit *surface_source;
- LineEdit *mesh_source;
-
-
void _menu_option(int p_option);
void _create_outline_mesh();
friend class MeshInstanceEditorPlugin;
- MenuButton * options;
protected:
void _node_removed(Node *p_node);
diff --git a/tools/editor/plugins/multimesh_editor_plugin.cpp b/tools/editor/plugins/multimesh_editor_plugin.cpp
index a5c823f8bd..3f63ef706b 100644
--- a/tools/editor/plugins/multimesh_editor_plugin.cpp
+++ b/tools/editor/plugins/multimesh_editor_plugin.cpp
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/tools/editor/plugins/multimesh_editor_plugin.h b/tools/editor/plugins/multimesh_editor_plugin.h
index edc3dfd55f..245da1eeb7 100644
--- a/tools/editor/plugins/multimesh_editor_plugin.h
+++ b/tools/editor/plugins/multimesh_editor_plugin.h
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/tools/editor/plugins/particles_2d_editor_plugin.cpp b/tools/editor/plugins/particles_2d_editor_plugin.cpp
index dadfa8bfdc..2488c4cdd9 100644
--- a/tools/editor/plugins/particles_2d_editor_plugin.cpp
+++ b/tools/editor/plugins/particles_2d_editor_plugin.cpp
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/tools/editor/plugins/particles_2d_editor_plugin.h b/tools/editor/plugins/particles_2d_editor_plugin.h
index dba0bb4dae..f70a0e7b76 100644
--- a/tools/editor/plugins/particles_2d_editor_plugin.h
+++ b/tools/editor/plugins/particles_2d_editor_plugin.h
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/tools/editor/plugins/particles_editor_plugin.cpp b/tools/editor/plugins/particles_editor_plugin.cpp
index 5c84d9a86a..2df6d3ea90 100644
--- a/tools/editor/plugins/particles_editor_plugin.cpp
+++ b/tools/editor/plugins/particles_editor_plugin.cpp
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/tools/editor/plugins/particles_editor_plugin.h b/tools/editor/plugins/particles_editor_plugin.h
index 92756af1f6..ff80bffc29 100644
--- a/tools/editor/plugins/particles_editor_plugin.h
+++ b/tools/editor/plugins/particles_editor_plugin.h
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/tools/editor/plugins/path_2d_editor_plugin.cpp b/tools/editor/plugins/path_2d_editor_plugin.cpp
index d037adc555..509edbe5f8 100644
--- a/tools/editor/plugins/path_2d_editor_plugin.cpp
+++ b/tools/editor/plugins/path_2d_editor_plugin.cpp
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -534,6 +534,7 @@ void Path2DEditor::edit(Node *p_path2d) {
if (!node->is_connected("visibility_changed", this, "_node_visibility_changed"))
node->connect("visibility_changed", this, "_node_visibility_changed");
+
} else {
if (canvas_item_editor->get_viewport_control()->is_connected("draw",this,"_canvas_draw"))
@@ -614,6 +615,7 @@ Path2DEditor::Path2DEditor(EditorNode *p_editor) {
editor=p_editor;
undo_redo = editor->get_undo_redo();
+ mode=MODE_EDIT;
action=ACTION_NONE;
#if 0
diff --git a/tools/editor/plugins/path_2d_editor_plugin.h b/tools/editor/plugins/path_2d_editor_plugin.h
index 9f15c0669f..973c17464e 100644
--- a/tools/editor/plugins/path_2d_editor_plugin.h
+++ b/tools/editor/plugins/path_2d_editor_plugin.h
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/tools/editor/plugins/path_editor_plugin.cpp b/tools/editor/plugins/path_editor_plugin.cpp
index f4bdf50fe9..b99e632604 100644
--- a/tools/editor/plugins/path_editor_plugin.cpp
+++ b/tools/editor/plugins/path_editor_plugin.cpp
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/tools/editor/plugins/path_editor_plugin.h b/tools/editor/plugins/path_editor_plugin.h
index fcd4241e59..18bad23bd1 100644
--- a/tools/editor/plugins/path_editor_plugin.h
+++ b/tools/editor/plugins/path_editor_plugin.h
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/tools/editor/plugins/polygon_2d_editor_plugin.cpp b/tools/editor/plugins/polygon_2d_editor_plugin.cpp
index cd82297365..3e9c58d604 100644
--- a/tools/editor/plugins/polygon_2d_editor_plugin.cpp
+++ b/tools/editor/plugins/polygon_2d_editor_plugin.cpp
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -755,7 +755,6 @@ void Polygon2DEditor::edit(Node *p_collision_polygon) {
canvas_item_editor=CanvasItemEditor::get_singleton();
}
-
if (p_collision_polygon) {
node=p_collision_polygon->cast_to<Polygon2D>();
diff --git a/tools/editor/plugins/resource_preloader_editor_plugin.cpp b/tools/editor/plugins/resource_preloader_editor_plugin.cpp
index 9cd20ac53a..8490f63ff0 100644
--- a/tools/editor/plugins/resource_preloader_editor_plugin.cpp
+++ b/tools/editor/plugins/resource_preloader_editor_plugin.cpp
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -356,11 +356,16 @@ bool ResourcePreloaderEditorPlugin::handles(Object *p_object) const {
void ResourcePreloaderEditorPlugin::make_visible(bool p_visible) {
if (p_visible) {
- preloader_editor->show();
+ //preloader_editor->show();
+ button->show();
+ editor->make_bottom_panel_item_visible(preloader_editor);
// preloader_editor->set_process(true);
} else {
- preloader_editor->hide();
+ if (preloader_editor->is_visible())
+ editor->hide_bottom_panel();
+ button->hide();
+ //preloader_editor->hide();
// preloader_editor->set_process(false);
}
@@ -370,11 +375,14 @@ ResourcePreloaderEditorPlugin::ResourcePreloaderEditorPlugin(EditorNode *p_node)
editor=p_node;
preloader_editor = memnew( ResourcePreloaderEditor );
- editor->get_viewport()->add_child(preloader_editor);
- preloader_editor->set_area_as_parent_rect();
+ preloader_editor->set_custom_minimum_size(Size2(0,250));
+
+ button=editor->add_bottom_panel_item("ResourcePreloader",preloader_editor);
+ button->hide();
+
// preloader_editor->set_anchor( MARGIN_TOP, Control::ANCHOR_END);
// preloader_editor->set_margin( MARGIN_TOP, 120 );
- preloader_editor->hide();
+
diff --git a/tools/editor/plugins/resource_preloader_editor_plugin.h b/tools/editor/plugins/resource_preloader_editor_plugin.h
index 88272bc603..53436797a9 100644
--- a/tools/editor/plugins/resource_preloader_editor_plugin.h
+++ b/tools/editor/plugins/resource_preloader_editor_plugin.h
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -85,6 +85,7 @@ class ResourcePreloaderEditorPlugin : public EditorPlugin {
ResourcePreloaderEditor *preloader_editor;
EditorNode *editor;
+ Button *button;
public:
diff --git a/tools/editor/plugins/rich_text_editor_plugin.cpp b/tools/editor/plugins/rich_text_editor_plugin.cpp
index a0daad854f..08374d6624 100644
--- a/tools/editor/plugins/rich_text_editor_plugin.cpp
+++ b/tools/editor/plugins/rich_text_editor_plugin.cpp
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/tools/editor/plugins/rich_text_editor_plugin.h b/tools/editor/plugins/rich_text_editor_plugin.h
index 478dc0d308..ae1d04be01 100644
--- a/tools/editor/plugins/rich_text_editor_plugin.h
+++ b/tools/editor/plugins/rich_text_editor_plugin.h
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/tools/editor/plugins/sample_editor_plugin.cpp b/tools/editor/plugins/sample_editor_plugin.cpp
index d88f2adc73..ffa39bd010 100644
--- a/tools/editor/plugins/sample_editor_plugin.cpp
+++ b/tools/editor/plugins/sample_editor_plugin.cpp
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/tools/editor/plugins/sample_editor_plugin.h b/tools/editor/plugins/sample_editor_plugin.h
index e615667914..22dc75b53b 100644
--- a/tools/editor/plugins/sample_editor_plugin.h
+++ b/tools/editor/plugins/sample_editor_plugin.h
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/tools/editor/plugins/sample_library_editor_plugin.cpp b/tools/editor/plugins/sample_library_editor_plugin.cpp
index b497458a2a..a28fbb2ec8 100644
--- a/tools/editor/plugins/sample_library_editor_plugin.cpp
+++ b/tools/editor/plugins/sample_library_editor_plugin.cpp
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -423,11 +423,16 @@ bool SampleLibraryEditorPlugin::handles(Object *p_object) const {
void SampleLibraryEditorPlugin::make_visible(bool p_visible) {
if (p_visible) {
- sample_library_editor->show();
+ //sample_library_editor->show();
+ button->show();
+ editor->make_bottom_panel_item_visible(sample_library_editor);
// sample_library_editor->set_process(true);
} else {
- sample_library_editor->hide();
+ if (sample_library_editor->is_visible())
+ editor->hide_bottom_panel();
+ button->hide();
+
// sample_library_editor->set_process(false);
}
@@ -437,11 +442,16 @@ SampleLibraryEditorPlugin::SampleLibraryEditorPlugin(EditorNode *p_node) {
editor=p_node;
sample_library_editor = memnew( SampleLibraryEditor );
- editor->get_viewport()->add_child(sample_library_editor);
- sample_library_editor->set_area_as_parent_rect();
+
+ //editor->get_viewport()->add_child(sample_library_editor);
+ sample_library_editor->set_custom_minimum_size(Size2(0,250));
+ button=p_node->add_bottom_panel_item("SampleLibrary",sample_library_editor);
+ button->hide();
+
+ //sample_library_editor->set_area_as_parent_rect();
// sample_library_editor->set_anchor( MARGIN_TOP, Control::ANCHOR_END);
// sample_library_editor->set_margin( MARGIN_TOP, 120 );
- sample_library_editor->hide();
+ //sample_library_editor->hide();
diff --git a/tools/editor/plugins/sample_library_editor_plugin.h b/tools/editor/plugins/sample_library_editor_plugin.h
index 2770ca2d9a..cbdcf5fc3f 100644
--- a/tools/editor/plugins/sample_library_editor_plugin.h
+++ b/tools/editor/plugins/sample_library_editor_plugin.h
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -90,6 +90,7 @@ class SampleLibraryEditorPlugin : public EditorPlugin {
SampleLibraryEditor *sample_library_editor;
EditorNode *editor;
+ Button *button;
public:
diff --git a/tools/editor/plugins/sample_player_editor_plugin.cpp b/tools/editor/plugins/sample_player_editor_plugin.cpp
index f1c7ca8c98..3085ad87d8 100644
--- a/tools/editor/plugins/sample_player_editor_plugin.cpp
+++ b/tools/editor/plugins/sample_player_editor_plugin.cpp
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/tools/editor/plugins/sample_player_editor_plugin.h b/tools/editor/plugins/sample_player_editor_plugin.h
index cdd1a99c17..013b042487 100644
--- a/tools/editor/plugins/sample_player_editor_plugin.h
+++ b/tools/editor/plugins/sample_player_editor_plugin.h
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/tools/editor/plugins/script_editor_plugin.cpp b/tools/editor/plugins/script_editor_plugin.cpp
index 65ed420a51..34d7e89760 100644
--- a/tools/editor/plugins/script_editor_plugin.cpp
+++ b/tools/editor/plugins/script_editor_plugin.cpp
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -316,6 +316,8 @@ void ScriptTextEditor::_load_theme_settings() {
get_text_edit()->add_keyword_color("Color",basetype_color);
get_text_edit()->add_keyword_color("Image",basetype_color);
get_text_edit()->add_keyword_color("InputEvent",basetype_color);
+ get_text_edit()->add_keyword_color("Rect2",basetype_color);
+ get_text_edit()->add_keyword_color("NodePath",basetype_color);
//colorize engine types
Color type_color= EDITOR_DEF("text_editor/engine_type_color",Color(0.0,0.2,0.4));
@@ -325,7 +327,11 @@ void ScriptTextEditor::_load_theme_settings() {
for(List<StringName>::Element *E=types.front();E;E=E->next()) {
- get_text_edit()->add_keyword_color(E->get(),type_color);
+ String n = E->get();
+ if (n.begins_with("_"))
+ n = n.substr(1, n.length());
+
+ get_text_edit()->add_keyword_color(n,type_color);
}
//colorize comments
@@ -379,6 +385,8 @@ void ScriptTextEditor::reload_text() {
te->set_h_scroll(h);
te->set_v_scroll(v);
+ te->tag_saved_version();
+
_line_col_changed();
}
@@ -391,6 +399,12 @@ void ScriptTextEditor::_notification(int p_what) {
}
}
+
+bool ScriptTextEditor::is_unsaved() {
+
+ return get_text_edit()->get_version()!=get_text_edit()->get_saved_version();
+}
+
String ScriptTextEditor::get_name() {
String name;
@@ -492,6 +506,59 @@ static Node* _find_node_for_script(Node* p_base, Node*p_current, const Ref<Scrip
return NULL;
}
+static void _find_changed_scripts_for_external_editor(Node* p_base, Node*p_current, Set<Ref<Script> > &r_scripts) {
+
+ if (p_current->get_owner()!=p_base && p_base!=p_current)
+ return;
+ Ref<Script> c = p_current->get_script();
+
+ if (c.is_valid())
+ r_scripts.insert(c);
+
+ for(int i=0;i<p_current->get_child_count();i++) {
+ _find_changed_scripts_for_external_editor(p_base,p_current->get_child(i),r_scripts);
+ }
+
+}
+
+void ScriptEditor::_update_modified_scripts_for_external_editor() {
+
+ if (!bool(EditorSettings::get_singleton()->get("external_editor/use_external_editor")))
+ return;
+
+ Set<Ref<Script> > scripts;
+
+ Node *base = get_tree()->get_edited_scene_root();
+ if (base) {
+ _find_changed_scripts_for_external_editor(base,base,scripts);
+ }
+
+ for (Set<Ref<Script> >::Element *E=scripts.front();E;E=E->next()) {
+
+ Ref<Script> script = E->get();
+
+ if (script->get_path()=="" || script->get_path().find("local://")!=-1 || script->get_path().find("::")!=-1) {
+
+ continue; //internal script, who cares, though weird
+ }
+
+ uint64_t last_date = script->get_last_modified_time();
+ uint64_t date = FileAccess::get_modified_time(script->get_path());
+
+ if (last_date!=date) {
+
+ Ref<Script> rel_script = ResourceLoader::load(script->get_path(),script->get_type(),true);
+ ERR_CONTINUE(!rel_script.is_valid());
+ script->set_source_code( rel_script->get_source_code() );
+ script->set_last_modified_time( rel_script->get_last_modified_time() );
+ script->update_exports();
+ }
+
+ }
+}
+
+
+
void ScriptTextEditor::_code_complete_script(const String& p_code, List<String>* r_options) {
Node *base = get_tree()->get_edited_scene_root();
@@ -543,7 +610,6 @@ void ScriptEditor::_breaked(bool p_breaked,bool p_can_debug) {
void ScriptEditor::_show_debugger(bool p_show) {
debug_menu->get_popup()->set_item_checked( debug_menu->get_popup()->get_item_index(DEBUG_SHOW), p_show);
-
}
void ScriptEditor::_script_created(Ref<Script> p_script) {
@@ -749,6 +815,7 @@ void ScriptEditor::_reload_scripts(){
}
disk_changed->hide();
+ _update_script_names();
}
@@ -791,46 +858,53 @@ bool ScriptEditor::_test_script_times_on_disk() {
TreeItem *r = disk_changed_list->create_item();
disk_changed_list->set_hide_root(true);
- bool all_ok=true;
+ bool need_ask=false;
+ bool need_reload=false;
+ bool use_autoreload=bool(EDITOR_DEF("text_editor/auto_reload_scripts_on_external_change",false));
+
for(int i=0;i<tab_container->get_child_count();i++) {
ScriptTextEditor *ste = tab_container->get_child(i)->cast_to<ScriptTextEditor>();
- if (!ste)
- continue;
+ if (ste) {
+ Ref<Script> script = ste->get_edited_script();
- Ref<Script> script = ste->get_edited_script();
+ if (script->get_path()=="" || script->get_path().find("local://")!=-1 || script->get_path().find("::")!=-1)
+ continue; //internal script, who cares
- if (script->get_path()=="" || script->get_path().find("local://")!=-1 || script->get_path().find("::")!=-1)
- continue; //internal script, who cares
+ uint64_t last_date = script->get_last_modified_time();
+ uint64_t date = FileAccess::get_modified_time(script->get_path());
- uint64_t last_date = script->get_last_modified_time();
- uint64_t date = FileAccess::get_modified_time(script->get_path());
+ //printf("last date: %lli vs date: %lli\n",last_date,date);
+ if (last_date!=date) {
- //printf("last date: %lli vs date: %lli\n",last_date,date);
- if (last_date!=date) {
+ TreeItem *ti = disk_changed_list->create_item(r);
+ ti->set_text(0,script->get_path().get_file());
- TreeItem *ti = disk_changed_list->create_item(r);
- ti->set_text(0,script->get_path().get_file());
- all_ok=false;
- //r->set_metadata(0,);
+ if (!use_autoreload || ste->is_unsaved()) {
+ need_ask=true;
+ }
+ need_reload=true;
+ //r->set_metadata(0,);
+ }
}
}
- if (!all_ok) {
- if (bool(EDITOR_DEF("text_editor/auto_reload_changed_scripts",false))) {
+ if (need_reload) {
+ if (!need_ask) {
script_editor->_reload_scripts();
+ need_reload=false;
} else {
disk_changed->call_deferred("popup_centered_ratio",0.5);
}
}
- return all_ok;
+ return need_reload;
}
void ScriptEditor::swap_lines(TextEdit *tx, int line1, int line2)
@@ -881,18 +955,17 @@ void ScriptEditor::_menu_option(int p_option) {
} break;
case SEARCH_HELP: {
- help_search_dialog->popup("current");
+ help_search_dialog->popup();
} break;
case SEARCH_CLASSES: {
- if (tab_container->get_tab_count()==0)
- break;
-
String current;
- EditorHelp *eh = tab_container->get_child( tab_container->get_current_tab() )->cast_to<EditorHelp>();
- if (eh) {
- current=eh->get_class_name();
+ if (tab_container->get_tab_count()>0) {
+ EditorHelp *eh = tab_container->get_child( tab_container->get_current_tab() )->cast_to<EditorHelp>();
+ if (eh) {
+ current=eh->get_class_name();
+ }
}
help_index->popup_centered_ratio(0.6);
@@ -913,7 +986,22 @@ void ScriptEditor::_menu_option(int p_option) {
case WINDOW_PREV: {
_history_back();
} break;
-
+ case DEBUG_SHOW: {
+ if (debugger) {
+ bool visible = debug_menu->get_popup()->is_item_checked( debug_menu->get_popup()->get_item_index(DEBUG_SHOW) );
+ debug_menu->get_popup()->set_item_checked( debug_menu->get_popup()->get_item_index(DEBUG_SHOW), !visible);
+ if (visible)
+ debugger->hide();
+ else
+ debugger->show();
+ }
+ } break;
+ case DEBUG_SHOW_KEEP_OPEN: {
+ bool visible = debug_menu->get_popup()->is_item_checked( debug_menu->get_popup()->get_item_index(DEBUG_SHOW_KEEP_OPEN) );
+ if (debugger)
+ debugger->set_hide_on_stop(visible);
+ debug_menu->get_popup()->set_item_checked( debug_menu->get_popup()->get_item_index(DEBUG_SHOW_KEEP_OPEN), !visible);
+ } break;
}
@@ -930,8 +1018,10 @@ void ScriptEditor::_menu_option(int p_option) {
script_create_dialog->popup_centered(Size2(300, 300));
} break;
case FILE_SAVE: {
- if (!_test_script_times_on_disk())
+
+ if (_test_script_times_on_disk())
return;
+
editor->save_resource( current->get_edited_script() );
} break;
@@ -1138,12 +1228,14 @@ void ScriptEditor::_menu_option(int p_option) {
return;
int line = tx->cursor_get_line();
int next_line = line + 1;
+ int column = tx->cursor_get_column();
- if (line == tx->get_line_count() || next_line > tx->get_line_count())
- return;
+ if (line >= tx->get_line_count() - 1)
+ tx->set_line(line, tx->get_line(line) + "\n");
String line_clone = tx->get_line(line);
tx->insert_at(line_clone, next_line);
+ tx->cursor_set_column(column);
tx->update();
} break;
@@ -1265,16 +1357,6 @@ void ScriptEditor::_menu_option(int p_option) {
debugger->debug_continue();
} break;
- case DEBUG_SHOW: {
- if (debugger) {
- bool visible = debug_menu->get_popup()->is_item_checked( debug_menu->get_popup()->get_item_index(DEBUG_SHOW) );
- debug_menu->get_popup()->set_item_checked( debug_menu->get_popup()->get_item_index(DEBUG_SHOW), !visible);
- if (visible)
- debugger->hide();
- else
- debugger->show();
- }
- } break;
case HELP_CONTEXTUAL: {
String text = current->get_text_edit()->get_selection_text();
if (text == "")
@@ -1388,6 +1470,7 @@ void ScriptEditor::_notification(int p_what) {
if (p_what==NOTIFICATION_READY) {
get_tree()->connect("tree_changed",this,"_tree_changed");
+ editor->connect("request_help",this,"_request_help");
}
if (p_what==NOTIFICATION_EXIT_TREE) {
@@ -1401,6 +1484,7 @@ void ScriptEditor::_notification(int p_what) {
if (p_what==MainLoop::NOTIFICATION_WM_FOCUS_IN) {
_test_script_times_on_disk();
+ _update_modified_scripts_for_external_editor();
}
if (p_what==NOTIFICATION_PROCESS) {
@@ -1409,6 +1493,11 @@ void ScriptEditor::_notification(int p_what) {
}
+void ScriptEditor::edited_scene_changed() {
+
+ _update_modified_scripts_for_external_editor();
+
+}
static const Node * _find_node_with_script(const Node* p_node, const RefPtr & p_script) {
@@ -1692,7 +1781,7 @@ void ScriptEditor::_update_script_colors() {
if (h>hist_size) {
continue;
}
- float v = Math::ease((edit_pass-pass)/float_t(hist_size),0.4);
+ float v = Math::ease((edit_pass-pass)/float(hist_size),0.4);
script_list->set_item_custom_bg_color(i,hot_color.linear_interpolate(cold_color,v));
@@ -1835,6 +1924,7 @@ void ScriptEditor::edit(const Ref<Script>& p_script) {
ScriptTextEditor *ste = memnew( ScriptTextEditor );
ste->set_edited_script(p_script);
ste->get_text_edit()->set_tooltip_request_func(this,"_get_debug_tooltip",ste);
+ ste->get_text_edit()->set_auto_brace_completion(EditorSettings::get_singleton()->get("text_editor/auto_brace_complete"));
tab_container->add_child(ste);
_go_to_tab(tab_container->get_tab_count()-1);
@@ -1959,6 +2049,15 @@ void ScriptEditor::_editor_settings_changed() {
autosave_timer->stop();
}
+ for(int i=0;i<tab_container->get_child_count();i++) {
+
+ ScriptTextEditor *ste = tab_container->get_child(i)->cast_to<ScriptTextEditor>();
+ if (!ste)
+ continue;
+
+ ste->get_text_edit()->set_auto_brace_completion(EditorSettings::get_singleton()->get("text_editor/auto_brace_complete"));
+ }
+
}
void ScriptEditor::_autosave_scripts() {
@@ -2174,6 +2273,10 @@ void ScriptEditor::_history_back(){
void ScriptEditor::set_scene_root_script( Ref<Script> p_script ) {
bool open_dominant = EditorSettings::get_singleton()->get("text_editor/open_dominant_script_on_scene_change");
+
+ if (bool(EditorSettings::get_singleton()->get("external_editor/use_external_editor")))
+ return;
+
if (open_dominant && p_script.is_valid()) {
edit(p_script);
}
@@ -2205,6 +2308,7 @@ void ScriptEditor::_bind_methods() {
ObjectTypeDB::bind_method("_script_split_dragged",&ScriptEditor::_script_split_dragged);
ObjectTypeDB::bind_method("_help_class_open",&ScriptEditor::_help_class_open);
ObjectTypeDB::bind_method("_help_class_goto",&ScriptEditor::_help_class_goto);
+ ObjectTypeDB::bind_method("_request_help",&ScriptEditor::_help_class_open);
ObjectTypeDB::bind_method("_history_forward",&ScriptEditor::_history_forward);
ObjectTypeDB::bind_method("_history_back",&ScriptEditor::_history_back);
}
@@ -2219,18 +2323,15 @@ ScriptEditor::ScriptEditor(EditorNode *p_editor) {
menu_hb = memnew( HBoxContainer );
add_child(menu_hb);
- v_split = memnew( VSplitContainer );
- add_child(v_split);
- v_split->set_v_size_flags(SIZE_EXPAND_FILL);
script_split = memnew( HSplitContainer );
- v_split->add_child(script_split);
+ add_child(script_split);
script_split->set_v_size_flags(SIZE_EXPAND_FILL);
script_list = memnew( ItemList );
script_split->add_child(script_list);
- script_list->set_custom_minimum_size(Size2(70,0));
- script_split->set_split_offset(70);
+ script_list->set_custom_minimum_size(Size2(0,0));
+ script_split->set_split_offset(140);
tab_container = memnew( TabContainer );
tab_container->set_tabs_visible(false);
@@ -2314,7 +2415,8 @@ ScriptEditor::ScriptEditor(EditorNode *p_editor) {
debug_menu->get_popup()->add_item("Break",DEBUG_BREAK);
debug_menu->get_popup()->add_item("Continue",DEBUG_CONTINUE);
debug_menu->get_popup()->add_separator();
- debug_menu->get_popup()->add_check_item("Show Debugger",DEBUG_SHOW);
+ //debug_menu->get_popup()->add_check_item("Show Debugger",DEBUG_SHOW);
+ debug_menu->get_popup()->add_check_item("Keep Debugger Open",DEBUG_SHOW_KEEP_OPEN);
debug_menu->get_popup()->connect("item_pressed", this,"_menu_option");
debug_menu->get_popup()->set_item_disabled( debug_menu->get_popup()->get_item_index(DEBUG_NEXT), true);
@@ -2442,7 +2544,11 @@ ScriptEditor::ScriptEditor(EditorNode *p_editor) {
quick_open->connect("goto_line",this,"_goto_script_line2");
- v_split->add_child(debugger);
+
+ Button *db = EditorNode::get_singleton()->add_bottom_panel_item("Debugger",debugger);
+ debugger->set_tool_button(db);
+
+
debugger->connect("breaked",this,"_breaked");
autosave_timer = memnew( Timer );
@@ -2556,6 +2662,11 @@ void ScriptEditorPlugin::get_breakpoints(List<String> *p_breakpoints) {
return script_editor->get_breakpoints(p_breakpoints);
}
+void ScriptEditorPlugin::edited_scene_changed() {
+
+ script_editor->edited_scene_changed();
+}
+
ScriptEditorPlugin::ScriptEditorPlugin(EditorNode *p_node) {
editor=p_node;
@@ -2565,7 +2676,7 @@ ScriptEditorPlugin::ScriptEditorPlugin(EditorNode *p_node) {
script_editor->hide();
- EDITOR_DEF("text_editor/auto_reload_changed_scripts",false);
+ EDITOR_DEF("text_editor/auto_reload_scripts_on_external_change",true);
EDITOR_DEF("text_editor/open_dominant_script_on_scene_change",true);
EDITOR_DEF("external_editor/use_external_editor",false);
EDITOR_DEF("external_editor/exec_path","");
diff --git a/tools/editor/plugins/script_editor_plugin.h b/tools/editor/plugins/script_editor_plugin.h
index e755f570ef..c52da41a43 100644
--- a/tools/editor/plugins/script_editor_plugin.h
+++ b/tools/editor/plugins/script_editor_plugin.h
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -103,7 +103,7 @@ public:
void reload_text();
String get_name() ;
Ref<Texture> get_icon() ;
-
+ bool is_unsaved();
ScriptTextEditor();
};
@@ -151,7 +151,8 @@ class ScriptEditor : public VBoxContainer {
DEBUG_BREAK,
DEBUG_CONTINUE,
DEBUG_SHOW,
- HELP_CONTEXTUAL,
+ DEBUG_SHOW_KEEP_OPEN,
+ HELP_CONTEXTUAL,
WINDOW_MOVE_LEFT,
WINDOW_MOVE_RIGHT,
WINDOW_NEXT,
@@ -211,8 +212,6 @@ class ScriptEditor : public VBoxContainer {
Tree *disk_changed_list;
ConfirmationDialog *disk_changed;
- VSplitContainer *v_split;
-
bool restoring_layout;
String _get_debug_tooltip(const String&p_text,Node *_ste);
@@ -271,6 +270,7 @@ class ScriptEditor : public VBoxContainer {
void _go_to_tab(int p_idx);
void _update_history_pos(int p_new_pos);
void _update_script_colors();
+ void _update_modified_scripts_for_external_editor();
static ScriptEditor *script_editor;
@@ -302,6 +302,8 @@ public:
void set_scene_root_script( Ref<Script> p_script );
+ virtual void edited_scene_changed();
+
ScriptEditorDebugger *get_debugger() { return debugger; }
ScriptEditor(EditorNode *p_editor);
@@ -338,6 +340,7 @@ public:
virtual void get_breakpoints(List<String> *p_breakpoints);
+ virtual void edited_scene_changed();
ScriptEditorPlugin(EditorNode *p_node);
~ScriptEditorPlugin();
diff --git a/tools/editor/plugins/shader_editor_plugin.cpp b/tools/editor/plugins/shader_editor_plugin.cpp
index a182d57742..18d8f5efc0 100644
--- a/tools/editor/plugins/shader_editor_plugin.cpp
+++ b/tools/editor/plugins/shader_editor_plugin.cpp
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -172,11 +172,8 @@ ShaderTextEditor::ShaderTextEditor() {
void ShaderEditor::_menu_option(int p_option) {
- int selected = tab_container->get_current_tab();
- if (selected<0 || selected>=tab_container->get_child_count())
- return;
- ShaderTextEditor *current = tab_container->get_child(selected)->cast_to<ShaderTextEditor>();
+ ShaderTextEditor *current = tab_container->get_current_tab_control()->cast_to<ShaderTextEditor>();
if (!current)
return;
@@ -235,6 +232,11 @@ void ShaderEditor::_menu_option(int p_option) {
void ShaderEditor::_tab_changed(int p_which) {
+ ShaderTextEditor *shader_editor = tab_container->get_tab_control(p_which)->cast_to<ShaderTextEditor>();
+
+ if (shader_editor && is_inside_tree())
+ shader_editor->get_text_edit()->grab_focus();
+
ensure_select_current();
}
diff --git a/tools/editor/plugins/shader_editor_plugin.h b/tools/editor/plugins/shader_editor_plugin.h
index 4ead2ba94e..26d20b80b4 100644
--- a/tools/editor/plugins/shader_editor_plugin.h
+++ b/tools/editor/plugins/shader_editor_plugin.h
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/tools/editor/plugins/shader_graph_editor_plugin.cpp b/tools/editor/plugins/shader_graph_editor_plugin.cpp
index 3a7dc26466..36a8c79b84 100644
--- a/tools/editor/plugins/shader_graph_editor_plugin.cpp
+++ b/tools/editor/plugins/shader_graph_editor_plugin.cpp
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -2658,13 +2658,13 @@ void ShaderGraphEditor::edit(Ref<ShaderGraph> p_shader) {
void ShaderGraphEditor::_add_node(int p_type) {
ShaderGraph::ShaderType shader_type=ShaderGraph::ShaderType(tabs->get_current_tab());
-
graph_edits[shader_type]->add_node(p_type, next_location);
}
void ShaderGraphEditor::_popup_requested(const Vector2 &p_position)
{
- next_location = get_local_mouse_pos();
+ Vector2 scroll_ofs=graph_edits[tabs->get_current_tab()]->get_graph_edit()->get_scroll_ofs();
+ next_location = get_local_mouse_pos() + scroll_ofs;
popup->set_global_pos(p_position);
popup->set_size( Size2( 200, 0) );
popup->popup();
diff --git a/tools/editor/plugins/shader_graph_editor_plugin.h b/tools/editor/plugins/shader_graph_editor_plugin.h
index 39e9b29d45..0336696911 100644
--- a/tools/editor/plugins/shader_graph_editor_plugin.h
+++ b/tools/editor/plugins/shader_graph_editor_plugin.h
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -149,7 +149,7 @@ class ShaderGraphView : public Node {
void _end_node_move();
void _move_node(int p_id,const Vector2& p_to);
void _duplicate_nodes_request();
- void _duplicate_nodes(const Array &p_nodes);
+ void _duplicate_nodes(const Array &p_nodes);
void _delete_nodes_request();
diff --git a/tools/editor/plugins/spatial_editor_plugin.cpp b/tools/editor/plugins/spatial_editor_plugin.cpp
index 7816efe89f..236d69dfb3 100644
--- a/tools/editor/plugins/spatial_editor_plugin.cpp
+++ b/tools/editor/plugins/spatial_editor_plugin.cpp
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -39,6 +39,9 @@
#include "scene/resources/surface_tool.h"
#include "tools/editor/spatial_editor_gizmos.h"
#include "globals.h"
+#include "tools/editor/plugins/animation_player_editor_plugin.h"
+#include "tools/editor/animation_editor.h"
+
#define DISTANCE_DEFAULT 4
@@ -736,6 +739,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;i<selection_results.size();i++) {
+ Spatial *item=selection_results[i].item;
+ if (item!=scene && item->get_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<Texture> 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 +933,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<Texture> 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());
+ _list_select(b);
+ return;
- 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 +1008,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;
@@ -1591,6 +1620,8 @@ void SpatialEditorViewport::_sinput(const InputEvent &p_event) {
case InputEvent::KEY: {
const InputEventKey &k = p_event.key;
+ if (!k.pressed)
+ break;
switch(k.scancode) {
case KEY_S: {
@@ -1651,7 +1682,8 @@ void SpatialEditorViewport::_sinput(const InputEvent &p_event) {
} break;
case KEY_KP_5: {
- orthogonal = !orthogonal;
+
+ //orthogonal = !orthogonal;
_menu_option(orthogonal?VIEW_PERSPECTIVE:VIEW_ORTHOGONAL);
_update_name();
@@ -1662,7 +1694,7 @@ void SpatialEditorViewport::_sinput(const InputEvent &p_event) {
if (!get_selected_count() || _edit.mode!=TRANSFORM_NONE)
break;
- if (!editor->get_animation_editor()->has_keying()) {
+ if (!AnimationPlayerEditor::singleton->get_key_editor()->has_keying()) {
set_message("Keying is disabled (no key inserted).");
break;
}
@@ -2383,6 +2415,7 @@ SpatialEditorViewport::SpatialEditorViewport(SpatialEditor *p_spatial_editor, Ed
add_child(c);
c->set_area_as_parent_rect();
viewport = memnew( Viewport );
+ viewport->set_disable_input(true);
c->add_child(viewport);
surface = memnew( Control );
add_child(surface);
@@ -2600,6 +2633,13 @@ Dictionary SpatialEditor::get_state() const {
Dictionary d;
+ d["snap_enabled"]=snap_enabled;
+ d["translate_snap"]=get_translate_snap();
+ d["rotate_snap"]=get_rotate_snap();
+ d["scale_snap"]=get_scale_snap();
+
+ int local_coords_index=transform_menu->get_popup()->get_item_index(MENU_TRANSFORM_LOCAL_COORDS);
+ d["local_coords"]=transform_menu->get_popup()->is_item_checked( local_coords_index );
int vc=0;
if (view_menu->get_popup()->is_item_checked( view_menu->get_popup()->get_item_index(MENU_VIEW_USE_1_VIEWPORT) ))
@@ -2641,37 +2681,52 @@ void SpatialEditor::set_state(const Dictionary& p_state) {
Dictionary d = p_state;
- ERR_FAIL_COND(!d.has("viewport_mode"));
- ERR_FAIL_COND(!d.has("viewports"));
- ERR_FAIL_COND(!d.has("default_light"));
- ERR_FAIL_COND(!d.has("show_grid"));
- ERR_FAIL_COND(!d.has("show_origin"));
- ERR_FAIL_COND(!d.has("fov"));
- ERR_FAIL_COND(!d.has("znear"));
- ERR_FAIL_COND(!d.has("zfar"));
+ if (d.has("snap_enabled")) {
+ snap_enabled=d["snap_enabled"];
+ int snap_enabled_idx=transform_menu->get_popup()->get_item_index(MENU_TRANSFORM_USE_SNAP);
+ transform_menu->get_popup()->set_item_checked( snap_enabled_idx, snap_enabled );
+ }
- int vc = d["viewport_mode"];
+ if (d.has("translate_snap"))
+ snap_translate->set_text(d["translate_snap"]);
- if (vc==1)
- _menu_item_pressed(MENU_VIEW_USE_1_VIEWPORT);
- else if (vc==2)
- _menu_item_pressed(MENU_VIEW_USE_2_VIEWPORTS);
- else if (vc==3)
- _menu_item_pressed(MENU_VIEW_USE_3_VIEWPORTS);
- else if (vc==4)
- _menu_item_pressed(MENU_VIEW_USE_4_VIEWPORTS);
- else if (vc==5)
- _menu_item_pressed(MENU_VIEW_USE_2_VIEWPORTS_ALT);
- else if (vc==6)
- _menu_item_pressed(MENU_VIEW_USE_3_VIEWPORTS_ALT);
-
- Array vp = d["viewports"];
- ERR_FAIL_COND(vp.size()>4);
+ if (d.has("rotate_snap"))
+ snap_rotate->set_text(d["rotate_snap"]);
- for(int i=0;i<4;i++) {
- viewports[i]->set_state(vp[i]);
+ if (d.has("scale_snap"))
+ snap_scale->set_text(d["scale_snap"]);
+
+ if (d.has("local_coords")) {
+ int local_coords_idx=transform_menu->get_popup()->get_item_index(MENU_TRANSFORM_LOCAL_COORDS);
+ transform_menu->get_popup()->set_item_checked( local_coords_idx, d["local_coords"] );
+ update_transform_gizmo();
}
+ if (d.has("viewport_mode")) {
+ int vc = d["viewport_mode"];
+
+ if (vc==1)
+ _menu_item_pressed(MENU_VIEW_USE_1_VIEWPORT);
+ else if (vc==2)
+ _menu_item_pressed(MENU_VIEW_USE_2_VIEWPORTS);
+ else if (vc==3)
+ _menu_item_pressed(MENU_VIEW_USE_3_VIEWPORTS);
+ else if (vc==4)
+ _menu_item_pressed(MENU_VIEW_USE_4_VIEWPORTS);
+ else if (vc==5)
+ _menu_item_pressed(MENU_VIEW_USE_2_VIEWPORTS_ALT);
+ else if (vc==6)
+ _menu_item_pressed(MENU_VIEW_USE_3_VIEWPORTS_ALT);
+ }
+
+ if (d.has("viewports")) {
+ Array vp = d["viewports"];
+ ERR_FAIL_COND(vp.size()>4);
+
+ for(int i=0;i<4;i++) {
+ viewports[i]->set_state(vp[i]);
+ }
+ }
if (d.has("zfar"))
settings_zfar->set_val(float(d["zfar"]));
@@ -2841,13 +2896,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;i<TOOL_MAX;i++)
tool_button[i]->set_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();
@@ -3474,19 +3530,13 @@ void SpatialEditor::_instance_scene() {
undo_redo->commit_action();
#endif
}
-/*
-void SpatialEditor::_update_selection() {
-
-
-}
-*/
void SpatialEditor::_unhandled_key_input(InputEvent p_event) {
- if (!is_visible())
+ if (!is_visible() || get_viewport()->gui_has_modal_stack())
return;
- {
+ {
EditorNode *en = editor;
EditorPlugin *over_plugin = en->get_editor_plugin_over();
@@ -3530,6 +3580,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();
@@ -3684,7 +3735,6 @@ void SpatialEditor::_bind_methods() {
ObjectTypeDB::bind_method("_menu_item_pressed",&SpatialEditor::_menu_item_pressed);
ObjectTypeDB::bind_method("_xform_dialog_action",&SpatialEditor::_xform_dialog_action);
ObjectTypeDB::bind_method("_instance_scene",&SpatialEditor::_instance_scene);
-// ObjectTypeDB::bind_method("_update_selection",&SpatialEditor::_update_selection);
ObjectTypeDB::bind_method("_get_editor_data",&SpatialEditor::_get_editor_data);
ObjectTypeDB::bind_method("_request_gizmo",&SpatialEditor::_request_gizmo);
ObjectTypeDB::bind_method("_default_light_angle_input",&SpatialEditor::_default_light_angle_input);
@@ -3786,7 +3836,6 @@ SpatialEditor::SpatialEditor(EditorNode *p_editor) {
editor=p_editor;
editor_selection=editor->get_editor_selection();
editor_selection->add_editor_plugin(this);
- editor_selection->connect("selection_changed",this,"_update_selection");
snap_enabled=false;
tool_mode = TOOL_MODE_SELECT;
@@ -3807,7 +3856,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 +3888,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;
@@ -3962,6 +4023,7 @@ SpatialEditor::SpatialEditor(EditorNode *p_editor) {
settings_light_base->connect("input_event",this,"_default_light_angle_input");
settings_vbc->add_margin_child("Default Light Normal:",settings_light_base);
settings_light_vp = memnew( Viewport );
+ settings_light_vp->set_disable_input(true);
settings_light_vp->set_use_own_world(true);
settings_light_base->add_child(settings_light_vp);
diff --git a/tools/editor/plugins/spatial_editor_plugin.h b/tools/editor/plugins/spatial_editor_plugin.h
index ebd3f77fe7..b0e366b140 100644
--- a/tools/editor/plugins/spatial_editor_plugin.h
+++ b/tools/editor/plugins/spatial_editor_plugin.h
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -137,7 +137,6 @@ private:
Vector3 _get_screen_to_space(const Vector3& p_vector3);
void _select_region();
- void _update_selection();
bool _gizmo_select(const Vector2& p_screenpos,bool p_hilite_only=false);
float get_znear() const;
@@ -239,6 +238,7 @@ private:
void _finish_gizmo_instances();
void _selection_result_pressed(int);
void _selection_menu_hide();
+ void _list_select(InputEventMouseButton b);
protected:
@@ -287,7 +287,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 +371,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 +395,7 @@ private:
};
- Button *tool_button[4];
+ Button *tool_button[TOOL_MAX];
Button *instance_button;
diff --git a/tools/editor/plugins/sprite_frames_editor_plugin.cpp b/tools/editor/plugins/sprite_frames_editor_plugin.cpp
index e90087efda..af73828b61 100644
--- a/tools/editor/plugins/sprite_frames_editor_plugin.cpp
+++ b/tools/editor/plugins/sprite_frames_editor_plugin.cpp
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -338,7 +338,6 @@ void SpriteFramesEditor::_update_library() {
TreeItem *ti = tree->create_item(root);
ti->set_cell_mode(0,TreeItem::CELL_MODE_STRING);
- ti->set_editable(0,true);
ti->set_selectable(0,true);
if (frames->get_frame(i).is_null()) {
@@ -346,7 +345,7 @@ void SpriteFramesEditor::_update_library() {
ti->set_text(0,"Frame "+itos(i)+" (empty)");
} else {
- ti->set_text(0,"Frame "+itos(i));
+ ti->set_text(0,"Frame "+itos(i)+" ("+frames->get_frame(i)->get_name()+")");
ti->set_icon(0,frames->get_frame(i));
}
if (frames->get_frame(i).is_valid())
@@ -486,11 +485,15 @@ bool SpriteFramesEditorPlugin::handles(Object *p_object) const {
void SpriteFramesEditorPlugin::make_visible(bool p_visible) {
if (p_visible) {
- frames_editor->show();
+ button->show();
+ editor->make_bottom_panel_item_visible(frames_editor);
// frames_editor->set_process(true);
} else {
- frames_editor->hide();
+ button->hide();
+ if (frames_editor->is_visible())
+ editor->hide_bottom_panel();
+
// frames_editor->set_process(false);
}
@@ -500,11 +503,9 @@ SpriteFramesEditorPlugin::SpriteFramesEditorPlugin(EditorNode *p_node) {
editor=p_node;
frames_editor = memnew( SpriteFramesEditor );
- editor->get_viewport()->add_child(frames_editor);
- frames_editor->set_area_as_parent_rect();
-// frames_editor->set_anchor( MARGIN_TOP, Control::ANCHOR_END);
-// frames_editor->set_margin( MARGIN_TOP, 120 );
- frames_editor->hide();
+ frames_editor->set_custom_minimum_size(Size2(0,300));
+ button=editor->add_bottom_panel_item("SpriteFrames",frames_editor);
+ button->hide();
diff --git a/tools/editor/plugins/sprite_frames_editor_plugin.h b/tools/editor/plugins/sprite_frames_editor_plugin.h
index 969d7b1ce3..5d0a6cb035 100644
--- a/tools/editor/plugins/sprite_frames_editor_plugin.h
+++ b/tools/editor/plugins/sprite_frames_editor_plugin.h
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -94,6 +94,7 @@ class SpriteFramesEditorPlugin : public EditorPlugin {
SpriteFramesEditor *frames_editor;
EditorNode *editor;
+ Button *button;
public:
diff --git a/tools/editor/plugins/sprite_region_editor_plugin.cpp b/tools/editor/plugins/sprite_region_editor_plugin.cpp
index 35c53cf562..8dfa8a60a6 100644
--- a/tools/editor/plugins/sprite_region_editor_plugin.cpp
+++ b/tools/editor/plugins/sprite_region_editor_plugin.cpp
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
/* */
/* Author: Mariano Suligoy */
/* */
@@ -367,7 +367,7 @@ void SpriteRegionEditor::edit(Node *p_sprite)
{
if (p_sprite) {
node=p_sprite->cast_to<Sprite>();
- node->connect("exit_tree",this,"_node_removed",varray(),CONNECT_ONESHOT);
+ node->connect("exit_tree",this,"_node_removed",varray(p_sprite),CONNECT_ONESHOT);
} else {
if (node)
node->disconnect("exit_tree",this,"_node_removed");
@@ -411,6 +411,7 @@ SpriteRegionEditor::SpriteRegionEditor(EditorNode* p_editor)
snap_step=Vector2(10,10);
use_snap=false;
snap_show_grid=false;
+ drag=false;
add_child( memnew( VSeparator ));
edit_node = memnew( ToolButton );
@@ -449,7 +450,7 @@ SpriteRegionEditor::SpriteRegionEditor(EditorNode* p_editor)
hb_tools->add_child( memnew( VSeparator ));
hb_tools->add_child( memnew( Label("Grid Offset:") ) );
- SpinBox *sb_off_x = memnew( SpinBox );
+ sb_off_x = memnew( SpinBox );
sb_off_x->set_min(-256);
sb_off_x->set_max(256);
sb_off_x->set_step(1);
@@ -458,7 +459,7 @@ SpriteRegionEditor::SpriteRegionEditor(EditorNode* p_editor)
sb_off_x->connect("value_changed", this, "_set_snap_off_x");
hb_tools->add_child(sb_off_x);
- SpinBox *sb_off_y = memnew( SpinBox );
+ sb_off_y = memnew( SpinBox );
sb_off_y->set_min(-256);
sb_off_y->set_max(256);
sb_off_y->set_step(1);
@@ -470,7 +471,7 @@ SpriteRegionEditor::SpriteRegionEditor(EditorNode* p_editor)
hb_tools->add_child( memnew( VSeparator ));
hb_tools->add_child( memnew( Label("Grid Step:") ) );
- SpinBox *sb_step_x = memnew( SpinBox );
+ sb_step_x = memnew( SpinBox );
sb_step_x->set_min(-256);
sb_step_x->set_max(256);
sb_step_x->set_step(1);
@@ -479,7 +480,7 @@ SpriteRegionEditor::SpriteRegionEditor(EditorNode* p_editor)
sb_step_x->connect("value_changed", this, "_set_snap_step_x");
hb_tools->add_child(sb_step_x);
- SpinBox *sb_step_y = memnew( SpinBox );
+ sb_step_y = memnew( SpinBox );
sb_step_y->set_min(-256);
sb_step_y->set_max(256);
sb_step_y->set_step(1);
@@ -488,8 +489,6 @@ SpriteRegionEditor::SpriteRegionEditor(EditorNode* p_editor)
sb_step_y->connect("value_changed", this, "_set_snap_step_y");
hb_tools->add_child(sb_step_y);
-// MARIANOGNU::TODO: Add more tools?
-
HBoxContainer *main_hb = memnew( HBoxContainer );
main_vb->add_child(main_hb);
edit_draw = memnew( Control );
@@ -554,6 +553,50 @@ void SpriteRegionEditorPlugin::make_visible(bool p_visible)
}
}
+
+Dictionary SpriteRegionEditorPlugin::get_state() const {
+
+ Dictionary state;
+ state["zoom"]=region_editor->zoom->get_val();
+ state["snap_offset"]=region_editor->snap_offset;
+ state["snap_step"]=region_editor->snap_step;
+ state["use_snap"]=region_editor->use_snap;
+ state["snap_show_grid"]=region_editor->snap_show_grid;
+ return state;
+}
+
+void SpriteRegionEditorPlugin::set_state(const Dictionary& p_state){
+
+ Dictionary state=p_state;
+ if (state.has("zoom")) {
+ region_editor->zoom->set_val(p_state["zoom"]);
+ }
+
+ if (state.has("snap_step")) {
+ Vector2 s = state["snap_step"];
+ region_editor->sb_step_x->set_val(s.x);
+ region_editor->sb_step_y->set_val(s.y);
+ region_editor->snap_step = s;
+ }
+
+ if (state.has("snap_offset")) {
+ Vector2 ofs = state["snap_offset"];
+ region_editor->sb_off_x->set_val(ofs.x);
+ region_editor->sb_off_y->set_val(ofs.y);
+ region_editor->snap_offset = ofs;
+ }
+
+ if (state.has("use_snap")) {
+ region_editor->use_snap=state["use_snap"];
+ region_editor->b_snap_enable->set_pressed(state["use_snap"]);
+ }
+
+ if (state.has("snap_show_grid")) {
+ region_editor->snap_show_grid=state["snap_show_grid"];
+ region_editor->b_snap_grid->set_pressed(state["snap_show_grid"]);
+ }
+}
+
SpriteRegionEditorPlugin::SpriteRegionEditorPlugin(EditorNode *p_node)
{
editor = p_node;
diff --git a/tools/editor/plugins/sprite_region_editor_plugin.h b/tools/editor/plugins/sprite_region_editor_plugin.h
index cf69395f40..47cb210863 100644
--- a/tools/editor/plugins/sprite_region_editor_plugin.h
+++ b/tools/editor/plugins/sprite_region_editor_plugin.h
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
/* */
/* Author: Mariano Suligoy */
/* */
@@ -41,6 +41,8 @@ class SpriteRegionEditor : public HBoxContainer {
OBJ_TYPE(SpriteRegionEditor, HBoxContainer );
+ friend class SpriteRegionEditorPlugin;
+
ToolButton *edit_node;
// Button *use_region;
ToolButton *b_snap_enable;
@@ -48,6 +50,10 @@ class SpriteRegionEditor : public HBoxContainer {
TextureFrame *icon_zoom;
HSlider *zoom;
SpinBox *zoom_value;
+ SpinBox *sb_step_y;
+ SpinBox *sb_step_x;
+ SpinBox *sb_off_y;
+ SpinBox *sb_off_x;
Control *edit_draw;
VScrollBar *vscroll;
@@ -113,11 +119,13 @@ class SpriteRegionEditorPlugin : public EditorPlugin
EditorNode *editor;
public:
- virtual String get_name() const { return "Sprite"; }
+ virtual String get_name() const { return "SpriteRegion"; }
bool has_main_screen() const { return false; }
virtual void edit(Object *p_node);
virtual bool handles(Object *p_node) const;
virtual void make_visible(bool p_visible);
+ void set_state(const Dictionary &p_state);
+ Dictionary get_state() const;
SpriteRegionEditorPlugin(EditorNode *p_node);
};
diff --git a/tools/editor/plugins/stream_editor_plugin.cpp b/tools/editor/plugins/stream_editor_plugin.cpp
index 81db7f2846..d896784074 100644
--- a/tools/editor/plugins/stream_editor_plugin.cpp
+++ b/tools/editor/plugins/stream_editor_plugin.cpp
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/tools/editor/plugins/stream_editor_plugin.h b/tools/editor/plugins/stream_editor_plugin.h
index 7378bfad0c..5730612d61 100644
--- a/tools/editor/plugins/stream_editor_plugin.h
+++ b/tools/editor/plugins/stream_editor_plugin.h
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/tools/editor/plugins/style_box_editor_plugin.cpp b/tools/editor/plugins/style_box_editor_plugin.cpp
index 898c69e1e0..3d7cf4135d 100644
--- a/tools/editor/plugins/style_box_editor_plugin.cpp
+++ b/tools/editor/plugins/style_box_editor_plugin.cpp
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -90,19 +90,24 @@ bool StyleBoxEditorPlugin::handles(Object *p_node) const{
void StyleBoxEditorPlugin::make_visible(bool p_visible){
- if (p_visible)
- stylebox_editor->show();
- else
- stylebox_editor->hide();
+ if (p_visible) {
+ button->show();
+
+ } else {
+ if (stylebox_editor->is_visible())
+ EditorNode::get_singleton()->hide_bottom_panel();
+ button->hide();
+ }
}
StyleBoxEditorPlugin::StyleBoxEditorPlugin(EditorNode *p_node) {
stylebox_editor = memnew( StyleBoxEditor );
+ stylebox_editor->set_custom_minimum_size(Size2(0,250));
- p_node->get_viewport()->add_child(stylebox_editor);
- stylebox_editor->set_area_as_parent_rect();
- stylebox_editor->hide();
+ //p_node->get_viewport()->add_child(stylebox_editor);
+ button = p_node->add_bottom_panel_item("StyleBox",stylebox_editor);
+ button->hide();
}
diff --git a/tools/editor/plugins/style_box_editor_plugin.h b/tools/editor/plugins/style_box_editor_plugin.h
index 00b0871572..737f830bbb 100644
--- a/tools/editor/plugins/style_box_editor_plugin.h
+++ b/tools/editor/plugins/style_box_editor_plugin.h
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -65,6 +65,7 @@ class StyleBoxEditorPlugin : public EditorPlugin {
StyleBoxEditor *stylebox_editor;
EditorNode *editor;
+ Button *button;
public:
diff --git a/tools/editor/plugins/theme_editor_plugin.cpp b/tools/editor/plugins/theme_editor_plugin.cpp
index 63ba57bfc0..ef7b3b17c3 100644
--- a/tools/editor/plugins/theme_editor_plugin.cpp
+++ b/tools/editor/plugins/theme_editor_plugin.cpp
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -831,21 +831,26 @@ bool ThemeEditorPlugin::handles(Object *p_node) const{
void ThemeEditorPlugin::make_visible(bool p_visible){
if (p_visible) {
- theme_editor->show();
theme_editor->set_process(true);
+ button->show();
} else {
- theme_editor->hide();
theme_editor->set_process(false);
+ if (theme_editor->is_visible())
+ EditorNode::get_singleton()->hide_bottom_panel();
+ button->hide();
}
}
ThemeEditorPlugin::ThemeEditorPlugin(EditorNode *p_node) {
+ editor=p_node;
theme_editor = memnew( ThemeEditor );
+ theme_editor->set_custom_minimum_size(Size2(0,500));
+
+// p_node->get_viewport()->add_child(theme_editor);
+ button=EditorNode::get_singleton()->add_bottom_panel_item("Theme",theme_editor);
+ button->hide();
- p_node->get_viewport()->add_child(theme_editor);
- theme_editor->set_area_as_parent_rect();
- theme_editor->hide();
}
diff --git a/tools/editor/plugins/theme_editor_plugin.h b/tools/editor/plugins/theme_editor_plugin.h
index 40c7ad8186..52c4aed839 100644
--- a/tools/editor/plugins/theme_editor_plugin.h
+++ b/tools/editor/plugins/theme_editor_plugin.h
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -102,6 +102,7 @@ class ThemeEditorPlugin : public EditorPlugin {
ThemeEditor *theme_editor;
EditorNode *editor;
+ Button *button;
public:
diff --git a/tools/editor/plugins/tile_map_editor_plugin.cpp b/tools/editor/plugins/tile_map_editor_plugin.cpp
index 66c7a39096..acacd37f66 100644
--- a/tools/editor/plugins/tile_map_editor_plugin.cpp
+++ b/tools/editor/plugins/tile_map_editor_plugin.cpp
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -218,7 +218,8 @@ struct _TileMapEditorCopyData {
bool TileMapEditor::forward_input_event(const InputEvent& p_event) {
- if (!node || !node->get_tileset().is_valid())
+
+ if (!node || !node->get_tileset().is_valid() || !node->is_visible())
return false;
Matrix32 xform = CanvasItemEditor::get_singleton()->get_canvas_transform() * node->get_global_transform();
@@ -532,6 +533,8 @@ void TileMapEditor::_canvas_draw() {
if (node->get_half_offset()!=TileMap::HALF_OFFSET_X) {
+ int max_lines=2000; //avoid crash if size too smal
+
for(int i=(si.pos.x)-1;i<=(si.pos.x+si.size.x);i++) {
Vector2 from = xform.xform(node->map_to_world(Vector2(i,si.pos.y)));
@@ -539,10 +542,12 @@ void TileMapEditor::_canvas_draw() {
Color col=i==0?Color(1,0.8,0.2,0.5):Color(1,0.3,0.1,0.2);
canvas_item_editor->draw_line(from,to,col,1);
-
+ if (max_lines--==0)
+ break;
}
} else {
+ int max_lines=10000; //avoid crash if size too smal
for(int i=(si.pos.x)-1;i<=(si.pos.x+si.size.x);i++) {
@@ -557,11 +562,17 @@ void TileMapEditor::_canvas_draw() {
Vector2 to = xform.xform(node->map_to_world(Vector2(i,j+1),true)+ofs);
Color col=i==0?Color(1,0.8,0.2,0.5):Color(1,0.3,0.1,0.2);
canvas_item_editor->draw_line(from,to,col,1);
+
+ if (max_lines--==0)
+ break;
+
}
}
}
+ int max_lines=10000; //avoid crash if size too smal
+
if (node->get_half_offset()!=TileMap::HALF_OFFSET_Y) {
for(int i=(si.pos.y)-1;i<=(si.pos.y+si.size.y);i++) {
@@ -572,6 +583,9 @@ void TileMapEditor::_canvas_draw() {
Color col=i==0?Color(1,0.8,0.2,0.5):Color(1,0.3,0.1,0.2);
canvas_item_editor->draw_line(from,to,col,1);
+ if (max_lines--==0)
+ break;
+
}
} else {
@@ -589,6 +603,10 @@ void TileMapEditor::_canvas_draw() {
Vector2 to = xform.xform(node->map_to_world(Vector2(j+1,i),true)+ofs);
Color col=i==0?Color(1,0.8,0.2,0.5):Color(1,0.3,0.1,0.2);
canvas_item_editor->draw_line(from,to,col,1);
+
+ if (max_lines--==0)
+ break;
+
}
}
@@ -675,12 +693,9 @@ void TileMapEditor::_canvas_draw() {
Ref<Texture> t = ts->tile_get_texture(st);
if (t.is_valid()) {
Vector2 from = node->map_to_world(over_tile)+node->get_cell_draw_offset();
+ Vector2 tile_ofs = ts->tile_get_texture_offset(st);
Rect2 r = ts->tile_get_region(st);
Size2 sc = xform.get_scale();
- if (mirror_x->is_pressed())
- sc.x*=-1.0;
- if (mirror_y->is_pressed())
- sc.y*=-1.0;
Rect2 rect;
if (r==Rect2()) {
@@ -690,23 +705,47 @@ void TileMapEditor::_canvas_draw() {
rect=Rect2(from,r.get_size());
}
+ bool transp = transpose->is_pressed();
+ bool flip_h = mirror_x->is_pressed();
+ bool flip_v = mirror_y->is_pressed();
+
+ if (rect.size.y > rect.size.x) {
+ if ((flip_h && (flip_v || transp)) || (flip_v && !transp))
+ tile_ofs.y += rect.size.y - rect.size.x;
+ } else if (rect.size.y < rect.size.x) {
+ if ((flip_v && (flip_h || transp)) || (flip_h && !transp))
+ tile_ofs.x += rect.size.x - rect.size.y;
+ }
+
+ if (transp) {
+ SWAP(tile_ofs.x, tile_ofs.y);
+ }
+
+ if (flip_h) {
+ sc.x*=-1.0;
+ tile_ofs.x*=-1.0;
+ }
+ if (flip_v) {
+ sc.y*=-1.0;
+ tile_ofs.y*=-1.0;
+ }
if (node->get_tile_origin()==TileMap::TILE_ORIGIN_TOP_LEFT) {
- rect.pos+=ts->tile_get_texture_offset(st);
+ rect.pos+=tile_ofs;
} else if (node->get_tile_origin()==TileMap::TILE_ORIGIN_CENTER) {
rect.pos+=node->get_cell_size()/2;
Vector2 s = r.size;
- Vector2 center = (s/2) - ts->tile_get_texture_offset(st);
+ Vector2 center = (s/2) - tile_ofs;
- if (mirror_x->is_pressed())
+ if (flip_h)
rect.pos.x-=s.x-center.x;
else
rect.pos.x-=center.x;
- if (mirror_y->is_pressed())
+ if (flip_v)
rect.pos.y-=s.y-center.y;
else
rect.pos.y-=center.y;
@@ -717,10 +756,10 @@ void TileMapEditor::_canvas_draw() {
if (r==Rect2()) {
- canvas_item_editor->draw_texture_rect(t,rect,false,Color(1,1,1,0.5),transpose->is_pressed());
+ canvas_item_editor->draw_texture_rect(t,rect,false,Color(1,1,1,0.5),transp);
} else {
- canvas_item_editor->draw_texture_rect_region(t,rect,r,Color(1,1,1,0.5),transpose->is_pressed());
+ canvas_item_editor->draw_texture_rect_region(t,rect,r,Color(1,1,1,0.5),transp);
}
}
}
diff --git a/tools/editor/plugins/tile_map_editor_plugin.h b/tools/editor/plugins/tile_map_editor_plugin.h
index 74d1573d0f..3cbf5ff68d 100644
--- a/tools/editor/plugins/tile_map_editor_plugin.h
+++ b/tools/editor/plugins/tile_map_editor_plugin.h
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/tools/editor/plugins/tile_set_editor_plugin.cpp b/tools/editor/plugins/tile_set_editor_plugin.cpp
index 09115472a8..06046b226a 100644
--- a/tools/editor/plugins/tile_set_editor_plugin.cpp
+++ b/tools/editor/plugins/tile_set_editor_plugin.cpp
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -145,10 +145,6 @@ void TileSetEditor::_menu_confirm() {
switch(option) {
- case MENU_OPTION_REMOVE_ITEM: {
-
- tileset->remove_tile(to_erase);
- } break;
case MENU_OPTION_MERGE_FROM_SCENE:
case MENU_OPTION_CREATE_FROM_SCENE: {
@@ -165,6 +161,27 @@ void TileSetEditor::_menu_confirm() {
}
}
+void TileSetEditor::_name_dialog_confirm(const String& name) {
+
+ switch (option) {
+
+ case MENU_OPTION_REMOVE_ITEM: {
+
+ int id=tileset->find_tile_by_name(name);
+
+ if (id<0 && name.is_valid_integer())
+ id=name.to_int();
+
+ if (tileset->has_tile(id)) {
+ tileset->remove_tile(id);
+ } else {
+ err_dialog->set_text("Could not find tile: " + name);
+ err_dialog->popup_centered(Size2(300, 60));
+ }
+ } break;
+ }
+}
+
void TileSetEditor::_menu_cbk(int p_option) {
option=p_option;
@@ -176,13 +193,9 @@ void TileSetEditor::_menu_cbk(int p_option) {
} break;
case MENU_OPTION_REMOVE_ITEM: {
- String p = editor->get_property_editor()->get_selected_path();
- if (p.begins_with("/TileSet") && p.get_slice_count("/")>=2) {
-
- to_erase = p.get_slice("/",2).to_int();
- cd->set_text("Remove Item "+itos(to_erase)+"?");
- cd->popup_centered(Size2(300,60));
- }
+ nd->set_title("Remove Item");
+ nd->set_text("Item name or ID:");
+ nd->popup_centered(Size2(300, 95));
} break;
case MENU_OPTION_CREATE_FROM_SCENE: {
@@ -210,6 +223,7 @@ void TileSetEditor::_bind_methods() {
ObjectTypeDB::bind_method("_menu_cbk",&TileSetEditor::_menu_cbk);
ObjectTypeDB::bind_method("_menu_confirm",&TileSetEditor::_menu_confirm);
+ ObjectTypeDB::bind_method("_name_dialog_confirm",&TileSetEditor::_name_dialog_confirm);
}
TileSetEditor::TileSetEditor(EditorNode *p_editor) {
@@ -222,7 +236,7 @@ TileSetEditor::TileSetEditor(EditorNode *p_editor) {
options->set_pos(Point2(1,1));
options->set_text("Theme");
options->get_popup()->add_item("Add Item",MENU_OPTION_ADD_ITEM);
- options->get_popup()->add_item("Remove Selected Item",MENU_OPTION_REMOVE_ITEM);
+ options->get_popup()->add_item("Remove Item",MENU_OPTION_REMOVE_ITEM);
options->get_popup()->add_separator();
options->get_popup()->add_item("Create from Scene",MENU_OPTION_CREATE_FROM_SCENE);
options->get_popup()->add_item("Merge from Scene",MENU_OPTION_MERGE_FROM_SCENE);
@@ -232,6 +246,15 @@ TileSetEditor::TileSetEditor(EditorNode *p_editor) {
add_child(cd);
cd->get_ok()->connect("pressed", this,"_menu_confirm");
+ nd = memnew(EditorNameDialog);
+ add_child(nd);
+ nd->set_hide_on_ok(true);
+ nd->get_line_edit()->set_margin(MARGIN_TOP,28);
+ nd->connect("name_confirmed", this,"_name_dialog_confirm");
+
+ err_dialog = memnew(AcceptDialog);
+ add_child(err_dialog);
+ err_dialog->set_title("Error");
}
void TileSetEditorPlugin::edit(Object *p_node) {
diff --git a/tools/editor/plugins/tile_set_editor_plugin.h b/tools/editor/plugins/tile_set_editor_plugin.h
index df82df6993..3f47520e2a 100644
--- a/tools/editor/plugins/tile_set_editor_plugin.h
+++ b/tools/editor/plugins/tile_set_editor_plugin.h
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -33,6 +33,7 @@
#include "scene/resources/tile_set.h"
#include "tools/editor/editor_node.h"
+#include "tools/editor/editor_name_dialog.h"
class TileSetEditor : public Control {
@@ -44,7 +45,8 @@ class TileSetEditor : public Control {
EditorNode *editor;
MenuButton *menu;
ConfirmationDialog *cd;
- int to_erase;
+ EditorNameDialog *nd;
+ AcceptDialog *err_dialog;
enum {
@@ -56,7 +58,8 @@ class TileSetEditor : public Control {
int option;
void _menu_cbk(int p_option);
- void _menu_confirm();
+ void _menu_confirm();
+ void _name_dialog_confirm(const String& name);
static void _import_scene(Node *p_scene, Ref<TileSet> p_library, bool p_merge);
diff --git a/tools/editor/progress_dialog.cpp b/tools/editor/progress_dialog.cpp
index c8b87486c0..d072ce7f83 100644
--- a/tools/editor/progress_dialog.cpp
+++ b/tools/editor/progress_dialog.cpp
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -29,7 +29,7 @@
#include "progress_dialog.h"
#include "main/main.h"
#include "message_queue.h"
-
+#include "os/os.h"
void BackgroundProgress::_add_task(const String& p_task,const String& p_label, int p_steps) {
@@ -191,10 +191,16 @@ void ProgressDialog::add_task(const String& p_task,const String& p_label,int p_s
}
-void ProgressDialog::task_step(const String& p_task, const String& p_state, int p_step){
+void ProgressDialog::task_step(const String& p_task, const String& p_state, int p_step,bool p_force_redraw){
ERR_FAIL_COND(!tasks.has(p_task));
+ if (!p_force_redraw) {
+ uint64_t tus = OS::get_singleton()->get_ticks_usec();
+ if (tus-last_progress_tick < 50000) //50ms
+ return;
+ }
+
Task &t=tasks[p_task];
if (p_step<0)
t.progress->set_val(t.progress->get_val()+1);
@@ -202,6 +208,7 @@ void ProgressDialog::task_step(const String& p_task, const String& p_state, int
t.progress->set_val(p_step);
t.state->set_text(p_state);
+ last_progress_tick=OS::get_singleton()->get_ticks_usec();
Main::iteration(); // this will not work on a lot of platforms, so it's only meant for the editor
}
@@ -229,4 +236,5 @@ ProgressDialog::ProgressDialog() {
add_child(main);
main->set_area_as_parent_rect();
set_exclusive(true);
+ last_progress_tick=0;
}
diff --git a/tools/editor/progress_dialog.h b/tools/editor/progress_dialog.h
index 7f1cc4cb2d..539eaa8737 100644
--- a/tools/editor/progress_dialog.h
+++ b/tools/editor/progress_dialog.h
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -84,6 +84,7 @@ class ProgressDialog : public Popup {
Map<String,Task> tasks;
VBoxContainer *main;
+ uint64_t last_progress_tick;
void _popup();
protected:
@@ -92,7 +93,7 @@ protected:
public:
void add_task(const String& p_task,const String& p_label, int p_steps);
- void task_step(const String& p_task,const String& p_state, int p_step=-1);
+ void task_step(const String& p_task, const String& p_state, int p_step=-1, bool p_force_redraw=true);
void end_task(const String& p_task);
diff --git a/tools/editor/project_export.cpp b/tools/editor/project_export.cpp
index cd6dc06f75..7690d31e7b 100644
--- a/tools/editor/project_export.cpp
+++ b/tools/editor/project_export.cpp
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -258,6 +258,7 @@ void ProjectExportDialog::_sample_convert_edited(int what) {
EditorImportExport::get_singleton()->sample_set_action( EditorImportExport::SampleAction(sample_mode->get_selected()));
EditorImportExport::get_singleton()->sample_set_max_hz( sample_max_hz->get_val() );
EditorImportExport::get_singleton()->sample_set_trim( sample_trim->is_pressed() );
+ _save_export_cfg();
}
@@ -297,6 +298,7 @@ void ProjectExportDialog::_notification(int p_what) {
// _rescan();
_update_platform();
export_mode->select( EditorImportExport::get_singleton()->get_export_filter() );
+ convert_text_scenes->set_pressed( EditorImportExport::get_singleton()->get_convert_text_scenes() );
filters->set_text( EditorImportExport::get_singleton()->get_export_custom_filter() );
if (EditorImportExport::get_singleton()->get_export_filter()!=EditorImportExport::EXPORT_SELECTED)
tree_vb->hide();
@@ -420,6 +422,8 @@ void ProjectExportDialog::_export_mode_changed(int p_idx) {
else
tree_vb->show();
+ EditorImportExport::get_singleton()->set_convert_text_scenes( convert_text_scenes->is_pressed() );
+
_save_export_cfg();
}
@@ -468,20 +472,32 @@ void ProjectExportDialog::_export_action_pck(const String& p_file) {
ERR_PRINT("Invalid platform for export of PCK");
return;
}
- FileAccess *f = FileAccess::open(p_file,FileAccess::WRITE);
- if (!f) {
- error->set_text("Error exporting project PCK! Can't write");
- error->popup_centered_minsize();
- }
- ERR_FAIL_COND(!f);
- Error err = exporter->save_pack(f,false);
- memdelete(f);
+ if (p_file.ends_with(".pck")) {
+ FileAccess *f = FileAccess::open(p_file,FileAccess::WRITE);
+ if (!f) {
+ error->set_text("Error exporting project PCK! Can't write");
+ error->popup_centered_minsize();
+ }
+ ERR_FAIL_COND(!f);
- if (err!=OK) {
- error->set_text("Error exporting project!");
- error->popup_centered_minsize();
- return;
+ Error err = exporter->save_pack(f,false);
+ memdelete(f);
+
+ if (err!=OK) {
+ error->set_text("Error exporting project!");
+ error->popup_centered_minsize();
+ return;
+ }
+ } else if (p_file.ends_with(".zip")) {
+
+ Error err = exporter->save_zip(p_file,false);
+
+ if (err!=OK) {
+ error->set_text("Error exporting project!");
+ error->popup_centered_minsize();
+ return;
+ }
}
}
@@ -491,6 +507,18 @@ Error ProjectExportDialog::export_platform(const String& p_platform, const Strin
Ref<EditorExportPlatform> exporter = EditorImportExport::get_singleton()->get_export_platform(p_platform);
if (exporter.is_null()) {
ERR_PRINT("Invalid platform for export");
+
+ List<StringName> platforms;
+ EditorImportExport::get_singleton()->get_export_platforms(&platforms);
+ print_line("Valid export plaftorms are:");
+ for (List<StringName>::Element *E=platforms.front();E;E=E->next())
+ print_line(" \""+E->get()+"\"");
+
+ if (p_quit_after) {
+ OS::get_singleton()->set_exit_code(255);
+ get_tree()->quit();
+ }
+
return ERR_INVALID_PARAMETER;
}
Error err = exporter->export_project(p_path,p_debug);
@@ -1125,6 +1153,7 @@ ProjectExportDialog::ProjectExportDialog(EditorNode *p_editor) {
vb = memnew( VBoxContainer );
vb->set_name("Resources");
sections->add_child(vb);
+
export_mode = memnew( OptionButton );
export_mode->add_item("Export selected resources (including dependencies).");
export_mode->add_item("Export all resources in the project.");
@@ -1133,6 +1162,8 @@ ProjectExportDialog::ProjectExportDialog(EditorNode *p_editor) {
vb->add_margin_child("Export Mode:",export_mode);
+
+
tree_vb = memnew( VBoxContainer );
vb->add_child(tree_vb);
tree_vb->set_v_size_flags(SIZE_EXPAND_FILL);
@@ -1153,6 +1184,10 @@ ProjectExportDialog::ProjectExportDialog(EditorNode *p_editor) {
vb->add_margin_child("Filters to export non-resource files (Comma Separated, ie: *.json, *.txt):",filters);
filters->connect("text_changed",this,"_filters_edited");
+ convert_text_scenes = memnew( CheckButton );
+ convert_text_scenes->set_text("Convert text scenes to binary on export");
+ vb->add_child(convert_text_scenes);
+ convert_text_scenes->connect("toggled",this,"_export_mode_changed");
image_vb = memnew( VBoxContainer );
image_vb->set_name("Images");
@@ -1373,7 +1408,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";
@@ -1403,6 +1438,7 @@ ProjectExportDialog::ProjectExportDialog(EditorNode *p_editor) {
pck_export->set_title("Export Project PCK");
pck_export->connect("file_selected", this,"_export_action_pck");
pck_export->add_filter("*.pck ; Data Pack");
+ pck_export->add_filter("*.zip ; Zip");
add_child(pck_export);
button_export = add_button("Export..",!OS::get_singleton()->get_swap_ok_cancel(),"export_pck");
diff --git a/tools/editor/project_export.h b/tools/editor/project_export.h
index 2f824e5ff7..5a42a58e58 100644
--- a/tools/editor/project_export.h
+++ b/tools/editor/project_export.h
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -108,6 +108,7 @@ private:
PropertyEditor *platform_options;
OptionButton *export_mode;
+ CheckButton *convert_text_scenes;
VBoxContainer *tree_vb;
VBoxContainer *image_vb;
diff --git a/tools/editor/project_manager.cpp b/tools/editor/project_manager.cpp
index 04705017d2..589d9d3d99 100644
--- a/tools/editor/project_manager.cpp
+++ b/tools/editor/project_manager.cpp
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -348,6 +348,13 @@ struct ProjectItem {
_FORCE_INLINE_ bool operator ==(const ProjectItem& l) const { return project==l.project; }
};
+void ProjectManager::_notification(int p_what) {
+
+ if (p_what==NOTIFICATION_ENTER_TREE) {
+
+ get_tree()->set_editor_hint(true);
+ }
+}
void ProjectManager::_panel_draw(Node *p_hb) {
@@ -825,6 +832,19 @@ ProjectManager::ProjectManager() {
FileDialog::set_default_show_hidden_files(EditorSettings::get_singleton()->get("file_dialog/show_hidden_files"));
set_area_as_parent_rect();
+
+ Ref<Theme> theme = Ref<Theme>( memnew( Theme ) );
+ set_theme(theme);
+ editor_register_icons(theme);
+
+ String global_font = EditorSettings::get_singleton()->get("global/font");
+ if (global_font!="") {
+ Ref<Font> fnt = ResourceLoader::load(global_font);
+ if (fnt.is_valid()) {
+ theme->set_default_theme_font(fnt);
+ }
+ }
+
Panel *panel = memnew( Panel );
add_child(panel);
panel->set_area_as_parent_rect();
@@ -944,7 +964,7 @@ ProjectManager::ProjectManager() {
String cp;
cp.push_back(0xA9);
cp.push_back(0);
- l->set_text(cp+" 2008-2015 Juan Linietsky, Ariel Manzur.");
+ l->set_text(cp+" 2008-2016 Juan Linietsky, Ariel Manzur.");
l->set_align(Label::ALIGN_CENTER);
vb->add_child(l);
@@ -972,10 +992,6 @@ ProjectManager::ProjectManager() {
npdialog = memnew( NewProjectDialog );
add_child(npdialog);
- Ref<Theme> theme = memnew( Theme );
- editor_register_icons(theme);
- set_theme(theme);
-
npdialog->connect("project_created", this,"_load_recent_projects");
_load_recent_projects();
diff --git a/tools/editor/project_manager.h b/tools/editor/project_manager.h
index 1e6ea9c1c9..80c34690f8 100644
--- a/tools/editor/project_manager.h
+++ b/tools/editor/project_manager.h
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -85,6 +85,7 @@ class ProjectManager : public Control {
protected:
+ void _notification(int p_what);
static void _bind_methods();
public:
ProjectManager();
diff --git a/tools/editor/project_settings.cpp b/tools/editor/project_settings.cpp
index 2fd8b37753..6c5e18ec9a 100644
--- a/tools/editor/project_settings.cpp
+++ b/tools/editor/project_settings.cpp
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -33,6 +33,7 @@
#include "editor_node.h"
#include "scene/gui/margin_container.h"
#include "translation.h"
+#include "global_constants.h"
ProjectSettings *ProjectSettings::singleton=NULL;
@@ -106,6 +107,8 @@ void ProjectSettings::_action_persist_toggle() {
String name="input/"+ti->get_text(0);
bool prev = Globals::get_singleton()->is_persisting(name);
+ print_line("prev persist: "+itos(prev));
+ print_line("new persist: "+itos(ti->is_checked(0)));
if (prev==ti->is_checked(0))
return;
@@ -155,12 +158,14 @@ void ProjectSettings::_device_input_add() {
} break;
case InputEvent::JOYSTICK_MOTION: {
- ie.joy_motion.axis = device_index->get_selected();
+ ie.joy_motion.axis = device_index->get_selected()>>1;
+ ie.joy_motion.axis_value = device_index->get_selected()&1?1:-1;
+
for(int i=0;i<arr.size();i++) {
InputEvent aie=arr[i];
- if (aie.device == ie.device && aie.type==InputEvent::JOYSTICK_MOTION && aie.joy_motion.axis==ie.joy_motion.axis) {
+ if (aie.device == ie.device && aie.type==InputEvent::JOYSTICK_MOTION && aie.joy_motion.axis==ie.joy_motion.axis && aie.joy_motion.axis_value==ie.joy_motion.axis_value) {
return;
}
}
@@ -294,9 +299,10 @@ void ProjectSettings::_add_item(int p_item){
device_id->set_val(0);
device_index_label->set_text("Joy Button Axis:");
device_index->clear();
- for(int i=0;i<8;i++) {
+ for(int i=0;i<24;i++) {
+
- device_index->add_item("Axis "+itos(i));
+ device_index->add_item("Axis "+itos(i/2)+" "+(i&1?"+":"-"));
}
device_input->popup_centered(Size2(350,95));
@@ -338,6 +344,15 @@ void ProjectSettings::_action_button_pressed(Object* p_obj, int p_column,int p_i
add_at="input/"+ti->get_text(0);
} else if (p_id==2) {
+ //rename
+
+ add_at="input/"+ti->get_text(0);
+ rename_action->popup_centered();
+ rename_action->get_line_edit()->set_text(ti->get_text(0));
+ rename_action->get_line_edit()->set_cursor_pos(ti->get_text(0).length());
+ rename_action->get_line_edit()->select_all();
+
+ } else if (p_id==3) {
//remove
if (ti->get_parent()==input_editor->get_root()) {
@@ -415,13 +430,16 @@ void ProjectSettings::_update_actions() {
continue;
TreeItem *item=input_editor->create_item(root);
- item->set_cell_mode(0,TreeItem::CELL_MODE_CHECK);
+ //item->set_cell_mode(0,TreeItem::CELL_MODE_CHECK);
item->set_text(0,name);
item->add_button(0,get_icon("Add","EditorIcons"),1);
- item->add_button(0,get_icon("Remove","EditorIcons"),2);
+ if (!Globals::get_singleton()->get_input_presets().find(pi.name)) {
+ item->add_button(0,get_icon("Rename","EditorIcons"),2);
+ item->add_button(0,get_icon("Remove","EditorIcons"),3);
+ }
item->set_custom_bg_color(0,get_color("prop_subsection","Editor"));
item->set_editable(0,true);
- item->set_checked(0,pi.usage&PROPERTY_USAGE_CHECKED);
+ //item->set_checked(0,pi.usage&PROPERTY_USAGE_CHECKED);
@@ -481,12 +499,12 @@ void ProjectSettings::_update_actions() {
} break;
case InputEvent::JOYSTICK_MOTION: {
- String str = "Device "+itos(ie.device)+", Axis "+itos(ie.joy_motion.axis)+".";
+ String str = "Device "+itos(ie.device)+", Axis "+itos(ie.joy_motion.axis)+" "+(ie.joy_motion.axis_value<0?"-.":"+.");
action->set_text(0,str);
action->set_icon(0,get_icon("JoyAxis","EditorIcons"));
} break;
}
- action->add_button(0,get_icon("Remove","EditorIcons"),2);
+ action->add_button(0,get_icon("Remove","EditorIcons"),3);
action->set_metadata(0,i);
}
}
@@ -507,12 +525,12 @@ void ProjectSettings::popup_project_settings() {
void ProjectSettings::_item_selected() {
- TreeItem *ti = globals_editor->get_scene_tree()->get_selected();
+ TreeItem *ti = globals_editor->get_property_editor()->get_scene_tree()->get_selected();
if (!ti)
return;
if (!ti->get_parent())
return;
- category->set_text(ti->get_parent()->get_text(0));
+ category->set_text(globals_editor->get_current_section());
property->set_text(ti->get_text(0));
popup_platform->set_disabled(false);
@@ -551,7 +569,8 @@ void ProjectSettings::_item_add() {
String name = catname+"/"+propname;
Globals::get_singleton()->set(name,value);
- globals_editor->update_tree();
+ globals_editor->edit(NULL);
+ globals_editor->edit(Globals::get_singleton());
}
void ProjectSettings::_item_del() {
@@ -563,7 +582,7 @@ void ProjectSettings::_item_del() {
String name = catname+"/"+propname;
Globals::get_singleton()->set(name,Variant());
- globals_editor->update_tree();
+ globals_editor->get_property_editor()->update_tree();
}
@@ -616,14 +635,57 @@ void ProjectSettings::_action_add() {
}
+void ProjectSettings::_action_rename(const String &p_name) {
+
+
+ if (p_name.find("/")!=-1 || p_name.find(":")!=-1 || p_name=="") {
+ message->set_text("Invalid Action (Anything goes but / or :).");
+ message->popup_centered(Size2(300,100));
+ return;
+ }
+
+ String new_name = "input/"+p_name;
+
+ if (Globals::get_singleton()->has(new_name)) {
+ message->set_text("Action '"+p_name+"' already exists!.");
+ message->popup_centered(Size2(300,100));
+ return;
+ }
+
+ int order = Globals::get_singleton()->get_order(add_at);
+ Array va = Globals::get_singleton()->get(add_at);
+ bool persisting = Globals::get_singleton()->is_persisting(add_at);
+
+ undo_redo->create_action("Rename Input Action Event");
+ undo_redo->add_do_method(Globals::get_singleton(),"clear",add_at);
+ undo_redo->add_do_method(Globals::get_singleton(),"set",new_name,va);
+ undo_redo->add_do_method(Globals::get_singleton(),"set_persisting",new_name,persisting);
+ undo_redo->add_do_method(Globals::get_singleton(),"set_order",new_name,order);
+ undo_redo->add_undo_method(Globals::get_singleton(),"clear",new_name);
+ undo_redo->add_undo_method(Globals::get_singleton(),"set",add_at,va);
+ undo_redo->add_undo_method(Globals::get_singleton(),"set_persisting",add_at,persisting);
+ undo_redo->add_undo_method(Globals::get_singleton(),"set_order",add_at,order);
+ undo_redo->add_do_method(this,"_update_actions");
+ undo_redo->add_undo_method(this,"_update_actions");
+ undo_redo->add_do_method(this,"_settings_changed");
+ undo_redo->add_undo_method(this,"_settings_changed");
+ undo_redo->commit_action();
+
+ rename_action->hide();
+}
+
void ProjectSettings::_item_checked(const String& p_item, bool p_check) {
undo_redo->create_action("Toggle Persisting");
- undo_redo->add_do_method(Globals::get_singleton(),"set_persisting",p_item,p_check);
- undo_redo->add_undo_method(Globals::get_singleton(),"set_persisting",p_item,!p_check);
+ String full_item = globals_editor->get_full_item_path(p_item);
+
+ undo_redo->add_do_method(Globals::get_singleton(),"set_persisting",full_item,p_check);
+ undo_redo->add_undo_method(Globals::get_singleton(),"set_persisting",full_item,!p_check);
undo_redo->add_do_method(this,"_settings_changed");
undo_redo->add_undo_method(this,"_settings_changed");
+ undo_redo->add_do_method(globals_editor->get_property_editor(),"update_tree");
+ undo_redo->add_undo_method(globals_editor->get_property_editor(),"update_tree");
undo_redo->commit_action();
}
@@ -640,11 +702,22 @@ void ProjectSettings::_save() {
void ProjectSettings::_settings_prop_edited(const String& p_name) {
- if (!Globals::get_singleton()->is_persisting(p_name)) {
+ String full_item = globals_editor->get_full_item_path(p_name);
+
+ if (!Globals::get_singleton()->is_persisting(full_item)) {
+ Globals::get_singleton()->set_persisting(full_item,true);
+
+ {
+ //small usability workaround, if anything related to resolution scaling or size is modified, change all of them together
+ if (full_item=="display/width" || full_item=="display/height" || full_item=="display/stretch_mode") {
+ Globals::get_singleton()->set_persisting("display/height",true);
+ Globals::get_singleton()->set_persisting("display/width",true);
+ }
+ }
+
- Globals::get_singleton()->set_persisting(p_name,true);
// globals_editor->update_property(p_name);
- globals_editor->update_tree();
+ globals_editor->get_property_editor()->update_tree();
}
_settings_changed();
}
@@ -679,7 +752,7 @@ void ProjectSettings::_copy_to_platform(int p_which) {
name = catname+"/"+propname;
Globals::get_singleton()->set(name,value);
- globals_editor->update_tree();
+ globals_editor->get_property_editor()->update_tree();
}
@@ -722,6 +795,11 @@ void ProjectSettings::_translation_file_open() {
void ProjectSettings::_autoload_file_callback(const String& p_path) {
autoload_add_path->set_text(p_path);
+ //if (autoload_add_name->get_text().strip_edges()==String()) {
+
+ autoload_add_name->set_text( p_path.get_file().basename() );
+ //}
+
//_translation_add(p_translation);
}
@@ -730,6 +808,40 @@ void ProjectSettings::_autoload_file_open() {
autoload_file_open->popup_centered_ratio();
}
+void ProjectSettings::_autoload_edited() {
+
+ if (updating_autoload)
+ return;
+
+ TreeItem *ti = autoload_list->get_edited();
+ if (!ti || autoload_list->get_edited_column()!=2)
+ return;
+
+ updating_autoload=true;
+ bool checked=ti->is_checked(2);
+
+ String base="autoload/"+ti->get_text(0);
+
+ String path = Globals::get_singleton()->get(base);
+
+ if (path.begins_with("*"))
+ path=path.substr(1,path.length());
+
+ if (checked)
+ path="*"+path;
+
+ undo_redo->create_action("Toggle Autoload GlobalVar");
+ undo_redo->add_do_property(Globals::get_singleton(),base,path);
+ undo_redo->add_undo_property(Globals::get_singleton(),base,Globals::get_singleton()->get(base));
+ undo_redo->add_do_method(this,"_update_autoload");
+ undo_redo->add_undo_method(this,"_update_autoload");
+ undo_redo->add_do_method(this,"_settings_changed");
+ undo_redo->add_undo_method(this,"_settings_changed");
+ undo_redo->commit_action();
+ updating_autoload=false;
+
+}
+
void ProjectSettings::_autoload_add() {
String name = autoload_add_name->get_text();
@@ -740,6 +852,35 @@ void ProjectSettings::_autoload_add() {
}
+ if (ObjectTypeDB::type_exists(name)) {
+
+ message->set_text("Invalid Name.Must not collide with an existing engine class name.");
+ message->popup_centered(Size2(300,100));
+ return;
+
+ }
+
+ for(int i=0;i<Variant::VARIANT_MAX;i++) {
+ if (Variant::get_type_name(Variant::Type(i))==name) {
+
+ message->set_text("Invalid Name.Must not collide with an existing buit-in type name.");
+ message->popup_centered(Size2(300,100));
+ return;
+
+ }
+ }
+
+ for(int i=0;i<GlobalConstants::get_global_constant_count();i++) {
+
+ if (GlobalConstants::get_global_constant_name(i)==name) {
+
+ message->set_text("Invalid Name.Must not collide with an existing global constant name.");
+ message->popup_centered(Size2(300,100));
+ return;
+ }
+
+ }
+
String path = autoload_add_path->get_text();
if (!FileAccess::exists(path)) {
message->set_text("Invalid Path.\nFile does not exist.");
@@ -756,7 +897,7 @@ void ProjectSettings::_autoload_add() {
undo_redo->create_action("Add Autoload");
name = "autoload/"+name;
- undo_redo->add_do_property(Globals::get_singleton(),name,path);
+ undo_redo->add_do_property(Globals::get_singleton(),name,"*"+path);
if (Globals::get_singleton()->has(name))
undo_redo->add_undo_property(Globals::get_singleton(),name,Globals::get_singleton()->get(name));
else
@@ -769,6 +910,9 @@ void ProjectSettings::_autoload_add() {
undo_redo->add_undo_method(this,"_settings_changed");
undo_redo->commit_action();
+ autoload_add_path->set_text("");
+ autoload_add_name->set_text("");
+
//autoload_file_open->popup_centered_ratio();
}
@@ -803,11 +947,14 @@ void ProjectSettings::_autoload_delete(Object *p_item,int p_column, int p_button
String swap_name= "autoload/"+swap->get_text(0);
+ int order = Globals::get_singleton()->get_order(name);
+ int swap_order = Globals::get_singleton()->get_order(swap_name);
+
undo_redo->create_action("Move Autoload");
- undo_redo->add_do_method(Globals::get_singleton(),"set_order",swap_name,Globals::get_singleton()->get_order(name));
- undo_redo->add_do_method(Globals::get_singleton(),"set_order",name,Globals::get_singleton()->get_order(swap_name));
- undo_redo->add_undo_method(Globals::get_singleton(),"set_order",swap_name,Globals::get_singleton()->get_order(swap_name));
- undo_redo->add_undo_method(Globals::get_singleton(),"set_order",name,Globals::get_singleton()->get_order(name));
+ undo_redo->add_do_method(Globals::get_singleton(),"set_order",swap_name,order);
+ undo_redo->add_do_method(Globals::get_singleton(),"set_order",name,swap_order);
+ undo_redo->add_undo_method(Globals::get_singleton(),"set_order",swap_name,swap_order);
+ undo_redo->add_undo_method(Globals::get_singleton(),"set_order",name,order);
undo_redo->add_do_method(this,"_update_autoload");
undo_redo->add_undo_method(this,"_update_autoload");
undo_redo->add_do_method(this,"_settings_changed");
@@ -1146,6 +1293,11 @@ void ProjectSettings::_update_translations() {
void ProjectSettings::_update_autoload() {
+ if (updating_autoload)
+ return;
+
+ updating_autoload=true;
+
autoload_list->clear();
TreeItem *root = autoload_list->create_item();
autoload_list->set_hide_root(true);
@@ -1160,23 +1312,36 @@ void ProjectSettings::_update_autoload() {
continue;
String name = pi.name.get_slice("/",1);
+ String path = Globals::get_singleton()->get(pi.name);
+
if (name=="")
continue;
-
+ bool global=false;
+ if (path.begins_with("*")) {
+ path=path.substr(1,path.length());
+ global=true;
+ }
TreeItem *t = autoload_list->create_item(root);
t->set_text(0,name);
- t->set_text(1,Globals::get_singleton()->get(pi.name));
- t->add_button(1,get_icon("MoveUp","EditorIcons"),1);
- t->add_button(1,get_icon("MoveDown","EditorIcons"),2);
- t->add_button(1,get_icon("Del","EditorIcons"),0);
+ t->set_text(1,path);
+ t->set_cell_mode(2,TreeItem::CELL_MODE_CHECK);
+ t->set_editable(2,true);
+ t->set_text(2,"Enable");
+ t->set_checked(2,global);
+ t->add_button(3,get_icon("MoveUp","EditorIcons"),1);
+ t->add_button(3,get_icon("MoveDown","EditorIcons"),2);
+ t->add_button(3,get_icon("Del","EditorIcons"),0);
+
}
+ updating_autoload=false;
+
}
void ProjectSettings::_toggle_search_bar(bool p_pressed) {
- globals_editor->set_use_filter(p_pressed);
+ globals_editor->get_property_editor()->set_use_filter(p_pressed);
if (p_pressed) {
@@ -1197,7 +1362,7 @@ void ProjectSettings::_clear_search_box() {
return;
search_box->clear();
- globals_editor->update_tree();
+ globals_editor->get_property_editor()->update_tree();
}
void ProjectSettings::_bind_methods() {
@@ -1212,6 +1377,7 @@ void ProjectSettings::_bind_methods() {
ObjectTypeDB::bind_method(_MD("_action_adds"),&ProjectSettings::_action_adds);
ObjectTypeDB::bind_method(_MD("_action_persist_toggle"),&ProjectSettings::_action_persist_toggle);
ObjectTypeDB::bind_method(_MD("_action_button_pressed"),&ProjectSettings::_action_button_pressed);
+ ObjectTypeDB::bind_method(_MD("_action_rename"),&ProjectSettings::_action_rename);
ObjectTypeDB::bind_method(_MD("_update_actions"),&ProjectSettings::_update_actions);
ObjectTypeDB::bind_method(_MD("_wait_for_key"),&ProjectSettings::_wait_for_key);
ObjectTypeDB::bind_method(_MD("_add_item"),&ProjectSettings::_add_item);
@@ -1239,6 +1405,7 @@ void ProjectSettings::_bind_methods() {
ObjectTypeDB::bind_method(_MD("_autoload_file_callback"),&ProjectSettings::_autoload_file_callback);
ObjectTypeDB::bind_method(_MD("_update_autoload"),&ProjectSettings::_update_autoload);
ObjectTypeDB::bind_method(_MD("_autoload_delete"),&ProjectSettings::_autoload_delete);
+ ObjectTypeDB::bind_method(_MD("_autoload_edited"),&ProjectSettings::_autoload_edited);
ObjectTypeDB::bind_method(_MD("_clear_search_box"),&ProjectSettings::_clear_search_box);
ObjectTypeDB::bind_method(_MD("_toggle_search_bar"),&ProjectSettings::_toggle_search_bar);
@@ -1339,15 +1506,15 @@ ProjectSettings::ProjectSettings(EditorData *p_data) {
search_bar->add_child(clear_button);
clear_button->connect("pressed",this,"_clear_search_box");
- globals_editor = memnew( PropertyEditor );
+ globals_editor = memnew( SectionedPropertyEditor );
props_base->add_child(globals_editor);
- globals_editor->hide_top_label();
+ //globals_editor->hide_top_label();
globals_editor->set_v_size_flags(Control::SIZE_EXPAND_FILL);
- globals_editor->register_text_enter(search_box);
- globals_editor->set_capitalize_paths(false);
- globals_editor->get_scene_tree()->connect("cell_selected",this,"_item_selected");
- globals_editor->connect("property_toggled",this,"_item_checked");
- globals_editor->connect("property_edited",this,"_settings_prop_edited");
+ globals_editor->get_property_editor()->register_text_enter(search_box);
+ globals_editor->get_property_editor()->set_capitalize_paths(false);
+ globals_editor->get_property_editor()->get_scene_tree()->connect("cell_selected",this,"_item_selected");
+ globals_editor->get_property_editor()->connect("property_toggled",this,"_item_checked",varray(),CONNECT_DEFERRED);
+ globals_editor->get_property_editor()->connect("property_edited",this,"_settings_prop_edited");
/*
Button *save = memnew( Button );
@@ -1431,12 +1598,17 @@ ProjectSettings::ProjectSettings(EditorData *p_data) {
add_child(popup_add);
popup_add->connect("item_pressed",this,"_add_item");
+ rename_action = memnew( EditorNameDialog );
+ add_child(rename_action);
+ rename_action->set_hide_on_ok(false);
+ rename_action->set_size(Size2(200, 70));
+ rename_action->set_title("Rename Input Action");
+ rename_action->connect("name_confirmed", this,"_action_rename");
+
press_a_key = memnew( ConfirmationDialog );
press_a_key->set_focus_mode(FOCUS_ALL);
add_child(press_a_key);
-
-
l = memnew( Label );
l->set_text("Press a Key..");
l->set_area_as_parent_rect();
@@ -1589,11 +1761,6 @@ ProjectSettings::ProjectSettings(EditorData *p_data) {
HBoxContainer *ahb = memnew( HBoxContainer);
avb->add_child(ahb);
- VBoxContainer *avb_name = memnew( VBoxContainer );
- avb_name->set_h_size_flags(SIZE_EXPAND_FILL);
- autoload_add_name = memnew(LineEdit);
- avb_name->add_margin_child("Node Name:",autoload_add_name);
- ahb->add_child(avb_name);
VBoxContainer *avb_path = memnew( VBoxContainer );
avb_path->set_h_size_flags(SIZE_EXPAND_FILL);
@@ -1604,13 +1771,24 @@ ProjectSettings::ProjectSettings(EditorData *p_data) {
Button *browseaa = memnew( Button("..") );
ahb_path->add_child(browseaa);
browseaa->connect("pressed",this,"_autoload_file_open");
- Button *addaa = memnew( Button("Add") );
- ahb_path->add_child(addaa);
- addaa->connect("pressed",this,"_autoload_add");
avb_path->add_margin_child("Path:",ahb_path);
ahb->add_child(avb_path);
+ VBoxContainer *avb_name = memnew( VBoxContainer );
+ avb_name->set_h_size_flags(SIZE_EXPAND_FILL);
+
+ HBoxContainer *ahb_name = memnew( HBoxContainer );
+ autoload_add_name = memnew(LineEdit);
+ autoload_add_name->set_h_size_flags(SIZE_EXPAND_FILL);
+ ahb_name->add_child(autoload_add_name);
+ avb_name->add_margin_child("Node Name:",ahb_name);
+ Button *addaa = memnew( Button("Add") );
+ ahb_name->add_child(addaa);
+ addaa->connect("pressed",this,"_autoload_add");
+
+ ahb->add_child(avb_name);
+
autoload_list = memnew( Tree );
autoload_list->set_v_size_flags(SIZE_EXPAND_FILL);
avb->add_margin_child("List:",autoload_list,true);
@@ -1620,11 +1798,24 @@ ProjectSettings::ProjectSettings(EditorData *p_data) {
autoload_file_open->set_mode(EditorFileDialog::MODE_OPEN_FILE);
autoload_file_open->connect("file_selected",this,"_autoload_file_callback");
- autoload_list->set_columns(2);
+ autoload_list->set_columns(4);
autoload_list->set_column_titles_visible(true);
- autoload_list->set_column_title(0,"name");
- autoload_list->set_column_title(1,"path");
+ autoload_list->set_column_title(0,"Name");
+ autoload_list->set_column_expand(0,true);
+ autoload_list->set_column_min_width(0,100);
+ autoload_list->set_column_title(1,"Path");
+ autoload_list->set_column_expand(1,true);
+ autoload_list->set_column_min_width(1,100);
+ autoload_list->set_column_title(2,"Singleton");
+ autoload_list->set_column_expand(2,false);
+ autoload_list->set_column_min_width(2,80);
+ autoload_list->set_column_expand(3,false);
+ autoload_list->set_column_min_width(3,80);
+
autoload_list->connect("button_pressed",this,"_autoload_delete");
+ autoload_list->connect("item_edited",this,"_autoload_edited");
+
+ updating_autoload=false;
}
diff --git a/tools/editor/project_settings.h b/tools/editor/project_settings.h
index b122609e52..b689340fdf 100644
--- a/tools/editor/project_settings.h
+++ b/tools/editor/project_settings.h
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -34,6 +34,7 @@
#include "optimized_save_dialog.h"
#include "undo_redo.h"
#include "editor_data.h"
+#include "editor_name_dialog.h"
//#include "project_export_settings.h"
class ProjectSettings : public AcceptDialog {
@@ -45,7 +46,7 @@ class ProjectSettings : public AcceptDialog {
EditorData *data;
UndoRedo *undo_redo;
- PropertyEditor *globals_editor;
+ SectionedPropertyEditor *globals_editor;
HBoxContainer *search_bar;
ToolButton *search_button;
@@ -66,6 +67,8 @@ class ProjectSettings : public AcceptDialog {
Label *device_index_label;
MenuButton *popup_platform;
+ EditorNameDialog *rename_action;
+
LineEdit *action_name;
Tree *input_editor;
bool setting;
@@ -92,8 +95,10 @@ class ProjectSettings : public AcceptDialog {
void _update_autoload();
void _autoload_file_callback(const String& p_path);
void _autoload_add();
+ void _autoload_edited();
void _autoload_file_open();
void _autoload_delete(Object *p_item,int p_column, int p_button);
+ bool updating_autoload;
void _item_selected();
@@ -106,6 +111,7 @@ class ProjectSettings : public AcceptDialog {
void _action_adds(String);
void _action_add();
+ void _action_rename(const String& p_name);
void _device_input_add();
void _item_checked(const String& p_item, bool p_check);
diff --git a/tools/editor/property_editor.cpp b/tools/editor/property_editor.cpp
index 31393ebcbc..4b1b93ea6e 100644
--- a/tools/editor/property_editor.cpp
+++ b/tools/editor/property_editor.cpp
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -89,13 +89,23 @@ void CustomPropertyEditor::_menu_option(int p_which) {
case OBJ_MENU_LOAD: {
file->set_mode(EditorFileDialog::MODE_OPEN_FILE);
- List<String> extensions;
String type=(hint==PROPERTY_HINT_RESOURCE_TYPE)?hint_text:String();
- ResourceLoader::get_recognized_extensions_for_type(type,&extensions);
- file->clear_filters();
+ List<String> extensions;
+ for (int i=0;i<type.get_slice_count(",");i++) {
+
+ ResourceLoader::get_recognized_extensions_for_type(type.get_slice(",",i),&extensions);
+ }
+
+ Set<String> valid_extensions;
for (List<String>::Element *E=extensions.front();E;E=E->next()) {
+ valid_extensions.insert(E->get());
+ }
+
+ file->clear_filters();
+ for (Set<String>::Element *E=valid_extensions.front();E;E=E->next()) {
+
file->add_filter("*."+E->get()+" ; "+E->get().to_upper() );
}
@@ -585,7 +595,7 @@ bool CustomPropertyEditor::edit(Object* p_owner,const String& p_name,Variant::Ty
color_picker->show();
color_picker->set_edit_alpha(hint!=PROPERTY_HINT_COLOR_NO_ALPHA);
color_picker->set_color(v);
- set_size( Size2(350, color_picker->get_combined_minimum_size().height+10));
+ set_size( Size2(300, color_picker->get_combined_minimum_size().height+10));
/*
int ofs=80;
int m=10;
@@ -717,7 +727,17 @@ bool CustomPropertyEditor::edit(Object* p_owner,const String& p_name,Variant::Ty
RES cb=EditorSettings::get_singleton()->get_resource_clipboard();
- bool paste_valid=cb.is_valid() && (hint_text=="" || ObjectTypeDB::is_type(cb->get_type(),hint_text));
+ bool paste_valid=false;
+ if (cb.is_valid()) {
+ if (hint_text=="")
+ paste_valid=true;
+ else
+ for (int i = 0; i < hint_text.get_slice_count(",");i++)
+ if (ObjectTypeDB::is_type(cb->get_type(),hint_text.get_slice(",",i))) {
+ paste_valid=true;
+ break;
+ }
+ }
if (!RES(v).is_null() || paste_valid) {
menu->add_separator();
@@ -905,19 +925,31 @@ 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<Node>();
+ else if (owner->is_type("ArrayPropertyEdit"))
+ node = owner->cast_to<ArrayPropertyEdit>()->get_node();
+
+ if (!node) {
+ v=p_path;
+ emit_signal("variant_changed");
+ call_deferred("hide"); //to not mess with dialogs
+ return;
+ }
- Node *node = owner->cast_to<Node>();
Node *tonode=node->get_node(p_path);
if (tonode) {
-
p_path=node->get_path_to(tonode);
}
-
}
v=p_path;
emit_signal("variant_changed");
+ call_deferred("hide"); //to not mess with dialogs
}
@@ -1020,6 +1052,7 @@ void CustomPropertyEditor::_action_pressed(int p_which) {
v=NodePath();
emit_signal("variant_changed");
+ hide();
}
} break;
case Variant::OBJECT: {
@@ -1361,7 +1394,7 @@ void CustomPropertyEditor::_modified(String p_string) {
} break;
case Variant::MATRIX32: {
- Matrix3 m;
+ Matrix32 m;
for(int i=0;i<6;i++) {
m.elements[i/2][i%2]=value_editor[i]->get_text().to_double();
@@ -2012,7 +2045,7 @@ void PropertyEditor::set_item_text(TreeItem *p_item, int p_type, const String& p
if (img.empty())
p_item->set_text(1,"[Image (empty)]");
else
- p_item->set_text(1,"[Image "+itos(img.get_width())+"x"+itos(img.get_height())+"]");
+ p_item->set_text(1,"[Image "+itos(img.get_width())+"x"+itos(img.get_height())+"-"+String(Image::get_format_name(img.get_format()))+"]");
} break;
case Variant::NODE_PATH: {
@@ -2090,6 +2123,65 @@ void PropertyEditor::set_item_text(TreeItem *p_item, int p_type, const String& p
}
+void PropertyEditor::_check_reload_status(const String&p_name, TreeItem* item) {
+
+ bool has_reload=false;
+ int found=-1;
+
+ for(int i=0;i<item->get_button_count(1);i++) {
+
+ if (item->get_button_id(1,i)==3) {
+ found=i;
+ break;
+ }
+ }
+
+ if (_might_be_in_instance()) {
+
+
+ Variant vorig;
+ Dictionary d=item->get_metadata(0);
+ int usage = d.has("usage")?int(int(d["usage"])&(PROPERTY_USAGE_STORE_IF_NONONE|PROPERTY_USAGE_STORE_IF_NONZERO)):0;
+
+
+ if (_get_instanced_node_original_property(p_name,vorig) || usage) {
+ Variant v = obj->get(p_name);
+
+ bool changed = _is_property_different(v,vorig,usage);
+
+ if ((found!=-1)!=changed) {
+
+ if (changed) {
+
+ has_reload=true;
+ } else {
+
+ }
+
+ }
+
+ }
+
+
+
+ }
+
+ if (!has_reload && !obj->get_script().is_null()) {
+ Ref<Script> scr = obj->get_script();
+ Variant orig_value;
+ if (scr->get_property_default_value(p_name,orig_value)) {
+ if (orig_value!=obj->get(p_name)) {
+ has_reload=true;
+ }
+ }
+ }
+
+ if (found!=-1 && !has_reload) {
+ item->erase_button(1,found);
+ } else if (found==-1 && has_reload) {
+ item->add_button(1,get_icon("Reload","EditorIcons"),3);
+ }
+}
void PropertyEditor::_notification(int p_what) {
@@ -2131,43 +2223,8 @@ void PropertyEditor::_notification(int p_what) {
if (!item)
continue;
- if (_might_be_in_instance()) {
-
-
- Variant vorig;
- Dictionary d=item->get_metadata(0);
- int usage = d.has("usage")?int(int(d["usage"])&(PROPERTY_USAGE_STORE_IF_NONONE|PROPERTY_USAGE_STORE_IF_NONZERO)):0;
-
-
- if (_get_instanced_node_original_property(*k,vorig) || usage) {
- Variant v = obj->get(*k);
-
- int found=-1;
- for(int i=0;i<item->get_button_count(1);i++) {
-
- if (item->get_button_id(1,i)==3) {
- found=i;
- break;
- }
- }
-
- bool changed = _is_property_different(v,vorig,usage);
-
- if ((found!=-1)!=changed) {
-
- if (changed) {
+ _check_reload_status(*k,item);
- item->add_button(1,get_icon("Reload","EditorIcons"),3);
- } else {
-
- item->erase_button(1,found);
- }
-
- }
-
- }
-
- }
Dictionary d=item->get_metadata(0);
set_item_text(item,d["type"],d["name"],d["hint"],d["hint_text"]);
}
@@ -2207,9 +2264,9 @@ TreeItem *PropertyEditor::get_parent_node(String p_path,HashMap<String,TreeItem*
}
item->set_editable(0,false);
- item->set_selectable(0,false);
+ item->set_selectable(0,subsection_selectable);
item->set_editable(1,false);
- item->set_selectable(1,false);
+ item->set_selectable(1,subsection_selectable);
if (item->get_parent()==root) {
@@ -2234,23 +2291,30 @@ void PropertyEditor::_refresh_item(TreeItem *p_item) {
if (name!=String()) {
+
+ _check_reload_status(name,p_item);
+#if 0
+ bool has_reload=false;
+
+ int found=-1;
+ for(int i=0;i<p_item->get_button_count(1);i++) {
+
+ if (p_item->get_button_id(1,i)==3) {
+ found=i;
+ break;
+ }
+ }
+
if (_might_be_in_instance()) {
Variant vorig;
Dictionary d=p_item->get_metadata(0);
int usage = d.has("usage")?int(int(d["usage"])&(PROPERTY_USAGE_STORE_IF_NONONE|PROPERTY_USAGE_STORE_IF_NONZERO)):0;
+
if (_get_instanced_node_original_property(name,vorig) || usage) {
Variant v = obj->get(name);
- int found=-1;
- for(int i=0;i<p_item->get_button_count(1);i++) {
-
- if (p_item->get_button_id(1,i)==3) {
- found=i;
- break;
- }
- }
bool changed = _is_property_different(v,vorig,usage);
@@ -2258,10 +2322,11 @@ void PropertyEditor::_refresh_item(TreeItem *p_item) {
if (changed) {
- p_item->add_button(1,get_icon("Reload","EditorIcons"),3);
+ has_reload=true;
+
} else {
- p_item->erase_button(1,found);
+ //p_item->erase_button(1,found);
}
}
@@ -2270,6 +2335,22 @@ void PropertyEditor::_refresh_item(TreeItem *p_item) {
}
+ if (!has_reload && !obj->get_script().is_null()) {
+ Ref<Script> scr = obj->get_script();
+ Variant orig_value;
+ if (scr->get_property_default_value(name,orig_value)) {
+ if (orig_value!=obj->get(name)) {
+ has_reload=true;
+ }
+ }
+ }
+
+ if (!has_reload && found!=-1) {
+ p_item->erase_button(1,found);
+ } else if (has_reload && found==-1) {
+ p_item->add_button(1,get_icon("Reload","EditorIcons"),3);
+ }
+#endif
Dictionary d=p_item->get_metadata(0);
set_item_text(p_item,d["type"],d["name"],d["hint"],d["hint_text"]);
}
@@ -2549,7 +2630,8 @@ void PropertyEditor::update_tree() {
item->set_cell_mode( 1, TreeItem::CELL_MODE_CHECK );
item->set_text(1,"On");
item->set_checked( 1, obj->get( p.name ) );
- item->set_icon( 0, get_icon("Bool","EditorIcons") );
+ if (show_type_icons)
+ item->set_icon( 0, get_icon("Bool","EditorIcons") );
item->set_editable(1,!read_only);
} break;
@@ -2561,7 +2643,8 @@ void PropertyEditor::update_tree() {
item->set_cell_mode( 1, TreeItem::CELL_MODE_CUSTOM );
item->set_text(1, String::num(obj->get( p.name ),2) );
item->set_editable(1,!read_only);
- item->set_icon( 0, get_icon("Curve","EditorIcons"));
+ if (show_type_icons)
+ item->set_icon( 0, get_icon("Curve","EditorIcons"));
break;
@@ -2631,7 +2714,8 @@ void PropertyEditor::update_tree() {
// int c = p.hint_string.get_slice_count(",");
item->set_text(1,p.hint_string);
- item->set_icon( 0,get_icon("Enum","EditorIcons") );
+ if (show_type_icons)
+ item->set_icon( 0,get_icon("Enum","EditorIcons") );
item->set_range(1, obj->get( p.name ) );
item->set_editable(1,!read_only);
break;
@@ -2647,11 +2731,13 @@ void PropertyEditor::update_tree() {
};
if (p.type==Variant::REAL) {
- item->set_icon( 0, get_icon("Real","EditorIcons"));
+ if (show_type_icons)
+ item->set_icon( 0, get_icon("Real","EditorIcons"));
item->set_range(1, obj->get( p.name ) );
} else {
- item->set_icon( 0,get_icon("Integer","EditorIcons") );
+ if (show_type_icons)
+ item->set_icon( 0,get_icon("Integer","EditorIcons") );
item->set_range(1, obj->get( p.name ) );
}
@@ -2671,7 +2757,8 @@ void PropertyEditor::update_tree() {
item->set_cell_mode( 1, TreeItem::CELL_MODE_STRING );
item->set_editable(1,!read_only);
- item->set_icon( 0, get_icon("File","EditorIcons") );
+ if (show_type_icons)
+ item->set_icon( 0, get_icon("File","EditorIcons") );
item->set_text(1,obj->get(p.name));
item->add_button(1,get_icon("Folder","EditorIcons"));
@@ -2691,7 +2778,8 @@ void PropertyEditor::update_tree() {
item->set_text(1, p.hint_string);
item->set_range(1,idx);
item->set_editable( 1, !read_only );
- item->set_icon( 0,get_icon("Enum","EditorIcons") );
+ if (show_type_icons)
+ item->set_icon( 0,get_icon("Enum","EditorIcons") );
} break;
@@ -2699,7 +2787,8 @@ void PropertyEditor::update_tree() {
item->set_cell_mode( 1, TreeItem::CELL_MODE_STRING );
item->set_editable(1,!read_only);
- item->set_icon( 0, get_icon("String","EditorIcons") );
+ if (show_type_icons)
+ item->set_icon( 0, get_icon("String","EditorIcons") );
item->set_text(1,obj->get(p.name));
if (p.hint==PROPERTY_HINT_MULTILINE_TEXT)
item->add_button(1,get_icon("MultiLine","EditorIcons") );
@@ -2719,7 +2808,8 @@ void PropertyEditor::update_tree() {
item->set_text(1,"Array["+itos(v.call("size"))+"]");
else
item->set_text(1,"Array[]");
- item->set_icon( 0, get_icon("ArrayData","EditorIcons") );
+ if (show_type_icons)
+ item->set_icon( 0, get_icon("ArrayData","EditorIcons") );
} break;
@@ -2734,7 +2824,8 @@ void PropertyEditor::update_tree() {
item->set_text(1,"IntArray["+itos(v.call("size"))+"]");
else
item->set_text(1,"IntArray[]");
- item->set_icon( 0, get_icon("ArrayInt","EditorIcons") );
+ if (show_type_icons)
+ item->set_icon( 0, get_icon("ArrayInt","EditorIcons") );
} break;
@@ -2748,7 +2839,8 @@ void PropertyEditor::update_tree() {
item->set_text(1,"FloatArray["+itos(v.call("size"))+"]");
else
item->set_text(1,"FloatArray[]");
- item->set_icon( 0, get_icon("ArrayReal","EditorIcons") );
+ if (show_type_icons)
+ item->set_icon( 0, get_icon("ArrayReal","EditorIcons") );
} break;
@@ -2762,7 +2854,8 @@ void PropertyEditor::update_tree() {
item->set_text(1,"String["+itos(v.call("size"))+"]");
else
item->set_text(1,"String[]");
- item->set_icon( 0, get_icon("ArrayString","EditorIcons") );
+ if (show_type_icons)
+ item->set_icon( 0, get_icon("ArrayString","EditorIcons") );
} break;
@@ -2776,7 +2869,8 @@ void PropertyEditor::update_tree() {
item->set_text(1,"Byte["+itos(v.call("size"))+"]");
else
item->set_text(1,"Byte[]");
- item->set_icon( 0, get_icon("ArrayData","EditorIcons") );
+ if (show_type_icons)
+ item->set_icon( 0, get_icon("ArrayData","EditorIcons") );
} break;
@@ -2790,7 +2884,8 @@ void PropertyEditor::update_tree() {
item->set_text(1,"Vector2["+itos(v.call("size"))+"]");
else
item->set_text(1,"Vector2[]");
- item->set_icon( 0, get_icon("Vector2","EditorIcons") );
+ if (show_type_icons)
+ item->set_icon( 0, get_icon("Vector2","EditorIcons") );
} break;
@@ -2804,7 +2899,8 @@ void PropertyEditor::update_tree() {
item->set_text(1,"Vector3["+itos(v.call("size"))+"]");
else
item->set_text(1,"Vector3[]");
- item->set_icon( 0, get_icon("Vector","EditorIcons") );
+ if (show_type_icons)
+ item->set_icon( 0, get_icon("Vector","EditorIcons") );
} break;
@@ -2818,7 +2914,8 @@ void PropertyEditor::update_tree() {
item->set_text(1,"Color["+itos(v.call("size"))+"]");
else
item->set_text(1,"Color[]");
- item->set_icon( 0, get_icon("Color","EditorIcons") );
+ if (show_type_icons)
+ item->set_icon( 0, get_icon("Color","EditorIcons") );
} break;
@@ -2827,7 +2924,8 @@ void PropertyEditor::update_tree() {
item->set_cell_mode( 1, TreeItem::CELL_MODE_CUSTOM );
item->set_editable( 1, true );
item->set_text(1,obj->get(p.name));
- item->set_icon( 0,get_icon("Vector2","EditorIcons") );
+ if (show_type_icons)
+ item->set_icon( 0,get_icon("Vector2","EditorIcons") );
} break;
case Variant::RECT2: {
@@ -2835,7 +2933,8 @@ void PropertyEditor::update_tree() {
item->set_cell_mode( 1, TreeItem::CELL_MODE_CUSTOM );
item->set_editable( 1, true );
item->set_text(1,obj->get(p.name));
- item->set_icon( 0,get_icon("Rect2","EditorIcons") );
+ if (show_type_icons)
+ item->set_icon( 0,get_icon("Rect2","EditorIcons") );
} break;
case Variant::VECTOR3: {
@@ -2843,15 +2942,24 @@ void PropertyEditor::update_tree() {
item->set_cell_mode( 1, TreeItem::CELL_MODE_CUSTOM );
item->set_editable( 1, true );
item->set_text(1,obj->get(p.name));
- item->set_icon( 0,get_icon("Vector","EditorIcons") );
+ if (show_type_icons)
+ item->set_icon( 0,get_icon("Vector","EditorIcons") );
} break;
+ case Variant::MATRIX32:
+ case Variant::MATRIX3: {
+
+ item->set_cell_mode( 1, TreeItem::CELL_MODE_CUSTOM );
+ item->set_editable( 1, true );
+ item->set_text(1, obj->get(p.name));
+ } break;
case Variant::TRANSFORM: {
item->set_cell_mode( 1, TreeItem::CELL_MODE_CUSTOM );
item->set_editable( 1, true );
item->set_text(1,obj->get(p.name));
- item->set_icon( 0,get_icon("Matrix","EditorIcons") );
+ if (show_type_icons)
+ item->set_icon( 0,get_icon("Matrix","EditorIcons") );
} break;
case Variant::PLANE: {
@@ -2859,7 +2967,8 @@ void PropertyEditor::update_tree() {
item->set_cell_mode( 1, TreeItem::CELL_MODE_CUSTOM );
item->set_editable( 1, true );
item->set_text(1,obj->get(p.name));
- item->set_icon( 0,get_icon("Plane","EditorIcons") );
+ if (show_type_icons)
+ item->set_icon( 0,get_icon("Plane","EditorIcons") );
} break;
case Variant::_AABB: {
@@ -2867,7 +2976,8 @@ void PropertyEditor::update_tree() {
item->set_cell_mode( 1, TreeItem::CELL_MODE_CUSTOM );
item->set_editable( 1, true );
item->set_text(1,"AABB");
- item->set_icon( 0,get_icon("Rect3","EditorIcons") );
+ if (show_type_icons)
+ item->set_icon( 0,get_icon("Rect3","EditorIcons") );
} break;
case Variant::QUAT: {
@@ -2875,7 +2985,8 @@ void PropertyEditor::update_tree() {
item->set_cell_mode( 1, TreeItem::CELL_MODE_CUSTOM );
item->set_editable( 1, true );
item->set_text(1,obj->get(p.name));
- item->set_icon( 0,get_icon("Quat","EditorIcons") );
+ if (show_type_icons)
+ item->set_icon( 0,get_icon("Quat","EditorIcons") );
} break;
case Variant::COLOR: {
@@ -2884,7 +2995,8 @@ void PropertyEditor::update_tree() {
item->set_editable( 1, !read_only );
// item->set_text(1,obj->get(p.name));
item->set_custom_bg_color(1,obj->get(p.name));
- item->set_icon( 0,get_icon("Color","EditorIcons") );
+ if (show_type_icons)
+ item->set_icon( 0,get_icon("Color","EditorIcons") );
} break;
case Variant::IMAGE: {
@@ -2895,8 +3007,9 @@ void PropertyEditor::update_tree() {
if (img.empty())
item->set_text(1,"[Image (empty)]");
else
- item->set_text(1,"[Image "+itos(img.get_width())+"x"+itos(img.get_height())+"]");
- item->set_icon( 0,get_icon("Image","EditorIcons") );
+ item->set_text(1,"[Image "+itos(img.get_width())+"x"+itos(img.get_height())+"-"+String(Image::get_format_name(img.get_format()))+"]");
+ if (show_type_icons)
+ item->set_icon( 0,get_icon("Image","EditorIcons") );
} break;
case Variant::NODE_PATH: {
@@ -2978,6 +3091,7 @@ void PropertyEditor::update_tree() {
}
}
+ bool has_reload=false;
if (_might_be_in_instance()) {
Variant vorig;
@@ -2985,16 +3099,29 @@ void PropertyEditor::update_tree() {
int usage = d.has("usage")?int(int(d["usage"])&(PROPERTY_USAGE_STORE_IF_NONONE|PROPERTY_USAGE_STORE_IF_NONZERO)):0;
if (_get_instanced_node_original_property(p.name,vorig) || usage) {
Variant v = obj->get(p.name);
-
+
if (_is_property_different(v,vorig,usage)) {
//print_line("FOR "+String(p.name)+" RELOAD WITH: "+String(v)+"("+Variant::get_type_name(v.get_type())+")=="+String(vorig)+"("+Variant::get_type_name(vorig.get_type())+")");
item->add_button(1,get_icon("Reload","EditorIcons"),3);
+ has_reload=true;
}
}
}
+ if (!has_reload && !obj->get_script().is_null()) {
+ Ref<Script> scr = obj->get_script();
+ Variant orig_value;
+ if (scr->get_property_default_value(p.name,orig_value)) {
+ if (orig_value!=obj->get(p.name)) {
+ item->add_button(1,get_icon("Reload","EditorIcons"),3);
+ }
+ }
+ }
+
+
+
}
}
@@ -3285,8 +3412,6 @@ void PropertyEditor::_edit_button(Object *p_item, int p_column, int p_button) {
call_deferred("_set_range_def",ti,prop,ti->get_range(p_column)+1.0);
} else if (p_button==3) {
- if (!_might_be_in_instance())
- return;
if (!d.has("name"))
return;
@@ -3294,11 +3419,21 @@ void PropertyEditor::_edit_button(Object *p_item, int p_column, int p_button) {
Variant vorig;
- if (_get_instanced_node_original_property(prop,vorig)) {
+ if (_might_be_in_instance() && _get_instanced_node_original_property(prop,vorig)) {
_edit_set(prop,vorig);
+ return;
}
+ if (!obj->get_script().is_null()) {
+ Ref<Script> scr = obj->get_script();
+ Variant orig_value;
+ if (scr->get_property_default_value(prop,orig_value)) {
+ _edit_set(prop,orig_value);
+ }
+ }
+
+
} else {
Dictionary d = ti->get_metadata(0);
@@ -3434,6 +3569,7 @@ void PropertyEditor::_bind_methods() {
ObjectTypeDB::bind_method( "_draw_flags",&PropertyEditor::_draw_flags);
ObjectTypeDB::bind_method( "_set_range_def",&PropertyEditor::_set_range_def);
ObjectTypeDB::bind_method( "_filter_changed",&PropertyEditor::_filter_changed);
+ ObjectTypeDB::bind_method( "update_tree",&PropertyEditor::update_tree);
ADD_SIGNAL( MethodInfo("property_toggled",PropertyInfo( Variant::STRING, "property"),PropertyInfo( Variant::BOOL, "value")));
ADD_SIGNAL( MethodInfo("resource_selected", PropertyInfo( Variant::OBJECT, "res"),PropertyInfo( Variant::STRING, "prop") ) );
@@ -3504,7 +3640,15 @@ void PropertyEditor::register_text_enter(Node* p_line_edit) {
if (search_box)
search_box->connect("text_changed",this,"_filter_changed");
+}
+
+void PropertyEditor::set_subsection_selectable(bool p_selectable) {
+
+ if (p_selectable==subsection_selectable)
+ return;
+ subsection_selectable=p_selectable;
+ update_tree();
}
PropertyEditor::PropertyEditor() {
@@ -3566,8 +3710,9 @@ PropertyEditor::PropertyEditor() {
show_categories=false;
refresh_countdown=0;
use_doc_hints=false;
-
use_filter=false;
+ subsection_selectable=false;
+ show_type_icons=EDITOR_DEF("inspector/show_type_icons",false);
}
@@ -3577,3 +3722,201 @@ PropertyEditor::~PropertyEditor()
}
+/////////////////////////////
+
+
+
+
+
+class SectionedPropertyEditorFilter : public Object {
+
+ OBJ_TYPE( SectionedPropertyEditorFilter, Object );
+
+ Object *edited;
+ String section;
+
+ bool _set(const StringName& p_name, const Variant& p_value) {
+
+ if (!edited)
+ return false;
+
+ String name=p_name;
+ if (section!="") {
+ name=section+"/"+name;
+ }
+
+ bool valid;
+ edited->set(name,p_value,&valid);
+ return valid;
+ }
+
+ bool _get(const StringName& p_name,Variant &r_ret) const{
+
+ if (!edited)
+ return false;
+
+ String name=p_name;
+ if (section!="") {
+ name=section+"/"+name;
+ }
+
+ bool valid=false;
+
+ r_ret=edited->get(name,&valid);
+ return valid;
+
+
+ }
+ void _get_property_list(List<PropertyInfo> *p_list) const{
+
+ if (!edited)
+ return;
+
+ List<PropertyInfo> pinfo;
+ edited->get_property_list(&pinfo);
+ for (List<PropertyInfo>::Element *E=pinfo.front();E;E=E->next()) {
+
+ PropertyInfo pi=E->get();
+ int sp = pi.name.find("/");
+ if (sp!=-1) {
+ String ss = pi.name.substr(0,sp);
+
+ if (ss==section) {
+ pi.name=pi.name.substr(sp+1,pi.name.length());
+ p_list->push_back(pi);
+ }
+ } else {
+ if (section=="")
+ p_list->push_back(pi);
+ }
+ }
+
+ }
+public:
+
+ void set_section(const String& p_section) {
+
+ section=p_section;
+ _change_notify();
+ }
+
+ void set_edited(Object* p_edited) {
+ edited=p_edited;
+ _change_notify();
+ }
+
+ SectionedPropertyEditorFilter() {
+ edited=NULL;
+ }
+
+};
+
+
+void SectionedPropertyEditor::_bind_methods() {
+
+ ObjectTypeDB::bind_method("_section_selected",&SectionedPropertyEditor::_section_selected);
+}
+
+void SectionedPropertyEditor::_section_selected(int p_which) {
+
+ filter->set_section( sections->get_item_metadata(p_which) );
+}
+
+String SectionedPropertyEditor::get_current_section() const {
+
+ return sections->get_item_metadata( sections->get_current() );
+}
+
+String SectionedPropertyEditor::get_full_item_path(const String& p_item) {
+
+ String base = sections->get_item_metadata( sections->get_current() );
+ if (base!="")
+ return base+"/"+p_item;
+ else
+ return p_item;
+}
+
+void SectionedPropertyEditor::edit(Object* p_object) {
+
+ List<PropertyInfo> pinfo;
+ if (p_object)
+ p_object->get_property_list(&pinfo);
+ sections->clear();
+
+ Set<String> existing_sections;
+ for (List<PropertyInfo>::Element *E=pinfo.front();E;E=E->next()) {
+
+ PropertyInfo pi=E->get();
+ if (pi.usage&PROPERTY_USAGE_CATEGORY)
+ continue;
+ if (pi.name.find(":")!=-1 || pi.name=="script/script")
+ continue;
+ int sp = pi.name.find("/");
+ if (sp!=-1) {
+ String sname=pi.name.substr(0,sp);
+ if (!existing_sections.has(sname)) {
+ existing_sections.insert(sname);
+ sections->add_item(sname.capitalize());
+ sections->set_item_metadata(sections->get_item_count()-1,sname);
+ }
+
+ } else {
+ if (!existing_sections.has("")) {
+ existing_sections.insert("");
+ sections->add_item("Global");
+ sections->set_item_metadata(sections->get_item_count()-1,"");
+ }
+ }
+
+
+ }
+
+ //sections->sort_items_by_text();
+
+
+ filter->set_edited(p_object);
+ editor->edit(filter);
+
+ sections->select(0);
+ _section_selected(0);
+
+}
+
+PropertyEditor *SectionedPropertyEditor::get_property_editor() {
+
+ return editor;
+}
+
+SectionedPropertyEditor::SectionedPropertyEditor() {
+
+ VBoxContainer *left_vb = memnew( VBoxContainer);
+ left_vb->set_custom_minimum_size(Size2(160,0));
+ add_child(left_vb);
+
+ sections = memnew( ItemList );
+ sections->set_v_size_flags(SIZE_EXPAND_FILL);
+
+ left_vb->add_margin_child("Sections:",sections,true);
+
+ VBoxContainer *right_vb = memnew( VBoxContainer);
+ right_vb->set_h_size_flags(SIZE_EXPAND_FILL);
+ add_child(right_vb);
+
+ filter = memnew( SectionedPropertyEditorFilter );
+ editor = memnew( PropertyEditor );
+ editor->set_v_size_flags(SIZE_EXPAND_FILL);
+ right_vb->add_margin_child("Properties:",editor,true);
+
+ editor->get_scene_tree()->set_column_titles_visible(false);
+
+
+ editor->hide_top_label();
+
+ sections->connect("item_selected",this,"_section_selected");
+
+}
+
+SectionedPropertyEditor::~SectionedPropertyEditor() {
+
+ memdelete(filter);
+}
diff --git a/tools/editor/property_editor.h b/tools/editor/property_editor.h
index 5fb8386b1b..63ad090901 100644
--- a/tools/editor/property_editor.h
+++ b/tools/editor/property_editor.h
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -39,6 +39,7 @@
#include "scene/gui/texture_frame.h"
#include "scene/gui/text_edit.h"
#include "scene/gui/check_button.h"
+#include "scene/gui/split_container.h"
#include "scene_tree_editor.h"
/**
@@ -113,6 +114,7 @@ class CustomPropertyEditor : public Popup {
void _action_pressed(int p_which);
void _type_create_selected(int p_idx);
+
void _color_changed(const Color& p_color);
void _draw_easing();
void _menu_option(int p_which);
@@ -161,10 +163,11 @@ class PropertyEditor : public Control {
bool keying;
bool read_only;
bool show_categories;
+ bool show_type_icons;
float refresh_countdown;
bool use_doc_hints;
-
bool use_filter;
+ bool subsection_selectable;
HashMap<String,String> pending;
String selected_property;
@@ -190,6 +193,7 @@ class PropertyEditor : public Control {
virtual void _changed_callback(Object *p_changed,const char * p_what);
virtual void _changed_callbacks(Object *p_changed,const String& p_callback);
+ void _check_reload_status(const String&p_name,TreeItem* item);
void _edit_button(Object *p_item, int p_column, int p_button);
@@ -239,9 +243,37 @@ public:
void set_use_filter(bool p_use);
void register_text_enter(Node *p_line_edit);
+ void set_subsection_selectable(bool p_selectable);
+
PropertyEditor();
~PropertyEditor();
};
+
+class SectionedPropertyEditorFilter;
+
+class SectionedPropertyEditor : public HBoxContainer {
+
+
+ OBJ_TYPE(SectionedPropertyEditor,HBoxContainer);
+ ItemList *sections;
+ SectionedPropertyEditorFilter *filter;
+ PropertyEditor *editor;
+
+
+ static void _bind_methods();
+ void _section_selected(int p_which);
+
+public:
+
+ PropertyEditor *get_property_editor();
+ void edit(Object* p_object);
+ String get_full_item_path(const String& p_item);
+ String get_current_section() const;
+
+ SectionedPropertyEditor();
+ ~SectionedPropertyEditor();
+};
+
#endif
diff --git a/tools/editor/pvrtc_compress.cpp b/tools/editor/pvrtc_compress.cpp
index a2f98adbe0..c30aedc1dc 100644
--- a/tools/editor/pvrtc_compress.cpp
+++ b/tools/editor/pvrtc_compress.cpp
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/tools/editor/pvrtc_compress.h b/tools/editor/pvrtc_compress.h
index c4fb0bacb5..129faee080 100644
--- a/tools/editor/pvrtc_compress.h
+++ b/tools/editor/pvrtc_compress.h
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/tools/editor/quick_open.cpp b/tools/editor/quick_open.cpp
index 6135a4ab64..828275340b 100644
--- a/tools/editor/quick_open.cpp
+++ b/tools/editor/quick_open.cpp
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -30,7 +30,7 @@
#include "os/keyboard.h"
-void EditorQuickOpen::popup(const StringName &p_base, bool p_dontclear, bool p_add_dirs) {
+void EditorQuickOpen::popup(const StringName &p_base, bool p_enable_multi, bool p_add_dirs, bool p_dontclear) {
add_directories=p_add_dirs;
popup_centered_ratio(0.6);
@@ -38,13 +38,38 @@ void EditorQuickOpen::popup(const StringName &p_base, bool p_dontclear, bool p_a
search_box->select_all();
else
search_box->clear();
+ if (p_enable_multi)
+ search_options->set_select_mode(Tree::SELECT_MULTI);
+ else
+ search_options->set_select_mode(Tree::SELECT_SINGLE);
search_box->grab_focus();
base_type=p_base;
_update_search();
+}
+
+String EditorQuickOpen::get_selected() const {
+ TreeItem *ti = search_options->get_selected();
+ if (!ti)
+ return String();
+ return "res://" + ti->get_text(0);
}
+Vector<String> EditorQuickOpen::get_selected_files() const {
+
+ Vector<String> files;
+
+ TreeItem* item = search_options->get_next_selected(search_options->get_root());
+ while (item) {
+
+ files.push_back("res://"+item->get_text(0));
+
+ item = search_options->get_next_selected(item);
+ }
+
+ return files;
+}
void EditorQuickOpen::_text_changed(const String& p_newtext) {
@@ -53,14 +78,33 @@ void EditorQuickOpen::_text_changed(const String& p_newtext) {
void EditorQuickOpen::_sbox_input(const InputEvent& p_ie) {
- if (p_ie.type==InputEvent::KEY && (
- p_ie.key.scancode == KEY_UP ||
- p_ie.key.scancode == KEY_DOWN ||
- p_ie.key.scancode == KEY_PAGEUP ||
- p_ie.key.scancode == KEY_PAGEDOWN ) ) {
+ if (p_ie.type==InputEvent::KEY) {
- search_options->call("_input_event",p_ie);
- search_box->accept_event();
+ switch(p_ie.key.scancode) {
+ case KEY_UP:
+ case KEY_DOWN:
+ case KEY_PAGEUP:
+ case KEY_PAGEDOWN: {
+
+ search_options->call("_input_event", p_ie);
+ search_box->accept_event();
+
+ TreeItem *root = search_options->get_root();
+ if (!root->get_children())
+ break;
+
+ TreeItem *current = search_options->get_selected();
+
+ TreeItem *item = search_options->get_next_selected(root);
+ while (item) {
+ item->deselect(0);
+ item = search_options->get_next_selected(item);
+ }
+
+ current->select(0);
+
+ } break;
+ }
}
}
@@ -100,9 +144,6 @@ void EditorQuickOpen::_parse_fs(EditorFileSystemDirectory *efsd) {
ti->set_text(0,file);
Ref<Texture> icon = get_icon( (has_icon(efsd->get_file_type(i),ei)?efsd->get_file_type(i):ot),ei);
ti->set_icon(0,icon);
- if (root->get_children()==ti)
- ti->select(0);
-
}
}
@@ -123,6 +164,13 @@ void EditorQuickOpen::_update_search() {
TreeItem *root = search_options->create_item();
_parse_fs(EditorFileSystem::get_singleton()->get_filesystem());
+ if (root->get_children()) {
+ TreeItem *ti = root->get_children();
+
+ ti->select(0);
+ ti->set_as_cursor(0);
+ }
+
get_ok()->set_disabled(root->get_children()==NULL);
}
@@ -132,7 +180,7 @@ void EditorQuickOpen::_confirmed() {
TreeItem *ti = search_options->get_selected();
if (!ti)
return;
- emit_signal("quick_open","res://"+ti->get_text(0));
+ emit_signal("quick_open");
hide();
}
@@ -156,7 +204,7 @@ void EditorQuickOpen::_bind_methods() {
ObjectTypeDB::bind_method(_MD("_confirmed"),&EditorQuickOpen::_confirmed);
ObjectTypeDB::bind_method(_MD("_sbox_input"),&EditorQuickOpen::_sbox_input);
- ADD_SIGNAL(MethodInfo("quick_open",PropertyInfo(Variant::STRING,"respath")));
+ ADD_SIGNAL(MethodInfo("quick_open"));
}
diff --git a/tools/editor/quick_open.h b/tools/editor/quick_open.h
index 8b38256d39..520f7e569d 100644
--- a/tools/editor/quick_open.h
+++ b/tools/editor/quick_open.h
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -61,7 +61,10 @@ public:
StringName get_base_type() const;
- void popup(const StringName& p_base,bool p_dontclear=false,bool p_add_dirs=false);
+ String get_selected() const;
+ Vector<String> get_selected_files() const;
+
+ void popup(const StringName& p_base,bool p_enable_multi=false,bool p_add_dirs=false,bool p_dontclear=false);
EditorQuickOpen();
};
diff --git a/tools/editor/register_exporters.h b/tools/editor/register_exporters.h
index 0e1ad2ca46..364ad5efc9 100644
--- a/tools/editor/register_exporters.h
+++ b/tools/editor/register_exporters.h
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/tools/editor/reparent_dialog.cpp b/tools/editor/reparent_dialog.cpp
index 78ba47d54b..97b27603b2 100644
--- a/tools/editor/reparent_dialog.cpp
+++ b/tools/editor/reparent_dialog.cpp
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -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");
}
@@ -62,7 +62,7 @@ void ReparentDialog::_reparent() {
if (tree->get_selected()) {
- emit_signal("reparent",tree->get_selected()->get_path(),node_only->is_pressed());
+ emit_signal("reparent",tree->get_selected()->get_path(),keep_transform->is_pressed());
hide();
}
}
@@ -78,38 +78,41 @@ void ReparentDialog::_bind_methods() {
ObjectTypeDB::bind_method("_reparent",&ReparentDialog::_reparent);
ObjectTypeDB::bind_method("_cancel",&ReparentDialog::_cancel);
- ADD_SIGNAL( MethodInfo("reparent",PropertyInfo(Variant::NODE_PATH,"path"),PropertyInfo(Variant::BOOL,"only_node")));
+ ADD_SIGNAL( MethodInfo("reparent",PropertyInfo(Variant::NODE_PATH,"path"),PropertyInfo(Variant::BOOL,"keep_global_xform")));
}
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);
+ keep_transform = memnew( CheckBox );
+ keep_transform->set_text("Keep Global Transform");
+ keep_transform->set_pressed(true);
+ vbc->add_child(keep_transform);
+
+
//vbc->add_margin_child("Options:",node_only);;
-
//cancel->connect("pressed", this,"_cancel");
get_ok()->set_text("Reparent");
+
}
diff --git a/tools/editor/reparent_dialog.h b/tools/editor/reparent_dialog.h
index 78c0df9285..296102e4b9 100644
--- a/tools/editor/reparent_dialog.h
+++ b/tools/editor/reparent_dialog.h
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -32,6 +32,7 @@
#include "scene/gui/dialogs.h"
#include "scene/gui/button.h"
#include "scene/gui/check_button.h"
+#include "scene/gui/check_box.h"
#include "tools/editor/scene_tree_editor.h"
#include "scene/gui/line_edit.h"
/**
@@ -42,12 +43,14 @@ class ReparentDialog : public ConfirmationDialog {
OBJ_TYPE( ReparentDialog, ConfirmationDialog );
SceneTreeEditor *tree;
- CheckButton *node_only;
+ CheckBox *keep_transform;
+
void update_tree();
void _reparent();
void _cancel();
-
+
+
protected:
void _notification(int p_what);
diff --git a/tools/editor/resources_dock.cpp b/tools/editor/resources_dock.cpp
index b69eec4a51..5e44162c93 100644
--- a/tools/editor/resources_dock.cpp
+++ b/tools/editor/resources_dock.cpp
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/tools/editor/resources_dock.h b/tools/editor/resources_dock.h
index 933b457b29..978291fc3f 100644
--- a/tools/editor/resources_dock.h
+++ b/tools/editor/resources_dock.h
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/tools/editor/run_settings_dialog.cpp b/tools/editor/run_settings_dialog.cpp
index e883c69939..e8c509d79d 100644
--- a/tools/editor/run_settings_dialog.cpp
+++ b/tools/editor/run_settings_dialog.cpp
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/tools/editor/run_settings_dialog.h b/tools/editor/run_settings_dialog.h
index fdb8857f6b..09319702f3 100644
--- a/tools/editor/run_settings_dialog.h
+++ b/tools/editor/run_settings_dialog.h
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/tools/editor/scene_tree_dock.cpp b/tools/editor/scene_tree_dock.cpp
index 8b5bf8c1e1..5877ce1a43 100644
--- a/tools/editor/scene_tree_dock.cpp
+++ b/tools/editor/scene_tree_dock.cpp
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -35,7 +35,10 @@
#include "tools/editor/plugins/canvas_item_editor_plugin.h"
#include "script_editor_debugger.h"
#include "tools/editor/plugins/script_editor_plugin.h"
+#include "core/io/resource_saver.h"
#include "multi_node_edit.h"
+#include "tools/editor/plugins/animation_player_editor_plugin.h"
+#include "animation_editor.h"
void SceneTreeDock::_unhandled_key_input(InputEvent p_event) {
@@ -291,7 +294,7 @@ void SceneTreeDock::_tool_selected(int p_tool, bool p_confirm_override) {
for (int i = 0; i < selection.size(); i++) {
Node *top_node = selection[i];
Node *bottom_node = selection[selection.size() - 1 - i];
-
+
ERR_FAIL_COND(!top_node->get_parent());
ERR_FAIL_COND(!bottom_node->get_parent());
@@ -397,7 +400,7 @@ void SceneTreeDock::_tool_selected(int p_tool, bool p_confirm_override) {
editor_data->get_undo_redo().add_do_method(d,"set_owner",node->get_owner());
}
editor_data->get_undo_redo().add_do_method(editor_selection,"add_node",dup);
- editor_data->get_undo_redo().add_undo_method(parent,"remove_child",dup);
+ editor_data->get_undo_redo().add_undo_method(parent,"remove_child",dup);
editor_data->get_undo_redo().add_do_reference(dup);
ScriptEditorDebugger *sed = ScriptEditor::get_singleton()->get_debugger();
@@ -485,7 +488,54 @@ void SceneTreeDock::_tool_selected(int p_tool, bool p_confirm_override) {
delete_dialog->popup_centered_minsize();
}
+ } break;
+ case TOOL_NEW_SCENE_FROM: {
+
+ Node *scene = editor_data->get_edited_scene_root();
+
+ if (!scene) {
+ accept->get_ok()->set_text("I see..");
+ accept->set_text("This operation can't be done without a scene.");
+ accept->popup_centered_minsize();
+ break;
+ }
+
+ List<Node*> selection = editor_selection->get_selected_node_list();
+
+ if (selection.size()!=1) {
+ accept->get_ok()->set_text("I see..");
+ accept->set_text("This operation requires a single selected node.");
+ accept->popup_centered_minsize();
+ break;
+ }
+
+ Node *tocopy = selection.front()->get();
+
+ if (tocopy!=editor_data->get_edited_scene_root() && tocopy->get_filename()!="") {
+ accept->get_ok()->set_text("I see..");
+ accept->set_text("This operation can't be done on instanced scenes.");
+ accept->popup_centered_minsize();
+ break;
+ }
+
+ new_scene_from_dialog->set_mode(EditorFileDialog::MODE_SAVE_FILE);
+
+ List<String> extensions;
+ Ref<PackedScene> sd = memnew( PackedScene );
+ ResourceSaver::get_recognized_extensions(sd,&extensions);
+ new_scene_from_dialog->clear_filters();
+ for(int i=0;i<extensions.size();i++) {
+ new_scene_from_dialog->add_filter("*."+extensions[i]+" ; "+extensions[i].to_upper());
+ }
+
+ String existing;
+ if (extensions.size()) {
+ existing="new_scene."+extensions.front()->get().to_lower();
+ }
+ new_scene_from_dialog->set_current_path(existing);
+ new_scene_from_dialog->popup_centered_ratio();
+ new_scene_from_dialog->set_title("Save New Scene As..");
} break;
@@ -520,6 +570,7 @@ void SceneTreeDock::_notification(int p_what) {
"MoveDown",
"Duplicate",
"Reparent",
+ "CreateNewSceneFrom",
"MultiNodeEdit",
"Remove",
};
@@ -875,7 +926,7 @@ bool SceneTreeDock::_validate_no_foreign() {
}
- if (edited_scene->get_scene_inherited_state().is_valid() && edited_scene->get_scene_inherited_state()->find_node_by_path(edited_scene->get_path_to(E->get()))>=0) {
+ if (edited_scene->get_scene_inherited_state().is_valid() && edited_scene->get_scene_inherited_state()->find_node_by_path(edited_scene->get_path_to(E->get()))>=0) {
accept->get_ok()->set_text("Makes Sense!");
accept->set_text("Can't operate on nodes the current scene inherits from!");
@@ -889,7 +940,7 @@ bool SceneTreeDock::_validate_no_foreign() {
return true;
}
-void SceneTreeDock::_node_reparent(NodePath p_path,bool p_node_only) {
+void SceneTreeDock::_node_reparent(NodePath p_path,bool p_keep_global_xform) {
Node *node = scene_tree->get_selected();
@@ -948,11 +999,28 @@ void SceneTreeDock::_node_reparent(NodePath p_path,bool p_node_only) {
editor_data->get_undo_redo().add_do_method(sed,"live_debug_reparent_node",edited_scene->get_path_to(node),edited_scene->get_path_to(new_parent),new_name,-1);
editor_data->get_undo_redo().add_undo_method(sed,"live_debug_reparent_node",NodePath(String(edited_scene->get_path_to(new_parent))+"/"+new_name),edited_scene->get_path_to(node->get_parent()),node->get_name(),node->get_index());
+ if (p_keep_global_xform) {
+ if (node->cast_to<Node2D>())
+ editor_data->get_undo_redo().add_do_method(node,"set_global_transform",node->cast_to<Node2D>()->get_global_transform());
+ if (node->cast_to<Spatial>())
+ editor_data->get_undo_redo().add_do_method(node,"set_global_transform",node->cast_to<Spatial>()->get_global_transform());
+ if (node->cast_to<Control>()) {
+ bool can_do_it=false;
+ Control *c=node->cast_to<Control>();
+ if (c->get_parent()->cast_to<Container>())
+ can_do_it=false;
+ for(int i=0;i<4;i++) {
+ if (c->get_anchor(Margin(i))!=ANCHOR_BEGIN)
+ can_do_it=false;
+ }
+ editor_data->get_undo_redo().add_do_method(node,"set_global_pos",node->cast_to<Control>()->get_global_pos());
+ }
+ }
editor_data->get_undo_redo().add_do_method(this,"_set_owners",edited_scene,owners);
- if (editor->get_animation_editor()->get_root()==node)
- editor_data->get_undo_redo().add_do_method(editor->get_animation_editor(),"set_root",node);
+ if (AnimationPlayerEditor::singleton->get_key_editor()->get_root()==node)
+ editor_data->get_undo_redo().add_do_method(AnimationPlayerEditor::singleton->get_key_editor(),"set_root",node);
editor_data->get_undo_redo().add_undo_method(new_parent,"remove_child",node);
@@ -979,8 +1047,28 @@ void SceneTreeDock::_node_reparent(NodePath p_path,bool p_node_only) {
editor_data->get_undo_redo().add_undo_method(node->get_parent(),"add_child",node);
editor_data->get_undo_redo().add_undo_method(node->get_parent(),"move_child",node,child_pos);
editor_data->get_undo_redo().add_undo_method(this,"_set_owners",edited_scene,owners);
- if (editor->get_animation_editor()->get_root()==node)
- editor_data->get_undo_redo().add_undo_method(editor->get_animation_editor(),"set_root",node);
+ if (AnimationPlayerEditor::singleton->get_key_editor()->get_root()==node)
+ editor_data->get_undo_redo().add_undo_method(AnimationPlayerEditor::singleton->get_key_editor(),"set_root",node);
+
+ if (p_keep_global_xform) {
+ if (node->cast_to<Node2D>())
+ editor_data->get_undo_redo().add_undo_method(node,"set_transform",node->cast_to<Node2D>()->get_transform());
+ if (node->cast_to<Spatial>())
+ editor_data->get_undo_redo().add_undo_method(node,"set_transform",node->cast_to<Spatial>()->get_transform());
+ if (node->cast_to<Control>()) {
+ bool can_do_it=false;
+ Control *c=node->cast_to<Control>();
+ if (c->get_parent()->cast_to<Container>())
+ can_do_it=false;
+ for(int i=0;i<4;i++) {
+ if (c->get_anchor(Margin(i))!=ANCHOR_BEGIN)
+ can_do_it=false;
+ }
+ editor_data->get_undo_redo().add_undo_method(node,"set_pos",node->cast_to<Control>()->get_pos());
+ }
+ }
+
+
}
@@ -1066,8 +1154,8 @@ void SceneTreeDock::_delete_confirm() {
editor_data->get_undo_redo().add_do_method(n->get_parent(),"remove_child",n);
editor_data->get_undo_redo().add_undo_method(n->get_parent(),"add_child",n);
editor_data->get_undo_redo().add_undo_method(n->get_parent(),"move_child",n,n->get_index());
- if (editor->get_animation_editor()->get_root()==n)
- editor_data->get_undo_redo().add_undo_method(editor->get_animation_editor(),"set_root",n);
+ if (AnimationPlayerEditor::singleton->get_key_editor()->get_root()==n)
+ editor_data->get_undo_redo().add_undo_method(AnimationPlayerEditor::singleton->get_key_editor(),"set_root",n);
editor_data->get_undo_redo().add_undo_method(this,"_set_owners",edited_scene,owners);
//editor_data->get_undo_redo().add_undo_method(n,"set_owner",n->get_owner());
editor_data->get_undo_redo().add_undo_reference(n);
@@ -1103,6 +1191,7 @@ void SceneTreeDock::_update_tool_buttons() {
tool_buttons[TOOL_DUPLICATE]->set_disabled(disable_root);
tool_buttons[TOOL_REPARENT]->set_disabled(disable_root);
tool_buttons[TOOL_ERASE]->set_disabled(disable);
+ tool_buttons[TOOL_NEW_SCENE_FROM]->set_disabled(disable_root);
tool_buttons[TOOL_MULTI_EDIT]->set_disabled(EditorNode::get_singleton()->get_editor_selection()->get_selection().size()<2);
@@ -1231,13 +1320,18 @@ void SceneTreeDock::_create() {
editor->set_edited_scene(newnode);
}
+ //small hack to make collisionshapes and other kind of nodes to work
+ for(int i=0;i<newnode->get_child_count();i++) {
+ Node *c=newnode->get_child(i);
+ c->call("set_transform", c->call("get_transform") );
+ }
editor_data->get_undo_redo().clear_history();
newnode->set_name(newname);
editor->push_item(newnode);
memdelete(n);
-
+
_update_tool_buttons();
}
@@ -1284,6 +1378,59 @@ void SceneTreeDock::_import_subscene() {
*/
}
+void SceneTreeDock::_new_scene_from(String p_file) {
+
+ List<Node*> selection = editor_selection->get_selected_node_list();
+
+ if (selection.size()!=1) {
+ accept->get_ok()->set_text("I see..");
+ accept->set_text("This operation requires a single selected node.");
+ accept->popup_centered_minsize();
+ return;
+ }
+
+ Node *base = selection.front()->get();
+
+ Map<Node*,Node*> reown;
+ reown[editor_data->get_edited_scene_root()]=base;
+ Node *copy = base->duplicate_and_reown(reown);
+ if (copy) {
+
+ Ref<PackedScene> sdata = memnew( PackedScene );
+ Error err = sdata->pack(copy);
+ memdelete(copy);
+
+ if (err!=OK) {
+ accept->get_ok()->set_text("I see..");
+ accept->set_text("Couldn't save new scene. Likely dependencies (instances) couldn't be satisfied.");
+ accept->popup_centered_minsize();
+ return;
+ }
+
+ int flg=0;
+ if (EditorSettings::get_singleton()->get("on_save/compress_binary_resources"))
+ flg|=ResourceSaver::FLAG_COMPRESS;
+ if (EditorSettings::get_singleton()->get("on_save/save_paths_as_relative"))
+ flg|=ResourceSaver::FLAG_RELATIVE_PATHS;
+
+
+ err = ResourceSaver::save(p_file,sdata,flg);
+ if (err!=OK) {
+ accept->get_ok()->set_text("I see..");
+ accept->set_text("Error saving scene.");
+ accept->popup_centered_minsize();
+ return;
+ }
+
+ } else {
+ accept->get_ok()->set_text("I see..");
+ accept->set_text("Error duplicating scene to save it.");
+ accept->popup_centered_minsize();
+ return;
+ }
+
+}
+
void SceneTreeDock::_bind_methods() {
ObjectTypeDB::bind_method(_MD("_tool_selected"),&SceneTreeDock::_tool_selected);
@@ -1301,6 +1448,7 @@ void SceneTreeDock::_bind_methods() {
ObjectTypeDB::bind_method(_MD("_node_prerenamed"),&SceneTreeDock::_node_prerenamed);
ObjectTypeDB::bind_method(_MD("_import_subscene"),&SceneTreeDock::_import_subscene);
ObjectTypeDB::bind_method(_MD("_selection_changed"),&SceneTreeDock::_selection_changed);
+ ObjectTypeDB::bind_method(_MD("_new_scene_from"),&SceneTreeDock::_new_scene_from);
ObjectTypeDB::bind_method(_MD("instance"),&SceneTreeDock::instance);
}
@@ -1373,9 +1521,10 @@ SceneTreeDock::SceneTreeDock(EditorNode *p_editor,Node *p_scene_root,EditorSelec
scene_tree->set_undo_redo(&editor_data->get_undo_redo());
scene_tree->set_editor_selection(editor_selection);
+
HBoxContainer *hbc_bottom = memnew( HBoxContainer );
vbc->add_child(hbc_bottom);
-
+ hbc_bottom->add_constant_override("separation", 0);
tb = memnew( ToolButton );
tb->connect("pressed",this,"_tool_selected",make_binds(TOOL_MOVE_UP, false));
@@ -1404,6 +1553,12 @@ SceneTreeDock::SceneTreeDock(EditorNode *p_editor,Node *p_scene_root,EditorSelec
hbc_bottom->add_spacer();
tb = memnew( ToolButton );
+ tb->connect("pressed",this,"_tool_selected",make_binds(TOOL_NEW_SCENE_FROM, false));
+ tb->set_tooltip("Create New Scene From Node(s)");
+ hbc_bottom->add_child(tb);
+ tool_buttons[TOOL_NEW_SCENE_FROM]=tb;
+
+ tb = memnew( ToolButton );
tb->connect("pressed",this,"_tool_selected",make_binds(TOOL_MULTI_EDIT, false));
tb->set_tooltip("Multi-Edit Selected Nodes");
hbc_bottom->add_child(tb);
@@ -1423,12 +1578,15 @@ SceneTreeDock::SceneTreeDock(EditorNode *p_editor,Node *p_scene_root,EditorSelec
groups_editor = memnew( GroupsEditor );
add_child(groups_editor);
groups_editor->set_undo_redo(&editor_data->get_undo_redo());
+
connect_dialog = memnew( ConnectionsDialog(p_editor) );
add_child(connect_dialog);
connect_dialog->set_undoredo(&editor_data->get_undo_redo());
+
script_create_dialog = memnew( ScriptCreateDialog );
add_child(script_create_dialog);
script_create_dialog->connect("script_created",this,"_script_created");
+
reparent_dialog = memnew( ReparentDialog );
add_child(reparent_dialog);
reparent_dialog->connect("reparent",this,"_node_reparent");
@@ -1444,10 +1602,16 @@ SceneTreeDock::SceneTreeDock(EditorNode *p_editor,Node *p_scene_root,EditorSelec
delete_dialog = memnew( ConfirmationDialog );
add_child(delete_dialog);
delete_dialog->connect("confirmed",this,"_delete_confirm");
+
import_subscene_dialog = memnew( EditorSubScene );
add_child(import_subscene_dialog);
import_subscene_dialog->connect("subscene_selected",this,"_import_subscene");
+ new_scene_from_dialog = memnew( EditorFileDialog );
+ new_scene_from_dialog->set_mode(EditorFileDialog::MODE_SAVE_FILE);
+ add_child(new_scene_from_dialog);
+ new_scene_from_dialog->connect("file_selected",this,"_new_scene_from");
+
first_enter=true;
diff --git a/tools/editor/scene_tree_dock.h b/tools/editor/scene_tree_dock.h
index b1c53d2ff9..114e2c5c97 100644
--- a/tools/editor/scene_tree_dock.h
+++ b/tools/editor/scene_tree_dock.h
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -62,6 +62,7 @@ class SceneTreeDock : public VBoxContainer {
TOOL_MOVE_DOWN,
TOOL_DUPLICATE,
TOOL_REPARENT,
+ TOOL_NEW_SCENE_FROM,
TOOL_MULTI_EDIT,
TOOL_ERASE,
TOOL_BUTTON_MAX
@@ -90,6 +91,7 @@ class SceneTreeDock : public VBoxContainer {
ReparentDialog *reparent_dialog;
EditorFileDialog *file;
EditorSubScene *import_subscene_dialog;
+ EditorFileDialog *new_scene_from_dialog;
bool first_enter;
@@ -99,7 +101,7 @@ class SceneTreeDock : public VBoxContainer {
EditorNode *editor;
Node *_duplicate(Node *p_node, Map<Node*,Node*> &duplimap);
- void _node_reparent(NodePath p_path,bool p_node_only);
+ void _node_reparent(NodePath p_path, bool p_keep_global_xform);
void _set_owners(Node *p_owner, const Array& p_nodes);
void _load_request(const String& p_path);
void _script_open_request(const Ref<Script>& p_script);
@@ -119,6 +121,8 @@ class SceneTreeDock : public VBoxContainer {
void _import_subscene();
+ void _new_scene_from(String p_file);
+
bool _validate_no_foreign();
void _selection_changed();
diff --git a/tools/editor/scene_tree_editor.cpp b/tools/editor/scene_tree_editor.cpp
index ac2f76acdc..0260457c81 100644
--- a/tools/editor/scene_tree_editor.cpp
+++ b/tools/editor/scene_tree_editor.cpp
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -39,12 +39,8 @@
Node *SceneTreeEditor::get_scene_node() {
ERR_FAIL_COND_V(!is_inside_tree(),NULL);
- if (get_tree()->get_root()->get_child_count() && get_tree()->get_root()->get_child(0)->cast_to<EditorNode>())
- return get_tree()->get_root()->get_child(0)->cast_to<EditorNode>()->get_edited_scene();
- else
- return get_tree()->get_root();
- return NULL;
+ return get_tree()->get_edited_scene_root();
}
@@ -565,7 +561,6 @@ void SceneTreeEditor::_notification(int p_what) {
get_tree()->disconnect("node_removed",this,"_node_removed");
tree->disconnect("item_collapsed",this,"_cell_collapsed");
clear_inherit_confirm->disconnect("confirmed",this,"_subscene_option");
- _update_tree();
}
}
@@ -726,6 +721,9 @@ void SceneTreeEditor::_update_selection(TreeItem *item) {
NodePath np = item->get_metadata(0);
+ if (!has_node(np))
+ return;
+
Node *n=get_node(np);
if (!n)
@@ -929,7 +927,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();
}
}
@@ -940,7 +938,6 @@ void SceneTreeDialog::_bind_methods() {
ObjectTypeDB::bind_method("_cancel",&SceneTreeDialog::_cancel);
ADD_SIGNAL( MethodInfo("selected",PropertyInfo(Variant::NODE_PATH,"path")));
-
}
@@ -952,7 +949,7 @@ SceneTreeDialog::SceneTreeDialog() {
add_child(tree);
set_child_rect(tree);
-
+ tree->get_scene_tree()->connect("item_activated",this,"_select");
}
diff --git a/tools/editor/scene_tree_editor.h b/tools/editor/scene_tree_editor.h
index 50cca4e24b..334debc148 100644
--- a/tools/editor/scene_tree_editor.h
+++ b/tools/editor/scene_tree_editor.h
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/tools/editor/scenes.cpp b/tools/editor/scenes.cpp
index ada5751b5a..e6569c98a9 100644
--- a/tools/editor/scenes.cpp
+++ b/tools/editor/scenes.cpp
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/tools/editor/scenes.h b/tools/editor/scenes.h
index 463c3b5e18..bae9ef65f0 100644
--- a/tools/editor/scenes.h
+++ b/tools/editor/scenes.h
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/tools/editor/scenes_dock.cpp b/tools/editor/scenes_dock.cpp
index c9b376ebec..5abc4992df 100644
--- a/tools/editor/scenes_dock.cpp
+++ b/tools/editor/scenes_dock.cpp
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -195,7 +195,12 @@ void ScenesDock::_notification(int p_what) {
case NOTIFICATION_EXIT_TREE: {
} break;
+ case EditorSettings::NOTIFICATION_EDITOR_SETTINGS_CHANGED: {
+ display_mode->set_pressed(int(EditorSettings::get_singleton()->get("file_dialog/display_mode"))==EditorFileDialog::DISPLAY_LIST);
+
+ _change_file_display();
+ } break;
}
}
@@ -1063,6 +1068,11 @@ void ScenesDock::open(const String& p_path) {
}
+void ScenesDock::set_use_thumbnails(bool p_use) {
+
+ display_mode->set_pressed(!p_use);
+}
+
void ScenesDock::_bind_methods() {
ObjectTypeDB::bind_method(_MD("_update_tree"),&ScenesDock::_update_tree);
@@ -1244,6 +1254,8 @@ ScenesDock::ScenesDock(EditorNode *p_editor) {
history_pos=0;
tree_mode=true;
+ path="res://";
+
}
diff --git a/tools/editor/scenes_dock.h b/tools/editor/scenes_dock.h
index d045124bf7..a1978a3ca4 100644
--- a/tools/editor/scenes_dock.h
+++ b/tools/editor/scenes_dock.h
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -153,6 +153,7 @@ public:
void fix_dependencies(const String& p_for_file);
+ void set_use_thumbnails(bool p_use);
ScenesDock(EditorNode *p_editor);
~ScenesDock();
diff --git a/tools/editor/script_create_dialog.cpp b/tools/editor/script_create_dialog.cpp
index 622150ab68..409e8be870 100644
--- a/tools/editor/script_create_dialog.cpp
+++ b/tools/editor/script_create_dialog.cpp
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/tools/editor/script_create_dialog.h b/tools/editor/script_create_dialog.h
index 59fde8fbd5..181989402e 100644
--- a/tools/editor/script_create_dialog.h
+++ b/tools/editor/script_create_dialog.h
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/tools/editor/script_editor_debugger.cpp b/tools/editor/script_editor_debugger.cpp
index 60f2afa2c2..fed5ab1a16 100644
--- a/tools/editor/script_editor_debugger.cpp
+++ b/tools/editor/script_editor_debugger.cpp
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -210,6 +210,8 @@ void ScriptEditorDebugger::_parse_message(const String& p_msg,const Array& p_dat
OS::get_singleton()->move_window_to_foreground();
tabs->set_current_tab(0);
+ EditorNode::get_singleton()->make_bottom_panel_item_visible(this);
+
} else if (p_msg=="debug_exit") {
breaked=false;
@@ -358,7 +360,9 @@ void ScriptEditorDebugger::_parse_message(const String& p_msg,const Array& p_dat
if (EditorNode::get_log()->is_hidden()) {
log_forced_visible=true;
- EditorNode::get_log()->show();
+ if (EditorNode::get_singleton()->are_bottom_panels_hidden()) {
+ EditorNode::get_singleton()->make_bottom_panel_item_visible(EditorNode::get_log());
+ }
}
EditorNode::get_log()->add_message(t);
@@ -528,15 +532,14 @@ void ScriptEditorDebugger::_notification(int p_what) {
case NOTIFICATION_ENTER_TREE: {
+ inspector->edit(variables);
+
step->set_icon( get_icon("DebugStep","EditorIcons"));
next->set_icon( get_icon("DebugNext","EditorIcons"));
back->set_icon( get_icon("Back","EditorIcons"));
forward->set_icon( get_icon("Forward","EditorIcons"));
dobreak->set_icon( get_icon("Pause","EditorIcons"));
docontinue->set_icon( get_icon("DebugContinue","EditorIcons"));
- tb->set_normal_texture( get_icon("Close","EditorIcons"));
- tb->set_hover_texture( get_icon("CloseHover","EditorIcons"));
- tb->set_pressed_texture( get_icon("Close","EditorIcons"));
scene_tree_refresh->set_icon( get_icon("Reload","EditorIcons"));
le_set->connect("pressed",this,"_live_edit_set");
le_clear->connect("pressed",this,"_live_edit_clear");
@@ -551,8 +554,14 @@ void ScriptEditorDebugger::_notification(int p_what) {
if (error_count==0) {
error_split->set_name("Errors");
+ debugger_button->set_text("Debugger");
+ debugger_button->set_icon(Ref<Texture>());
+ tabs->set_tab_icon(error_split->get_index(),Ref<Texture>());
} else {
error_split->set_name("Errors ("+itos(error_count)+")");
+ debugger_button->set_text("Debugger ("+itos(error_count)+")");
+ debugger_button->set_icon(get_icon("Error","EditorIcons"));
+ tabs->set_tab_icon(error_split->get_index(),get_icon("Error","EditorIcons"));
}
last_error_count=error_count;
}
@@ -569,12 +578,12 @@ void ScriptEditorDebugger::_notification(int p_what) {
ppeer->set_stream_peer(connection);
+ //EditorNode::get_singleton()->make_bottom_panel_item_visible(this);
+ //emit_signal("show_debugger",true);
- show();
dobreak->set_disabled(false);
tabs->set_current_tab(0);
- emit_signal("show_debugger",true);
reason->set_text("Child Process Connected");
reason->set_tooltip("Child Process Connected");
scene_tree->clear();
@@ -727,7 +736,9 @@ void ScriptEditorDebugger::stop(){
message.clear();
if (log_forced_visible) {
- EditorNode::get_log()->hide();
+ //EditorNode::get_singleton()->make_bottom_panel_item_visible(this);
+ if (EditorNode::get_log()->is_visible())
+ EditorNode::get_singleton()->hide_bottom_panel();
log_forced_visible=false;
}
@@ -737,8 +748,11 @@ void ScriptEditorDebugger::stop(){
le_set->set_disabled(true);
- hide();
- emit_signal("show_debugger",false);
+ if (hide_on_stop) {
+ if (is_visible())
+ EditorNode::get_singleton()->hide_bottom_panel();
+ emit_signal("show_debugger",false);
+ }
}
@@ -766,13 +780,6 @@ void ScriptEditorDebugger::_stack_dump_frame_selected() {
}
-void ScriptEditorDebugger::_hide_request() {
-
- hide();
- emit_signal("show_debugger",false);
-
-}
-
void ScriptEditorDebugger::_output_clear() {
//output->clear();
@@ -1160,6 +1167,10 @@ void ScriptEditorDebugger:: _error_stack_selected(int p_idx){
}
+void ScriptEditorDebugger::set_hide_on_stop(bool p_hide) {
+
+ hide_on_stop=p_hide;
+}
void ScriptEditorDebugger::_bind_methods() {
@@ -1169,7 +1180,6 @@ void ScriptEditorDebugger::_bind_methods() {
ObjectTypeDB::bind_method(_MD("debug_break"),&ScriptEditorDebugger::debug_break);
ObjectTypeDB::bind_method(_MD("debug_continue"),&ScriptEditorDebugger::debug_continue);
ObjectTypeDB::bind_method(_MD("_output_clear"),&ScriptEditorDebugger::_output_clear);
- ObjectTypeDB::bind_method(_MD("_hide_request"),&ScriptEditorDebugger::_hide_request);
ObjectTypeDB::bind_method(_MD("_performance_draw"),&ScriptEditorDebugger::_performance_draw);
ObjectTypeDB::bind_method(_MD("_performance_select"),&ScriptEditorDebugger::_performance_select);
ObjectTypeDB::bind_method(_MD("_scene_tree_request"),&ScriptEditorDebugger::_scene_tree_request);
@@ -1205,13 +1215,6 @@ ScriptEditorDebugger::ScriptEditorDebugger(EditorNode *p_editor){
tabs->set_area_as_parent_rect();
add_child(tabs);
- tb = memnew( TextureButton );
- tb->connect("pressed",this,"_hide_request");
- tb->set_anchor_and_margin(MARGIN_LEFT,ANCHOR_END,20);
- tb->set_margin(MARGIN_TOP,2);
- add_child(tb);
-
-
VBoxContainer *vbc = memnew( VBoxContainer );
vbc->set_name("Debugger");
@@ -1222,12 +1225,13 @@ ScriptEditorDebugger::ScriptEditorDebugger(EditorNode *p_editor){
vbc->add_child(hbc);
- reason = memnew( Label );
+ reason = memnew( LineEdit );
reason->set_text("");
+ reason->set_editable(false);
hbc->add_child(reason);
reason->add_color_override("font_color",Color(1,0.4,0.0,0.8));
reason->set_h_size_flags(SIZE_EXPAND_FILL);
- reason->set_clip_text(true);
+ //reason->set_clip_text(true);
hbc->add_child( memnew( VSeparator) );
@@ -1290,7 +1294,7 @@ ScriptEditorDebugger::ScriptEditorDebugger(EditorNode *p_editor){
pending_in_queue=0;
variables = memnew( ScriptEditorDebuggerVariables );
- inspector->edit(variables);
+
breaked=false;
tabs->add_child(dbg);
@@ -1454,7 +1458,6 @@ ScriptEditorDebugger::ScriptEditorDebugger(EditorNode *p_editor){
msgdialog = memnew( AcceptDialog );
add_child(msgdialog);
- hide();
log_forced_visible=false;
p_editor->get_undo_redo()->set_method_notify_callback(_method_changeds,this);
@@ -1462,6 +1465,7 @@ ScriptEditorDebugger::ScriptEditorDebugger(EditorNode *p_editor){
live_debug=false;
last_path_id=false;
error_count=0;
+ hide_on_stop=true;
last_error_count=0;
diff --git a/tools/editor/script_editor_debugger.h b/tools/editor/script_editor_debugger.h
index 6b66a62dd5..ecd0494955 100644
--- a/tools/editor/script_editor_debugger.h
+++ b/tools/editor/script_editor_debugger.h
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -54,6 +54,7 @@ class ScriptEditorDebugger : public Control {
AcceptDialog *msgdialog;
+ Button *debugger_button;
LineEdit *clicked_ctrl;
LineEdit *clicked_ctrl_type;
@@ -71,14 +72,13 @@ class ScriptEditorDebugger : public Control {
int error_count;
int last_error_count;
+ bool hide_on_stop;
- TextureButton *tb;
-
TabContainer *tabs;
- Label *reason;
+ LineEdit *reason;
bool log_forced_visible;
ScriptEditorDebuggerVariables *variables;
@@ -126,7 +126,6 @@ class ScriptEditorDebugger : public Control {
void _performance_select(Object *, int, bool);
void _stack_dump_frame_selected();
void _output_clear();
- void _hide_request();
void _scene_tree_request();
void _parse_message(const String& p_msg,const Array& p_data);
@@ -182,6 +181,9 @@ public:
void update_live_edit_root();
+ void set_hide_on_stop(bool p_hide);
+
+ void set_tool_button(Button *p_tb) { debugger_button=p_tb; }
virtual Size2 get_minimum_size() const;
ScriptEditorDebugger(EditorNode *p_editor=NULL);
diff --git a/tools/editor/settings_config_dialog.cpp b/tools/editor/settings_config_dialog.cpp
index 6d8f849427..ebbc488ff2 100644
--- a/tools/editor/settings_config_dialog.cpp
+++ b/tools/editor/settings_config_dialog.cpp
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -71,7 +71,7 @@ void EditorSettingsDialog::popup_edit_settings() {
return;
property_editor->edit(EditorSettings::get_singleton());
- property_editor->update_tree();
+ property_editor->get_property_editor()->update_tree();
search_box->select_all();
search_box->grab_focus();
@@ -254,7 +254,7 @@ void EditorSettingsDialog::_clear_search_box() {
return;
search_box->clear();
- property_editor->update_tree();
+ property_editor->get_property_editor()->update_tree();
}
void EditorSettingsDialog::_notification(int p_what) {
@@ -306,10 +306,10 @@ EditorSettingsDialog::EditorSettingsDialog() {
hbc->add_child(clear_button);
clear_button->connect("pressed",this,"_clear_search_box");
- property_editor = memnew( PropertyEditor );
- property_editor->hide_top_label();
- property_editor->set_use_filter(true);
- property_editor->register_text_enter(search_box);
+ property_editor = memnew( SectionedPropertyEditor );
+ //property_editor->hide_top_label();
+ property_editor->get_property_editor()->set_use_filter(true);
+ property_editor->get_property_editor()->register_text_enter(search_box);
property_editor->set_v_size_flags(Control::SIZE_EXPAND_FILL);
vbc->add_child(property_editor);
diff --git a/tools/editor/settings_config_dialog.h b/tools/editor/settings_config_dialog.h
index 50159cf488..e1c3238a64 100644
--- a/tools/editor/settings_config_dialog.h
+++ b/tools/editor/settings_config_dialog.h
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -53,7 +53,7 @@ class EditorSettingsDialog : public AcceptDialog {
Tree *plugins;
LineEdit *search_box;
ToolButton *clear_button;
- PropertyEditor *property_editor;
+ SectionedPropertyEditor *property_editor;
Timer *timer;
diff --git a/tools/editor/spatial_editor_gizmos.cpp b/tools/editor/spatial_editor_gizmos.cpp
index 5efca44c7d..320b0c3a70 100644
--- a/tools/editor/spatial_editor_gizmos.cpp
+++ b/tools/editor/spatial_editor_gizmos.cpp
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -2283,6 +2283,8 @@ void NavigationMeshSpatialGizmo::redraw() {
}
}
+ if (faces.empty())
+ return;
Map<_EdgeKey,bool> edge_map;
DVector<Vector3> tmeshfaces;
@@ -2330,7 +2332,7 @@ void NavigationMeshSpatialGizmo::redraw() {
}
}
- Ref<TriangleMesh> tmesh = memnew( TriangleMesh);
+ Ref<TriangleMesh> tmesh = memnew( TriangleMesh );
tmesh->create(tmeshfaces);
if (lines.size())
diff --git a/tools/editor/spatial_editor_gizmos.h b/tools/editor/spatial_editor_gizmos.h
index bc7e8ad21d..669d3e2380 100644
--- a/tools/editor/spatial_editor_gizmos.h
+++ b/tools/editor/spatial_editor_gizmos.h
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/tools/export/blender25/io_scene_dae/export_dae.py b/tools/export/blender25/io_scene_dae/export_dae.py
index b846f0e2d8..7ee0e179b8 100644
--- a/tools/export/blender25/io_scene_dae/export_dae.py
+++ b/tools/export/blender25/io_scene_dae/export_dae.py
@@ -921,7 +921,7 @@ class DaeExporter:
if (node.parent.type=="ARMATURE"):
armature=node.parent
if (armcount>1):
- self.operator.report({'WARNING'},'Object "'+node.name+'" refers to more than one armature! This is unsopported.')
+ self.operator.report({'WARNING'},'Object "'+node.name+'" refers to more than one armature! This is unsupported.')
if (armcount==0):
self.operator.report({'WARNING'},'Object "'+node.name+'" is child of an armature, but has no armature modifier.')
diff --git a/tools/html_fs/godot.html b/tools/html_fs/godot.html
index 36761deb90..c354826e1f 100644
--- a/tools/html_fs/godot.html
+++ b/tools/html_fs/godot.html
@@ -1,1317 +1,374 @@
-<!doctype html>
-<html lang="en-us">
- <head>
- <meta charset="utf-8">
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
- <title>Emscripten-Generated Code</title>
- <style>
- body {
- font-family: arial;
- margin: 0;
- padding: none;
- }
+<!DOCTYPE html>
+<html xmlns="http://www.w3.org/1999/xhtml" lang="" xml:lang="">
+<head>
+ <meta charset="utf-8" />
+ <title>$GODOT_HEAD_TITLE</title>
+ $GODOT_HEAD_INCLUDE
+ <style type="text/css">
+ body {
+ margin: 0;
+ border: 0 none;
+ padding: 0;
+ text-align: center;
+ background-color: black;
+ font-family: $GODOT_STYLE_FONT_FAMILY;
+ }
- .emscripten { padding-right: 0; margin-left: auto; margin-right: auto; display: block; }
- div.emscripten { text-align: center; }
- div.emscripten_border { border: 1px solid black; }
- /* the canvas *must not* have any border or padding, or mouse coords will be wrong */
- canvas.emscripten { border: 0px none; }
- #emscripten_logo {
- display: inline-block;
- margin: 0;
- }
+ /* Godot Engine default theme style
+ * ================================ */
- .spinner {
- height: 30px;
- width: 30px;
- margin: 0;
- margin-top: 20px;
- margin-left: 20px;
- display: inline-block;
- vertical-align: top;
+ .godot {
+ color: #e0e0e0;
+ background-color: #3b3943;
+ background-image: linear-gradient(to bottom, #403e48, #35333c);
+ border: 1px solid #45434e;
+ box-shadow: 0 0 1px 1px #2f2d35;
+ }
- -webkit-animation: rotation .8s linear infinite;
- -moz-animation: rotation .8s linear infinite;
- -o-animation: rotation .8s linear infinite;
- animation: rotation 0.8s linear infinite;
+ button.godot {
+ font-family: $GODOT_STYLE_FONT_FAMILY; /* override user agent style */
+ padding: 1px 5px;
+ background-color: #37353f;
+ background-image: linear-gradient(to bottom, #413e49, #3a3842);
+ border: 1px solid #514f5d;
+ border-radius: 1px;
+ box-shadow: 0 0 1px 1px #2a2930;
+ }
- border-left: 5px solid rgb(235, 235, 235);
- border-right: 5px solid rgb(235, 235, 235);
- border-bottom: 5px solid rgb(235, 235, 235);
- border-top: 5px solid rgb(120, 120, 120);
-
- border-radius: 100%;
- background-color: rgb(189, 215, 46);
- }
+ button.godot:hover {
+ color: #f0f0f0;
+ background-color: #44414e;
+ background-image: linear-gradient(to bottom, #494652, #423f4c);
+ border: 1px solid #5a5667;
+ box-shadow: 0 0 1px 1px #26252b;
+ }
- @-webkit-keyframes rotation {
- from {-webkit-transform: rotate(0deg);}
- to {-webkit-transform: rotate(360deg);}
- }
- @-moz-keyframes rotation {
- from {-moz-transform: rotate(0deg);}
- to {-moz-transform: rotate(360deg);}
- }
- @-o-keyframes rotation {
- from {-o-transform: rotate(0deg);}
- to {-o-transform: rotate(360deg);}
- }
- @keyframes rotation {
- from {transform: rotate(0deg);}
- to {transform: rotate(360deg);}
- }
+ button.godot:active {
+ color: #fff;
+ background-color: #3e3b46;
+ background-image: linear-gradient(to bottom, #36343d, #413e49);
+ border: 1px solid #4f4c59;
+ box-shadow: 0 0 1px 1px #26252b;
+ }
- #status {
- display: inline-block;
- vertical-align: top;
- margin-top: 30px;
- margin-left: 20px;
- font-weight: bold;
- color: rgb(120, 120, 120);
- }
+ button.godot:disabled {
+ color: rgba(230, 230, 230, 0.2);
+ background-color: #3d3d3d;
+ background-image: linear-gradient(to bottom, #434343, #393939);
+ border: 1px solid #474747;
+ box-shadow: 0 0 1px 1px #2d2b33;
+ }
- #progress {
- height: 20px;
- width: 30px;
- }
- #controls {
- display: inline-block;
- float: right;
- vertical-align: top;
- margin-top: 30px;
- margin-right: 20px;
- }
+ /* Canvas / wrapper
+ * ================ */
- #output {
- width: 100%;
- height: 200px;
- margin: 0 auto;
- margin-top: 10px;
- display: block;
- background-color: black;
- color: white;
- font-family: 'Lucida Console', Monaco, monospace;
- outline: none;
- }
- </style>
- </head>
- <body>
- <a href="http://emscripten.org">
- <?xml version="1.0" encoding="UTF-8" standalone="no"?><svg
- version="1.1"
- id="Layer_1"
- x="0px"
- y="0px"
- width="296px"
- height="78px"
- viewBox="420 120 100 170"
- enable-background="new 0 0 900 400"
- xml:space="preserve"
- inkscape:version="0.48.4 r9939"
- sodipodi:docname="emscripten_powered_by_logo.svg"><metadata
- id="metadata345"><rdf:RDF><cc:Work
- rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
- rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs
- id="defs343"><linearGradient
- y2="247.6265"
- x2="225.1929"
- y1="152.499"
- x1="225.1929"
- gradientUnits="userSpaceOnUse"
- id="linearGradient5104"><stop
- id="stop5106"
- style="stop-color:#C1D72F"
- offset="0.3227531" /><stop
- id="stop5108"
- style="stop-color:#BCD631"
- offset="0.45119295" /><stop
- id="stop5110"
- style="stop-color:#AFD136"
- offset="0.64491969" /><stop
- id="stop5112"
- style="stop-color:#ABD037"
- offset="1" /><a:midPointStop
- style="stop-color:#C1D72F"
- offset="0.0123" /><a:midPointStop
- style="stop-color:#C1D72F"
- offset="0.3086" /><a:midPointStop
- style="stop-color:#ABD037"
- offset="1" /></linearGradient><linearGradient
- inkscape:collect="always"
- xlink:href="#SVGID_2_"
- id="linearGradient5120"
- x1="397.56918"
- y1="128.12726"
- x2="397.56918"
- y2="166.25996"
- gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(1.103059,0,0,1.103059,-38.997823,3.1312145)" /><filter
- inkscape:collect="always"
- id="filter5126"><feGaussianBlur
- inkscape:collect="always"
- stdDeviation="0.56377237"
- id="feGaussianBlur5128" /></filter><linearGradient
- inkscape:collect="always"
- xlink:href="#SVGID_2_"
- id="linearGradient5134"
- gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(1.103059,0,0,1.103059,-38.997823,3.1312145)"
- x1="397.56918"
- y1="128.12726"
- x2="397.56918"
- y2="166.25996" /></defs><sodipodi:namedview
- pagecolor="#ffffff"
- bordercolor="#666666"
- borderopacity="1"
- objecttolerance="10"
- gridtolerance="10"
- guidetolerance="10"
- inkscape:pageopacity="0"
- inkscape:pageshadow="2"
- inkscape:window-width="1440"
- inkscape:window-height="838"
- id="namedview341"
- showgrid="false"
- inkscape:zoom="0.63555556"
- inkscape:cx="224.82424"
- inkscape:cy="-52.085109"
- inkscape:window-x="-8"
- inkscape:window-y="-8"
- inkscape:window-maximized="1"
- inkscape:current-layer="Layer_1" /><g
- id="g5130"
- transform="matrix(0.91591318,0,0,0.91591318,28.176953,14.143571)"><path
- transform="matrix(1.103059,0,0,1.103059,-35.073492,-16.03923)"
- id="path5122"
- style="fill:#383838;fill-opacity:0.34705882;stroke:none;filter:url(#filter5126)"
- d="m 494.39333,173.6323 c 0.57407,0.28703 1.87073,1.00226 2.89426,1.02855 0.55732,0.0143 1.14006,-0.1672 1.60262,-0.4784 1.20466,-0.81046 2.23561,-2.03031 2.72683,-3.39661 0.19424,-0.54027 0.0238,-1.72222 0.0238,-1.72222 l -3.82713,-14.06478 -1.98533,0 0.50231,-2.67891 6.36261,0 2.55939,12.22285 4.78392,-9.68746 -2.00924,0 0,-2.65498 7.19979,0 -11.00301,22.38875 -1.69829,1.91358 -2.29628,1.3395 -2.46371,0.26312 -2.29628,-0.21528 -2.79859,-1.36342 z m -12.0637,-14.56445 c -0.93698,1.88565 -1.70261,4.35262 -0.81842,6.26333 0.36549,0.78976 1.35098,1.19428 2.192,1.41737 0.60934,0.16133 1.29167,0.0999 1.88775,-0.10468 0.48126,-0.1655 0.8829,-0.5224 1.255,-0.8697 0.40341,-0.3768 0.77723,-0.80461 1.03505,-1.29262 0.21864,-0.41395 0.40236,-0.84786 0.49325,-1.30698 0.20667,-1.0485 0.35879,-2.1079 0.33583,-3.17631 -0.0184,-0.87403 -0.0789,-1.87107 -0.47711,-2.64959 -0.26344,-0.51379 -0.77017,-0.71849 -1.33113,-0.85633 -0.42395,-0.10479 -0.81432,-0.0626 -1.21773,0.10517 -0.65479,0.27273 -1.2544,0.5311 -1.82112,0.95764 -0.57331,0.4317 -1.21403,0.86959 -1.53337,1.5127 z m 0.65588,-4.31208 c 0,0 2.19341,-1.80738 3.45549,-2.27082 0.71718,-0.26365 3.45363,-0.65258 4.15,-0.3378 1.47292,0.66633 2.26103,1.57529 2.7222,2.60001 0.46118,1.02472 0.69944,2.59956 0.79701,3.73627 0.13278,1.55027 -0.13682,3.77629 -0.53404,5.74843 -0.30079,1.49256 -1.01883,2.74423 -1.83478,3.92156 -1.06526,1.5373 -1.82382,2.15116 -3.66756,2.46594 -0.98864,0.16889 -1.93845,0.46787 -3.25466,0.0928 -1.4384,-0.40963 -2.35273,-0.81244 -3.39599,-1.63337 -0.72524,-0.57054 -1.16043,-1.54043 -1.16043,-1.54043 l 0,2.82636 -4.8903,0 3.39872,-23.01602 -1.92242,-0.85888 0.0403,-2.38127 7.25847,0.0534 z m -23.77803,2.20447 c 0.29175,1.49273 0.0813,4.83252 -0.86111,6.69751 -0.3062,0.60617 -0.94813,1.32967 -1.55479,1.6983 -1.01515,0.61713 -2.21688,1.21322 -3.3966,1.07639 -0.47944,-0.0541 -0.97036,-0.34348 -1.24383,-0.74151 -0.47686,-0.69328 -0.43621,-1.55032 -0.45448,-2.39198 -0.024,-1.06873 0.13137,-2.23775 0.38272,-3.277 0.18705,-0.7744 0.4229,-1.58254 0.86111,-2.24844 0.39037,-0.59323 0.92628,-1.12617 1.55478,-1.45909 0.54854,-0.29014 1.19695,-0.38467 1.81791,-0.40664 0.63637,-0.0231 1.3031,0.0385 1.88966,0.28704 0.3875,0.16453 0.92361,0.3524 1.00463,0.76542 z m 1.29312,-9.69052 -0.64254,6.12262 c 0,0 -1.68393,-0.96858 -2.605,-1.25148 -0.73032,-0.22434 -1.50312,-0.36654 -2.26624,-0.33838 -0.97069,0.0345 -1.91182,0.22099 -2.81751,0.57088 -0.9185,0.35497 -1.78344,0.94565 -2.49338,1.62792 -0.88025,0.84538 -1.51404,1.90455 -2.02977,3.0106 -0.39653,0.84993 -0.69517,1.75284 -0.87975,2.67232 -0.22875,1.14241 -0.44415,2.38719 -0.43937,3.55197 0.01,1.44865 0.0623,2.89489 0.54092,4.26214 0.25525,0.72907 0.71643,1.40578 1.28572,1.9283 0.56835,0.52207 1.29566,0.87604 2.02935,1.11621 0.41072,0.13491 0.85346,0.17274 1.28579,0.16935 1.00285,-0.01 2.03715,-0.0883 2.97671,-0.43999 0.66497,-0.2489 1.21759,-0.73399 1.79298,-1.1502 0.75304,-0.54475 2.16476,-1.86006 2.16476,-1.86006 l 0,1.62374 -0.5751,0 0,1.48807 6.86709,0 0,-2.84135 -1.92841,0 3.21374,-23.57782 -7.37422,0 0,2.33412 z m -93.60062,7.55781 2.33363,15.57933 6.23084,0 4.04243,-11.34169 1.62654,11.34169 5.88425,0 7.05633,-16.38872 0,-2.0141 -6.1713,0 0,2.82349 1.88966,0 -4.04243,10.16973 -0.74151,0 -1.29167,-12.55773 -5.38194,0 -4.7361,12.50989 -1.55478,-12.94538 -6.86496,0 0,2.82349 z m -12.15,0.72146 c -0.56264,0.0892 -1.03524,0.17358 -1.53086,0.45447 -0.737,0.41808 -1.46132,0.95771 -1.91357,1.67437 -0.44123,0.70048 -0.53204,1.57581 -0.66975,2.39196 -0.1751,1.04003 -0.20064,2.10306 -0.19136,3.15741 0.01,0.81614 -0.0138,1.66577 0.35879,2.39197 0.1904,0.37315 0.52874,0.80945 0.88503,1.02855 0.56015,0.34453 1.06632,0.55494 1.72222,0.598 0.72597,0.0483 1.48801,-0.18852 2.10493,-0.57408 0.59422,-0.37072 1.03334,-0.97401 1.38735,-1.5787 0.46117,-0.78744 0.70905,-1.69257 0.90895,-2.58334 0.20377,-0.90704 0.33579,-1.84565 0.28703,-2.77468 -0.0491,-0.92714 -0.18211,-1.88434 -0.57407,-2.72684 -0.2728,-0.58681 -0.70954,-1.00753 -1.29166,-1.29165 -0.44403,-0.21628 -0.99455,-0.24402 -1.48303,-0.16744 z m -6.62442,-0.73581 c 0.65404,-0.6664 1.4072,-1.25479 2.23273,-1.69161 1.0305,-0.54505 2.16429,-0.92749 3.31518,-1.11604 1.51307,-0.24806 3.09342,-0.2847 4.60036,0 0.88055,0.16632 1.78322,0.44742 2.50307,0.98113 0.77409,0.57312 1.35279,1.40936 1.79291,2.26639 0.42901,0.83457 0.6828,1.77223 0.77798,2.70605 0.16564,1.61985 0.024,3.29135 -0.37201,4.87103 -0.33328,1.33759 -0.88436,2.64754 -1.65745,3.78889 -0.67549,0.99679 -1.52894,1.91262 -2.53721,2.5709 -0.89957,0.58746 -1.9718,0.87641 -3.01035,1.15006 -0.87153,0.22963 -1.77166,0.4095 -2.67235,0.40576 -1.21068,-0.01 -2.47998,-0.0817 -3.58589,-0.57511 -1.09854,-0.48896 -1.89728,-1.32739 -2.60455,-2.30013 -0.61123,-0.83995 -1.02561,-1.59975 -1.31932,-2.87516 -0.2125,-0.9233 -0.40006,-2.19912 -0.37215,-3.14592 0.0335,-1.16537 0.3568,-2.74121 0.83416,-3.80434 0.52547,-1.17098 1.17609,-2.3161 2.07489,-3.2319 z m 94.95184,13.82318 c -2.20516,1.01761 -4.61429,1.69636 -7.02343,1.69636 -5.32726,0 -7.22678,-3.12145 -7.22678,-7.22678 0,-7.1251 4.54685,-11.19645 10.0772,-11.19645 3.7324,0 5.56453,1.69625 5.56453,4.47856 0,4.85189 -5.12329,6.27735 -10.41633,6.82001 0.10168,1.73076 0.81446,3.32485 3.3592,3.32485 1.2218,0 2.88401,-0.37315 4.91982,-1.22099 z m -3.22292,-11.77374 c 0,-0.81423 -0.57695,-1.28891 -1.62876,-1.28891 -1.89988,0 -3.46041,1.66212 -3.96978,4.34287 1.45897,-0.20368 5.59854,-0.91613 5.59854,-3.05396 z m -30.33408,11.77374 c -2.2054,1.01761 -4.61457,1.69636 -7.02371,1.69636 -5.32653,0 -7.22671,-3.12145 -7.22671,-7.22678 0,-7.1251 4.54679,-11.19645 10.07785,-11.19645 3.73175,0 5.56382,1.69625 5.56382,4.47856 0,4.85189 -5.12273,6.27735 -10.41568,6.82001 0.10142,1.73076 0.81422,3.32485 3.35884,3.32485 1.22158,0 2.8842,-0.37315 4.91994,-1.22099 z m -3.22305,-11.77374 c 0,-0.81423 -0.57638,-1.28891 -1.62883,-1.28891 -1.89959,0 -3.46023,1.66212 -3.96971,4.34287 1.4591,-0.20368 5.59854,-0.91613 5.59854,-3.05396 z m -82.36051,20.5268 -0.0679,-0.13571 0.98406,-5.66614 2.10303,-15.16698 c 0.0687,-0.40664 -0.0332,-0.61046 -0.30522,-0.71214 l -1.66259,-0.61111 0.37379,-2.57855 6.78556,0 -0.40663,2.71427 0.10142,0.0335 c 2.0016,-1.86631 4.10566,-3.08743 6.24306,-3.08743 2.91821,0 4.95366,1.86577 4.95366,6.78561 0,4.68241 -1.83206,11.6379 -8.14271,11.6379 -2.20534,0 -3.42694,-0.84825 -4.68256,-1.73039 l -0.74621,5.08917 c -0.0341,0.37361 0.0326,0.50898 0.47457,0.54273 l 3.42697,0.33969 -0.37385,2.5447 -9.0589,0 z m 6.78613,-12.04485 c 0.84787,0.71258 1.96788,1.32305 3.22348,1.32305 2.74798,0 3.76601,-3.86811 3.76601,-6.85368 0,-2.002 -0.47476,-3.32542 -1.76432,-3.32542 -1.35696,0 -3.08763,1.4591 -4.30913,2.54506 z m 81.08934,4.85147 0.33969,-2.54464 1.56064,-0.2038 c 0.47498,-0.0683 0.5429,-0.1695 0.61084,-0.67837 l 1.42466,-10.34864 c 0.0335,-0.37315 -0.0335,-0.61046 -0.33914,-0.71214 l -1.69691,-0.61111 0.37365,-2.57855 6.71797,0 -0.44097,3.05395 0.10191,0.0679 c 1.32326,-1.89982 3.22359,-3.46042 5.39485,-3.46042 0.7463,0 2.0359,0.13582 2.61295,0.30538 l -0.84863,6.17508 -3.96972,-0.13582 -0.10157,-1.76443 c -0.0335,-0.30537 -0.10223,-0.40701 -0.37391,-0.40701 -0.64452,0 -1.69636,0.78027 -2.64651,1.76455 l -1.18674,8.61817 c -0.0687,0.54303 -0.0334,0.64474 0.47477,0.67874 l 3.22351,0.27142 -0.37384,2.51081 -10.8575,0 z"
- inkscape:connector-curvature="0"
- sodipodi:nodetypes="cssscccccccccccccccccssssssssccssscssssscsssccccccccsssssssssccsccsssssssssscsscccccccccccccccccccccccccccccccsssscsssssscscsssssssscsssssssssscsssscsccsscscsssscsccsscsccccccccccsssccccccccssscccccccccccccsccccsccccccc" /><path
- sodipodi:nodetypes="cssscccccccccccccccccssssssssccssscssssscsssccccccccsssssssssccsccsssssssssscsscccccccccccccccccccccccccccccccsssscsssssscscsssssssscsssssssssscsssscsccsscscsssscsccsscsccccccccccsssccccccccssscccccccccccccsccccsccccccc"
- inkscape:connector-curvature="0"
- d="m 509.55935,174.26011 c 0.63327,0.31663 2.06355,1.10555 3.19256,1.13455 0.61476,0.0158 1.25757,-0.18443 1.76781,-0.5277 1.3288,-0.89397 2.46618,-2.23946 3.00784,-3.74661 0.21419,-0.59598 0.0258,-1.89972 0.0258,-1.89972 l -4.22153,-15.51428 -2.18993,0 0.55406,-2.95501 7.01835,0 2.82313,13.48255 5.27696,-10.68586 -2.21631,0 0,-2.92858 7.94179,0 -12.13698,24.69605 -1.87332,2.11078 -2.5329,1.4776 -2.71762,0.29022 -2.53295,-0.23748 -3.08699,-1.50392 z m -13.30698,-16.06545 c -1.0335,2.08005 -1.87803,4.80122 -0.90274,6.90883 0.4032,0.87116 1.49018,1.31738 2.4179,1.56347 0.67214,0.17793 1.42477,0.1102 2.08233,-0.11548 0.53084,-0.1826 0.97383,-0.5762 1.38432,-0.9593 0.44502,-0.4157 0.85733,-0.8875 1.14176,-1.42582 0.24113,-0.45665 0.44375,-0.93526 0.54404,-1.44168 0.22797,-1.1566 0.3958,-2.3252 0.37043,-3.50371 -0.0204,-0.96413 -0.0869,-2.06387 -0.52631,-2.92259 -0.29054,-0.56679 -0.84946,-0.79259 -1.46826,-0.94463 -0.46761,-0.11559 -0.89829,-0.0686 -1.34322,0.11597 -0.72226,0.30083 -1.38368,0.5859 -2.00879,1.05634 -0.63242,0.4762 -1.33915,0.9593 -1.69146,1.6686 z m 0.72346,-4.75648 c 0,0 2.41951,-1.99358 3.81169,-2.50482 0.79109,-0.29085 3.80953,-0.71977 4.57766,-0.3726 1.6247,0.73503 2.49408,1.73759 3.00274,2.86791 0.50868,1.13043 0.77154,2.86756 0.87911,4.12137 0.14648,1.71007 -0.15092,4.16549 -0.58904,6.34083 -0.33179,1.64636 -1.12383,3.02703 -2.02388,4.32576 -1.17506,1.6957 -2.01178,2.37286 -4.04556,2.72004 -1.09051,0.18629 -2.13814,0.51607 -3.59006,0.10268 -1.5866,-0.45183 -2.59522,-0.89615 -3.74599,-1.8017 -0.79994,-0.62933 -1.28003,-1.6992 -1.28003,-1.6992 l 0,3.11766 -5.39426,0 3.74898,-25.38802 -2.12052,-0.94738 0.0443,-2.62669 8.00657,0.0587 z m -26.22853,2.43167 c 0.32185,1.64663 0.0893,5.33062 -0.9498,7.38781 -0.33781,0.66857 -1.04588,1.46667 -1.7151,1.8733 -1.11975,0.68073 -2.44527,1.33822 -3.7466,1.18729 -0.52883,-0.0601 -1.07036,-0.37888 -1.37203,-0.81791 -0.52601,-0.76478 -0.48121,-1.71012 -0.50128,-2.63848 -0.0263,-1.17893 0.14487,-2.46835 0.42212,-3.6147 0.20635,-0.8543 0.4665,-1.74564 0.94981,-2.48024 0.43067,-0.65433 1.02178,-1.24217 1.71508,-1.60939 0.60504,-0.32004 1.32025,-0.42437 2.00521,-0.44854 0.70197,-0.0251 1.4374,0.0425 2.08446,0.31654 0.4274,0.18153 1.01882,0.3888 1.10813,0.84432 z m 1.42642,-10.68922 -0.70874,6.75362 c 0,0 -1.85753,-1.06838 -2.8735,-1.38048 -0.80562,-0.24744 -1.65802,-0.40424 -2.49984,-0.37318 -1.07069,0.0382 -2.10882,0.24369 -3.1078,0.62968 -1.01321,0.39157 -1.96724,1.04315 -2.75039,1.79572 -0.97095,0.93248 -1.67003,2.10085 -2.23897,3.3208 -0.43738,0.93753 -0.76677,1.93354 -0.9704,2.94777 -0.2523,1.26016 -0.4899,2.63324 -0.48461,3.91802 0.011,1.59795 0.0683,3.19329 0.59661,4.70144 0.28155,0.80417 0.79028,1.55058 1.41822,2.127 0.62695,0.57587 1.4292,0.96634 2.23856,1.23121 0.45301,0.14881 0.94135,0.19054 1.41828,0.18685 1.10615,-0.011 2.24705,-0.0973 3.28346,-0.48539 0.73352,-0.2745 1.34304,-0.80959 1.97773,-1.2687 0.83064,-0.60085 2.38786,-2.05176 2.38786,-2.05176 l 0,1.79104 -0.63429,0 0,1.64147 7.57478,0 0,-3.13415 -2.12721,0 3.54494,-26.00772 -8.13411,0 0,2.57462 z m -103.24702,8.33671 2.57413,17.18493 6.87304,0 4.45903,-12.51049 1.79414,12.51049 6.49065,0 7.78353,-18.07772 0,-2.2217 -6.8073,0 0,3.11449 2.08446,0 -4.45903,11.21783 -0.8179,0 -1.42488,-13.85193 -5.93654,0 -5.2242,13.79919 -1.71497,-14.27958 -7.57246,0 0,3.11449 z m -13.4021,0.79586 c -0.62064,0.0982 -1.14194,0.19148 -1.68866,0.50127 -0.813,0.46118 -1.61192,1.05641 -2.11077,1.84697 -0.48673,0.77268 -0.58683,1.73821 -0.73875,2.63846 -0.1932,1.14723 -0.22134,2.31976 -0.21116,3.48281 0.011,0.90024 -0.0148,1.83747 0.39579,2.63847 0.21,0.41165 0.58324,0.89285 0.97623,1.13455 0.61796,0.38003 1.17622,0.61214 1.89972,0.6596 0.80077,0.0533 1.64141,-0.20792 2.32189,-0.63318 0.65546,-0.40892 1.13978,-1.07441 1.53029,-1.7414 0.50878,-0.86864 0.78215,-1.86707 1.00265,-2.84964 0.22477,-1.00044 0.37039,-2.03585 0.31663,-3.06058 -0.0541,-1.02274 -0.20091,-2.07854 -0.63327,-3.00784 -0.3009,-0.64731 -0.78264,-1.11143 -1.42476,-1.42485 -0.48983,-0.23858 -1.09705,-0.26912 -1.63583,-0.18464 z m -7.30711,-0.81171 c 0.72143,-0.735 1.55219,-1.38409 2.46282,-1.86591 1.1367,-0.60125 2.38729,-1.02309 3.65678,-1.23104 1.66908,-0.27366 3.41222,-0.314 5.07446,0 0.97135,0.18342 1.96702,0.49352 2.76107,1.08223 0.85389,0.63222 1.49219,1.55466 1.97771,2.49999 0.47321,0.92057 0.7531,1.95483 0.85808,2.98495 0.18274,1.78675 0.0263,3.63055 -0.41031,5.37303 -0.36757,1.47539 -0.97545,2.92034 -1.82825,4.17929 -0.74509,1.09959 -1.68654,2.10982 -2.79871,2.8359 -0.99227,0.64796 -2.175,0.96671 -3.32055,1.26856 -0.96139,0.25333 -1.95426,0.4517 -2.94774,0.44756 -1.33549,-0.011 -2.73559,-0.0897 -3.9555,-0.63431 -1.21174,-0.53936 -2.09278,-1.46419 -2.87295,-2.53723 -0.67423,-0.92645 -1.13131,-1.76457 -1.45532,-3.17146 -0.2344,-1.0184 -0.44126,-2.42572 -0.41044,-3.47012 0.0365,-1.28547 0.39349,-3.02371 0.92005,-4.19644 0.57967,-1.29168 1.29729,-2.5548 2.2888,-3.565 z m 104.73744,15.24778 c -2.43247,1.12251 -5.0899,1.87126 -7.74734,1.87126 -5.87626,0 -7.97147,-3.44315 -7.97147,-7.97158 0,-7.8594 5.0154,-12.35035 11.11569,-12.35035 4.11711,0 6.13803,1.87105 6.13803,4.94016 0,5.35189 -5.65129,6.92425 -11.48983,7.52281 0.11219,1.90916 0.89836,3.66755 3.7054,3.66755 1.3477,0 3.18121,-0.41165 5.42682,-1.34689 z m -3.55513,-12.98704 c 0,-0.89823 -0.63635,-1.42181 -1.79655,-1.42181 -2.09568,0 -3.81712,1.83342 -4.37899,4.79047 1.60937,-0.22468 6.17554,-1.01053 6.17554,-3.36866 z m -33.46028,12.98704 c -2.4327,1.12251 -5.09006,1.87126 -7.74751,1.87126 -5.87553,0 -7.97151,-3.44315 -7.97151,-7.97158 0,-7.8594 5.01539,-12.35035 11.11645,-12.35035 4.11635,0 6.13722,1.87105 6.13722,4.94016 0,5.35189 -5.65062,6.92425 -11.48908,7.52281 0.11182,1.90916 0.89812,3.66755 3.70494,3.66755 1.34748,0 3.1815,-0.41165 5.42704,-1.34689 z m -3.55514,-12.98704 c 0,-0.89823 -0.63578,-1.42181 -1.79674,-1.42181 -2.09539,0 -3.81683,1.83342 -4.37881,4.79047 1.60951,-0.22468 6.17555,-1.01053 6.17555,-3.36866 z m -90.84852,22.6422 -0.0749,-0.14971 1.08546,-6.25004 2.31984,-16.73008 c 0.0757,-0.44854 -0.0367,-0.67336 -0.33673,-0.78554 l -1.83388,-0.67411 0.41228,-2.84425 7.48486,0 -0.44853,2.99397 0.11182,0.0371 c 2.2079,-2.05871 4.52887,-3.40563 6.88646,-3.40563 3.21901,0 5.46427,2.05807 5.46427,7.48491 0,5.16501 -2.02094,12.8373 -8.98192,12.8373 -2.43264,0 -3.78014,-0.93565 -5.16516,-1.90869 l -0.82311,5.61357 c -0.0376,0.41212 0.0356,0.56148 0.52347,0.59873 l 3.78017,0.37469 -0.41234,2.8069 -9.9925,0 z m 7.48553,-13.28615 c 0.93528,0.78598 2.17068,1.45946 3.55568,1.45946 3.03118,0 4.15411,-4.26682 4.15411,-7.56009 0,-2.2083 -0.52366,-3.66812 -1.94612,-3.66812 -1.49686,0 -3.40583,1.6095 -4.75323,2.80736 z m 89.44624,5.35147 0.37469,-2.80694 1.72154,-0.2248 c 0.52388,-0.0753 0.5988,-0.1869 0.67374,-0.74827 l 1.57152,-11.41514 c 0.0365,-0.41155 -0.0368,-0.67336 -0.3741,-0.78554 l -1.87181,-0.67411 0.41215,-2.84425 7.41037,0 -0.48647,3.36865 0.11241,0.0749 c 1.45966,-2.09562 3.55581,-3.81702 5.95085,-3.81702 0.8232,0 2.2457,0.14982 2.88225,0.33688 l -0.93613,6.81148 -4.37882,-0.14982 -0.11196,-1.94633 c -0.0371,-0.33677 -0.11284,-0.44891 -0.41252,-0.44891 -0.71092,0 -1.87116,0.86067 -2.91921,1.94635 l -1.30904,9.50637 c -0.0757,0.59903 -0.0368,0.71124 0.52367,0.74874 l 3.55571,0.29932 -0.41234,2.76961 -11.9765,0 z"
- style="fill:url(#linearGradient5134);fill-opacity:1;stroke:none"
- id="path5080" /></g><path
- fill="#E2E2E2"
- d="M256.023,135.437H196.36c-16.432,0-29.8,13.368-29.8,29.8v73.527c0,16.432,13.368,29.8,29.8,29.8h59.663 c16.433,0,29.801-13.368,29.801-29.8v-73.527C285.824,148.805,272.456,135.437,256.023,135.437z M191.561,165.236 c0-2.646,2.153-4.8,4.8-4.8h59.663c2.647,0,4.801,2.153,4.801,4.8v73.527c0,2.646-2.153,4.8-4.801,4.8H196.36 c-2.646,0-4.8-2.153-4.8-4.8V165.236z"
- id="path3" /><path
- d="m 531.664,250.155 h 18.498 l -2.809,18.064 h 5.59 37.586 l 2.6,-17.718 c 4.98,-1.091 9.133,-3.455 12.512,-6.693 3.084,4.075 8.566,7.37 18.252,7.37 6.338,0 12.775,-1.807 17.174,-3.687 4.254,2.399 9.463,3.687 15.459,3.687 3.088,0 6.236,-0.355 9.426,-1.023 h 67.135 l 3.354,-24.827 -5.445,-0.764 1.879,-13.356 c 0.371,-2.386 0.449,-4.66 0.449,-6.156 l -0.008,-0.375 c -0.457,-12.191 -8.139,-19.765 -20.045,-19.765 -2.404,0 -4.623,0.314 -6.676,0.852 h -34.189 l -0.035,0.244 c -2.527,-0.701 -5.41,-1.096 -8.686,-1.096 -3.801,0 -7.406,0.555 -10.76,1.598 l 0.105,-0.746 h -12.467 l 1.826,-12.951 H 615.08 l -1.846,7.658 c -1.373,5.704 -2.213,5.793 -4.453,6.03 l -4.508,0.477 c -3.049,-1.424 -6.357,-2.065 -9.602,-2.065 -2.135,0 -4.275,0.284 -6.416,0.852 h -19.291 c 0.502,-1.772 0.775,-3.674 0.775,-5.678 0,-9.601 -6.846,-16.305 -16.646,-16.305 -11.055,0 -18.775,7.721 -18.775,18.776 0,0.951 0.082,1.869 0.219,2.764 -2.135,-0.288 -4.277,-0.409 -5.553,-0.409 -2.053,0 -4.072,0.288 -6.045,0.852 h -31.342 c -2.74,-0.553 -5.641,-0.852 -8.537,-0.852 -7.138,0 -13.492,1.674 -18.808,4.723 l -3.451,-1.461 c -3.711,-1.571 -11.232,-3.262 -18.979,-3.262 -8.933,0 -16.383,2.56 -21.576,7.016 -3.265,-4.473 -8.523,-7.016 -15.228,-7.016 -4.822,0 -9.021,1.477 -12.572,3.44 -2.996,-2.204 -6.796,-3.44 -11.115,-3.44 -2.327,0 -4.48,0.315 -6.476,0.852 h -33.963 l -0.035,0.245 c -2.526,-0.702 -5.41,-1.097 -8.687,-1.097 -20.458,0 -35.307,16.031 -35.307,38.117 0,17.363 10.785,28.149 28.148,28.149 3.087,0 6.236,-0.356 9.426,-1.023 h 88.816 c 3.706,0.676 7.669,1.023 11.154,1.023 8.907,0 16.278,-2.375 21.51,-6.593 4.872,4.252 11.585,6.593 19.728,6.593 3.053,0 6.206,-0.368 9.286,-1.023 h 44.664 2.069 z"
- id="path5"
- inkscape:connector-curvature="0"
- style="fill:#e2e2e2" /><path
- fill="#F5F5F5"
- d="M255.023,133.437H195.36c-16.432,0-29.8,13.368-29.8,29.8v73.527c0,16.432,13.368,29.8,29.8,29.8h59.663 c16.433,0,29.801-13.368,29.801-29.8v-73.527C284.824,146.805,271.456,133.437,255.023,133.437z M190.561,163.236 c0-2.646,2.153-4.8,4.8-4.8h59.663c2.647,0,4.801,2.153,4.801,4.8v73.527c0,2.646-2.153,4.8-4.801,4.8H195.36 c-2.646,0-4.8-2.153-4.8-4.8V163.236z"
- id="path7" /><g
- id="g9"><g
- id="g11"><path
- fill="#FBFDF8"
- d="M195.361,251.626c-8.161,0-14.8-6.64-14.8-14.8v-73.527c0-8.161,6.639-14.8,14.8-14.8h59.663 c8.161,0,14.8,6.639,14.8,14.8v73.527c0,8.16-6.639,14.8-14.8,14.8H195.361z"
- id="path13" /><path
- fill="#F0F4E1"
- d="M255.024,152.499c5.964,0,10.8,4.835,10.8,10.8v73.527c0,5.965-4.835,10.8-10.8,10.8h-59.663 c-5.964,0-10.8-4.835-10.8-10.8v-73.527c0-5.964,4.835-10.8,10.8-10.8H255.024 M255.024,144.499h-59.663 c-10.366,0-18.8,8.434-18.8,18.8v73.527c0,10.366,8.434,18.8,18.8,18.8h59.663c10.366,0,18.8-8.434,18.8-18.8v-73.527 C273.824,152.933,265.391,144.499,255.024,144.499L255.024,144.499z"
- id="path15" /></g><defs
- id="defs17"><filter
- id="Adobe_OpacityMaskFilter"
- filterUnits="userSpaceOnUse"
- x="176.562"
- y="144.499"
- width="97.263"
- height="111.127"><feColorMatrix
- type="matrix"
- values="-1 0 0 0 1 0 -1 0 0 1 0 0 -1 0 1 0 0 0 1 0"
- color-interpolation-filters="sRGB"
- result="source"
- id="feColorMatrix20" /></filter></defs><mask
- maskUnits="userSpaceOnUse"
- x="176.562"
- y="144.499"
- width="97.263"
- height="111.127"
- id="SVGID_1_"><g
- filter="url(#Adobe_OpacityMaskFilter)"
- id="g23"><image
- overflow="visible"
- width="422"
- height="480"
- xlink:href="data:image/jpeg;base64,/9j/4AAQSkZJRgABAgEBLAEsAAD/7AARRHVja3kAAQAEAAAAHgAA/+4AIUFkb2JlAGTAAAAAAQMA EAMCAwYAAAg2AAAQ4QAAF1b/2wCEABALCwsMCxAMDBAXDw0PFxsUEBAUGx8XFxcXFx8eFxoaGhoX Hh4jJSclIx4vLzMzLy9AQEBAQEBAQEBAQEBAQEABEQ8PERMRFRISFRQRFBEUGhQWFhQaJhoaHBoa JjAjHh4eHiMwKy4nJycuKzU1MDA1NUBAP0BAQEBAQEBAQEBAQP/CABEIAeMBqQMBIgACEQEDEQH/ xACjAAEAAgMBAQAAAAAAAAAAAAAABQYBAwQHAgEBAQAAAAAAAAAAAAAAAAAAAAEQAAEDAQQKAwAC AwEAAAAAAAABAwQCMRMUBRBQEjMVJQYWNgcgESEwI5AiMkARAAEBAwsEAQIFAwUBAAAAAAABMQID EFAycqOz0wQ0RaURIXGRIEFRMGEiExRAgRKh0SMzQxUSAQAAAAAAAAAAAAAAAAAAAJD/2gAMAwEA AhEDEQAAANUJsrZYFfFgV8WBXxYEL0ki5fo6GjJuaRuaRuaRuaRuaRuaRuaRuaRuaRuaRuaRuaRu aRuaMHQ5dR3ojnJ9XxYFfFgV8WD0jxf2AodbslbAD6mDhlpLvI/qkuiovZL7CGzNfRCJwQacEGnB Bp0QSdEEnRBJ0QSdEEnRBJ3BBpwQacEHidwQXzPfBA6bBqK5w2nlKVH3iJitt+gAeweP+wFDrdkr Y+vmaN02k6+e3d2Gjo6N0c2zoyaM7xozuGluGluGluGluGluGluGluGluGluGluGluGnG8c/z1YO PVIfJF80xoIGPsfBVVrl6hIrD7+B7B4/7AUOt2StnXaYyxHTJ6ZKvrqb4x9MgAAAAAAAAAAAAAAA DGR8692Dh4pbkIKJscTVNiLdVY1+weP+wFDgJ+JLJORs3XbIc3dGz6ZAAAAAAAAAAAAAAAAAAAPn R0ayMi5uLqv1S51eIT2Dx/2AofB38Ra5uIm6kOzm6o+gAAAAAAAAAAAAAAAAAAAPj7+TkjJWNIOt 2et1WfYPH/YIofH2cZcJyEnKkenn6IyAAAAAAAAAAAAAAAAAAABjODmjZONIWt2WtVWPYPH/AGCK Hx9nIXGcg5ypLfo3xkAAAAAAAAAAAAAAAAAAADGcHPGyUaQ1astaqseweP8AsEUPk6+QuM7BTtSW 7TujIAAAAAAAAAAAAAAAAAAAGM4OeOkY4hqzZqzVY9g8f9gih8nXyFxnYKdqS3ad0ZAAAAAAAAAA AAAAAAAAAAxnBzx0jHENWbNWarHsHj/sEUPk6+QuM7BTtSW7TujIAAAAAAAAAAAAAAAAAAAGM4Oe OkY4hqzZqzVY9g8f9gih8nXyFxnYKdqS3ad0ZAAAAAAAAAAAAAAAAAAAAxnBzx0jHENWbNWarHsH j/sEUPk6+QuM7BTtSW7TujIAAAAAAAAAAAAAAAAAAAGM4OeOkY4hqzZqzVY9g8f9gih8nXyFxnYK dqS3ad0ZAAAAAAAAAAAAAAAAAAAAxnBzx0jHENWbNWarHsHj/sEUPk6+QuM7BTtSW7TujIAAAAAA AAAAAAAAAAAAAGM4OeOkY4hqzZqzVY9g8f8AYIofJ18hcZ2Cnakt2ndGQAAAAAAAAAAAAAAAAAAA MZwc8dIxxDVmzVmqx7B4/wCwRQ+Tr5C4zsFO1JbtO6MgAAAAAAAAAAAAAAAAAAAYzg546RjiGrNm rNVj2Dx/2CKHydfIXGdgp2pLdp3RkAAAAAAAAAAAAAAAAAAADGcHPHSMcQ1Zs1ZqseweP+wRQ+Tr 5C4zsFO1JbtO6MgAAAAAAAAAAAAAAAAAAAYzg546RjiGrNmrNVj2Dx/2CKHydfIXGdgp2pLdp3Rk AAAAAAAAAAAAAAAAAAADGcHPHSMcQ1Zs1ZqseweP+wRQ+Tr5C4zsFO1JbtO6MgAAAAAAAAAAAAAA AAAAAYzg546RjiGrNmrNVj2Dx/2CKHydfIXGdgp2pLdp3RkAAAAAAAAAAAAAAAAAAADGcHPHSMcQ 1Zs1ZqseweP+wRQ+Tr4y5TkHOVJb9G+MgAAAAAAAAAAAAAAAAAAAYzg542SjSGrVlrVVj2Dx/wBg ih8fZxlxnIKcqT6ObpjIAAAAAAAAAAAAAAAAAAAGM4OeNkY0h61Za1VY9g8f9gih8Xbwlxm4GbqW 6uLrj7AAAAAAAAAAAAAAAAAAAA+fr5OaNkI0ia1Y61Vb9g8f9gihxknCl1m65N1OdsZ3x0ZxkAAA AAAAAAAAAAAAAAAAx8fek5ozui6jazYKsRPsHj/sEUOu2Ktlqn6XZ6scjBSRLbOPpjYxkAAAAAAA AAAAAAAAAAYfJjm+uM0xXVE1xVOZr0Y9g8f9gKHW7JWz7s1W6i9SdYlasXXB9pLbI7fHY5/s3NeT 7fGT6fI+nyPp8j6fI+nyPp8j6fI+nyPp8j6fI+nyPp8D7x8fJtxp1m7Tp5jbw/MfWIjbXTk5SHsH j/sBQ63ZK2AdthqO8vXbUZWrJ0V/oJ7ZB7Sa+ofJMIkS6IySyJRLIkSyJEsiRLIkSyJEsiRLIkSy JVLYiRLYicEr8xfwSemN0kjy8PIdkfxQp0xWEAPYPH/YCh1uyVsAAz08ome2si37qZkumaULspIu 2aRkuyki7KSLspIuyki7KSLspIuyki7KSLtilC6qSLtilC6fNNFu5qz8k7wcI+vkAAHsHj/sBWoQ AAAAAAAAAAAAAAAAAAAAAAAAAHpAf//aAAgBAgABBQD/ACi//9oACAEDAAEFAP8AKL//2gAIAQEA AQUA6w6rz/LM+776rO++qzvvqs776rO++qzvvqs776rO++qzvvqs776rO++qzvvqs776rO++qzvv qs776rO++qzvvqs776rO++qzvvqs776rO++qzvvqs776rO++qzvvqs776rO++qzvvqs776rO++qz vvqs776rO++qzvvqs776rO++qzvvqs776rO++qzvvqs776rO++qzvvqs776rO++qzvvqs776rO++ qzvvqs776rMfLPYHlHyRFUbivuDeUv1FOSVKJkRwE4CcAOAHADgBwA4AcAOAHADgBwA4AcAOAHAD gBwA4AcAOAHADgBwA4AcAOAnARciFyRUK8ndQcgyGxaaqf4fYHlHwRFUjZe68RsqbpGoKIUQkKYY kISEYJDAmBMCYEwJgTAmBMCYEwJgTAmBMCYEwJgTAmBMCYEwJgTAmCQWELCKoSFcNByEhIyxusk5 VVQV0VUL8vYHlGltupyqDlaIMREQaijcUoilMUSKgkZDDIYZDDIYZDDIYZDDIYZDDIYZDDIYZDDI YZDDIYZDDIYZDDIYZDDIYZDDIYZDDIYZDDILGQWKVRSuKORR2KPRCZltDiSYrjFXx9geUaG26nKs vy9KEjxhmONRxuOUMFLAjIjJdF0XRdIXSF0hdF0XRdF0XRdF0XRdF0XRdF0XRdIXSF0hdIXRdCsi sisFTBXHHY49GH4xMhU10y4tTFfw9geUCJ9rlcL6SNHGGBlgbZKGilsShDZQ+kPr/wBX0fSGygtC CtoVNDjI6wPsElgzCGjlLrdTden2B5QZfGvnYbCIkdkYZGmihsSn61ItJXQOtD7JIZJTBm0X6+Hs DyhP1cpjbLcVojtDLY3QIn1qZU+yugebJDRKaJ7CVUvtq27o9geURaLx6C19JFbI7Y1QU0/WqFQd oH6CS2TG/wAzZrZd0ewPKMqo2n4VH5FoGKBunVTifj9JJpJdBnVH+mj2B5RkqfdcOki0jFJQn5qm pPx5CTSS6TOKf6tHsDyjI0/2hIRU/GUKbNU1DyfklCWhm6f06PYHlGRf9QkIqfjKCWapWx4kkszj daPYHlGQ2wrItjImqlseJJMM43Wj2B5RkNsEjWNarUeJJMM43Oj2B5RkNsEjWNarUeJJMM43Oj2B 5RkNsGyLY1qtR6ySTDONzo9geUZDbBsi2NarUesk2TDON1o9geUZDbBsjWNarUesk2TDON1o9geU ZDbBsjWNarUeskkwzjdaPYHlGQ2wbI1jWq1HrJJMM43Wj2B5RkNsGyNY1qtR6ySTDON1o9geUZDb BsjWNarUeskkwzjdaPYHlGQ2wbI1jWq1HrJJMM43Wj2B5RkNsGyNY1qtR6ySTDON1o9geUZDbBsj WNarUeskkwzjdaPYHlGQ2wbI1jWq1HrJJMM43Wj2B5RkNsGyNY1qtR6ySTDON1o9geUZDbBsjWNa rUeskkwzjdaPYHlGQ2wbI1jWq1HrJJMM43Wj2B5RkNsGyNY1qtR6ySTDON1o9geUZDbBsjWNarUe skkwzjdaPYHlGQ2wbI1jWq1HrJJMM43Wj2B5RkNsGyNY1qtR6ySTDON1o9geUZDbBsjWNarUeskk wzjdaPYHlGQ2wbI1jWq1HrJJMM43Wj2B5RkNsGyNY1qtR6ySTDON1o9geUZDbBsjWNarUeskkwzj daPYHlGQ2wbI1jWq1HrJJMM43Wj2B5RkNsGyNY1qtR6ySTDON1o9geUZDbBsjWNarUeskkwzjdaP YHlGQ2wbI1jWq1HrJNkwzjdaPYHlGQ2wbItjWq1HrJNkwzjdaPYHlGQ2wbItjWq1HrJJMM43Oj2B 5RkNsGyNY1qtR4kkwzjc6PYHlGQ2wSNY1qtR4kkwzjc6PYHlGQ2wrItjImqlseJJMM43Wj2B5RkV sJSKv4yolmqVseJJLM43Wj2B5Rkf/UJSKv4ypTZqmoeX8kqS1M43Oj2B5Rki/wC0Koi1DKlC/mqa h5SSpLUzdf6tHsDyjJ6/p2HURaxiobX81TWv4/USaiXUZy59N6PYHlGXubEiE5+RaxisaqEXVCjl Q/WSayXX+Zy59ro9geUUVbNeXPpVRFdI7gzWUVfeqK6h2skOElwmu/ST3bx/R7A8oMpk/SxHiM8M OjThTX9iLqWqr6HHB50kOkp4zSVsUVKqro9geUDLit15fLSumM+MPjTw26UuCVH2moPsWoqcK3R1 4feJD5MkIiTpKvO6fYHlGiFLViuHLSpGJAzIGnyh8peKXRHEEcQ20NtDbQ2kNpDaQ2kNpDaQ2kNp DaQ2kNpDaQ2kNpDaQ2kNpDaQ2kNpDaQ20NtDbQVxBXEFdKnit8cfHpA/IJMn6TMp+0vw9geUaYU+ pmqJNprRmUNSRuSUSSmQgkgSQI+X5fl+X5fl+X5fl+X5fl+X5fl+X5fl+X5fl+X5fl+X4r4sgWQV SCuSOSR2SPSiRLREzDMlUVVVfh7A8o+EeW4wsTNKKxmYijcsollMspliSxJZjDGIYxDGIYxDGIYx DGIYxDGIYxDGIYxDGIYxDGIYxDGIYxDGIYxDGIYxDGIYxBZYssqllUsrljksdmISsxooSVmLjyqq r8vYHlHxRVRWZ77QznNI3mzSlGZUKU5hSJmKHEUOIocRQ4jScRQ4ihxFDiKHEUOIocRQ4ihxFDiK HEUOIocRQ4ihxFDiKHEUOIocRpOIocRQ4ihxFBcxQXMEKsxpHM1aQezmhB/M3nCquqtfn7A8o/hS utC9dL50vnS/eL94v3i/eL94v3i/eL94v3i/eL94v3i/eL94v3i/eL94v3i/eL94v3i/eL94v3i/ eL50vnS9dLytT7X+PrDhvHuTHJjkxyY5McmOTHJjkxyY5McmOTHJjkxyY5McmOTHJjkxyY5McmOT HJjkxyY5McmOTHJjkxyY5McmOTHJjkxyY5McmOTHJjkxyY5McmOTHJjkxyY/pP/aAAgBAgIGPwBR f//aAAgBAwIGPwBRf//aAAgBAQEGPwCPk8jmv2su47DV1z9uE90V5xHl7vuKrTXWMHDNdYwcM11j BwzXWMHDNdYwcM11jBwzXWMHDNdYwcM11jBwzXWMHDNdYwcM11jBwzXWMHDNdYwcM11jBwzXWMHD NdYwcM11jBwzXWMHDNdYwcM11jBwzXWMHDNdYwcM11jBwzXWMHDNdYwcM11jBwzXWMHDNdYwcM11 jBwzXWMHDNdYwcM11jBwzXWMHDNdYwcM11jBwzXWMHDNdYwcM11jBwzXWMHDNdYwcM11jBwzXWMH DNdYwcM11jBwzXWMHDNdYwcM11jBwzXWMHDNdYwcM11jBwzXWMHDP+z/AEd/2MzUhXbvz7H6XVO/ Y7vFJSkpSUpKUlKSlJSkpSUpKUlKSlJSkpSUpKUlKSlJSkpSUpKUlKSlJSkpSUpKUlKSlJSkp+le p3d6ndOn4OZqQrt349EOqp0QT9PVfzGDBgwYMGDBgwYMGDBgwYMGDBgwYMGDBgwYMGDBgwYMGC9X RVh9/wAjo8nRfnmakK7d+H+LqdVEefTqonYYMGDBgwYMGDBgwYMGDBgwYMGDBgwYMGDBgwYMGDBg wYMGDBeqd/uKip2+/wAszUhXbsqOutURVT9SidhgwYMlZ/XsGDBgvYVFQVOnb6fHM1IV27J0QR95 O6idhOwyaWC9hU6d/oK6v0+GZqQrt2RFVOyCdhBJrUU/cRO6N+GZqQrt06CL07qIJNiijydGjzsu ZqQrt0dd/MRBBJsUUU/y+8uZqQrt06/YQQSbFFFOv2WXM1IV26KIJNyij0uZqQrt0e8iCTcoo/Lm akK7dHvIggk2KKKPy5mpCu3R7yIJNyij8uZqQrt0e8iCTcoo/LmakK7dHvIgk3KKPy5mpCu3R7yI JNyij8uZqQrt0e8iCTaooo/LmakK7dHvIgk3KKPy5mpCu3R7yIJNyij8uZqQrt0e8iCCTaoo/Lma kK7dHvIggk2qKPy5mpCu3R7yIIJNqij8uZqQrt0e8iCCTaoo/LmakK7dHvIggk2qKPy5mpCu3R7y IIJNqij8uZqQrt0e8iCCTaoo/LmakK7dHvIggk2qKPy5mpCu3R7yIIJNqij8uZqQrt0e8iCCTaoo /LmakK7dHvIggk2qKPy5mpCu3R7yIIJNqij8uZqQrt0e8iCCTaoo/LmakK7dHvIggk2qKPy5mpCu 3R7yIIJNqij8uZqQrt0e8iCCTaoo/LmakK7dHvIggk2qKPy5mpCu3R7yIIJNqij8uZqQrt0e8iCC Taoo/LmakK7dHvIggk2qKPy5mpCu3R7yIIJNqij8uZqQrt0e8iCTcoo/LmakK7dHvIgk2qKKPy5m pCu3R7yIJNyij8uZqQrt0e8iCTcoo/LmakK7dHvIgk3KKPy5mpCu3R7yIJNyij8uZqQrt0e8iCCT aoo/LmakK7dHvIgk3KKPy5mpCu3R4QSblFHpczUhXboqfcQQSbVFFT7y5mpCu3RPzEEEmxRRRHZc zUhXbojyfRR1RBJsUUUX7JLmakK7dk/bVfAgk2KKL37qwVV+suZqQrt2RHk+giook2L3F7i9GJ8M zUhXbsqItFRFRRO40aNmVo0aL3FhuL5+OZqQrt34I69REVFGjRo0aNGjf6po0aNGjRo0XuK5DXv9 zqrV+OZqQrt349UXt9hEVeijRo0aNGjRo0aNGjRo0aNGjRo0aNGjRo0aNGjRo0aNGjRo0Xq9/YVH V6OnVflmakK7d+XVOw3qh0e7FM7PJ7KQ0aNGjRo0aNGjRo0aNGjRo0aNGjRo0aNGjRpSKaH6V6nR 3sh1eXr+BmakK7d/C7KqFJfZTX2U19lNfZTX2U19lN72U3vZTe9lN72U3vZTe9lN72U3vZTe9lN7 2U3vZTe9lN72U3vZTe9lN72U3vZTe9lN72U19lNfZTX2U19lNfZSX2d3l/Ej/wAj/wCf+7/jD6/y f5/7tBOnX+L/AMfr+5tPKm08qbTyptPKm08qbTyptPKm08qbTyptPKm08qbTyptPKm08qbTyptPK m08qbTyptPKm08qbTyptPKm08qbTyptPKm08qbTyptPKm08qbTyptPKm08qbTyptPKm08qbTyptP Km08qbTyptPKm08qbTyptPKm08qbTyptPKm08qbTyptPKm08qbTyptPKn/jan//Z"
- transform="matrix(0.24 0 0 0.24 174.5615 142.499)"
- id="image25"></image></g></mask><g
- opacity="0.09"
- mask="url(#SVGID_1_)"
- a:adobe-blending-mode="multiply"
- a:adobe-opacity-share="1"
- id="g27"><path
- fill="#1D2915"
- a:adobe-blending-mode="normal"
- a:adobe-opacity-share="0"
- d="M195.361,251.626 c-8.161,0-14.8-6.64-14.8-14.8v-73.527c0-8.161,6.639-14.8,14.8-14.8h59.663c8.161,0,14.8,6.639,14.8,14.8v73.527 c0,8.16-6.639,14.8-14.8,14.8H195.361z"
- id="path29" /><path
- fill="#1D2915"
- a:adobe-blending-mode="normal"
- a:adobe-opacity-share="0"
- d="M255.024,152.499 c5.964,0,10.8,4.835,10.8,10.8v73.527c0,5.965-4.835,10.8-10.8,10.8h-59.663c-5.964,0-10.8-4.835-10.8-10.8v-73.527 c0-5.964,4.835-10.8,10.8-10.8H255.024 M255.024,144.499h-59.663c-10.366,0-18.8,8.434-18.8,18.8v73.527 c0,10.366,8.434,18.8,18.8,18.8h59.663c10.366,0,18.8-8.434,18.8-18.8v-73.527C273.824,152.933,265.391,144.499,255.024,144.499 L255.024,144.499z"
- id="path31" /></g></g><g
- id="g33"><g
- id="g35"><linearGradient
- id="SVGID_2_"
- gradientUnits="userSpaceOnUse"
- x1="225.1929"
- y1="152.499"
- x2="225.1929"
- y2="247.6265"><stop
- offset="0.0123"
- style="stop-color:#C1D72F"
- id="stop38" /><stop
- offset="0.1394"
- style="stop-color:#BCD631"
- id="stop40" /><stop
- offset="0.5859"
- style="stop-color:#AFD136"
- id="stop42" /><stop
- offset="1"
- style="stop-color:#ABD037"
- id="stop44" /><a:midPointStop
- offset="0.0123"
- style="stop-color:#C1D72F" /><a:midPointStop
- offset="0.3086"
- style="stop-color:#C1D72F" /><a:midPointStop
- offset="1"
- style="stop-color:#ABD037" /></linearGradient><path
- d="M184.562,236.826c0,5.965,4.835,10.8,10.8,10.8h59.663c5.964,0,10.8-4.835,10.8-10.8v-73.527 c0-5.964-4.835-10.8-10.8-10.8h-59.663c-5.964,0-10.8,4.835-10.8,10.8V236.826z"
- id="path46"
- fill="url(#SVGID_2_)" /></g><defs
- id="defs48"><filter
- id="Adobe_OpacityMaskFilter_1_"
- filterUnits="userSpaceOnUse"
- x="184.562"
- y="152.499"
- width="81.263"
- height="95.127"><feColorMatrix
- type="matrix"
- values="-1 0 0 0 1 0 -1 0 0 1 0 0 -1 0 1 0 0 0 1 0"
- color-interpolation-filters="sRGB"
- result="source"
- id="feColorMatrix51" /></filter></defs><mask
- maskUnits="userSpaceOnUse"
- x="184.562"
- y="152.499"
- width="81.263"
- height="95.127"
- id="SVGID_3_"><g
- filter="url(#Adobe_OpacityMaskFilter_1_)"
- id="g54"><image
- overflow="visible"
- width="356"
- height="414"
- xlink:href="data:image/jpeg;base64,/9j/4AAQSkZJRgABAgEBLAEsAAD/7AARRHVja3kAAQAEAAAAHgAA/+4AIUFkb2JlAGTAAAAAAQMA EAMCAwYAAAXBAAALIQAAEOP/2wCEABALCwsMCxAMDBAXDw0PFxsUEBAUGx8XFxcXFx8eFxoaGhoX Hh4jJSclIx4vLzMzLy9AQEBAQEBAQEBAQEBAQEABEQ8PERMRFRISFRQRFBEUGhQWFhQaJhoaHBoa JjAjHh4eHiMwKy4nJycuKzU1MDA1NUBAP0BAQEBAQEBAQEBAQP/CABEIAaEBawMBIgACEQEDEQH/ xACYAAEAAgMBAQAAAAAAAAAAAAAABAcBBQYDAgEBAAAAAAAAAAAAAAAAAAAAABAAAAMIAwEAAgMB AAAAAAAAAAIGATIDBBQFFjZQMwcRECKQMRMSEQABAgQEBgEBBwQDAQAAAAAAAQIxcgMEEFCRsyGC M6PTNBFBIGFxEiIyE1GB0UKhscFiEgEAAAAAAAAAAAAAAAAAAACQ/9oADAMBAAIRAxEAAADy0npz Z0Dnx0DS7Q9kr0IKcIKeICeICeICeICeICeICeICeICeICeICeICeICfggp2CElQD1aXxOgc+O1s um7kKj5vpObG6d2Q9zspRA9JmSGmCHmWIiWIiWIiWIiWIiWIiWIiWIiWIiWIiWIiWIaYIeJo1sPe 4OK5C2tCVS3OmN5clN3IVHod9EOv6zWb0zkAAAAAAAAAAAAAAAAAMRJnwcVXltVuetyU3chUfp5+ 5YexhTgAAAAAAAAAAAAAAAAABjODUVxZNbnjclN3IVHIjyCx5sKaAAAAAAAAAAAAAAAAAAMZwaut rJrY8bkpu5Co5EeQWPNhTQAAAAAAAAAAAAAAAAABjODV1tZNbHjclN3IVHIjyCx5sKaAAAAAAAAA AAAAAAAAAMZwautrJrY8bkpu5Co5EeQWPNhTQAAAAAAAAAAAAAAAAABjODV1tZNbHjclN3IVHIjy Cx5sKaAAAAAAAAAAAAAAAAAAMZwautrJrY8bkpu5Co5EeQWPNhTQAAAAAAAAAAAAAAAAABjODV1t ZNbHjclN3IVHIjyCx5sKaAAAAAAAAAAAAAAAAAAMZwautrJrY8bkpu5Co5EeQWPNhTQAAAAAAAAA AAAAAAAABjODV1tZNbHjclN3IVHIjyCx5sKaAAAAAAAAAAAAAAAAAAMZwautrJrY8bkpu5Co5EeQ WPNhTQAAAAAAAAAAAAAAAAABjODV1tZNbHjclN3IVHIjyCx5sKaAAAAAAAAAAAAAAAAAAMZwautr JrY8bkpu5Co5EeQWPNhTQAAAAAAAAAAAAAAAAABjODV1tZNbHjclN3IVHIjyCx5sKaAAAAAAAAAA AAAAAAAAMZwautrJrY8bkpu5Co5EeQWPNhTQAAAAAAAAAAAAAAAAABjODV1tZNbHjclN3IVHIjyC x5sKaAAAAAAAAAAAAAAAAAAMZwautrJrY8bkpu5Co5EeQWPNhTQAAAAAAAAAAAAAAAAABjODV1tZ NbHjclN3IVHIjyCx5sKaAAAAAAAAAAAAAAAAAAMZwautrJrY8bkpu5Co5EeQWPNhTQAAAAAAAAAA AAAAAAABjODV1tZNbHjclN3IVH7+HqWTO1uxMgAAAAAAAAAAAAAAAAAYzg1Vb2NXB5XJTdyFRx5G jLc3XG9SS2MgAAAAAAAAAAAAAAAAD4+ohqq47GvTa3JTdyFR830nNm/7qp+gLVk8fuDcZgehLRBL RBLRBLRBLRBLRBLRBLRBLRBLRBLRBLRBLRBLRBLRBKQohP0MbkT40OcG8uSm7kKj5vpObAJm45sd n98SO3cQO3cQO3cQO3cQO3cQO3cQO3cQO3cQO3cQO3cQO3cQO3cQO3cQO3cQO3xxI7PX84JcQAN5 clN3IAAAAAAAAAAAAAAAAAAAAAAAf//aAAgBAgABBQD+G3//2gAIAQMAAQUA/ht//9oACAEBAAEF AFgq7/bL9narGdqsZ2qxnarGdqsZ2qxnarGdqsZ2qxnarGdqsZ2qxnarGdqsZ2qxnarGdqsZ2qxn arGdqsZ2qxnarGdqsZ2qxnarGdqsZ2qxnarGdqsZ2qxnarGdqsZ2qxnarGdqsZ2qxnarGdqsZ2qx narGdqsZ2qxnarCYVyhn78PQNo/MCUmJhssm48QEScNrGJGEMQgjEIIxCCMQgjEIIxCCMQgjEIIx CCMQgjEIIxCCMQgjEIIxCCMQgjEIIxCCMQgjEIIxCCMQgjEIIxCCMQgjEIIxCCMQgjEIQakYQOlI bGTCajw2R5SPLm/KK2gegbR+LVYzzDZGzFKyBaysYS3FYGSBBQkFCQUJBQkFCQUJBQkFCQUJBQkF CQUJBQkFCQUJBQkFCQUJBQkFCQUJBQkFCQUJBQkFCQUJBQkFCQNkCA9uK0R7WVrJ+ykMy6WI8BrW NY0IraB6BtAsdqbMHtttYxkvKFKxhCs4JpCtExKFMy5W5jWX22NgRAitoHoG0SsBsePZZFhSSkuw peFm5dhi3qRKYk1BbAjoraB6BtCcl/8ASYtUBjCkL8Lwp2fS3WCxpVDA/wA5lFbQPQNoShGNLbif CcM3+roX9VQz4ZFbQPQNoSLP0t7P04e5uql5FbQPQNoSPXIOcPc3VU8itoHoG0JHrkHOHubqqeRW 0D0DaEj1yDnD3N1VPIraB6BtCR65Bzh7m6qnkVtA9A2hI9cg5w9zdVTyK2gegbQkeuQc4e5uqp5F bQPQNoSPXIOcPc3VU8itoHoG0JHrkHOHubqqeRW0D0DaEj1yDnD3N1VPIraB6BtCR65Bzh7m6qnk VtA9A2hI9cg5w9zdVTyK2gegbQkeuQc4e5uqp5FbQPQNoSPXIOcPc3VU8itoHoG0JHrkHOHubqqe RW0D0DaEj1yDnD3N1VPIraB6BtCR65Bzh7m6qnkVtA9A2hI9cg5w9zdVTyK2gegbQkeuQc4e5uqp 5FbQPQNoSPXIOcPc3VU8itoHoG0JHrkHOHubqqeRW0D0DaEj1yDnD3N1VPIraB6BtCR65Bzh7m6q nkVtA9A2hI9cg5w9zdVTyK2gegbQkeuQc4e5uqp5FbQPQNoSPXIOcPc3VU8itoHoG0JHrkHOHubq qeRW0D0DaEj1yDnD3N1VPIraB6BtCR65Bzh7m6qnkVtA9A2hI9cg5w9zdVTyK2gegbQkeuQc4e5u qp5FbQPQNoSPXIOcPc3VU8itoHoG0JHrkHOHubqqeRW0D0DaEj1yDnD3N1VPIraB6BtCR65Bzh7m 6qnkVtA9A2hI9cg5w9zdVTyK2gegbQkeuQc4e5uqp5FbQPQNoSLlvb+nD3N1UvIraB6BtCTN8Jbj /ScM3+rob9VQ36ZFbQPQNoTUx/xGtcdjSlb9ZwsRvwt1jMYVRR/+5hFbQPQNokZinmbPOsaWVjsM XhZuOwpbxOsYWcjtjzCK2gegbQLDdv8ANtuuDGsgTJTMYZjeCaZjBHmSlZcbgxjL9dGxDBFbQPQN oDGtK2z31pBJXYrWQLmVrCz5Whk8QVpBWkFaQVpBWkFaQVpBWkFaQVpBWkFaQVpBWkFaQVpBWkFa QVpBWkFaQVpBWkFaQVpBWkFaQVpBWkDZ4gNPkYI9zKxk7dysZdr80zTGaZoRW0D0DaPzK3Oalmyy oYwEVEv8yqXGVS4yqXGVS4yqXGVS4yqXGVS4yqXGVS4yqXGVS4yqXGVS4yqXGVS4yqXGVS4yqXGV S4yqXGVS4yqXGVS4yqXGVS4yqXGVS4yqXGVS4yqXB1RL/JlUMMyauU1Mt/KK2gegbRxaK2jj/wD/ 2gAIAQICBj8AG3//2gAIAQMCBj8AG3//2gAIAQEBBj8Ar2djdfxW7G01az+Ok74VzEcvF7FWJ73Z o+M97s0fGe92aPjPe7NHxnvdmj4z3uzR8Z73Zo+M97s0fGe92aPjPe7NHxnvdmj4z3uzR8Z73Zo+ M97s0fGe92aPjPe7NHxnvdmj4z3uzR8Z73Zo+M97s0fGe92aPjPe7NHxnvdmj4z3uzR8Z73Zo+M9 7s0fGe92aPjPe7NHxnvdmj4z3uzR8Z73Zo+M97s0fGe92aPjPe7NHxnvdmj4z3uzR8Z73Zo+M97s 0fGe92aPjPe7NHxnvdmj4z3uzR8Z73Zo+Ms7O7u/5Leq5yVGfx0m/KIxzotYixTC5kpbbfsfFJir 9/0EWo74+5qHH8y/3IO1Ug7VSDtVIO1Ug7VSDtVIO1Ug7VSDtVIO1Ug7VSDtVIO1Ug7VSDtVIO1U g7VSDtVIO1Ug7VSDtVIO1Ug7VSDtVIO1Ug7VSDtVIO1Ug7VSDtVIO1U4fmT+5803fP3Kn+D4qsVP v+n2LCd22/C5kpbbcUqVkX4+jf8AIiI34QTgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIEBe AqK1FRfuFqUE/SkWf4PhY4WE7tt+FzJS224JWqJw+f0ov/YnATgcMi4i8BeAtdifpX9yf+4WE7tt +FzJS22jKSfVeP4DUROCCcMmXgORU4KPpL/qvD8CwndtvwuZKW20dUVIcEE4Hxkyi8BHon7uC/2L Cd22/C5kpbbT5/8AoTKFG/iWE7tt+FzJS22nMomUKNmLCd22/C5kpbbTmUTKFGzFhO7bfhcyUttp zKJlCjZiwndtvwuZKW205lEyhRsxYTu234XMlLbacyiZQo2YsJ3bb8LmSlttOZRMoUbMWE7tt+Fz JS22nMomUKNmLCd22/C5kpbbTmUTKFGzFhO7bfhcyUttpzKJlCjZiwndtvwuZKW205lEyhRsxYTu 234XMlLbacyiZQo2YsJ3bb8LmSlttOZRMoUbMWE7tt+FzJS22nMomUKNmLCd22/C5kpbbTmUTKFG zFhO7bfhcyUttpzKJlCjZiwndtvwuZKW205lEyhRsxYTu234XMlLbacyiZQo2YsJ3bb8LmSlttOZ RMoUbMWE7tt+FzJS22nMomUKNmLCd22/C5kpbbTmUTKFGzFhO7bfhcyUttpzKJlCjZiwndtvwuZK W205lEyhRsxYTu234XMlLbacyiZQo2YsJ3bb8LmSlttOZRMoUbMWE7tt+FzJS22nMomUKNmLCd22 /C5kpbbTmUTKFGzFhO7bfhcyUttpzKJlCjZiwndtvwuZKW205lEyhRsxYTu234XMlLbacyiZQo2Y sJ3bb8LmSlttOZRMoUbMWE7tt+FzJS22nMomUKNmLCd22/C5kpbbTmUTKFGzFhO7bfhcyUttpzKJ lCjZiwndtvwuZKW205lEyhRsxYTu234XMlLbacyiZQo2YsJ3bb8LmSlttOZRMoUbMWE7tt+FzJS2 2nMomUKNmLCd22/C5kpbbTmUTKFGzFhO7bfhcyUttpzCZQo38SwndtvwuZKW20dTVfvQQ+cmUXiI xFhxUsJ3bb8LmSlttGVPp8/C/go1fkTjky8RyqsB9T6KvD8CwndtvwuZKW23BKNR3wqftX+qCcRO JwyLiLxF4i0Ka8V/cuFhO7bfhcyUttuCKi/CpBRtOs74cnBF/qJ+oiRIkSJEiRIkSJEiRIkSJEiR IkSJEiRIkSJEiRIkReIv6hadFfl31d9EFc5flViuFhO7bfhcyUttv2ERrvzNT/VT4qIrf+TqIdVD qodVDqpqdVNTqpqdVNTqpqdVNTqpqdVNTqpqdVNTqpqdVNTqpqdVNTqpqdVNTqpqdVNTqpqdVNTq pqdVNTqpqdVNTqpqdVDqodVDqC/xorl0F/O74av+qfYsJ3bb8LmSlttyywndtvzD/9k="
- transform="matrix(0.24 0 0 0.24 182.5615 150.499)"
- id="image56"></image></g></mask><g
- opacity="0.35"
- mask="url(#SVGID_3_)"
- a:adobe-opacity-share="1"
- id="g58"><path
- a:adobe-opacity-share="0"
- d="M184.562,236.826c0,5.965,4.835,10.8,10.8,10.8h59.663 c5.964,0,10.8-4.835,10.8-10.8v-73.527c0-5.964-4.835-10.8-10.8-10.8h-59.663c-5.964,0-10.8,4.835-10.8,10.8V236.826z"
- id="path60"
- fill="#1D2915" /></g></g><linearGradient
- id="SVGID_4_"
- gradientUnits="userSpaceOnUse"
- x1="226.1924"
- y1="159.7139"
- x2="226.1924"
- y2="200"><stop
- offset="0.0123"
- style="stop-color:#FFFFFF"
- id="stop63" /><stop
- offset="0.3788"
- style="stop-color:#F8FBF3"
- id="stop65" /><stop
- offset="1"
- style="stop-color:#F2F7E8"
- id="stop67" /><a:midPointStop
- offset="0.0123"
- style="stop-color:#FFFFFF" /><a:midPointStop
- offset="0.4383"
- style="stop-color:#FFFFFF" /><a:midPointStop
- offset="1"
- style="stop-color:#F2F7E8" /></linearGradient><polygon
- fill="url(#SVGID_4_)"
- points="221.189,159.714 214.142,180.951 224.048,180.951 214.142,200 238.243,173.61 227.655,173.61 236.978,159.714 "
- id="polygon69" /><g
- id="g71"><g
- id="g73"><g
- id="g75"><image
- overflow="visible"
- opacity="0.75"
- a:adobe-blending-mode="multiply"
- a:adobe-opacity-share="1"
- width="392"
- height="242"
- xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAYwAAAD2CAYAAADF97BZAAAACXBIWXMAAC4jAAAuIwF4pT92AAAA GXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAHohJREFUeNrsnYlu40gSBZMU5Z75 /4+dbUsiFwtY2JrqvIqHSEoRACFZPtqk3BV8WVcvAAAACXouAQAAIAwAAEAYAADwWgYuwSp0XAKA wzJxCRAGIgCANf8fIxaE8RIxIBaA8yeMDokgjLkNfLfyzwOAfWTRNX49EkEY5h9N6+sIAuC8/++n mXKZjJ/5UfIYPuyPRXut9WOEAXDuxOGJYEqKZPpEebyjMOYKoTO+BmEAfIYwSjG0JJFaHm8rjncS RkYE2uutwkAgAO8liezzTPqY3jl1vIMwooa+fi0SRvQzshIBgHMKYwpez5Su3jJ1nFUYLWWlznne KpHW5AEAx5fF5Aijfi0jDy91nFocZxRGJgnUMvDkkf3arDiQCMD+YshIwxKE93xy5CGJ1HFqcZxJ GEsE4b0WHa3JA2EAHEcYU8PjlJREdESp47TiOIMwIlG0yqEPPl4iDmQBcCxpZMtOmWNs+Fy2n6M7 kzSOLIy5oogk0SsfZwWCNADeSxhZMYzGYy2I8uslIY5TpY2jCiMzsikjCO2xDz4fiaNFGggDYD9h LJGF9uh9rq8+7hxxWLI4vDiOJozsKCdPFJoc5ry2JG0gDYDzJouxOrTXLJHUsuiKz4uROurS1GHL VEcShpcqNGFoZSZLBBfla6zXO0MeGXGQMgCOkyyyopgCMfzveDifs44yRdQlLKtEdei0cRRhaLKI UkXZoFtCeH7uUn3dJfF9UV8HwgA4tzDG6nktjYfy/OF8zhJLZ0hjEns01SHTxt7C8EpQmdKTlhQu lSguxmu1TLSfNac8hTQAji+MMZEsahHUx6g8743v1aQxOudzSGnsKYyoBOUlCk0StQQGRRrW4aUO bWRVpj8DYQDsI4xaFJEwPFk8FGHcDYGUR1/Jon7uzf84bIlqL2FkS1BWP8XFSRKDIozBEclgiMPq CJ8rDSQCsI0cWmWRTRaWDO7BYy2OXhFH2SE+BudymLSxhzAsWbSkCk8S3vNBkUdGGJE06pTUIgTE AbCOKLRylCYNqxyVTRV347gYX9sr4nhUotDKVPXw292l8WphtMrCSxWeEOrjqghDE0hUlrKkYaUL ZACwj1S8lBGli1oYWpL433Eznl8qWdxFL2trfRsiev/GIaTxSmFkJ99po5+0RBHJoXy8Bt+j9WmU /743qU/E7vxGGgD7JBBrCRCvs9sqRd2NZHErRDEY4iiTxV1p72ppiPx/IqDVr7GbNF4ljBZZaKnC E0UtBu3jq5E0PGFcgpJUH8gCcQDsJworXWQTRiSMWyWM5/Oheu3ZltzFLmk/lPbhkCOoXiEMreHM 9FVYsrhWz8vjS3lNE8dglKiyHd9ewqAsBbB/KcoThjbvwhpCG6WL8vgu2pRb0XbdnGpFKY26vbCG 3u4mja2Fkemz8EpQZWOulZq+gkdNIlFZaq4wBGkAHFYWIm2d3lG6uFeiKNPFt9Ku3ESfEOyJY3TS xi7S2FIYc2ThpQpLFF/Bx6U4auFckiWpFlkgCoBjiCPb8T01Jow6WVx/JHEtZPEt+oCaaD6XRUYa b1OSapXFEJSdsodVporKUZlRUpEsEAbAcaWhpYx6WK02lPamSKOWxVBIo1UY3QJpbC6PrYTROhLK SxW1LH5VUvhlvG5JQ0sXWv/FReYNp0UaAPvKYq4wxoQwvIQRlbojYayRNDaVxhbCaFmKXJNFPcrp q5LFL0UUGWlE6UJ7Y7MT9hAGwDmFEaUMb/5F3X/hjb70hulnZVFL4/Sd3l2iLNUHsrBKUL+M48v4 2EoX0ZvqlaIEYQCcWhalNKwNkrz5GPeftuRWtCk30ed8aUsYzU0WdZoo25ZaHJsJZMuSVMs8i6iv opbEX4FAnt+jdXZnZaEtby6IAuBtUsac/oxaGoPy6A2mWZoupiJldK8uTa0pjLmlKK2DOxLFX8br WllKG5Lbsn4UO+0BII1B/uzLqG9Av+XPKQHZNsU7H22IcF2e0qRx2ISRkYU1g3sISlB/KY9/OUlD 67vIyOKSKEO1JAzEAbCfKFqF4c0CL1PGUKSNm9hr1LXchHYJWYjoy4RYZSnZQhxbz8OIRDEYwvhl SOIvQxh/KenC6+hu7eSOpIEwAM4hjCXSuBRp47lW1F1p16wtoFvShSYLa++MUV7Un7GGMFpKUV66 qPssaln8bUijFoY1u9vbOGnp8NkucX0A4LWyEGmbCT6KvnzIWMjiUcgjsyGbdQOa+V0nyW/p2r2i NLVmSWqJLLR0Ycnib6ck5U3S85JFy8KCSzq5kQfA9pJokUX52AdJo6/EkVmwdM6ci2nG0TmyWE0c S4URDaPN9ltkZPG3U5bS5l1kFhecu2w55SeAfcl0FncJgXh9G30hivqxXIE2Gl3ZO6KIymPZo0xI m/VjrFWSmjsqanBkYfVd/K2kC6uj25JFZ7yxraJAEADHF8pUvTYFjbZUd+5T0UY8hfEQfapAZnRl lCpG0eeHaB/XKcOS5CriGFZ6Qyx5aPMuhiBZ/FJkoaUMTRblMNpoFvfS3fOQBcB55DEp/3e9DuJa GE9ZWO1bpvRkNeZWp7u1Z0emNDUp579YGsOCNyBKF9HIqEFp7K1U4Q2lteZcWOu4tM6xoAQF8H7S EKN0Uz9qd/B90Xh3ku+r6IxUMTpHuWWsdvRGacrr09g9YWTnW7RM0rPKU9oyIN7CgpYs1twxD3EA HJcp+f9UuxPvFGnMFUUXpANLGJ5Qyu+t/+1Ddnp3iXKUNu/iy0gYvyQ/Qa8cGaUt+5FJFiJtI5+Q A8D50kVGIpNy0zgtkIYY/0b5PLOnuHZcqpTRK0nIK0+9TBjZLVfnzOrOJI0vQxbafAuvzyJbfmK4 LMB7JAzv/+zU8H+9lEZL2zApopgMcURHVJrqRO+72a0Pw0oX0YZIVsKIylDWkuVav0UpK2upj7mi QA4A504YnkCmoLpQfm/r3hbWarmRHJ5rV3kpwytNaalqljiGhRc+U4qKNkb6ctJFnSa0uRaaLC7J ZEEZCgCBRCOoLHFMxd19JuVEndyeMLIpo98yZcwtSWWXL5/bf/El9kioL7H3tYhmW1rpYm4pCgDe RyCt4pCigRaxZ297w2fHIFWU6aJ8HOTf61uVbd5mKWOYcVFb08Wc/bm1RQTrVFH3WViy6INUgSgA oEUcWn9HL7kFEOtS1BiIojy+5P97cdSlqUfVDnspYzZLh9Vq+3Rn5mBcE6KwtlgtReEli16YiAcA 64vDayt65XszQ2ejhFFu3FTuxfFQksYo+kitXfowOrFHSnmlqGgLVi9daEt9ZCbmibAzHgBsK46u kIFUlY3pp416CmNIlqNulShuRVtYbuB0r26aR6MsNYm/d8aqwpi7DEhm74urU36K9rTQ1p23Fg9E FgCwpjjqmeFdlTK8ctS1eNT2DP+qZPFVSOMm+grcUV/G4s7v1j6MOcuYe3MwNGl8KV8b7cFd/w4i /pR8RAEAc8QRSUOqlPH8+jpljEVJqZbGl5Iq6qPc7e9eScPry5AlKWONeRjeUNpLUI7SEsUg9sxt bwZ3L/RVAMBr04bXCT5Wpam6XF+WpK7y7z6Ka5EqynQxiL2DaC/xaKnNJ+5Fayi1jpQagtKTNXN7 SKSLaClhZAEAa6cNSxrlXX5fpYyxaNdqadyVdnBuyli187ufeaG0foJMyhgMMdSlp0wZykoXIu3b qAIAzE0b2nNtBGl2YdbBaRsHJ2W0rMg9q23sGy5My2S9PnExhsTFyG6BmHkDAQBeLRFNGpeqNOXt RJppG7Wb6i6Qxiz6hpP3RNIHCSNj0swF6WaUopAFALwyZWRvri1xXIL2sWVqQbR67qrCaEkaLUNr 6wtxCWRh7ZVryQFJAMAe0ojazWe7dWlsI6/JhKG1l6KUoma1lf3Ci2RdiGyyuIg+CspbRLA3TD7n jQQA2EIe0Y21Nw1hUB6z0sgkDC8dLRZGNlVkR0hZpSdLFpfkBVhkTgCADVJGZoM5qyLjyaN1o7hV +jH6mTHL2gcjugjWBfHKUN1WJw8AsFG6iGSRLeNn2spoFOlqbWXfeDG6IHK1ysI76cyOeaQLADhr maqfIY2L5Pt5rQ7vzYfVZspUfXC0CsLq5LbGEgMAnC1laP0Z1giqls7ubBl/k07vaOiYtp6TdjKa JKJJJ9n5FqQLADhj2vCG20Y33NlSVNfwu62SMLqkNb2E0SviyMzgXrUOBwDw4pThrY6R6QPOVmo2 7fvNTNzrgs9F9bhIHH3ihC07C+kCAE4mE00ctUCiakymhN+vfZPdz4gm2fHFXSALK0V409pFWPID AM6XNrwUklnANSpZzRlS29x+zllLqiVpZBKHNwoqE6OQBgAcXRTeIoCd0x564siW8K2RUs0MMy9E 9tBOwNv4KFtjQxwA8C5C8drOLlmlya4h5a21Fy513q948llbdo48okglQn8FAJxLCt68Ma1Bt9pD 7fW1O7q7LYQRxausLaPaGivPAsC7yyTbZnZiTznIyENk4UipfuZJtp68VXLyxJGZoEfaAIAzSaJl TtuaCWOVdrJ18UHrJCNZRFErU3ZCCgDwjglDa+u6GQkjszjr5sLIJI2oA8dLGtKYMBAHAJxVDJ4s Mmv1ZWURlaNeKgxJnmBmT9kueZFFKEEBwGdJJjui9CU7j/YrnJTX6Gcn3m1SbwMAOEnyyDT4SxNF tGrtLGF4nc3euN7MbMKsGDIlKMQCAO8kjeyNdIs0Vm0vt+jDiGQS2TVbtgIAOKMkoopMa5uaEc4q 9C+8EF4UmyMpAIB3Tx4tfcGb32T3G52sVzN7iQkBAA4ogJYbbetjbxe9zFp8s8v8/Y4XCQAAkeiN uwSJQiQ3qbn1Jn/zhNHNuDCR5RAKAHyKLDKfjxJG9t/YpdNbpH1/7ZY4BgDw6TKJSvWtW0Espt/g ROes/eQtxYtQAAAOsJFc/6KTmxPJAADAF8RL29F+5xMHAEAGfz5fvHfFFu1tf8ILCgDwbrLIrAi+ xs/+CGEAACCX/FpTm9x4IwwAgPMkka2+/jDCoJwEAPAGbSoJAwDgwxr+owuDlAEAcHJIGAAAgDAA AD6At5jpDQAAJAwAAPikdIEwAAAAYQAAAMIAAACEAQAACAMAABAGAAAgDAAAAIQBAAAIAwAAEAYA ACAMAABAGAAAgDAAAABhAAAAIAwAAEAYAACAMAAAAGEAAADCAAAAhAEAAAgDAAAAYQAAAMIAAACE AQAACAMAABAGAAAgDAAAQBgAAAAIAwAAEAYAACAMAABAGAAAgDAAAABhAAAAwgAAAEAYAACAMAAA AGEAAADCAAAAhAEAAAgDAAAQBgAAAMIAAACEAQDwMUwIAwAASBgAAHDOlIEwAADgUMKYuNQAAOdu F0kYAABwGGGQLgAA1mtHd2tTSRgAAOeThvX58vhYYZBSAOBTJDAl0sXU0EauJhESBgDA/tKoG/U1 GvnVk0a/08UhNQAArJtENqff4KQydbTpyBcFAODA0titA7xf+MtPM09YuwDT1nEKAOCEaSLqw5he 1Wb2K51c5hedErYkUQDAJ0ohalen4KZ9esXN9h4zvefIBQDgE6QxSVyJmSRXllq9xN9vdBEiM2ai FwDAp0hjMm6sWxKGN9oqandTbW+/0clnkkXr8DFkAgBnl8KcG+dJ/AFFU9DGZqUQ3uT3G1yUKGJ5 1pyEkVIA8BkCySSOKHVMiTZ2tfazn3liU/IEopPPXBhkAQDvKIu5N9JTcGx2o903xpLopDIXyJNB JIgp+XsCAJxBHNkb6czN+ZT8Ppl7Q96vcNItJxHZUoKTRBAA8K4CiYbIPp+PDW1t5qb+ZcKQwIxZ C3oJA2kAwLumi0w7OiqSGKWtI3yV9rNPntyc2KQdkRk9cQAAvIscJidZWG3mqHy89IZ804SR6Zix RDFWJzlK23Axz4zIBQDOJBCRuDQ/OqLItKOrDx5asw/DkoRmxFH5mlH8OhzDbQHg3WQRtZuZhDE6 clky9201YURlqDFIGGODGT0rAwCcVRxRKX9MtJ8tJarF7WffcIJZY3mmtKJVFK+s+AYAcBYxRJ+L Sk5jcMzp12iq2myVMFpO0CpXtdoRgQDAGSQSdW5bCePRII1R8h3tL1lLaq4kyhN/SNwhHtkaUQDA UdOFVRXxkoUmh0fQfmZK/SILy/t94mS9dUsiI3on6J209jNF4o5w5AEAZxFHNM/iURxLZbFKGT+7 ltSUSBjRCKjoRB/BBaQjHADOKAmvKqP1UTyM9jFqQz2BaL/D6sJoPenROdHoKC+EVdfLCAJ5AMCR xJGpzHg32I9EW9pSltosYXiiECNWRXW4R0PUmrOoFgDAEdOFJpEoSTyPe/U4VxpzfvdFCSNKGi1W fF6Au7T1a7SsagsAsHe6EMmVo7yb63tSFF5ZalHq6Gc2utnRUZEkshdgSpw8ogCAI6YLWUEUd+fj pQkj3W6uMXEvEkdWEnfR63abxSsAgBeki7k32Hfj0BJH3W5uMlqqbzh5TyCtUSpzEVpKU6QMADhi uvCE8VBuqj1R3IMb72iY7WLmrlabnXuRsWXGng/xZ4KTMgDgiOlCGiowLdKIOr6jzetm7ZGx1bDa TN/F87glLkhLR44IczQAYL90kZnYbI2EqtvEW4M8Mqt/L2of+4YLEfVfaOb0TvJWXIybcWE8e86Z owEAsJUsrOkGmVLUXZFG1D5mb7BXm4vRz7worQkjEsVNsanVqROtzLjYogAAM2URdXA/GtrIW0Ic L524Nyy4UJm+jEdwEerj+vM4/DxeiuN/P6P7kdz487z7ed4rF6P7ea0rfueOv3EA2KAMJZLbEygr iqjNbE0X2u/YfEM9JC9MV/3gLlGWsmpz1vH98/uUx70QRl8cXXFIJY5IGoI4AGBFWbR0cFtTDeo2 8ltpH7W+jUyHt7fH92YJY3JEkZFFfVG+fxLFd5EsbkXCGKqEEQmjThmlLOp0QdoAgLVkUYujbrSt AUC3QBLWa9mEYW0V8fKSVH1xygbbGjJWlppuijQG5Yhk0SmJoa+k4EmDtAEAS0RRPnorz1ojoer2 sD40aUQDgzJbts5KGUPDxeoco0bjiy9KuhgUWVyLz1+MhOEJoyt+v1H5Gk0SpA0AyIoiksUYVFse jizqR00ac6YeTMnzWj1haHfpVsdOb0SwoUgadbK4FsmiTBnZhNFVKUNDEwdpAwCyohCZtyzSwyhD 1cdvI2lEKcOTxSpTEJb0YZSNb1mailLGUxpRGWqoRKHJonMa+k7aO8ERBwCiiEShVVesEaLlTbM1 2Oe3IwpLGLdkyvDKaZsnDE0cXSGLTMrISKNMFhdHFpYwpkIWnZM4InEgDwBEYcnCWnVWW+LDE0Ut jUgcmc7uVdeQWiIMcS5iJmXcqpLTt/w5IqpFFlGjXs/b6BrEQeoAQBTRpLxphiwsUXji8EpSWv+F yEqd3XOFMTl34V7KuFelpUtwaGWovlEW5UXqg5SRKU1NhmQA4NyCyIpCjGShDZ3V5lV8B3L4bXzu OyhFeSOkWs5/s4RhDVEt7+QfRUNfSqNMGV6qqKXRBymjlsTFKFPV3zsVH7eUpqagzAUAxxRDNmFk k8XDSBfaCKhaCv/5OTxpRB3eXt/FquvtrdGHUd+p18t2PIqGXytNXZTk4U3Sy7zxtTiespjEHmk1 JctVmWQDAOcSibXQamYDJGvobCmL34njP+L3YWRLUasOpS25zPy+srPZKhFpX+Md3pDZqA+j5Y9k 6UXrFn4eAPZPGNnyU3borCaLm1KG+k+VLLzDG17rSWOTdLFEGCJ+B7IllEgCEryWbaCjWZlrxVlE AXA+cSyRxST6sFlNFjdHFnU5yhPGb0cW1gipTSofwwpvRl3S0dZ+19JEn0waljCiIW7Px6EqS12K z2n9IyL+pEBGTQGcUxaZ5T2iDm5v8yNtUp7VZ/FPQ7Lw9gpqWdJ8t+XNPVlIUhqZklSXSBGj2JNn roU0xh9ZjIU4ns9HRxzWo9dBjlAAjlOGmgJJiCzbz8KSxbfofRSRLH47Zaho7oXIhpvKrTUPo1N+ wbFoOLPSyAgjMw66vJClLMpjlD9HYdXikMSjJocu+SYhFYBlMmhJFa2y0EZCZWRxE33IbC2Hf6rH WhatI6M230RurZKUNcy2FkerNLw33lvw6/mmXos3tlyj6iH6aKw+WRaLZIEgAPYTSKs0rEUEvdFQ 1uZH2qQ8r5/iH4k7uVtGRmlltdVYM2FYb9RYNbgZaXiNq/amWtseatJ4iD9JcKk0WjrnAWB7aXhr QXk3oJP4o6G0mdzakh9WZ/c/Ys/DiFanrTdM8q7BoUpSUWmqbOSz0rB+flSGeiSkcRF7rw1vhrlI bhgx0gDYVxhT0GjWd+FjsmJxF31TuGg2dzSk9rdRjlpj7+7DJYxsaapMG1oDG02Es5ZR90RRvsHP pdOfW79mpZFdUh1hABxfGN5EvKws6r6Let8Kq/8imt3tLWWe2fNis1LUFgnDeyNHpeF8JGThJYxo 8kx5J3AtJHFVUoa1LIkmjH6mMJAFwPbCyHZyjzOqFlay0Pa1aJnR7Y2KinbV82SxujS2Kklpo4Qm RRwtPzsShZUqvooL/0wX9QZN1gq5njhE2kZSIQ2A7WQxNT5qZai6P3SU3G559RIgVsqwEoW1wGA0 jFacEtQpEoYnjXLOQ7bxzAyh9UYtfBXiuMq/d/UbnKShiWOuNJAFwHGkYQnj0ZAublU5yts5L1qy /DuQRVSCispzpyhJlfLwImGLLKw+DC8yluIYKnFo0uiN8hTSAHgfYYwSz+HKlqIyW61qaULbqzsq Q2X7LTaTx7DRm9gF4sjKQpKi8IRx/XkjalnUfRmeNCxhRP0ZCAPgGMLwZDGJP4imlsXdKEdF+3Pf xO+rqDu4DyWLLRNG1J8RScMaAjc69UUrXVyrhOGVpYbGlIEwAM6TLsZkwshULW4N0rgpj9oM7nr4 bKss3qIkNVcaIvl16LWRUc9SVJkwhiphWH0ZLSlj7dngANAuCi1R1M+z6WIUe85FnTK+FWnclBRR J4rspLwWWWwujuGFb3KLNDL9F1Z0/DJKUbUwWstSnjSQBcDxpRHJIprRHaWMmyEIL1FEqSLb0X36 Tu9SFFlpTOKvSZ8dVntVRKEJo+78tvYWvyQSBsIAOFZJKhKG1p6MTtXCGimlPY9E8RB9BvdDkdok L1qN9ggJo0Ua2T0vvIRxlT/7MKwSVDS8NprINzdlIA6AdUQRJYy6HOUtLGi1KZnSlCWSjChaS1C7 yGKPklQkDS1teEnjUr3JQ/H4nKh3q4RxUaRxCRJGZngtHd8Ax0oYmXJUZq+LaB0p77WHxP0UD4nX htqlz2IvYWSkMUnbHhhjII5aCjcjTXjlqOxcjEgaiAJge3FkN0NqmYORKU9ZcmhJFNYM7sPI4tXC mFue0t703hFH+ca2pIkoXWRkkU0ZHogFoK1BbNk9L+rH8OZ5ZYRgPc+Iwis/7S6LPYThSUOTxyh/ 7hNei6N+oy/y7z0v7skk4fVdZIWxRBaIAmC+OLKyyHZ+eyth3wOpRENkWzc/OoQs9hJGNmlMSmNc v+F9lTZ6+fduehdFHPXn+oQoMsIQsffKQAwA24ukRRqZlOF1hkevWf0To1IWkzPIYk9hlCffGc8l SBudkjaejXmdNHrjMRLEnHSBMAD2k4WIP2CmRRqePEbxl/Cw0kRUftp1nsWRhdFaotI6xbW00RWl qmfi0NJDS5pAGADnF4ZIbk0pSxjWx1lJjOL3URwyVRxNGFrasGRRp43668dKFmVD/0gKwtqiNdrn m/kXAPsJQyS3rPmkNN7185bDks00s/R0WFkcSRiiJAxLIJNxh1+nkzFICr3zemY01JzlzZEGwD7C kERpKtv4j4mUUm9L3ZImpqNe+OHAfwzRwoWROLoqcXTiL1MepYmlu+0hCoDXlaZapZFJHlMghslJ FJnf7dCyOKoworSREYcYAukqeWTkQKoAeO+kIQl5eK+PkptDccpUcRZhiPgjqTKd4p2TRGSGIJYI A2kAbC+LrDBE8qOpWo45SWI6y0UfTvbHEZWp6mSSafQzH4vkJ+chDIB9hRHdxWdGKUWL/0Wd2G8l irMJQ5OBKOnDk4bX6GdSw1qLCyINgNcKo0UakUhE5o1yOrUozioMcWTRkjqyKSGbJOjgBjiuSLyG u6V/YU5fxFuI4szC0N6MOaljmiGDTOkJUQAcM31MM59PC37GW4jiXYShiUMkP7JK+16SBMBnp45s w9/6McI48B9GlDrq2eNTQjgIA+D9hLH11yCME6cOCdJHy89AGADnFEbm89PCr0UYb5A6ZIFAsn8o SATguIJo+fppxX8HYZz8D6n75DcfAGE0ff3HtxEDf1ipdNDyh9LxhwVwOmkgB4Sx6h9Kxx8aAGJB GLDmHxb9FwCIAGEAf6gA8Ln0XAIAAEAYAACAMAAAAGEAAADCAACAs/JfAQYAL3iXmIlSiu4AAAAA SUVORK5CYII="
- transform="matrix(0.24 0 0 0.24 179.2061 198.1514)"
- id="image77"></image><g
- id="g79"><radialGradient
- id="SVGID_5_"
- cx="225.1929"
- cy="226.1387"
- r="30.8299"
- gradientTransform="matrix(1 0 0 0.75 0 56.5347)"
- gradientUnits="userSpaceOnUse"><stop
- offset="0.0123"
- style="stop-color:#FFFFFF"
- id="stop82" /><stop
- offset="0.4828"
- style="stop-color:#FDFEFB"
- id="stop84" /><stop
- offset="0.7611"
- style="stop-color:#F8FBF3"
- id="stop86" /><stop
- offset="0.989"
- style="stop-color:#F2F8E8"
- id="stop88" /><stop
- offset="1"
- style="stop-color:#F2F7E8"
- id="stop90" /><a:midPointStop
- offset="0.0123"
- style="stop-color:#FFFFFF" /><a:midPointStop
- offset="0.8025"
- style="stop-color:#FFFFFF" /><a:midPointStop
- offset="1"
- style="stop-color:#F2F7E8" /></radialGradient><path
- fill="url(#SVGID_5_)"
- d="M186.706,235.825c0,5.965,4.835,10.801,10.799,10.801h55.374c5.965,0,10.801-4.836,10.801-10.801 v-19.373c0-5.965-4.836-10.801-10.801-10.801h-55.374c-5.964,0-10.799,4.836-10.799,10.801V235.825z"
- id="path92" /><path
- fill="none"
- stroke="#EDF5E5"
- stroke-width="5"
- stroke-miterlimit="10"
- d="M186.706,235.825 c0,5.965,4.835,10.801,10.799,10.801h55.374c5.965,0,10.801-4.836,10.801-10.801v-19.373c0-5.965-4.836-10.801-10.801-10.801 h-55.374c-5.964,0-10.799,4.836-10.799,10.801V235.825z"
- id="path94" /></g></g><path
- opacity="0.74"
- fill="#FFFFFF"
- a:adobe-blending-mode="lighten"
- d="M263.623,229.595c0.037-0.364,0.057-0.734,0.057-1.107 v-13.375c0-5.965-4.836-10.799-10.801-10.799h-55.374c-5.964,0-10.799,4.834-10.799,10.799v7.324 c7.545-1.012,15.699-1.566,24.213-1.566C231.959,220.87,250.812,224.252,263.623,229.595z"
- id="path96" /><linearGradient
- id="SVGID_6_"
- gradientUnits="userSpaceOnUse"
- x1="225.1929"
- y1="204.3135"
- x2="225.1929"
- y2="246.626"><stop
- offset="0.0123"
- style="stop-color:#FFFFFF;stop-opacity:0"
- id="stop99" /><stop
- offset="0.0141"
- style="stop-color:#FDFDFC;stop-opacity:2.231669e-04"
- id="stop101" /><stop
- offset="0.1344"
- style="stop-color:#BEBEAF;stop-opacity:0.0148"
- id="stop103" /><stop
- offset="0.2565"
- style="stop-color:#94957C;stop-opacity:0.0297"
- id="stop105" /><stop
- offset="0.3796"
- style="stop-color:#747759;stop-opacity:0.0446"
- id="stop107" /><stop
- offset="0.5029"
- style="stop-color:#5D633F;stop-opacity:0.0596"
- id="stop109" /><stop
- offset="0.6263"
- style="stop-color:#4D552E;stop-opacity:0.0746"
- id="stop111" /><stop
- offset="0.75"
- style="stop-color:#414B23;stop-opacity:0.0896"
- id="stop113" /><stop
- offset="0.8742"
- style="stop-color:#3B461E;stop-opacity:0.1047"
- id="stop115" /><stop
- offset="1"
- style="stop-color:#38441C;stop-opacity:0.12"
- id="stop117" /><a:midPointStop
- offset="0.0123"
- style="stop-color:#FFFFFF;stop-opacity:0" /><a:midPointStop
- offset="0.2901"
- style="stop-color:#FFFFFF;stop-opacity:0" /><a:midPointStop
- offset="1"
- style="stop-color:#38441C;stop-opacity:0.12" /></linearGradient><path
- fill="url(#SVGID_6_)"
- a:adobe-blending-mode="darken"
- d="M263.68,221.954v13.871c0,5.965-4.836,10.801-10.801,10.801 h-55.374c-5.964,0-10.799-4.836-10.799-10.801v-13.871l0.038-7.704c0,0,0.923-9.937,11.173-9.937h54.962 c0,0,10.063,0.328,10.801,10.799V221.954z"
- id="path119" /></g><g
- id="g121"><g
- id="g123"><image
- overflow="visible"
- opacity="0.25"
- a:adobe-blending-mode="multiply"
- a:adobe-opacity-share="1"
- width="30"
- height="30"
- xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACEAAAAhCAYAAABX5MJvAAAACXBIWXMAAC4jAAAuIwF4pT92AAAA GXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAuJJREFUeNrsl9trE0EUxjO7m5vW tKFN1RqLCmqlIvjgkz5I/cOFIqLggw9KsRHxUo1IdEtactG9+A1+A8dxNrsxK/rgwI9lt5ueb875 ZuZspfJ//Bhqjvc0AfCIHClIQEzSMkUoBqyCJbAKWrxXQoBmBL6AQzChmGQREWbmNQY/DS6Aa6AL mtZvdcDPoEcOQEgxUV5mVMYzH5wCZ8FFcJ0CLoN1UHeIGII34AV4BvbBW4qbzsqKctzruq+ALXAL 3ABXwAafNyjS9sQ3cAwG4BXYA0/AU/AejLOE+I4MtME22AH3wE2wyedNivSFQT3eB/y79kwHnGE2 v4IjinCaNrBEtJiBu2SLs686VkRWGRt8/wTL5jFwxIxMbSGB+Ac1qtcluEMBbWslFDV7QBFdlmBE bwxZtthVDn1dpgF3WIIOhakF9iCf2ajQK32W5hcRJgvnmYHb9ECzQAnyhif8o7PxkWImsiQeRSyJ fWCjJAGy5G2usKtgzc6wx5dWxT6wYhm2jKNBm/UcV90m/aLsdLVoonX+QJV8RvmcXNflNVOOKktQ Fz4p+6AMrBg/GUeeFWUHd51HyuXevz7+GRELNSRzjMwYnmhI5Laa/gEBYxEjskVE7Ih67AeOi3ZE BYc55j+xxzjgpBMpImZL1mNDMuDxm5aYBT2x1+wx+vZJ6lt94kl2Ux1uWl4JWZhy9g/AQ/DOPjt8 q0ULuLebhiRYYO8wPUTIdm+X1zDrKE/FKjH95TL3eP83MiIF7FHAY2ZkYpfadxhoRE80WJ66EKIK BE9YAiPgPkW8dPUSFUfDGnMpHVmKvQJCEoofcsamBLs0fOgSUMnomo2QQ66UAbMTi4+hmOk2mGZW B39OE+rgj5iBcNb3h5qxk9boDb1SLrEh2c75+NlnCfT1A4OP8nZiVeAT0IhZY0Ni+gHP8oEpQ59Z HHP2uRtfkeUnxTj7AWHqMU0ZiRVX2ld5kZ4jnSewHN8FGACSOOKkAlOGAAAAAABJRU5ErkJggg=="
- transform="matrix(0.24 0 0 0.24 199.0298 216.5547)"
- id="image125"></image><g
- id="g127"><radialGradient
- id="SVGID_7_"
- cx="202.6289"
- cy="219.7041"
- r="2.9995"
- gradientTransform="matrix(1 0 0 0.75 0 54.926)"
- gradientUnits="userSpaceOnUse"><stop
- offset="0.0123"
- style="stop-color:#FFFFFF"
- id="stop130" /><stop
- offset="0.4235"
- style="stop-color:#FAFCF6"
- id="stop132" /><stop
- offset="1"
- style="stop-color:#F2F7E8"
- id="stop134" /><a:midPointStop
- offset="0.0123"
- style="stop-color:#FFFFFF" /><a:midPointStop
- offset="0.6235"
- style="stop-color:#FFFFFF" /><a:midPointStop
- offset="1"
- style="stop-color:#F2F7E8" /></radialGradient><circle
- fill="url(#SVGID_7_)"
- cx="202.629"
- cy="219.704"
- r="2.999"
- id="circle136" /></g></g><g
- id="g138"><image
- overflow="visible"
- opacity="0.25"
- a:adobe-blending-mode="multiply"
- a:adobe-opacity-share="1"
- width="30"
- height="30"
- xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACYAAAAhCAYAAAC1ONkWAAAACXBIWXMAAC4jAAAuIwF4pT92AAAA GXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAtFJREFUeNrsmP1LFEEYx292Ts3V 9ujFrCiwFyPShH4I+imoiPqbhYKIoKigN0W8SulNIrOU63S921u/A9+BYdm9mbndg4IGPiynuzOf eea52WeuVvvf/Joo8VwA6rxm+0lBD3R5TYctpu6XYBRE4DiYzMhpqRbYBDtgHyQ+gsIzQmMUOg3O gzkwzciZTUXqO1gCH8E3CsauERSOUiOgAc6AC2ABXAYXwZECsV/gPVgBb8AH8AVsg45NTjhKTYGr 4Aa4AmYZqYjLmpdj+4ySilwTLIOn4C34YZOTjlLXwH1wC8xzKSMureQym0g+O85ITxP1uU3hPS6r t5j63zFK3QM3uYwNQ0g45KUSPMSJNLjsLS71blHUZJ9Ox5lDSuo2k32SHYsBvslKcAIc5jJvUK7r I1ZntK6Du8yryBJhW9P73hi3jg2ym7ek0hKtO0z4E5xx2RYYOany7DPYyotaUPCwyoVL3KemKpLS TX+h5jhGI88jT0x9/U9yrzoHwoL7ykQtZN8LHGvURUxy05xhntWH8I7WOTzDsaSLmOAMQl6DIYgF mTGEi5iWEyWqD9dtpHCMoPaXtn9KrHSR59CsYxSJ6SKv1e9FW6L1MmM4iXWMIu8ri7u04mjF7HuJ Y3VcxLqciaqfVlnYJRWKJexzlWNs5r2SZMGMNOp1cRYc5atEVBCtPVazD8AzHzHdQUKZUyzywoIT kY9Uh9XrC4o1WTimPmI9ouv9iAXfIHKm1GtKvSyKlq2C1Una5sMTLBRHPN4MOvIxpV6BRfCEJU/s W8Ganf4xzoaCf5dGaS36JHnMKnWNUg/BY35uD1rza7ku5bY4658cMDHkEt6nUZP4TQG1dI/Ic/CJ /SVVHHglS2J94pnluXLecuB9x3Nlk5+3jUlV9hOBMAQjCpn1lMikgFrCdQrtGEKp62CDlCtaMLQc eNu+QmV/7XGp2cyN2rsdCDAAoyXZx8WJpTUAAAAASUVORK5CYII="
- transform="matrix(0.24 0 0 0.24 213.9448 216.5547)"
- id="image140"></image><g
- id="g142"><radialGradient
- id="SVGID_8_"
- cx="217.5439"
- cy="219.7041"
- r="2.9995"
- gradientTransform="matrix(1 0 0 0.75 0 54.926)"
- gradientUnits="userSpaceOnUse"><stop
- offset="0.0123"
- style="stop-color:#FFFFFF"
- id="stop145" /><stop
- offset="0.4235"
- style="stop-color:#FAFCF6"
- id="stop147" /><stop
- offset="1"
- style="stop-color:#F2F7E8"
- id="stop149" /><a:midPointStop
- offset="0.0123"
- style="stop-color:#FFFFFF" /><a:midPointStop
- offset="0.6235"
- style="stop-color:#FFFFFF" /><a:midPointStop
- offset="1"
- style="stop-color:#F2F7E8" /></radialGradient><circle
- fill="url(#SVGID_8_)"
- cx="217.544"
- cy="219.704"
- r="2.999"
- id="circle151" /></g></g><g
- id="g153"><image
- overflow="visible"
- opacity="0.25"
- a:adobe-blending-mode="multiply"
- a:adobe-opacity-share="1"
- width="30"
- height="30"
- xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACYAAAAhCAYAAAC1ONkWAAAACXBIWXMAAC4jAAAuIwF4pT92AAAA GXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAttJREFUeNrsmO9r00Acxptc1m6d Fn9M125sU4RVpyjiSwXB/9wXulciiE4dhpUMpwzFUa02XdP4HDwHR7hcLk0mCh58WOnI9548973k uTYa/0e54c15nQ8E8TJ1UpKQ2Z8QJgUtgDa4CC6AliZOiYrBCfgGfoLTsgK9OQStgE2wDa6DDv+v hhQwBAdgH0TgS1mBLsIEBV0F18BNcJvC1sCyQdgIHFHYG/AODMAxBSZVhQXgHJ15AO5T2Aa4TMHC 0GMJBXwFhxT2Erygkz/AtGhim1NS1A3wCDwGO+AKBS3QKS+nrlp6eQProKe5G4LvNucCS0+1uXQP wRNwj6JaFkH6SgitNxeJ0BwNueSzMsIC3ulduiX/roJmpp9cWkVQ1CrrqB17ws+TPGdM3y3Rftnk fTpVVlS2ZpN1+qy7znl8V2HSrUvcdbKnutryVRk+63RZd5vzBC7ClFvyMXALbHEDiJreNGpDbbH+ Wp5rJmEd7sQ+n13NCq8uU881WbfPeTquwtq0u1ezW1nXepyn7SJM9dgSCc4oPBTO4Rus9jKJwatZ lGeZy+rYXzH+GWEpXxEq5Kl8VecwBcnURVjMgCcZn5GwsTZH7CJMD3khL5zWLGzKuiHnGZpe5CZh I6bO9wx7v+bN7YYxY70j1o/yEoZpKSdMmntMoMq1tIYlVG7ts/4x50tddmXCEDfgxRETZ1JRWMI6 EesObGFRWCyfaa+oDl8jQd4DscApJUr21S54Dj7wu1JBUW2Ct1rybDDRntditUtPnWor8Aw8Zd2h rXdFQdGYd6WfbPTYnOeeEiSv/cTDyC5FvbL1luspSSXPFUYUmaHu8KS0yfjdMpySYp6QIop6TZdC njEnRTvdpVc8Lt0yBW4wS+04HHj3+Fg4pKARnUxdJnVNBL7hSNal4OxPBFLAZ/CRzumn8NR1wrKR xdfy1KLlwDvmw3RaRlDVX3s8h8dGWiUE/BZgAMf82R9IYLF+AAAAAElFTkSuQmCC"
- transform="matrix(0.24 0 0 0.24 228.8599 216.5547)"
- id="image155"></image><g
- id="g157"><radialGradient
- id="SVGID_9_"
- cx="232.459"
- cy="219.7041"
- r="2.9995"
- gradientTransform="matrix(1 0 0 0.75 0 54.926)"
- gradientUnits="userSpaceOnUse"><stop
- offset="0.0123"
- style="stop-color:#FFFFFF"
- id="stop160" /><stop
- offset="0.4235"
- style="stop-color:#FAFCF6"
- id="stop162" /><stop
- offset="1"
- style="stop-color:#F2F7E8"
- id="stop164" /><a:midPointStop
- offset="0.0123"
- style="stop-color:#FFFFFF" /><a:midPointStop
- offset="0.6235"
- style="stop-color:#FFFFFF" /><a:midPointStop
- offset="1"
- style="stop-color:#F2F7E8" /></radialGradient><circle
- fill="url(#SVGID_9_)"
- cx="232.459"
- cy="219.704"
- r="2.999"
- id="circle166" /></g></g><g
- id="g168"><image
- overflow="visible"
- opacity="0.25"
- a:adobe-blending-mode="multiply"
- a:adobe-opacity-share="1"
- width="30"
- height="30"
- xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACEAAAAhCAYAAABX5MJvAAAACXBIWXMAAC4jAAAuIwF4pT92AAAA GXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAt9JREFUeNrsl91rE0EUxTOzm69a 05YmVWsUFdRKRfDBJ32Q+ocLRUTBBx+UYiOitlqRaEos2UT3w3P1jIzrbHZNVuiDAz9CNru5Z+69 M3O2Uvk/fg414zOCDzSxRwJiEJGkTBGKAatgEayCFr8rS4AwAp/BIRhTTDyPCDPzGoOfAhfANdAF zdT/SMBPoEf2wYBiQldmVAEBHjgJzoCL4DoFXAZroO4QMQRvwAvwDOyCtxQ3SWdF5QiQui+DDXAL 3ABXwDqvNygy3RPfwBHog1dgBzwBT8E7ENhCvJwMrIBNsAXugZvgPK83KdKzGlTzu8/fpWc64DSz +RV8oYhfTetPEdFiBu6SDc6+6lgRWZNo8P4Flk0zcMiMSGkSP+MPalQvJbhDASuplVB0RfkU0WUJ RuyNIcsWucoh15bYgFssQYfC1Bz7kcdsVNgrByzNHyJMFs4xA7fZA80CJcgb2uofycYHihlrh4hF ax9YL0mAGT7LKivsKmjLpLXjplVrH1ie0ryzlkWa9SxXnWR5QTv6ocUmWuMDqlLu8Di5ruk1Vzmq LEGdD5QtQln7yI8YespZUXbwzBi6cgzGsRTx14ZkxvFbDJeI9Laa/AMBgRUjTIsI6Yh69ANH0xzR DMMc8x/pMcTwjNIiIlqyHg1Jn8dvUmIWZGKv6THk/Jh4GWqFE3RTHW5auoQsTDj7B+Ah2JOzI8vU RNxQ2pYh8efYO4yHGNDubfNzkHWUJ9YqMf5yiZ7AmyEjtoAdCnjMjIj5TbycBhqxJxosT90SogoE j1kCI+A+Rbw0XmKaxzQlCXjz2GpOXUBITPFDztiUYJsNPzAC8kQklpBDrpQ+sxNZL0MR020wZlaC P2cTSvBHzMAg/f6hCu6qNfaGrJRLNCSbOS8/uyyBfL5n8JFrJy7a7Solpk1DYrynTvWBKcMBsxhw 9nEZL8S2GNtzuJo6YFOG1oor7a28iOdI8gLb47sAAwCDFN6m03jgxgAAAABJRU5ErkJggg=="
- transform="matrix(0.24 0 0 0.24 243.7749 216.5547)"
- id="image170"></image><g
- id="g172"><radialGradient
- id="SVGID_10_"
- cx="247.374"
- cy="219.7041"
- r="2.9995"
- gradientTransform="matrix(1 0 0 0.75 0 54.926)"
- gradientUnits="userSpaceOnUse"><stop
- offset="0.0123"
- style="stop-color:#FFFFFF"
- id="stop175" /><stop
- offset="0.4235"
- style="stop-color:#FAFCF6"
- id="stop177" /><stop
- offset="1"
- style="stop-color:#F2F7E8"
- id="stop179" /><a:midPointStop
- offset="0.0123"
- style="stop-color:#FFFFFF" /><a:midPointStop
- offset="0.6235"
- style="stop-color:#FFFFFF" /><a:midPointStop
- offset="1"
- style="stop-color:#F2F7E8" /></radialGradient><circle
- fill="url(#SVGID_10_)"
- cx="247.374"
- cy="219.704"
- r="2.999"
- id="circle181" /></g></g><g
- id="g183"><image
- overflow="visible"
- opacity="0.25"
- a:adobe-blending-mode="multiply"
- a:adobe-opacity-share="1"
- width="30"
- height="30"
- xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACEAAAAhCAYAAABX5MJvAAAACXBIWXMAAC4jAAAuIwF4pT92AAAA GXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAn9JREFUeNrsl+lrE0EYxvdKjSZW YxEPxBsVrNdHQTxA/KMFBRGPDwoVVIpoq3jUeJUG25qk2fVZ+A28WTabxG4lHzrwgxw78z7zzMw7 73reBDR/jOcCUREhn21LRCy6osfn0kT4BN0h9oiDoiGmTN8Efoum+CHWEBRvRoSbeZXgR8QZcVEc F7syfTcI/kq8Fgviu1jlv3hcET627xXHxFlxWZwXJ8RMxgmPIKkTn8UbMSdeinfiq1hnmUYS4QTs F5fENQSc4rfUgahgT7TFivgk5sVj8VQs4kqukGiAgCviDiKOijr/BUOWL7t/9uGaVyTEighYggsI uI79NQYfdY9FPF8x/WL2xiJLk9hOoelcJehtcYslqI8hYNDGrvP9G5t1PbtRQ+NIg/W/KWaxNNpk DnK5JZ35TzbuCq70ibAu3BBXxWHW1i8hGbpc0+akNLNuBDAtTopz4kBJAuxEC8cPzIlI88BpOoQl Xw1TuDtLsqvZkxbwUA2FjZxEVJYbdROj4mWOpVuzCMoWYGPlxggm4SrfFmFFJOTzDUi2KFY8KIYT sUoSWRadLRDSM0XPMgVPn4guOT0tSN6KVtHd/w8tYWJfqDHeM+m+jBkTeIEaoEmKTUp0oXD80Kjt kU4PkVSqJWTOhIDpFf5APBFLOOPliYhxZgYR00MKmVEEuKWeQ8Q8ruRe5Xb3po7s5CqvDSjnxhVw XzzjFu3k5XTbuuziNYLvZolCk+KHBU8n8QcBL8Rd8VB8yCto8kTEDNBCTIdBg4wQvyD4L6rsdOb3 xKNhhW44IKm4wZaghSAnoIdrHWhz/m3wlOfiI86OXPJPzMvPxLwG/tcX4u3m2l8BBgBQ/dU5d1Za tAAAAABJRU5ErkJggg=="
- transform="matrix(0.24 0 0 0.24 199.0298 230.2217)"
- id="image185"></image><g
- id="g187"><radialGradient
- id="SVGID_11_"
- cx="202.6289"
- cy="233.3711"
- r="2.999"
- gradientTransform="matrix(1 0 0 0.75 0 58.3428)"
- gradientUnits="userSpaceOnUse"><stop
- offset="0.0123"
- style="stop-color:#FFFFFF"
- id="stop190" /><stop
- offset="0.4235"
- style="stop-color:#FAFCF6"
- id="stop192" /><stop
- offset="1"
- style="stop-color:#F2F7E8"
- id="stop194" /><a:midPointStop
- offset="0.0123"
- style="stop-color:#FFFFFF" /><a:midPointStop
- offset="0.6235"
- style="stop-color:#FFFFFF" /><a:midPointStop
- offset="1"
- style="stop-color:#F2F7E8" /></radialGradient><circle
- fill="url(#SVGID_11_)"
- cx="202.629"
- cy="233.37"
- r="2.999"
- id="circle196" /></g></g><g
- id="g198"><image
- overflow="visible"
- opacity="0.25"
- a:adobe-blending-mode="multiply"
- a:adobe-opacity-share="1"
- width="30"
- height="30"
- xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACYAAAAhCAYAAAC1ONkWAAAACXBIWXMAAC4jAAAuIwF4pT92AAAA GXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAmlJREFUeNrsmM9r1EAUx3cz2XW1 il2wLLagIh5aeilUBC967EX/XA/1It5aUaiC2JNY/EWp0lZkG3c3id+Bz0AIaXayibKHDnzIJfPm s29eZl/Sas3paNeYZ0SHaz5OKmIx5pr+azF7fyh6oi+WxXURZGJZiUScim/iWERiUkWwXTFDlxG6 I1bFBnKd3P1jpPbEvviE4JlvBtueUl1xQ9wVa2ITsdtkzOTmxGTsALE34oP4KH6I0TS5tofUJXFT PBCPxToZ67OlZTUWkSmbsffipXglvos/ZXLGI1N2qx6Kp+KRuFcgVYRh/oJYEgNxle08EUNqsbJY SDAnZa8r1FlYoQzc02sFF5n/W/wskzMlAReopydkaoVtDWocL1bqGtv8Bblx0YSgJFt9xNbJXLfG uZctjQEx11gj9M2YDXCFiVviflmAGeQCYtlt/MxTOvbJmEFkFZqSyu9GNr7xEXNP4gbnVK/mFhZl rUdsd0B3fcQCDs3lcw7PJobJrRH4iE37g24qa6VrBK05HRdiTYjVbvI8xtQ1isSyTd4pE5secW6N xEdslGnyDmhd0oazFRF7j7VGPmIxPdQ+HNMWNzUmBfFj3+7C1YDtMG7RT3UaONMS+jErtC1e05tV EksyPdkAyToHbsqW2e51R7ygs42qNooJaU/oPF2TF8wgl2SkdsVz8Y5sJVXFUvryX6TfNXld5HwE U37cWUbqGdfDsto1njVxQjscQ8jc8+SckO25jqipHTK1i+Ro1peR7FM6pKH7StAhC7uam7CQI+J+ J7RNTb0lU7Vf3+b6hXeuPxH8948qF6Pq+CvAAGGezDColMK7AAAAAElFTkSuQmCC"
- transform="matrix(0.24 0 0 0.24 213.9448 230.2217)"
- id="image200"></image><g
- id="g202"><radialGradient
- id="SVGID_12_"
- cx="217.5439"
- cy="233.3711"
- r="2.999"
- gradientTransform="matrix(1 0 0 0.75 0 58.3428)"
- gradientUnits="userSpaceOnUse"><stop
- offset="0.0123"
- style="stop-color:#FFFFFF"
- id="stop205" /><stop
- offset="0.4235"
- style="stop-color:#FAFCF6"
- id="stop207" /><stop
- offset="1"
- style="stop-color:#F2F7E8"
- id="stop209" /><a:midPointStop
- offset="0.0123"
- style="stop-color:#FFFFFF" /><a:midPointStop
- offset="0.6235"
- style="stop-color:#FFFFFF" /><a:midPointStop
- offset="1"
- style="stop-color:#F2F7E8" /></radialGradient><circle
- fill="url(#SVGID_12_)"
- cx="217.544"
- cy="233.37"
- r="2.999"
- id="circle211" /></g></g><g
- id="g213"><image
- overflow="visible"
- opacity="0.25"
- a:adobe-blending-mode="multiply"
- a:adobe-opacity-share="1"
- width="30"
- height="30"
- xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACYAAAAhCAYAAAC1ONkWAAAACXBIWXMAAC4jAAAuIwF4pT92AAAA GXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAlRJREFUeNrsmM9LG0EUx5PdjTTW otDYWmoOQm2M/YGXnrxI/3IvnnoRW7TagocotqjQtLYp5pffgc/CECc7u+uGpuDAB2Y32Tff9+bN 7Jstlaa0lXM+E4gIAsd/BqIHpj+cpLBY0Ix4JBbhwYg4I+SvOIdf4jqrwHIOQUvihXgtVsWCQ9gP 8UV8El/Ft6wCyyl+DxH0XLwUb8UbxD0V1RE7ZtCO+I6oj2JPHIlTBPZ94sqe3yIi0hCb4h1Reibm iOK4HDPRuRJnRO+D2BGHRLSXJC7yRGpeNMV7sYXAeQSFCU6FRHIGB56IGveMI/uIGxu5JGFzTN0W wpqIijIsmpDFYZ55hah4xRpxP7MIM4NWWHEbTGGDKY1ybi8VKyVM/l2wYjtM+S1xrvww9x6KulgX K0QqvOOeGafGCnbrjOPScOtmnPA1Hm7Sr+TcjF2Rq2F3nb4zNVzCZsWyWMOr2XFe5WgB9urYX+ba KywkF1bJh8d4WWSrYLdhbdBhmohVrddNtYApLOUZI0jxgp6EMO8YQWlK272wuwobFlHkeVqqMVzC OlaR15mQMO8Yo8L6VpFnypNL0S1YWBe7h4wTVxneiP0RJ+KzaHE9KEjUAHst7J9wnWoqe7z9TVly QL9bwJQOsXOB3X36vbTVhfHqN16Zh49F2xXujK2PnWPsthhnkLYeiz0ziblrVZ55CkV7Ftrk1Q52 z5NmIkowdsUBIrIqz7SltR2la0vUNhxhP3PNP7RCf4CouPIs4jDS9p2U/svj21QfeKf6E8E/+ahy 37K2GwEGAJb/2mQI89WQAAAAAElFTkSuQmCC"
- transform="matrix(0.24 0 0 0.24 228.8599 230.2217)"
- id="image215"></image><g
- id="g217"><radialGradient
- id="SVGID_13_"
- cx="232.459"
- cy="233.3711"
- r="2.999"
- gradientTransform="matrix(1 0 0 0.75 0 58.3428)"
- gradientUnits="userSpaceOnUse"><stop
- offset="0.0123"
- style="stop-color:#FFFFFF"
- id="stop220" /><stop
- offset="0.4235"
- style="stop-color:#FAFCF6"
- id="stop222" /><stop
- offset="1"
- style="stop-color:#F2F7E8"
- id="stop224" /><a:midPointStop
- offset="0.0123"
- style="stop-color:#FFFFFF" /><a:midPointStop
- offset="0.6235"
- style="stop-color:#FFFFFF" /><a:midPointStop
- offset="1"
- style="stop-color:#F2F7E8" /></radialGradient><circle
- fill="url(#SVGID_13_)"
- cx="232.459"
- cy="233.37"
- r="2.999"
- id="circle226" /></g></g><g
- id="g228"><image
- overflow="visible"
- opacity="0.25"
- a:adobe-blending-mode="multiply"
- a:adobe-opacity-share="1"
- width="30"
- height="30"
- xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACEAAAAhCAYAAABX5MJvAAAACXBIWXMAAC4jAAAuIwF4pT92AAAA GXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAnpJREFUeNrsl2lrE1EUhmdLjSZ2 sYgL4lqsYN0+CuIC4o8WFERcPii0YEsQtYpL3cVgW7PMjO+F55ZhmMlMzATyoRceSDKZc957zplz zzjOBCz3P+/xRE34fE6uWESiJ0I+VybCxekeMSMOizkxlbATwx/xRXwXWwiKRhFhd17H+TFxVlwU J8W+lJ0+zlfFmngjvolNrkXDinAJ+6w4IRbFZXFenBLzqUg4ODGR+CheimXxQrwWn8U2aSolwgo4 KC6Jawg4w28mAsGAmuiI3+KDaInH4qlYJyo7QoISAq6IO4g4Lppc8wrSl66fA0TNSQvJE+GRggsI uE74GxgvW8gB/68l7ouojXVSE/s5N9dxelvcIgXNIQTkFXaT718pViMiyjIa8OiZ/N8US4Q0GLEf 2d5iauYHhWtqpu8PiMINcVUcJbduBY3R9poOT4rpJdteRi1Mi9PinDhUkQC7/Cz7aRH2iTB9YIEb /IqPiSmiu0Sza3gZf2qgcC6jEVUVjWbCR83LOR8CqFpAMu07PrxJOMp3ReSJiOnnfYjH5DdK+sgS sUkT+SW6YxASJoYe46OXFtGjp5uB5JVop8/+EVfMxj4xY7w1m/YywtRmGmqhtlNhNMIs+36O2pB2 fYSmUq+gc8ZsyBzhD8QTsWEikyciomjnETFdMMiUEWBTvYyIFlGJ/ILqNRHZy1HeyBnnhhVwXzzj FO06BSHuUcVbON9Piuy7hlvCudnEXwSsiLvioXhnB5oiEREG2ojpYtRLCXEHOP/JlG12fk88yhp0 /RJNxRrbgDaCrICQqHWhw/OfdG54Lt4T2dIj/8S8/EzMa+DYX4h3l13/BBgABM7SO70ZkkMAAAAA SUVORK5CYII="
- transform="matrix(0.24 0 0 0.24 243.7749 230.2217)"
- id="image230"></image><g
- id="g232"><radialGradient
- id="SVGID_14_"
- cx="247.374"
- cy="233.3711"
- r="2.999"
- gradientTransform="matrix(1 0 0 0.75 0 58.3428)"
- gradientUnits="userSpaceOnUse"><stop
- offset="0.0123"
- style="stop-color:#FFFFFF"
- id="stop235" /><stop
- offset="0.4235"
- style="stop-color:#FAFCF6"
- id="stop237" /><stop
- offset="1"
- style="stop-color:#F2F7E8"
- id="stop239" /><a:midPointStop
- offset="0.0123"
- style="stop-color:#FFFFFF" /><a:midPointStop
- offset="0.6235"
- style="stop-color:#FFFFFF" /><a:midPointStop
- offset="1"
- style="stop-color:#F2F7E8" /></radialGradient><circle
- fill="url(#SVGID_14_)"
- cx="247.374"
- cy="233.37"
- r="2.999"
- id="circle241" /></g></g></g></g><path
- d="m 529.664,248.155 h 18.498 l -2.809,18.064 h 5.59 37.586 l 2.6,-17.718 c 4.98,-1.091 9.133,-3.455 12.512,-6.693 3.084,4.075 8.566,7.37 18.252,7.37 6.338,0 12.775,-1.807 17.174,-3.687 4.254,2.399 9.463,3.687 15.459,3.687 3.088,0 6.236,-0.355 9.426,-1.023 h 67.135 l 3.354,-24.827 -5.445,-0.764 1.879,-13.356 c 0.371,-2.386 0.449,-4.66 0.449,-6.156 l -0.008,-0.375 c -0.457,-12.191 -8.139,-19.765 -20.045,-19.765 -2.404,0 -4.623,0.314 -6.676,0.852 h -34.189 l -0.035,0.244 c -2.527,-0.701 -5.41,-1.096 -8.686,-1.096 -3.801,0 -7.406,0.555 -10.76,1.598 l 0.105,-0.746 h -12.467 l 1.826,-12.951 H 613.08 l -1.846,7.658 c -1.373,5.704 -2.213,5.793 -4.453,6.03 l -4.508,0.477 c -3.049,-1.424 -6.357,-2.065 -9.602,-2.065 -2.135,0 -4.275,0.284 -6.416,0.852 h -19.291 c 0.502,-1.772 0.775,-3.674 0.775,-5.678 0,-9.601 -6.846,-16.305 -16.646,-16.305 -11.055,0 -18.775,7.721 -18.775,18.776 0,0.951 0.082,1.869 0.219,2.764 -2.135,-0.288 -4.277,-0.409 -5.553,-0.409 -2.053,0 -4.072,0.288 -6.045,0.852 h -31.342 c -2.74,-0.553 -5.641,-0.852 -8.537,-0.852 -7.138,0 -13.492,1.674 -18.808,4.723 l -3.451,-1.461 c -3.711,-1.571 -11.232,-3.262 -18.979,-3.262 -8.933,0 -16.383,2.56 -21.576,7.016 -3.265,-4.473 -8.523,-7.016 -15.228,-7.016 -4.822,0 -9.021,1.477 -12.572,3.44 -2.996,-2.204 -6.796,-3.44 -11.115,-3.44 -2.327,0 -4.48,0.315 -6.476,0.852 h -33.963 l -0.035,0.245 c -2.526,-0.702 -5.41,-1.097 -8.687,-1.097 -20.458,0 -35.307,16.031 -35.307,38.117 0,17.363 10.785,28.149 28.148,28.149 3.087,0 6.236,-0.356 9.426,-1.023 h 88.816 c 3.706,0.676 7.669,1.023 11.154,1.023 8.907,0 16.278,-2.375 21.51,-6.593 4.872,4.252 11.585,6.593 19.728,6.593 3.053,0 6.206,-0.368 9.286,-1.023 h 44.664 2.069 z"
- id="path243"
- inkscape:connector-curvature="0"
- style="fill:#f5f5f5" /><g
- id="g245"
- transform="translate(0,16)"><g
- id="g247"><path
- d="m 340.308,218.463 c -5.538,2.556 -11.588,4.26 -17.638,4.26 -13.377,0 -18.148,-7.839 -18.148,-18.148 0,-17.893 11.418,-28.117 25.307,-28.117 9.372,0 13.973,4.26 13.973,11.247 0,12.184 -12.865,15.763 -26.157,17.126 0.255,4.346 2.045,8.35 8.435,8.35 3.068,0 7.243,-0.937 12.355,-3.067 l 1.873,8.349 z m -8.095,-29.567 c 0,-2.045 -1.448,-3.237 -4.09,-3.237 -4.771,0 -8.69,4.175 -9.969,10.906 3.664,-0.511 14.059,-2.3 14.059,-7.669 z"
- id="path249"
- inkscape:connector-curvature="0"
- style="fill:#383838" /><path
- d="m 394.07,221.7 -0.171,-0.255 1.789,-10.055 2.642,-18.063 c 0.512,-3.749 0.341,-5.623 -1.96,-5.623 -2.642,0 -5.794,2.727 -9.372,5.879 l -2.727,19.512 c -0.171,1.363 -0.171,1.534 1.022,1.704 l 4.26,0.597 -0.852,6.305 h -18.404 l -0.171,-0.341 1.875,-10.82 2.471,-17.212 c 0.512,-3.237 0.682,-5.453 -1.789,-5.453 -3.238,0 -7.413,3.664 -9.714,5.709 l -2.642,19.512 c -0.17,1.363 -0.17,1.534 1.108,1.704 l 4.26,0.597 -0.852,6.305 h -23.347 l 0.853,-6.39 3.749,-0.512 c 1.107,-0.17 1.363,-0.426 1.533,-1.704 l 3.579,-25.987 c 0.17,-0.938 0,-1.534 -0.767,-1.789 l -4.176,-1.534 0.938,-6.476 h 16.871 l -0.938,6.987 0.256,0.085 c 4.43,-3.749 9.116,-7.924 15.592,-7.924 4.687,0 7.839,2.641 8.18,7.753 l 0.256,0.086 c 4.175,-3.664 9.202,-7.839 15.252,-7.839 6.22,0 8.775,3.152 8.946,9.202 0,1.618 -0.171,3.493 -0.426,5.538 l -3.067,21.897 c -0.171,1.363 -0.171,1.534 1.107,1.704 l 4.175,0.597 -0.852,6.305 H 394.07 z"
- id="path251"
- inkscape:connector-curvature="0"
- style="fill:#383838" /><path
- d="m 443.995,190.771 -0.17,-4.431 c 0,-0.682 -0.085,-1.108 -1.022,-1.363 -1.022,-0.256 -2.642,-0.427 -4.771,-0.427 -3.579,0 -6.391,1.108 -6.391,4.09 0,2.727 2.982,3.749 6.731,5.027 6.05,2.045 13.888,4.431 13.888,13.463 0,11.076 -9.372,15.592 -20.193,15.592 -8.009,0 -14.91,-1.959 -16.273,-2.981 l 1.618,-12.355 8.691,0.512 0.255,4.941 c 0,0.597 0.171,1.108 0.938,1.363 1.278,0.427 3.238,0.768 6.05,0.768 4.687,0 7.327,-1.79 7.327,-4.687 0,-3.408 -3.152,-4.175 -8.009,-5.624 -6.135,-1.874 -12.78,-4.26 -12.78,-13.206 0,-10.48 9.116,-14.996 19.597,-14.996 6.646,0 12.866,1.533 15.081,2.471 l -1.704,12.354 -8.863,-0.511 z"
- id="path253"
- inkscape:connector-curvature="0"
- style="fill:#383838" /><path
- d="m 489.748,218.548 c -4.175,2.386 -10.395,4.175 -16.444,4.175 -13.036,0 -18.575,-7.583 -18.575,-18.574 0,-18.83 11.588,-27.691 25.988,-27.691 6.475,0 11.843,1.874 14.229,3.578 l -1.874,13.377 -8.691,-0.426 -0.255,-5.794 c 0,-0.597 -0.086,-0.938 -0.597,-1.192 -1.022,-0.427 -2.557,-0.597 -4.175,-0.597 -5.624,0 -11.418,4.601 -11.418,17.382 0,7.839 3.493,10.395 8.436,10.395 4.346,0 8.436,-1.448 11.247,-2.556 l 2.129,7.923 z"
- id="path255"
- inkscape:connector-curvature="0"
- style="fill:#383838" /><path
- d="m 491.364,221.7 0.853,-6.39 3.919,-0.512 c 1.193,-0.17 1.363,-0.426 1.534,-1.704 l 3.578,-25.987 c 0.086,-0.938 -0.085,-1.534 -0.852,-1.789 l -4.261,-1.534 0.938,-6.476 h 16.87 l -1.107,7.669 0.256,0.17 c 3.323,-4.771 8.095,-8.69 13.548,-8.69 1.874,0 5.112,0.341 6.561,0.767 l -2.13,15.507 -9.969,-0.341 -0.256,-4.431 c -0.086,-0.767 -0.256,-1.022 -0.938,-1.022 -1.619,0 -4.26,1.96 -6.646,4.431 l -2.981,21.643 c -0.171,1.363 -0.085,1.619 1.192,1.704 l 8.095,0.682 -0.938,6.305 h -27.266 z"
- id="path257"
- inkscape:connector-curvature="0"
- style="fill:#383838" /><path
- d="m 536.094,221.7 -0.17,-0.426 2.045,-11.503 3.152,-22.749 c 0.17,-0.938 -0.086,-1.534 -0.853,-1.79 l -4.175,-1.448 0.852,-6.476 h 18.149 l -5.027,35.786 c -0.171,1.363 -0.085,1.534 1.192,1.704 l 4.09,0.597 -0.852,6.305 h -18.403 z m 5.879,-57.598 c 0,-5.453 3.238,-8.775 8.776,-8.775 4.175,0 6.646,2.215 6.646,6.305 0,5.368 -3.322,8.861 -8.861,8.861 -4.176,-0.001 -6.561,-2.387 -6.561,-6.391 z"
- id="path259"
- inkscape:connector-curvature="0"
- style="fill:#383838" /><path
- d="m 556.796,239.764 -0.17,-0.341 2.471,-14.229 5.282,-38.087 c 0.171,-1.022 -0.085,-1.534 -0.767,-1.789 l -4.175,-1.534 0.938,-6.476 h 17.041 l -1.022,6.816 0.255,0.085 c 5.027,-4.686 10.311,-7.753 15.678,-7.753 7.328,0 12.44,4.686 12.44,17.041 0,11.758 -4.601,29.225 -20.449,29.225 -5.538,0 -8.605,-2.13 -11.759,-4.345 l -1.874,12.78 c -0.085,0.938 0.085,1.278 1.192,1.363 l 8.606,0.853 -0.938,6.39 h -22.749 z m 17.041,-30.247 c 2.13,1.789 4.942,3.322 8.095,3.322 6.901,0 9.458,-9.713 9.458,-17.211 0,-5.027 -1.193,-8.351 -4.431,-8.351 -3.408,0 -7.754,3.664 -10.821,6.391 l -2.301,15.849 z"
- id="path261"
- inkscape:connector-curvature="0"
- style="fill:#383838" /><path
- d="m 635.777,219.4 c -3.749,1.789 -9.458,3.322 -14.229,3.322 -8.521,0 -12.099,-2.981 -12.099,-9.969 0,-1.107 0.085,-2.386 0.256,-3.749 l 3.066,-22.323 c 0.086,-0.512 0.086,-0.853 -0.511,-0.853 h -5.879 l 1.107,-7.839 c 7.242,-0.767 10.906,-4.431 13.122,-13.633 h 7.924 l -1.704,12.1 c -0.085,0.596 -0.085,0.852 0.597,0.852 h 11.758 l -1.193,8.521 h -12.439 l -2.812,20.364 c -0.171,1.107 -0.256,1.96 -0.256,2.727 0,2.982 1.278,4.26 4.942,4.26 2.385,0 4.771,-0.596 6.816,-1.363 l 1.534,7.583 z"
- id="path263"
- inkscape:connector-curvature="0"
- style="fill:#383838" /><path
- d="m 671.817,218.463 c -5.538,2.556 -11.588,4.26 -17.638,4.26 -13.377,0 -18.148,-7.839 -18.148,-18.148 0,-17.893 11.418,-28.117 25.307,-28.117 9.372,0 13.973,4.26 13.973,11.247 0,12.184 -12.865,15.763 -26.157,17.126 0.255,4.346 2.045,8.35 8.435,8.35 3.068,0 7.243,-0.937 12.355,-3.067 l 1.873,8.349 z m -8.094,-29.567 c 0,-2.045 -1.448,-3.237 -4.09,-3.237 -4.771,0 -8.69,4.175 -9.969,10.906 3.664,-0.511 14.059,-2.3 14.059,-7.669 z"
- id="path265"
- inkscape:connector-curvature="0"
- style="fill:#383838" /><path
- d="m 703.596,221.7 -0.17,-0.255 1.874,-10.396 2.471,-17.723 c 0.512,-3.578 0.341,-5.879 -2.215,-5.879 -3.664,0 -8.18,3.578 -11.077,6.135 l -2.641,19.512 c -0.171,1.363 -0.171,1.534 1.107,1.704 l 4.26,0.597 -0.852,6.305 h -23.347 l 0.853,-6.39 3.749,-0.512 c 1.107,-0.17 1.363,-0.426 1.533,-1.704 l 3.579,-25.987 c 0.17,-0.938 0,-1.534 -0.768,-1.789 l -4.175,-1.534 0.938,-6.476 h 16.87 l -0.937,6.987 0.255,0.085 c 4.771,-4.09 9.373,-7.924 16.02,-7.924 6.475,0 9.798,3.322 10.054,10.139 0,1.363 -0.085,3.067 -0.341,4.687 l -3.067,21.812 c -0.171,1.363 -0.171,1.534 1.022,1.704 l 4.26,0.597 L 722,221.7 h -18.404 z"
- id="path267"
- inkscape:connector-curvature="0"
- style="fill:#383838" /></g><g
- id="g269"><linearGradient
- id="SVGID_15_"
- gradientUnits="userSpaceOnUse"
- x1="324.1611"
- y1="239.7637"
- x2="324.1611"
- y2="155.3275"><stop
- offset="0"
- style="stop-color:#000000"
- id="stop272" /><stop
- offset="1"
- style="stop-color:#000000;stop-opacity:0"
- id="stop274" /><a:midPointStop
- offset="0"
- style="stop-color:#000000" /><a:midPointStop
- offset="0.6933"
- style="stop-color:#000000" /><a:midPointStop
- offset="1"
- style="stop-color:#000000;stop-opacity:0" /></linearGradient><path
- d="m 340.308,218.463 c -5.538,2.556 -11.588,4.26 -17.638,4.26 -13.377,0 -18.148,-7.839 -18.148,-18.148 0,-17.893 11.418,-28.117 25.307,-28.117 9.372,0 13.973,4.26 13.973,11.247 0,12.184 -12.865,15.763 -26.157,17.126 0.255,4.346 2.045,8.35 8.435,8.35 3.068,0 7.243,-0.937 12.355,-3.067 l 1.873,8.349 z m -8.095,-29.567 c 0,-2.045 -1.448,-3.237 -4.09,-3.237 -4.771,0 -8.69,4.175 -9.969,10.906 3.664,-0.511 14.059,-2.3 14.059,-7.669 z"
- id="path276"
- style="fill:url(#SVGID_15_)"
- inkscape:connector-curvature="0" /><linearGradient
- id="SVGID_16_"
- gradientUnits="userSpaceOnUse"
- x1="377.45459"
- y1="239.7637"
- x2="377.45459"
- y2="155.3277"><stop
- offset="0"
- style="stop-color:#000000"
- id="stop279" /><stop
- offset="1"
- style="stop-color:#000000;stop-opacity:0"
- id="stop281" /><a:midPointStop
- offset="0"
- style="stop-color:#000000" /><a:midPointStop
- offset="0.6933"
- style="stop-color:#000000" /><a:midPointStop
- offset="1"
- style="stop-color:#000000;stop-opacity:0" /></linearGradient><path
- d="m 394.07,221.7 -0.171,-0.255 1.789,-10.055 2.642,-18.063 c 0.512,-3.749 0.341,-5.623 -1.96,-5.623 -2.642,0 -5.794,2.727 -9.372,5.879 l -2.727,19.512 c -0.171,1.363 -0.171,1.534 1.022,1.704 l 4.26,0.597 -0.852,6.305 h -18.404 l -0.171,-0.341 1.875,-10.82 2.471,-17.212 c 0.512,-3.237 0.682,-5.453 -1.789,-5.453 -3.238,0 -7.413,3.664 -9.714,5.709 l -2.642,19.512 c -0.17,1.363 -0.17,1.534 1.108,1.704 l 4.26,0.597 -0.852,6.305 h -23.347 l 0.853,-6.39 3.749,-0.512 c 1.107,-0.17 1.363,-0.426 1.533,-1.704 l 3.579,-25.987 c 0.17,-0.938 0,-1.534 -0.767,-1.789 l -4.176,-1.534 0.938,-6.476 h 16.871 l -0.938,6.987 0.256,0.085 c 4.43,-3.749 9.116,-7.924 15.592,-7.924 4.687,0 7.839,2.641 8.18,7.753 l 0.256,0.086 c 4.175,-3.664 9.202,-7.839 15.252,-7.839 6.22,0 8.775,3.152 8.946,9.202 0,1.618 -0.171,3.493 -0.426,5.538 l -3.067,21.897 c -0.171,1.363 -0.171,1.534 1.107,1.704 l 4.175,0.597 -0.852,6.305 H 394.07 z"
- id="path283"
- style="fill:url(#SVGID_16_)"
- inkscape:connector-curvature="0" /><linearGradient
- id="SVGID_17_"
- gradientUnits="userSpaceOnUse"
- x1="435.17719"
- y1="239.7637"
- x2="435.17719"
- y2="155.3275"><stop
- offset="0"
- style="stop-color:#000000"
- id="stop286" /><stop
- offset="1"
- style="stop-color:#000000;stop-opacity:0"
- id="stop288" /><a:midPointStop
- offset="0"
- style="stop-color:#000000" /><a:midPointStop
- offset="0.6933"
- style="stop-color:#000000" /><a:midPointStop
- offset="1"
- style="stop-color:#000000;stop-opacity:0" /></linearGradient><path
- d="m 443.995,190.771 -0.17,-4.431 c 0,-0.682 -0.085,-1.108 -1.022,-1.363 -1.022,-0.256 -2.642,-0.427 -4.771,-0.427 -3.579,0 -6.391,1.108 -6.391,4.09 0,2.727 2.982,3.749 6.731,5.027 6.05,2.045 13.888,4.431 13.888,13.463 0,11.076 -9.372,15.592 -20.193,15.592 -8.009,0 -14.91,-1.959 -16.273,-2.981 l 1.618,-12.355 8.691,0.512 0.255,4.941 c 0,0.597 0.171,1.108 0.938,1.363 1.278,0.427 3.238,0.768 6.05,0.768 4.687,0 7.327,-1.79 7.327,-4.687 0,-3.408 -3.152,-4.175 -8.009,-5.624 -6.135,-1.874 -12.78,-4.26 -12.78,-13.206 0,-10.48 9.116,-14.996 19.597,-14.996 6.646,0 12.866,1.533 15.081,2.471 l -1.704,12.354 -8.863,-0.511 z"
- id="path290"
- style="fill:url(#SVGID_17_)"
- inkscape:connector-curvature="0" /><linearGradient
- id="SVGID_18_"
- gradientUnits="userSpaceOnUse"
- x1="474.83691"
- y1="239.7637"
- x2="474.83691"
- y2="155.3275"><stop
- offset="0"
- style="stop-color:#000000"
- id="stop293" /><stop
- offset="1"
- style="stop-color:#000000;stop-opacity:0"
- id="stop295" /><a:midPointStop
- offset="0"
- style="stop-color:#000000" /><a:midPointStop
- offset="0.6933"
- style="stop-color:#000000" /><a:midPointStop
- offset="1"
- style="stop-color:#000000;stop-opacity:0" /></linearGradient><path
- d="m 489.748,218.548 c -4.175,2.386 -10.395,4.175 -16.444,4.175 -13.036,0 -18.575,-7.583 -18.575,-18.574 0,-18.83 11.588,-27.691 25.988,-27.691 6.475,0 11.843,1.874 14.229,3.578 l -1.874,13.377 -8.691,-0.426 -0.255,-5.794 c 0,-0.597 -0.086,-0.938 -0.597,-1.192 -1.022,-0.427 -2.557,-0.597 -4.175,-0.597 -5.624,0 -11.418,4.601 -11.418,17.382 0,7.839 3.493,10.395 8.436,10.395 4.346,0 8.436,-1.448 11.247,-2.556 l 2.129,7.923 z"
- id="path297"
- style="fill:url(#SVGID_18_)"
- inkscape:connector-curvature="0" /><linearGradient
- id="SVGID_19_"
- gradientUnits="userSpaceOnUse"
- x1="512.28223"
- y1="239.7637"
- x2="512.28223"
- y2="155.3277"><stop
- offset="0"
- style="stop-color:#000000"
- id="stop300" /><stop
- offset="1"
- style="stop-color:#000000;stop-opacity:0"
- id="stop302" /><a:midPointStop
- offset="0"
- style="stop-color:#000000" /><a:midPointStop
- offset="0.6933"
- style="stop-color:#000000" /><a:midPointStop
- offset="1"
- style="stop-color:#000000;stop-opacity:0" /></linearGradient><path
- d="m 491.364,221.7 0.853,-6.39 3.919,-0.512 c 1.193,-0.17 1.363,-0.426 1.534,-1.704 l 3.578,-25.987 c 0.086,-0.938 -0.085,-1.534 -0.852,-1.789 l -4.261,-1.534 0.938,-6.476 h 16.87 l -1.107,7.669 0.256,0.17 c 3.323,-4.771 8.095,-8.69 13.548,-8.69 1.874,0 5.112,0.341 6.561,0.767 l -2.13,15.507 -9.969,-0.341 -0.256,-4.431 c -0.086,-0.767 -0.256,-1.022 -0.938,-1.022 -1.619,0 -4.26,1.96 -6.646,4.431 l -2.981,21.643 c -0.171,1.363 -0.085,1.619 1.192,1.704 l 8.095,0.682 -0.938,6.305 h -27.266 z"
- id="path304"
- style="fill:url(#SVGID_19_)"
- inkscape:connector-curvature="0" /><linearGradient
- id="SVGID_20_"
- gradientUnits="userSpaceOnUse"
- x1="546.65918"
- y1="239.7637"
- x2="546.65918"
- y2="155.32719"><stop
- offset="0"
- style="stop-color:#000000"
- id="stop307" /><stop
- offset="1"
- style="stop-color:#000000;stop-opacity:0"
- id="stop309" /><a:midPointStop
- offset="0"
- style="stop-color:#000000" /><a:midPointStop
- offset="0.6933"
- style="stop-color:#000000" /><a:midPointStop
- offset="1"
- style="stop-color:#000000;stop-opacity:0" /></linearGradient><path
- d="m 536.094,221.7 -0.17,-0.426 2.045,-11.503 3.152,-22.749 c 0.17,-0.938 -0.086,-1.534 -0.853,-1.79 l -4.175,-1.448 0.852,-6.476 h 18.149 l -5.027,35.786 c -0.171,1.363 -0.085,1.534 1.192,1.704 l 4.09,0.597 -0.852,6.305 h -18.403 z m 5.879,-57.598 c 0,-5.453 3.238,-8.775 8.776,-8.775 4.175,0 6.646,2.215 6.646,6.305 0,5.368 -3.322,8.861 -8.861,8.861 -4.176,-0.001 -6.561,-2.387 -6.561,-6.391 z"
- id="path311"
- style="fill:url(#SVGID_20_)"
- inkscape:connector-curvature="0" /><linearGradient
- id="SVGID_21_"
- gradientUnits="userSpaceOnUse"
- x1="580.69629"
- y1="239.7637"
- x2="580.69629"
- y2="155.32719"><stop
- offset="0"
- style="stop-color:#000000"
- id="stop314" /><stop
- offset="1"
- style="stop-color:#000000;stop-opacity:0"
- id="stop316" /><a:midPointStop
- offset="0"
- style="stop-color:#000000" /><a:midPointStop
- offset="0.6933"
- style="stop-color:#000000" /><a:midPointStop
- offset="1"
- style="stop-color:#000000;stop-opacity:0" /></linearGradient><path
- d="m 556.796,239.764 -0.17,-0.341 2.471,-14.229 5.282,-38.087 c 0.171,-1.022 -0.085,-1.534 -0.767,-1.789 l -4.175,-1.534 0.938,-6.476 h 17.041 l -1.022,6.816 0.255,0.085 c 5.027,-4.686 10.311,-7.753 15.678,-7.753 7.328,0 12.44,4.686 12.44,17.041 0,11.758 -4.601,29.225 -20.449,29.225 -5.538,0 -8.605,-2.13 -11.759,-4.345 l -1.874,12.78 c -0.085,0.938 0.085,1.278 1.192,1.363 l 8.606,0.853 -0.938,6.39 h -22.749 z m 17.041,-30.247 c 2.13,1.789 4.942,3.322 8.095,3.322 6.901,0 9.458,-9.713 9.458,-17.211 0,-5.027 -1.193,-8.351 -4.431,-8.351 -3.408,0 -7.754,3.664 -10.821,6.391 l -2.301,15.849 z"
- id="path318"
- style="fill:url(#SVGID_21_)"
- inkscape:connector-curvature="0" /><linearGradient
- id="SVGID_22_"
- gradientUnits="userSpaceOnUse"
- x1="622.7832"
- y1="239.7637"
- x2="622.7832"
- y2="155.3268"><stop
- offset="0"
- style="stop-color:#000000"
- id="stop321" /><stop
- offset="1"
- style="stop-color:#000000;stop-opacity:0"
- id="stop323" /><a:midPointStop
- offset="0"
- style="stop-color:#000000" /><a:midPointStop
- offset="0.6933"
- style="stop-color:#000000" /><a:midPointStop
- offset="1"
- style="stop-color:#000000;stop-opacity:0" /></linearGradient><path
- d="m 635.777,219.4 c -3.749,1.789 -9.458,3.322 -14.229,3.322 -8.521,0 -12.099,-2.981 -12.099,-9.969 0,-1.107 0.085,-2.386 0.256,-3.749 l 3.066,-22.323 c 0.086,-0.512 0.086,-0.853 -0.511,-0.853 h -5.879 l 1.107,-7.839 c 7.242,-0.767 10.906,-4.431 13.122,-13.633 h 7.924 l -1.704,12.1 c -0.085,0.596 -0.085,0.852 0.597,0.852 h 11.758 l -1.193,8.521 h -12.439 l -2.812,20.364 c -0.171,1.107 -0.256,1.96 -0.256,2.727 0,2.982 1.278,4.26 4.942,4.26 2.385,0 4.771,-0.596 6.816,-1.363 l 1.534,7.583 z"
- id="path325"
- style="fill:url(#SVGID_22_)"
- inkscape:connector-curvature="0" /><linearGradient
- id="SVGID_23_"
- gradientUnits="userSpaceOnUse"
- x1="655.6709"
- y1="239.7637"
- x2="655.6709"
- y2="155.3275"><stop
- offset="0"
- style="stop-color:#000000"
- id="stop328" /><stop
- offset="1"
- style="stop-color:#000000;stop-opacity:0"
- id="stop330" /><a:midPointStop
- offset="0"
- style="stop-color:#000000" /><a:midPointStop
- offset="0.6933"
- style="stop-color:#000000" /><a:midPointStop
- offset="1"
- style="stop-color:#000000;stop-opacity:0" /></linearGradient><path
- d="m 671.817,218.463 c -5.538,2.556 -11.588,4.26 -17.638,4.26 -13.377,0 -18.148,-7.839 -18.148,-18.148 0,-17.893 11.418,-28.117 25.307,-28.117 9.372,0 13.973,4.26 13.973,11.247 0,12.184 -12.865,15.763 -26.157,17.126 0.255,4.346 2.045,8.35 8.435,8.35 3.068,0 7.243,-0.937 12.355,-3.067 l 1.873,8.349 z m -8.094,-29.567 c 0,-2.045 -1.448,-3.237 -4.09,-3.237 -4.771,0 -8.69,4.175 -9.969,10.906 3.664,-0.511 14.059,-2.3 14.059,-7.669 z"
- id="path332"
- style="fill:url(#SVGID_23_)"
- inkscape:connector-curvature="0" /><linearGradient
- id="SVGID_24_"
- gradientUnits="userSpaceOnUse"
- x1="697.92969"
- y1="239.7637"
- x2="697.92969"
- y2="155.3277"><stop
- offset="0"
- style="stop-color:#000000"
- id="stop335" /><stop
- offset="1"
- style="stop-color:#000000;stop-opacity:0"
- id="stop337" /><a:midPointStop
- offset="0"
- style="stop-color:#000000" /><a:midPointStop
- offset="0.6933"
- style="stop-color:#000000" /><a:midPointStop
- offset="1"
- style="stop-color:#000000;stop-opacity:0" /></linearGradient><path
- d="m 703.596,221.7 -0.17,-0.255 1.874,-10.396 2.471,-17.723 c 0.512,-3.578 0.341,-5.879 -2.215,-5.879 -3.664,0 -8.18,3.578 -11.077,6.135 l -2.641,19.512 c -0.171,1.363 -0.171,1.534 1.107,1.704 l 4.26,0.597 -0.852,6.305 h -23.347 l 0.853,-6.39 3.749,-0.512 c 1.107,-0.17 1.363,-0.426 1.533,-1.704 l 3.579,-25.987 c 0.17,-0.938 0,-1.534 -0.768,-1.789 l -4.175,-1.534 0.938,-6.476 h 16.87 l -0.937,6.987 0.255,0.085 c 4.771,-4.09 9.373,-7.924 16.02,-7.924 6.475,0 9.798,3.322 10.054,10.139 0,1.363 -0.085,3.067 -0.341,4.687 l -3.067,21.812 c -0.171,1.363 -0.171,1.534 1.022,1.704 l 4.26,0.597 L 722,221.7 h -18.404 z"
- id="path339"
- style="fill:url(#SVGID_24_)"
- inkscape:connector-curvature="0" /></g></g><g
- id="g4141"
- transform="matrix(0.81856441,0,0,0.81856441,79.234731,-94.128741)"><g
- id="g4143"></g><g
- id="g4165"><linearGradient
- y2="155.3275"
- x2="324.1611"
- y1="239.7637"
- x1="324.1611"
- gradientUnits="userSpaceOnUse"
- id="linearGradient4167"><stop
- id="stop4169"
- style="stop-color:#000000"
- offset="0" /><stop
- id="stop4171"
- style="stop-color:#000000;stop-opacity:0"
- offset="1" /><a:midPointStop
- style="stop-color:#000000"
- offset="0" /><a:midPointStop
- style="stop-color:#000000"
- offset="0.6933" /><a:midPointStop
- style="stop-color:#000000;stop-opacity:0"
- offset="1" /></linearGradient><linearGradient
- y2="155.3277"
- x2="377.45459"
- y1="239.7637"
- x1="377.45459"
- gradientUnits="userSpaceOnUse"
- id="linearGradient4175"><stop
- id="stop4177"
- style="stop-color:#000000"
- offset="0" /><stop
- id="stop4179"
- style="stop-color:#000000;stop-opacity:0"
- offset="1" /><a:midPointStop
- style="stop-color:#000000"
- offset="0" /><a:midPointStop
- style="stop-color:#000000"
- offset="0.6933" /><a:midPointStop
- style="stop-color:#000000;stop-opacity:0"
- offset="1" /></linearGradient><linearGradient
- y2="155.3275"
- x2="435.17719"
- y1="239.7637"
- x1="435.17719"
- gradientUnits="userSpaceOnUse"
- id="linearGradient4183"><stop
- id="stop4185"
- style="stop-color:#000000"
- offset="0" /><stop
- id="stop4187"
- style="stop-color:#000000;stop-opacity:0"
- offset="1" /><a:midPointStop
- style="stop-color:#000000"
- offset="0" /><a:midPointStop
- style="stop-color:#000000"
- offset="0.6933" /><a:midPointStop
- style="stop-color:#000000;stop-opacity:0"
- offset="1" /></linearGradient><linearGradient
- y2="155.3275"
- x2="474.83691"
- y1="239.7637"
- x1="474.83691"
- gradientUnits="userSpaceOnUse"
- id="linearGradient4191"><stop
- id="stop4193"
- style="stop-color:#000000"
- offset="0" /><stop
- id="stop4195"
- style="stop-color:#000000;stop-opacity:0"
- offset="1" /><a:midPointStop
- style="stop-color:#000000"
- offset="0" /><a:midPointStop
- style="stop-color:#000000"
- offset="0.6933" /><a:midPointStop
- style="stop-color:#000000;stop-opacity:0"
- offset="1" /></linearGradient><linearGradient
- y2="155.3277"
- x2="512.28223"
- y1="239.7637"
- x1="512.28223"
- gradientUnits="userSpaceOnUse"
- id="linearGradient4199"><stop
- id="stop4201"
- style="stop-color:#000000"
- offset="0" /><stop
- id="stop4203"
- style="stop-color:#000000;stop-opacity:0"
- offset="1" /><a:midPointStop
- style="stop-color:#000000"
- offset="0" /><a:midPointStop
- style="stop-color:#000000"
- offset="0.6933" /><a:midPointStop
- style="stop-color:#000000;stop-opacity:0"
- offset="1" /></linearGradient><linearGradient
- y2="155.32719"
- x2="546.65918"
- y1="239.7637"
- x1="546.65918"
- gradientUnits="userSpaceOnUse"
- id="linearGradient4207"><stop
- id="stop4209"
- style="stop-color:#000000"
- offset="0" /><stop
- id="stop4211"
- style="stop-color:#000000;stop-opacity:0"
- offset="1" /><a:midPointStop
- style="stop-color:#000000"
- offset="0" /><a:midPointStop
- style="stop-color:#000000"
- offset="0.6933" /><a:midPointStop
- style="stop-color:#000000;stop-opacity:0"
- offset="1" /></linearGradient><linearGradient
- y2="155.32719"
- x2="580.69629"
- y1="239.7637"
- x1="580.69629"
- gradientUnits="userSpaceOnUse"
- id="linearGradient4215"><stop
- id="stop4217"
- style="stop-color:#000000"
- offset="0" /><stop
- id="stop4219"
- style="stop-color:#000000;stop-opacity:0"
- offset="1" /><a:midPointStop
- style="stop-color:#000000"
- offset="0" /><a:midPointStop
- style="stop-color:#000000"
- offset="0.6933" /><a:midPointStop
- style="stop-color:#000000;stop-opacity:0"
- offset="1" /></linearGradient><linearGradient
- y2="155.3268"
- x2="622.7832"
- y1="239.7637"
- x1="622.7832"
- gradientUnits="userSpaceOnUse"
- id="linearGradient4223"><stop
- id="stop4225"
- style="stop-color:#000000"
- offset="0" /><stop
- id="stop4227"
- style="stop-color:#000000;stop-opacity:0"
- offset="1" /><a:midPointStop
- style="stop-color:#000000"
- offset="0" /><a:midPointStop
- style="stop-color:#000000"
- offset="0.6933" /><a:midPointStop
- style="stop-color:#000000;stop-opacity:0"
- offset="1" /></linearGradient><linearGradient
- y2="155.3275"
- x2="655.6709"
- y1="239.7637"
- x1="655.6709"
- gradientUnits="userSpaceOnUse"
- id="linearGradient4231"><stop
- id="stop4233"
- style="stop-color:#000000"
- offset="0" /><stop
- id="stop4235"
- style="stop-color:#000000;stop-opacity:0"
- offset="1" /><a:midPointStop
- style="stop-color:#000000"
- offset="0" /><a:midPointStop
- style="stop-color:#000000"
- offset="0.6933" /><a:midPointStop
- style="stop-color:#000000;stop-opacity:0"
- offset="1" /></linearGradient><linearGradient
- y2="155.3277"
- x2="697.92969"
- y1="239.7637"
- x1="697.92969"
- gradientUnits="userSpaceOnUse"
- id="linearGradient4239"><stop
- id="stop4241"
- style="stop-color:#000000"
- offset="0" /><stop
- id="stop4243"
- style="stop-color:#000000;stop-opacity:0"
- offset="1" /><a:midPointStop
- style="stop-color:#000000"
- offset="0" /><a:midPointStop
- style="stop-color:#000000"
- offset="0.6933" /><a:midPointStop
- style="stop-color:#000000;stop-opacity:0"
- offset="1" /></linearGradient></g></g></svg>
- </a>
+ #container {
+ display: inline-block; /* scale with canvas */
+ vertical-align: top; /* prevent extra height */
+ position: relative; /* root for absolutely positioned overlay */
+ margin: 0;
+ border: 0 none;
+ padding: 0;
+ background-color: #111;
+ }
- <div class="spinner" id='spinner'></div>
- <div class="emscripten" id="status">Downloading...</div>
+ #canvas {
+ display: block;
+ margin: 0 auto;
+ /* canvas must have border and padding set to zero to
+ * calculate cursor coordinates correctly */
+ border: 0 none;
+ padding: 0;
+ }
-<span id='controls'>
- <span><input type="checkbox" id="resize">Resize canvas</span>
- <span><input type="checkbox" id="pointerLock" checked>Lock/hide mouse pointer &nbsp;&nbsp;&nbsp;</span>
- <span><input type="button" value="Fullscreen" onclick="Module.requestFullScreen(document.getElementById('pointerLock').checked,
- document.getElementById('resize').checked)">
- </span>
-</span>
- <div class="emscripten">
- <progress value="0" max="100" id="progress" hidden=1></progress>
- </div>
+ /* Status display
+ * ============== */
-
- <div class="emscripten_border">
- <canvas class="emscripten" id="canvas" oncontextmenu="event.preventDefault()"></canvas>
- </div>
- <textarea id="output" rows="8"></textarea>
+ #status-container {
+ position: absolute;
+ left: 0;
+ top: 0;
+ right: 0;
+ bottom: 0;
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ /* don't consume click events - make children visible explicitly */
+ visibility: hidden;
+ }
- <script type='text/javascript'>
- var statusElement = document.getElementById('status');
- var progressElement = document.getElementById('progress');
- var spinnerElement = document.getElementById('spinner');
+ #status {
+ visibility: visible;
+ padding: 4px 6px;
+ }
- var Module = {
- TOTAL_MEMORY: $GODOTTMEM,
- preRun: [],
- postRun: [],
- print: (function() {
- var element = document.getElementById('output');
- if (element) element.value = ''; // clear browser cache
- return function(text) {
- if (arguments.length > 1) text = Array.prototype.slice.call(arguments).join(' ');
- // These replacements are necessary if you render to raw HTML
- //text = text.replace(/&/g, "&amp;");
- //text = text.replace(/</g, "&lt;");
- //text = text.replace(/>/g, "&gt;");
- //text = text.replace('\n', '<br>', 'g');
- console.log(text);
- if (element) {
- element.value += text + "\n";
- element.scrollTop = element.scrollHeight; // focus on bottom
- }
- };
- })(),
- printErr: function(text) {
- if (arguments.length > 1) text = Array.prototype.slice.call(arguments).join(' ');
- if (0) { // XXX disabled for safety typeof dump == 'function') {
- dump(text + '\n'); // fast, straight to the real console
- } else {
- console.error(text);
- }
- },
- canvas: (function() {
- var canvas = document.getElementById('canvas');
- // As a default initial behavior, pop up an alert when webgl context is lost. To make your
- // application robust, you may want to override this behavior before shipping!
- // See http://www.khronos.org/registry/webgl/specs/latest/1.0/#5.15.2
- canvas.addEventListener("webglcontextlost", function(e) { alert('WebGL context lost. You will need to reload the page.'); e.preventDefault(); }, false);
+ /* On-hover controls
+ * ================= */
- return canvas;
- })(),
- setStatus: function(text) {
- if (!Module.setStatus.last) Module.setStatus.last = { time: Date.now(), text: '' };
- if (text === Module.setStatus.text) return;
- var m = text.match(/([^(]+)\((\d+(\.\d+)?)\/(\d+)\)/);
- var now = Date.now();
- if (m && now - Date.now() < 30) return; // if this is a progress update, skip it if too soon
- if (m) {
- text = m[1];
- progressElement.value = parseInt(m[2])*100;
- progressElement.max = parseInt(m[4])*100;
- progressElement.hidden = false;
- spinnerElement.hidden = false;
- } else {
- progressElement.value = null;
- progressElement.max = null;
- progressElement.hidden = true;
- if (!text) spinnerElement.style.display = 'none';
- }
- statusElement.innerHTML = text;
- },
- totalDependencies: 0,
- monitorRunDependencies: function(left) {
- this.totalDependencies = Math.max(this.totalDependencies, left);
- Module.setStatus(left ? 'Preparing... (' + (this.totalDependencies-left) + '/' + this.totalDependencies + ')' : 'All downloads complete.');
- }
- };
- Module.setStatus('Downloading...');
- window.onerror = function(event) {
- // TODO: do not warn on ok events like simulating an infinite loop or exitStatus
- Module.setStatus('Exception thrown, see JavaScript console');
- spinnerElement.style.display = 'none';
- Module.setStatus = function(text) {
- if (text) Module.printErr('[post-exception status] ' + text);
- };
- };
- </script>
- <script type="text/javascript" src="$GODOTFS"></script>
- <script>
+ #controls {
+ visibility: hidden;
+ opacity: 0.0;
+ transition: opacity 500ms ease-in-out 200ms;
+ position: absolute;
+ right: 16px;
+ top: 16px;
+ padding: 3px 5px;
+ font-size: small;
+ -moz-user-select: none;
+ -webkit-user-select: none;
+ -ms-user-select: none;
+ }
- (function() {
- var memoryInitializer = '$GODOTMEM';
- if (typeof Module['locateFile'] === 'function') {
- memoryInitializer = Module['locateFile'](memoryInitializer);
- } else if (Module['memoryInitializerPrefixURL']) {
- memoryInitializer = Module['memoryInitializerPrefixURL'] + memoryInitializer;
- }
- var xhr = Module['memoryInitializerRequest'] = new XMLHttpRequest();
- xhr.open('GET', memoryInitializer, true);
- xhr.responseType = 'arraybuffer';
- xhr.send(null);
- })();
+ #container:hover > #controls {
+ opacity: 1.0;
+ transition: opacity 60ms ease-in-out;
+ }
- var script = document.createElement('script');
- script.src = "$GODOTJS";
- document.body.appendChild(script);
+ #controls > button,
+ #controls > label {
+ vertical-align: middle;
+ margin-left: 2px;
+ margin-right: 2px;
+ }
-</script>
- </body>
+ #controls > label > input[type="checkbox"] {
+ /* override user agent style */
+ margin-left: 0;
+ }
+
+ label > input {
+ vertical-align: middle;
+ }
+
+ #display-output { display: none; }
+
+
+ /* Debug output
+ * ============ */
+
+ #output {
+ display: none;
+ margin: 6px auto;
+ border: 2px groove grey;
+ padding: 4px;
+ outline: none;
+ text-align: left;
+ white-space: pre-wrap;
+ font-size: small;
+ color: #eee;
+ background-color: black;
+ font-family: "Lucida Console", Monaco, monospace;
+ }
+
+
+ /* Export style include
+ * ==================== */
+
+ $GODOT_STYLE_INCLUDE
+ </style>
+</head>
+<body>
+ <div id="container">
+ <canvas id="canvas" width="$GODOT_CANVAS_WIDTH" height="$GODOT_CANVAS_HEIGHT" onclick="canvas.ownerDocument.defaultView.focus();" oncontextmenu="event.preventDefault();">
+ HTML5 canvas appears to be unsupported in the current browser.<br />Please try updating or use a different browser.
+ </canvas>
+ <div id="status-container">
+ <span id="status" class="godot" onclick="this.style.visibility='hidden';">Loading page...</span>
+ </div>
+ <div id="controls" class="godot">
+ <label id="display-output"><input id="output-toggle" type="checkbox" autocomplete="off" onchange="Presentation.setOutputVisible(this.checked);" />display output</label>
+ <!-- hidden until implemented
+ <label><input id="lock-cursor" type="checkbox" autocomplete="off" />lock cursor</label>
+ <label><input id="resize-canvas" type="checkbox" autocomplete="off" />resize canvas</label>
+ -->
+ <button id="fullscreen" class="godot" type="button" disabled="disabled" autocomplete="off" onclick="Presentation.goFullscreen();">fullscreen</button>
+ </div>
+ </div>
+ <!-- Firefox adds extra space to textarea, but shouldn't matter too much https://bugzilla.mozilla.org/show_bug.cgi?id=33654 -->
+ <textarea id="output" rows="10" cols="100" readonly="readonly" style="resize:none"></textarea>
+
+ <script type="text/javascript">//<![CDATA[
+ var Presentation = (function() {
+ var statusElement = document.getElementById("status");
+ var outputElement = document.getElementById("output");
+ var doneLoading = false;
+
+ function onLoaded() {
+ doneLoading = true;
+ var fullscreenButtonElement = document.getElementById("fullscreen");
+ fullscreenButtonElement.disabled = false;
+ }
+
+ var presentation = {
+ statusElement: statusElement,
+ outputElement: outputElement,
+ setOutputVisible: function setOutputVisible(visible) {
+ outputElement.style.display = (visible?"block":"none");
+ },
+ setStatusVisible: function setStatusVisible(visible) {
+ statusElement.style.visibility = (visible?"visible":"hidden");
+ },
+ setStatus: function setStatus(text) {
+ if (!text || text.length === 0) {
+ Presentation.setStatusVisible(false);
+ onLoaded();
+ } else {
+ Presentation.setStatusVisible(true);
+ statusElement.innerHTML = text;
+ }
+ },
+ goFullscreen: function goFullscreen() {
+ if (doneLoading) Module.requestFullScreen(false, false);
+ }
+ };
+
+ if ($GODOT_CONTROLS_ENABLED) { // controls enabled
+ (function() {
+ var controlsElement = document.getElementById("controls");
+ controlsElement.style.visibility="visible";
+ })();
+ }
+
+ if ($GODOT_DEBUG_ENABLED) { // debugging enabled
+ (function() {
+ var outputToggleLabel = document.getElementById("display-output");
+ var outputToggle = document.getElementById("output-toggle");
+
+ outputElement.value = ""; // clear browser cache
+ outputElement.style.display = "block";
+ outputToggle.checked = true;
+ outputToggleLabel.style.display = "inline";
+
+ presentation.print = function print(text) {
+ if (outputElement.value.length !== 0)
+ outputElement.value += "\n";
+ outputElement.value += text;
+ outputElement.scrollTop = outputElement.scrollHeight; // focus on bottom
+ };
+ })();
+ }
+
+ return presentation;
+ })();
+
+ // Emscripten interface
+ var Module = (function() {
+ var print = (function() {
+ if (typeof Presentation.print === "function") {
+ return function print(text) {
+ if (arguments.length > 1)
+ text = Array.prototype.slice.call(arguments).join(" ");
+ console.log(text);
+ Presentation.print(text);
+ };
+ } else {
+ return function print(text) {
+ if (arguments.length > 1)
+ text = Array.prototype.slice.call(arguments).join(" ");
+ console.log(text);
+ };
+ }
+ })();
+
+ var canvas = (function() {
+ var canvasElement = document.getElementById("canvas");
+
+ // As a default initial behavior, pop up an alert when WebGL context is lost. To make your
+ // application robust, you may want to override this behavior before shipping!
+ // See http://www.khronos.org/registry/webgl/specs/latest/1.0/#5.15.2
+ canvasElement.addEventListener("webglcontextlost", function(e) { alert("WebGL context lost. Plase reload the page."); e.preventDefault(); }, false);
+
+ return canvasElement;
+ })();
+
+ var setStatus = (function() {
+ if (typeof Presentation.setStatus === "function")
+ return function setStatus(text) {
+ if (!Module.setStatus.last)
+ Module.setStatus.last = { time: Date.now(), text: "" };
+ if (text === Module.setStatus.text)
+ return;
+ var m = text.match(/([^(]+)\((\d+(\.\d+)?)\/(\d+)\)/);
+ var now = Date.now();
+ if (m) {
+ if (now - Date.now() < 30) // if this is a progress update, skip it if too soon
+ return;
+ text = m[1];
+ }
+ Presentation.setStatus(text);
+ };
+ else
+ return function setStatus(text) {
+ if (!Module.setStatus.last)
+ Module.setStatus.last = { time: Date.now(), text: "" };
+ if (text === Module.setStatus.text)
+ return;
+ var m = text.match(/([^(]+)\((\d+(\.\d+)?)\/(\d+)\)/);
+ var now = Date.now();
+ if (m) {
+ if (now - Date.now() < 30) // if this is a progress update, skip it if too soon
+ return;
+ text = m[1];
+ }
+ };
+ })();
+
+ return {
+ TOTAL_MEMORY: 268435456,
+ preRun: [],
+ postRun: [],
+ print: print,
+ printErr: function printErr(text) {
+ if (arguments.length > 1)
+ text = Array.prototype.slice.call(arguments).join(" ");
+ if (0) { // XXX disabled for safety `if (typeof dump == "function")`
+ dump(text + "\n"); // fast, straight to the real console
+ } else {
+ console.error(text);
+ }
+ },
+ canvas: canvas,
+ setStatus: setStatus,
+ totalDependencies: 0,
+ monitorRunDependencies: function monitorRunDependencies(left) {
+ this.totalDependencies = Math.max(this.totalDependencies, left);
+ Module.setStatus(left ? "Preparing... (" + (this.totalDependencies-left) + "/" + this.totalDependencies + ")" : "All downloads complete.");
+ }
+ };
+ })();
+
+ Presentation.setStatus("Downloading...");
+
+ window.onerror = function(event) {
+ // TODO: do not warn on ok events like simulating an infinite loop or exitStatus
+ Module.setStatus("Exception thrown, see JavaScript console");
+ Module.setStatus = function(text) {
+ if (text) Module.printErr("[post-exception status] " + text);
+ };
+ };
+ //]]></script>
+ <script type="text/javascript" src="$GODOT_FS"></script>
+ <script>
+ (function() {
+ var memoryInitializer = "$GODOT_MEM";
+ if (typeof Module.locateFile === "function") {
+ memoryInitializer = Module.locateFile(memoryInitializer);
+ } else if (Module.memoryInitializerPrefixURL) {
+ memoryInitializer = Module.memoryInitializerPrefixURL + memoryInitializer;
+ }
+ var xhr = Module.memoryInitializerRequest = new XMLHttpRequest();
+ xhr.open("GET", memoryInitializer, true);
+ xhr.responseType = "arraybuffer";
+ xhr.send(null);
+ })();
+
+ var script = document.createElement("script");
+ script.src = "$GODOT_JS";
+ document.body.appendChild(script);
+ </script>
+</body>
</html>
diff --git a/tools/ios_xcode_template/godot_ios.xcodeproj/project.pbxproj b/tools/ios_xcode_template/godot_ios.xcodeproj/project.pbxproj
index 7cd4da0f4a..4ae1ec8a53 100644
--- a/tools/ios_xcode_template/godot_ios.xcodeproj/project.pbxproj
+++ b/tools/ios_xcode_template/godot_ios.xcodeproj/project.pbxproj
@@ -192,7 +192,7 @@
isa = PBXProject;
attributes = {
LastUpgradeCheck = 0500;
- ORGANIZATIONNAME = Okam;
+ ORGANIZATIONNAME = GodotEngine;
TargetAttributes = {
D0BCFE5F18AEBDA3004A7AAE = {
TestTargetID = D0BCFE3318AEBDA2004A7AAE;
diff --git a/tools/ios_xcode_template/godot_ios/godot_ios-Info.plist b/tools/ios_xcode_template/godot_ios/godot_ios-Info.plist
index f34ebb97f0..357970920a 100644
--- a/tools/ios_xcode_template/godot_ios/godot_ios-Info.plist
+++ b/tools/ios_xcode_template/godot_ios/godot_ios-Info.plist
@@ -9,7 +9,7 @@
<key>CFBundleExecutable</key>
<string>godot_opt.iphone</string>
<key>CFBundleIdentifier</key>
- <string>com.okamstudios.${PRODUCT_NAME:rfc1034identifier}</string>
+ <string>org.godotengine.${PRODUCT_NAME:rfc1034identifier}</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
diff --git a/tools/ios_xcode_template/godot_ios/main.m b/tools/ios_xcode_template/godot_ios/main.m
index dca55f40ce..3e4ea5e129 100644
--- a/tools/ios_xcode_template/godot_ios/main.m
+++ b/tools/ios_xcode_template/godot_ios/main.m
@@ -1,10 +1,31 @@
-//
-// main.m
-// godot_ios
-//
-// Created by Ariel m on 2/14/14.
-// Copyright (c) 2014 Okam. All rights reserved.
-//
+/*************************************************************************/
+/* main.m */
+/*************************************************************************/
+/* This file is part of: */
+/* GODOT ENGINE */
+/* http://www.godotengine.org */
+/*************************************************************************/
+/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* */
+/* Permission is hereby granted, free of charge, to any person obtaining */
+/* a copy of this software and associated documentation files (the */
+/* "Software"), to deal in the Software without restriction, including */
+/* without limitation the rights to use, copy, modify, merge, publish, */
+/* distribute, sublicense, and/or sell copies of the Software, and to */
+/* permit persons to whom the Software is furnished to do so, subject to */
+/* the following conditions: */
+/* */
+/* The above copyright notice and this permission notice shall be */
+/* included in all copies or substantial portions of the Software. */
+/* */
+/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
+/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
+/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
+/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
+/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
+/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
+/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
+/*************************************************************************/
#import <UIKit/UIKit.h>
diff --git a/tools/ios_xcode_template/godot_iosTests/godot_iosTests-Info.plist b/tools/ios_xcode_template/godot_iosTests/godot_iosTests-Info.plist
index 3b3eec9a51..0f69aa80eb 100644
--- a/tools/ios_xcode_template/godot_iosTests/godot_iosTests-Info.plist
+++ b/tools/ios_xcode_template/godot_iosTests/godot_iosTests-Info.plist
@@ -7,7 +7,7 @@
<key>CFBundleExecutable</key>
<string>${EXECUTABLE_NAME}</string>
<key>CFBundleIdentifier</key>
- <string>com.okamstudios.${PRODUCT_NAME:rfc1034identifier}</string>
+ <string>org.godotengine.${PRODUCT_NAME:rfc1034identifier}</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundlePackageType</key>
diff --git a/tools/ios_xcode_template/godot_iosTests/godot_iosTests.m b/tools/ios_xcode_template/godot_iosTests/godot_iosTests.m
index fce6288670..d9fac0a250 100644
--- a/tools/ios_xcode_template/godot_iosTests/godot_iosTests.m
+++ b/tools/ios_xcode_template/godot_iosTests/godot_iosTests.m
@@ -1,10 +1,31 @@
-//
-// godot_iosTests.m
-// godot_iosTests
-//
-// Created by Ariel m on 2/14/14.
-// Copyright (c) 2014 Okam. All rights reserved.
-//
+/*************************************************************************/
+/* godot_iosTests.m */
+/*************************************************************************/
+/* This file is part of: */
+/* GODOT ENGINE */
+/* http://www.godotengine.org */
+/*************************************************************************/
+/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* */
+/* Permission is hereby granted, free of charge, to any person obtaining */
+/* a copy of this software and associated documentation files (the */
+/* "Software"), to deal in the Software without restriction, including */
+/* without limitation the rights to use, copy, modify, merge, publish, */
+/* distribute, sublicense, and/or sell copies of the Software, and to */
+/* permit persons to whom the Software is furnished to do so, subject to */
+/* the following conditions: */
+/* */
+/* The above copyright notice and this permission notice shall be */
+/* included in all copies or substantial portions of the Software. */
+/* */
+/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
+/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
+/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
+/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
+/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
+/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
+/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
+/*************************************************************************/
#import <XCTest/XCTest.h>
diff --git a/tools/pck/pck_packer.cpp b/tools/pck/pck_packer.cpp
index d398fefb5f..228d37df7c 100644
--- a/tools/pck/pck_packer.cpp
+++ b/tools/pck/pck_packer.cpp
@@ -26,7 +26,7 @@ void PCKPacker::_bind_methods() {
ObjectTypeDB::bind_method(_MD("pck_start","pck_name","alignment"),&PCKPacker::pck_start);
ObjectTypeDB::bind_method(_MD("add_file","pck_path","source_path"),&PCKPacker::add_file);
- ObjectTypeDB::bind_method(_MD("flush"),&PCKPacker::flush);
+ ObjectTypeDB::bind_method(_MD("flush","verbose"),&PCKPacker::flush);
};