<?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: Pivot Point Rotation Only in 3ds Max Programming Forum</title>
    <link>https://forums.autodesk.com/t5/3ds-max-programming-forum/pivot-point-rotation-only/m-p/9924646#M6023</link>
    <description>&lt;P&gt;Do you know this?&lt;/P&gt;&lt;P&gt;&lt;A href="http://docs.autodesk.com/3DSMAX/14/ENU/MAXScript%20Help%202012/files/GUID-3B001F21-8FE9-4663-A972-E648682A0AC-744.htm" target="_blank" rel="noopener"&gt;http://docs.autodesk.com/3DSMAX/14/ENU/MAXScript%20Help%202012/files/GUID-3B001F21-8FE9-4663-A972-E648682A0AC-744.htm&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 08 Dec 2020 19:49:59 GMT</pubDate>
    <dc:creator>istan</dc:creator>
    <dc:date>2020-12-08T19:49:59Z</dc:date>
    <item>
      <title>Pivot Point Rotation Only</title>
      <link>https://forums.autodesk.com/t5/3ds-max-programming-forum/pivot-point-rotation-only/m-p/9923993#M6022</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am looking for some help. I was introduced to Maxscript recently, and&amp;nbsp;I am trying to develop a tool where I can work with the pivot rotation only without moving the object.&lt;/P&gt;&lt;P&gt;At the moment I am dealing with a few issues which I am struggling to figure out. One of them is, on the spinner in Y-axis the rotation animation does a strange flickery. The other issue is, if I move the pivot position previously when trying to move the rotation spinners, the object moves from his position what shouldn't happen. Does anyone know what I am missing to make it work properly?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I did go this far:&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;s = selection as array -&lt;/P&gt;&lt;P&gt;if $ == undefined then&lt;BR /&gt;(&lt;BR /&gt;&amp;nbsp; &amp;nbsp;messageBox "Please select one or more objects in the scene and try again."&lt;BR /&gt;)&lt;BR /&gt;&amp;nbsp; &amp;nbsp;else&lt;BR /&gt;(&lt;BR /&gt;rollout PivotPointModifier "Pivot Point Modifier" width:288 height:78&lt;BR /&gt;&amp;nbsp; &amp;nbsp;(&lt;BR /&gt;&amp;nbsp; &amp;nbsp;local Xrot = 0&lt;BR /&gt;&amp;nbsp; &amp;nbsp;local Yrot = 0&lt;BR /&gt;&amp;nbsp; &amp;nbsp;local Zrot = 0&lt;BR /&gt;&amp;nbsp; &amp;nbsp; local RotateEnabled = false&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;GroupBox 'grp_Rotation' "" pos:[9,8] width:273 height:56 align:#left&lt;BR /&gt;&amp;nbsp; &amp;nbsp;checkbox 'chk_Enable_Rotation' "Enable Rotation" pos:[15,9] width:99 height:16 checked:false align:#left&lt;BR /&gt;&amp;nbsp; &amp;nbsp;spinner 'spn_Xrotation' "X Axis" pos:[18,31] width:57 height:16 range:[-360,360,0] align:#left&lt;BR /&gt;&amp;nbsp; &amp;nbsp;spinner 'spn_Yrotation' "Y Axis" pos:[106,32] width:57 height:16 range:[-360,360,0] align:#left&lt;BR /&gt;&amp;nbsp; &amp;nbsp;spinner 'spn_Zrotation' "Z Axis" pos:[194,32] width:57 height:16 range:[-360,360,0] align:#left&lt;/P&gt;&lt;P&gt;/* define a function responsible for rotating the pivot in X,Y or Z-axis.*/&lt;/P&gt;&lt;P&gt;fn Align_Pivot obj xrot yrot zrot =&lt;BR /&gt;(&lt;BR /&gt;&amp;nbsp; &amp;nbsp;objrot = obj.transform.rotationpart as eulerangles&lt;BR /&gt;&amp;nbsp; &amp;nbsp;if xrot == undefined then xr = objrot.x else xr = xrot&lt;BR /&gt;&amp;nbsp; &amp;nbsp;if yrot == undefined then yr = objrot.y else yr = yrot&lt;BR /&gt;&amp;nbsp; &amp;nbsp; if zrot == undefined then zr = objrot.z else zr = zrot&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;toolMode.coordsys #local -- This line was created due to the fact of the pivot point rotation&lt;BR /&gt;-- is only visible when "local" is selected as a reference coordinate system.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&amp;nbsp; &amp;nbsp;theMatrix = rotate (matrix3 1) (eulerangles xr yr zr as quat)&lt;BR /&gt;&amp;nbsp; &amp;nbsp; scale theMatrix obj.scale&lt;BR /&gt;&amp;nbsp; &amp;nbsp;translate theMatrix obj.pos&lt;BR /&gt;&amp;nbsp; &amp;nbsp;obj.transform = theMatrix&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;obj.objectOffsetRot = inverse theMatrix.rotationPart&lt;BR /&gt;)&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;on chk_Enable_Rotation changed state do&lt;BR /&gt;&amp;nbsp; &amp;nbsp;RotateEnabled = state -- when checkbox is clicked change the state, which was defined as false previously.&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;on spn_Xrotation changed val do&lt;BR /&gt;&amp;nbsp; &amp;nbsp;(&lt;BR /&gt;&amp;nbsp; &amp;nbsp;Xrot = val&lt;BR /&gt;&amp;nbsp; &amp;nbsp;if RotateEnabled then&lt;BR /&gt;&amp;nbsp; (&lt;BR /&gt;&amp;nbsp; &amp;nbsp;for obj in s do&lt;BR /&gt;&amp;nbsp; &amp;nbsp; (&lt;BR /&gt;&amp;nbsp; &amp;nbsp; Align_Pivot obj val undefined undefined&lt;BR /&gt;&amp;nbsp; )&lt;BR /&gt;&amp;nbsp; )&lt;BR /&gt;)&lt;BR /&gt;on spn_Yrotation changed val do&lt;BR /&gt;(&lt;BR /&gt;if RotateEnabled then&lt;BR /&gt;(&lt;BR /&gt;Yrot = val&lt;BR /&gt;for obj in s do&lt;BR /&gt;(&lt;BR /&gt;Align_Pivot obj undefined val undefined&lt;BR /&gt;)&lt;BR /&gt;)&lt;BR /&gt;)&lt;BR /&gt;on spn_Zrotation changed val do&lt;BR /&gt;(&lt;BR /&gt;if RotateEnabled then&lt;BR /&gt;(&lt;BR /&gt;Zrot = val&lt;BR /&gt;for obj in s do&lt;BR /&gt;(&lt;BR /&gt;Align_Pivot obj undefined undefined val&lt;BR /&gt;)&lt;BR /&gt;)&lt;BR /&gt;)&lt;BR /&gt;)&lt;BR /&gt;CreateDialog PivotPointModifier&lt;BR /&gt;)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you all&lt;/P&gt;</description>
      <pubDate>Tue, 08 Dec 2020 15:56:36 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/3ds-max-programming-forum/pivot-point-rotation-only/m-p/9923993#M6022</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-12-08T15:56:36Z</dc:date>
    </item>
    <item>
      <title>Re: Pivot Point Rotation Only</title>
      <link>https://forums.autodesk.com/t5/3ds-max-programming-forum/pivot-point-rotation-only/m-p/9924646#M6023</link>
      <description>&lt;P&gt;Do you know this?&lt;/P&gt;&lt;P&gt;&lt;A href="http://docs.autodesk.com/3DSMAX/14/ENU/MAXScript%20Help%202012/files/GUID-3B001F21-8FE9-4663-A972-E648682A0AC-744.htm" target="_blank" rel="noopener"&gt;http://docs.autodesk.com/3DSMAX/14/ENU/MAXScript%20Help%202012/files/GUID-3B001F21-8FE9-4663-A972-E648682A0AC-744.htm&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 08 Dec 2020 19:49:59 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/3ds-max-programming-forum/pivot-point-rotation-only/m-p/9924646#M6023</guid>
      <dc:creator>istan</dc:creator>
      <dc:date>2020-12-08T19:49:59Z</dc:date>
    </item>
    <item>
      <title>Re: Pivot Point Rotation Only</title>
      <link>https://forums.autodesk.com/t5/3ds-max-programming-forum/pivot-point-rotation-only/m-p/9925164#M6024</link>
      <description>&lt;P&gt;I am trying to get my head around it... I came across that link today actually, and I am trying to understand how it works for my case &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt; thank you&lt;/P&gt;</description>
      <pubDate>Tue, 08 Dec 2020 23:16:21 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/3ds-max-programming-forum/pivot-point-rotation-only/m-p/9925164#M6024</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-12-08T23:16:21Z</dc:date>
    </item>
  </channel>
</rss>

