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

    GetData multiple times

    Scheduled Pinned Locked Moved PYTHON Development
    2 Posts 0 Posters 129 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 08/04/2014 at 09:40, xxxxxxxx wrote:

      If you call GetData multiple times from the same location from different functions will you get the same data?

      Does calling GetData clear out what is in that memory location?

      example:

      def Message(self, op, type, data) : #op is the tag
            if type==c4d.MSG_DESCRIPTION_POSTSETPARAMETER:
                startJoint = d.GetData(FINAL_LINK)

      def Execute(self, tag, doc, op, bt, priority, flags) :
            self.final_cd = data.GetData(FINAL_LINK)

      do startJoint and self.final_cd have the same data?

      Jimmy

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

        On 08/04/2014 at 14:00, xxxxxxxx wrote:

        Look at the documentation of BaseContainer::GetData(). You can also easily verify this with
        a short example.

        But to answer your question, not it does not clear the data. GetData() would be a very inappropriate
        name if it would. They will get the same data unless something else was able to access and modify
        the specified entry.

        We assume, of course, that "d" in Message() and "data" in Execute() refer to the same object.

        -Niklas

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