Notifications
Clear all

[Closed] Setting viewport antialiasing through maxscript

How can I set d3d viewport antialiasing sample settings (None/8 Samples) with maxscript?
What I’m trying to achieve is very similar to this:
http://forums.cgsociety.org/showpost.php?p=5364947&postcount=6
I tried to modify it but couldn’t get it working.
Anyone could help?

33 Replies

I’m in Max 2009 and here still not such settings for Direcr3D, but recently friend of mine with Max 2011 ask me the same script. In his config dialog he has only 3 items to choose from (“None”, “2 Samples”, “4 Samples”), so I made a script to toggle those combobox by index between 0 and 2 (first and third) item. I have no idea how to check how many items has this combobox, so if you has more items, modify that index. The script is tested on Max 2011 only. I hope it helps anyway.

don’t go wild, everything is much easier:


 dx_ini = getdir #maxroot + "d3dgfx.ini"
 AALines = getINISetting dx_ini #Settings "AALines"
 setINISetting dx_ini #Settings "AALines" (1 as string) -- enable Antialised Lines
 AAQuality = getINISetting dx_ini #Settings "AAQuality"
 setINISetting dx_ini #Settings "AAQuality" (2 as string) -- set Antialiasing to "2 samples"
 
 --- changes will take effect next time you start MAX
 
1 Reply
(@panayot)
Joined: 11 months ago

Posts: 0

Nice!
Just to remember, I’m on Max 2009 and no such ini file here.
I just make a friendly favour with what I have

@Panayot

Thank you very much!!! it was easy to adapt it for 8x. I just changed state to 3.

@denisT

Thanks. It’s indeed easily altered by editing the .ini file but unfortunately as you mentioned max needs to be restarted. But Panayot’s script makes this change on-the-fly.

no, it doesn’t. you have to restart max to take effect of the change.

3 Replies
(@halloween)
Joined: 11 months ago

Posts: 0

Then how come I can see the antialiasing effect on viewport instantly after executing the script, without even restarting max? Is it related to graphics card, or its driver or 3ds max version?

(@denist)
Joined: 11 months ago

Posts: 0

the answer is very simple. NO WAY. you can’t see effect without restarting max, and max tells you about it every time when you change any configuration parameter manually.

(@halloween)
Joined: 11 months ago

Posts: 0

I dont know why but none of those configuration parameters showing me any restart warning and they’re being applied after closing the dialogue. Check this:

http://www.youtube.com/watch?v=diNV9Mcfu9c

probably you have a gift version of max …

Or simply because he has a Quadro?

And this is how Panayot’s uiaccessor script works:
http://www.youtube.com/watch?v=f6kb5fW8lmo
Script’s first run takes couple of seconds, but subsequent runs are almost instant.

could you give your max version, graphic card, and drivers version please?

max: 2012 x64 (sp1 and hotfixes installed)
card: Quadro 4000
driver: 280.19

1 Reply
(@denist)
Joined: 11 months ago

Posts: 0

thanks.

can anyone say if max 2010 with Quadro needs restart to take effect of settings change, please?

Page 1 / 3