Qgis2threejs icon indicating copy to clipboard operation
Qgis2threejs copied to clipboard

using export of GLTF from the commandline

Open jachym opened this issue 3 years ago • 1 comments

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

jachym avatar Apr 16 '21 14:04 jachym

Hello,

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

ElNiak avatar Nov 03 '22 14:11 ElNiak