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

    Bodypaint new Texture

    Scheduled Pinned Locked Moved Bugs
    7 Posts 0 Posters 1.3k 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 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:
      _static_ PaintTexture.CreateNewTexture( _path_ , _settings_ )[URL-REMOVED]

      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)  
      

      [URL-REMOVED] @maxon: This section contained a non-resolving link which has been removed.

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

        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

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

          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

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

            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

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

              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

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

                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

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

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

                  Hi Joey,

                  thanks for your dedicated support!
                  Best wishes
                  Martin

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