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

    PolygonReduction is not renderable(Physical)

    Bugs
    1
    3
    1.9k
    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 26/08/2018 at 03:35, xxxxxxxx wrote:

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

      ---------
      I'm using PolygonReduction class in my OBJECT_GENERATOR plugins.
      When I'm making the desired object a child of it, it works correctly and but it is not working when I'm rendering it with physical render in the viewport.

        
      import c4d
        
      class test(c4d.plugins.ObjectData) :
        
          def GetVirtualObjects(self, op, hh) :
              if not op.GetDown() : return None
        
              gch = op.GetAndCheckHierarchyClone(hh, op.GetDown(), c4d.HIERARCHYCLONEFLAGS_ASPOLY, False)
              polyObject = gch["clone"]
        
              if not gch["dirty"]: return polyObject
        
              data = {}
              data['_op'] = polyObject
              data['_doc'] = op.GetDocument()
              data['_thread'] = None
        
              polyReduction = c4d.utils.PolygonReduction()
        
              if not polyReduction.PreProcess(data) : return True  
              polyReduction.SetReductionStrengthLevel(0.9)
              polyObject.Message(c4d.MSG_UPDATE)
              return polyObject
        
      if __name__ == "__main__":
          result = c4d.plugins.RegisterObjectPlugin(id = 1000001,str = "?",g = test,description = "",info = c4d.OBJECT_GENERATOR|c4d.OBJECT_INPUT,icon = None)
      

      Download Plugin: https://www.dropbox.com/s/97c9xn941ywurg9/Test%20Plugin%200.4.zip?dl=0

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

        On 28/08/2018 at 05:16, xxxxxxxx wrote:

        Hi merkvilson,

        I confirm the issue.

        Thanks a lot for this bug report!
        Cheers,
        Maxime

        1 Reply Last reply Reply Quote 0
        • M
          m_adam
          last edited by

          Hi @merkvilson, long time we didn't saw you, hope everything is fine for you 🙂

          But with the latest update of Cinema 4D (R24 SP1), we finally fixed this bug.

          Cheers,
          Maxime.

          MAXON SDK Specialist

          Development Blog, MAXON Registered Developer

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