Skip to content

Commit e48757d

Browse files
authored
Merge pull request #1058 from compas-dev/gltf_update
Gltf update
2 parents 51db90e + 4571db1 commit e48757d

File tree

17 files changed

+1160
-541
lines changed

17 files changed

+1160
-541
lines changed

CHANGELOG.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
88
## Unreleased
99

1010
### Added
11+
* Added gltf extensions: `KHR_materials_transmission`, `KHR_materials_specular`, `KHR_materials_ior`, `KHR_materials_clearcoat`, `KHR_Texture_Transform`, `KHR_materials_pbrSpecularGlossiness`
12+
* Added `GLTFContent.check_extensions_texture_recursively`
13+
* Added `GLTFContent.get_node_by_name`, `GLTFContent.get_material_index_by_name`
14+
* Added `GLTFContent.add_material`, `GLTFContent.add_texture`, `GLTFContent.add_image`
1115

1216
### Changed
17+
* Based all gltf data classes on `BaseGLTFDataClass`
1318

1419
* Fixed `Color.__get___` AttributeError.
1520

@@ -542,7 +547,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
542547
### Removed
543548

544549
* Removed `compas.datastructures.mesh.core.mesh.BaseMesh`.
545-
546550
* Removed `compas.datastructures.BaseNetwork`.
547551

548552
## [1.7.1] 2021-06-14
@@ -814,7 +818,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
814818

815819
### Added
816820

817-
* Added `compas.datastructures.mesh.trimesh_samplepoints_numpy`.
821+
* Added `compas.datastructures.mesh.trimesh_samplepoints_numpy`.
818822

819823
### Changed
820824

src/compas/files/gltf/__init__.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@
1010
from .gltf_reader import GLTFReader
1111

1212
__all__ = [
13-
'GLTF',
14-
'GLTFContent',
15-
'GLTFMesh',
16-
'GLTFReader',
17-
'GLTFParser',
18-
'GLTFExporter',
13+
"GLTF",
14+
"GLTFContent",
15+
"GLTFMesh",
16+
"GLTFReader",
17+
"GLTFParser",
18+
"GLTFExporter",
1919
]

src/compas/files/gltf/constants.py

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -9,21 +9,21 @@
99
COMPONENT_TYPE_UNSIGNED_INT = 5125
1010
COMPONENT_TYPE_FLOAT = 5126
1111

12-
TYPE_SCALAR = 'SCALAR'
13-
TYPE_VEC2 = 'VEC2'
14-
TYPE_VEC3 = 'VEC3'
15-
TYPE_VEC4 = 'VEC4'
16-
TYPE_MAT2 = 'MAT2'
17-
TYPE_MAT3 = 'MAT3'
18-
TYPE_MAT4 = 'MAT4'
12+
TYPE_SCALAR = "SCALAR"
13+
TYPE_VEC2 = "VEC2"
14+
TYPE_VEC3 = "VEC3"
15+
TYPE_VEC4 = "VEC4"
16+
TYPE_MAT2 = "MAT2"
17+
TYPE_MAT3 = "MAT3"
18+
TYPE_MAT4 = "MAT4"
1919

2020
COMPONENT_TYPE_ENUM = {
21-
COMPONENT_TYPE_BYTE: 'b',
22-
COMPONENT_TYPE_UNSIGNED_BYTE: 'B',
23-
COMPONENT_TYPE_SHORT: 'h',
24-
COMPONENT_TYPE_UNSIGNED_SHORT: 'H',
25-
COMPONENT_TYPE_UNSIGNED_INT: 'I',
26-
COMPONENT_TYPE_FLOAT: 'f',
21+
COMPONENT_TYPE_BYTE: "b",
22+
COMPONENT_TYPE_UNSIGNED_BYTE: "B",
23+
COMPONENT_TYPE_SHORT: "h",
24+
COMPONENT_TYPE_UNSIGNED_SHORT: "H",
25+
COMPONENT_TYPE_UNSIGNED_INT: "I",
26+
COMPONENT_TYPE_FLOAT: "f",
2727
}
2828

2929
NUM_COMPONENTS_BY_TYPE_ENUM = {

0 commit comments

Comments
 (0)