<?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 How to create  new texture material in Archicad C++ API</title>
    <link>https://community.graphisoft.com/t5/Archicad-C-API/How-to-create-new-texture-material/m-p/257497#M5531</link>
    <description>&lt;DIV class="actalk-migrated-content"&gt;
&lt;PRE&gt;&lt;I&gt;
&lt;/I&gt;			API_Attribute      attrib;
			API_RGBColor	   rgbC;
			short              ltypeIndex;
			GSErrCode          err;

			BNZeroMemory (&amp;amp;attrib, sizeof (API_Attribute));
			BNZeroMemory (&amp;amp;rgbC, sizeof (API_RGBColor));
			attrib.header.typeID = API_MaterialID;
			rgbC.f_red = 1.0;		rgbC.f_green = 0.0;		rgbC.f_blue = 0.0;

			//SetOption
			attrib.material.ambientPc = 66;
			attrib.material.diffusePc  = 90;

			//Color Mode
			//attrib.material.emissionRGB  = rgbC;

			//Select picture
			GS::UniString	tmp ("material_pic");
			GS::ucsncpy (attrib.material.texture.texName, tmp.ToUStr(), 100 / sizeof (GS::UniChar) - 1);
			//Set name
			sprintf (attrib.material.head.name, "material_test");

			err = ACAPI_Attribute_Create (&amp;amp;attrib, NULL);
&lt;/PRE&gt;
&lt;/DIV&gt;</description>
    <pubDate>Tue, 01 Aug 2023 11:27:18 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2023-08-01T11:27:18Z</dc:date>
    <item>
      <title>How to create  new texture material</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/How-to-create-new-texture-material/m-p/257497#M5531</link>
      <description>&lt;DIV class="actalk-migrated-content"&gt;
&lt;PRE&gt;&lt;I&gt;
&lt;/I&gt;			API_Attribute      attrib;
			API_RGBColor	   rgbC;
			short              ltypeIndex;
			GSErrCode          err;

			BNZeroMemory (&amp;amp;attrib, sizeof (API_Attribute));
			BNZeroMemory (&amp;amp;rgbC, sizeof (API_RGBColor));
			attrib.header.typeID = API_MaterialID;
			rgbC.f_red = 1.0;		rgbC.f_green = 0.0;		rgbC.f_blue = 0.0;

			//SetOption
			attrib.material.ambientPc = 66;
			attrib.material.diffusePc  = 90;

			//Color Mode
			//attrib.material.emissionRGB  = rgbC;

			//Select picture
			GS::UniString	tmp ("material_pic");
			GS::ucsncpy (attrib.material.texture.texName, tmp.ToUStr(), 100 / sizeof (GS::UniChar) - 1);
			//Set name
			sprintf (attrib.material.head.name, "material_test");

			err = ACAPI_Attribute_Create (&amp;amp;attrib, NULL);
&lt;/PRE&gt;
&lt;/DIV&gt;</description>
      <pubDate>Tue, 01 Aug 2023 11:27:18 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/How-to-create-new-texture-material/m-p/257497#M5531</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-08-01T11:27:18Z</dc:date>
    </item>
  </channel>
</rss>

