PDA

View Full Version : using registerTimeCallback to update rollout


simonpapp
09-10-2009, 02:56 PM
I have developed a script that allows me to mix(morph) a set of face poses. So its essentially a bone based morpher tool. It is a standard script not a scripted plugin or anything fancy. I want to keep it simple as I am still learning!

Now the problem I am having is animating the poses. I can store the pose values on a perframe basis without issues by adding them to an array.

The interface consists of 20 empty pose slots. When you want to create a new pose you activate the slot then store the pose. To start the process you select the bones you will be using and store them, then store the base pose. You then select the pose you want to morph to, and it blends (using euler angles) using a single slider.

I have a label next to the pose name that updates when you scrub the slider.

I thought using the "registerTimeCallback" and calling a function would help me update, but it doesn't seem to work. I think this is becase of the nature of this callback?

I tried this kinda thing -

for i = 1 to 20 do (for c in PoseValueArray[i] do(
c.text = animatedPoseArray[frameNo+1][i] as string))

Where -

i would cycle my poses
PoseValueArray = the array of label's
animatedPoseArray = the multidimensional array that stores the pose values per frame.

It got stuck firstly because it couldn't access the PoseValueArray within the function. So I added the parameter when I called the function, but it still doesn't update.

Any ideas how I can achieve the labels/pose-values being updated when I scrub the time slider?

I would realy apreciate any help with this. If only a "have you looked into..." suggestion. I dabbled with dotnet, but its beyond my ability I'm afraid.

CGTalk Moderation
09-10-2009, 02:56 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.