<?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[BaseDraw::DrawHUDText() - setting color ?]]></title><description><![CDATA[<p dir="auto">I am trying to draw colored text with BaseDraw::DrawHUDText().<br />
Using BaseDraw::SetPen() before, has no effect.</p>
<p dir="auto">Is there any way to draw text with custom color using DrawHUDText funcrtion ?</p>
<p dir="auto">Thanks!</p>
]]></description><link>http://developers.maxon.net/forum/topic/13058/basedraw-drawhudtext-setting-color</link><generator>RSS for Node</generator><lastBuildDate>Wed, 19 Aug 2026 20:37:47 GMT</lastBuildDate><atom:link href="http://developers.maxon.net/forum/topic/13058.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 07 Dec 2020 12:53:32 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to BaseDraw::DrawHUDText() - setting color ? on Thu, 10 Dec 2020 13:31:49 GMT]]></title><description><![CDATA[<p dir="auto">Works like a charm!<br />
It's much more flexible than I hoped;)</p>
<p dir="auto">Thanks a lot!</p>
]]></description><link>http://developers.maxon.net/forum/post/65309</link><guid isPermaLink="true">http://developers.maxon.net/forum/post/65309</guid><dc:creator><![CDATA[WTools3D]]></dc:creator><pubDate>Thu, 10 Dec 2020 13:31:49 GMT</pubDate></item><item><title><![CDATA[Reply to BaseDraw::DrawHUDText() - setting color ? on Tue, 08 Dec 2020 10:36:10 GMT]]></title><description><![CDATA[<p dir="auto">hi,</p>
<p dir="auto">there's no direct function for that but you can retrieve the color parameter of BaseDraw using <a href="https://developers.maxon.net/docs/cpp/2023_2/page_manual_c4datom.html#page_manual_c4datom_parameters" target="_blank" rel="noopener noreferrer nofollow ugc">GetParameter</a></p>
<p dir="auto">An example of a python tag that could display the text: It will work the same with C++.<br />
here I'm not using GetParameter but you get the idea <img src="http://developers.maxon.net/forum/assets/plugins/nodebb-plugin-emoji/emoji/android/1f642.png?v=0b8ddba251d" class="not-responsive emoji emoji-android emoji--slightly_smiling_face" style="height:23px;width:auto;vertical-align:middle" title=":)" alt="🙂" /></p>
<pre><code>import c4d

def draw(bd):
    savedColor = bd[c4d.BASEDRAW_HUD_TEXTCOLOR]
    savedBG = bd[c4d.BASEDRAW_HUD_BACKCOLOR]
    savedOpacity = bd[c4d.BASEDRAW_HUD_BACKOPACITY]

    bd[c4d.BASEDRAW_HUD_TEXTCOLOR]= c4d.Vector(1,0,0)
    bd[c4d.BASEDRAW_HUD_BACKCOLOR]= c4d.Vector(0,1,0)
    bd[c4d.BASEDRAW_HUD_BACKOPACITY] = 0.1
  
    bd.DrawHUDText(50, 50, "my text")
    bd[c4d.BASEDRAW_HUD_TEXTCOLOR]= savedColor
    bd[c4d.BASEDRAW_HUD_BACKCOLOR]= savedBG
    bd[c4d.BASEDRAW_HUD_BACKOPACITY] = savedOpacity

    
def main():
    pass  #put in your code here
</code></pre>
<p dir="auto">you can also have a look at <a href="https://developers.maxon.net/forum/topic/12612/draw-hud-like-text-to-viewport/10" target="_blank" rel="noopener noreferrer nofollow ugc">this thread</a> where you will find some useful informations on how to display a texture on the viewport (and some text on it)</p>
<p dir="auto">Cheers,<br />
Manuel</p>
]]></description><link>http://developers.maxon.net/forum/post/65275</link><guid isPermaLink="true">http://developers.maxon.net/forum/post/65275</guid><dc:creator><![CDATA[Manuel]]></dc:creator><pubDate>Tue, 08 Dec 2020 10:36:10 GMT</pubDate></item></channel></rss>