Notifications
Clear all

[Closed] subrollout scope problem

I’ve written a macro script and it works fine , but doesn’t work in a new max session
but if i run the following code separately , it works like a charm


 
 	rollout hjMCMainRollout "xxx"
 	( 
 			subrollout hjMCLeftSubRollout "xxx"
 			subrollout hjMCRightSubRollout "xxx"
 	) 
 	
 

i know this is a scope problem , for rollout , i can do global hjMCMainRollout on top of my macroscript. the rollout will be global

but how do i make a subrollout “global” declaration ?

edit: i solved the problem by a workaround. It’s because a function i used in hjMCMainRollout referenced hjMCRightSubRollout. And after i stip out line,everything works