Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware API
      • ZBrush GoZ API
      • Code Examples on Github
    • Forum
    • Downloads
    • Support
      • Support Procedures
      • Registered Developer Program
      • Plugin IDs
      • Contact Us
    • Categories
      • Overview
      • News & Information
      • Cinema 4D SDK Support
      • Cineware SDK Support
      • ZBrush 4D SDK Support
      • Bugs
      • General Talk
    • Unread
    • Recent
    • Tags
    • Users
    • Login

    Merged Alembic Generator object, how to check if it is a camera?

    Cinema 4D SDK
    python
    2
    2
    346
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • BigRoyB
      BigRoy
      last edited by

      When importing an Alembic it turns the objects into Alembic Generators. How can I, without making the objects editable detect whether the object is a camera or not?

      print(op.GetTypeName())
      

      Prints: Alembic Generator.

      i_mazlovI 1 Reply Last reply Reply Quote 0
      • i_mazlovI
        i_mazlov @BigRoy
        last edited by

        Hi @BigRoy,

        For the alembic camera, you can use c4d.MSG_GETREALCAMERADATA, for example:

        def main():
            data = dict()
            op.Message(c4d.MSG_GETREALCAMERADATA, data)
            print(data['res'])
        

        Another option (which would work for other object types as well) would be to check type of the object's cache using GetCache().

        Cheers,
        Ilia

        MAXON SDK Specialist
        developers.maxon.net

        1 Reply Last reply Reply Quote 0
        • First post
          Last post