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 class is not renderable

    PYTHON Development
    0
    2
    1.2k
    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:30, xxxxxxxx wrote:

      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 26/08/2018 at 03:36, xxxxxxxx wrote:

        I guess this is a bug so I moved it to bugs section: https://developers.maxon.net/forum/topic/10933/14390_polygonreduction-is-not-renderablephysical

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