<?xml version="1.0" encoding="UTF-8"?>
<xsi_file type="CompoundNode" name="Add Points from Strand Source" tasks="Particles/Strands" author="Andy Moorer after Stefano Jannuzzo and Mathieu Leclaire" formatversion="1.4" compoundversion="1.0">
	<description><![CDATA[This is an elaboration of an approach described by Stefano and Mathieu on the SItoA mailing list, for creating instances on each strand point of a source pointcloud. The Arnold renderer always lofts instances along strands, so if explicit instances for each strand point are desired, this workaround is necessary. Additions: support for motion blur and size profiles. Usage: Create a new point cloud and place this compound in an unsimulated ICE tree. Add source pointcloud name, and if instances are desired conect them to the "shape" attribute as you would for a regular emitter.]]></description>
	<definition>
		<nodes>
			<node type="BuildArrayFromSetNode" index="0">
				<param name="value" type="4" value="0.000000"></param>
				<portdef name="value" type="4" structure="2" group="0" instance="0" port="0"></portdef>
				<datablob category="ui_infos">
					<prop name="posx">-794</prop>
					<prop name="posy">1002</prop>
					<prop name="state">ConnectedOnly</prop>
				</datablob>
			</node>
			<node type="GetDataNode" index="1">
				<param name="reference" type="31" value=".StrandSize"></param>
				<param_ext name="reference" type="31" value=".StrandSize"></param_ext>
				<portdef name="source" type="2048" structure="1" group="1" instance="0" port="0"></portdef>
				<portdef name="inname" type="8192" structure="1" group="3" instance="0" port="0"></portdef>
				<datablob category="ui_infos">
					<prop name="posx">-1001</prop>
					<prop name="posy">909</prop>
					<prop name="state">Normal</prop>
				</datablob>
			</node>
			<node type="GetDataNode" index="2">
				<param name="reference" type="31" value=".StrandVelocity"></param>
				<param_ext name="reference" type="31" value=".StrandVelocity"></param_ext>
				<portdef name="source" type="2048" structure="1" group="1" instance="0" port="0"></portdef>
				<portdef name="inname" type="8192" structure="1" group="3" instance="0" port="0"></portdef>
				<datablob category="ui_infos">
					<prop name="posx">-934</prop>
					<prop name="posy">641</prop>
					<prop name="state">Normal</prop>
				</datablob>
			</node>
			<node type="GetDataNode" index="3">
				<param name="reference" type="31" value=".strandposition"></param>
				<param_ext name="reference" type="31" value=".strandposition"></param_ext>
				<portdef name="source" type="2048" structure="1" group="1" instance="0" port="0"></portdef>
				<portdef name="inname" type="8192" structure="1" group="3" instance="0" port="0"></portdef>
				<datablob category="ui_infos">
					<prop name="posx">-339</prop>
					<prop name="posy">122</prop>
					<prop name="state">Normal</prop>
				</datablob>
				<comment type="node" state="maximized" wordwrap="true" autoresize="true" background="0" background_alpha="0.000000" title="14876671" title_text="0" offsetx="-228" offsety="-58" sizex="204" sizey="84"><![CDATA[Creates a huge array of every strandposition in source cloud]]></comment>
			</node>
			<node type="AddPointNode" index="4">
				<param name="reference" type="31" value="Self"></param>
				<param name="positions1.positions1_x" type="4" value="0.000000"></param>
				<param name="positions1.positions1_y" type="4" value="0.000000"></param>
				<param name="positions1.positions1_z" type="4" value="0.000000"></param>
				<param_ext name="reference" type="31" value="Self"></param_ext>
				<portdef name="positions1" type="16" structure="2" group="1" instance="0" port="0"></portdef>
				<portdef name="inname" type="8192" structure="1" group="3" instance="0" port="0"></portdef>
				<portdef name="oncreation1" type="4096" structure="1" group="4" instance="0" port="0"></portdef>
				<portdef name="oncreation2" type="4096" structure="1" group="4" instance="1" port="0"></portdef>
				<portdef name="oncreation3" type="4096" structure="1" group="4" instance="2" port="0"></portdef>
				<portdef name="oncreation4" type="4096" structure="1" group="4" instance="3" port="0"></portdef>
				<portdef name="oncreation5" type="4096" structure="1" group="4" instance="4" port="0"></portdef>
				<datablob category="ui_infos">
					<prop name="posx">88</prop>
					<prop name="posy">292</prop>
					<prop name="state">Normal</prop>
				</datablob>
			</node>
			<node type="BuildArrayFromSetNode" index="5">
				<param name="value.value_x" type="4" value="1.000000"></param>
				<param name="value.value_y" type="4" value="0.000000"></param>
				<param name="value.value_z" type="4" value="0.000000"></param>
				<param name="value.value_angle" type="4" value="0.000000"></param>
				<portdef name="value" type="16384" structure="2" group="0" instance="0" port="0"></portdef>
				<datablob category="ui_infos">
					<prop name="posx">-727</prop>
					<prop name="posy">516</prop>
					<prop name="state">ConnectedOnly</prop>
				</datablob>
			</node>
			<node type="BuildArrayFromSetNode" index="6">
				<param name="value.value_angle" type="4" value="0.000000"></param>
				<param name="value.value_z" type="4" value="0.000000"></param>
				<param name="value.value_y" type="4" value="0.000000"></param>
				<portdef name="value" type="16" structure="2" group="0" instance="0" port="0"></portdef>
				<datablob category="ui_infos">
					<prop name="posx">-727</prop>
					<prop name="posy">734</prop>
					<prop name="state">ConnectedOnly</prop>
				</datablob>
			</node>
			<node type="Init Particle AM" version="1.1" index="7">
				<param name="Mass" type="4" value="0.100000"></param>
				<param name="Size" type="4" value="0.700000"></param>
				<param name="Color.Color_red" type="4" value="1.000000"></param>
				<param name="Color.Color_green" type="4" value="1.000000"></param>
				<param name="Color.Color_blue" type="4" value="1.000000"></param>
				<param name="Color.Color_alpha" type="4" value="0.726000"></param>
				<param name="Shape" type="3" value="2"></param>
				<param name="Scale.Scale_x" type="4" value="1.000000"></param>
				<param name="Scale.Scale_y" type="4" value="1.000000"></param>
				<param name="Scale.Scale_z" type="4" value="1.000000"></param>
				<param name="State" type="3" value="0"></param>
				<portdef name="Size" type="4" structure="1" group="-1" instance="-1" port="-1"></portdef>
				<portdef name="Color" type="512" structure="1" group="-1" instance="-1" port="-1"></portdef>
				<portdef name="Mass" type="4" structure="1" group="-1" instance="-1" port="-1"></portdef>
				<portdef name="Scale" type="16" structure="1" group="-1" instance="-1" port="-1"></portdef>
				<portdef name="Shape" type="32768" structure="1" group="-1" instance="-1" port="-1" groupname="Value"></portdef>
				<portdef name="State" type="2" structure="1" group="-1" instance="-1" port="-1"></portdef>
				<datablob category="ui_infos">
					<prop name="posx">-337</prop>
					<prop name="posy">263</prop>
					<prop name="state">Normal</prop>
				</datablob>
				<comment type="node" state="maximized" wordwrap="true" autoresize="true" background="0" background_alpha="0.000000" title="14876671" title_text="0" offsetx="-152" offsety="-18" sizex="122" sizey="71"><![CDATA[Set attributes on each individual added point]]></comment>
			</node>
			<node type="MultiplyByScalarNode" index="8">
				<param name="value" type="4" value="0.000000"></param>
				<param name="factor" type="4" value="1.000000"></param>
				<portdef name="value" type="4" structure="1" group="0" instance="0" port="0"></portdef>
				<portdef name="factor" type="4" structure="1" group="0" instance="0" port="1"></portdef>
				<datablob category="ui_infos">
					<prop name="posx">-390</prop>
					<prop name="posy">978</prop>
					<prop name="state">Normal</prop>
				</datablob>
			</node>
			<node type="SelectInArrayNode" index="9">
				<param name="index" type="3" value="0"></param>
				<param name="array.array_x" type="4" value="1.000000"></param>
				<param name="array.array_y" type="4" value="0.000000"></param>
				<param name="array.array_z" type="4" value="0.000000"></param>
				<param name="array.array_angle" type="4" value="0.000000"></param>
				<portdef name="index" type="2" structure="1" group="0" instance="0" port="0"></portdef>
				<portdef name="array" type="16384" structure="2" group="0" instance="0" port="1"></portdef>
				<datablob category="ui_infos">
					<prop name="posx">-516</prop>
					<prop name="posy">540</prop>
					<prop name="state">Collapsed</prop>
				</datablob>
			</node>
			<node type="PassThroughNode" index="10">
				<portdef name="in" type="8192" structure="1" group="0" instance="0" port="0"></portdef>
				<datablob category="passthrough">
					<prop name="private">true</prop>
				</datablob>
				<datablob category="ui_infos">
					<prop name="posx">-1391</prop>
					<prop name="posy">175</prop>
					<prop name="state">Normal</prop>
				</datablob>
			</node>
			<node type="SelectInArrayNode" index="11">
				<param name="index" type="3" value="0"></param>
				<param name="array" type="4" value="0.000000"></param>
				<portdef name="index" type="2" structure="1" group="0" instance="0" port="0"></portdef>
				<portdef name="array" type="4" structure="2" group="0" instance="0" port="1"></portdef>
				<datablob category="ui_infos">
					<prop name="posx">-586</prop>
					<prop name="posy">947</prop>
					<prop name="state">ConnectedOnly</prop>
				</datablob>
			</node>
			<node type="FCurveNode" index="12">
				<param name="profile" type="buffer">2 20 1 4.57931E-198 -1.79769E+308 1.79769E+308 3 0
0 0.000000 1.000000 0.231401 0.046413 -0.333189 -0.066829 8199 3
0 1.000000 0.200000 0.333333 0.000000 -0.333333 0.000000 8196 3
</param>
				<param name="in" type="4" value="0.000000"></param>
				<portdef name="in" type="4" structure="1" group="0" instance="0" port="0"></portdef>
				<datablob category="ui_infos">
					<prop name="posx">-471</prop>
					<prop name="posy">1162</prop>
					<prop name="state">Normal</prop>
				</datablob>
			</node>
			<node type="GetDataNode" index="13">
				<param name="reference" type="31" value=".strandorientation"></param>
				<param_ext name="reference" type="31" value=".strandorientation"></param_ext>
				<portdef name="source" type="2048" structure="1" group="1" instance="0" port="0"></portdef>
				<portdef name="inname" type="8192" structure="1" group="3" instance="0" port="0"></portdef>
				<datablob category="ui_infos">
					<prop name="posx">-946</prop>
					<prop name="posy">516</prop>
					<prop name="state">Normal</prop>
				</datablob>
			</node>
			<node type="Set Data" version="1.0" index="14">
				<param name="Reference" type="31" value="self.Size"></param>
				<param name="Value" type="4" value="0.000000"></param>
				<param_ext name="Reference" type="31" value="self.Size"></param_ext>
				<portdef name="In_Name" type="8192" structure="1" group="-1" instance="-1" port="-1"></portdef>
				<portdef name="Value" type="4" structure="1" group="2" instance="0" port="0" groupname="Value"></portdef>
				<datablob category="ui_infos">
					<prop name="posx">-224</prop>
					<prop name="posy">904</prop>
					<prop name="state">Normal</prop>
				</datablob>
			</node>
			<node type="Set Data" version="1.0" index="15">
				<param name="Reference" type="31" value="self.PointVelocity"></param>
				<param name="Value.Value_x" type="4" value="0.000000"></param>
				<param name="Value.Value_y" type="4" value="0.000000"></param>
				<param name="Value.Value_z" type="4" value="0.000000"></param>
				<param_ext name="Reference" type="31" value="self.PointVelocity"></param_ext>
				<portdef name="Value" type="16" structure="1" group="2" instance="0" port="0" groupname="Value"></portdef>
				<portdef name="In_Name" type="8192" structure="1" group="-1" instance="-1" port="-1"></portdef>
				<datablob category="ui_infos">
					<prop name="posx">-350</prop>
					<prop name="posy">648</prop>
					<prop name="state">Normal</prop>
				</datablob>
			</node>
			<node type="IfNode" index="16">
				<param name="condition" type="11" value="true"></param>
				<portdef name="condition" type="1" structure="1" group="0" instance="0" port="0"></portdef>
				<portdef name="iftrue" type="4096" structure="1" group="0" instance="0" port="1"></portdef>
				<portdef name="iffalse" type="4096" structure="1" group="0" instance="0" port="2"></portdef>
				<datablob category="ui_infos">
					<prop name="posx">388</prop>
					<prop name="posy">390</prop>
					<prop name="state">Normal</prop>
				</datablob>
			</node>
			<node type="IfNode" index="17">
				<param name="condition" type="11" value="true"></param>
				<portdef name="condition" type="1" structure="1" group="0" instance="0" port="0"></portdef>
				<portdef name="iftrue" type="4096" structure="1" group="0" instance="0" port="1"></portdef>
				<portdef name="iffalse" type="4096" structure="1" group="0" instance="0" port="2"></portdef>
				<datablob category="ui_infos">
					<prop name="posx">-89</prop>
					<prop name="posy">887</prop>
					<prop name="state">Normal</prop>
				</datablob>
			</node>
			<node type="Set Data" version="1.0" index="18">
				<param name="Reference" type="31" value="self.orientation"></param>
				<param name="Value.Value_x" type="4" value="1.000000"></param>
				<param name="Value.Value_y" type="4" value="0.000000"></param>
				<param name="Value.Value_z" type="4" value="0.000000"></param>
				<param name="Value.Value_angle" type="4" value="0.000000"></param>
				<param_ext name="Reference" type="31" value="self.orientation"></param_ext>
				<portdef name="In_Name" type="8192" structure="1" group="-1" instance="-1" port="-1"></portdef>
				<portdef name="Value" type="16384" structure="1" group="2" instance="0" port="0" groupname="Value"></portdef>
				<datablob category="ui_infos">
					<prop name="posx">-355</prop>
					<prop name="posy">499</prop>
					<prop name="state">Normal</prop>
				</datablob>
			</node>
			<node type="Get Point ID" version="1.0" index="19">
				<param name="In_Name_Reference" type="31" value="Self"></param>
				<param_ext name="In_Name_Reference" type="31" value="Self"></param_ext>
				<portdef name="In_Name" type="8192" structure="1" group="-1" instance="-1" port="-1"></portdef>
				<datablob category="ui_infos">
					<prop name="posx">-792</prop>
					<prop name="posy">632</prop>
					<prop name="state">ConnectedOnly</prop>
				</datablob>
			</node>
			<node type="SelectInArrayNode" index="20">
				<param name="index" type="3" value="0"></param>
				<param name="array.array_angle" type="4" value="0.000000"></param>
				<param name="array.array_z" type="4" value="0.000000"></param>
				<param name="array.array_y" type="4" value="0.000000"></param>
				<portdef name="index" type="2" structure="1" group="0" instance="0" port="0"></portdef>
				<portdef name="array" type="16" structure="2" group="0" instance="0" port="1"></portdef>
				<datablob category="ui_infos">
					<prop name="posx">-519</prop>
					<prop name="posy">679</prop>
					<prop name="state">Collapsed</prop>
				</datablob>
			</node>
			<comment type="node" state="maximized" wordwrap="true" autoresize="true" background="0" background_alpha="0.000000" title="13103871" title_text="0" offsetx="-10" offsety="651" sizex="165" sizey="93"><![CDATA[If you're actually reading these comments, isn't it about time to go get some coffee?]]></comment>
			<comment type="group" state="maximized" wordwrap="true" autoresize="true" background="0" background_alpha="0.100000" title="13103871" title_text="0" offsetx="-985" offsety="445" sizex="829" sizey="376"><![CDATA[Get original strand orientation and velocity arrays and build a new one which is a giant array of all strand attributes from the source cloud. Then select the appropriate value for each added point, based on the pointID as an index (which works because the pointID is derived from the strandposition array, which is of the same size and order.)]]></comment>
		</nodes>
		<exposed_ports>
			<port index="4" portname="oncreation5" username="On_Creation" basename="On Creation" portlabel="On Creation" exposetype="use_node"> </port>
			<port index="7" portname="Shape" username="Shape" basename="Shape" portlabel="Shape" exposetype="single"> </port>
			<port index="7" portname="Mass" username="Mass" basename="Mass" portlabel="Mass" exposetype="single"> </port>
			<port index="7" portname="Size" username="Size" basename="Size" portlabel="Size" exposetype="single"> </port>
			<port index="7" portname="Color" username="Color" basename="Color" portlabel="Color" exposetype="single"> </port>
			<port index="7" portname="Scale" username="Scale" basename="Scale" portlabel="Scale" exposetype="single"> </port>
			<port index="7" portname="State" username="State" basename="State" portlabel="State" exposetype="single"> </port>
			<port index="8" portname="factor" username="Size_Multiplier" basename="Size Multiplier" portlabel="Size Multiplier" exposetype="single"> </port>
			<port index="10" portname="in" username="Source_Pointcloud_Name" basename="Source Pointcloud Name" portlabel="Source Pointcloud Name" exposetype="single"> </port>
			<port index="16" portname="result" username="Execute" basename="Execute" portlabel="Execute" exposetype="single"> </port>
			<port index="16" portname="condition" username="Enable" basename="Enable" portlabel="Enable" exposetype="single"> </port>
			<port index="17" portname="condition" username="Enable_Size_Profile" basename="Enable Size Profile" portlabel="Enable Size Profile" exposetype="single"> </port>
		</exposed_ports>
		<connections>
			<cnx from_node="5" from_port="array" to_node="9" to_port="array"> </cnx>
			<cnx from_node="0" from_port="array" to_node="11" to_port="array"> </cnx>
			<cnx from_node="6" from_port="array" to_node="20" to_port="array"> </cnx>
			<cnx from_node="2" from_port="value" to_node="6" to_port="value"> </cnx>
			<cnx from_node="3" from_port="value" to_node="4" to_port="positions1"> </cnx>
			<cnx from_node="7" from_port="Execute" to_node="4" to_port="oncreation1"> </cnx>
			<cnx from_node="4" from_port="add" to_node="16" to_port="iftrue"> </cnx>
			<cnx from_node="8" from_port="result" to_node="14" to_port="Value"> </cnx>
			<cnx from_node="9" from_port="value" to_node="18" to_port="Value"> </cnx>
			<cnx from_node="10" from_port="out" to_node="13" to_port="inname"> </cnx>
			<cnx from_node="10" from_port="out" to_node="1" to_port="inname"> </cnx>
			<cnx from_node="10" from_port="out" to_node="2" to_port="inname"> </cnx>
			<cnx from_node="10" from_port="out" to_node="3" to_port="inname"> </cnx>
			<cnx from_node="11" from_port="value" to_node="8" to_port="value"> </cnx>
			<cnx from_node="1" from_port="value" to_node="0" to_port="value"> </cnx>
			<cnx from_node="13" from_port="value" to_node="5" to_port="value"> </cnx>
			<cnx from_node="14" from_port="Execute" to_node="17" to_port="iftrue"> </cnx>
			<cnx from_node="15" from_port="Execute" to_node="4" to_port="oncreation3"> </cnx>
			<cnx from_node="17" from_port="result" to_node="4" to_port="oncreation4"> </cnx>
			<cnx from_node="18" from_port="Execute" to_node="4" to_port="oncreation2"> </cnx>
			<cnx from_node="19" from_port="Point_ID" to_node="9" to_port="index"> </cnx>
			<cnx from_node="19" from_port="Point_ID" to_node="20" to_port="index"> </cnx>
			<cnx from_node="19" from_port="Point_ID" to_node="11" to_port="index"> </cnx>
			<cnx from_node="20" from_port="value" to_node="15" to_port="Value"> </cnx>
		</connections>
		<layout>
			<item type="input" name="Enable"> </item>
			<item type="input" name="Source_Pointcloud_Name"> </item>
			<group type="input" name="New Particle Attributes" collapsed="false">
				<item type="input" name="Mass" min="0" max="0"> </item>
				<item type="input" name="Size" min="0" max="0"> </item>
				<item type="input" name="Color" min="0" max="0"> </item>
				<item type="input" name="Shape" min="0" max="0"> </item>
				<item type="input" name="Scale" min="0" max="0"> </item>
				<item type="input" name="State" min="0" max="0"> </item>
			</group>
			<group type="input" name="Additional Operations" collapsed="false">
				<item type="input" name="On_Creation" min="0" max="0"> </item>
			</group>
			<group type="input" name="Size Profile" collapsed="false">
				<item type="input" name="Enable_Size_Profile" min="0" max="0"> </item>
				<item type="input" name="Size_Multiplier" min="0" max="0"> </item>
			</group>
			<item type="output" name="Execute"> </item>
		</layout>
	</definition>
</xsi_file>
