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

    Physical Renderer and Python Generator [SOLVED]

    Scheduled Pinned Locked Moved PYTHON Development
    3 Posts 0 Posters 269 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

      On 10/06/2015 at 06:26, xxxxxxxx wrote:

      Hi,
      Here's my problem - I have a python generator with a script that creates / animates geometry every frame.  Using the standard renderer this works perfectly - but then I decided I wanted really nice depth of field effects, so I switched to the physical renderer.  The problem here is that it seems to want to execute and initialise the script each frame - rather than just running through the 'main' loop each frame. So it's initialising every frame, making my code not run properly.

      Any ideas for a fix welcome, thanks,
      Glenn.

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

        On 10/06/2015 at 06:29, xxxxxxxx wrote:

        Hi Glenn,

        can you please try the following:
        Simply add a dynamics tag to any of your objects. You can even disable the dynamics on the tag. Then try, if it changes anything in your render.

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

          On 10/06/2015 at 07:35, xxxxxxxx wrote:

          Hi
          I tried adding a rigid body tag to a dummy scene object, but it didn't make any difference.
          Would I have to add it programmatically to the geometry being created by the script ?

          Anyway, I found a work around by putting IF statements in the root level of the code which only allows it to executed if the current frame is 0.  seems to work..

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