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
    • Register
    • Login

    Script Write to Annotation Tag on Save

    PYTHON Development
    0
    1
    14.6k
    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
      Helper
      last edited by

      On 31/08/2018 at 07:42, xxxxxxxx wrote:

      I can't seem to figure out how to get
      MSG_DOCUMENTINFO_TYPE_SAVE_BEFORE
      to trigger.

      I would like to save some info to an Annotation tag, but only right before the user saves the document.

      Tried to put it in Message() but couldn't figure out if Message can stand by itself or if it has to be in a NodeData class?

      class SampleClass(plugins.NodeData) :
          def Message(self, node, type, data) :
              if type == c4d.MSG_DOCUMENTINFO:
                  if data['type'] == c4d.MSG_DOCUMENTINFO_TYPE_SAVE_BEFORE:
                      print "Document is about to save"
                      return True
                  return True
      

      Thanks

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