Max 9 Selection Sets Errata

Become a member of the CGSociety

Connect, Share, and Learn with our Large Growing CG Art Community. It's Free!

THREAD CLOSED
 
Thread Tools Search this Thread Display Modes
  10 October 2006
Max 9 Selection Sets Errata

Hi all

I helped work on the overhaul of selection sets for Max 9, and I wanted to head off any questions here:

Question: Selection sets are different from Max 8? what's changed?

Answer: Microsoft has decided to NOT port their common activeX controls to 64 bit. The selection set macro used a microsoft 32 bit treeview control that would not work in Max 64 bit. (i.e. 32 bit dll's can not be called in a 64 bit process, or something more technical along those lines). Therefore the activeX control had to be replaced. It was felt that a .NET control would be used. Therefore the activeX control was ripped out and replaced with a .NET control.

Question: Where any other scripsts effected?

Answer: Yes. A few other scripts were also affected, including the RTT macroscript (for instance). Mostly it was old features that were changed.

Question: So what else changed in the Selection Sets script?

Answer:
A few things. The activeX tree control and the .NET tree control are somewhat similar, yet somewhat different. Therefore some external behavior was different in this new incarnation....

For instance:

ActiveX: Double clicking on a tree node would NOT expand or collapse the tree hierarchy.
.NET: Double clicking on a tree node WOULD expand or collpase the tree hierarchy. This was found to be highly highly annoying.... And while the .NET tree control offered tons more features than it's activeX cousin, we couldn't find a way to turn this behavior off. :(

result:
For Max9, you simply click instead of double clicking tree nodes to selection scene objects. Now we realize this may highly annoy some people too, in which case I have an alternative: The attached script does away from selecting scene objects when you select a tree node. Instead it selects scene objects only when you press control and then click.

Question: Anything other bugs with Selection Sets.

Answer: Yes, but very minor: I had changed the script to make it a dockable tool bar. However while investigating another bug, the code to register the dialog as a dockable toolbar was commented out. As a result, the dialog won't dock unless you remove the two dash characters '--' at the beginning of line 648. Once again it was only discovered after the code was locked. Also because the dialog was NOT registered as a toolbar, it wanked the placement of some of the controls, so the right margin is 5 or 10 pixels too wide. Another manifestation of this bug is that if you close max while the selection dialog is open, you will get a maxscript exception.... Once again, the attached script fixes both problems.

Question: Any other bugs?

Answer: There are definitely differences between the activeX and .NET controls that could not be overcome now. So if you do find any, please log it: That's the fastest way for a bug to land on my desk....

Question: Any enhancements to this script?

Answer: Yes lots. In overhauling this, I exposed a bunch of Selections sets callbacks to maxscript: for instance for when a selectionset is created, deleted, and renamed. Also selectionsets can now be renamed via the .name property. Previously the only way to 'rename' a selectionset was to destory the old one and create a new one.

Also I tried to optimize the code so it would be faster. I'm seen a case in max 8 where opening the selection set dialog in a scene with 10,800 objects and containing about 10 selection sets would take many minutes (Or it would just stall). This new version took about 2 to 3 seconds to open... (don't quote me on that, my machine is super fast, so your mileage may vary).

Question: Does this mean the we can use other .NET controls in our scripts now?

Answer: Yes. And not only that, but the rest of the .NET framework. (The biggest feature in Max 9 in my opinion that never made it to the marketing channels... go figure). The implications for this are enormous, so I will have to defer information on that to another thread.

Question: How do I install your script?

Answer: Place the attached script in your <3dsmax>/ui/macroscripts/ folder and overwrite the old one.

Chris Johnson
Autodesk Inc.
Attached Files
File Type: zip Macro_namedSelSets.zip (9.8 KB, 69 views)
 
  10 October 2006
Originally Posted by AlpineMan: Question: Does this mean the we can use other .NET controls in our scripts now?

Answer: Yes. And not only that, but the rest of the .NET framework. (The biggest feature in Max 9 in my opinion that never made it to the marketing channels... go figure). The implications for this are enormous, so I will have to defer information on that to another thread.


I guess the Marketing Dept was just being cautious.

I concur: Next to 64 bit support and faster viewports, DotNet support is the biggest new feature in Max and probably the biggest addition to MAXScript since R4.
__________________
Bobo
 
  10 October 2006
This sounds really exciting but I get an error whenever I try to run the selection set script (default one in max 9) or any other example using the dotNetClass:

-- Error occurred in InitImageList(); filename: C:\3ds max 9\stdplugs\stdscripts\Standard\NET_TreeViewWrapper .ms; position: 2316
-- Frame:
-- img: undefined
-- imgSize: dotNetObject:System.Drawing.Size
-- col: undefined
-- hImgList: dotNetObject:System.Windows.Forms.ImageList
-- bColor: undefined
-- pSize: 16
-- tv: dotNetControl:vTVSets:System.Windows.Forms.TreeVie w
-- stringFileArray: #("$ui/icons/tvSet.ico", "$ui/icons/tvObj.ico", "$ui/icons/tvCutObj.ico")
-- pTransparentColor: (color 185 185 185)
-- called in InitTreeView(); filename: C:\3ds max 9\UI\MacroScripts\Macro_NamedSelSets.mcr; position: 7793
-- Frame:
-- transparency: (color 185 185 185)
-- imgFiles: #("$ui/icons/tvSet.ico", "$ui/icons/tvObj.ico", "$ui/icons/tvCutObj.ico")
-- tv: dotNetControl:vTVSets:System.Windows.Forms.TreeVie w
-- hfont: dotNetObject:System.Drawing.Font
-- called in vEditNamedSelectionSets.open(); filename: C:\3ds max 9\UI\MacroScripts\Macro_NamedSelSets.mcr; position: 25045
-- Frame:
-- tvSize: undefined
-- sbSize: undefined
>> MAXScript Rollout Handler Exception: -- Unknown property: "imagesize" in dotNetObject:System.Windows.Forms.ImageList <<

Any ideas?




Thanks,
Light
 
  10 October 2006
Hi Light.

Which script are you trying to run? macro_namedselsets.mcr?
 
  10 October 2006
Hi Chris,

Yeah that's the one. This is what I get when I try the scene browser example in maxscript docs:

-- Error occurred in InitTreeView()
-- Frame:
-- tv: dotNetControl:tv:System.Windows.Forms.TreeView
-- called in treeview_rollout.open()
-- Frame:
>> MAXScript Rollout Handler Exception: -- Unknown property: "indent" in dotNetControl:tv:System.Windows.Forms.TreeView <<
true
OK




Thanks alot,
Light
 
  10 October 2006
Originally Posted by Light: Hi Chris,

Yeah that's the one. This is what I get when I try the scene browser example in maxscript docs:

-- Error occurred in InitTreeView()
-- Frame:
-- tv: dotNetControl:tv:System.Windows.Forms.TreeView
-- called in treeview_rollout.open()
-- Frame:
>> MAXScript Rollout Handler Exception: -- Unknown property: "indent" in dotNetControl:tv:System.Windows.Forms.TreeView <<
true
OK




Thanks alot,
Light


Hi Light,

Could you please execute this in the Listener and report the results?

(dotNetObject "System.Windows.Forms.TreeView").productVersion
 


You could also try running

showProperties (dotNetObject "System.Windows.Forms.TreeView")
  


and see if there is a property like

  .Indent : <System.Int32>
__________________
Bobo

Last edited by Bobo : 10 October 2006 at 07:56 PM.
 
  10 October 2006
You have to have the .NET framework 2.0 installed.

Chris J.
 
  10 October 2006
Hi Bobo,

The first line returns:
"2.0.50727.198"

Yes there is a property called:
.Indent : <System.Int32>




Thanks alot,
Light
 
  10 October 2006
I thought the setup installed it before installing max?




Thanks again,
Light
 
  10 October 2006
Originally Posted by Light: I thought the setup installed it before installing max?


Thanks again,
Light


Really strange. Looks like you have the right version installed.

No more ideas here, but let's collect some more info to see what the difference is from my setup here (which, of course, works):

*What version of Windows are you running? 32 or 64 bit? SP?
*Have you tried rebooting your machine since the Max 9 install?
__________________
Bobo
 
  10 October 2006
I use XP SP2. I haven't restarted my pc since I thought max didn't ask me. Will do now...




Thanks again,
Light
 
  10 October 2006
r u working on max that other people work on?! y its so complicated, what the hell going on?
 
  10 October 2006
Nope, did a clean install for my personal computer.




Light
 
  10 October 2006
Well, what did restarting do for you?
 
  10 October 2006
Same error for the scene browser but got to open the edit named selection. But I think this is not the correct dialog as from what I remember the original one had buttons on top and the a right click menu.

Here is the screenshot:






Thanks,
Light
 
Thread Closed share thread



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
CGSociety
Society of Digital Artists
www.cgsociety.org

Powered by vBulletin
Copyright 2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump
Miscellaneous

All times are GMT. The time now is 04:34 AM.


Powered by vBulletin
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.