summaryrefslogtreecommitdiff
path: root/scene/2d
AgeCommit message (Collapse)Author
2018-09-28SCons: Build thirdparty code in own env, disable warningsRémi Verschelde
Also remove unnecessary `Export('env')` in other SCsubs, Export should only be used when exporting *new* objects.
2018-09-27Fix warnings about set but unused variables [-Wunused-but-set-variable]Rémi Verschelde
Fixes the following GCC 5 warnings: ``` drivers/gles2/rasterizer_canvas_gles2.cpp:814:8: warning: variable 'rt_size' set but not used [-Wunused-but-set-variable] drivers/gles2/rasterizer_scene_gles2.cpp:2270:11: warning: variable 'vp_height' set but not used [-Wunused-but-set-variable] drivers/gles2/rasterizer_scene_gles2.cpp:2673:22: warning: variable 'e' set but not used [-Wunused-but-set-variable] drivers/gles2/rasterizer_scene_gles2.cpp:715:7: warning: variable 'no_cull' set but not used [-Wunused-but-set-variable] drivers/gles2/shader_gles2.cpp:693:14: warning: variable 'cc' set but not used [-Wunused-but-set-variable] drivers/gles3/rasterizer_canvas_gles3.cpp:1226:8: warning: variable 'rt_size' set but not used [-Wunused-but-set-variable] drivers/gles3/rasterizer_scene_gles3.cpp:3039:10: warning: variable 'contrib' set but not used [-Wunused-but-set-variable] drivers/gles3/rasterizer_scene_gles3.cpp:4504:32: warning: variable 'vp_height' set but not used [-Wunused-but-set-variable] editor/editor_inspector.cpp:272:9: warning: variable 'guide_color' set but not used [-Wunused-but-set-variable] editor/editor_themes.cpp:1067:14: warning: variable 'alpha3' set but not used [-Wunused-but-set-variable] editor/editor_themes.cpp:263:8: warning: variable 'script_bg_color' set but not used [-Wunused-but-set-variable] editor/plugins/collision_shape_2d_editor_plugin.cpp:326:11: warning: variable 'cpoint' set but not used [-Wunused-but-set-variable] editor/plugins/mesh_editor_plugin.cpp:72:9: warning: variable 'size' set but not used [-Wunused-but-set-variable] editor/plugins/shader_editor_plugin.cpp:471:12: warning: variable 'mpos' set but not used [-Wunused-but-set-variable] editor/plugins/shader_editor_plugin.cpp:89:8: warning: variable 'basetype_color' set but not used [-Wunused-but-set-variable] editor/plugins/shader_editor_plugin.cpp:90:8: warning: variable 'type_color' set but not used [-Wunused-but-set-variable] editor/plugins/shader_editor_plugin.cpp:92:8: warning: variable 'string_color' set but not used [-Wunused-but-set-variable] modules/visual_script/visual_script_editor.cpp:2521:7: warning: variable 'seq_connect' set but not used [-Wunused-but-set-variable] platform/android/export/export.cpp:580:12: warning: variable 'styles_count' set but not used [-Wunused-but-set-variable] platform/android/export/export.cpp:584:12: warning: variable 'styles_offset' set but not used [-Wunused-but-set-variable] platform/osx/export/export.cpp:464:9: warning: variable 'zerr' set but not used [-Wunused-but-set-variable] scene/2d/tile_map.cpp:260:10: warning: variable 'tcenter' set but not used [-Wunused-but-set-variable] scene/3d/light.cpp:166:7: warning: variable 'editor_ok' set but not used [-Wunused-but-set-variable] scene/3d/navigation.cpp:566:11: warning: variable 'closest_navmesh' set but not used [-Wunused-but-set-variable] scene/gui/rich_text_label.cpp:869:8: warning: variable 'size' set but not used [-Wunused-but-set-variable] scene/main/viewport.cpp:705:14: warning: variable 'xform' set but not used [-Wunused-but-set-variable] scene/main/viewport.cpp:706:8: warning: variable 'ss' set but not used [-Wunused-but-set-variable] scene/main/viewport.cpp:726:14: warning: variable 'xform' set but not used [-Wunused-but-set-variable] scene/main/viewport.cpp:727:8: warning: variable 'ss' set but not used [-Wunused-but-set-variable] scene/resources/material.cpp:430:7: warning: variable 'using_world' set but not used [-Wunused-but-set-variable] servers/visual/shader_language.cpp:2026:7: warning: variable 'all_const' set but not used [-Wunused-but-set-variable] servers/visual/visual_server_scene.cpp:1383:28: warning: variable 'z_max_cam' set but not used [-Wunused-but-set-variable] ``` Also fixes two [-Wunused-value] warnings: ``` scene/gui/text_edit.cpp:4405:20: warning: statement has no effect [-Wunused-value] servers/visual/visual_server_scene.cpp:905:48: warning: value computed is not used [-Wunused-value] ``` Some of those are bugs and need further work, they are identified with `// FIXME` comments.
2018-09-20Merge pull request #22047 from DualMatrix/better_nav_2DRémi Verschelde
Better heuristic for the shortest path algorithm for navigation2D
2018-09-20Better heuristic for the shortest path algorithm for navigation2D and ↵DualMatrix
navigation. Better heuristic for the shortest path algorithm for navigation2D and navigation. It now will use the shortest distance to the polygon as cost instead of the distance to the center.
2018-09-13Merge pull request #21982 from luzpaz/misc-typosRémi Verschelde
Misc. typos
2018-09-12Misc. typosluz.paz
Found via `codespell -q 3 -I ../godot-word-whitelist.txt --skip="./thirdparty,*.po"`
2018-09-13Revert "Drop deprecated compatibility methods from AnimatedSprite"Rémi Verschelde
2018-09-12Merge pull request #21780 from akien-mga/animatedsprite-deprecatedRémi Verschelde
Drop deprecated compatibility methods from AnimatedSprite
2018-09-12Make core/ includes absolute, remove subfolders from include pathRémi Verschelde
This allows more consistency in the manner we include core headers, where previously there would be a mix of absolute, relative and include path-dependent includes.
2018-09-09Drop deprecated compatibility methods from AnimatedSpriteRémi Verschelde
They were deprecated in 2.1, but never properly identified as such and thus never removed. Fixes #21765.
2018-09-06Add a function to force transform update, fixes #17628Juan Linietsky
2018-09-06Only allow StreamTexture, ImageTexture in Light2D, closes #15194Juan Linietsky
2018-09-04Move ParticlesMaterial code to its own resource fileRémi Verschelde
It's shared by both 2D and 3D particles (+ CPU ones), so it makes sense to have as a common resource. It also allowed to disable compilation of Particles (3D) when using 'disable_3d'. Also cleaned up includes in SpatialEditorGizmos and some other places, as well as dropped dead code in material_editor_plugin.cpp.
2018-09-02PhysicsBody: Don't create PhysicsMaterial override for default friction/bounceRémi Verschelde
And don't save physics_material_override if null.
2018-09-01Improve ClassDB information for some some signal parametersKelly Thomas
2018-08-30RayCast2D: Fix reporting old collider after collision endedRémi Verschelde
It now behaves the same as RayCast (3D). Fixed documentation accordingly and documented new configuration options. Supersedes and closes #20567.
2018-08-29Add missing copyright headersRémi Verschelde
2018-08-29Ported CPU particles to 2DJuan Linietsky
2018-08-29Physics: Properly obsolete friction and bounce propertiesRémi Verschelde
Without this change any new PhysicsBody would show deprecation warnings due to default values for friction and bounce being defined. It also enforced a physics material override even when using default values.
2018-08-29Unexpose TileMap set_celldMarcelo Fernandez
2018-08-29Fix operator precedence in PhysicsBody2D::set_weightRémi Verschelde
Fixes #16038.
2018-08-24Particles: Allow speed_scale at 0 in property hint, equivalent to pauseRémi Verschelde
Supersedes and closes #21193.
2018-08-24Merge pull request #21110 from natrim/particles2d_editorRémi Verschelde
Particles2D: fix editing Visibility Rect from new inspector
2018-08-24Make some debug prints verbose-only, remove othersRémi Verschelde
2018-08-23Added a function to cache texture opacity at a pixel, and modified editor to ↵Juan Linietsky
use it. Provides massive speedups to selecting objects, still awaiting for @MarianoGNU to do fixes to the region editor to improve performance.
2018-08-23Revert "Take CanvasLayer transform into account for 2D physics"Rémi Verschelde
This reverts commit 4839e5f6d9ed1c0afee933009ab44b9913310d27. Fixes #21289.
2018-08-23Fix transform not being applied properly after toggling remote node, fixes ↵Juan Linietsky
#17671
2018-08-23Fix properly keep scale in RemoteTransform2D, fixes #17692, closes #17690Juan Linietsky
2018-08-22Restrict set_pitch_scale to positive scales for AudioStreamPlayer*Chaosus
Fixes #20459. Co-authored-by: Tiago José Sousa Magalhães <crakylps@gmail.com>
2018-08-21Merge pull request #21245 from RandomShaper/fix-physics-canvas-xformRémi Verschelde
Take CanvasLayer transform into account for 2D physics
2018-08-21Changes to ClippedCamera, RayCast,Raycast2D and 2D physics API to add ↵Juan Linietsky
ability to choose between bodies and areas when colliding.
2018-08-21Optimize CanvasLayer::get_global_transform_with_canvasPedro J. Estébanez
So it takes advantage of the `get_global_transform` cached data.
2018-08-21Take CanvasLayer transform into account for 2D physicsPedro J. Estébanez
Fixes #18073.
2018-08-21Deprecate incorrect Color::gray()Rémi Verschelde
This average is not a proper approximation of a grayscale value, get_v() is better suited for that. If we want a real to_grayscale() conversion, it's somewhat more involved: https://en.wikipedia.org/wiki/Grayscale Remove the deprecated Gray() from C# bindings as it conflicts with new named color constants.
2018-08-21Fix arg name in docs, some copy-paste errorsPoommetee Ketson
2018-08-19Added ray shape and move_and_slide with snapping on 3D.Andrea Catania
Added stop_on_slope on 2d part
2018-08-17Particles2D: fix editing Visibility Rect from inspectorNatrim
+ renamed generate_aabb to generate_visibility_rect to prevent future confusions
2018-08-16Lift 1440 limit in rotation_degrees hint rangeRémi Verschelde
Fixes #15947.
2018-08-14Merge pull request #18096 from aaronfranke/masterJuan Linietsky
[Core] Split up math_2d.h
2018-08-13Merge pull request #20587 from groud/fix_2deditor_scrollable_zoneRémi Verschelde
Fixes bugs on the 2D editor scrollable area
2018-08-10[Core] Change math_2d includes to vector2 includes where relevantAaron Franke
2018-08-10apply a threshold for floor angle, fixes #16037, fixes #15632Juan Linietsky
2018-08-09New TileSet EditorMAriano Javier Suligoy
2018-08-07Merge pull request #20381 from AndreaCatania/phymat_2Juan Linietsky
Improved Physics material
2018-08-07Removed physics material combination mode. Added rough and absorbent ↵Andrea Catania
parameter to material. Fixed 'change' signal connection
2018-07-30Fixes bugs on the 2D editor scrollable areagroud
2018-07-27Fix PhysicsBody build with deprecated=noRémi Verschelde
Fixes #20483.
2018-07-26doc: Sync classref with current sourceRémi Verschelde
Fix various missing arguments in bindings.
2018-07-26Reduce unnecessary COW on Vector by make writing explicitHein-Pieter van Braam
This commit makes operator[] on Vector const and adds a write proxy to it. From now on writes to Vectors need to happen through the .write proxy. So for instance: Vector<int> vec; vec.push_back(10); std::cout << vec[0] << std::endl; vec.write[0] = 20; Failing to use the .write proxy will cause a compilation error. In addition COWable datatypes can now embed a CowData pointer to their data. This means that String, CharString, and VMap no longer use or derive from Vector. _ALWAYS_INLINE_ and _FORCE_INLINE_ are now equivalent for debug and non-debug builds. This is a lot faster for Vector in the editor and while running tests. The reason why this difference used to exist is because force-inlined methods used to give a bad debugging experience. After extensive testing with modern compilers this is no longer the case.
2018-07-25Merge pull request #20404 from TigerCaldwell/masterRémi Verschelde
Ensured consistency between RigidBody, PhysicsDirectBodyState, PhysicsServers and their 2D counterparts