lsangls opened this issue on Oct 03, 2008 · 10 posts
lsangls posted Fri, 03 October 2008 at 5:52 PM
I'm using Poser Pro. When I run Ockham's Python script bvhMixer and try to load a bvh file, I click on the Pick File button and get the error message above. I am a new one and lost as to what this message is telling me.
Seems to be saying it can't locate my bvh files.
Is there a tutorial or previous post someone could direct me to that might help me with this?
Do I need to edit the script to direct it to my bvh files folder?
Or is there a specific folder I need to create to load my bvh files into?
Am trying to use bvh Mixer to use Drop to Floor for all frames in the bvh animation.
I've learned a great deal from all of your forum posts, but obviously have quite a bit still to learn. Any help will be greatly appreciated.
Thanks in advance.
ockham posted Fri, 03 October 2008 at 6:34 PM
I don't have Poser Pro, so I can't test....
I think, though, that PP uses a new version of TKinter which handles
the "initialfile" option differently. Try eliminating the initialfiles bit.
In other words,
Change line 252 in the PY file from
fn=tkFileDialog.askopenfilename(initialfile=MyPath, filetypes=[("BVH files", "*.BVH *.bvh")] )
to
fn=tkFileDialog.askopenfilename(filetypes=[("BVH files", "*.BVH *.bvh")] )
I've italicized the part to remove in the original line.
lsangls posted Fri, 03 October 2008 at 6:40 PM
The idea of changing a line in one of your scripts is making my palms sweat...but here goes.
I will do my best and report back. And thanks.
lsangls posted Fri, 03 October 2008 at 6:57 PM
But when I clicked on Go the above message appeared.
Any ideas?
ockham posted Fri, 03 October 2008 at 9:43 PM
The attached file is a revised version that may fix the problem ...
I made the initialfile fix above, and also eliminated the FakeFrames trick.
The FakeFrames action isn't strictly necessary; it was a way to automatically
set Poser's timeline for enough frames to hold the BVH.
Without it, you'll have to know in advance how many frames your BVH needs,
and set Poser's frame count manually before running the script.
Download the attachment, rename it to something like BVHMixer2.py,
and try it out.
lsangls posted Sat, 04 October 2008 at 5:55 AM
Does it help clarify what's going on?
Without Poser Pro to refer to, it must be frustrating and annoying for you to be bothered with this. Thanks for "flying blind" and trying to help.
Best regards.
ockham posted Sat, 04 October 2008 at 10:13 AM
I've put in an exception-handler in the attached script.
I don't know if this will solve the error or just make the script do nothing at all!
ockham posted Sat, 04 October 2008 at 10:18 AM
Incidentally, if the drop to floor is the only reason you need this script,
there's a simpler way to do that.
import poser
scene=poser.Scene()
for f in range(scene.NumFrames()):
scene.SetFrame(f)
scene.CurrentFigure().DropToFloor()
lsangls posted Sat, 04 October 2008 at 11:55 AM
Regarding bvhmixer3, the script ran and reported processing over 5,000 frames although there are only 75 frames in the bvh. The script stopped processing frames on its own accord just above 5,000. No error message appeared.
When I played the animation only certain body parts moved, though. For example, the hips down remained in the stationary zero position. However, the Figure was positioned correctly at floor level throughout.
The really exciting news is that I typed out the DropToFloor Python script as per your instructions AND IT WORKED!
The Figure Dropped to Floor throughout the entire range of 75 frames in the bvh and the animation played perfectly.
And I am giddy with a sense of accomplishment.
This little script is going to save me (and others) hours and hours of time.
Thanks, Ockham.
ockham posted Sat, 04 October 2008 at 1:16 PM
It's pretty clear that the Python version of PoserPro doesn't agree with
my coding! Some of those errors are truly strange.