<?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 Custom Flow Node to Change a Material in Stingray Forum (Read Only)</title>
    <link>https://forums.autodesk.com/t5/stingray-forum-read-only/custom-flow-node-to-change-a-material/m-p/6447295#M7499</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I am trying to replicate this tutorial but I can make it work.&lt;/P&gt;&lt;P&gt;I am trying to learn stingray, my ultimate goal would be create some interaction for the user to choose different colors or materials for the scene. &amp;nbsp;All this in an ArchViz environment.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.youtube.com/watch?v=OHn-ZZlUqKg" target="_blank"&gt;https://www.youtube.com/watch?v=OHn-ZZlUqKg&lt;/A&gt;&lt;/P&gt;&lt;P&gt;I just created a simple scene, followed the same steps explained at the beginning of this video but I does not respond.&lt;/P&gt;&lt;P&gt;All I get is the text debugging, displaying the info, but the material is not changing the color.&lt;/P&gt;&lt;P&gt;Any help is appreciated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 19 Jul 2016 15:07:26 GMT</pubDate>
    <dc:creator>Francisco_Penaloza</dc:creator>
    <dc:date>2016-07-19T15:07:26Z</dc:date>
    <item>
      <title>Custom Flow Node to Change a Material</title>
      <link>https://forums.autodesk.com/t5/stingray-forum-read-only/custom-flow-node-to-change-a-material/m-p/6447295#M7499</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I am trying to replicate this tutorial but I can make it work.&lt;/P&gt;&lt;P&gt;I am trying to learn stingray, my ultimate goal would be create some interaction for the user to choose different colors or materials for the scene. &amp;nbsp;All this in an ArchViz environment.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.youtube.com/watch?v=OHn-ZZlUqKg" target="_blank"&gt;https://www.youtube.com/watch?v=OHn-ZZlUqKg&lt;/A&gt;&lt;/P&gt;&lt;P&gt;I just created a simple scene, followed the same steps explained at the beginning of this video but I does not respond.&lt;/P&gt;&lt;P&gt;All I get is the text debugging, displaying the info, but the material is not changing the color.&lt;/P&gt;&lt;P&gt;Any help is appreciated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 19 Jul 2016 15:07:26 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/stingray-forum-read-only/custom-flow-node-to-change-a-material/m-p/6447295#M7499</guid>
      <dc:creator>Francisco_Penaloza</dc:creator>
      <dc:date>2016-07-19T15:07:26Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Flow Node to Change a Material</title>
      <link>https://forums.autodesk.com/t5/stingray-forum-read-only/custom-flow-node-to-change-a-material/m-p/6450992#M7500</link>
      <description>&lt;P&gt;Hi Francisco,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;Please confirm that the material slot and variable names referenced by the Get Mesh Slot Material and the Set Material Variable match the material in your scene. Either check in the material editor or manually open the .material files in a text editor.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; Regards,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; Ben&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 20 Jul 2016 20:29:43 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/stingray-forum-read-only/custom-flow-node-to-change-a-material/m-p/6450992#M7500</guid>
      <dc:creator>__ben__</dc:creator>
      <dc:date>2016-07-20T20:29:43Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Flow Node to Change a Material</title>
      <link>https://forums.autodesk.com/t5/stingray-forum-read-only/custom-flow-node-to-change-a-material/m-p/6506338#M7501</link>
      <description>&lt;P&gt;... and that's why I am artist and not a programmer &lt;span class="lia-unicode-emoji" title=":face_with_tongue:"&gt;😛&lt;/span&gt;&lt;/P&gt;&lt;P&gt;finally I had time to take a look at this issue again and what I was missing was the underscore between the word Base color. &amp;nbsp;I have space, I changed to base_color and is working as it should&amp;nbsp;...&amp;nbsp;arrrr &amp;nbsp;&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;thanks man for your help.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;other kind of related question.&lt;/P&gt;&lt;P&gt;I do arch viz so most of the models are given by the architect, from Sketchup or REVIT, the naming of each item will come random of course. for instance walls may be called thick wall 1 or just wall or 123123.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If is that the case, if I am applying a functionality like this color change, should I first rename all items involved with better naming and no spaces before I import to stingray (sounds like a good idea but it may be time consuming)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also if I import lets say a room with 6 walls I am not going to need to write this same code for&amp;nbsp;each one of them if they all should change to the same color right??&lt;/P&gt;&lt;P&gt;I am trying to figure out what Boolean or matrix or something should I use to select all those items and apply the same effect.&lt;/P&gt;&lt;P&gt;Thank you again.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;fco.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 17 Aug 2016 18:53:27 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/stingray-forum-read-only/custom-flow-node-to-change-a-material/m-p/6506338#M7501</guid>
      <dc:creator>Francisco_Penaloza</dc:creator>
      <dc:date>2016-08-17T18:53:27Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Flow Node to Change a Material</title>
      <link>https://forums.autodesk.com/t5/stingray-forum-read-only/custom-flow-node-to-change-a-material/m-p/6537399#M7502</link>
      <description>&lt;P&gt;I am back again with this tutorial.&lt;/P&gt;&lt;P&gt;The color change work fine, but the material change is not working now, I have checked several time the writing and spelling also the names of objects and and still not working.&lt;/P&gt;&lt;P&gt;I have create different scenes to see if I missed something but no luck.&lt;/P&gt;&lt;P&gt;Are there any limitations regarding mesh or groups that this code won't work??&lt;/P&gt;&lt;P&gt;I have tried with single mesh and group meshes but no luck.&lt;/P&gt;&lt;P&gt;Here are the Lua and script copied from your video tutorial. &amp;nbsp;Am I missing something??&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;{
    name = "Set Unit Material"
    args = {
        unit = "unit"
        slot_name = "string"
        material = {
        type = "resource"
        extension = "material"
            }
    }
    function = "ProjectFlowCallbacks.set_unit_material"
    category = "Project"
}&lt;/PRE&gt;&lt;PRE&gt;function ProjectFlowCallbacks.set_unit_material(t)
    local unit = t.unit
    local slot = t.slot_name
    local material = t.material
    if unit and slot and material then
        stingray.Unit.set_material(unit, slot, material)
    end
    return t
end&lt;/PRE&gt;&lt;P&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Thu, 01 Sep 2016 18:27:53 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/stingray-forum-read-only/custom-flow-node-to-change-a-material/m-p/6537399#M7502</guid>
      <dc:creator>Francisco_Penaloza</dc:creator>
      <dc:date>2016-09-01T18:27:53Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Flow Node to Change a Material</title>
      <link>https://forums.autodesk.com/t5/stingray-forum-read-only/custom-flow-node-to-change-a-material/m-p/6537471#M7503</link>
      <description>&lt;P&gt;OK I think I understood what my problem was.&lt;/P&gt;&lt;P&gt;I was thinking that I could change the material on a single mesh but this code will change all meshes with the same material in that unit.&lt;/P&gt;&lt;P&gt;In my scene I have 4 walls they all share the same base wall material and they all import as a single group on stingray. &amp;nbsp;I was trying to change only one wall with the new material.&lt;/P&gt;&lt;P&gt;So I guess what I have to do is create a separate material for that wall and apply this script to it. &amp;nbsp;Is there a way to modify the script to affect a single mesh inside a group?? or the described work around should be the best practice?&lt;/P&gt;&lt;P&gt;thanks.&lt;/P&gt;</description>
      <pubDate>Thu, 01 Sep 2016 19:03:05 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/stingray-forum-read-only/custom-flow-node-to-change-a-material/m-p/6537471#M7503</guid>
      <dc:creator>Francisco_Penaloza</dc:creator>
      <dc:date>2016-09-01T19:03:05Z</dc:date>
    </item>
  </channel>
</rss>

