[PYTHON] [Cinema 4D] function of check all object in scene

A function of check all object in the scene with multiple hierarchies.

def GetNextObject(obj):

    if obj.GetDown():
        obj = obj.GetDown()
        return obj

    if obj.GetNext():
        obj = obj.GetNext()
        return obj
    
    while obj.GetUp():
        obj = obj.GetUp()
        if obj.GetNext():
            obj = obj.GetNext()
            return obj

    return False

Recommended Posts

[Cinema 4D] function of check all object in scene
The meaning of ".object" in Django
Calculation of mean IoU in object detection
Check the behavior of destructor in Python
[Python3] Rewrite the code object of the function
Difference in output of even-length window function
Draw a graph of a quadratic function in Python
[python] Check the elements of the list all, any
Fix the argument of the function used in map
Gacha written in python-Addition of period setting function-