<?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: set global value (pos) on multiple vertex in 3ds Max Programming Forum</title>
    <link>https://forums.autodesk.com/t5/3ds-max-programming-forum/set-global-value-pos-on-multiple-vertex/m-p/4235073#M18798</link>
    <description>&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Hello,&lt;BR /&gt;I would like to know if it's possible to set a value to a multiple vertex selection with a script.&lt;BR /&gt;Exemple : I have 15 vertex selected with different values on z axis.&lt;BR /&gt;I want to set all vertex to -100mm for exemple (in one action).&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;i one action &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;BR /&gt;&lt;PRE&gt;&lt;BR /&gt;(for v in $.selectedverts collect v).pos.z = (units.decodevalue "-100mm")&lt;BR /&gt;&lt;/PRE&gt;</description>
    <pubDate>Mon, 30 Jan 2012 18:22:19 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2012-01-30T18:22:19Z</dc:date>
    <item>
      <title>set global value (pos) on multiple vertex</title>
      <link>https://forums.autodesk.com/t5/3ds-max-programming-forum/set-global-value-pos-on-multiple-vertex/m-p/4235072#M18797</link>
      <description>Hello,&lt;BR /&gt;I would like to know if it's possible to set a value to a multiple vertex selection with a script.&lt;BR /&gt;Exemple : I have 15 vertex selected with different values on z axis.&lt;BR /&gt;I want to set all vertex to -100mm for exemple (in one action).&lt;P&gt;&lt;IMG class="migr-att-link" src="http://area.autodesk.com/userdata/forum/s/splinevertextoposition_1.jpg" /&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 30 Jan 2012 17:49:56 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/3ds-max-programming-forum/set-global-value-pos-on-multiple-vertex/m-p/4235072#M18797</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-01-30T17:49:56Z</dc:date>
    </item>
    <item>
      <title>Re: set global value (pos) on multiple vertex</title>
      <link>https://forums.autodesk.com/t5/3ds-max-programming-forum/set-global-value-pos-on-multiple-vertex/m-p/4235073#M18798</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Hello,&lt;BR /&gt;I would like to know if it's possible to set a value to a multiple vertex selection with a script.&lt;BR /&gt;Exemple : I have 15 vertex selected with different values on z axis.&lt;BR /&gt;I want to set all vertex to -100mm for exemple (in one action).&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;i one action &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;BR /&gt;&lt;PRE&gt;&lt;BR /&gt;(for v in $.selectedverts collect v).pos.z = (units.decodevalue "-100mm")&lt;BR /&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 30 Jan 2012 18:22:19 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/3ds-max-programming-forum/set-global-value-pos-on-multiple-vertex/m-p/4235073#M18798</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-01-30T18:22:19Z</dc:date>
    </item>
    <item>
      <title>Re: set global value (pos) on multiple vertex</title>
      <link>https://forums.autodesk.com/t5/3ds-max-programming-forum/set-global-value-pos-on-multiple-vertex/m-p/4235074#M18799</link>
      <description>Thanks, but it's doesn't work, I have a message error :&lt;BR /&gt;-- Error occurred in anonymous codeblock&lt;BR /&gt;--  Frame:&lt;BR /&gt;-- Runtime error: Mesh operation on non-mesh: Line</description>
      <pubDate>Mon, 30 Jan 2012 18:33:52 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/3ds-max-programming-forum/set-global-value-pos-on-multiple-vertex/m-p/4235074#M18799</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-01-30T18:33:52Z</dc:date>
    </item>
    <item>
      <title>Re: set global value (pos) on multiple vertex</title>
      <link>https://forums.autodesk.com/t5/3ds-max-programming-forum/set-global-value-pos-on-multiple-vertex/m-p/4235075#M18800</link>
      <description>That's not too surprising, as you didn't tell us what kind of object it is. What works for one kind of object will not necessarily work on a different kind.&lt;BR /&gt;&lt;BR /&gt;Assuming, from the error message, that the object is an Editable Spline, open up the Maxscript help and look in the "How To.. practical examples" section for "How to... Flatten a SplineShape". Once flattened you can move them all (together) to whatever height you choose, or modify the script to specify the Z position.</description>
      <pubDate>Mon, 30 Jan 2012 20:56:37 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/3ds-max-programming-forum/set-global-value-pos-on-multiple-vertex/m-p/4235075#M18800</guid>
      <dc:creator>Steve_Curley</dc:creator>
      <dc:date>2012-01-30T20:56:37Z</dc:date>
    </item>
    <item>
      <title>Re: set global value (pos) on multiple vertex</title>
      <link>https://forums.autodesk.com/t5/3ds-max-programming-forum/set-global-value-pos-on-multiple-vertex/m-p/4235076#M18801</link>
      <description>Thanks Steve.&lt;BR /&gt;I have already read this exemple, but I don't understand how it works.&lt;BR /&gt;I'm beginner in maxscript.&lt;BR /&gt;Do you know Where I can found a begginer tutorials for editing a line/vertex ?&lt;BR /&gt;And can you give me some good book references for scripting ?</description>
      <pubDate>Mon, 30 Jan 2012 21:47:30 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/3ds-max-programming-forum/set-global-value-pos-on-multiple-vertex/m-p/4235076#M18801</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-01-30T21:47:30Z</dc:date>
    </item>
    <item>
      <title>Re: set global value (pos) on multiple vertex</title>
      <link>https://forums.autodesk.com/t5/3ds-max-programming-forum/set-global-value-pos-on-multiple-vertex/m-p/4235077#M18802</link>
      <description>If you read the rest of that article, below the script itself, then every line of the script is explained in some detail.&lt;BR /&gt;&lt;BR /&gt;Basically it is extracting the Z position of the Editable Spline itself (the Z component of the Pivot Point) and moving all the vertices to their original X and Y positions but moving them to the extracted Z position. You don't really need, at this stage, to fully understand everything it is doing.&lt;BR /&gt;&lt;BR /&gt;Basically, if you manually move the object to your -100 Z position then invoke the script you'll get the desired result.&lt;BR /&gt;&lt;BR /&gt;Copy/paste from the help into a new file in the Maxscript Editor (not the listener!) and save it. Execute it once (Ctrl+E). Customise &amp;gt; Customise User Interfae &amp;gt; Toolbars (tab). Select the "HowTo" category from the dropdown list, drag the "Flatten Spline" entry onto a toolbar.&lt;BR /&gt;&lt;BR /&gt;As for books - no, I don't have any so I can't recommend one. If you want to learn Maxscript then begin with the introduction in the Maxscript help, then start with simple things and progress from there. Almost everything you need to know is in the help, it just sometimes takes a bit of finding.</description>
      <pubDate>Tue, 31 Jan 2012 11:00:17 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/3ds-max-programming-forum/set-global-value-pos-on-multiple-vertex/m-p/4235077#M18802</guid>
      <dc:creator>Steve_Curley</dc:creator>
      <dc:date>2012-01-31T11:00:17Z</dc:date>
    </item>
  </channel>
</rss>

