54
55
57
58 mesh_count = calibrated.getMeshCount()
59 print("Number of meshes: {}".format(mesh_count))
60
61 for mesh_index in range(mesh_count):
62 bs_tgt_count = calibrated.getBlendShapeTargetCount(mesh_index)
63 print("Number of blendshape targets for mesh {}({}): {}".format(calibrated.getMeshName(mesh_index), mesh_index, bs_tgt_count))
64 for bs_tgt_index in range(bs_tgt_count):
65 bs_tgt_delta_count = calibrated.getBlendShapeTargetDeltaCount(mesh_index, bs_tgt_index)
66 print("Number of blendshape target deltas for mesh {}({}), blend shape target {}: {}".format(calibrated.getMeshName(mesh_index), mesh_index, bs_tgt_index, bs_tgt_delta_count))
67
68 print("Blend shape channel LODs: {}".format(calibrated.getBlendShapeChannelLODs()))
69 print("Blend shape channel input indices: {}".format(calibrated.getBlendShapeChannelInputIndices()))
70 print("Blend shape channel output indices: {}".format(calibrated.getBlendShapeChannelOutputIndices()))
71
72
74
75 print("\n\nClearing blend shape data...\n\n")
76
77 command.run(calibrated)
78
81
82 print("Number of meshes: {}".format(mesh_count))
83
84 for mesh_index in range(mesh_count):
85 bs_tgt_count = calibrated.getBlendShapeTargetCount(mesh_index)
86 print("Number of blendshape targets for mesh {}({}): {}".format(calibrated.getMeshName(mesh_index), mesh_index, bs_tgt_count))
87 for bs_tgt_index in range(bs_tgt_count):
88 bs_tgt_delta_count = calibrated.getBlendShapeTargetDeltaCount(mesh_index, bs_tgt_index)
89 print("Number of blendshape target deltas for mesh {}({}), blend shape target {}: {}".format(calibrated.getMeshName(mesh_index), mesh_index, bs_tgt_index, bs_tgt_delta_count))
90
91 bs_channel_lods = dna.getBlendShapeChannelLODs()
92 bs_channel_input_indices = dna.getBlendShapeChannelInputIndices()
93 bs_channel_output_indices = dna.getBlendShapeChannelOutputIndices()
94
95 print("Blend shape channel LODs: {}".format(bs_channel_lods))
96 print("Blend shape channel input indices: {}".format(bs_channel_input_indices))
97 print("Blend shape channel output indices: {}".format(bs_channel_output_indices))
98
99 print("\n\nSuccessfully cleared blend shape data.")
100
101 print("Saving DNA...")
102 saveDNA(calibrated, outputPath)
103 print("Done.")
104
ClearBlendShapesCommand is used to clear all blend shapes data from a DNA.
Definition: ClearBlendShapesCommand.h:19
Definition: DNACalibDNAReader.h:12
def saveDNA(reader, path)
Definition: clear_blend_shapes.py:18
def validate_geometry(dna)
Definition: clear_blend_shapes.py:28
def loadDNA(path)
Definition: clear_blend_shapes.py:8
def calibrateDNA(inputPath, outputPath)
Definition: clear_blend_shapes.py:52
def validate_animation_data(dna)
Definition: clear_blend_shapes.py:37