Animation Clipの作成
import Atoms import AtomsCore from Atoms import GLOBAL_NAMES CLIP = GLOBAL_NAMES.CLIP clipPath= "/path/to/animationfile.fbx" eventName = 'testClip' aClips = Atoms.AnimationClips.instance() aClips.addAnimationClip(eventName , clipPath, True) acPtr = aClips.animationClip(eventName) if acPtr is None: return metadataMap = acPtr.metadata() metadataMap[CLIP.BLEND_FRAMES_AFTER_FOOT_UP] = AtomsCore.IntMetadata(4) metadataMap[CLIP.LOOP] = AtomsCore.BoolMetadata(True) metadataMap[CLIP.LOOP_START] = AtomsCore.IntMetadata(0) metadataMap[CLIP.LOOP_END] = AtomsCore.IntMetadata(50) metadataMap[CLIP.LOOP_NUM_BLEND_FRAMES] = AtomsCore.IntMetadata(4) acPtr.setDirectionType(Atoms.AnimationClip.DirectionType.Static) acPtr.setDirection(imath.V3d(1, 0, 0)) acPtr.setIdle(False)
Copyright © 2017, Toolchefs LTD.