Forum Coordinators: RedPhantom
Poser - OFFICIAL F.A.Q (Last Updated: 2025 Jan 03 1:41 pm)
Try this:
scene = poser.Scene()<br></br>theFigure = scene.Figure("Figure 1")<br></br>theHip = theFigure.Actor("Hip")<br></br>theAnimationSet = scene.CreateAnimSet("Animate Elephant")<br></br>theAnimationSet.AddObjectRange(theHip,0,90)<br></br><br></br>scene.SetFrame(0)<br></br>theHip.ParameterByCode(poser.kParmCodeZTRAN).SetValue(0.0)<br></br>theHip.AddKeyFrame()<br></br>scene.SetFrame(14)<br></br>theHip.ParameterByCode(poser.kParmCodeZTRAN).SetValue(0.4)<br></br>theHip.AddKeyFrame()<br></br>scene.SetFrame(29)<br></br>theHip.ParameterByCode(poser.kParmCodeZTRAN).SetValue(0.8)<br></br>theHip.AddKeyFrame()<br></br>scene.SetFrame(44)<br></br>theHip.ParameterByCode(poser.kParmCodeZTRAN).SetValue(1.2)<br></br>theHip.AddKeyFrame()<br></br>scene.SetFrame(59)<br></br>theHip.ParameterByCode(poser.kParmCodeZTRAN).SetValue(1.6)<br></br>theHip.AddKeyFrame()<br></br><br></br># Redraw the scene<br></br>scene.DrawAll()
oh, and one more thing: Try to use the "internal" names of the actors in your script, that'll make your scripts compatible with localized versions of Poser. In this case, you'd replace
theHip = theFigure.Actor("Hip")
with theHip = theFigure.ActorByInternalName("hip")
You can find the internal names of the actors in P5 in the right tab of the Parm dial palette.
Attached Link: http://www.renderosity.com/messages.ez?Form.ShowMessage=1719246
I have done something similar with Python, a couple of scripts that make a figure follow a target (see the attached thread, at first it was about snooker dynamics but turned out people were more interested in the follow script). It works for almost any kind of characters and moving animations (walking, smimming, flying, crawling). The project is still a WIP (that's why the currently available working versions aren't too well written and there are no code comments). Edit: You may want to ignore posts 1-50 in that thread.Message edited on: 06/10/2004 19:29
Stewer, I tried your code, but I get an error. Traceback (innermost last): File "", line 9, in ? AttributeError: AddKeyFrame I'm using Poser 4, if that matters. Any clues on why the code can not add a key frame? Scourge, I did pull down the scripts from that thread. I was not sure how I could make use of it, correct me if I'm wrong, but it looks like the script requires a walk cycle to be already in existance before you begin? I quickly scanned the code looking for syntax on how to add keys and could not find any. I'm not sure how the script is making the figure walk, care to rough outline it here? Thanks All Enivob Thanks
The current bipedal walk designer actually works, sortof, for quadrupedal animals. I've got a lot of work to do yet to discover why some animals work well (e.g. the DAZ elephants) and others work really badly (the Bengal Tiger, for example) but provided everything in the model is designed & named appropriately it's surprising (IMHO) how well the Poser walk designer works with quadrupeds. Youi DO however have to design a 30-second animation to save in the "Walk Designer" pose folder to get the quadruped walk to show up in the WD itself - but from there on in it "just works" (for me, so far). I imagine that an elephant walk will be suitable for a number of quadrupeds, but most other animals have more than 1 walking style (for different speeds at least). Cheers, Cliff
This site uses cookies to deliver the best experience. Our own cookies make user accounts and other features possible. Third-party cookies are used to display relevant ads and to analyze how Renderosity is used. By using our site, you acknowledge that you have read and understood our Terms of Service, including our Cookie Policy and our Privacy Policy.
Hi All, I am an experienced scripter in MaxScript and MEL and now i am dabbling in Python. I know what I want to do. I have the DAZ african elephant and I want to build a walk designer for this quadraped. My first attempt is simply to translate the hip in the Z direction. So I want to record Z tran keys incrementing over time. I have some code here, that does not work. # My attempt to try to use python to animate a quadraped. scene = poser.Scene() theFigure = scene.Figure("Figure 1") theHip = theFigure.Actor("Hip") theAnimationSet = scene.CreateAnimSet("Animate Elephant") theAnimationSet.AddObjectRange(theHip,0,90) # Animate the hip forward. I thought you may have to add keys before you set them? AddKeyFrame(0) AddKeyFrame(14) AddKeyFrame(29) AddKeyFrame(44) AddKeyFrame(59) scene.SetFrame(0) theHip.SetParameter(poser.kParmCodeZTRAN, 0.0) scene.SetFrame(14) theHip.SetParameter(poser.kParmCodeZTRAN, 0.4) scene.SetFrame(29) theHip.SetParameter(poser.kParmCodeZTRAN, 0.8) scene.SetFrame(44) theHip.SetParameter(poser.kParmCodeZTRAN, 1.2) scene.SetFrame(59) theHip.SetParameter(poser.kParmCodeZTRAN, 1.6) # Redraw the scene scene.DrawAll() I'm wondering what I am doing wrong, am I close? The documentation is sketchy at best. Any reply is apreciated. Thanks! Enivob