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

    [Py] tp.SetGroup crash c4d

    Scheduled Pinned Locked Moved Bugs
    4 Posts 0 Posters 728 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 05/07/2012 at 05:30, xxxxxxxx wrote:

      User Information:
      Cinema 4D Version:   13 
      Platform:   Windows  ;   
      Language(s) :

      ---------
      Hello
      I have experiment to control tp by py, trying to develop event handler.
      When iterate by pid and set to new group, when preview gone to last frame, it crashes c4d.

      scene:
      http://rghost.ru/39051439

        
      import c4d  
      from c4d import utils  
      from c4d.modules import thinkingparticles as tp  
        
      def main() :  
        tp = doc.GetParticleSystem()  
        obj = doc.SearchObject("target")  
        rc = utils.GeRayCollider()  
        ntp = tp.NumParticles()  
        objpos = obj.GetAbsPos()  
          
        tc = rc.Init(obj)  
        red = (tp.GetRootGroup()).GetDown()  
        for i in range(ntp) :  
            start_pos = tp.Position(i)  
            direct = objpos - start_pos   
            length = direct.GetLength()  
            rc.Intersect(start_pos, direct, length)  
            is_cnt = rc.GetIntersectionCount()  
            for id in xrange(is_cnt) :  
                cgid = rc.GetNearestIntersection()  
                if cgid["distance"] > 0.0:  
                    tp.SetGroup(i, red)  
      
      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 31/07/2012 at 10:54, xxxxxxxx wrote:

        Hi, can you please send MAXON a crashreport? Could you also please append the scene if possible?

        Thx a lot!

        Cheers, Sebastian

        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 05/08/2012 at 02:28, xxxxxxxx wrote:

          Thanks
          I forgot about it ... resolved by another methods

          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 05/08/2012 at 05:09, xxxxxxxx wrote:

            But is it still possible to reproduce? A crash should never occurre 🙂

            Thx a lot! Cheers, Sebastian

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