help with script evaluating

help with script evaluating

impacman
Contributor Contributor
980 Views
4 Replies
Message 1 of 5

help with script evaluating

impacman
Contributor
Contributor

hi

i made a simple script to turn on and off objects.visibility (for normal navigation in "orbit point of interest" mode)

but every time i restart max i need to evaluate it by myself before it begins to work

Please, help, what do i do wrong?

 

(
     fn wiretoggler state =
          (
          for obj in objects do
          (obj.visibility = state)
          )

 

     if state !=1 then
          (
          wiretoggler 0
          viewport.SetShowEdgeFaces (true)
          state=1
          )
          else
          (
          wiretoggler 1
          state=0
          )
)

0 Likes
981 Views
4 Replies
Replies (4)
Message 2 of 5

istan
Advisor
Advisor

autostart ?

0 Likes
Message 3 of 5

impacman
Contributor
Contributor

hi

 

no.

i keep it in usermacros directory, putting it in autostart doesnt resolve issue

i think there is kind of logical problem here, but cant understand which 

0 Likes
Message 4 of 5

A012255
Enthusiast
Enthusiast

your script is written in a way it needs to be executed/evaluated..

0 Likes
Message 5 of 5

impacman
Contributor
Contributor

and how should i rewrite it then?

0 Likes