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

    InitRenderStruct() allowed ?

    Scheduled Pinned Locked Moved PYTHON Development
    3 Posts 0 Posters 252 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 28/01/2013 at 05:30, xxxxxxxx wrote:

      hi,

      i know i am currently a question black hole again, but i have got another one.
      the class/struct InitRenderStruct does not have a constructor listed in the python
      class member listing. but the class is actually instantiateable. is this just a
      a missing part in the doucmentation, or is this considered as - might crash
      horribly at some point ?

      i am sampling a shader with the struct from a tag plugin, so far everything is 
      working fine, despite the fact i cannot provide any volumedata.

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

        On 28/01/2013 at 07:15, xxxxxxxx wrote:

        Hi,

        We can indeed create an InitRenderStruct instance in Python.
        There's actually 2 small code snippets in the documentation that instantiate InitRenderStruct: see Gradient.CalcGradientPixel() and BaseShader.GetBitmap().

        But as you've said, drawback is that we can't assign a VolumeData to InitRenderStruct.vd. This is because all the attributes of InitRenderStruct are read-only.
        It's also not possible to initialize a new instance with a specific document.

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

          On 28/01/2013 at 08:35, xxxxxxxx wrote:

          hey thanks for the clarification, i have to admit that i rarely check the sdk examples. i think 
          it should be mentioned on the class member page in the help, i almost skipped this option,
          because i thought i am not allowed to instantiate this class, as there is no constructor listed. 🙂

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