Forum Coordinators: RedPhantom
Poser - OFFICIAL F.A.Q (Last Updated: 2024 Dec 02 5:01 am)
My python page
My ShareCG freebies
My python page
My ShareCG freebies
Yes it doesn't loose it's centerpoint, but it snaps to whatever the centerpoint is of the figure you are parenting it too. You can always move it's centerpoint after you've parented it but I thought there would be a way so you don't have to do that. At least this snapping happens for me, maybe because I tick inherit bends? I have to have that ticked though.
There is a hidden "realign" choice in parenting, which is only available through Python. To try it out, here's a SUPER-SIMPLE and hard-wired script. I haven't found that it makes any difference, but it might be what you want. import poser scene=poser.Scene() Parent=scene.Actor("ball_1") Child=scene.Actor("box_1") Child.SetParent(Parent,0,0) To try it with your real stuff, just fill in the actual names of actors in the quoted parts. The second zero in SetParent(Parent,0,0) is what turns off the "realign" option.
My python page
My ShareCG freebies
If this does what you want, tell me and I'll make a nicer script with listboxes for child and parent. (I have templates for this sort of stuff, so I can run it up in a few minutes.)
My python page
My ShareCG freebies
Assuming your child thing is a free-standing prop named "whatever", this should do it...... import poser scene=poser.Scene() TheFig=scene.Figure("BASE") Parent=TheFig.ActorByInternalName("lFoot") Child=scene.Actor("whatever") Child.SetParent(Parent,0,0)
My python page
My ShareCG freebies
That seems to have done it:) The centerpoint didn't move and it's now parented. However is it possible to also specify in the script that the prop inherits bends, like in the Poser parenting pop up? One last question:) I understand that in a pose file you can tell it to load whatever you want, even a python script. Would it be possible to have a pose file that just loads this prop(perhaps also using python) and uses just those lines of script you wrote to parent it to the figure?
Sure. The first zero is for Inherit. If you write SetParent(Child,1,0) you'll get InheritBends=On and Realign=Off. On the pose file: I'll have to think about that. The "startup script" works in a CR2, but I haven't found how to make it work in a PZ2. It may or may not be possible. Stewer probably knows the answer to this one.
My python page
My ShareCG freebies
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.
I found out then when you parent a prop to a figures bodypart, the props centerpoint changes to whatever the centerpoint is for the figures bodypart. Is there a way to avoid this? Perhaps with a pythonscript that changes the props centerpoint back to what is was before it was parented?