create poses using script

Discussions about user contributed assets. This is a good place to request new assets, as well as requesting support on existing assets that have been downloaded from the user contributions repository.

Moderator: joepal

create poses using script

Postby dugarsumit » Thu May 04, 2017 9:32 am

I want to create different poses using scripting in makehuman. I have written a following dummy script. When I try to run this script I cannot observe any change in the pose of my model. Am I missing something or doing something wrong? Can someone please help me.
Code: Select all
import numpy as np
human = G.app.selectedHuman
skeleton = human.skeleton
bones = skeleton.getBones()
pose = skeleton.getPose()
poseMats = []
matPose = np.identity(4, dtype=np.float32)
for bIdx, bone in enumerate(bones):
    if bone.name == "LeftLeg":
        #bone.rotateRest(matPose)
        poseMats.append(matPose)
    else:
        poseMats.append(bone.matPoseGlobal)
poseMats = np.array(poseMats)
skeleton.setPose(poseMats)
dugarsumit
 
Posts: 10
Joined: Thu May 04, 2017 9:12 am

Re: create poses using script

Postby loki1950 » Thu May 04, 2017 3:46 pm

Please do not double post it is considered bad manners and may lead to both being ignored or deleted.

Enjoy the Choice :)
my box::HP Envy i5-6400 @2Q70GHzx4 8 Gb ram/1 Tb(Win10 64)/3 Tb Mint 19.2/GTX745 4Gb acer S243HL K222HQL
Q8200/Asus P5QDLX/8 Gb ram/WD 2Tb 2-500 G HD/GF GT640 2Gb Mint 17.3 64 bit Win 10 32 bit acer and Lenovo Ideapad 320-15ABR Win 10/Mint 19
User avatar
loki1950
 
Posts: 1219
Joined: Thu Dec 18, 2014 6:27 pm
Location: Ottawa,Ontario


Return to Assets, asset repositories and asset downloader

Who is online

Users browsing this forum: No registered users and 1 guest