minorua / Qgis2threejs

3D map visualization and web export plugin for QGIS
http://minorua.github.io/Qgis2threejs/docs/
507 stars 92 forks source link

using export of GLTF from the commandline #246

Open jachym opened 3 years ago

jachym commented 3 years ago

I'm trying to write minimal code, which would use the plugin as library and could be usable as command line script.

Exporting to PNG works great, but GLTF export fails (silently).

Do you have some hint, how to get it running? I'm adding minimal version of the Python script (I hope it's minimal) and sample data

minimal.py.txt data.zip

Output from the script does not tell much

$ python3 minimal.py

QSettings::value: Empty key passed
QSettings::value: Empty key passed
Logged warning: Loading a file that was saved with an older version of qgis (saved in 3.18.0-Zürich, loaded in 3.18.1-Zürich). Problems may occur.
Logged warning: Loading a file that was saved with an older version of qgis (saved in 3.18.0-Zürich, loaded in 3.18.1-Zürich). Problems may occur.
runScript: init(true, 1);
runScript: Q3D.Config.autoZShift = false;
runScript: setOutlineEffectEnabled(false);
runScript: setBackgroundColor(0, 0);
runScript: Q3D.Config.coord.visible = true;
runScript: Q3D.Config.coord.latlon = false;
runScript: loadStart("LYRS", true);
runScript: loadStart("L0");  // zabaged
runScript: loadEnd("L0");
zabaged layer updated: 0.308s
 0.000 0.000 0.001
 0.000 0.207 0.099

runScript: loadEnd("LYRS");
runScript: setHFLabel("", "");
runScript: Q3D.Config.exportMode = true;
runScript: init(true, 1);
runScript: // GLTFExporter.js loaded
runScript: Q3D.Config.autoZShift = false;
runScript: setOutlineEffectEnabled(false);
runScript: setBackgroundColor(0, 0);
runScript: Q3D.Config.coord.visible = true;
runScript: Q3D.Config.coord.latlon = false;
runScript: loadStart("LYRS", true);
runScript: loadStart("L0");  // zabaged
runScript: loadEnd("L0");
zabaged layer updated: 0.241s
 0.000 0.000 0.000
 0.000 0.177 0.062

runScript: loadEnd("LYRS");
runScript: saveModelAsGLTF('/tmp/gltf.gltf');

thank you for any help

ElNiak commented 1 year ago

Hello,

just to inform that i get the same bugs, trying to figure out