<?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[DrawHUDText issue with viewport camera navigation]]></title><description><![CDATA[<p dir="auto">Hi!</p>
<p dir="auto">I made an script back in C4D 2023 to draw some information on the viewport (filename, camera lens, frame number, etc). It was working perfectly in C4D 2023, but in 2024 it is glitching the viewport camera navigation.</p>
<p dir="auto">It's like the drawn text is in front of everything and when you click to orbit the camera, you click on the drawn text instead of the object.</p>
<p dir="auto">Let me try to explain with some GIFs.<br />
2023: I click on the corner of the cube to orbit the camera around it and it works.<br />
<img src="/forum/assets/uploads/files/1708633342420-cinema_4d_ocpcaax3qm.gif" alt="Cinema_4D_ocPCAax3qM.gif" class=" img-fluid img-markdown" /></p>
<p dir="auto">2024: I click on the corner of the cube to orbit the camera and the orbit pivot insn't on the cube, but on the center of the screen.<br />
<img src="/forum/assets/uploads/files/1708633381975-cinema_4d_hshckrzn05.mp4_1024px_24fps.gif" alt="Cinema_4D_HsHckRZN05.mp4_1024px_24fps.gif" class=" img-fluid img-markdown" /></p>
<p dir="auto">It's not about the navigation mode, I already made sure I'm on the "mouse" mode.<br />
<img src="/forum/assets/uploads/files/1708633468377-bb6d1516-d622-4351-8780-ee9bc7318b0a-image.png" alt="bb6d1516-d622-4351-8780-ee9bc7318b0a-image.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">When I delete the script on 2024, everything goes back to the normal, so I know the problem is the script.</p>
<p dir="auto">and here it is, it's on a python tag:</p>
<pre><code># Playblast Overlay by Flavio Diniz
import c4d

def main() -&gt; None:
    pass

def draw(bd: c4d.BaseDraw) -&gt; bool:
    bd = doc.GetActiveBaseDraw()

    frame = bd.GetFrame()
    right = frame["cr"]
    bottom = frame["cb"]

    camera = "Camera: "+ bd.GetSceneCamera(doc).GetName()
    filename =  doc[c4d.DOCUMENT_FILEPATH].split("\\",-1)[-1]
    focal = str(bd.GetSceneCamera(doc)[c4d.RSCAMERAOBJECT_FOCAL_LENGTH]) +" mm"
    frame = "Frame: "+ str(doc[c4d.DOCUMENT_TIME].GetFrame(doc.GetFps()))

    bd.DrawHUDText(int(right /2)-300, int(bottom)-20, "{0}   |   {1} - {2}   |   {3}".format(filename, camera, focal, frame))

    return c4d.DRAWRESULT_OK
</code></pre>
<p dir="auto">Does anyone have any idea of what could be happening ?<br />
Thanks!</p>
<p dir="auto">Flavio Diniz</p>
]]></description><link>http://developers.maxon.net/forum/topic/15394/drawhudtext-issue-with-viewport-camera-navigation</link><generator>RSS for Node</generator><lastBuildDate>Fri, 17 Jul 2026 09:02:33 GMT</lastBuildDate><atom:link href="http://developers.maxon.net/forum/topic/15394.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 22 Feb 2024 20:28:30 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to DrawHUDText issue with viewport camera navigation on Wed, 09 Apr 2025 20:18:51 GMT]]></title><description><![CDATA[<p dir="auto">Thanks a lot <a class="plugin-mentions-user plugin-mentions-a" href="/forum/user/i_mazlov">@<bdi>i_mazlov</bdi></a> !<br />
The issue is solved !</p>
]]></description><link>http://developers.maxon.net/forum/post/76264</link><guid isPermaLink="true">http://developers.maxon.net/forum/post/76264</guid><dc:creator><![CDATA[FlavioDiniz]]></dc:creator><pubDate>Wed, 09 Apr 2025 20:18:51 GMT</pubDate></item><item><title><![CDATA[Reply to DrawHUDText issue with viewport camera navigation on Wed, 09 Apr 2025 07:42:42 GMT]]></title><description><![CDATA[<p dir="auto">Hi Flavio Diniz,</p>
<p dir="auto">The ticket has been fixed and closed. The C4D side fix is present at least in Cinema 4D 2025.2.0.</p>
<p dir="auto">Let me also share the developer's comment from the ticket:</p>
<blockquote>
<p dir="auto">2 things are broken: C4D and the python tag. Once C4D is fixed, try again after changing the code in the python tag:</p>
</blockquote>
<pre><code class="language-python">import c4d
def main() -&gt; None:
    pass
def draw(bd: c4d.BaseDraw) -&gt; bool:
    if bd.GetDrawPass() != c4d.DRAWPASS_OBJECT or bd.GetDrawParam(c4d.BASEDRAW_IS_PICK_OBJECT):
        return True

    frame = bd.GetFrame()
    right = frame["cr"]
    bottom = frame["cb"]
    bd.DrawHUDText(int(right / 2) - 100, int(bottom) - 20, "Hello World!")
    return True
</code></pre>
<blockquote>
<p dir="auto">The important thing is to draw only in the drawpasses in which it makes sense to draw.</p>
</blockquote>
<p dir="auto">Cheers,<br />
Ilia</p>
]]></description><link>http://developers.maxon.net/forum/post/76258</link><guid isPermaLink="true">http://developers.maxon.net/forum/post/76258</guid><dc:creator><![CDATA[i_mazlov]]></dc:creator><pubDate>Wed, 09 Apr 2025 07:42:42 GMT</pubDate></item><item><title><![CDATA[Reply to DrawHUDText issue with viewport camera navigation on Thu, 07 Mar 2024 15:35:08 GMT]]></title><description><![CDATA[<p dir="auto">I think it must be a bug ! and I'm surprised I haven't heard anyone talking about this so far, since the "DrawHUDText" is so common for people to use <img src="http://developers.maxon.net/forum/assets/plugins/nodebb-plugin-emoji/emoji/android/1f914.png?v=0b8ddba251d" class="not-responsive emoji emoji-android emoji--thinking_face" style="height:23px;width:auto;vertical-align:middle" title="🤔" alt="🤔" /><br />
I also noticed the same problem happening with "DrawMultipleHUDText".</p>
<p dir="auto">Thanks!<br />
Flavio Diniz</p>
]]></description><link>http://developers.maxon.net/forum/post/73959</link><guid isPermaLink="true">http://developers.maxon.net/forum/post/73959</guid><dc:creator><![CDATA[FlavioDiniz]]></dc:creator><pubDate>Thu, 07 Mar 2024 15:35:08 GMT</pubDate></item><item><title><![CDATA[Reply to DrawHUDText issue with viewport camera navigation on Thu, 29 Feb 2024 14:54:02 GMT]]></title><description><![CDATA[<p dir="auto">Hi Flavio,</p>
<p dir="auto">Thanks for reaching out to us. Please excuse the delay.</p>
<p dir="auto">I've created a ticket in our internal bug tracking system for this issue.</p>
<p dir="auto">Cheers,<br />
Ilia</p>
]]></description><link>http://developers.maxon.net/forum/post/73875</link><guid isPermaLink="true">http://developers.maxon.net/forum/post/73875</guid><dc:creator><![CDATA[i_mazlov]]></dc:creator><pubDate>Thu, 29 Feb 2024 14:54:02 GMT</pubDate></item></channel></rss>