[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?
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
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
Thank you very much!!! it was easy to adapt it for 8x. I just changed state to 3.
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.
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?
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.
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:
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?
thanks.
can anyone say if max 2010 with Quadro needs restart to take effect of settings change, please?