Fix issue 2889 (molecule_ascii.cob load failure): change integers to floating point values in color triplets (#5819)

* Convert integer values to floating point

* Add reference screenshot

* Restore assert to expect pass instead of fail

---------

Co-authored-by: Steve M <praktique-tellypresence@yahoo.com>
This commit is contained in:
Steve M
2024-10-19 10:20:49 -07:00
committed by GitHub
parent a383cb1ff7
commit fffce70fce
4 changed files with 8 additions and 6 deletions

View File

@@ -1170,7 +1170,7 @@ Object Mode Off 0
Mat1 V0.08 Id 497131204 Parent 58548212 Size 00000083
mat# 0
shader: phong facet: auto40
rgb 1,1,1
rgb 1.0,1.0,1.0
alpha 1 ka 0 ks 0.1 exp 0 ior 1
ShBx V0.04 Id 497131205 Parent 497131204 Size 00000605
Shader class: color
@@ -1758,7 +1758,7 @@ Object Mode Off 0
Mat1 V0.08 Id 497168220 Parent 57850740 Size 00000083
mat# 0
shader: phong facet: auto40
rgb 1,1,1
rgb 1.0,1.0,1.0
alpha 1 ka 0 ks 0.1 exp 0 ior 1
ShBx V0.04 Id 497168221 Parent 497168220 Size 00000605
Shader class: color
@@ -2346,7 +2346,7 @@ Object Mode Off 0
Mat1 V0.08 Id 497153380 Parent 497235148 Size 00000083
mat# 0
shader: phong facet: auto40
rgb 1,1,1
rgb 1.0,1.0,1.0
alpha 1 ka 0 ks 0.1 exp 0 ior 1
ShBx V0.04 Id 497153381 Parent 497153380 Size 00000605
Shader class: color

View File

@@ -0,0 +1,4 @@
# COB 3D model reference images
## molecule_ascii.cob
![molecule_ascii.cob](molecule_ascii_cob.png)

Binary file not shown.

After

Width:  |  Height:  |  Size: 242 KiB

View File

@@ -63,9 +63,7 @@ TEST(utCOBImporter, importDwarf) {
TEST(utCOBImporter, importMoleculeASCII) {
Assimp::Importer importer;
const aiScene *scene = importer.ReadFile(ASSIMP_TEST_MODELS_DIR "/COB/molecule_ascii.cob", aiProcess_ValidateDataStructure);
// FIXME: this is wrong, it should succeed
// change to ASSERT_NE after it's been fixed
ASSERT_EQ(nullptr, scene);
ASSERT_NE(nullptr, scene);
}
TEST(utCOBImporter, importMolecule) {