Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware 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

    Modify Sketch&Toon Rendersettings

    Cinema 4D SDK
    python
    2
    3
    1.0k
    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
      HolgerBiebrach
      last edited by y_puech

      Hello,
      How can I modify Sketch&Toon Rendersettings? Following Code does not print the correct vallues. Is this a Bug or something I need to add?

      rd= doc.GetActiveRenderData()
      
      print rd[c4d.OUTLINEMAT_SHADING_BACK]
      print rd[c4d.OUTLINEMAT_SHADING_QUANTISE_LEVEL]
      
      1 Reply Last reply Reply Quote 0
      • Y
        y_puech
        last edited by

        Hi,

        The Sketch and Toon render settings are stored in the related video post, not the render data.

        The video posts are stored in a list, the first element of that list can be obtained with GetFirstVideoPost() on the associated render data.
        Then loop trough all video posts simply with GetNext() and check the type of the current video post.

        Here is some code:

        rd = doc.GetActiveRenderData()
        if rd is None:
            return
        
        vpost = rd.GetFirstVideoPost()
        if vpost is None:
            return
        
        found = False
        while vpost:
            found = vpost.GetType() == 1011015
            if found:
                print "Found S&T VideoPost"
                break
        
            vpost = vpost.GetNext()
        
        if found:
            print vpost[c4d.OUTLINEMAT_SHADING_BACK]
            print vpost[c4d.OUTLINEMAT_SHADING_QUANTISE_LEVEL]
        

        Former MAXON SDK Engineer

        1 Reply Last reply Reply Quote 2
        • Y
          y_puech
          last edited by

          Hi Holger,

          I'm wondering if your question has been answered. If so, please mark this thread as solved.

          Cheers,
          Yannick

          Former MAXON SDK Engineer

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