externe
09-30-2004, 06:04 PM
Hello all :)
Well I just learn a few on registerRedrawViewsCallback / unRegisterRedrawViewsCallback.
It's really cool !
But I have a little pb
I explain :
If I restart MAX then evaluate this script :
fn func1 =
(
print "redraw1"
)
registerRedrawViewsCallback func1
unRegisterRedrawViewsCallback func1
Nothing happen... and it's logic, because I register then unregister :)
Well, now if i evaluate this script :
fn func1 =
(
print "redraw1"
)
registerRedrawViewsCallback func1
--unRegisterRedrawViewsCallback func1
Something happen (print "redraw1") when the viewport need refresh, because I register...
But now, if I re-evaluate the first script or simply the script :
unRegisterRedrawViewsCallback func1
The redraw callback is always execute.
So, how disable it completly ?
And if itsn't possible, how to prevent this, with a boolean value like isRedraw = true ?
Thanks
:)
Well I just learn a few on registerRedrawViewsCallback / unRegisterRedrawViewsCallback.
It's really cool !
But I have a little pb
I explain :
If I restart MAX then evaluate this script :
fn func1 =
(
print "redraw1"
)
registerRedrawViewsCallback func1
unRegisterRedrawViewsCallback func1
Nothing happen... and it's logic, because I register then unregister :)
Well, now if i evaluate this script :
fn func1 =
(
print "redraw1"
)
registerRedrawViewsCallback func1
--unRegisterRedrawViewsCallback func1
Something happen (print "redraw1") when the viewport need refresh, because I register...
But now, if I re-evaluate the first script or simply the script :
unRegisterRedrawViewsCallback func1
The redraw callback is always execute.
So, how disable it completly ?
And if itsn't possible, how to prevent this, with a boolean value like isRedraw = true ?
Thanks
:)
