godotengine / godot

Godot Engine – Multi-platform 2D and 3D game engine
https://godotengine.org
MIT License
88.67k stars 20.11k forks source link

Theme variation bugs. #64859

Open rm-software-programming opened 2 years ago

rm-software-programming commented 2 years ago

Godot version

3.5-stable

System information

Windows 11 64bits, GTX 1060, GLES3

Issue description

Bugs in the new theme variation features. Tested in godot 3.5 stable, and a build of godot made 25 august 2022. The bugs are on both.

  1. When creating variations in the manage theme items popup, trying to delete one of the delete them all.
  2. After creating the variations unable to access them from the list in the inspector.
  3. After creating at multiple variations and setting for all of them a base type, and overriding at least one property for each of them then you can remove them one by one, if one a these conditions are not valid, trying to remove one of them in the manage theme items popup will remove them all.

https://user-images.githubusercontent.com/93253123/186544547-01425c13-84cf-42db-b7de-8e8439bf09ba.mp4

Steps to reproduce

  1. Open the res://new_theme.tres.

  2. Open the manage items.

  3. Add two type.

  4. Try to remove one of them, they all get deleted.

  5. Open the res://new_theme.tres.

  6. Open the manage items.

  7. Add two type.

  8. Close the manage items.

  9. Select the button in the scene res://Button.tscn.

  10. In the inspector go to the theme type variation property (the list is empty).

  11. But if your write the name of one of type you just created before(click on the pencil icon) it works.

  12. But if now you reselect nothing in the list, what you just typed desapear again, you need to write the name all the time.

  13. Now reopen res://new_theme.tres.

  14. For each types: select the base type button, and override the font color property for example (at least one property per item).

  15. Open the item manager and you can remove them one by one. ThemeVariation.zip

Minimal reproduction project

No response

rm-software-programming commented 2 years ago

Update if i:

  1. Open item manager.
  2. Create four items (a, b, c, d).
  3. Close the manager.
  4. Reopen it.
  5. Delete b.
  6. And do ctrl z to undo. The manager is going to only restore the one b, no matter how many time i undo. That means the undo redo system have no clue about a, c, d. I hope it help.
fernandobarahona commented 1 year ago

I have exactly the same issues.

Besides if you create a custom node (via class_name or a Custom Node Plugin) you create an item and give it a value, and it doesnt affect the custom node. The created node then have to set manually to type variation.

For reusability creating with Custom Node Plugin you should create with scene and give it variation.

If Custom Nodes have their own icon, can be added from "add child node" and see the logo in "add type" in them; they should be as any other built in classes in the theme editor. This would be SOOOOOO INCREDIBLE USEFULL.

univeous commented 1 year ago

This issue still exists in Godot 4.1 dev 2. And after reloading the project, all Types will disappear in the theme editor, but they will still be visible in the inspector. image I would say these issues make the theme variant completely unavailable.

For the variations in the inspector, according to the document, if you set the theme as project theme, they will appear. This is also a bit unintuitive.