<?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[&#x27;CreateNewTexture&#x27;: identifier not found]]></title><description><![CDATA[<p dir="auto">Hey guys,</p>
<p dir="auto">I have the following code:</p>
<pre><code>#include "c4d.h"

...

Filename path = "C:\\path\\uv-islands-matte-01.png";
BaseContainer settings;
settings.SetInt32(TEXTURE_WIDTH, 1024);
settings.SetInt32(TEXTURE_HEIGHT, 1024);

PaintTexture* paintTexture = CreateNewTexture(path, settings);
if (!paintTexture) {
    ApplicationOutput("Failed to create a new paint texture.");
    return TRUE;
}
</code></pre>
<p dir="auto">Upon building my solution in Visual Studio 2019, I get the following error:</p>
<pre><code>Error C3861 'CreateNewTexture': identifier not found
</code></pre>
<p dir="auto">Shouldn't <code>CreateNewTexture()</code> be already available, given that I am including <code>c4d.h</code>? I've tried brute-forcing the import by adding <code>#include &lt;c4d_painter.h&gt;</code> at the top of my script, but this obviously didn't help.</p>
<p dir="auto"><strong>Additional context:</strong></p>
<p dir="auto">I am trying to create a "matte" bitmap image of my currently selected Object, where the UV islands of my Object are pure white, while the background (i.e. non-UV islands) is pure black.</p>
<p dir="auto">This should be doable by programmatically by creating a new texture with a black background, then selecting all polygons in Polygon Mode by using <code>CallCommand</code> / <code>SendModelingCommand</code>, then executing the command "Fill Polygons" with the white foreground color and then finally saving the results. I'm not sure if this is all entirely possible with the current SDK, but I can compromise on some parts.</p>
<p dir="auto">Either way, I can't go too far with the plan outlined above, given how <code>CreateNewTexture()</code> is not working to begin with.</p>
<p dir="auto">Any insight / guidance would be very much appreciated. Here's hoping that this is just some silly oversight on my part.</p>
<p dir="auto">Thank you!</p>
]]></description><link>http://developers.maxon.net/forum/topic/15362/createnewtexture-identifier-not-found</link><generator>RSS for Node</generator><lastBuildDate>Fri, 14 Aug 2026 13:02:38 GMT</lastBuildDate><atom:link href="http://developers.maxon.net/forum/topic/15362.rss" rel="self" type="application/rss+xml"/><pubDate>Sun, 04 Feb 2024 21:42:07 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to &#x27;CreateNewTexture&#x27;: identifier not found on Tue, 06 Feb 2024 06:24:10 GMT]]></title><description><![CDATA[<p dir="auto">Edit: Nevermind. Once again, a silly oversight. I hadn't provided enough <code>TEXTURE</code>-type settings to the BaseContainer, such as <code>TEXTURE_FILEFORMAT</code>.</p>
<p dir="auto">Apologies!</p>
]]></description><link>http://developers.maxon.net/forum/post/73697</link><guid isPermaLink="true">http://developers.maxon.net/forum/post/73697</guid><dc:creator><![CDATA[sasha_janvier]]></dc:creator><pubDate>Tue, 06 Feb 2024 06:24:10 GMT</pubDate></item><item><title><![CDATA[Reply to &#x27;CreateNewTexture&#x27;: identifier not found on Tue, 06 Feb 2024 00:54:19 GMT]]></title><description><![CDATA[<p dir="auto">It seems like executing the code I provided in my first message (along with your revision) in Cinema 4D triggers a breakpoint error in Visual Studio 2019.</p>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/forum/user/ferdinand">@<bdi>ferdinand</bdi></a> Are you by any chance able to reproduce this?</p>
<p dir="auto">I've tried using <code>SetParameter()</code> instead of <code>SetInt32()</code> with the right nomenclature/format, and it only lead to more errors.</p>
<p dir="auto">I hope this isn't yet another oversight on my part. I've spent quite some time digging through the forum and looking at examples in the <a href="https://github.com/PluginCafe/cinema4d_cpp_sdk_extended" target="_blank" rel="noopener noreferrer nofollow ugc">GitHub repo</a> (not the <code>CreateNewTexture()</code> as there are no examples of that, but examples of setting parameters). So far, no success.</p>
<p dir="auto">Thank you once again.</p>
]]></description><link>http://developers.maxon.net/forum/post/73695</link><guid isPermaLink="true">http://developers.maxon.net/forum/post/73695</guid><dc:creator><![CDATA[sasha_janvier]]></dc:creator><pubDate>Tue, 06 Feb 2024 00:54:19 GMT</pubDate></item><item><title><![CDATA[Reply to &#x27;CreateNewTexture&#x27;: identifier not found on Mon, 05 Feb 2024 17:59:37 GMT]]></title><description><![CDATA[<p dir="auto">Ah! Thank you so very much once again, <a class="plugin-mentions-user plugin-mentions-a" href="/forum/user/ferdinand">@<bdi>ferdinand</bdi></a>! I was right about it being a silly oversight on my part. Much appreciated!</p>
<blockquote>
<p dir="auto">PS: I am still on the alpha/bitmap thing, we did not find a solution on Friday.</p>
</blockquote>
<p dir="auto">Thank you for the update! I was considering messaging you about this.</p>
<p dir="auto">For now, I am trying to move forward as much as possible without the alpha channel. Here's hoping that you guys can solve this eventually <img src="http://developers.maxon.net/forum/assets/plugins/nodebb-plugin-emoji/emoji/android/1f91e.png?v=0b8ddba251d" class="not-responsive emoji emoji-android emoji--hand_with_index_and_middle_fingers_crossed" style="height:23px;width:auto;vertical-align:middle" title=":hand_with_index_and_middle_fingers_crossed:" alt="🤞" /></p>
<p dir="auto">Thanks again and please, if possible, keep me in the loop!</p>
]]></description><link>http://developers.maxon.net/forum/post/73687</link><guid isPermaLink="true">http://developers.maxon.net/forum/post/73687</guid><dc:creator><![CDATA[sasha_janvier]]></dc:creator><pubDate>Mon, 05 Feb 2024 17:59:37 GMT</pubDate></item><item><title><![CDATA[Reply to &#x27;CreateNewTexture&#x27;: identifier not found on Mon, 05 Feb 2024 09:19:25 GMT]]></title><description><![CDATA[<p dir="auto">Hello <a class="plugin-mentions-user plugin-mentions-a" href="/forum/user/sasha_janvier">@<bdi>sasha_janvier</bdi></a>,</p>
<p dir="auto">thank you for reaching out to us. <a href="https://developers.maxon.net/docs/cpp/2024_2_0/class_paint_texture.html#ab80fe828ff352b04b05f1e2836262c81" target="_blank" rel="noopener noreferrer nofollow ugc">PaintTexture::CreateNewTexture</a> is a static method of <code>PaintTexture</code>, so your statement should look like this:</p>
<pre><code class="language-cpp">PaintTexture* const paintTexture = PaintTexture::CreateNewTexture(path, settings);
</code></pre>
<blockquote>
<p dir="auto"><img src="http://developers.maxon.net/forum/assets/plugins/nodebb-plugin-emoji/emoji/android/2139.png?v=0b8ddba251d" class="not-responsive emoji emoji-android emoji--information_source" style="height:23px;width:auto;vertical-align:middle" title=":information_source:" alt="ℹ" />  You should  avoid umbrella includes such as <code>#include "c4d.h"</code>. For once they can significantly increase your compile times (not that much of a problem in the SDK context), but they also obfuscate your dependencies and what you are doing in a file.</p>
</blockquote>
<p dir="auto">Cheers,<br />
Ferdinand</p>
<p dir="auto">PS: I am still on the alpha/bitmap thing, we did not find a solution on Friday.</p>
]]></description><link>http://developers.maxon.net/forum/post/73684</link><guid isPermaLink="true">http://developers.maxon.net/forum/post/73684</guid><dc:creator><![CDATA[ferdinand]]></dc:creator><pubDate>Mon, 05 Feb 2024 09:19:25 GMT</pubDate></item></channel></rss>