SketchUp to ASE
-
I've been tracking down the various su2ase.rb exporters to use with idTech (Doom3). With a few tweaks, the scale and origin are now fixed. But in all the su2ase.rb versions I found (4-5 of them), they all have code for material exports commented out.
I'm not expert enough to immediately see why. Can anyone else give a reason?
(I haven't updated any internal comments other than a simple script name change)Thanks!
-
At a guess it'll be experimental code that the author didnt bother removing for the released version of the script. Id guess its either flaky or broken, no harm in uncommenting it and seeing if it works, though.
-
Yeah, uncommenting it causes an error on line 172. From the readme, I'm lead to believe the material exporting worked, but I was unable to find a working example in any version.
-
I've found materials to be so dangerous that I no longer let them near Ruby.
face.material = '[Wood_Cherry_Original]'
Problem: the face looks like cherry, but model.materials has no cherry. Bug Splat coming soon.
-
I think that if you use them right, they don't cause problems. Plus he is looking the exporting of materials, which is different than importing.
-
@martinrinehart said:
I've found materials to be so dangerous that I no longer let them near Ruby.
face.material = '[Wood_Cherry_Original]'
Problem: the face looks like cherry, but model.materials has no cherry. Bug Splat coming soon.
Why not check model.materials to see if that material name exists before using it on a face, then if it does you can specify the material rather than its name ? Otherwise.........
Does "[Wood_Cherry_Original]" exist as a material before you use it by name ?
If it doesn't, then why don't you make it before trying to use it ? -
@martinrinehart said:
I've found materials to be so dangerous that I no longer let them near Ruby.
face.material = '[Wood_Cherry_Original]'
Problem: the face looks like cherry, but model.materials has no cherry. Bug Splat coming soon.
face.material = model.materials['[Wood_Cherry_Original]']
If there is no material '[Wood_Cherry_Original]' thenmodel.materials['[Wood_Cherry_Original]']
will returnnil
, which indirectly means Default Material.
I've not experienced any problems with materials using this method.
Advertisement