<?xml version="1.0" encoding="utf-8"?>
<!-- generator="FeedCreator 1.7.2-ppt DokuWiki" -->
<?xml-stylesheet href="/lib/exe/css.php?s=feed" type="text/css"?>
<rdf:RDF
    xmlns="http://purl.org/rss/1.0/"
    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
    xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
    xmlns:dc="http://purl.org/dc/elements/1.1/">
    <channel rdf:about="/feed.php">
        <title>Documentation Center public:software:dazstudio:4:referenceguide:scripting:api_reference:samples:nodes:node_origin_center</title>
        <description></description>
        <link>/</link>
        <image rdf:resource="/lib/tpl/dazdoccenter/images/favicon.ico" />
       <dc:date>2026-04-09T15:58:10+00:00</dc:date>
        <items>
            <rdf:Seq>
                <rdf:li rdf:resource="/public/software/dazstudio/4/referenceguide/scripting/api_reference/samples/nodes/node_origin_center/start"/>
            </rdf:Seq>
        </items>
    </channel>
    <image rdf:about="/lib/tpl/dazdoccenter/images/favicon.ico">
        <title>Documentation Center</title>
        <link>/</link>
        <url>/lib/tpl/dazdoccenter/images/favicon.ico</url>
    </image>
    <item rdf:about="/public/software/dazstudio/4/referenceguide/scripting/api_reference/samples/nodes/node_origin_center/start">
        <dc:format>text/html</dc:format>
        <dc:date>2020-03-27T21:21:29+00:00</dc:date>
        <title>Node Origin Center</title>
        <link>/public/software/dazstudio/4/referenceguide/scripting/api_reference/samples/nodes/node_origin_center/start</link>
        <description>
&lt;h1 id=&quot;node_origin_center&quot;&gt;Node Origin Center&lt;/h1&gt;
&lt;div class=&quot;level1&quot;&gt;

&lt;/div&gt;

&lt;h2 id=&quot;summary&quot;&gt;Summary&lt;/h2&gt;
&lt;div class=&quot;level2&quot;&gt;

&lt;p&gt;
Below is an example demonstrating how to adjust the origin of selected nodes in the scene to be the center of their respective bounding boxes, via script.
&lt;/p&gt;

&lt;/div&gt;

&lt;h2 id=&quot;api_areas_of_interest&quot;&gt;API Areas of Interest&lt;/h2&gt;
&lt;div class=&quot;level2&quot;&gt;
&lt;ul&gt;
&lt;li class=&quot;level1 node&quot;&gt;&lt;div class=&quot;li&quot;&gt; &lt;a href=&quot;/public/software/dazstudio/4/referenceguide/scripting/api_reference/object_index/object_q&quot; class=&quot;wikilink1&quot; title=&quot;public:software:dazstudio:4:referenceguide:scripting:api_reference:object_index:object_q&quot;&gt;QObject&lt;/a&gt;&lt;/div&gt;
&lt;ul&gt;
&lt;li class=&quot;level2&quot;&gt;&lt;div class=&quot;li&quot;&gt; &lt;a href=&quot;/public/software/dazstudio/4/referenceguide/scripting/api_reference/object_index/app_dz&quot; class=&quot;wikilink1&quot; title=&quot;public:software:dazstudio:4:referenceguide:scripting:api_reference:object_index:app_dz&quot;&gt;DzApp&lt;/a&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level2 node&quot;&gt;&lt;div class=&quot;li&quot;&gt; &lt;a href=&quot;/public/software/dazstudio/4/referenceguide/scripting/api_reference/object_index/base_dz&quot; class=&quot;wikilink1&quot; title=&quot;public:software:dazstudio:4:referenceguide:scripting:api_reference:object_index:base_dz&quot;&gt;DzBase&lt;/a&gt;&lt;/div&gt;
&lt;ul&gt;
&lt;li class=&quot;level3&quot;&gt;&lt;div class=&quot;li&quot;&gt; &lt;a href=&quot;/public/software/dazstudio/4/referenceguide/scripting/api_reference/object_index/scene_dz&quot; class=&quot;wikilink1&quot; title=&quot;public:software:dazstudio:4:referenceguide:scripting:api_reference:object_index:scene_dz&quot;&gt;DzScene&lt;/a&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level3 node&quot;&gt;&lt;div class=&quot;li&quot;&gt; &lt;a href=&quot;/public/software/dazstudio/4/referenceguide/scripting/api_reference/object_index/element_dz&quot; class=&quot;wikilink1&quot; title=&quot;public:software:dazstudio:4:referenceguide:scripting:api_reference:object_index:element_dz&quot;&gt;DzElement&lt;/a&gt;&lt;/div&gt;
&lt;ul&gt;
&lt;li class=&quot;level4&quot;&gt;&lt;div class=&quot;li&quot;&gt; &lt;a href=&quot;/public/software/dazstudio/4/referenceguide/scripting/api_reference/object_index/node_dz&quot; class=&quot;wikilink1&quot; title=&quot;public:software:dazstudio:4:referenceguide:scripting:api_reference:object_index:node_dz&quot;&gt;DzNode&lt;/a&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li class=&quot;level2&quot;&gt;&lt;div class=&quot;li&quot;&gt; &lt;a href=&quot;/public/software/dazstudio/4/referenceguide/scripting/api_reference/object_index/messagebox_dz&quot; class=&quot;wikilink1&quot; title=&quot;public:software:dazstudio:4:referenceguide:scripting:api_reference:object_index:messagebox_dz&quot;&gt;DzMessageBox&lt;/a&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level2&quot;&gt;&lt;div class=&quot;li&quot;&gt; &lt;a href=&quot;/public/software/dazstudio/4/referenceguide/scripting/api_reference/object_index/undostack_dz&quot; class=&quot;wikilink1&quot; title=&quot;public:software:dazstudio:4:referenceguide:scripting:api_reference:object_index:undostack_dz&quot;&gt;DzUndoStack&lt;/a&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li class=&quot;level1 node&quot;&gt;&lt;div class=&quot;li&quot;&gt; &lt;a href=&quot;/public/software/dazstudio/4/referenceguide/scripting/api_reference/object_index/object&quot; class=&quot;wikilink1&quot; title=&quot;public:software:dazstudio:4:referenceguide:scripting:api_reference:object_index:object&quot;&gt;Object&lt;/a&gt;&lt;/div&gt;
&lt;ul&gt;
&lt;li class=&quot;level2&quot;&gt;&lt;div class=&quot;li&quot;&gt; &lt;a href=&quot;/public/software/dazstudio/4/referenceguide/scripting/api_reference/object_index/function&quot; class=&quot;wikilink1&quot; title=&quot;public:software:dazstudio:4:referenceguide:scripting:api_reference:object_index:function&quot;&gt;Function&lt;/a&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level2&quot;&gt;&lt;div class=&quot;li&quot;&gt; &lt;a href=&quot;/public/software/dazstudio/4/referenceguide/scripting/api_reference/object_index/array&quot; class=&quot;wikilink1&quot; title=&quot;public:software:dazstudio:4:referenceguide:scripting:api_reference:object_index:array&quot;&gt;Array&lt;/a&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level2&quot;&gt;&lt;div class=&quot;li&quot;&gt; &lt;a href=&quot;/public/software/dazstudio/4/referenceguide/scripting/api_reference/object_index/number&quot; class=&quot;wikilink1&quot; title=&quot;public:software:dazstudio:4:referenceguide:scripting:api_reference:object_index:number&quot;&gt;Number&lt;/a&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level2&quot;&gt;&lt;div class=&quot;li&quot;&gt; &lt;a href=&quot;/public/software/dazstudio/4/referenceguide/scripting/api_reference/object_index/boolean&quot; class=&quot;wikilink1&quot; title=&quot;public:software:dazstudio:4:referenceguide:scripting:api_reference:object_index:boolean&quot;&gt;Boolean&lt;/a&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level2&quot;&gt;&lt;div class=&quot;li&quot;&gt; &lt;a href=&quot;/public/software/dazstudio/4/referenceguide/scripting/api_reference/object_index/string&quot; class=&quot;wikilink1&quot; title=&quot;public:software:dazstudio:4:referenceguide:scripting:api_reference:object_index:string&quot;&gt;String&lt;/a&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level2&quot;&gt;&lt;div class=&quot;li&quot;&gt; &lt;a href=&quot;/public/software/dazstudio/4/referenceguide/scripting/api_reference/object_index/box3_dz&quot; class=&quot;wikilink1&quot; title=&quot;public:software:dazstudio:4:referenceguide:scripting:api_reference:object_index:box3_dz&quot;&gt;DzBox3&lt;/a&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level2&quot;&gt;&lt;div class=&quot;li&quot;&gt; &lt;a href=&quot;/public/software/dazstudio/4/referenceguide/scripting/api_reference/object_index/vec3_dz&quot; class=&quot;wikilink1&quot; title=&quot;public:software:dazstudio:4:referenceguide:scripting:api_reference:object_index:vec3_dz&quot;&gt;DzVec3&lt;/a&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; &lt;a href=&quot;/public/software/dazstudio/4/referenceguide/scripting/api_reference/object_index/global&quot; class=&quot;wikilink1&quot; title=&quot;public:software:dazstudio:4:referenceguide:scripting:api_reference:object_index:global&quot;&gt;Global&lt;/a&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;/div&gt;

&lt;h2 id=&quot;example&quot;&gt;Example&lt;/h2&gt;
&lt;div class=&quot;level2&quot;&gt;
&lt;div class=&quot;wrap_center wrap_round wrap_download plugin_wrap&quot; style=&quot;width: 90%;&quot;&gt;&lt;ul&gt;&lt;li&gt;License: &lt;a href=&quot;http://creativecommons.org/licenses/by/3.0/&quot; class=&quot;urlextern&quot; target=&quot;_blank&quot; title=&quot;http://creativecommons.org/licenses/by/3.0/&quot; rel=&quot;nofollow noopener&quot;&gt;CC Attribution 3.0 Unported&lt;/a&gt;&lt;/li&gt;&lt;li&gt;Click the name of the example below to save it as a file&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div style=&quot;-webkit-user-select: none;-webkit-touch-callout: none;-moz-user-select: none;-ms-user-select: none;user-select: none;&quot;&gt;&lt;dl class=&quot;code&quot;&gt;
&lt;dt&gt;&lt;a href=&quot;/_export/code/public/software/dazstudio/4/referenceguide/scripting/api_reference/samples/nodes/node_origin_center/start?codeblock=0&quot; title=&quot;Download Snippet&quot; class=&quot;mediafile mf_dsa&quot;&gt;Node_Origin_Center.dsa&lt;/a&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;pre class=&quot;code ecmascript&quot;&gt;&lt;span class=&quot;co1&quot;&gt;// Define an anonymous function;&lt;/span&gt;
&lt;span class=&quot;co1&quot;&gt;// serves as our main loop,&lt;/span&gt;
&lt;span class=&quot;co1&quot;&gt;// limits the scope of variables&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
&amp;nbsp;
	&lt;span class=&quot;coMULTI&quot;&gt;/*********************************************************************/&lt;/span&gt;
	&lt;span class=&quot;co1&quot;&gt;// String : A function for retrieving a translation if one exists&lt;/span&gt;
	&lt;span class=&quot;kw2&quot;&gt;function&lt;/span&gt; text&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; sText &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
	&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
		&lt;span class=&quot;co1&quot;&gt;// If the version of the application supports qsTr()&lt;/span&gt;
		&lt;span class=&quot;kw2&quot;&gt;if&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;typeof&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; qsTr &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;!=&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;undefined&amp;quot;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
			&lt;span class=&quot;co1&quot;&gt;// Return the translated (if any) text&lt;/span&gt;
			&lt;span class=&quot;kw2&quot;&gt;return&lt;/span&gt; qsTr&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; sText &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
		&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
		&lt;span class=&quot;co1&quot;&gt;// Return the original text&lt;/span&gt;
		&lt;span class=&quot;kw2&quot;&gt;return&lt;/span&gt; sText&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
	&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&amp;nbsp;
	&lt;span class=&quot;coMULTI&quot;&gt;/*********************************************************************/&lt;/span&gt;
	&lt;span class=&quot;co1&quot;&gt;// Define common message variables&lt;/span&gt;
	&lt;span class=&quot;kw2&quot;&gt;var&lt;/span&gt; sTitle &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; text&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;Selection Error&amp;quot;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
	&lt;span class=&quot;kw2&quot;&gt;var&lt;/span&gt; sMessage &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; text&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;You must select one or more nodes to perform this action.&amp;quot;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
	&lt;span class=&quot;kw2&quot;&gt;var&lt;/span&gt; sButton &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; text&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;&amp;amp;OK&amp;quot;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&amp;nbsp;
	&lt;span class=&quot;co1&quot;&gt;// Get the selected nodes&lt;/span&gt;
	&lt;span class=&quot;kw2&quot;&gt;var&lt;/span&gt; aNodes &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; Scene&lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;me1&quot;&gt;getSelectedNodeList&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
	&lt;span class=&quot;co1&quot;&gt;// Get the number of nodes&lt;/span&gt;
	&lt;span class=&quot;kw2&quot;&gt;var&lt;/span&gt; nNodes &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; aNodes&lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;me1&quot;&gt;length&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
	&lt;span class=&quot;co1&quot;&gt;// If we do not have nodes&lt;/span&gt;
	&lt;span class=&quot;kw2&quot;&gt;if&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; nNodes &lt;span class=&quot;sy0&quot;&gt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;		
		&lt;span class=&quot;co1&quot;&gt;// Alert the user&lt;/span&gt;
		MessageBox&lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;me1&quot;&gt;warning&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; sMessage&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; sTitle&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; sButton&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;&amp;quot;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&amp;nbsp;
		&lt;span class=&quot;co1&quot;&gt;// We are done...&lt;/span&gt;
		&lt;span class=&quot;kw2&quot;&gt;return&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
	&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
	&lt;span class=&quot;co1&quot;&gt;// Declare working variables&lt;/span&gt;
	&lt;span class=&quot;kw2&quot;&gt;var&lt;/span&gt; oNode&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
	&lt;span class=&quot;kw2&quot;&gt;var&lt;/span&gt; boxBounding&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
	&lt;span class=&quot;kw2&quot;&gt;var&lt;/span&gt; nMidY&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
	&lt;span class=&quot;kw2&quot;&gt;var&lt;/span&gt; vecCenter&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&amp;nbsp;
	&lt;span class=&quot;co1&quot;&gt;// Start collecting events for the undo stack&lt;/span&gt;
	beginUndo&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&amp;nbsp;
	&lt;span class=&quot;co1&quot;&gt;// Iterate over the nodes&lt;/span&gt;
	&lt;span class=&quot;kw2&quot;&gt;for&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;var&lt;/span&gt; i &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; i &lt;span class=&quot;sy0&quot;&gt;&amp;lt;&lt;/span&gt; nNodes&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; i &lt;span class=&quot;sy0&quot;&gt;+=&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
		&lt;span class=&quot;co1&quot;&gt;// Get the 'current' node&lt;/span&gt;
		oNode &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; aNodes&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt; i &lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&amp;nbsp;
		&lt;span class=&quot;co1&quot;&gt;// Get the local bounding box for the node&lt;/span&gt;
		boxBounding &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; oNode&lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;me1&quot;&gt;getLocalBoundingBox&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
		&lt;span class=&quot;co1&quot;&gt;// Calculate the center of the bounding box&lt;/span&gt;
		nMidY &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;boxBounding&lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;me1&quot;&gt;maxY&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;-&lt;/span&gt; boxBounding&lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;me1&quot;&gt;minY&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;*&lt;/span&gt; &lt;span class=&quot;nu16&quot;&gt;0.5&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
		&lt;span class=&quot;co1&quot;&gt;// Create a translation vector&lt;/span&gt;
		vecCenter &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;new&lt;/span&gt; DzVec3&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; nMidY&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
		&lt;span class=&quot;co1&quot;&gt;// Set the origin for the node; as default&lt;/span&gt;
		oNode&lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;me1&quot;&gt;setOrigin&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; vecCenter&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;true&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
		&lt;span class=&quot;co1&quot;&gt;// Adjust to account for controllers&lt;/span&gt;
		oNode&lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;me1&quot;&gt;adjustOrigin&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; vecCenter &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
	&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
	&lt;span class=&quot;co1&quot;&gt;// Push the events to the undo stack; as a single event&lt;/span&gt;
	acceptUndo&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; text&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;Center Origin(s)&amp;quot;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;co1&quot;&gt;// Finalize the function and invoke&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/pre&gt;
&lt;/dd&gt;&lt;/dl&gt;
&lt;/div&gt;
&lt;/div&gt;
</description>
    </item>
</rdf:RDF>
