Skip to content

Brush Tool Update#10

Merged
jordanbrotherton merged 3 commits into
ufosc:mainfrom
BBlaza:main
Mar 5, 2026
Merged

Brush Tool Update#10
jordanbrotherton merged 3 commits into
ufosc:mainfrom
BBlaza:main

Conversation

@BBlaza

@BBlaza BBlaza commented Feb 25, 2026

Copy link
Copy Markdown
Contributor

Everything works as expected technically.

The following functions work well:
1 editing thickness
2 change color
3 change brush

Everything works as expected technically. However, although the texture for the line is set up, it didn't work as expected. Round texture doesn't appear at all, and square textures are like normal lines. It's probably caused by the logic of adding lines to Canvas.

The following functions work well:
1 editing thickness
2 change color

To test out these functions, you can set the texture to either square or semi-square. Circle texture can't print anything for unknown reasons.
Problem Fixed. All implemented features in the brush menu work well.
@BBlaza BBlaza marked this pull request as ready for review February 25, 2026 14:56
@BBlaza BBlaza changed the title Paint Update Brush Tool Update Feb 25, 2026

@jordanbrotherton jordanbrotherton left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the contribution! I think a lot of it is really well implemented and the way you went about it was good, particularly the way you used tabs for the tool itself! There are a few things that should be addressed however. There are some comments through the code, and a few bigger ones are here:

  • The options tab container shouldn't be directly in the EditExtras scene, instead it should be a separate scene with an instance of it placed inside the ToolManager scene. The way EditExtras is laid out with the managers should be a good reference to follow.
  • Similarly, the brush settings view should be in its own separate scene as well, being its own scene in the brush directory and placed inside the ToolManager. This keeps everything compartmentalized and reduces potential conflicts.
  • The brush textures don't play well with Line2D, being a leftover from when the brush tool acted as stamps. The brush presets should instead be a custom Resource script consisting of Line2D settings that replicate what the textures try to do. Additionally, they should not be hardcoded, with the brushes being dynamically added.
  • Be sure to check your code follows the GDScript guidelines with gdlint.

@onready var thick_sldr = $VBoxContainer/HBoxContainer/BrushSetting/TkSldrContainer/ThicknessSlider
@onready var hard_sldr = $VBoxContainer/HBoxContainer/BrushSetting/HdSldrContainer/HardnessSlider
@onready var color_picker = $VBoxContainer/HBoxContainer/ColorHeader/ColorPickerButton
@onready var brush_list = $VBoxContainer/BrushesHeader/BrushList

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These should use @export and the values being set in the editor as it allows for scenes to change without breaking the hardcoded paths.


# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(_delta: float) -> void:
pass

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This unused function should be removed.

]

# Called when the node enters the scene tree for the first time.
func _ready() -> void:

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There should be a default brush chosen, as currently no brush is chosen on startup, leading to nothing being drawn.

@jordanbrotherton

Copy link
Copy Markdown
Collaborator

Looks good! Thanks for your contribution!

@jordanbrotherton jordanbrotherton merged commit b78b595 into ufosc:main Mar 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants