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

    Modeling Library Question

    Scheduled Pinned Locked Moved SDK Help
    5 Posts 0 Posters 404 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

      THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

      On 26/09/2010 at 14:52, xxxxxxxx wrote:

      User Information:
      Cinema 4D Version:   12 
      Platform:   Windows  ;   
      Language(s) :     C++  ;

      ---------
      I may be overlooking this in the Modeling Library docs but I am wondering if it is safe or even valid to call InitObject() and Commit() within a loop.  So for example the flow would look like this....

      Begin Loop,

      Call InitObject(),

      modify object with Modeling library,

      Call Commit(),

      Call ReleaseObject(),

      GOTO Top of Loop and do it again.

      Is this valid or no?

      ~Shawn

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

        THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

        On 27/09/2010 at 13:34, xxxxxxxx wrote:

        Anyone know about this?

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

          THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

          On 29/09/2010 at 07:48, xxxxxxxx wrote:

          Yes, it's valid to do so.

          cheers,
          Matthias

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

            THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

            On 29/09/2010 at 09:13, xxxxxxxx wrote:

            Thanks Matthias.  Is my understanding correct?  This is valid unless I do something to the object that changes the orginal object as it was when I used InitObject(),  right? 
             
            So in theory, I can initialize the object, loop through the points, make changes, commit the changes, release the object, and then do iot all again.  I just can't commit changes, and then make more changes without releasing the object, and re initializing it?
             
             
            Thanks,

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

              THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

              On 29/09/2010 at 19:08, xxxxxxxx wrote:

              The SDK says the following:

              MODELING_COMMIT_UPDATE
              Commit updates its internal data so that further editing can be done without having to reinit the kernel. This only applies if the committed object is the same as the original; you can always commit the changes to another (clone) object without having to reinit.

              Could someone explain to me how I would do the bold text part of this?

              Would I create a clone of the object like this?

                
                BaseObject * cubeClone = (BaseObject* )cube->GetClone(COPYFLAGS_NO_HIERARCHY, NULL);  
                if(!cubeClone) return FALSE;
              

              I am confused by this ....  Does it mean that I use InitObject() for my polygonObject then when I make a change to the object, make a clone of the object and then make another change to the original object then save it to a clone..   Could someone provide a short snippet of code to explain this better?

              Thanks,

              Shawn

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