View Full Version : Dot.NET and Scene Explorer, question.
11-11-2010, 02:45 PM
The thing is that i don't know too much about .Net, so when i went to the help file looking for information on how to define advanced filters via maxscript i found some options i'm not sure how to use.
i use this:
function SE_PL= (
theFrm = dotNetObject "MaxCustomControls.SceneExplorerControls.SceneExplorerDialog"
thePtr = DotNetObject "System.IntPtr" (windows.getMAXHWND())
theHwnd = DotNetObject "MaxCustomControls.Win32HandleWrapper" thePtr
Which is the code that comes in the help file to open the scene explorer, now i want to define the filters but i don't know how to do that because i don't know how to use things like:
.AdvancedFilterDataSource : <System.String>
.AdvancedFilterEnabled : <System.Boolean>
.AdvancedFilterLocation : <System.Drawing.Point>
.AdvancedFilterMatchAll : <System.Boolean>
.AdvancedFilterSize : <System.Drawing.Size>
In the end i don't know how to set filters, so some help is very much appreciated, thanks to all :)
11-11-2010, 03:11 PM
If you just want to add a custom filter you should use SceneExplorerManager.AddProperty().
11-11-2010, 03:38 PM
Nope, these are object property filters (columns in the end), what i mean is an Advanced Filter, so what i want to do is to tell teh Scene Explorer to show me just the objects that are in a specific layer, i can do that manually without any problem, but i don't know how to program this in maxscript because i don't fully understand how .Net works.
But thanks for the answer :)
11-11-2010, 05:01 PM
It seems it's only possible to add custom node filters with C# or VB.NET. I explain.
To load a custom node filter there is the function AdvancedFilter.LoadState(ExplorerCustomizationState). But it's protected...
You can create a new AdvancedFilter for a given SceneExplorer using RichSceneExplorerControl.CreateAdvancedFilter() but it's also protected...
To be able to call these methods you have to override the AdvancedFilter class or RichSceneExplorerControl class. It's a lot of work.
Also I can't find the AdvancedFilter instance of the SceneExplorer. That should be really interesting in order to know how to format the AdvancedFilterDataSource property. I think it's the query you build using the Avanced Filter dialog.
You can try to contact Christopher Diggins (3ds Max Dev blog on the Area) or David Cunningham (Software Developer at Autodesk, develop 3ds Max .Net features). They can help you more on that subject.
11-11-2010, 09:27 PM
Thanks Ypuech, i'll try contacting these people :)
11-11-2010, 09:27 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.