Forum: Poser - OFFICIAL


Subject: ERC in main figure to control child-figures?

muralist opened this issue on Nov 27, 2009 · 7 posts


muralist posted Fri, 27 November 2009 at 1:33 PM

I have a figure of a train car.  I also have child-figures of individual compartments in it.  You can load high-poly or low-poly rooms to the main car figure.  Each room is set up so you can open the windows and door. 

I want to write ERC code for the main train car so that you can load the main car, load the compartments, and then selecting the BODY of the main car, control all doors and windows in compartments. 

Can anyone point me to example code or forum discussions of this?


ockham posted Fri, 27 November 2009 at 2:18 PM

It's dubious.  I tried to make this work with a Headlights figure parented to a Car figure,
and at times it did seem to work but I couldn't repeat it.  (Or I could have been deluding
myself, which is always Possibility #1 in a situation like this!)

The times when it seemed to work, I had this code in the child's LightsOn parm:

        valueParm LightsOn
            {
            name LightsOn
            initValue 0
            hidden 0
            forceLimits 1
            min 0
            max 1
            trackingScale 1
            keys
                {
                static  0
                k  0  0
                }
            interpStyleLocked 0
            valueOpDeltaAdd
                ElectricCar
                BODY
                Lamps
            deltaAddDelta 1.0
            }

Note that the specific name of the parent figure is in the ERC, not just "Figure 1".

You could try something like this and see what happens.

FWIW, this sort of control definitely does work with a smart-prop as opposed to a child figure.

My python page
My ShareCG freebies


muralist posted Fri, 27 November 2009 at 2:32 PM

Thanks, Ockham.  I'll test it.


ockham posted Fri, 27 November 2009 at 4:43 PM

Remembering a bit more:  You might experiment with parenting the child figure
to different parts of the main.   For instance, parent the child's body to the Frame
of the main instead of the BODY of the main; and put the master control
on the Frame as well.

My python page
My ShareCG freebies


markschum posted Fri, 27 November 2009 at 5:23 PM

The BIG problem is retaining the :x number part that defines which part you are addressing.

You might try geometry switching and make it one figure.


muralist posted Fri, 27 November 2009 at 5:31 PM

What do you mean about geom switching?


muralist posted Fri, 27 November 2009 at 5:32 PM

I got it to work for an instant, though it was weird:   turning the dial to the max setting suddeenly made the door jump fully open rather than the smooth transition as before, but it worked.