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

    Python Generator - Get Polygon Representation of t

    Scheduled Pinned Locked Moved PYTHON Development
    2 Posts 0 Posters 203 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 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?

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

        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

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