Bodypaint new Texture



  • On 09/02/2015 at 03:25, xxxxxxxx wrote:

    Hello,

    loading a new bitmap to Bodypaint is not a problem with SendPainterCommand, but if I want to set a new Texture with CreateNewTexture, I get an error message :
    TypeError: argument 1 must be impossible<bad format char>, not str
    The SDK points out that one should use a string:
    staticPaintTexture.CreateNewTexture( path , settings )

    It seem´s to be broken...?
    Or did I miss something ?

    Best wishes
    Martin

      
      
          bitPath = os.path.join(folderPath, 'Layout.tif')     
          print bitPath  
          bpSettings = c4d.BaseContainer()  
          bpSettings[c4d.TEXTURE_FILEFORMAT] = c4d.FILTER_TIF  
          bpSettings[c4d.TEXTURE_WIDTH] = 2000  
          bpSettings[c4d.TEXTURE_HEIGHT] = 1000  
          bpSettings[c4d.TEXTURE_MODE] = c4d.COLORMODE_ARGB  
      
          bodypaint.PaintTexture.CreateNewTexture(bitPath, bpSettings)  
    


  • On 09/02/2015 at 20:42, xxxxxxxx wrote:

    Hi Martin,

    I believe you need to use the $ for the Python strings to work in this case.  Here's the explanation from the Python help, under Template strings:

    https://docs.python.org/2/library/string.html

    Joey Gaspe
    SDK Support Engineer



  • On 10/02/2015 at 02:20, xxxxxxxx wrote:

    Hi Joey,

    I did not get the concept behind the suggestion, if I substitude the template inside CreateNewTexture function, it´s again still a string.
    And on the other hand templates are not accepted by the CreateNewTexture function.
    Could you please explain your thoughts more precisely or even better post a small snippet?

    Thanks in advance!
    Martin



  • On 11/02/2015 at 21:05, xxxxxxxx wrote:

    Hi Martin,

    Sorry, there was a misunderstanding on my part when I got info about this issue, here's the proper explanation:  Something is wrong with the Python API, and there are unfortunately no workarounds or fixes yet at the moment.  The developer in charge of the Cinema 4D Python integration will be made aware.  That's all I can say at the present time.

    Joey Gaspe
    SDK Support Engineer



  • On 12/02/2015 at 03:40, xxxxxxxx wrote:

    Hi Joey,

    Thanks for your effort !
    What a bummer finding four bugs dealing with Bodypaint within three month.
    It would be really great if this module gets a polish.
    It´s a very useful module for my workflow.

    But:
    PaintBitmap.GetDirty() does not update

    AddLayerBmp() does not accept None

    Problems with c4d.COLORBYTES_RGBw

    and
    CreateNewTexture does not accept a string(path)

    Could this thread be moved to the bug report section if someone is searching for.

    Best wishes
    Martin



  • On 16/02/2015 at 13:40, xxxxxxxx wrote:

    Hi Martin,

    I'm glad to hear it's a useful module for your workflow.  Don't worry, the team takes defects seriously and will look into them.  I moved the topic to Bug Reports.

    Joey Gaspe
    SDK Support Engineer



  • On 17/02/2015 at 02:06, xxxxxxxx wrote:

    Hi Joey,

    thanks for your dedicated support!
    Best wishes
    Martin


Log in to reply