InitRenderStruct() allowed ?



  • 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.



  • 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.



  • 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. :)


Log in to reply