Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware API
      • ZBrush Python 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

    DescID shift operator

    Cinema 4D SDK
    classic api python r21
    2
    4
    490
    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.
    • a_blockA
      a_block
      last edited by ferdinand

      Hi,

      the Python docs specify a left shift operator for DescID.

      Unfortunately it seems to have issues. No other code than te snippet found in docs is needed:

      dId = c4d.DescID(c4d.DescLevel(30), c4d.DescLevel(40), c4d.DescLevel(50))
      dId<<2
      

      Here in my R21 on Win10 this results in:

      TypeError: unsupported operand type(s) for <<: 'c4d.DescID' and 'int'
      

      Trying to call __lshift__() directly results in NotImplemented, which could be a hint 😉

      Cheers,
      Andreas

      1 Reply Last reply Reply Quote 0
      • M
        m_adam
        last edited by

        Hi Andreas,

        Thanks for reporting the issue.

        I will update this topic when the fix will be available in an official release.

        Cheers,
        Maxime.

        MAXON SDK Specialist

        Development Blog, MAXON Registered Developer

        1 Reply Last reply Reply Quote 0
        • a_blockA
          a_block
          last edited by

          Thanks, Maxime. No urgency from my side. Just stumbled across it, when actually trying to do something completely different.

          My best wishes to the entire team.

          1 Reply Last reply Reply Quote 0
          • M
            m_adam
            last edited by

            This bug is now resolved in R21 sp2.

            Cheers,
            Maxime

            MAXON SDK Specialist

            Development Blog, MAXON Registered Developer

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