hotknife
07-22-2009, 02:00 PM
I am writing a Modifier that stores positions and rotations of a selection of control objects.
The modifier uses Weak Referencing info(nicked from Paul's site thanks !) so it can reference itself and other spline controls than the modifier it instanced onto.
Positions are stored within the modifier in a Parameters array.
I have a listbox that stores the positions in and when doubleclcked sets the position of the controls and all others selected. Updates to the control object are done through the active controller.
myNodes[i].node.pos.controller[activeCon].value = tempPos[i]
with tempPos[i] being the array with the Point3 in it.
This works well for most of the controllers - but not all are updating in the viewport until I drag the timeslider or doubleclick the position twice, even though objects attached to them do move in the viewport.
Is there a way to force an update on controllers and their scripts ?
Or can anybody shed some light on why these objects may not be updating ?
I think a clue may be that some of the Nodes that the control splines are parented to also reference the control spline via their own controller scripts...So there are a lot of self-references being avoided through Weak referencing and using addNode in the script controllers...
The modifier uses Weak Referencing info(nicked from Paul's site thanks !) so it can reference itself and other spline controls than the modifier it instanced onto.
Positions are stored within the modifier in a Parameters array.
I have a listbox that stores the positions in and when doubleclcked sets the position of the controls and all others selected. Updates to the control object are done through the active controller.
myNodes[i].node.pos.controller[activeCon].value = tempPos[i]
with tempPos[i] being the array with the Point3 in it.
This works well for most of the controllers - but not all are updating in the viewport until I drag the timeslider or doubleclick the position twice, even though objects attached to them do move in the viewport.
Is there a way to force an update on controllers and their scripts ?
Or can anybody shed some light on why these objects may not be updating ?
I think a clue may be that some of the Nodes that the control splines are parented to also reference the control spline via their own controller scripts...So there are a lot of self-references being avoided through Weak referencing and using addNode in the script controllers...
