<?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 Re: GetUVGen() for CHECKER_CLASS_ID in 3ds Max Programming Forum</title>
    <link>https://forums.autodesk.com/t5/3ds-max-programming-forum/getuvgen-for-checker-class-id/m-p/12556298#M1529</link>
    <description>&lt;P&gt;Thanks to everybody!&lt;/P&gt;</description>
    <pubDate>Mon, 12 Feb 2024 22:20:03 GMT</pubDate>
    <dc:creator>A012255</dc:creator>
    <dc:date>2024-02-12T22:20:03Z</dc:date>
    <item>
      <title>GetUVGen() for CHECKER_CLASS_ID</title>
      <link>https://forums.autodesk.com/t5/3ds-max-programming-forum/getuvgen-for-checker-class-id/m-p/12555485#M1523</link>
      <description>&lt;LI-CODE lang="general"&gt;auto tmap = (::Texmap *) ip-&amp;gt;CreateInstance( TEXMAP_CLASS_ID, Class_ID( CHECKER_CLASS_ID, 0 ) );
BitmapTex * bmt = dynamic_cast&amp;lt;BitmapTex *&amp;gt; ( tmap );
StdUVGen * uv = bmt-&amp;gt;GetUVGen();  // &amp;lt;&amp;lt;&amp;lt; FAILS!&lt;/LI-CODE&gt;&lt;P&gt;I need access to "StdUVGen" but have no idea, how to get the pointer for a checker map.&lt;/P&gt;&lt;P&gt;All the samples just show it for a Bitmap map.&lt;/P&gt;</description>
      <pubDate>Mon, 12 Feb 2024 16:14:40 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/3ds-max-programming-forum/getuvgen-for-checker-class-id/m-p/12555485#M1523</guid>
      <dc:creator>istan</dc:creator>
      <dc:date>2024-02-12T16:14:40Z</dc:date>
    </item>
    <item>
      <title>Re: GetUVGen() for CHECKER_CLASS_ID</title>
      <link>https://forums.autodesk.com/t5/3ds-max-programming-forum/getuvgen-for-checker-class-id/m-p/12556151#M1524</link>
      <description>&lt;P&gt;I confirm the failure.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Well... use the GetTheUVGen method of the Texmap class.&lt;/P&gt;</description>
      <pubDate>Mon, 12 Feb 2024 21:07:53 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/3ds-max-programming-forum/getuvgen-for-checker-class-id/m-p/12556151#M1524</guid>
      <dc:creator>denisT.MaxDoctor</dc:creator>
      <dc:date>2024-02-12T21:07:53Z</dc:date>
    </item>
    <item>
      <title>Re: GetUVGen() for CHECKER_CLASS_ID</title>
      <link>https://forums.autodesk.com/t5/3ds-max-programming-forum/getuvgen-for-checker-class-id/m-p/12556154#M1525</link>
      <description>&lt;PRE&gt;auto tmap = (::Texmap *) ip-&amp;gt;CreateInstance( TEXMAP_CLASS_ID, Class_ID( CHECKER_CLASS_ID, 0 ) );
BitmapTex * bmt = dynamic_cast&amp;lt;BitmapTex *&amp;gt; ( tmap );&lt;/PRE&gt;&lt;P class="lia-align-left"&gt;Why do you cast Checker to BitmapTex? It doesn't seem right...&lt;BR /&gt;But as I mentioned earlier, BitmapTex::GetUVGen doesn't work for me.&lt;/P&gt;&lt;P class="lia-align-left"&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 12 Feb 2024 21:13:40 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/3ds-max-programming-forum/getuvgen-for-checker-class-id/m-p/12556154#M1525</guid>
      <dc:creator>denisT.MaxDoctor</dc:creator>
      <dc:date>2024-02-12T21:13:40Z</dc:date>
    </item>
    <item>
      <title>Re: GetUVGen() for CHECKER_CLASS_ID</title>
      <link>https://forums.autodesk.com/t5/3ds-max-programming-forum/getuvgen-for-checker-class-id/m-p/12556253#M1526</link>
      <description>&lt;P&gt;You can cast after that:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;	if (auto tex = (Texmap*)max_ip()-&amp;gt;CreateInstance(TEXMAP_CLASS_ID, Class_ID(CHECKER_CLASS_ID, 0)))
	{
		UVGen* uvgen = tex-&amp;gt;GetTheUVGen();
		StdUVGen* uvstd = dynamic_cast&amp;lt;StdUVGen*&amp;gt;(uvgen);
...
		&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Mon, 12 Feb 2024 22:17:26 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/3ds-max-programming-forum/getuvgen-for-checker-class-id/m-p/12556253#M1526</guid>
      <dc:creator>denisT.MaxDoctor</dc:creator>
      <dc:date>2024-02-12T22:17:26Z</dc:date>
    </item>
    <item>
      <title>Re: GetUVGen() for CHECKER_CLASS_ID</title>
      <link>https://forums.autodesk.com/t5/3ds-max-programming-forum/getuvgen-for-checker-class-id/m-p/12556281#M1527</link>
      <description>&lt;P&gt;you can't cast&amp;nbsp; a Checker map to a BitmapTex and expect it to work &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;do it this way...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;Texmap *checkerMap = (Texmap *) CreateInstance(TEXMAP_CLASS_ID, Class_ID(CHECKER_CLASS_ID,0));
	StdUVGen *uvGen = (StdUVGen*)checkerMap-&amp;gt;GetTheUVGen();&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;to be precise you should get a &lt;STRONG&gt;UVGen&lt;/STRONG&gt; first, then check to see it thats a &lt;STRONG&gt;StdUVGen&lt;/STRONG&gt; with&amp;nbsp;&lt;STRONG&gt;UVGen::IsStdUVGen ()&lt;/STRONG&gt; then cast to&amp;nbsp;&lt;STRONG&gt;StdUVGen, but hey ho &lt;span class="lia-unicode-emoji" title=":grinning_face_with_smiling_eyes:"&gt;😄&lt;/span&gt;&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 12 Feb 2024 22:14:42 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/3ds-max-programming-forum/getuvgen-for-checker-class-id/m-p/12556281#M1527</guid>
      <dc:creator>klvnk</dc:creator>
      <dc:date>2024-02-12T22:14:42Z</dc:date>
    </item>
    <item>
      <title>Re: GetUVGen() for CHECKER_CLASS_ID</title>
      <link>https://forums.autodesk.com/t5/3ds-max-programming-forum/getuvgen-for-checker-class-id/m-p/12556294#M1528</link>
      <description>&lt;P&gt;You are right. This is it:&lt;/P&gt;&lt;LI-CODE lang="general"&gt;StdUVGen * uv = (StdUVGen *) tmap-&amp;gt;GetTheUVGen();&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 12 Feb 2024 22:19:22 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/3ds-max-programming-forum/getuvgen-for-checker-class-id/m-p/12556294#M1528</guid>
      <dc:creator>A012255</dc:creator>
      <dc:date>2024-02-12T22:19:22Z</dc:date>
    </item>
    <item>
      <title>Re: GetUVGen() for CHECKER_CLASS_ID</title>
      <link>https://forums.autodesk.com/t5/3ds-max-programming-forum/getuvgen-for-checker-class-id/m-p/12556298#M1529</link>
      <description>&lt;P&gt;Thanks to everybody!&lt;/P&gt;</description>
      <pubDate>Mon, 12 Feb 2024 22:20:03 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/3ds-max-programming-forum/getuvgen-for-checker-class-id/m-p/12556298#M1529</guid>
      <dc:creator>A012255</dc:creator>
      <dc:date>2024-02-12T22:20:03Z</dc:date>
    </item>
    <item>
      <title>Re: GetUVGen() for CHECKER_CLASS_ID</title>
      <link>https://forums.autodesk.com/t5/3ds-max-programming-forum/getuvgen-for-checker-class-id/m-p/12556302#M1530</link>
      <description>&lt;P&gt;We worked in parallel...&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;&lt;P&gt;It seems like the direct GetUVGen method&amp;nbsp;BitmapTex is not functioning properly.&lt;/P&gt;</description>
      <pubDate>Mon, 12 Feb 2024 22:22:30 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/3ds-max-programming-forum/getuvgen-for-checker-class-id/m-p/12556302#M1530</guid>
      <dc:creator>denisT.MaxDoctor</dc:creator>
      <dc:date>2024-02-12T22:22:30Z</dc:date>
    </item>
    <item>
      <title>Re: GetUVGen() for CHECKER_CLASS_ID</title>
      <link>https://forums.autodesk.com/t5/3ds-max-programming-forum/getuvgen-for-checker-class-id/m-p/12556312#M1531</link>
      <description>&lt;P&gt;I checked it in our exporter seems fine if it is an Actual&amp;nbsp;&lt;SPAN&gt;BitmapTex&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 12 Feb 2024 22:28:20 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/3ds-max-programming-forum/getuvgen-for-checker-class-id/m-p/12556312#M1531</guid>
      <dc:creator>klvnk</dc:creator>
      <dc:date>2024-02-12T22:28:20Z</dc:date>
    </item>
    <item>
      <title>Re: GetUVGen() for CHECKER_CLASS_ID</title>
      <link>https://forums.autodesk.com/t5/3ds-max-programming-forum/getuvgen-for-checker-class-id/m-p/12556318#M1532</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;	if (auto tex = (Texmap*)max_ip()-&amp;gt;CreateInstance(TEXMAP_CLASS_ID, Class_ID(CHECKER_CLASS_ID, 0)))
	{
		UVGen* uvgen = tex-&amp;gt;GetTheUVGen();
		StdUVGen* uvstd = dynamic_cast&amp;lt;StdUVGen*&amp;gt;(uvgen);
...
		&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My understanding is that &lt;STRONG&gt;GetTheUVGen&lt;/STRONG&gt; returns &lt;STRONG&gt;StdUVGen&lt;/STRONG&gt; in general... otherwise dynamic_cast should not have worked. Wouldn't it?&lt;/P&gt;</description>
      <pubDate>Mon, 12 Feb 2024 22:34:14 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/3ds-max-programming-forum/getuvgen-for-checker-class-id/m-p/12556318#M1532</guid>
      <dc:creator>denisT.MaxDoctor</dc:creator>
      <dc:date>2024-02-12T22:34:14Z</dc:date>
    </item>
    <item>
      <title>Re: GetUVGen() for CHECKER_CLASS_ID</title>
      <link>https://forums.autodesk.com/t5/3ds-max-programming-forum/getuvgen-for-checker-class-id/m-p/12556892#M1533</link>
      <description>&lt;LI-CODE lang="general"&gt;UVGen* uvg0 = tex-&amp;gt;GetTheUVGen();
if (uvg0 &amp;amp;&amp;amp; uvg0-&amp;gt;IsStdUVGen()) {
	StdUVGen *uvg = (StdUVGen*)uvg0;
	uvg-&amp;gt;InitSlotType(MAPSLOT_ENVIRON);
	uvg-&amp;gt;SetCoordMapping(UVMAP_SPHERE_ENV);
}&lt;/LI-CODE&gt;&lt;P&gt;Look at this code snippet from the examples. IMHO it's self explaining (if it's working).&lt;/P&gt;&lt;P&gt;For me all clarified. Thank you Denis &amp;amp; klvnk.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 13 Feb 2024 07:40:31 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/3ds-max-programming-forum/getuvgen-for-checker-class-id/m-p/12556892#M1533</guid>
      <dc:creator>istan</dc:creator>
      <dc:date>2024-02-13T07:40:31Z</dc:date>
    </item>
    <item>
      <title>Re: GetUVGen() for CHECKER_CLASS_ID</title>
      <link>https://forums.autodesk.com/t5/3ds-max-programming-forum/getuvgen-for-checker-class-id/m-p/12557059#M1534</link>
      <description>&lt;P&gt;Here is what the header says:&lt;/P&gt;&lt;LI-CODE lang="general"&gt;virtual BOOL IsStdUVGen() { return FALSE; } // class StdUVGen implements this to return TRUE&lt;/LI-CODE&gt;&lt;P&gt;&lt;STRONG&gt;virtual&lt;/STRONG&gt; (!)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The question is: if it's not &lt;STRONG&gt;StdUVGen&lt;/STRONG&gt;, what is it? The documentation mentions either &lt;STRONG&gt;StdXYZGen&lt;/STRONG&gt; or a custom&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":rolling_on_the_floor_laughing:"&gt;🤣&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 13 Feb 2024 09:12:14 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/3ds-max-programming-forum/getuvgen-for-checker-class-id/m-p/12557059#M1534</guid>
      <dc:creator>denisT.MaxDoctor</dc:creator>
      <dc:date>2024-02-13T09:12:14Z</dc:date>
    </item>
    <item>
      <title>Re: GetUVGen() for CHECKER_CLASS_ID</title>
      <link>https://forums.autodesk.com/t5/3ds-max-programming-forum/getuvgen-for-checker-class-id/m-p/12557183#M1535</link>
      <description>&lt;P&gt;a custom implementation that derives from UVGen that returns false from&amp;nbsp;&lt;STRONG&gt;IsStdUVGen&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 13 Feb 2024 10:11:19 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/3ds-max-programming-forum/getuvgen-for-checker-class-id/m-p/12557183#M1535</guid>
      <dc:creator>klvnk</dc:creator>
      <dc:date>2024-02-13T10:11:19Z</dc:date>
    </item>
    <item>
      <title>Re: GetUVGen() for CHECKER_CLASS_ID</title>
      <link>https://forums.autodesk.com/t5/3ds-max-programming-forum/getuvgen-for-checker-class-id/m-p/12557189#M1536</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/1794911"&gt;@klvnk&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;&lt;P&gt;a custom implementation that derives from UVGen that returns false from&amp;nbsp;&lt;STRONG&gt;IsStdUVGen&lt;/STRONG&gt;&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Yes. What is about StdXYZGen?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 13 Feb 2024 10:18:53 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/3ds-max-programming-forum/getuvgen-for-checker-class-id/m-p/12557189#M1536</guid>
      <dc:creator>denisT.MaxDoctor</dc:creator>
      <dc:date>2024-02-13T10:18:53Z</dc:date>
    </item>
    <item>
      <title>Re: GetUVGen() for CHECKER_CLASS_ID</title>
      <link>https://forums.autodesk.com/t5/3ds-max-programming-forum/getuvgen-for-checker-class-id/m-p/12557221#M1537</link>
      <description>&lt;P&gt;Haha! I found how easy to crash the MAX:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;meditmaterials[1] = c = checker()
c.coords = StandardXYZGen()&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;... and try to open the Material Editor&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":winking_face_with_tongue:"&gt;😜&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRIKE&gt;but for texmaps those need StdXYZGen it's safe:&lt;/STRIKE&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;meditmaterials[2] = d = dent()
d.coords = StandardUVGen()&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;PS. No! Both setting UV in place of XYZ or XYZ in place of UV will cause MAX to crash&lt;/P&gt;&lt;P&gt;This is interesting because I can't find a way to check what type of Map Coordinates a texture map class needs.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 13 Feb 2024 11:09:38 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/3ds-max-programming-forum/getuvgen-for-checker-class-id/m-p/12557221#M1537</guid>
      <dc:creator>denisT.MaxDoctor</dc:creator>
      <dc:date>2024-02-13T11:09:38Z</dc:date>
    </item>
  </channel>
</rss>

