<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[GeUserArea - python]]></title><description><![CDATA[<p dir="auto"><em><strong>THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED</strong></em></p>
<p dir="auto"><em>On 16/01/2011 at 16:32, <strong>xxxxxxxx</strong> wrote:</em></p>
<p dir="auto">User Information:<br />
Cinema 4D Version:   12 <br />
Platform:      Mac OSX  ; <br />
Language(s) :       PYTHON  ;</p>
<p dir="auto">---------<br />
   Hi there,</p>
<p dir="auto">I am running into some problems with GeUserArea in Python. Hoping someone can help me with a quick example. I am trying to use a bitmap image in my dialog...</p>
<p dir="auto">Here is what I have so far:</p>
<p dir="auto">class DialogUserArea(c4d.gui.GeUserArea) :<br />
    def GetMinSize(self) :<br />
       self.width = 20<br />
       self.height = 20<br />
       return (self.width, self.height)</p>
<p dir="auto">def DrawMsg(self, x1, y1, x2, y2, msg) :<br />
       bmp = c4d.bitmaps.BaseBitmap()<br />
       startuppath = c4d.storage.GeGetStartupPath()<br />
       path = os.path.join(startuppath, "plugins", "MyPlugin", "icon.tif")<br />
       result, ismovie = bmp.InitWith(path)<br />
       if result == c4d.IMAGERESULT_OK:<br />
           print("load ok!")<br />
           self.DrawBitmap(bmp, 0, 0, bmp.GetBw(), bmp.GetBh(), 0, 0, bmp.GetBw(), bmp.GetBh(), c4d.BMP_NORMALSCALED | c4d.BMP_ALLOWALPHA)<br />
          <br />
   def Redraw(self) :<br />
       bmp = c4d.bitmaps.BaseBitmap()<br />
       startuppath = c4d.storage.GeGetStartupPath()<br />
       path = os.path.join(startuppath, "plugins", "MyPlugin", "icon.tif")<br />
       result, ismovie = bmp.InitWith(path)<br />
           if result == c4d.IMAGERESULT_OK:<br />
               print("load ok!")<br />
               self.DrawBitmap(bmp, 0, 0, bmp.GetBw(), bmp.GetBh(), 0, 0, bmp.GetBw(), bmp.GetBh(), c4d.BMP_NORMALSCALED | c4d.BMP_ALLOWALPHA)</p>
<p dir="auto">In my main dialog class, in CreateLayout()...<br />
self.AddUserArea(id, c4d.BFH_LEFT | c4d.BFV_CENTER, 20, 20)<br />
ua = DialogUserArea()<br />
self.AttachUserArea(ua, id)<br />
ua.LayoutChanged()<br />
ua.Redraw()</p>
<p dir="auto">This seems like it should be correct, except no image loads... I get a blank beveled area where the image should be and no errors in the console - only a print("load ok!") from my test...</p>
]]></description><link>http://developers.maxon.net/forum/topic/5444/5462_geuserarea--python</link><generator>RSS for Node</generator><lastBuildDate>Thu, 14 May 2026 21:57:54 GMT</lastBuildDate><atom:link href="http://developers.maxon.net/forum/topic/5444.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 09 May 2018 17:50:15 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to GeUserArea - python on Wed, 09 May 2018 17:50:15 GMT]]></title><description><![CDATA[<p dir="auto"><em><strong>THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED</strong></em></p>
<p dir="auto"><em>On 16/01/2011 at 17:37, <strong>xxxxxxxx</strong> wrote:</em></p>
<p dir="auto">Ok, I see the problem now (after much frustration)...</p>
<p dir="auto">My user area must be a distinct member of my dialog class, and then everything works like it should. Will try to post example code after I clean everything up.</p>
]]></description><link>http://developers.maxon.net/forum/post/25306</link><guid isPermaLink="true">http://developers.maxon.net/forum/post/25306</guid><dc:creator><![CDATA[Helper]]></dc:creator><pubDate>Wed, 09 May 2018 17:50:15 GMT</pubDate></item></channel></rss>