View Full Version : Using Expressions to fire Script Node - problem

12-16-2005, 02:06 PM
hiii ppl,

i was trying to do a switch lowRes and hiRes geo on my rig. in this connection i have 2 ques ,

1) low//hires >> firstly i added a CA on my placement_control > Switch_Resolution (enum - lowRes, hiRes)

then i have a script node called fireRes which is set to be "before" of the execute on > "open/close". in there i have a global proc fireRes() which has few lines to hide and unhide objs, checking for the Switch_Resolution atrrib on my placement_control.

then i added another attrib called temp (boolean ) on my placement_control. then i have an expression which says :

fireRes(); // this has to fire the script node

since i'm using direct DAG connections in the expression, i can get the exp to evaluate even when the time is not changing.

this all works fine.. untill i reopen maya and load this file.. and when i change the Switch_Resolution on the placement_control to lowRes or hiRes, the fireRES() function doesnt fire !

then if i scrub n then change this attribute, it works. i want to avoid this time-change based geo-switching in the first place.

then i created a custom node, parented under the placement_control. on this i have another CA, temp (boolean). Being a node, i connected its temp attrib to the placement_control's switch_res attrib. but this doesnt either work , when the file is reloaded after a fresh-start of maya.

is it the problem of my script node ? or the expression ? any ideas n solutions ? or is there any other way to do it simply, even if current time is not changing ? i know we can give layers, but this attribute is better..

2) layers >> i locked a layer using the lockNode command. now it doesnt allow me to rename or delete it from the outliner. fine. But when u right click on the layer name in the layer editor n say delete layer, this layer is gone ! but it also prints out saying locked nodes cannot be deleted .. if i do undo, also the layer doesnt reappear back. is this a know bug ? any ideas ?


12-16-2005, 02:18 PM
hi ppl,

i think i found a solution. but again with another problem ...

the solution is >> to unhide the temp attribute on my custom node! if the CA is hidden, is it immune to expressions ? the thing is , when i lock the attribute it works...

the problem >> when i select my placement control, in the inputs of my channel box, my customNode shows up with the temp attribute. now thats a serious problem.. as the animator might touch it....n probably delete it or break connections.. or what ever, there by breaking my purpose.

so is there a way to not to show the custom attribute in the channelbox but yet make it work ?


CGTalk Moderation
12-16-2005, 02:18 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.