Sat, Nov 9, 6:52 AM CST

Renderosity Forums / Poser - OFFICIAL



Welcome to the Poser - OFFICIAL Forum

Forum Coordinators: RedPhantom

Poser - OFFICIAL F.A.Q (Last Updated: 2024 Nov 08 10:28 pm)



Subject: pro 2010 Python problem..


cortic ( ) posted Sat, 30 July 2011 at 8:40 AM · edited Sat, 09 November 2024 at 6:42 AM

Hi all,

          A while ago, can't find the thread now, i got some help adding a very simple Python script to jump frames while animating, went like this:

import poser
scene=poser.Scene()
scene.SetFrame(scene.Frame() + 30)

 

Worked fine in Poser 7, but i've finaly got myself Poser Pro 2010 and while its making the arrowhead on the time line jump, the frame number isnt changing.  Anyone know what i'm doing wrong?

 

thanks.


LaurieA ( ) posted Sat, 30 July 2011 at 8:46 AM · edited Sat, 30 July 2011 at 8:46 AM

Some scripts made for Poser 7 and below won't work in Poser8/2010 since those use wxPython (I'm led to believe). Beyond that I can't help, but we do have some script gurus that will most likely  help ya out ;).

Laurie



millighost ( ) posted Sat, 30 July 2011 at 9:02 AM · edited Sat, 30 July 2011 at 9:06 AM

Quote - Hi all,

          A while ago, can't find the thread now, i got some help adding a very simple Python script to jump frames while animating, went like this:

import poser
scene=poser.Scene()
scene.SetFrame(scene.Frame() + 30)

 

Worked fine in Poser 7, but i've finaly got myself Poser Pro 2010 and while its making the arrowhead on the time line jump, the frame number isnt changing.  Anyone know what i'm doing wrong?

 

thanks.

 It works exactly like that. Could it be that your animation is only 30 frames long? In which case the last frame is numbered 29 (they start at 0), and your python would not work.

 EDIT: Ah, i see what you mean; right it does not update the counter, hm, never notices this ...

 


millighost ( ) posted Sat, 30 July 2011 at 9:19 AM

The easiest solution would be to call scene.DrawAll () after you have made your changes. That will not only update the counter, but the objects, too. Modifications your script does are however applied to the correct frame.


cortic ( ) posted Sat, 30 July 2011 at 10:00 AM

tried it, scene.DrawAll () doesnt change the frame at number... any other ideas?


mackis3D ( ) posted Sat, 30 July 2011 at 10:29 AM · edited Sat, 30 July 2011 at 10:31 AM

Where is Poser located? I'm asking because I had different Python problems than you had. But the solution was: it had to be in C:ProgramsSmith MicroPoser Pro 2010 

When it was in C:ProgramsPoser Pro 2010  I experienced a few Python problems, not with every Python script but with some of them and they worked before in Poser 7 without any problems.

You don't need a new installation for it, just move it.


cortic ( ) posted Sat, 30 July 2011 at 11:33 AM

its in C:Program FilesSmith MicroPoser Pro 2010 its the 64 bit version i'm using if that makes a difference (i'm on xp 64 bit)..


cortic ( ) posted Sat, 30 July 2011 at 1:44 PM

hmm, seems to work ok if i have 'edit keyframes' window open. 

 

on an unrelated note, can somone tell me the python code to add key frames to everything as is in current frame? 


mackis3D ( ) posted Sat, 30 July 2011 at 3:24 PM

Quote - its in C:Program FilesSmith MicroPoser Pro 2010 its the 64 bit version i'm using if that makes a difference (i'm on xp 64 bit)..

I'm also on 64 bit but I had the problem when I started with Windows 7, I should have mentioned that. And I forgot that it is called Program Files because I have the German language version (where it is Programme and I translated it to Programs...)  :-)


cortic ( ) posted Sun, 31 July 2011 at 5:40 AM

there's no way i can keep the edit keyframes window open, I've tried docking it everywhere i can think of, if i could re-design the window i could but as is there is just not enough space for the document window and the edit keyframes at the same time while animating..

 

anyone think of any other workarounds to make scene.SetFrame(scene.Frame() + 30) work?


millighost ( ) posted Sun, 31 July 2011 at 5:49 PM

Quote - ... anyone think of any other workarounds to make scene.SetFrame(scene.Frame() + 30) work?

Hm, you could try this method, which does not directly solve the problem, but can work around it (worked for me). It is based on putting the animation palette in it's own (non-dockable window):

1 open the animation palette.
2 create a frame and transfer the animation palette to the frame and execute this (add imports as needed):

am = poser.WxAuiManager ()
animation_pane = am.GetPane ("AnimationPalette")
frm = wx.Frame (am.GetManagedWindow (), size = (200, 200))
frm.Show ()
animation_pane.Reparent (frm)

at this point the aui-pane should be dead (no content), reset the window:

animation_pane.Window (None)

Now you should be left with the animation palette in a normal (top-level) window, that you can minimize. When you check the "Animation Palette" from Poser's "Window" menu, it might crash.

 


markschum ( ) posted Sun, 31 July 2011 at 9:20 PM

Iwould try setting a variable and then do the SetFrame(x) command

x = scene.Frame() + 30

scene.SetFrame(x)

I would wonder why you dont just type in the frame number you want directly. In poser 5 and 7 it seems easier than running a script.

 


cortic ( ) posted Mon, 01 August 2011 at 8:49 AM · edited Mon, 01 August 2011 at 8:50 AM

markschim - setting a variable doesn't work, still not changing the frame.  as to why, I'm not so good at math, so i set multiple jumps and just pick one depending on the action that's happening in the animation. it makes things go much faster and smoother.

millighost - not ideal, but probably the best option yet.. I can't believe there is no way to change the frame from python in pro 2010, if it wasn't for the render times I'd prob go back to P7..

 


Dizzi ( ) posted Mon, 01 August 2011 at 1:30 PM

scene=poser.Scene() scene.SetFrame(scene.Frame()+1) scene.DrawAll()

Works just fine for me. It just doesn't update the frame number in the UI, but it changes the frame.



cortic ( ) posted Mon, 01 August 2011 at 1:55 PM

updating the frame number in the UI is what this thread is about, otherwise I feel like I'm animating in the dark.. no one has actually said it can't be done yet, but I'm beginning to suspect it can't.  maybe a bug that will be fixed in future update...


ratscloset ( ) posted Mon, 01 August 2011 at 2:12 PM

I have not tried this specifically as of yet, but there were some cases where the Counter in one window was not updated when modified in another Window. I suspect if you return the focus to the window that is not behaving properly, that it will update the display. In reality, the frames are advancing, just one counter is not reflecting the change.

If you can, please provide details in a report to Support so we can make sure the issue is reported. If you want, send me a Site Mail letting me know the incident number so I can make sure it gets reported. You can put Attn: John in the subject as well.

ratscloset
aka John


Dizzi ( ) posted Mon, 01 August 2011 at 2:13 PM

You can put a 

poser.ProcessCommand(1176)

before and after the SetFrame so the Animation Palette opens and closes ;-)

The other options you have:

  1. Report the bug to smith micro

  2. Display the current frame with another script in the UI 

 



cortic ( ) posted Mon, 01 August 2011 at 2:57 PM · edited Mon, 01 August 2011 at 2:58 PM

Dizzi, that's a good workaround.. hope it doesn't crash poser with the anim palette opening a closing like that, from my point of view its just a flicker and something I could live with..

**
**


Privacy Notice

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.