<?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[Is there a Python equivalent of SceneHookData::Draw()?]]></title><description><![CDATA[<p dir="auto">Hey community,</p>
<p dir="auto">I'd like to develop a viewport helper plugin in Python that displays dimension lines, values, and units for the currently selected objects, making it easier to assess their actual size and proportions.</p>
<p dir="auto">I'd like this display to work alongside the native Move, Rotate, and Scale tools, without adding helper objects to the scene or attaching tags to the objects.</p>
<p dir="auto">While looking through the SDK, I found that  <code>SceneHookData::Draw()</code><br />
in C++ seems suitable for this purpose, but I haven't found an equivalent interface in Python.</p>
<p dir="auto"><em>I'm currently building a C++ version of the plugin, but I'd still like to see equivalent viewport drawing support added to Python.</em></p>
<p dir="auto">Is there a similar interface in Python, or another way to achieve this under these constraints? If not, are there any plans to expose <strong>SceneHookData</strong>, particularly its Draw() callback, to Python?</p>
<p dir="auto">Cheers,<br />
Anlv</p>
]]></description><link>http://developers.maxon.net/forum/topic/16446/is-there-a-python-equivalent-of-scenehookdata-draw</link><generator>RSS for Node</generator><lastBuildDate>Wed, 14 Oct 2026 07:26:23 GMT</lastBuildDate><atom:link href="http://developers.maxon.net/forum/topic/16446.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 13 Oct 2026 06:56:15 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Is there a Python equivalent of SceneHookData::Draw()? on Tue, 13 Oct 2026 14:55:52 GMT]]></title><description><![CDATA[<p dir="auto">Hi <a class="plugin-mentions-user plugin-mentions-a" href="/forum/user/ferdinand">@<bdi>ferdinand</bdi></a> ,</p>
<p dir="auto">Yes, I do need the dimension overlay to coexist with another active tool. The plugin is mainly intended to help adjust objects to realistic dimensions and proportions.</p>
<p dir="auto">When precise dimensions are not required, the overlay helps me quickly resize and place objects in the scene. Once that is done, I can turn off the dimension overlay.</p>
<p dir="auto">The plugin can be enabled or disabled directly and includes some settings, with usage similar to the <strong>Symmetry</strong> tool. Inactive objects do not display dimension information, and grouped objects are measured as a whole, so the viewport does not become a sea of dimension annotations<img src="http://developers.maxon.net/forum/assets/plugins/nodebb-plugin-emoji/emoji/android/1f917.png?v=0b8ddba251d" class="not-responsive emoji emoji-android emoji--hugging_face" style="height:23px;width:auto;vertical-align:middle" title=":hugging_face:" alt="🤗" /> .</p>
<p dir="auto">Cheers,<br />
Anlv</p>
]]></description><link>http://developers.maxon.net/forum/post/77364</link><guid isPermaLink="true">http://developers.maxon.net/forum/post/77364</guid><dc:creator><![CDATA[Anlv]]></dc:creator><pubDate>Tue, 13 Oct 2026 14:55:52 GMT</pubDate></item><item><title><![CDATA[Reply to Is there a Python equivalent of SceneHookData::Draw()? on Tue, 13 Oct 2026 14:30:48 GMT]]></title><description><![CDATA[<p dir="auto">Unless I misunderstand the scope of the tool, you could implement this as a tool because a tool can draw. But with the caveat that the user has to enable it. But doing something like this as a scene hook is not great, even in C++. The reason is UX. Either you implement it as a pure scene hook with no feedback, then the user is stuck with always having this bounding box shown on the selected object. Or you add some kind of toggle that enables or disables it, but then you are already pretty close to reimplementing a tool.</p>
<p dir="auto">Question is: Do you really need this bounding box overlay to be able to coexist next to another activated tool. If so, you need a scene hook. Otherwise you should go with a tool.</p>
<p dir="auto">Cheers,<br />
Ferdinand</p>
]]></description><link>http://developers.maxon.net/forum/post/77363</link><guid isPermaLink="true">http://developers.maxon.net/forum/post/77363</guid><dc:creator><![CDATA[ferdinand]]></dc:creator><pubDate>Tue, 13 Oct 2026 14:30:48 GMT</pubDate></item><item><title><![CDATA[Reply to Is there a Python equivalent of SceneHookData::Draw()? on Tue, 13 Oct 2026 14:17:17 GMT]]></title><description><![CDATA[<p dir="auto">Hey <a class="plugin-mentions-user plugin-mentions-a" href="/forum/user/ferdinand">@<bdi>ferdinand</bdi></a>,</p>
<p dir="auto">Thanks for your reply. When building this plugin in Python, I implemented move, scale, and rotate functionality within the plugin, since switching to C4D’s native tools would stop the dimension information from being drawn.</p>
<p dir="auto">However, this made the plugin rather bloated, and the performance was indeed less than ideal. Having to maintain those transform functions myself also felt like reinventing the wheel.</p>
<p dir="auto">I’ve now completed the C++ version of the plugin, and I’m very happy with it so far. Going forward, I’ll probably choose between C++ and Python depending on the use case.</p>
<p dir="auto">Demo Video:</p>
<p dir="auto"><video class="embed-video-local" controls src="/forum/assets/uploads/files/1791900902127-rec_20261013_221336_543_369679.mp4">
<p dir="auto">Cheers~<br />
Anlv</p>
</video></p>]]></description><link>http://developers.maxon.net/forum/post/77362</link><guid isPermaLink="true">http://developers.maxon.net/forum/post/77362</guid><dc:creator><![CDATA[Anlv]]></dc:creator><pubDate>Tue, 13 Oct 2026 14:17:17 GMT</pubDate></item><item><title><![CDATA[Reply to Is there a Python equivalent of SceneHookData::Draw()? on Tue, 13 Oct 2026 14:24:58 GMT]]></title><description><![CDATA[<p dir="auto">Hey Anlv,</p>
<p dir="auto">thank you for reaching out  to us.</p>
<p dir="auto">There is no <code>SceneHookData</code> equivalent in Python yet. In this cycle we just tested internally a prototype but we haven't made a choice there yet. The main concern is performance, especially of <code>Draw</code>. It is currently unclear if we will ever go forward with the idea of a Python <code>SceneHookData</code>.</p>
<p dir="auto">The workaround we suggested in the past was to add a hidden object to a scene via a <code>MessageData</code> handler or any other node that has the methods you need. But that is not really better performance wise. In general is the idea to have a Python plugin which draws in each an every scene a bit of a mixed bag. I personally think it is not that much of a deal, because when the plugin slows down Cinema because the author wrote terrible <code>Draw</code> code, the user can just uninstall it. Some of my colleagues are more of the stance that we should not allow such setups at all, as the average user might be unable to pinpoint the plugin as the source of slowdowns.</p>
<p dir="auto">Cheers,<br />
Ferdinand</p>
]]></description><link>http://developers.maxon.net/forum/post/77361</link><guid isPermaLink="true">http://developers.maxon.net/forum/post/77361</guid><dc:creator><![CDATA[ferdinand]]></dc:creator><pubDate>Tue, 13 Oct 2026 14:24:58 GMT</pubDate></item></channel></rss>