PDA

View Full Version : Script and CA's not updating, Not a dependsOn issue


alexodwyer1982
03-15-2005, 09:08 PM
I have checked for this so forgive me if it has already been discussed.

ok, so heres the deal. I am trying to make a simple control object which is constrained in x and y to the values of +50 through -50.

So i start by making a rectangle 100x100 units big. Within this is a smaller rectangle, the smaller one is linked to the bigger one. Finally i make a circle which the largest rectangle is linked to.

The circle is just to move and position the controller
The large rectangle is just a visual boundary
The smaller rectangle is the control itself.

I applied a CA to the circle to hold the script which will define the limits of the small rectangles movement. I add the follwing script:

dependsOn $TestControl_Ctrl.controller

in coordsys parent (if $TestControl_Ctrl.controller.pos.x <= -50 then
$TestControl_Ctrl.controller.pos.x = -50)


print $TestControl_Ctrl.controller.pos.x

now this all works except for on thing, the object isnt limited to -50, it only updates its position when i hit evaluate.

Now, whats more strange is that if i apply the script to the circles scale controller for instance the object is constrained in the viewport as i want.


I can only suspect that the script held in the custom attribute isnt being updated in the scene in realtime. Do i have to add a variable to the CA to make it work in the manner i expect.

CGTalk Moderation
03-15-2005, 09:08 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.