Home Technical Talk

Flat Shading in 3D Studio Max

Kedhrin
polycounter lvl 18
Offline / Send Message
Kedhrin polycounter lvl 18
Hey guys,

I originally posted this in Mapcore but was recommended to post here...

Wondering if any of you may have some insight on this... especially if you know max macro scripting...

i want to be able to toggle between wireframe and flat shading, much like you can toggle between wireframe and smooth+highlights with F3. There are many options in customize UI for setting up a keyboard shortcut for wireframe / whatever... but not flat!

anyways, i found this solution on the interwebs:
http://forums.cgarch...w-shortcut.html

but i don't know how to max script at all :/ i tried a few different things editing this script but i'm doing something derp. Anyone have any ideas?

Thanks!

Replies

  • Kurt Russell Fan Club
    Options
    Offline / Send Message
    Kurt Russell Fan Club polycounter lvl 9
    I just use F4 to turn on and off wireframe while keeping flat shaded :) But if you want to get a key bound to flat shading, it's pretty easy.

    Bring up the MAX script editor (MAXScript->MAXScript Editor...) and type the code in:
    actionMan.executeAction 0 "554" -- Views: Viewport Render Level Flat

    Now there are a few ways to get that bound to a key, but the one I'd use is:
    • Select the code you've typed in and drag it up to your toolbar (the one right below Edit,Tools,Help,etc.) Drop it anywhere, don't worry where because we'll delete the icon it makes in a second.
    • Bring up Customise->User Interface and go to the Keyboard tab. Select Group:Main UI and Category: DragAndDrop and you should see Macro1, which will be the new macro you dragged to the toolbar. Bind it to whatever key you want.
    • Now test it out. You can delete the button you dragged to the toolbar now (right-click -> Delete Button) or customise it to look nicer.
  • Kedhrin
    Options
    Offline / Send Message
    Kedhrin polycounter lvl 18
    I just use F4 to turn on and off wireframe while keeping flat shaded :) But if you want to get a key bound to flat shading, it's pretty easy.

    Bring up the MAX script editor (MAXScript->MAXScript Editor...) and type the code in:


    Now there are a few ways to get that bound to a key, but the one I'd use is:
    • Select the code you've typed in and drag it up to your toolbar (the one right below Edit,Tools,Help,etc.) Drop it anywhere, don't worry where because we'll delete the icon it makes in a second.
    • Bring up Customise->User Interface and go to the Keyboard tab. Select Group:Main UI and Category: DragAndDrop and you should see Macro1, which will be the new macro you dragged to the toolbar. Bind it to whatever key you want.
    • Now test it out. You can delete the button you dragged to the toolbar now (right-click -> Delete Button) or customise it to look nicer.


    very easily explained and works like a charm! Although it doesn't cycle between wire frame and flat, it still saves me a headache. The main problem i have is when i go to wireframe and come out its smooth+highlights every time (rather than flat shaded)... but i just bound it to the ctrl+f3 and its a simple click!:)

    thanks again!
Sign In or Register to comment.