flamewave000 / dragonflagon-arch

Architect for FoundryVTT provides a major overhaul of the Walls and Lighting editing features.
BSD 3-Clause "New" or "Revised" License
20 stars 5 forks source link

FVTTv10: Canvas Capture is Broken due to Canvas Layers reorg #142

Open flamewave000 opened 1 year ago

flamewave000 commented 1 year ago

EffectsCanvasGroup:

Canvas:

image

MasterSquinch commented 1 year ago

Has there been any progress on this? I tried looking at it myself but I’m kind of lost as to where to even start… been a long time since I dropped out of uni, and I haven’t really done any programming since then

yahavatar commented 1 year ago

Here's a [rough] workaround:

  1. Create a script macro. Paste in the following code:

    const blob = await (await fetch(document.getElementById('board').toDataURL())).blob();
    const file = new File([blob], {type:"image/png", lastModified: new Date()});
    var a = document.createElement('a');
    a.href = window.URL.createObjectURL(file);
    a.download = 'image.png';
    a.click();
  2. Zoom your browser window to like 50% or so using CTRL -

  3. Then zoom your canvas to with the mouse wheel to just fit on the screen.

  4. Run the macro. This will save the canvas to a file, default name = "image.png"

  5. Return the browser zoom to whatever you want (100% usually) using CTRL + to continue playing

It's not a perfect solution, but it gets you an export with all tiles on all levels. The farther out you zoom the browser window, the larger the export file. If your zoom is lower, like 75-100%, the export dimensions will be smaller and you will lose detail. OK for testing, but for final output I'd even go down to 30% for max detail.

Hope this helps, yah.