<?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: How to change transparency of objects through script in Vuforia Studio</title>
    <link>https://www.ptcusercommunity.com/t5/Vuforia-Studio/How-to-change-transparency-of-objects-through-script/m-p/617188#M6258</link>
    <description>&lt;P&gt;You will need to write a loop to change the opacity in increments over time to get your fade. But there are two ways to actually change opacity value:&lt;/P&gt;
&lt;PRE&gt;$scope.setWidgetProp('myObjectName', 'opacity', 0.5); //opacity values are 0-1
$scope.view.wdg['myObjectName'].opacity = 0.5;&lt;/PRE&gt;
&lt;P&gt;Generally the &lt;EM&gt;setWidgetProp&lt;/EM&gt; method is the most reliable at triggering a view refresh and actually showing the change you made. But you may get different results with 2D and 3D widgets.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I would share some code snippets of what you have so far if you want more detailed feedback.&lt;/P&gt;</description>
    <pubDate>Tue, 09 Jul 2019 15:28:36 GMT</pubDate>
    <dc:creator>jmikesell</dc:creator>
    <dc:date>2019-07-09T15:28:36Z</dc:date>
    <item>
      <title>How to change transparency of objects through script</title>
      <link>https://www.ptcusercommunity.com/t5/Vuforia-Studio/How-to-change-transparency-of-objects-through-script/m-p/617057#M6249</link>
      <description>&lt;P&gt;Basically the title, I've been trying use the opacity value to make a model part "fade" away but when I change the value, it's reflected when I print it to console but not on the model itself. Thanks!&lt;/P&gt;</description>
      <pubDate>Mon, 08 Jul 2019 20:55:47 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Vuforia-Studio/How-to-change-transparency-of-objects-through-script/m-p/617057#M6249</guid>
      <dc:creator>cmodin</dc:creator>
      <dc:date>2019-07-08T20:55:47Z</dc:date>
    </item>
    <item>
      <title>Re: How to change transparency of objects through script</title>
      <link>https://www.ptcusercommunity.com/t5/Vuforia-Studio/How-to-change-transparency-of-objects-through-script/m-p/617188#M6258</link>
      <description>&lt;P&gt;You will need to write a loop to change the opacity in increments over time to get your fade. But there are two ways to actually change opacity value:&lt;/P&gt;
&lt;PRE&gt;$scope.setWidgetProp('myObjectName', 'opacity', 0.5); //opacity values are 0-1
$scope.view.wdg['myObjectName'].opacity = 0.5;&lt;/PRE&gt;
&lt;P&gt;Generally the &lt;EM&gt;setWidgetProp&lt;/EM&gt; method is the most reliable at triggering a view refresh and actually showing the change you made. But you may get different results with 2D and 3D widgets.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I would share some code snippets of what you have so far if you want more detailed feedback.&lt;/P&gt;</description>
      <pubDate>Tue, 09 Jul 2019 15:28:36 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Vuforia-Studio/How-to-change-transparency-of-objects-through-script/m-p/617188#M6258</guid>
      <dc:creator>jmikesell</dc:creator>
      <dc:date>2019-07-09T15:28:36Z</dc:date>
    </item>
    <item>
      <title>Re: How to change transparency of objects through script</title>
      <link>https://www.ptcusercommunity.com/t5/Vuforia-Studio/How-to-change-transparency-of-objects-through-script/m-p/617189#M6259</link>
      <description>&lt;P&gt;I've been using a loop with:&amp;nbsp;$scope.view.wdg[lbl]['opacity'] -= 0.005;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'll try your two suggestions and see if that fixes it&lt;/P&gt;</description>
      <pubDate>Tue, 09 Jul 2019 15:33:27 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Vuforia-Studio/How-to-change-transparency-of-objects-through-script/m-p/617189#M6259</guid>
      <dc:creator>cmodin</dc:creator>
      <dc:date>2019-07-09T15:33:27Z</dc:date>
    </item>
  </channel>
</rss>

