-
-
Notifications
You must be signed in to change notification settings - Fork 21.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Rewriting the Bone2D CanvasItemEditor gizmo thing: Now the Bone2D node handles drawing its own gizmo! * This change was needed so the gizmo is in the correct position when modifications are executing. This would be theoretically doable via the CanvasItemEditor, but the code would be messy and despite my best efforts (even with messy code), I couldn't get it working and it would have had to be more a workaround than a proper solution. * Now the Bone2D gizmo correctly positions itself, even when IK modifications are enabled. * The Bone2D gizmo changes to the Bone2D IK color in the editor settings when modifications are enabled. * The Bone2D gizmo now rotates to align with the custom bone angles, removing the need for using a Bone2D node just to have the Bone2D gizmo looking correct when the Polygon2D doesn't line up with a rotation of 0. * The shape is exactly the same as the previous gizmo and renders exactly the same. It stays the same size regardless of the scale and rotation of the Bone2D node. * The only loss of functionality is that the Bone2D gizmo no longer resizes as the editor is zoomed in and out, and it is no longer drawn with anti-alising. * This code is only executed in the editor, leading to no performance loss in exported games. * The Bone2D editor setting colors have been made slightly more transparent, so they are easier to work with. * The CanvasItemEditor now exposes the editor_selection variable, as otherwise there is no good way for the Bone2D to know if its been selected. * The code for drawing the Bone2D gizmo has been disabled in CanvasItemEditor, but not removed. * I plan to remove the Bone2D gizmo code (and the IK code) from the CanvasItemEditor in a future commit. * Fixed clang format issues
- Loading branch information
1 parent
0f00505
commit 56bca6b
Showing
6 changed files
with
188 additions
and
10 deletions.
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
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