colorcurvature opened this issue on Oct 03, 2011 · 6 posts
colorcurvature posted Mon, 03 October 2011 at 1:48 AM
Is there any way to read/write joint data through python? I want to move the joint centers with a script. I saw something that looks like one could read weight maps, but not write, and for joints the text search didnt hit much in the manual :/.
Thanks!
PhilC posted Mon, 03 October 2011 at 3:19 AM
There is SetOrigin(x,y,z) and SetEndPoint(x,y,z)
Alternatively you could use Python to write and apply a pose file that will do the trick.
adp001 posted Mon, 03 October 2011 at 3:25 AM
parmX=actor.Parameter("xOffset") parmY=actor.Parameter("yOffset") parmZ=actor.Parameter("zOffset") parmX.SetValue(myNewValue) ...
colorcurvature posted Mon, 03 October 2011 at 3:32 AM
Aaaah super! Thanks so much.
And even one more question: Can one morph the core geometry? (Not make a morph target, but the .OBJ the figure refers to?)
So if you have a figure where all joint zones are converted to weight maps, then one could morph core geometry and joint centers on-the-fly to adapt shape and rig?
PhilC posted Mon, 03 October 2011 at 3:46 AM
You can set individual vertex locations with:
SetX(value)
SetY(value)
SetZ(value)
So yes you can.
If you are getting serious about creating Python scripts for Poser you may find this publication of interest.
colorcurvature posted Mon, 03 October 2011 at 3:56 AM
I was able to gather some python experience, thanks in any case Phil. What I already did was to make the posed-morph-loader, and now I think of exporting core .OBJ files with the joint centers contained in them as stand-alone-vertices so I can also just move them in an external modeller, and not having to worry about the joint-influence-zones. In my understanding the use of vert maps locks the influence values to the vertices, and thus one can move them around in a modeller, without destroying the rig entirely.
E.g. I wanted to "blend" a weight-mapped V4 to a weight-mapped M4 and see what happens. Genesis for the poor, so to say.
As scaling seems to have some odd effects on bending in general, I thought scaling could be replaced by morphing the core geometry along with move of joint centers and using weightmaps.