Home Technical Talk

Maxscript Access Rollout/UI Elements in Utility Panel

interpolator
Offline / Send Message
SimonT interpolator
Hi friends,

i searched forever but found nothing. When i go into the Utility Panel and click "More..." and e.g. "Assign Vertex Colors" then i get some nice options. I want to change these options via MaxScript. But not via any modifier because at this point there's no modifier. It will be assigned as soon as you press the "Assign to selected" button.

Do you have any idea how i can access the ui elements of the utility panel?

Replies

  • Swordslayer
    Options
    Offline / Send Message
    Swordslayer interpolator
    UIAccessor is one way, on the other hand, if you just wanted to assign vertex colors to editable mesh/poly, there are definitely easier ways to accomplish that.
  • SimonT
    Options
    Offline / Send Message
    SimonT interpolator
    In fact i want to change the radiosity bake settings which you can setup in the utility panel when you open the "assign vertex colors" rollout.
  • Swordslayer
    Options
    Offline / Send Message
    Swordslayer interpolator
    (
        obj = selection[1]
    
        obj.vertexColorType = 0
        obj.showVertexColors = true
        obj.vertexColorsShaded = false
    
        local vp = VertexPaint name:"Radiosity Bake" \
            lightingModel:0 colorBy:0 useMaps:false \
            radiosityOption:1
    
        addModifier obj vp
        setCommandPanelTaskMode #modify
        modPanel.setCurrentObject vp
    
        local hwndVC = (windows.getChildHWND #max "Assign Vertex Colors")[2]
        UIAccessor.PressButton (windows.getChildHWND hwndVC "Assign")[1]
    )
    

    Obviously, you need to have some radiosity solution ready for it to wor properly.
Sign In or Register to comment.