Hello,
I'm using the advanced export to export each scene as one single document (index.html and images/js directories).
But by using the export script with the advanced export function from Hype, the first scene only is transformed with my export script and the other not.
Do you know why ?
Probably it misses a loop to make it works for every scene?
VeevaVault.hype-export.py.zip (4.2 KB)
For the slice you're exporting (shown on the left), can you make sure you have all scenes selected (on the right) ?
This screenshot shows the 'slice' selected -- are all scene selected to the right of that slice (similar to my screenshot)?
In my document I have x scenes. For each one I'm looking a method to export them in order to have one directory per scene (so by using the advanced export it works). BUT, I want also use the VeevaVault.hype-export.py
, I've linked to change a little bit the structure of each of these export folder. Hope it helps.
This export script is actually completely failing for me -- are you getting any actual files written when using it?
Ultimately it looks like your script is not writing out the zip file no matter what you do. This is because you seem to have removed the zip()
helper function that will write out a zip file. It is in the SampleExportScript.py line 297 that this was based on, so it isn't clear why you removed it.
# from http://stackoverflow.com/questions/14568647/create-zip-in-python
def zip(src, dst):
import os
import zipfile
zf = zipfile.ZipFile(dst, "w", zipfile.ZIP_DEFLATED)
abs_src = os.path.abspath(src)
for dirname, subdirs, files in os.walk(src):
for filename in files:
absname = os.path.abspath(os.path.join(dirname, filename))
arcname = absname[len(abs_src) + 1:]
zf.write(absname, arcname)
zf.close()
What makes this one weird is that the script returns without throwing any errors. It turns out that zip is also the name of a built-in function but does something entirely different. So if you delete the zip()
function from the code, it falls back to this one, and doesn't really have an issue with the supplied arguments coincidentally.
The other, secondary, yet common culprit, is that you may need to make sure that each export slice is set to use the export script. The interface isn't 100% clear but the detail view is on a per-slice basis. You can multi-select slices though and choose the export script value.
Of course note that export scripts run per-slice; there's not presently a mechanism to run some "top level" export script at the end of exporting multiple slices. You'd need to build that automation outside of Hype.
Hello, I've edit the code and it's working now.
Thanks for your quick support.