summaryrefslogtreecommitdiffstats
path: root/editor/editor_plugin.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Style: Enforce braces around if blocks and loopsRémi Verschelde2020-05-141-5/+10
| | | | | Using clang-tidy's `readability-braces-around-statements`. https://clang.llvm.org/extra/clang-tidy/checks/readability-braces-around-statements.html
* Style: Enforce separation line between function definitionsRémi Verschelde2020-05-141-0/+6
| | | | | | | | | | | | | | | | | | | | | | | I couldn't find a tool that enforces it, so I went the manual route: ``` find -name "thirdparty" -prune \ -o -name "*.cpp" -o -name "*.h" -o -name "*.m" -o -name "*.mm" \ -o -name "*.glsl" > files perl -0777 -pi -e 's/\n}\n([^#])/\n}\n\n\1/g' $(cat files) misc/scripts/fix_style.sh -c ``` This adds a newline after all `}` on the first column, unless they are followed by `#` (typically `#endif`). This leads to having lots of places with two lines between function/class definitions, but clang-format then fixes it as we enforce max one line of separation. This doesn't fix potential occurrences of function definitions which are indented (e.g. for a helper class defined in a .cpp), but it's better than nothing. Also can't be made to run easily on CI/hooks so we'll have to be careful with new code. Part of #33027.
* Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocksRémi Verschelde2020-05-141-68/+0
| | | | | | | | | | | | | | Which means that reduz' beloved style which we all became used to will now be changed automatically to remove the first empty line. This makes us lean closer to 1TBS (the one true brace style) instead of hybridating it with some Allman-inspired spacing. There's still the case of braces around single-statement blocks that needs to be addressed (but clang-format can't help with that, but clang-tidy may if we agree about it). Part of #33027.
* Port member initialization from constructor to declaration (C++11)Rémi Verschelde2020-05-141-10/+0
| | | | | | | | | | Using `clang-tidy`'s `modernize-use-default-member-init` check and manual review of the changes, and some extra manual changes that `clang-tidy` failed to do. Also went manually through all of `core` to find occurrences that `clang-tidy` couldn't handle, especially all initializations done in a constructor without using initializer lists.
* Replace NULL with nullptrlupoDharkael2020-04-021-6/+6
|
* Renaming of servers for coherency.Juan Linietsky2020-03-271-31/+31
| | | | | | | | | | VisualServer -> RenderingServer PhysicsServer -> PhysicsServer3D Physics2DServer -> PhysicsServer2D NavigationServer -> NavigationServer3D Navigation2DServer -> NavigationServer2D Also renamed corresponding files.
* Rename more 2D and 3D nodes to follow conventionRémi Verschelde2020-03-271-1/+1
| | | | Rename editor plugins to match the new node names.
* Renamed 2D and 3D nodes to make their types explicitJuan Linietsky2020-03-271-19/+19
| | | | Fixes #30736.
* Expose FileSystemDock to the scripting API and fixed signalsIgnacio Etcheverry2020-03-181-0/+5
| | | | | Fixed FileSystemDock's `file_removed` and `folder_removed` signals not being emitted because the emitted was using the wrong signal name.
* Style: Set clang-format Standard to Cpp11Rémi Verschelde2020-03-171-4/+4
| | | | | | | | | | For us, it practically only changes the fact that `A<A<int>>` is now used instead of the C++03 compatible `A<A<int> >`. Note: clang-format 10+ changed the `Standard` arguments to fully specified `c++11`, `c++14`, etc. versions, but we can't use `c++17` now if we want to preserve compatibility with clang-format 8 and 9. `Cpp11` is still supported as deprecated alias for `Latest`.
* Document EditorPlugin get_plugin_icon and get_plugin_nameAaron Franke2020-03-041-1/+1
| | | | The return value's type hint is now accurate.
* PoolVector is gone, replaced by VectorJuan Linietsky2020-02-181-4/+4
| | | | | Typed `PoolTypeArray` types are now renamed `PackedTypeArray` and are sugar for `Vector<Type>`.
* Base 3D engine done, still untested, though.Juan Linietsky2020-02-111-1/+0
|
* Texture refactorJuan Linietsky2020-02-111-9/+9
| | | | | | | | -Texture renamed to Texture2D -TextureLayered as base now inherits 2Darray, cubemap and cubemap array -Removed all references to flags in textures (they will go in the shader) -Texture3D gone for now (will come back later done properly) -Create base rasterizer for RenderDevice, RasterizerRD
* Update copyright statements to 2020Rémi Verschelde2020-01-011-2/+2
| | | | | | | | | | | Happy new year to the wonderful Godot community! We're starting a new decade with a well-established, non-profit, free and open source game engine, and tons of further improvements in the pipeline from hundreds of contributors. Godot will keep getting better, and we're looking forward to all the games that the community will keep developing and releasing with it.
* Cleans up headers included in editor_node.hHaoyu Qiu2019-12-241-0/+3
|
* Merge pull request #31847 from aole/editor-expose-current-pathRémi Verschelde2019-09-031-0/+5
|\ | | | | Expose current path function to EditorPlugin
| * Expose current path to EditorPluginBhupendra Aole2019-09-011-0/+5
| | | | | | | | | | | | | | | | get_selected_path returns only the resource directory. get_current_path fulfils the need to get the full path. This does not break backward compatibility and the function (get_current_path) is already available in FileSystemDock just like get_selected_path. Fixes 30652.
* | Script callback for enabling/disabling EditorPluginBhupendra Aole2019-09-011-1/+1
|/ | | | | | Parameter p_config_changes should be passed as true to enable callback to user scripts for enabling or disabling of the EditorPlugin. Fixes #30654
* Support for file not found in ConfigFile::Load and handle a few specific casesPouleyKetchoupp2019-08-211-7/+0
| | | | | | | EditorSettings::set_project_metadata: creates project_metadata.cfg if it doesn't exist EditorPlugin::get_config: removed (not used) Fixes #31444
* Merge pull request #31077 from qarmin/coverity_bugsRémi Verschelde2019-08-071-1/+2
|\ | | | | Change some code proposed by Coverity and Cppcheck
| * Add some code changes/fixes proposed by Coverity and Clang Tidyqarmin2019-08-071-1/+2
| |
* | Let EditorPlugins set editor/distraction-free modeWill Nations2019-08-061-0/+11
|/
* Script API methods must return Ref<T> instead of Reference*Ignacio Etcheverry2019-07-051-1/+1
| | | | ptrcall assumes methods that return a Reference type do so with Ref<T>. Returning Reference* from a method exposed to the scripting API completely breaks ptrcalls to this method (it can be quite hard to debug!).
* Remove unnecessary code and add some error explanationsqarmin2019-07-011-1/+1
|
* Some code changed with Clang-Tidyqarmin2019-06-261-1/+1
|
* Merge pull request #25522 from aqnuep/MeshLibrary_improvementsRémi Verschelde2019-06-031-21/+22
|\ | | | | MeshLibrary export improvements
| * MeshLibrary export improvementsDaniel Rakos2019-02-031-21/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - From now materials assigned to the MeshInstance (not the Mesh) get exported into the MeshLibrary when such materials exist. This enables workflows where the MeshLibrary is exported from an imported scene (e.g. GLTF) where the materials assigned to the Mesh (not the MeshInstance) get overwritten on re-import, thus can't use editor set materials in the exported MeshLibrary unless they are assigned to the MeshInstance whose materials get saved with the inherited scene thus persist across re-imports. - When appending to an existing MeshLibrary only generate previews for newly added or modified meshes. - During preview generation transform camera and lights instead of the mesh and use the source MeshInstance's transform for the mesh to avoid weird previews being generated for meshes with a position dependent material (e.g. when using triplanar mapping). - Adjust the camera angle and light directions used in mesh preview generation for better results.
* | Be able to add to the editor setting tabs.K. S. Ernest (iFIre) Lee2019-05-281-0/+20
| |
* | Add EditorInspector getter. Update Sub-Inspectors.Will Nations2019-03-121-0/+6
|/
* Update copyright statements to 2019Rémi Verschelde2019-01-011-2/+2
| | | | Happy new year to the wonderful Godot community!
* Merge pull request #24506 from JFonS/expose_gizmosRémi Verschelde2018-12-301-0/+10
|\ | | | | Expose the new gizmo plugin system to scripting
| * Expose the new gizmo plugin system to scriptingJFonS2018-12-211-0/+10
| |
* | doc: Sync classref with current sourceRémi Verschelde2018-12-271-1/+1
| | | | | | | | Fix various code formatting issues and argument names.
* | Merge pull request #19501 from Zylann/custom_loadersRémi Verschelde2018-12-161-0/+30
|\ \ | | | | | | Added basic support for custom resource savers and loaders
| * | Added basic support for custom resource savers and loadersMarc Gilleron2018-12-151-0/+30
| | |
* | | Moved member variables to initializer listWilson E. Alvarez2018-12-111-5/+5
|/ /
* / Allow plugin scene change signal to report null for empty scenes.Jared2018-11-031-1/+0
|/
* Fix warnings for comparison between signed and unsigned integers ↵Rémi Verschelde2018-09-271-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [-Wsign-compare] Also turn off -Wsign-compare warnings in the future, we do not consider them important. Fixes the following GCC 5 warnings: ``` core/node_path.cpp:279:24: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] core/oa_hash_map.h:169:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] core/oa_hash_map.h:314:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] drivers/gles2/shader_gles2.cpp:985:23: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] drivers/gles3/rasterizer_storage_gles3.cpp:1075:25: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] drivers/pulseaudio/audio_driver_pulseaudio.cpp:343:34: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] editor/editor_plugin.cpp:525:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] editor/editor_properties_array_dict.cpp:747:25: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] editor/plugins/spatial_editor_plugin.cpp:2078:20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] editor/plugins/spatial_editor_plugin.cpp:4096:27: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] editor/plugins/sprite_editor_plugin.cpp:100:20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] modules/cvtt/image_compress_cvtt.cpp:122:23: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] modules/cvtt/image_compress_cvtt.cpp:134:77: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] modules/cvtt/image_compress_cvtt.cpp:339:25: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] modules/etc/image_etc.cpp:222:34: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] modules/gdnative/register_types.cpp:242:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] modules/gdnative/register_types.cpp:258:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] modules/opensimplex/simplex_noise.cpp:200:13: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] modules/opensimplex/simplex_noise.cpp:222:13: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] modules/opensimplex/simplex_noise.cpp:246:13: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] platform/android/export/export.cpp:1085:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] platform/android/export/export.cpp:1489:23: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] platform/android/export/export.cpp:1623:22: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] platform/iphone/export/export.cpp:206:20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] platform/iphone/export/export.cpp:356:20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] platform/iphone/export/export.cpp:406:20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] platform/iphone/export/export.cpp:493:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] scene/3d/audio_stream_player_3d.cpp:420:23: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] scene/resources/audio_stream_sample.cpp:565:22: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] scene/resources/audio_stream_sample.cpp:571:22: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] servers/audio/audio_rb_resampler.cpp:156:36: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] ``` The following warnings were not fixed, as they implied casting for no gain: ``` core/io/packet_peer.cpp:228:38: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] core/io/resource_format_binary.cpp:109:11: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] drivers/gles2/rasterizer_scene_gles2.cpp:144:57: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] drivers/unix/file_access_unix.cpp:249:46: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] scene/3d/voxel_light_baker.cpp:889:14: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] scene/3d/voxel_light_baker.cpp:1020:14: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] scene/3d/voxel_light_baker.cpp:1154:14: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] scene/3d/voxel_light_baker.cpp:2255:38: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] scene/resources/bit_mask.cpp:336:25: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] servers/audio/audio_stream.cpp:141:49: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] servers/audio/audio_stream.cpp:150:19: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] servers/audio/audio_stream.cpp:154:19: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] servers/audio_server.cpp:86:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] servers/audio_server.cpp:89:17: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] ```
* Fixes drawing of the 2D plugins on the 3D viewgroud2018-09-181-8/+22
|
* Make some debug prints verbose-only, remove othersRémi Verschelde2018-08-241-4/+0
|
* Add option to move Tile/GridMap editors to another sideMichael Alexsander Silva Dias2018-08-221-6/+22
|
* Merge pull request #19837 from willnationsdev/plugin-utilitiesRémi Verschelde2018-08-151-0/+6
|\ | | | | Add PluginConfigDialog.
| * Add PluginConfigDialog, EditorPluginSettings GUIWill Nations2018-07-261-0/+6
| |
* | New gizmo structure and new gizmo disabling menuJFonS2018-08-091-13/+0
|/
* Merge pull request #19849 from willnationsdev/expose-script-create-dialogMax Hilbrunner2018-07-041-0/+5
|\ | | | | Expose ScriptCreateDialog to EditorPlugin
| * Expose ScriptCreateDialog to EditorPluginwillnationsdev2018-07-041-0/+5
| |
* | Preventing an editor crash in the event that a plugin scene's root-node is null.Michael Lee2018-06-281-1/+3
|/
* Merge pull request #15489 from willnationsdev/gdnative-hookMax Hilbrunner2018-05-261-0/+10
|\ | | | | Add EditorPlugin.build() build callbacks
| * Add EditorPlugin.build() build callbacksWill Nations2018-01-081-0/+10
| |