Solved Test "Lock Overrides" in Python

Hi there, is it possible to test "Lock Overrides" and return if it is on or off using Python?
The same question for the "Enable all overrides" button.

Cheers

Hello @danielsian,

thank you for reaching out to us. Yes, this is possible with c4d.IsCommandChecked(). You just need the id for the command you are interested in, the Script Log is a good way to figure them out. See the example at the end of the posting for details.

Cheers,
Ferdinand

The example:

import c4d

def main():
    """
    """
    # When the "Lock Overrides" button is checked ...
    if c4d.IsCommandChecked(431000108):
        print ("Do something")

if __name__=='__main__':
    main()

MAXON SDK Specialist
developers.maxon.net

Hello @danielsian,

thank you for reaching out to us. Yes, this is possible with c4d.IsCommandChecked(). You just need the id for the command you are interested in, the Script Log is a good way to figure them out. See the example at the end of the posting for details.

Cheers,
Ferdinand

The example:

import c4d

def main():
    """
    """
    # When the "Lock Overrides" button is checked ...
    if c4d.IsCommandChecked(431000108):
        print ("Do something")

if __name__=='__main__':
    main()

MAXON SDK Specialist
developers.maxon.net

Thank you very much @ferdinand, that's exactly what I was looking for.
Cheers

Hello @danielsian,

without any further activity before Wednesday, the 16.03.2022, we will consider this topic as solved and remove the "unsolved" state from this topic.

Thank you for your understanding,
Ferdinand

MAXON SDK Specialist
developers.maxon.net