Skip to main content

Library for character animation

Project description

example code 1 (fbx loading).

import os,sys,pdb,math
from libcalab import *

this=RE.createMainWin() # this is necessary before using libcalab


skelFile='../../Mixamo/fbx_withSkin/bigvegas_Walking.fbx' 
skinScale=1

fbx=RE.FBXloader(skelFile, skinScale=skinScale, useTexture=True, simplifyMesh=False)

loader=fbx.loader
motion=fbx.loader.mMotion

print(loader)
lua.out(loader) #  print skeleton using lua (see console).


pdb.set_trace()

example code 2 (bvh loading).

import os, sys, pdb, math, random
from libcalab import *
import numpy as np
import copy

this=RE.createMainWin(sys.argv)

loader1=RE.createMotionLoaderExt('../Resource/motion/woody/wd2_2foot_walk_turn2.bvh')
mMotion=loader1.mMotion

# pose editing using quaternions
lua.out(loader1) #  print skeleton using lua (see console).
ri1=loader1.getRotJointIndexByName('LeftForeArm')
pose1.rotations(ri1).setRotation(m.vector3(0,1,0), math.radians(-90))


# pose editing using euler angles
loader1.setPose(pose2)
dof2=loader1.getPoseDOF()

print(dof2.array)
# The two lines above set and get the quaternions (pose2) in the loader to convert them into Euler angles (dof).
# In other words, pose2 and dof2 represent the same pose but in different representations.
loader1_relbow=loader1.getTreeIndexByName('RightForeArm')
rindex2_start=loader1.dofInfo.startR(loader1_relbow)
rindex2_end=loader1.dofInfo.endR(loader1_relbow)

print(loader1.bone(loader1_relbow).getRotationalChannels())

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

libcalab-0.0.9-cp312-cp312-manylinux_2_39_x86_64.whl (11.6 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.39+ x86-64

libcalab-0.0.9-cp312-cp312-macosx_13_0_arm64.whl (7.7 MB view details)

Uploaded CPython 3.12macOS 13.0+ ARM64

libcalab-0.0.9-cp311-cp311-macosx_13_0_arm64.whl (7.7 MB view details)

Uploaded CPython 3.11macOS 13.0+ ARM64

File details

Details for the file libcalab-0.0.9-cp312-cp312-manylinux_2_39_x86_64.whl.

File metadata

File hashes

Hashes for libcalab-0.0.9-cp312-cp312-manylinux_2_39_x86_64.whl
Algorithm Hash digest
SHA256 13e0daebb82007eb6e87d2178e785c60be37ec57a48adbd697b9f0e22567d680
MD5 967f082b662bd94ee4f2d23668249cb6
BLAKE2b-256 38e7a71ade4e809f4d6512bcc46e909528e41e7873840dc4a16a31198045b7f5

See more details on using hashes here.

File details

Details for the file libcalab-0.0.9-cp312-cp312-macosx_13_0_arm64.whl.

File metadata

File hashes

Hashes for libcalab-0.0.9-cp312-cp312-macosx_13_0_arm64.whl
Algorithm Hash digest
SHA256 48786f7d451296ea171e50e2cde434af930640a7c749b4dcff66b639b2723dc5
MD5 103d6a0b5b806464b7c1baaf782e1e01
BLAKE2b-256 99270d678177e367e4b340df5e4be967dbe438ebdae659e2e74333bed3c75c62

See more details on using hashes here.

File details

Details for the file libcalab-0.0.9-cp311-cp311-macosx_13_0_arm64.whl.

File metadata

File hashes

Hashes for libcalab-0.0.9-cp311-cp311-macosx_13_0_arm64.whl
Algorithm Hash digest
SHA256 3952b96aa378689acd9f899aa4ad0b7c5bc11ab1216918665f41aa0654ab6798
MD5 c0d813bcbc26260ae073f9d6a8b1248e
BLAKE2b-256 00bc5ae9432fed31a962f07e3a8026d2d9331c84e92ac997ae1769f8c6620ec7

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page