You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Problem 1: Seems like child canvas items are all made translucent and overlaid on top of one another, instead of the whole thing being translucent. This looks worse, and the biggest issue is that it makes the checkerboard in color fields show up even if the color is opaque.
Problem 2: Only the element frame you drag goes translucent, even if the Drag & Drop operation concerns multiple element frames.
The text was updated successfully, but these errors were encountered:
MewPurPur
changed the title
Visual issues when Drag & Dropping elements or XNodes
Visual issues when Drag & Dropping elements or xml nodes
Oct 29, 2024
I've explored multiple avenues for fixing the first problem over the last few days. They all turned out too challenging or with too much added complexity or drawbacks to be worth it.
Keeping this issue open, in case someone else might want to attempt it. Maybe the struggles will be alleviated in future Godot versions or something.
SubViewport:
You can set up a subviewport, get its viewport texture, convert it into an Image and then an ImageTexture, use that for a TextureRect. This is alright, can't even find a major performance drawback when a lot of things are dragged.
The viewport can't be force-redrawn, you have to await a frame. This triggers an issue where the awaiting triggers an issue where the XIDs of the data are handled by a coroutine, which means the drop data becomes a GDScriptFunctionState or something... This might be an issue on Godot's end, but in any case I didn't find a solution.
If the above is solved, the subviewport can be used to generate the preview. But applying it to the inspector widgets is much harder, because you might Ctrl+Select nodes that are far from each other visually. I tried for a while, but could not get this to work.
Must be added to the scene tree for a frame, which is annoying but not that big of a deal.
CanvasGroup:
It works and more neatly solves the issue with the inspector.
It inherits Node2D, which means it can't be set as the preview directly, and moreover, it won't be usable if we use the disable_2d build option in the future. I tried to implement the CanvasGroup functionality in a Control node, but couldn't. Then again, I suck at shaders.
Having a CanvasGroup like that changes the node hierarchy, which is a pain in the ass with the current setup.
Problem 1: Seems like child canvas items are all made translucent and overlaid on top of one another, instead of the whole thing being translucent. This looks worse, and the biggest issue is that it makes the checkerboard in color fields show up even if the color is opaque.
Problem 2: Only the element frame you drag goes translucent, even if the Drag & Drop operation concerns multiple element frames.The text was updated successfully, but these errors were encountered: