summaryrefslogtreecommitdiff
path: root/scene/2d/sprite_2d.cpp
AgeCommit message (Collapse)Author
2023-01-05One Copyright Update to rule them allRémi Verschelde
As many open source projects have started doing it, we're removing the current year from the copyright notice, so that we don't need to bump it every year. It seems like only the first year of publication is technically relevant for copyright notices, and even that seems to be something that many companies stopped listing altogether (in a version controlled codebase, the commits are a much better source of date of publication than a hardcoded copyright statement). We also now list Godot Engine contributors first as we're collectively the current maintainers of the project, and we clarify that the "exclusive" copyright of the co-founders covers the timespan before opensourcing (their further contributions are included as part of Godot Engine contributors). Also fixed "cf." Frenchism - it's meant as "refer to / see".
2022-10-11Merge pull request #67194 from RedMser/dirlight2d-height-suffixRémi Verschelde
Remove incorrect `px` suffixes
2022-10-10Remove incorrect px suffixesRedMser
2022-10-10SCons: Re-enable treating `#warning` as error with `werror`Rémi Verschelde
Replace all TODO uses of `#warning` by proper TODO comments, and will open matching bug reports to keep track of them. We don't have a great track record fixing TODOs, but I'd wager we're even worse for fixing these "TODO #warning" so we should prohibit this usage.
2022-08-29Rename `CanvasItem.update()` to `queue_redraw()`Micky
Affects a lot of classes. Very thoroughly checked signal connections and deferred calls to this method, add_do_method/add_undo_method calls, and so on. Also renames the internal `_update_callback()` to `_redraw_callback()` for consistency. Just a few comments have also been changed to say "redraw". In CPUParticles2D, there was a private variable with the same name. It has been renamed to `do_redraw`.
2022-08-22Make `_validate_property` a multilevel methodYuri Sizov
2022-05-19Use suffixes for units in nodes and resourcesAaron Franke
2022-02-15Use `switch` consistently in `_notification` (`scene` folder)Rémi Verschelde
2022-01-03Update copyright statements to 2022Rémi Verschelde
Happy new year to the wonderful Godot community!
2021-11-03Rename `PROPERTY_USAGE_NOEDITOR` to `PROPERTY_USAGE_NO_EDITOR`Hugo Locurcio
This is consistent with other constants that include `NO`, such as `PROPERTY_HINT_COLOR_NO_ALPHA`.
2021-08-13Fix some unnecessary includesAaron Franke
2021-06-12Fixed a bunch of connection errors in TextureEditorPluginYuri Roubinsky
2021-05-23Change frame_coords to Vector2ikobewi
2021-03-14Rename Sprite.region_enabled getter and setter to match propertiesMarcel Admiraal
Also renames Sprite2D.region_filter_clip property and its setter to region_filter_clip_enabled and set_region_filter_clip_enabled.
2021-03-02Hide extra options from various nodes if they're not enabledMichael Alexsander
2021-02-10Removed _change_notifyreduz
-For inspector refresh, the inspector now detects if a property change by polling a few times per second and then does update the control if so. This process is very cheap. -For property list refresh, a new signal (property_list_changed) was added to Object. _change_notify() is replaced by notify_property_list_changed() -Changed all objects using the old method to the signal, or just deleted the calls to _change_notify(<property>) since they are unnecesary now.
2021-02-07Initialize class variables with default values in scene/ [1/2]Rafał Mikrut
2021-01-01Update copyright statements to 2021Rémi Verschelde
Happy new year to the wonderful Godot community! 2020 has been a tough year for most of us personally, but a good year for Godot development nonetheless with a huge amount of work done towards Godot 4.0 and great improvements backported to the long-lived 3.2 branch. We've had close to 400 contributors to engine code this year, authoring near 7,000 commit! (And that's only for the `master` branch and for the engine code, there's a lot more when counting docs, demos and other first-party repos.) Here's to a great year 2021 for all Godot users 🎆
2020-10-30Refactor pixel snapping.reduz
-Rename pixel_snap to snap_2d_to_vertices -Added snap_2d_to_transforms which is more useful Fixes #41814 Solves proposal https://github.com/godotengine/godot-proposals/issues/1666 Supersedes #35606, supersedes #41535, supersedes #41534
2020-10-27fix(sprite2d): Rect is not handling pixel snapEric Tuvesson
related https://github.com/godotengine/godot/issues/42985
2020-10-24Refactored 2D shader and lighting systemreduz
-Removed normal/specular properties from nodes -Create CanvasTexture, which can contain normal/specular channels -Refactored, optimized and simplified 2D shaders -Use atlas for light textures. -Use a shadow atlas for shadow textures. -Use both items aboves to make light rendering stateless (faster). -Reorganized uniform sets for more efficiency.
2020-08-31Reorder sprite h_frames & v_framesJonathan Vice
2020-05-14Style: Enforce braces around if blocks and loopsRémi Verschelde
Using clang-tidy's `readability-braces-around-statements`. https://clang.llvm.org/extra/clang-tidy/checks/readability-braces-around-statements.html
2020-05-14Style: Enforce separation line between function definitionsRémi Verschelde
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.
2020-05-14Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocksRémi Verschelde
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.
2020-03-27Renaming of servers for coherency.Juan Linietsky
VisualServer -> RenderingServer PhysicsServer -> PhysicsServer3D Physics2DServer -> PhysicsServer2D NavigationServer -> NavigationServer3D Navigation2DServer -> NavigationServer2D Also renamed corresponding files.
2020-03-27Renamed 2D and 3D nodes to make their types explicitJuan Linietsky
Fixes #30736.