Python Generator - Get Polygon Representation of t



  • On 22/07/2015 at 04:12, xxxxxxxx wrote:

    I made this codebit, I hoped for it to work:

    #############
    import c4d
    #Welcome to the world of Python

    def currentState(op) :
        return c4d.utils.SendModelingCommand(command = c4d.MCOMMAND_CURRENTSTATETOOBJECT,list = [op])[0]

    def main() :
        child = op.GetDown()    
        polyobj = currentState(child)
        return polyobj
    #############

    it does work however the actual object remains there. How can I make this work like a subdivision surface or an atom array where the children remains invisible while only the generated content is visible?



  • On 23/07/2015 at 02:22, xxxxxxxx wrote:

    Hello,

    the subdivision surface object or the atom array object are ObjectData plugins that use certain functionality of that plugin class to hide the input child objects. The Python generator exist as a tool to implement ideas quickly but it may not be able to replace all functionality of a proper ObjectData plugin completely.

    So if you want to hide in an object in the viewport and during rendering you could do this by setting the viewport and render visibility with SetEditorMode() and SetRenderMode().

    Best wishes,
    Sebastian


Log in to reply