Default Lights Follow View Angle toggle - script request

Default Lights Follow View Angle toggle - script request

345243235
Enthusiast Enthusiast
587 Visites
2 Réponses
Message 1 sur 3

Default Lights Follow View Angle toggle - script request

345243235
Enthusiast
Enthusiast

I would like a 1-click command to toggle this feature (on/off), is it possible with MaxScript?

ps.this feature was removed in 3ds Max 2021, I am using 2020.

Thanks in advance!

0 J'aime
588 Visites
2 Réponses
Replies (2)
Message 2 sur 3

spacefrog_
Advisor
Advisor

There WOULD be the following maxscript command to toggle that off

 

(NitrousGraphicsManager.GetActiveViewportSetting()).DefaultLightsFollowCamera=false

 

 

problem seems to be, that the functionality behind the mxs command seems to be broken

even after i assign false , the next call to the function ( without the assignement part) returns "true" .  I tested in Max 2021 and Max 2020 and while Max 2020 accepted and stuck to the "false" value , the light in the viewport still was view dependent.

So i suspect turning this option OFF has been non-working for some releases already, and Max 2021 simple reflects the correct internal state when using the mxs command


Josef Wienerroither
Software Developer & 3d Artist Hybrid
0 J'aime
Message 3 sur 3

345243235
Enthusiast
Enthusiast

Hey Spacefrog, thanks so much for the input! To be honest with you the main problem I'm having is that when I switch between shading styles and go back to "Performance" the Default Light is always unticked and I need to navigate to the Viewport and Settings Preference window to change it back.

 

Your command works! Can I ask where you found that line of code? because it doesn't appear in the MAXScript Listener when you tick/untick the checkbox in the settings window.

 

When I run the line with TRUE or FALSE it seems to work regardless, but are you saying it's impossible to create a toggle type script because of an internal error? obviously I can place each command as a single action on the toolbar, but a single ON/OFF toggle command would be brilliant.

0 J'aime