Open DanRathbun opened 4 years ago
BUG (1): Should not be writing empty files for unsupported filetypes. It should be obvious from the report that many of the thumbnail and texture writing methods share core function(s) that are writing empty files when they shouldn't.
Sketchup::save_thumbnail()
Sketchup::ComponentDefinition#save_thumbnail()
Sketchup::ImageRep#save_file()
Sketchup::Material#write_thumbnail()
Sketchup::Model#save_thumbnail()
Sketchup::Texture.write()
Sketchup::View.write_image()
BUG (2): [Perhaps related to 1,] Is the strange aspect of Sketchup::Texture#write()
that it only create the empty file when the 2nd argument is false
(the default.)
BUG (3): Sketchup::ImageRep#save_file()
exception ?
ArgumentError
("Unsupported file extension"
)
instead of RuntimeError
with a vague "failed to save file"
message.
( See: Sketchup::Model#export()
error handling for precedent.)DOC (1): No supported filetypes listed for:
Sketchup::save_thumbnail()
Sketchup::ImageRep#save_file()
Sketchup::Material#write_thumbnail()
Sketchup::Texture.write()
Sketchup::View.write_image()
DOC (2): No return type documented at all:
DOC (3): Return type has no explanation. Says only "(Boolean)":
DOC (4): Sketchup::Model#export()
supported formats
~
SketchUp Ruby API Issues
An attempt to write out a texture as a psd file failed and instigated this report. Because documentation was poor, I had to test the support for psd files. I came across multiple issues with multiple methods as described below.
The kinds if issues:
Ref: Issue #57
Also see ISSUE BREAKDOWN (next post)
EXPORT TESTS
IMPORT TESTS