Well, that's too bad :/ Le 20 oct. 2014 14:17, "Luc-Eric Rousseau" <[email protected]> a écrit :
> it's more complicated than a while loop.. you have to pump OS messages > for the tool to work and the user be able to click on stuff and the > viewport to redraw. > You also need to prevent re-entrency (i.e preventing launching a new > command while current command is still running) which would > destabilize XSI. > the pick session does all of that, it's non-trivial. > > I'd recommend avoiding all of this and instead have a way to register > a callback to be called when your tool is finished. > > On Mon, Oct 20, 2014 at 1:58 PM, Ahmidou Lyazidi <[email protected]> > wrote: > > I see... > > A message is just a while loop waiting to get the instruction to stop, > > right? > > So if I wrap the tool into a command the will wait for a plugin.Userdata > to > > be valid and return it it should work I guess. Any thing against that? > > > > Thanks > > > > Le 20 oct. 2014 11:45, "Luc-Eric Rousseau" <[email protected]> a > écrit : > > > >> right, it's not possible because you'd have to run your own message > >> loop like pickelement does, and there is nothing for that in the SDK. > >> > >> On Mon, Oct 20, 2014 at 11:34 AM, Ahmidou Lyazidi < > [email protected]> > >> wrote: > >> > I'm not sure yet it's going to work, I'm trying to replicate a picking > >> > cession as the factory one, but when you pick an object it's opening a > >> > contextual menu, and return a string depending of the choosed item in > >> > the > >> > menu. > >> > Unfortunately calling a custom tool is a non blocking command, the > rest > >> > of > >> > your code will continue to evaluate :( > >

