don-tnowe / godot-sprite-painter

Image editor right inside Godot 4.
MIT License
79 stars 8 forks source link

Show real-time preview of sprite in scene context #12

Open don-tnowe opened 1 year ago

don-tnowe commented 1 year ago

Originally, the overlay was supposed to pan and scale with the scene, but I couldn't figure out how to track/modify the viewport's visible rect... but this can still be done in another way.

Preview window shows a copy of the viewport, but without the edited object. The edited object with the NEW texture will be shown on top.

don-tnowe commented 12 months ago

Might be late because the "pan and scale with the scene" was abandoned, but:

get_viewport().global_canvas_transform

returns the object viewport's transform, even in the Canvas Item editor. Discovered literally today. Might help with this, might also not.