[Closed] how can I add combo box to the scene explorer?
I hope someone would know the answer to my question:
I wrote a script that opens a new scene explorer (SceneExplorerManager.OpenExplorer) and add some new properties to the list of objects (SceneExplorerManager.addProperty) now I want to allow the user to choose values (for the new properties) from a drop down list (meaning to limit the values the user can enter)
You can’t add UI components to Scene Explorer, so no buttons, checkboxes, combo boxes etc. Basically what can be returned to the Listener is all you can add/modify through maxscript and Scene Explorer.
-Eric
You can still limit the allowed values – you’ll have to check the values in the callback function and write out an error message with the allowed options if the input value is ‘invalid’. But, as PiX mentioned, no custom UI options, sadly.
Somebody around here was working on a more powerful version of scene explorer as a (free) third party solution, but I think that may have been fridged.
thank you for your replies Zeboxx and Pixel
checking the values before enter is a kind of solution, although not the most convenient to the user. do you think I can somehow catch the event before the “Set” function and let the user choose the values from a drop down list (on a rollout) or use pop up menu (rcmenu)?
I can think of several other methods, but they all require handling event that rise on the scene explorer dialog, is it possible?? or is mxs only let you handle events that rise in a rollout you have created?
well the scene explorer will call your function, if specified, to do any of the actual value getting/setting – so if the user enters something incorrect you can certainly pop up a dialog at that point and let them pick a valid option.
There’s no way easy to trap for the user, say, clicking on a cell to change it -before- they actually change it.
As far as popping up a dialog when scene explorer opens goes – have a peek at dialogMonitorOps ; bit iffy, though, as it would have to run in the background at all time (unless you force users to go through your own interface(s) to open scene explorerer) and dialogMonitorOps has issues with e.g. the main menu bar.
Not sure what good that would do, though, other than offering the user a dialog which shows the allowed values? There’s no way to get the current selected item, for example (near’s I know).
Correct, there is no way to get the current selection or even an array of currently selected items. At one time I planned to create a Layers Column where changing the name would assign the object to that layer, or create a new layer with that name. Unfortunately this was defeated by the fact that there is no way to know what is selected, so there is no way to loop through that data.
-Eric
well the scene explorer will call your function, if specified, to do any of the actual value getting/setting – so if the user enters something incorrect you can certainly pop up a dialog at that point and let them pick a valid option.
well that’s kind of a solution I can live with, thank you both!