<?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 clone object using python in 3ds Max Programming Forum</title>
    <link>https://forums.autodesk.com/t5/3ds-max-programming-forum/how-to-clone-object-using-python/m-p/8483181#M9195</link>
    <description>&lt;PRE&gt;from pymxs import runtime as rt

tpot = rt.Teapot()
mat = rt.StandardMaterial()
tpot.material = mat
mat.Diffuse_Color = rt.color(255, 0, 0)&lt;/PRE&gt;</description>
    <pubDate>Fri, 21 Dec 2018 12:35:44 GMT</pubDate>
    <dc:creator>morten_bohne</dc:creator>
    <dc:date>2018-12-21T12:35:44Z</dc:date>
    <item>
      <title>How to clone object using python</title>
      <link>https://forums.autodesk.com/t5/3ds-max-programming-forum/how-to-clone-object-using-python/m-p/8478670#M9188</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;could you help how to duplicate object using python script ind&amp;nbsp;3Dmax 2018?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;MZ&lt;/P&gt;</description>
      <pubDate>Wed, 19 Dec 2018 16:17:41 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/3ds-max-programming-forum/how-to-clone-object-using-python/m-p/8478670#M9188</guid>
      <dc:creator>mateusz.zelent</dc:creator>
      <dc:date>2018-12-19T16:17:41Z</dc:date>
    </item>
    <item>
      <title>Re: How to clone object using python</title>
      <link>https://forums.autodesk.com/t5/3ds-max-programming-forum/how-to-clone-object-using-python/m-p/8480247#M9189</link>
      <description>&lt;P&gt;If you just want to copy the selected node, you could do it like this:&lt;/P&gt;
&lt;PRE&gt;from pymxs import runtime as rt

# get the selected node
sel = rt.selection[0]

# copy selected node
rt.copy(sel)&lt;/PRE&gt;</description>
      <pubDate>Thu, 20 Dec 2018 08:55:46 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/3ds-max-programming-forum/how-to-clone-object-using-python/m-p/8480247#M9189</guid>
      <dc:creator>morten_bohne</dc:creator>
      <dc:date>2018-12-20T08:55:46Z</dc:date>
    </item>
    <item>
      <title>Re: How to clone object using python</title>
      <link>https://forums.autodesk.com/t5/3ds-max-programming-forum/how-to-clone-object-using-python/m-p/8480257#M9190</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;thank you for your response.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have found second way:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;MaxPlus.Core.EvalMAXScript("myType = #copy")
rt.maxOps.cloneNodes(rt.mySphere2,  cloneType=rt.myType)&lt;/PRE&gt;
&lt;P&gt;My goal is to create a vector field (space of 3d of arrows):&lt;/P&gt;
&lt;P&gt;&lt;IMG src="https://mathinsight.org/media/applet/image/large/expanding_vector_field_3D.png" border="0" alt="Znalezione obrazy dla zapytania vector fields" width="263" height="263" /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I do not know how to draw an arrow using python&amp;nbsp;code, so I would like to clone an already created one. Then I plan to give them rotation and location later. What do you think is the best way to achieve this?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 20 Dec 2018 09:03:51 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/3ds-max-programming-forum/how-to-clone-object-using-python/m-p/8480257#M9190</guid>
      <dc:creator>mateusz.zelent</dc:creator>
      <dc:date>2018-12-20T09:03:51Z</dc:date>
    </item>
    <item>
      <title>Re: How to clone object using python</title>
      <link>https://forums.autodesk.com/t5/3ds-max-programming-forum/how-to-clone-object-using-python/m-p/8480276#M9191</link>
      <description>&lt;P&gt;that works too &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you want to get rid of the EvalMaxScript part, you could do it like this:&lt;/P&gt;
&lt;P&gt;rt.maxOps.cloneNodes(sel, cloneType = rt.name("copy"))&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;and to create a grid of objects:&lt;/P&gt;
&lt;PRE&gt;count = 3
offset = 50

for x in range(count):
	for y in range(count):
		for z in range(count):
			node = rt.teapot()
			node.pos = rt.point3(x*offset, y*offset, z*offset)&lt;/PRE&gt;</description>
      <pubDate>Thu, 20 Dec 2018 09:17:51 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/3ds-max-programming-forum/how-to-clone-object-using-python/m-p/8480276#M9191</guid>
      <dc:creator>morten_bohne</dc:creator>
      <dc:date>2018-12-20T09:17:51Z</dc:date>
    </item>
    <item>
      <title>Re: How to clone object using python</title>
      <link>https://forums.autodesk.com/t5/3ds-max-programming-forum/how-to-clone-object-using-python/m-p/8480384#M9192</link>
      <description>&lt;P&gt;Perfect!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you for help, now I know also how to create an arrow, but do you know how to connect these two objects into one node?&lt;/P&gt;
&lt;PRE&gt;node=pymxs.runtime.cone()
node.radius1=1.8
node.height=3.5
node.pos=rt.point3(0,0,5)

node=pymxs.runtime.cylinder()
node.radius=0.9
node.height=5
node.pos=rt.point3(0,0,0)

&lt;/PRE&gt;</description>
      <pubDate>Thu, 20 Dec 2018 10:22:46 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/3ds-max-programming-forum/how-to-clone-object-using-python/m-p/8480384#M9192</guid>
      <dc:creator>mateusz.zelent</dc:creator>
      <dc:date>2018-12-20T10:22:46Z</dc:date>
    </item>
    <item>
      <title>Re: How to clone object using python</title>
      <link>https://forums.autodesk.com/t5/3ds-max-programming-forum/how-to-clone-object-using-python/m-p/8480436#M9193</link>
      <description>&lt;PRE&gt;import pymxs&lt;BR /&gt;&lt;BR /&gt;cone=pymxs.runtime.cone()&lt;BR /&gt;cone.radius1=1.8&lt;BR /&gt;cone.height=3.5&lt;BR /&gt;cone.pos=rt.point3(0,0,5)&lt;BR /&gt;&lt;BR /&gt;cylinder=pymxs.runtime.cylinder()&lt;BR /&gt;cylinder.radius=0.9&lt;BR /&gt;cylinder.height=5&lt;BR /&gt;cylinder.pos=pymxs.runtime.point3(0,0,0)&lt;BR /&gt;&lt;BR /&gt;pymxs.runtime.convertToMesh(cone)&lt;BR /&gt;pymxs.runtime.convertToMesh(cylinder)&lt;BR /&gt;&lt;BR /&gt;pymxs.runtime.attach(cone, cylinder)&lt;BR /&gt;&lt;BR /&gt;arrow = cone&lt;BR /&gt;arrow.pivot = pymxs.runtime.point3(0,0,0)&lt;BR /&gt;&lt;BR /&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 20 Dec 2018 11:00:42 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/3ds-max-programming-forum/how-to-clone-object-using-python/m-p/8480436#M9193</guid>
      <dc:creator>morten_bohne</dc:creator>
      <dc:date>2018-12-20T11:00:42Z</dc:date>
    </item>
    <item>
      <title>Re: How to clone object using python</title>
      <link>https://forums.autodesk.com/t5/3ds-max-programming-forum/how-to-clone-object-using-python/m-p/8481111#M9194</link>
      <description>&lt;P&gt;Thanks to you, right now I am very close to finish this task!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I hope that will be a last question, do you know how to assign material to each node?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I would like to do smh like this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1. Select node 1,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;2. assign&amp;nbsp;to the node Scanline -&amp;gt; Standard,&lt;/P&gt;
&lt;P&gt;3. Set the color, and material properties.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 20 Dec 2018 15:02:34 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/3ds-max-programming-forum/how-to-clone-object-using-python/m-p/8481111#M9194</guid>
      <dc:creator>mateusz.zelent</dc:creator>
      <dc:date>2018-12-20T15:02:34Z</dc:date>
    </item>
    <item>
      <title>Re: How to clone object using python</title>
      <link>https://forums.autodesk.com/t5/3ds-max-programming-forum/how-to-clone-object-using-python/m-p/8483181#M9195</link>
      <description>&lt;PRE&gt;from pymxs import runtime as rt

tpot = rt.Teapot()
mat = rt.StandardMaterial()
tpot.material = mat
mat.Diffuse_Color = rt.color(255, 0, 0)&lt;/PRE&gt;</description>
      <pubDate>Fri, 21 Dec 2018 12:35:44 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/3ds-max-programming-forum/how-to-clone-object-using-python/m-p/8483181#M9195</guid>
      <dc:creator>morten_bohne</dc:creator>
      <dc:date>2018-12-21T12:35:44Z</dc:date>
    </item>
    <item>
      <title>Re: How to clone object using python</title>
      <link>https://forums.autodesk.com/t5/3ds-max-programming-forum/how-to-clone-object-using-python/m-p/8483192#M9196</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;how to select standard material I know, but how to select a different one and then control its parameters?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Mateusz&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 21 Dec 2018 12:44:24 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/3ds-max-programming-forum/how-to-clone-object-using-python/m-p/8483192#M9196</guid>
      <dc:creator>mateusz.zelent</dc:creator>
      <dc:date>2018-12-21T12:44:24Z</dc:date>
    </item>
  </channel>
</rss>

