Materials problem on Export
-
Thanks TIG. Actually, you don't need Image Magik...that was just a belt and braces job.
I'm getting this in the console.Error Loading File ffexport.rb
C:/PROGRA~1/Google/GO24A4~1/Plugins/ffexport.rb:212: syntax error, unexpected $end, expecting kENDI tried manually line counting in Notepad but lost track.
-
@alan fraser said:
Thanks TIG. Actually, you don't need Image Magik...that was just a belt and braces job.
I'm getting this in the console.Error Loading File ffexport.rb
C:/PROGRA~1/Google/GO24A4~1/Plugins/ffexport.rb:212: syntax error, unexpected $end, expecting kENDI tried manually line counting in Notepad but lost track.
I got that too...
You need Notepad++ which adds line numbers!
I missed an 'end' after the last def end!
But it's messed up... I'll look at it and get back to you...
I suspect that the fileutils.rb is raising the error...@unknownuser said:
...212: syntax error, unexpected $end, expecting kENDError Loading File fileutils.rb
undefined methodoptions_of' for class
Module' -
Hi,
I've been told that there are several versions of fileutils.rb, some of them have bugs. -
You don't need FileUtils at all...
I'll sketch out a version without it ad post it asap... -
Thanks TIG, I really appreciate the effort. I can't imagine what's happened between V7 and V8 as regards the export of materials. It's probably as well to find out.
-
It's not so much what has changed in the API as the Ruby version and the FileUtils that seems incompatible...
I'll knock up a quick version that doesn't need them or global variables etc and see how it goes from there... -
Alan
Here's a version that works for me.ffexport.rb I've removed the need to have FileUtils [it now uses standard File/Dir methods].
The units change in options was changed too, as you can't rely on the same array elements applying across SUp versions or platforms - I've only change the units - you might also want to change the d.p's ?
Because I don't have your 'zip' tools or 'imagemagick' I've added some traps BUT it should work OK for your needs. I have mocked up the zip copy to the base folder, using manual methods, and it worked OK.
If you want the export reporting back add,true
after each export command.
I've put ### near each major change...
I've also added some console reporting and it opens the folder it's made at the end... -
Cheers TIG; that's absolutely brilliant. You're a star. I just tested it on a fully mapped model and this is the resulting 3ds version (if SU is going to screw up the mapping on anything, it's the 3ds)
Yes, there's a lot of superfluous legacy stuff in there, as we tried it across several SU versions and also wanted it to be cross-platform.
I'll decide whether or not to turn the reporting back on. I do need the face-count, but as I usually photo-render stuff in Deep Exploration, I can get it from there anyway.
My son James did most of the coding on that. I'd have got him to fix it, but he's just disappeared off down to London...to a job in oil and gas exploration (coding in IDL for an obscene amount of money for someone his age). Kids; they're never around when you need them...just fly back to the nest when you don't.
-
Alan
Here's a version with reporting of exports 'on'...ffexport.rb Use the one that suits you...
-
Thanks TIG.
Advertisement