Uploading this script on behalf of Alban Denoyel & Bart Crouch for review.
Bart Crouch can commandeer the patch later if he likes.
Differential D321
Sketchfab integration (v1.2) Authored by Campbell Barton (campbellbarton) on Feb 15 2014, 10:38 PM.
Details Uploading this script on behalf of Alban Denoyel & Bart Crouch for review. Bart Crouch can commandeer the patch later if he likes.
Diff Detail Event TimelineComment Actions Feedback inline, one question though... This is packing all data into the blend, then saving as - wont this leave the file packed?, in that case the user might not notice... and save their work back to the original blend without meaning to. (Maybe I misunderstand here), but overall this is my main concern.
Comment Actions Something I didn't mention was threading with Python is known not to work 100% with Blender, However I've observed it can work reasonably well when 2 threads are at least not attempting to change blender data at once - this is still something we'll need to double check is working well enough to include in a release. Comment Actions Hi, About your question: The script "saves as" with a different filename so there should not be an issue of saving back work to the original blend is there? (sorry I'm not very familiar with Blender scripting). Let me know if something needs to be updated. Otherwise all your remarks (excluding questions I left as comments to your inline notes) are taken into account in the attached revision. Best, PA{F77994}
Comment Actions Regarding packing, This is a problem still...
We could add some option to pack-on-save, so it keeps the open file unaffected, since saving with packed data is generally a useful thing to be able to do - but this isnt some simple task so think its worth to consider alternatives.
Comment Actions Since there are some issues with requests, how much work is it to drop it as a dependency? See replies: http://lists.blender.org/pipermail/bf-committers/2014-February/042870.html Comment Actions Hey, Not including requests would be a pain, as it would require recoding a url lib from scratch, which is a hard task. Totally worth the extra 300kb in my opinion. I went for call an external blender process as it will be more flexible down the line than just zipping textures. The updated sources are attached. Let me know what you think. Comment Actions urllib is a part of python, See: In the latest testbuild: Comment Actions Yes but unfortunately it does not support well file attachement, which is a major pitfall and the reason for the existence of 'requests' and other external http libs. Comment Actions @Pierre-Antoine Passet (pierreant-p) - there were 2 issues regarding bundling requests which aren't yet addressed.
Could you reply to these comments? (reply here can work too, I posted on the mailing list since this is an issue for platform maintainers). Comment Actions Hi @Campbell Barton (campbellbarton), Regarding the questions about 'requests', here are my thoughts:
Let me know what your think, Best, PA Comment Actions Hi @Pierre-Antoine Passet (pierreant-p)
Think its really too late to include this addon with the release, but we should make it a priority to resolve topics for next release. so...
This is something for blender to support (not suggesting you guys should have to do all this), but think we needs to do this before the addon can really integrate well. Comment Actions Hey, Update:
PA{F79144} Comment Actions Update on review: The solution for replacing UUID, but a less involved fix can work (noted inline). Most other issues I found were while testing. Unsaved files Error occured while preparing your file: 'size' ... after that try save and press upload again, it says to wait for the current upload, you have to restart blender for it to work again. If unsaved files are unsupported then best report that, however if an upload does fail for some reason, it should probably be handled better, at least disable the upload state. Ignoring Unsaved Changes Uploaded blend's are from the last saved version of the file, Currently if you make a quick change and press upload, the change will be ignored unless you press save first. How to handle this will is tricky, but think a simple solution could be to do a save-copy, write a temp blend, upload it and delete. Upload Popup While popup's are used in blender sometimes, they typically are used for confirmation, the way the popup works in this case can happen while you're in the middle of using Blender and easy to accidentally quit. Really dont think this is good, suggest:
Panel Placement The new panel should probably go in the toolbar (not view properties) and have its own tab.
Comment Actions I have taken into account the user interface and usability recommendations. filepost.py is removed and we use a less hacky hack to bypass the uuid bug on windows. Comment Actions Update. requests is now bundled with blender and have prepared the script to commit. I've made some edits to this script, which Ill commit shortly. Summary of changes.
Some fixes.
Comment Actions If blender is installed into a system path, the sketchfab addon would fail to upload a model that has never been saved. Comment Actions @Clément (Wiz), Committed rBA8b0864a5e3f7b7d1849898de2623dbb79fc4179e replaced sys.argv[7] with sys.argv[-1] otherwise no changes, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||