42 transforms = node.transforms
44 for transform
in transforms:
45 transform.matrix[:3, 3] *= scale
46 node.transforms.append(scene.MatrixTransform(transform.matrix.reshape(16, 1)))
47 node.matrix = numpy.identity(4, dtype=numpy.float32)
48 for t
in node.transforms:
49 node.matrix = numpy.dot(node.matrix, t.matrix)
51 for child
in node.children:
52 if isinstance(child, scene.Node):
58 for primitive
in geometry.primitives:
59 for _input
in primitive.getInputList().getList():
60 if _input[1] ==
"VERTEX":
61 position_ids.add(_input[2][1:])
62 for position_id
in position_ids:
63 geometry.sourceById[position_id].data *= scale
68 for geometry
in mesh_.geometries:
71 mesh_.assetInfo.unitname =
'meter' 72 mesh_.assetInfo.unitmeter = 1.0
def scale_geometry(geometry, scale)
def scale_collada(mesh_, scale)
def scale_node(node, scale)