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

    How to create Sketch Material

    Scheduled Pinned Locked Moved PYTHON Development
    3 Posts 0 Posters 331 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 24/10/2016 at 23:40, xxxxxxxx wrote:

      I'm drawing a blank, and missing something stupid, I'm sure.

      How does one create a sketch material with python? I found all the attrs in moutliner.h, but I don't see how to create one from scratch. Could anyone point me in the right direction?

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

        On 25/10/2016 at 04:56, xxxxxxxx wrote:

        Hi,

        unfortunately there's no constant defined for the ID of a Sketch material.
        But it's easy to find out. Simply create a Sketch material and drag it to the input field of the Console window. "SketchMat" appears, simply add a .GetType(), press return and the ID is printed to the Console.
        In this case it's 1011014.
        So you can create a Sketch material like so:

        mySketchMat = c4d.BaseMaterial(1011014)
        
        1 Reply Last reply Reply Quote 0
        • H Offline
          Helper
          last edited by

          On 25/10/2016 at 22:11, xxxxxxxx wrote:

          Ha. I found that number out, but I was too tired and dumb to remember to Insert the Material after creating it. Thanks anyway!

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