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

    GetVirtualObjects - do not recreate objects

    PYTHON Development
    0
    23
    14.2k
    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 24/01/2013 at 09:09, xxxxxxxx wrote:

      interesting.
      I just noticed that if I have my undos the way I have them right now (see above), INIT function is called twice, but if I don't have StartUndo, AddUndo, EndUndo - then INIT is called only once.

      Does that make any sence?

      However, I am not really sure what you mean with your first statement:) (sorry, dummy here). You say it's better to use op.GetDocument() instead of doc = c4d.documents.GetActiveDocument(), right? I just want to be sure:)

      By the way, R12 and R13 does act the same. I just tested it aswell.

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

        On 24/01/2013 at 09:21, xxxxxxxx wrote:

        Originally posted by xxxxxxxx

        I just noticed that if I have my undos the way I have them right now (see above), INIT function is called twice, but if I don't have StartUndo, AddUndo, EndUndo - then INIT is called only once.

        This is intended. When you create an undo for your object, Cinema creates a copy of it. And the copy
        must be initialized in some way, too, hm? 🙂

        Yes, using doc=op.GetDocument() is the correct way, the other is semantically wrong.

        -Niklas

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

          On 24/01/2013 at 10:07, xxxxxxxx wrote:

          doc=op.GetDocument()
          

          check:)

          I want to stress undo weirdness once again. I just check hyper mega advanced plugin Py-DoubleCircle. While you move handles in viewport and change radius this way - undo works just fine. BUT is you enter numeric values to Radius in Object tab, then undo don't work (let's say it works but in a weir way)

          So maybe Niklas you ARE right. Maybe that's suppose to be like.

          Any ways, appreciate your input. I learned a lot today. Thank you.

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