Re: exit from a CustomTool
I am not quiet sure that i understand you right. Did you mean right a delay timer or use events ? The friend of mine suggest EventTimers. Register additional event with a timer in it. But it was in a context of a slightly different topic. Let's assume that we receive KeyUp callback, what a timer should do ? -- Softimage Mailing List. To unsubscribe, send a mail to softimage-requ...@listproc.autodesk.com with "unsubscribe" in the subject, and reply to confirm.
RE: exit from a CustomTool
Ok, then I would suggest looking into using a timer to run your previous script after the key up callback returns. -- Brent From: softimage-boun...@listproc.autodesk.com [mailto:softimage-boun...@listproc.autodesk.com] On Behalf Of Andrew Prostrelov Sent: 02 June 2016 22:29 To: softimage@listproc.autodesk.com Subject: Re: exit from a CustomTool I tryed to use ExitTool in KeyUp callback it didn't work CustomTool_KeyUp(ToolContext& in_ctxt) { in_ctxt.ExitTool(); } the same in Draw() callback CustomTool_Draw(ToolContext& in_ctxt) { in_ctxt.ExitTool(); } The only callback it works for me is MouseUp(). And sine i want quit tool on keyboard shortcut release - i can't use Mouse callbacks. <>-- Softimage Mailing List. To unsubscribe, send a mail to softimage-requ...@listproc.autodesk.com with "unsubscribe" in the subject, and reply to confirm.
Re: exit from a CustomTool
I tryed to use ExitTool in KeyUp callback it didn't work CustomTool_KeyUp(ToolContext& in_ctxt) { in_ctxt.ExitTool(); } the same in Draw() callback CustomTool_Draw(ToolContext& in_ctxt) { in_ctxt.ExitTool(); } The only callback it works for me is MouseUp(). And sine i want quit tool on keyboard shortcut release - i can't use Mouse callbacks. -- Softimage Mailing List. To unsubscribe, send a mail to softimage-requ...@listproc.autodesk.com with "unsubscribe" in the subject, and reply to confirm.
RE: exit from a CustomTool
Hi Andrew, Have you tried calling the ExitTool method on the ToolContext that was passed to you? http://download.autodesk.com/global/docs/softimage2014/en_us/sdkguide/index.html?url=si_cpp/classXSI_1_1ToolContext.html,topicNumber=si_cpp_classXSI_1_1ToolContext_htmldccb5d73-183f-47c7-9bd8-bf02334bf002,hash=a05b0c9c75ce2ceb2deec6c4d8f2632d1 -- Brent From: softimage-boun...@listproc.autodesk.com [mailto:softimage-boun...@listproc.autodesk.com] On Behalf Of Andrew Prostrelov Sent: 02 June 2016 13:57 To: softimage@listproc.autodesk.com Subject: exit from a CustomTool Hi. I suppose this one is a simple question but so far i can't handle it: how should i exit from CustomTool registered by my XSI plugin ? I want exit from my tool after shortcut CTRL+Z was released. // So i register this shortcut ... CustomTool_Activate(ToolContext& in_ctxt) { in_ctxt.RegisterShortcutKey( 0x5A, L"myKey", siCtrlMask /* ctrl */, true /*repeatable*/ ); } // ... and try to change tools (since in_ctxt.ExitTool() works only in Mouse and Menu callbacks) to exit from my tool CStatus KeyUp( ToolContext& in_ctxt ) { if((ULONG) in_ctxt.GetShortcutKey() == 0x5A) { Application().ExecuteScriptCode(L"Application.ActivateSelectTool()", L"Python" );// mimic exit from tool } return CStatus::OK; } But this way XSI crashes when tools are changed. And i can't understand why. On other hand there are no problems if i switch to SelectTool in XSI (not inside plugin code). This tool is a dummy so, no additional pointers in user data etc that can crash it. <>-- Softimage Mailing List. To unsubscribe, send a mail to softimage-requ...@listproc.autodesk.com with "unsubscribe" in the subject, and reply to confirm.
Re: Color from particles to Legolizer?
Hi Ed, Great compund :) I will try those and see what I get. //Morten > Den 2. juni 2016 klokken 12:38 skrev Ed Schiffer: > > > Hi Morten > > thanks for using my compound :) > as a guess, I'd go with Get Closest Locations and Switch Context nodes, but > I always get confused with context as well. > > wish you luck. > cheers > > On Wed, 1 Jun 2016 at 15:27 Morten Bartholdy wrote: > > > Hmm, I forgot to actually ask if someone has an idea regarding how to grab > > these colors or more specifically how to hook them into the legolizer > > compounds. > > > > //MB > > > > > > > > > Den 1. juni 2016 klokken 15:08 skrev Morten Bartholdy < > > x...@colorshopvfx.dk>: > > > > > > > > > I am playing with Ed Shiffers and Giuliu Toninis fine Legolizer > > compounds and ran into a snag. I would like to get colors for my Legolizer > > Lego bricks either from a particle pointcloud or from voxels from a fluid > > simulation so I can make nice Lego explosions with it. I have yet to figure > > out how to do this as I run into context mismatch issues. > > > > > > Thanks! > > > > > > //Morten > > > -- > > > Softimage Mailing List. > > > To unsubscribe, send a mail to softimage-requ...@listproc.autodesk.com > > with "unsubscribe" in the subject, and reply to confirm. > > -- > > Softimage Mailing List. > > To unsubscribe, send a mail to softimage-requ...@listproc.autodesk.com > > with "unsubscribe" in the subject, and reply to confirm. > > > -- > Softimage Mailing List. > To unsubscribe, send a mail to softimage-requ...@listproc.autodesk.com with > "unsubscribe" in the subject, and reply to confirm. -- Softimage Mailing List. To unsubscribe, send a mail to softimage-requ...@listproc.autodesk.com with "unsubscribe" in the subject, and reply to confirm.
Re: exit from a CustomTool
Or maybe i can somehow force run one of a CustomTool callbacks ? It would be handy too. 2016-06-02 15:57 GMT+03:00 Andrew Prostrelov: > Hi. > I suppose this one is a simple question but so far i can't handle it: > how should i exit from CustomTool registered by my XSI plugin ? > > I want exit from my tool after shortcut CTRL+Z was released. > // So i register this shortcut ... > CustomTool_Activate(ToolContext& in_ctxt) > { > in_ctxt.RegisterShortcutKey( 0x5A, L"myKey", siCtrlMask /* ctrl > */, true /*repeatable*/ ); > } > > // ... and try to change tools (since in_ctxt.ExitTool() works only in > Mouse and Menu callbacks) to exit from my tool > CStatus KeyUp( ToolContext& in_ctxt ) > { > if((ULONG) in_ctxt.GetShortcutKey() == 0x5A) > { > > Application().ExecuteScriptCode(L"Application.ActivateSelectTool()", > L"Python" );// mimic exit from tool > } > return CStatus::OK; > } > > But this way XSI crashes when tools are changed. And i can't understand > why. > On other hand there are no problems if i switch to SelectTool in XSI (not > inside plugin code). > This tool is a dummy so, no additional pointers in user data etc that can > crash it. > -- Softimage Mailing List. To unsubscribe, send a mail to softimage-requ...@listproc.autodesk.com with "unsubscribe" in the subject, and reply to confirm.
exit from a CustomTool
Hi. I suppose this one is a simple question but so far i can't handle it: how should i exit from CustomTool registered by my XSI plugin ? I want exit from my tool after shortcut CTRL+Z was released. // So i register this shortcut ... CustomTool_Activate(ToolContext& in_ctxt) { in_ctxt.RegisterShortcutKey( 0x5A, L"myKey", siCtrlMask /* ctrl */, true /*repeatable*/ ); } // ... and try to change tools (since in_ctxt.ExitTool() works only in Mouse and Menu callbacks) to exit from my tool CStatus KeyUp( ToolContext& in_ctxt ) { if((ULONG) in_ctxt.GetShortcutKey() == 0x5A) { Application().ExecuteScriptCode(L"Application.ActivateSelectTool()", L"Python" );// mimic exit from tool } return CStatus::OK; } But this way XSI crashes when tools are changed. And i can't understand why. On other hand there are no problems if i switch to SelectTool in XSI (not inside plugin code). This tool is a dummy so, no additional pointers in user data etc that can crash it. -- Softimage Mailing List. To unsubscribe, send a mail to softimage-requ...@listproc.autodesk.com with "unsubscribe" in the subject, and reply to confirm.
Re: Color from particles to Legolizer?
Hi Morten thanks for using my compound :) as a guess, I'd go with Get Closest Locations and Switch Context nodes, but I always get confused with context as well. wish you luck. cheers On Wed, 1 Jun 2016 at 15:27 Morten Bartholdywrote: > Hmm, I forgot to actually ask if someone has an idea regarding how to grab > these colors or more specifically how to hook them into the legolizer > compounds. > > //MB > > > > > Den 1. juni 2016 klokken 15:08 skrev Morten Bartholdy < > x...@colorshopvfx.dk>: > > > > > > I am playing with Ed Shiffers and Giuliu Toninis fine Legolizer > compounds and ran into a snag. I would like to get colors for my Legolizer > Lego bricks either from a particle pointcloud or from voxels from a fluid > simulation so I can make nice Lego explosions with it. I have yet to figure > out how to do this as I run into context mismatch issues. > > > > Thanks! > > > > //Morten > > -- > > Softimage Mailing List. > > To unsubscribe, send a mail to softimage-requ...@listproc.autodesk.com > with "unsubscribe" in the subject, and reply to confirm. > -- > Softimage Mailing List. > To unsubscribe, send a mail to softimage-requ...@listproc.autodesk.com > with "unsubscribe" in the subject, and reply to confirm. > -- Softimage Mailing List. To unsubscribe, send a mail to softimage-requ...@listproc.autodesk.com with "unsubscribe" in the subject, and reply to confirm.