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

    GetDirty() on GetUserDataContainer() contents

    Scheduled Pinned Locked Moved PYTHON Development
    2 Posts 0 Posters 202 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 02/08/2014 at 19:27, xxxxxxxx wrote:

      Greetings to all!

      Is there any way to determine precisely what user data controller has changed from within a Python script?

      I figured that the following code would work (according to the SDK, anyways) :

      for i, b in op.GetUserDataContainer() :
          print i, b.GetDirty()

      Where the user data is all defined on op (the Python tag itself), however the checksum returned by GetDirty() in this case never seems to change (regardless of what I do with the UD controls). Is this intended behaviour or not?

      FWIW, I'm trying to figure out what user data control has changed so that I can determine what I need to update and how since the python script backing the tag is fairly large and long running for a complete recalculation.

      -CMPX

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

        On 03/08/2014 at 01:39, xxxxxxxx wrote:

        What you get is the parameter description which is only used to display the data of the node
        in the Attributes Manager. It won't be marked "dirty" for parameter value changes. From a Python
        Tag or Generator or Node, it is not possible to get a notification that certain parameters have 
        changed. You need to check this for yourself and store the previous state somewhere.

        -Niklas

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