SOLVED Check User Data Link Field

Hi, is there a way to use Python to check if there is a link in a User Data field or if it is empty? Thanks.

What do you mean with "use Python"? Are you writing a script, or a plugin, or something else?

You can simply access the user data parameter and see if it is None or not:

link = op[c4d.ID_USERDATA,1]
if link is None:
    print("no link")
else:
    print("some object linked")

Also: please post questions on the C4D API in CINEMA 4D DEVELOPMENT.

What do you mean with "use Python"? Are you writing a script, or a plugin, or something else?

You can simply access the user data parameter and see if it is None or not:

link = op[c4d.ID_USERDATA,1]
if link is None:
    print("no link")
else:
    print("some object linked")

Also: please post questions on the C4D API in CINEMA 4D DEVELOPMENT.

@Swinn is None did the trick. Thanks. :)