<?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 Controlling model item opacity using Select option in Vuforia Studio</title>
    <link>https://www.ptcusercommunity.com/t5/Vuforia-Studio/Controlling-model-item-opacity-using-Select-option/m-p/700022#M9034</link>
    <description>&lt;P&gt;If I select modelitem-1 , it shows only that model item alone. But I want to show rest of the model items opacity in 0.5.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Example: If I Select Modelitem-1 , It should show Modelitem-1 in Opacity 1 and Modelitem-2, Modelitem-3 Opacity as 0.5.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If I select Modelitem-2 , It should show the Modelitem-2 in Opacity 1 and ModelItem-1 and Modelitem-3 opacity as 0.5.&lt;/P&gt;
&lt;P&gt;&lt;a href="https://www.ptcusercommunity.com/t5/user/viewprofilepage/user-id/235457"&gt;@sdidier&lt;/a&gt;&amp;nbsp;&lt;a href="https://www.ptcusercommunity.com/t5/user/viewprofilepage/user-id/287953"&gt;@Priya&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;How can I do that?. Any suggestion.&lt;/P&gt;</description>
    <pubDate>Tue, 24 Nov 2020 17:49:26 GMT</pubDate>
    <dc:creator>TM_9260611</dc:creator>
    <dc:date>2020-11-24T17:49:26Z</dc:date>
    <item>
      <title>Controlling model item opacity using Select option</title>
      <link>https://www.ptcusercommunity.com/t5/Vuforia-Studio/Controlling-model-item-opacity-using-Select-option/m-p/700022#M9034</link>
      <description>&lt;P&gt;If I select modelitem-1 , it shows only that model item alone. But I want to show rest of the model items opacity in 0.5.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Example: If I Select Modelitem-1 , It should show Modelitem-1 in Opacity 1 and Modelitem-2, Modelitem-3 Opacity as 0.5.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If I select Modelitem-2 , It should show the Modelitem-2 in Opacity 1 and ModelItem-1 and Modelitem-3 opacity as 0.5.&lt;/P&gt;
&lt;P&gt;&lt;a href="https://www.ptcusercommunity.com/t5/user/viewprofilepage/user-id/235457"&gt;@sdidier&lt;/a&gt;&amp;nbsp;&lt;a href="https://www.ptcusercommunity.com/t5/user/viewprofilepage/user-id/287953"&gt;@Priya&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;How can I do that?. Any suggestion.&lt;/P&gt;</description>
      <pubDate>Tue, 24 Nov 2020 17:49:26 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Vuforia-Studio/Controlling-model-item-opacity-using-Select-option/m-p/700022#M9034</guid>
      <dc:creator>TM_9260611</dc:creator>
      <dc:date>2020-11-24T17:49:26Z</dc:date>
    </item>
    <item>
      <title>Re: Controlling model item opacity using Select option</title>
      <link>https://www.ptcusercommunity.com/t5/Vuforia-Studio/Controlling-model-item-opacity-using-Select-option/m-p/700196#M9037</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To achieve this, I have used these threads in PTC Community about &lt;STRONG&gt;Select Widget&lt;/STRONG&gt;:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.ptc.com/t5/Vuforia-Studio/How-to-use-List-in-ThingWorx-Studio/td-p/522911" target="_blank"&gt;https://community.ptc.com/t5/Vuforia-Studio/How-to-use-List-in-ThingWorx-Studio/td-p/522911&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.ptc.com/t5/Vuforia-Studio/What-is-the-format-for-quot-List-quot-in-the-Select-widget/m-p/550949" target="_blank"&gt;https://community.ptc.com/t5/Vuforia-Studio/What-is-the-format-for-quot-List-quot-in-the-Select-widget/m-p/550949&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To populate the&lt;STRONG&gt; Select Widget&lt;/STRONG&gt;, I have used the technics as explained in previous threads.&lt;/P&gt;
&lt;P&gt;Nothing to add.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In &lt;STRONG&gt;Home.js&lt;/STRONG&gt; node, I have created this Javascript function :&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;$scope.changeOpacity = function ()
{
  //console.warn($scope.app.view['Home'].wdg['select-1']);
  //console.log($scope.getWidgetProp('select-1', 'value'));
    switch ($scope.getWidgetProp('select-1', 'value'))
    {
      case '1':
        $scope.setWidgetProp('modelItem-1', 'opacity', 1);
    	$scope.setWidgetProp('modelItem-2', 'opacity', 0.5);
        break;
      case '2':
        $scope.setWidgetProp('modelItem-1', 'opacity', 0.5);
   		$scope.setWidgetProp('modelItem-2', 'opacity', 1);
		break;
      default:
        console.log(`Sorry, we are out of ${item}.`);
    }
}
&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In &lt;STRONG&gt;Select Widget &lt;/STRONG&gt;node, in &lt;STRONG&gt;SELECT-DETAILS&lt;/STRONG&gt; panel, in &lt;STRONG&gt;EVENTS&lt;/STRONG&gt; section, in &lt;STRONG&gt;Value Changed&lt;/STRONG&gt; event, &lt;STRONG&gt;JS&lt;/STRONG&gt; button, call to this function is done :&amp;nbsp;&lt;STRONG&gt;changeOpacity();&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;How is it working ?&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;STRONG&gt;Opacity Properties&lt;/STRONG&gt; of &lt;STRONG&gt;Model Item 1&lt;/STRONG&gt; and &lt;STRONG&gt;2 &lt;/STRONG&gt;is set to values expected when&lt;STRONG&gt; Item 1 &lt;/STRONG&gt;is selected&lt;/LI&gt;
&lt;LI&gt;In &lt;STRONG&gt;Select Widget&lt;/STRONG&gt;, &lt;STRONG&gt;Item 1&lt;/STRONG&gt; and &lt;STRONG&gt;Item 2&lt;/STRONG&gt; are displayed and returns values &lt;STRONG&gt;1&lt;/STRONG&gt; and &lt;STRONG&gt;2&lt;/STRONG&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;Select Widget&lt;/STRONG&gt; is setup also to have &lt;STRONG&gt;Item 1&lt;/STRONG&gt; select by default when running &lt;STRONG&gt;Experience&lt;/STRONG&gt;&lt;/LI&gt;
&lt;LI&gt;When changing Item in &lt;STRONG&gt;Select Widget&lt;/STRONG&gt;, &lt;STRONG&gt;Javascript&lt;/STRONG&gt; function is ran and &lt;STRONG&gt;Model Items&lt;/STRONG&gt; &lt;STRONG&gt;Opacities&lt;/STRONG&gt; are modified as expected.&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;Please find attached an example &lt;STRONG&gt;Project&lt;/STRONG&gt;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best regards,&lt;/P&gt;
&lt;P&gt;Samuel&lt;/P&gt;</description>
      <pubDate>Wed, 25 Nov 2020 10:33:35 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Vuforia-Studio/Controlling-model-item-opacity-using-Select-option/m-p/700196#M9037</guid>
      <dc:creator>sdidier</dc:creator>
      <dc:date>2020-11-25T10:33:35Z</dc:date>
    </item>
    <item>
      <title>Re: Controlling model item opacity using Select option</title>
      <link>https://www.ptcusercommunity.com/t5/Vuforia-Studio/Controlling-model-item-opacity-using-Select-option/m-p/700532#M9043</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="https://www.ptcusercommunity.com/t5/user/viewprofilepage/user-id/235457"&gt;@sdidier&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Its works fine. If i want to add blinking for 3 seconds. how to do with this code?.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 27 Nov 2020 09:56:00 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Vuforia-Studio/Controlling-model-item-opacity-using-Select-option/m-p/700532#M9043</guid>
      <dc:creator>TM_9260611</dc:creator>
      <dc:date>2020-11-27T09:56:00Z</dc:date>
    </item>
    <item>
      <title>Re: Controlling model item opacity using Select option</title>
      <link>https://www.ptcusercommunity.com/t5/Vuforia-Studio/Controlling-model-item-opacity-using-Select-option/m-p/700570#M9044</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I would recommend to have a look to this thread :&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.ptc.com/t5/Vuforia-Studio/blinking-of-a-3d-image/m-p/657207" target="_blank"&gt;https://community.ptc.com/t5/Vuforia-Studio/blinking-of-a-3d-image/m-p/657207&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;W can find a snippet of a blinking behavior with a &lt;STRONG&gt;3D Image&lt;/STRONG&gt;.&lt;/P&gt;
&lt;P&gt;A similar behavior can be done with &lt;STRONG&gt;Opacity&lt;/STRONG&gt; of a &lt;STRONG&gt;Model Item&lt;/STRONG&gt;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best regards,&lt;/P&gt;
&lt;P&gt;Samuel&lt;/P&gt;</description>
      <pubDate>Fri, 27 Nov 2020 13:43:09 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Vuforia-Studio/Controlling-model-item-opacity-using-Select-option/m-p/700570#M9044</guid>
      <dc:creator>sdidier</dc:creator>
      <dc:date>2020-11-27T13:43:09Z</dc:date>
    </item>
  </channel>
</rss>

