  | | | Scripting : how to move samples from a polygon selection ? | Scripting : how to move samples from a polygon selection ? 2005-05-12 - By Guillaume Laforge
Back Thanks for your help ! And the element(ClusterProperty<file:///C:/Softimage/XSI_4.2/Doc/XSISDK /reference/ClusterProperty.html#wp521611>) page from the doc. is instructive for me :-) Cheers, Guillaume Laforge CG artist www.vol2nuit.fr <http://www.vol2nuit.fr>
2005/5/11, javier <javier.vdp@(protected)>: > > Guillaume > first of all 'InvertSelection' does not return a collection so thats > why your 'count' fails. > > one method off the top of my head that you could use to create a > subcomponent collection for polys not belonging to your cluster would > be > > oSel = selection(0) > var matte = oSel.ActivePrimitive.Geometry.Clusters("matte") > var polys = oSel.ActivePrimitive.Geometry.Polygons > var matelems = matte.Elements > var xpolys = new ActiveXObject("XSI.Collection") > xpolys.additems(polys) > //logmessage (xpolys.count) > for (i=matelems.count-1 (See http://unt-1.ora-code.com);i>=0;i--){ > logmessage(matelems(i)) > xpolys.remove(xpolys(matelems(i))) > } > //logmessage (xpolys.count); > //selectobj(xpolys) > //xpolys contains all the polys that are not part of the cluster > > i hope this helps, im sure that you could get at the polys somehow > else, but this should work > javier > > --- > Unsubscribe? Mail Majordomo@(protected) with the following text in body: > unsubscribe xsi >
<div>Thanks for your help !</div> <div>And the element(<a href="file:///C:/Softimage/XSI_4.2/Doc/XSISDK/reference /ClusterProperty.html#wp521611">ClusterProperty</a>) page from the doc. is  ;instructive for me :-)<br> </div> <div>Cheers,</div> <div> </div> <div>Guillaume Laforge</div> <div>CG artist</div> <div><a href="http://www.vol2nuit.fr">www.vol2nuit.fr</a></div> <div><br> </div> <div><span class="gmail_quote">2005/5/11, javier <<a href="mailto:javier.vdp @(protected)">javier.vdp@(protected)</a>>:</span> <blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0 .8ex; BORDER-LEFT: #ccc 1px solid">Guillaume<br>first of all 'InvertSelection' does not return a collection so thats<br>why your 'count' fails. <br><br>one method off the top of my head that you could use to create a<br >subcomponent collection for polys not belonging to your cluster would<br>be<br> <br>oSel = selection(0)<br>var matte = oSel.ActivePrimitive.Geometry.Clusters ("matte")<br>var polys = oSel.ActivePrimitive.Geometry.Polygons<br >var matelems = matte.Elements<br>var xpolys = new ActiveXObject("XSI .Collection")<br>xpolys.additems(polys)<br>//logmessage (xpolys.count )<br>for (i=matelems.count-1 (See http://unt-1.ora-code.com);i>=0;i--){<br> logmessage(matelems(i))<br> xpolys .remove(xpolys(matelems(i)))<br>}<br>//logmessage (xpolys.count);<br>//selectobj (xpolys)<br>//xpolys contains all the polys that are not part of the cluster <br><br>i hope this helps, im sure that you could get at the polys somehow<br >else, but this should work<br>javier<br><br>---<br>Unsubscribe? Mail <a href= "mailto:Majordomo@(protected)">Majordomo@(protected)</a> with the following text in body: <br>unsubscribe xsi<br></blockquote></div><br>
|
|
 |