dimanche 21 août 2022

I want to use a checkbox in a function - Maxscript

My question is about maxscript. Is it possible to use a checkbox in a function? this checkbox works correctly when it is not in the function. but when it's in the function, it doesn't work, and this is the error :

-- Error occurred in anonymous codeblock; filename: G:_BN Scripts\Checkbox problem.ms; position: 307; line: 18 -- Syntax error: at ), expected while -- In line: )

My code :

rollout AK "AK" width:200 height:400
(   checkbox 'FlipF' "Flip Face"   pos:[77,69] 

fn flip=
   (
        on FlipF changed theState do
    (
        if theState then
        (
         $.EditablePoly.flipNormals 1
        )
        else
        (
            $.EditablePoly.flipNormals 0
        )
    )
        
    )   
flip()  
)
createDialog AK



Aucun commentaire:

Enregistrer un commentaire