-
-
Notifications
You must be signed in to change notification settings - Fork 21.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TileSet/TileMap rework #45278
Closed
+14,905
−10,262
Closed
TileSet/TileMap rework #45278
Changes from all commits
Commits
Show all changes
54 commits
Select commit
Hold shift + click to select a range
d2327e5
Remove the use_parent mode in tilemaps
groud 575e97b
Remove centered texture and compatibility mode
groud 4fbf72b
Update the tilemap format, removing flip and transpose
groud 7d59109
First rework of the tilemap/tileset workflow
groud 733131a
Add support for TileMap line drawing
groud f964891
Draw tiles shapes around the preview
groud 8444483
Handle zooming in TileAtlasView
groud df94f38
Make CanvasItemEditor use the EditorZoomWidget
groud 0e0d15c
Implement TileMapPattern
groud a1ec00d
Implement TileMap picker
groud e44de0d
Optimize Bresenham's line algorithm to use integers instead
groud 40e3a52
Make TileMap line drawing work with half-offset shapes
groud e310abd
Add support for painting random tiles
groud 9de08a6
Support scattering in random tile painting
groud 52abb9b
Draw only the outline in the tilemap selection
groud 19b571c
keep editing tilemap when editing the tilset
groud 4362d19
Better handling of TileAtlasView transform synchronization
groud 028a2bc
Fix small typo
groud e47ec2f
Support for cutting tiles in TileMaps
groud 5585be9
Update viewport on pressing E in the tilemap editor
groud 5dec493
Add shortucts to TileMap tools
groud 033dcee
Only handle events for the TileMap editor is the Selection tool is ac…
groud f62fa03
TileMap/TileSet editors, bug fixes and small UX improvements
groud ffa69bc
Disable transforms for base tiles
groud 928e381
TileSet/TileMap bug fixing
groud ac39ce7
Draw tiles in the TileAtlasView correctly, with their rendering modif…
groud dd9b782
TileMap/TileSet editors bugfixing
groud c317bc5
Bugfixing, improvements, and implement occluders in TileSet
groud 3141f11
First support TileMap/TileSet collision bodies
groud b6a6fa6
Display shapes in the TileSet editor.
groud 9f2f65f
Fex renames in TileSet
groud 8a136d4
Add support for custom data to tilesets TileData
groud 8eb4f8d
Fixes get_tile_data bindings
groud 7a1aff4
Add missing override and fix some issues
groud e1c02d2
Implement Navigation to TileSet/TileMap
groud 0ff5ca4
Add support for TileSet terrain properties
groud fbd8712
Get terrain neighbors per direction
groud 4200f04
Reorganize TileMap editor code
groud f39941b
Fixes mouse buttons identifiers
groud 51a48a0
Move TileMap tabs to the toolbar
groud eabe7ee
Fix issues with TileSet custom data
groud ff8959a
Implement TileMap terrain painting
groud 4e1cfa8
Reorder tile_set.cpp as tile_set.h
groud 9f80094
Improve retro-compatibility of TileSet
groud 787a315
Fix TileSet terrain possible crash
groud 5fe6ffc
Fix uninitialized variable in TileMapEditor
groud 7f56c11
Don't store TileSet properties that have default values
groud f55a75d
Implement TileSet better UndoRedo by saving some properties that might
groud a0fbeb5
Multiple tiles selection in TileSet editor
groud fcafe5b
Run doctool
groud fd3183e
Remove base_texture_offset as it became useless with multiple tiles s…
groud fa44161
Fix some initializations and code style issues
groud 7bd4bbb
Some visual changes to the TileMap editor
groud e3f0e54
Merge TileSet plugins into tile_set.cpp
groud File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,245 @@ | ||
<?xml version="1.0" encoding="UTF-8" ?> | ||
<class name="TileData" inherits="Object" version="4.0"> | ||
<brief_description> | ||
</brief_description> | ||
<description> | ||
</description> | ||
<tutorials> | ||
</tutorials> | ||
<methods> | ||
<method name="add_collision_shape"> | ||
<return type="void"> | ||
</return> | ||
<argument index="0" name="layer_id" type="int"> | ||
</argument> | ||
<description> | ||
</description> | ||
</method> | ||
<method name="get_collision_shape_one_way_margin" qualifiers="const"> | ||
<return type="float"> | ||
</return> | ||
<argument index="0" name="layer_id" type="int"> | ||
</argument> | ||
<argument index="1" name="shape_index" type="int"> | ||
</argument> | ||
<description> | ||
</description> | ||
</method> | ||
<method name="get_collision_shape_shape" qualifiers="const"> | ||
<return type="Shape2D"> | ||
</return> | ||
<argument index="0" name="layer_id" type="int"> | ||
</argument> | ||
<argument index="1" name="shape_index" type="int"> | ||
</argument> | ||
<description> | ||
</description> | ||
</method> | ||
<method name="get_collision_shapes_count" qualifiers="const"> | ||
<return type="int"> | ||
</return> | ||
<argument index="0" name="layer_id" type="int"> | ||
</argument> | ||
<description> | ||
</description> | ||
</method> | ||
<method name="get_custom_data" qualifiers="const"> | ||
<return type="Variant"> | ||
</return> | ||
<argument index="0" name="layer_name" type="String"> | ||
</argument> | ||
<description> | ||
</description> | ||
</method> | ||
<method name="get_custom_data_by_layer_id" qualifiers="const"> | ||
<return type="Variant"> | ||
</return> | ||
<argument index="0" name="layer_id" type="int"> | ||
</argument> | ||
<description> | ||
</description> | ||
</method> | ||
<method name="get_navigation_polygon" qualifiers="const"> | ||
<return type="NavigationPolygon"> | ||
</return> | ||
<argument index="0" name="layer_id" type="int"> | ||
</argument> | ||
<description> | ||
</description> | ||
</method> | ||
<method name="get_occluder" qualifiers="const"> | ||
<return type="OccluderPolygon2D"> | ||
</return> | ||
<argument index="0" name="layer_id" type="int"> | ||
</argument> | ||
<description> | ||
</description> | ||
</method> | ||
<method name="get_peering_bit_terrain" qualifiers="const"> | ||
<return type="int"> | ||
</return> | ||
<argument index="0" name="peering_bit" type="int" enum="TileSet.CellNeighbor"> | ||
</argument> | ||
<description> | ||
</description> | ||
</method> | ||
<method name="is_collision_shape_one_way" qualifiers="const"> | ||
<return type="bool"> | ||
</return> | ||
<argument index="0" name="layer_id" type="int"> | ||
</argument> | ||
<argument index="1" name="shape_index" type="int"> | ||
</argument> | ||
<description> | ||
</description> | ||
</method> | ||
<method name="remove_collision_shape"> | ||
<return type="void"> | ||
</return> | ||
<argument index="0" name="layer_id" type="int"> | ||
</argument> | ||
<argument index="1" name="shape_index" type="int"> | ||
</argument> | ||
<description> | ||
</description> | ||
</method> | ||
<method name="set_collision_shape_one_way"> | ||
<return type="void"> | ||
</return> | ||
<argument index="0" name="layer_id" type="int"> | ||
</argument> | ||
<argument index="1" name="shape_index" type="int"> | ||
</argument> | ||
<argument index="2" name="one_way" type="bool"> | ||
</argument> | ||
<description> | ||
</description> | ||
</method> | ||
<method name="set_collision_shape_one_way_margin"> | ||
<return type="void"> | ||
</return> | ||
<argument index="0" name="layer_id" type="int"> | ||
</argument> | ||
<argument index="1" name="shape_index" type="int"> | ||
</argument> | ||
<argument index="2" name="one_way_margin" type="float"> | ||
</argument> | ||
<description> | ||
</description> | ||
</method> | ||
<method name="set_collision_shape_shape"> | ||
<return type="void"> | ||
</return> | ||
<argument index="0" name="layer_id" type="int"> | ||
</argument> | ||
<argument index="1" name="shape_index" type="int"> | ||
</argument> | ||
<argument index="2" name="shape" type="Shape2D"> | ||
</argument> | ||
<description> | ||
</description> | ||
</method> | ||
<method name="set_collision_shapes_count"> | ||
<return type="void"> | ||
</return> | ||
<argument index="0" name="layer_id" type="int"> | ||
</argument> | ||
<argument index="1" name="shapes_count" type="int"> | ||
</argument> | ||
<description> | ||
</description> | ||
</method> | ||
<method name="set_custom_data"> | ||
<return type="void"> | ||
</return> | ||
<argument index="0" name="layer_name" type="String"> | ||
</argument> | ||
<argument index="1" name="value" type="Variant"> | ||
</argument> | ||
<description> | ||
</description> | ||
</method> | ||
<method name="set_custom_data_by_layer_id"> | ||
<return type="void"> | ||
</return> | ||
<argument index="0" name="layer_id" type="int"> | ||
</argument> | ||
<argument index="1" name="value" type="Variant"> | ||
</argument> | ||
<description> | ||
</description> | ||
</method> | ||
<method name="set_navigation_polygon"> | ||
<return type="void"> | ||
</return> | ||
<argument index="0" name="layer_id" type="int"> | ||
</argument> | ||
<argument index="1" name="navigation_polygon" type="NavigationPolygon"> | ||
</argument> | ||
<description> | ||
</description> | ||
</method> | ||
<method name="set_occluder"> | ||
<return type="void"> | ||
</return> | ||
<argument index="0" name="layer_id" type="int"> | ||
</argument> | ||
<argument index="1" name="occluder_polygon" type="OccluderPolygon2D"> | ||
</argument> | ||
<description> | ||
</description> | ||
</method> | ||
<method name="set_peering_bit_terrain"> | ||
<return type="void"> | ||
</return> | ||
<argument index="0" name="peering_bit" type="int" enum="TileSet.CellNeighbor"> | ||
</argument> | ||
<argument index="1" name="terrain" type="int"> | ||
</argument> | ||
<description> | ||
</description> | ||
</method> | ||
<method name="tile_get_material" qualifiers="const"> | ||
<return type="ShaderMaterial"> | ||
</return> | ||
<description> | ||
</description> | ||
</method> | ||
<method name="tile_set_material"> | ||
<return type="void"> | ||
</return> | ||
<argument index="0" name="material" type="ShaderMaterial"> | ||
</argument> | ||
<description> | ||
</description> | ||
</method> | ||
</methods> | ||
<members> | ||
<member name="flip_h" type="bool" setter="set_flip_h" getter="get_flip_h" default="false"> | ||
</member> | ||
<member name="flip_v" type="bool" setter="set_flip_v" getter="get_flip_v" default="false"> | ||
</member> | ||
<member name="modulate" type="Color" setter="set_modulate" getter="get_modulate" default="Color( 1, 1, 1, 1 )"> | ||
</member> | ||
<member name="probability" type="float" setter="set_probability" getter="get_probability" default="1.0"> | ||
</member> | ||
<member name="terrain_set" type="int" setter="set_terrain_set" getter="get_terrain_set" default="-1"> | ||
</member> | ||
<member name="texture_offset" type="Vector2i" setter="set_texture_offset" getter="get_texture_offset" default="Vector2i( 0, 0 )"> | ||
</member> | ||
<member name="transpose" type="bool" setter="set_transpose" getter="get_transpose" default="false"> | ||
</member> | ||
<member name="y_sort_origin" type="Vector2i" setter="set_y_sort_origin" getter="get_y_sort_origin" default="Vector2i( 0, 0 )"> | ||
</member> | ||
<member name="z_index" type="int" setter="set_z_index" getter="get_z_index" default="0"> | ||
</member> | ||
</members> | ||
<signals> | ||
<signal name="changed"> | ||
<description> | ||
</description> | ||
</signal> | ||
</signals> | ||
<constants> | ||
</constants> | ||
</class> |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should #43916 be closed or merged then?