<?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: manipulate timeline of thousands of mCloth MPC animation vertices in 3ds Max Programming Forum</title>
    <link>https://forums.autodesk.com/t5/3ds-max-programming-forum/manipulate-timeline-of-thousands-of-mcloth-mpc-animation/m-p/9723666#M6426</link>
    <description>&lt;P&gt;as i understand you have 'baked' vertex animation in Master Point Controller.. so the code you are asking above (in your task order) might look as:&lt;/P&gt;&lt;LI-CODE lang="general"&gt;(
	mc = $.baseobject[#master_point_controller].controller
	range = gettimerange mc

	selectkeys mc

	for k=1 to mc.numsubs do
	(
		pc = mc[k].controller
		at time range.end v = pc.value
		at time 0 
		(
			k = addnewkey pc 0
			k.value = v
		)
	)

	movekeys mc (1 - range.start) #selection
	
	enableorts mc on
	setafterort mc #loop
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;take this as an idea and tweak as needed&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 01 Sep 2020 17:39:16 GMT</pubDate>
    <dc:creator>denisT.MaxDoctor</dc:creator>
    <dc:date>2020-09-01T17:39:16Z</dc:date>
    <item>
      <title>manipulate timeline of thousands of mCloth MPC animation vertices</title>
      <link>https://forums.autodesk.com/t5/3ds-max-programming-forum/manipulate-timeline-of-thousands-of-mcloth-mpc-animation/m-p/9723446#M6425</link>
      <description>&lt;P&gt;I don't understand how to gain access to the MasterPointController vertices timeline array of an mCloth mesh.&lt;/P&gt;&lt;P&gt;I have an mCloth partial animation of a waving&amp;nbsp;flag (one cycle of a wave).&amp;nbsp; It has thousands of vertices.&lt;/P&gt;&lt;P&gt;It starts at time 2800.&amp;nbsp; I'd like to manipulate -- in this instance -- to copy the final position to time 0,&amp;nbsp; slide all others to start at time 1, and then add an Out Of Range controller to Cycle or Loop.&lt;/P&gt;&lt;P&gt;Attempting this with the UI crashes max, so seems a candidate job for Maxscript.&lt;/P&gt;&lt;P&gt;Could someone point me to some similar example of Maxscript that I could use/modify for the job?&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.PNG" style="width: 495px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/813838i6C4890D9BC0CDD5F/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture.PNG" alt="Capture.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 01 Sep 2020 15:50:41 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/3ds-max-programming-forum/manipulate-timeline-of-thousands-of-mcloth-mpc-animation/m-p/9723446#M6425</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-09-01T15:50:41Z</dc:date>
    </item>
    <item>
      <title>Re: manipulate timeline of thousands of mCloth MPC animation vertices</title>
      <link>https://forums.autodesk.com/t5/3ds-max-programming-forum/manipulate-timeline-of-thousands-of-mcloth-mpc-animation/m-p/9723666#M6426</link>
      <description>&lt;P&gt;as i understand you have 'baked' vertex animation in Master Point Controller.. so the code you are asking above (in your task order) might look as:&lt;/P&gt;&lt;LI-CODE lang="general"&gt;(
	mc = $.baseobject[#master_point_controller].controller
	range = gettimerange mc

	selectkeys mc

	for k=1 to mc.numsubs do
	(
		pc = mc[k].controller
		at time range.end v = pc.value
		at time 0 
		(
			k = addnewkey pc 0
			k.value = v
		)
	)

	movekeys mc (1 - range.start) #selection
	
	enableorts mc on
	setafterort mc #loop
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;take this as an idea and tweak as needed&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 01 Sep 2020 17:39:16 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/3ds-max-programming-forum/manipulate-timeline-of-thousands-of-mcloth-mpc-animation/m-p/9723666#M6426</guid>
      <dc:creator>denisT.MaxDoctor</dc:creator>
      <dc:date>2020-09-01T17:39:16Z</dc:date>
    </item>
    <item>
      <title>Re: manipulate timeline of thousands of mCloth MPC animation vertices</title>
      <link>https://forums.autodesk.com/t5/3ds-max-programming-forum/manipulate-timeline-of-thousands-of-mcloth-mpc-animation/m-p/9723769#M6427</link>
      <description>&lt;P&gt;Ah I finally see how to access the MPC!&amp;nbsp; Thanks.&lt;/P&gt;&lt;P&gt;Yes, honing in with a slightly different approach now that I see how to access all the vertices and keys, something almost like:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;startKey=55
blendKeyCount=5
for i = 0 to getNumVerts($) do (
	vtx = "$.mCloth.'Vertex " + formattedPrint i format:"u" + "'.controller"
	print vtx
	-- make room for a copy of the last key in the first position
	print (moveKeys vtx 1)
	moveKeys vtx 1
	sortKeys vtx
	count = vtx.keys.count
	lastKey = vtx.keys[count]
	assignKey vtx.keys lastKey 0
	
	-- delete 1 until startKey
	selectKeys vtx.keys (interval 2 startKey)
	deleteKeys
	-- add some spacing between first and second key for a more natural blending
	moveKeys vtx blendKeyCount
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 01 Sep 2020 18:30:04 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/3ds-max-programming-forum/manipulate-timeline-of-thousands-of-mcloth-mpc-animation/m-p/9723769#M6427</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-09-01T18:30:04Z</dc:date>
    </item>
  </channel>
</rss>

