Help: registerRedrawViewsCallback + mouse tool
so.. viewport isnt updating when i use this 2 commands together..
why?
here is one sample code
fn aaa = ( unregisterRedrawViewsCallback aaa test = text size:100 kerning:0 leading:0 isSelected:on text:"test" starttool foo ) tool foo ( on mousePoint clickno do #stop on freeMove do $.pos = worldPoint ) registerRedrawViewsCallback aaa
the script is clearly working. But for some reason i cannot see where i place the text in this example.
note that the code is only to emulate the error i'm getting.. i know doesnt make sence to register the callback only to unregister it..
i've tried using redrawViews(), completeRedraw(), forceCompleteRedraw.. with no luck
Comments
hey Anubis.. i dont
hey Anubis.. i dont understand what you are saying.. lol
i think im not very clear.... les see if i can clarify this with the same example
if i do simply this (below), the mouse tool will work properly and i will see the text moving until i place it
but if i do the "starttool foo" inside one registerRedrawViewsCallback function (op example) it will not work.. but i am doing the exact same thing.. except one is triggered by some event etc..
where is the event?
except one is triggered by some event etc...
and where is your event which will trigger the callback? this is what i mean ;)
my recent MAXScripts RSS (archive here)
something like this: fn aaa
something like this:
should work like this:
i run the script in one empty scene
then i start creating objects.. when i try to create the 5th object it runs the tool foo..
the script works like it should.. but i cannot see the text placemant like when i can see if i run the tool foo "outside" of the callback..
only updating the original
only updating the original example:
so i want the starttool foo to be executed when the objects.count == 5
tested it
Ok, i tested this and now i see.
Something weird going on with the Text object.
Looks like Max bug.
my recent MAXScripts RSS (archive here)
it looks like it "freezes"
it looks like it "freezes" the max viewport when a new object is created by some function called by the callback
anyway.. nothing to do with the mouse tool as i thought
i just find it weird that none of the redraw commands work.
thanks for the efort
redraw needs scene changes
your tool not do anything that needs redraw,
so the callback not fired
my recent MAXScripts RSS (archive here)