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
    • Recent
    • Tags
    • Users
    • Login

    Update if object moves..

    Scheduled Pinned Locked Moved PYTHON Development
    2 Posts 0 Posters 229 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

      On 21/03/2014 at 14:14, xxxxxxxx wrote:

      R14 Python:

      I am working on a deformer ObjectData plugin.  How it works is simple - make it a child of any polygon object, and drag and drop another object into a Link field i have created in the deformers properties..

      This works great, however the deformation is dependent on the object specified in the Link ( this can be a Null, Cube, Camera, pretty much anything with a position Vector ), and as it is just now when i move the linked object around in the editor/viewport i need my deformer to recognise this and update accordingly.

      Is there a way to add an event of some kind to the linked object so that it tells the plugin when it has been moved?

      I have looked at a bunch of options, literally trawled through the SDK docs and tried various things, but completely stumped.  I figure i could manually poll the object every single frame for changes, but feel that i`m missing something here and there must be some Event or internal message that could be leveraged to do this..

      Any help much appreciated.

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

        On 22/03/2014 at 03:10, xxxxxxxx wrote:

        Hi Eclektrik,

        You could make your Object also an Expression in which case you get updates in
        ObjectData.Execute() when any object is being moved. Check the dirty count of the
        linked object in this method and compare it to the dirty count you got the last time
        your deformer was in action.

        Best,
        -Niklas

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