2020-10-22 at 1:40 pm #34501
It would be great if you could add an export without textures button. Sometimes I just do geometry updates and the textures I’ve got are saved with a lower resolution. So everytime I do a update these textures get overwritten.2020-10-23 at 1:04 pm #34526Yuri KovelenovStaff2021-07-01 at 11:34 am #42457
Pushing that topic again. I’m currently working on a project were I constantly need to update stuff, but without the textures. Cause I have low res versions in the export folder which are getting overwritten every single time I export the gltf.
I would be okay for the moment if there is a max script solution I could use.2021-07-12 at 3:31 pm #42802Ivan LyubovnikovStaff
I would be okay for the moment if there is a max script solution I could use.
You can try this maxscript code:
expPath = "C:\\path\\to\\export\\directory\\" extensions = #("png", "jpg", "hdr") bkpPath = expPath + "_texturesBkp\\" -- remove & create the backup dir DOSCommand("if exist " + bkpPath + " (del /f/s/q " + bkpPath + "* & rmdir " + bkpPath + ")") DOSCommand("mkdir " + bkpPath) -- copy existing files with the specified extensions into the backup dir for ext in extensions do ( DOSCommand("copy /b/v/y " + expPath + "*." + ext + " " + bkpPath) ) -- run export macros.run "Verge3D" "exportGLTF" -- copy files from the backup dir back to the original dir for ext in extensions do ( DOSCommand("copy /b/v/y " + bkpPath + "*." + ext + " " + expPath) ) -- remove the backup dir DOSCommand("del /f/s/q " + bkpPath + "*") DOSCommand("rmdir " + bkpPath)
(here’s the link just in case: https://www.dropbox.com/s/xpht3rge7wb7d25/export.ms?dl=0)
– it copies certain image files into a specified “backup” folder, then performs export and after that restores the files reverting changes that were made to them during the export.
You can see at the top of the script the following variables:
– expPath – you need to specify the export path for your scene (with double backslashes “\\”)
– extensions – only files that have one of those are preserved by the script; you can add/remove any other extensions if you need
– bkpPath – the temporary directory located inside the export folder; it is used for keeping the old files for restoring them after the export
So, to perform export of your scene you can just run that script instead of the Verge3D->Export glTF… menu command. I tested it on an example scene and it works well. Hope this helps!
Co-founder and lead developer at Soft8Soft.2021-07-19 at 10:33 am #42999
thank you very much for the script. Working great for me!
Would still love to see that as an extra option in upcoming verge3d versions. Maybe you can consider that for the future
- You must be logged in to reply to this topic.