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

    Problems with RegisterMessagePlugin in R20

    Cinema 4D SDK
    2
    2
    895
    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.
    • V
      victor
      last edited by a_block

      in previous versions
      RegisterMessagePlugin(ID_MTIMER, "", 0, NewObj(MTimerMessage));
      where MTimerMessage has public inheritance from MessageData, was working ok for me.

      Unfortunatly it doesn't longer compiles *no suitable conversion function from "maxon::ResultPtr<MTimerMessage>" to "MessageData " exists C4D_actual_plugin

      Any tip on this?

      Thank you in advance

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

        Hi,

        in Cinema 4D R20 the return value of NewObj() has changed. It now returns a ResultPtr<>. This simply means you need to properly handle the error case.

        In our C++ SDK documentation this is covered on the API Transition page and in more detail in the Error Handling manual.

        In the microsdk example there's a snippet showing one way to handle the error.

        One last request, please consider tagging your posts (as I did now here), so we can keep this forum tidy and easy to search.

        Cheers,
        Andreas

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