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

    MoveHandle() is passed Vector not Matrix

    Scheduled Pinned Locked Moved PYTHON Development
    5 Posts 0 Posters 412 Views
    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.
    • H Offline
      Helper
      last edited by

      THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

      On 05/08/2012 at 12:15, xxxxxxxx wrote:

      Hello,

      how are we supposed to obtain the amount a handle has been moved by the user when we only get
      the mouse-position passed in ObjectData.MoveHandle()? In R12, a Matrix was passed, just like in the
      C++ API. But it is a Vector in R13. (That is, amongst other things, one of the reason why the
      Py-SpherifyDeformer does not work correctly under R13/R14).
      I don't want to calculate it based on a previous call to MoveHandle() using the passed mouse-position.

      Thanks,
      Niklas

      1 Reply Last reply Reply Quote 0
      • H Offline
        Helper
        last edited by

        THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

        On 06/08/2012 at 00:57, xxxxxxxx wrote:

        Hi Niklas,

        Please have a look at the examples using handles (ObjectData based) in the latest R13.058 docs: Py-DoubleCircle, Py-RoundedTube and Py-SpherifyModifier.
        Handles were fixed in these examples so you can see how handles are working now. They were fixed in R13.058 because new methods and attributes that were missing in the Python API were added: BaseView.ProjectPointOnLine(), BaseView.ProjectPointOnPlane() and HandleInfo.CalculateNewPosition()
        These methods help in the calculation of the new position of handles with the new handle interface (based on mouse position).

        What's missing in the Python API right now is the automated handle interface (GetHandleCount(), GetHandle(), SetHandle()). It's just implemented in FalloffData. I think it should be implemented in ObjectData too. That would avoid us overriding MoveHandle() and DetectHandle().

        1 Reply Last reply Reply Quote 0
        • H Offline
          Helper
          last edited by

          THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

          On 06/08/2012 at 01:34, xxxxxxxx wrote:

          Hello Yannick,

          thank you for your detailed answer! I was using the R13.029 docs and the newest version works fine. 🙂
          Yes, GetHandle(), SetHandle() and GetHandleCount() would be very useful in ObjectData plugins, too.
          I hope it will be implemented some day..

          When the Python API is extended, can't MAXON make an Update for more than just the current release? I mean, if GetHandle() and etc. will be implemented in an Update for R14, we have three versions that all handle handles in another way! Although Python is platform-independent, it becomes release-dependent, and this is a huge disadvantage, too.

          -Niklas

          1 Reply Last reply Reply Quote 0
          • H Offline
            Helper
            last edited by

            THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

            On 06/08/2012 at 03:48, xxxxxxxx wrote:

            I just saw that it doesn't work really correctly. In MoveHandle(), instead of PYSPHERIFYDEFORMER_RADIUS and PYSPHERIFYDEFORMER_STRENGTH , SPHERIFYDEFORMER_RADIUS and SPHERIFYDEFORMER_RADIUS are used..
            Please correct this for future versions of the docs.

            1 Reply Last reply Reply Quote 0
            • H Offline
              Helper
              last edited by

              THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

              On 06/08/2012 at 03:55, xxxxxxxx wrote:

              Originally posted by xxxxxxxx

              I just saw that it doesn't work really correctly. In MoveHandle(), instead of PYSPHERIFYDEFORMER_RADIUS and PYSPHERIFYDEFORMER_STRENGTH , SPHERIFYDEFORMER_RADIUS and SPHERIFYDEFORMER_RADIUS are used..
              Please correct this for future versions of the docs.

              Thanks for pointing this error out. I ported the R13 C++ code of these examples and I didn't modified the resource IDs to use the one of the Python objects.

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