<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Material-&amp;gt;GetTextureIndex() always return zero in Archicad C++ API</title>
    <link>https://community.graphisoft.com/t5/Archicad-C-API/Material-gt-GetTextureIndex-always-return-zero/m-p/192521#M6613</link>
    <description>&lt;DIV class="actalk-migrated-content"&gt;Hi! &lt;BR /&gt;&lt;BR /&gt;I try write rendering Add-on (use reference Rendering DevKit) for ArchiCAD 11. &lt;BR /&gt;&lt;BR /&gt;But I can't solve one problem: &lt;BR /&gt;&lt;BR /&gt;When i create wrapper for &lt;STRONG&gt;MaterialDialogInterfaceImp&lt;/STRONG&gt; interface, in event &lt;STRONG&gt;UpdatePreview&lt;/STRONG&gt; I can't get material's texture. &lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;Material-&amp;gt;GetTextureIndex()&lt;/STRONG&gt; always return zero. &lt;BR /&gt;
&lt;PRE&gt;bool AMMaterialDialogInterface::UpdatePreview (GSModeler::Material*    material, 
          void*       previewData, 
          long        previewDataSize, 
          const GSModeler::DrawingContext&amp;amp; drawingContext, 
          GSModeler::PixelMap*    pixelMap) 
{ 
Report("AMMaterialDialogInterface::UpdatePreview: texture index=%d\n", material-&amp;gt;GetTextureIndex()); 
...&lt;/PRE&gt;
&lt;BR /&gt;&lt;BR /&gt;During thus time, &lt;STRONG&gt;material-&amp;gt;GetTextureName(...)&lt;/STRONG&gt; return correct texture name. &lt;BR /&gt;&lt;BR /&gt;Whats wrong? &lt;BR /&gt;Sorry my english.&lt;/DIV&gt;</description>
    <pubDate>Thu, 03 Aug 2023 15:21:15 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2023-08-03T15:21:15Z</dc:date>
    <item>
      <title>Material-&gt;GetTextureIndex() always return zero</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Material-gt-GetTextureIndex-always-return-zero/m-p/192521#M6613</link>
      <description>&lt;DIV class="actalk-migrated-content"&gt;Hi! &lt;BR /&gt;&lt;BR /&gt;I try write rendering Add-on (use reference Rendering DevKit) for ArchiCAD 11. &lt;BR /&gt;&lt;BR /&gt;But I can't solve one problem: &lt;BR /&gt;&lt;BR /&gt;When i create wrapper for &lt;STRONG&gt;MaterialDialogInterfaceImp&lt;/STRONG&gt; interface, in event &lt;STRONG&gt;UpdatePreview&lt;/STRONG&gt; I can't get material's texture. &lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;Material-&amp;gt;GetTextureIndex()&lt;/STRONG&gt; always return zero. &lt;BR /&gt;
&lt;PRE&gt;bool AMMaterialDialogInterface::UpdatePreview (GSModeler::Material*    material, 
          void*       previewData, 
          long        previewDataSize, 
          const GSModeler::DrawingContext&amp;amp; drawingContext, 
          GSModeler::PixelMap*    pixelMap) 
{ 
Report("AMMaterialDialogInterface::UpdatePreview: texture index=%d\n", material-&amp;gt;GetTextureIndex()); 
...&lt;/PRE&gt;
&lt;BR /&gt;&lt;BR /&gt;During thus time, &lt;STRONG&gt;material-&amp;gt;GetTextureName(...)&lt;/STRONG&gt; return correct texture name. &lt;BR /&gt;&lt;BR /&gt;Whats wrong? &lt;BR /&gt;Sorry my english.&lt;/DIV&gt;</description>
      <pubDate>Thu, 03 Aug 2023 15:21:15 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Material-gt-GetTextureIndex-always-return-zero/m-p/192521#M6613</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-08-03T15:21:15Z</dc:date>
    </item>
  </channel>
</rss>

