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

    Modifieng a generator Object

    Scheduled Pinned Locked Moved PYTHON Development
    8 Posts 0 Posters 886 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 30/06/2011 at 08:14, xxxxxxxx wrote:

      Hi,

      I want to modify a generator object, a cube for instance.
      I can modify It's cache, this will work in the editor, but not in in the renderer.
      Also, using a cube and modifieng the cube's points, it seem's like the cubes cache isn't rebuilt before I modify it, so I modify the cubes already modifed points.

      This is the code i was giving a try on a Python generator:

      import      c4d  
      from        random      import random  
        
        
      def main() :  
        dwn     = op.GetDown()  
        if not dwn:  
            return  
        
        dwn     = dwn.GetCache()  
        if not dwn:  
            return  
        
        for i in xrange(dwn.GetPointCount()) :  
            dwn.SetPoint(i, dwn.GetPoint(i) * 2)  
        
        dwn.Message(c4d.MSG_UPDATE)  
        dwn.Touch()
      

      *squint to Sebastion 😄* ..
      Can anyone tell me how to do what I'm trying to achive ?

      Thanks very much !
      Niklas

      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 30/06/2011 at 12:10, xxxxxxxx wrote:

        hey nux, your script seems to work every time i click "force update" button within the c4d python gen. which is wierd because it seems like you have update commands in there. weird.

        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 30/06/2011 at 13:27, xxxxxxxx wrote:

          Hm, what's weird ?
          It's weird that it grows every time ! And that it does not take effect when rendering. 😞

          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 01/07/2011 at 00:53, xxxxxxxx wrote:

            maybe try to base your script on the frame number so it updates during rendering as well.

            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 01/07/2011 at 08:03, xxxxxxxx wrote:

              that is not the problem.
              I want to know how to modify the cache while rendering.

              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 01/07/2011 at 15:37, xxxxxxxx wrote:

                oh, i thought your problem was that you couldnt acess the cache while rendering because it was not updating. I was saying try to base your script so that it utilizes the frame number in some way, so that way it has to update every time there is a frame change. maybe this will not help you though.

                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 02/07/2011 at 00:00, xxxxxxxx wrote:

                  Thanks anyway
                  Yes, it is updating, but I can't access the Cache. 😞
                  (if it wasn't updating, wouldn't it be completely useless ?)

                  Thanks,
                  Niklas

                  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 07/07/2011 at 06:58, xxxxxxxx wrote:

                    push

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