<?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: getting dependsOn to work in maxscript in 3ds Max Programming Forum</title>
    <link>https://forums.autodesk.com/t5/3ds-max-programming-forum/getting-dependson-to-work-in-maxscript/m-p/7130581#M12609</link>
    <description>&lt;P&gt;is their a way to rotate the gizmo 90 degrees within the expression before it follows the object?&lt;/P&gt;</description>
    <pubDate>Tue, 06 Jun 2017 01:18:05 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2017-06-06T01:18:05Z</dc:date>
    <item>
      <title>getting dependsOn to work in maxscript</title>
      <link>https://forums.autodesk.com/t5/3ds-max-programming-forum/getting-dependson-to-work-in-maxscript/m-p/7121163#M12607</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;I found these neat little directions on how to make my&amp;nbsp;&lt;SPAN&gt;UVW Map gizmo to&amp;nbsp;follow the dummy object in world space.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;"Place a dummy on a path constraint. $Dummy01&lt;BR /&gt;Create a plane $Plane01&lt;BR /&gt;On your Plane add a UVW Map modifier.&lt;/P&gt;
&lt;P&gt;In trackView find the Gizmo track and assign&amp;nbsp;"Transform Script"&amp;nbsp;controller for that "Gizmo"&lt;BR /&gt;In the script expression window copy and paste this code.&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;trackObj=$Dummy01&lt;BR /&gt;dependsOn trackObj&lt;BR /&gt;trackObj.transform * inverse $Plane01.objectTransform&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Your UVW Map gizmo will now follow the dummy object in world space."&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This all worked great in Max 9 but it doesnt in Max 2011.&lt;/P&gt;
&lt;P&gt;It gives me a "Unknown property: "transform" in undefined.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have no clue.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;From what I understand dependsOn doesnt work the same way in later max versions.&lt;/P&gt;
&lt;P&gt;Does anyone know how to make this example work using maxscript?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The dependsOn help for max was not helpfull to me.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you.&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;</description>
      <pubDate>Thu, 01 Jun 2017 01:36:41 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/3ds-max-programming-forum/getting-dependson-to-work-in-maxscript/m-p/7121163#M12607</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-06-01T01:36:41Z</dc:date>
    </item>
    <item>
      <title>Re: getting dependsOn to work in maxscript</title>
      <link>https://forums.autodesk.com/t5/3ds-max-programming-forum/getting-dependson-to-work-in-maxscript/m-p/7121538#M12608</link>
      <description>&lt;P&gt;dependsOn was deprecated already in max 8 IIRC, more than a decade ago - you don't need it now, and absolute names in script are a big no-no, too. Here's how to do it properly:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;IMG src="https://forums.autodesk.com/t5/image/serverpage/image-id/362292i9B259D7F9111C7CA/image-size/original" border="0" title="bindTM.gif" alt="bindTM.gif" /&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 01 Jun 2017 07:22:47 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/3ds-max-programming-forum/getting-dependson-to-work-in-maxscript/m-p/7121538#M12608</guid>
      <dc:creator>Swordslayer</dc:creator>
      <dc:date>2017-06-01T07:22:47Z</dc:date>
    </item>
    <item>
      <title>Re: getting dependsOn to work in maxscript</title>
      <link>https://forums.autodesk.com/t5/3ds-max-programming-forum/getting-dependson-to-work-in-maxscript/m-p/7130581#M12609</link>
      <description>&lt;P&gt;is their a way to rotate the gizmo 90 degrees within the expression before it follows the object?&lt;/P&gt;</description>
      <pubDate>Tue, 06 Jun 2017 01:18:05 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/3ds-max-programming-forum/getting-dependson-to-work-in-maxscript/m-p/7130581#M12609</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-06-06T01:18:05Z</dc:date>
    </item>
    <item>
      <title>Re: getting dependsOn to work in maxscript</title>
      <link>https://forums.autodesk.com/t5/3ds-max-programming-forum/getting-dependson-to-work-in-maxscript/m-p/7130612#M12610</link>
      <description>&lt;PRE&gt;trackObj=$Dummy01
dependsOn trackObj
trackObj.transform * inverse $Plane01.objectTransform&lt;/PRE&gt;
&lt;P&gt;this piece of code is not correct! (if you want to drive a uvw map gizmo of course)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 06 Jun 2017 01:41:29 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/3ds-max-programming-forum/getting-dependson-to-work-in-maxscript/m-p/7130612#M12610</guid>
      <dc:creator>denisT.MaxDoctor</dc:creator>
      <dc:date>2017-06-06T01:41:29Z</dc:date>
    </item>
    <item>
      <title>Re: getting dependsOn to work in maxscript</title>
      <link>https://forums.autodesk.com/t5/3ds-max-programming-forum/getting-dependson-to-work-in-maxscript/m-p/7133362#M12611</link>
      <description>&lt;P&gt;Sorry I should have elaborated.&lt;/P&gt;
&lt;PRE&gt;--this script rotates the gizmo making the planar gizmo face postive x axis with top of gizmo pointing up. yea 
 resetMaxFile #noPrompt
 myball = sphere name:"myball" pos:[56,56,-30] radius:25
 mypointer = PointHelperObj name:"mypointer" pos:[-31,34,-6] constantscreensize:true centermarker:true cross:false isHidden:false box:true
 SUMapModifier = UVWmap()
 SUMapModifier.maptype = 0
 SUMapModifier.axis = 0  --axis is X
 addmodifier myball SUMapModifier
 SUMapModifier.gizmo.rotation = (quat 0 1 -1 0) as matrix3

------------------------------------------------------------

------this script is same as above but then the following transform script controller added below it.

 resetMaxFile #noPrompt
 mypointer = PointHelperObj name:"mypointer" pos:[-31,34,-6] constantscreensize:true centermarker:true box:true
 myball = sphere name:"myball" pos:[56,56,-30] radius:25
 mypointer = PointHelperObj name:"mypointer" pos:[-31,34,-6] constantscreensize:true centermarker:true box:true
 SUMapModifier = UVWmap()
 SUMapModifier.maptype = 0
 SUMapModifier.axis = 0  --axis is X
 addmodifier myball SUMapModifier
 SUMapModifier.gizmo.rotation = (quat 0 1 -1 0) as matrix3


-----with the transformscript part added below it now rotates the gizmo 90 with top of gizmo pointing in negative y axis which I dont want.

myball.modifiers[#UVW_Mapping].Gizmo.controller = transform_script ()
myball.modifiers[#UVW_Mapping].Gizmo.controller.addNode "master" (mypointer)
myball.modifiers[#UVW_Mapping].Gizmo.controller.addNode "parent" (myball)
myball.modifiers[#UVW_Mapping].Gizmo.controller.script = "master.transform * inverse parent.objectTransform"

---So the question is how can I make sure the gizmo facing direction doesnt change after the transform script added.
Is their something I can add to the expression master.transform...etc to keep my gizmo facing positive x direction like my first example?&lt;BR /&gt;&lt;BR /&gt;thank you.&lt;/PRE&gt;</description>
      <pubDate>Tue, 06 Jun 2017 22:36:18 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/3ds-max-programming-forum/getting-dependson-to-work-in-maxscript/m-p/7133362#M12611</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-06-06T22:36:18Z</dc:date>
    </item>
    <item>
      <title>Re: getting dependsOn to work in maxscript</title>
      <link>https://forums.autodesk.com/t5/3ds-max-programming-forum/getting-dependson-to-work-in-maxscript/m-p/7133385#M12612</link>
      <description>&lt;PRE&gt;master.transform * inverse parent.objectTransform&lt;/PRE&gt;
&lt;P&gt;i want to say that this expression (above) is not correct.&lt;/P&gt;
&lt;P&gt;it supposes that uvw map gizmo is in the object's transform space. which is not true. the gizmo is in ModContext space&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 06 Jun 2017 22:53:35 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/3ds-max-programming-forum/getting-dependson-to-work-in-maxscript/m-p/7133385#M12612</guid>
      <dc:creator>denisT.MaxDoctor</dc:creator>
      <dc:date>2017-06-06T22:53:35Z</dc:date>
    </item>
    <item>
      <title>Re: getting dependsOn to work in maxscript</title>
      <link>https://forums.autodesk.com/t5/3ds-max-programming-forum/getting-dependson-to-work-in-maxscript/m-p/7133503#M12613</link>
      <description>&lt;P&gt;how would you correct it denis.T? Is that the source of my problem of getting a&amp;nbsp;90 rotation on the gizmo? because other than that it worked as expected as I wrote it.&lt;/P&gt;</description>
      <pubDate>Wed, 07 Jun 2017 00:47:11 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/3ds-max-programming-forum/getting-dependson-to-work-in-maxscript/m-p/7133503#M12613</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-06-07T00:47:11Z</dc:date>
    </item>
    <item>
      <title>Re: getting dependsOn to work in maxscript</title>
      <link>https://forums.autodesk.com/t5/3ds-max-programming-forum/getting-dependson-to-work-in-maxscript/m-p/7133552#M12614</link>
      <description>&lt;P&gt;&lt;FONT size="3"&gt;i don't go so deep in your problem... i just see that gizmo space is not transformed correct to&amp;nbsp;the world space.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT size="3"&gt;see MXS help&lt;STRONG&gt;&amp;nbsp;Modifier Sub-Object Transform Properties &lt;/STRONG&gt;as an example&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 07 Jun 2017 01:27:38 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/3ds-max-programming-forum/getting-dependson-to-work-in-maxscript/m-p/7133552#M12614</guid>
      <dc:creator>denisT.MaxDoctor</dc:creator>
      <dc:date>2017-06-07T01:27:38Z</dc:date>
    </item>
  </channel>
</rss>

