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
    • Unread
    • Recent
    • Tags
    • Users
    • Login

    PSR Constraints and killing [SOLVED]

    SDK Help
    0
    3
    300
    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 10/03/2015 at 18:39, xxxxxxxx wrote:

      User Information:
      Cinema 4D Version:   R16 
      Platform:      
      Language(s) :

      ---------
      So I'm working on a script and I add a number of PSR constraints to objects to basically snap them. After I snap them I add an EventAdd to refresh the scene and then I immediately use KillTag to delete them all. I expect this should give me perfectly snapped objects, but it offsets the objects when I run the kill. It's fine if I leave the constraints and finish the script without the kill. Is there something I'm not updating correctly to get the constraints to stick before the kill?

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

        On 11/03/2015 at 08:28, xxxxxxxx wrote:

        Hello,

        can you tell us on what kind of plugin you are working and could you share some code?

        I guess the problem is that EventAdd() won't do what you think it does. EventAdd() will add an event to the event queue. But this queue will be evaluated after Cinema returns from the local scope of your function. So calling EventAdd() won't do anything immediately.

        If you want the document to update you may want to use ExecutePasses(). But if this is a good idea or not depends on what kind of plugin you write.

        Best wishes,
        Sebastian

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

          On 11/03/2015 at 13:32, xxxxxxxx wrote:

          I think ExecutePasses should be fine, thanks.

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