[no subject]

I made a little function to select a hair cluster :

//the selected hair object
var oHair =3D Selection.item(0);

SelectHairCluster(oHair);
function SelectHairCluster(HairObject){
//Find the hair operator.
oEnum =3D new Enumerator( oHair.ActivePrimitive.ConstructionHistory );
for (;!oEnum.atEnd();oEnum.moveNext()){
//logmessage(oEnum.item().name)
if( oEnum.item().name =3D=3D "Hair Generator Operator" ){
oOp =3D oEnum.item();
oEnumInPort =3D new Enumerator( oOp.InputPorts ) ;
for (;!oEnumInPort.atEnd();oEnumInPort.moveNext() ){
var oInPort =3D oEnumInPort.item () ;
if(oInPort.GroupName =3D=3D "Group_1"){
var oCluster =3D oInPort.Target2
}}}}
if(oCluster) SelectObj(oCluster);
}

Hope this help

Cheers

Guillaume Laforge


On 2/10/06, Mathieu Leclaire < mleclair(at)hybride.com
<mailto:mleclair(at)hybride.com> > wrote:
Ok=85 so how do I make my way to the input ports starting from a
HairPrimitive? How do I extract the HairGenOp from the HairPrimitive? I'v=
e
been browsing through the SDK but I can't figure out how to extract the
Operators starting from a Primitive=85 can anyone clear this up for me pl=
ease?


-----Original Message-----
From: owner-xsi(at)Softimage.COM <mailto:owner-xsi(at)Softimage.COM>  [mailto:
owner-xsi(at)Softimage.COM <mailto:owner-xsi(at)Softimage.COM> ]On Behalf Of Al=
oys
Baillet
Sent: Thursday, February 09, 2006 11:08 PM
To: XSI(at)Softimage.COM <mailto:XSI(at)Softimage.COM>
Subject: Re: get cluster from HairPrimitive

Hi,

You can find it in the input ports of the HairGenOp...

Cheers,

Aloys
On 2/10/06, Mathieu Leclaire < mleclair(at)hybride.com
<mailto:mleclair(at)hybride.com> > wrote:
Hi,

I have a quick question: I have hair applied to the cluster of an object.=
 In
c++, how can I retrieve the cluster associated with the HairPrimitive?


Mathieu Leclaire
R&D Programmer
Hybride



---
Unsubscribe? Mail Majordomo(at)Softimage.COM <mailto:Majordomo(at)Softimage.COM=
>
with the following text in body:
unsubscribe xsi



--
Aloys Baillet - XSI Technical Director
Character Dpt - Animal Logic
--


------=_NextPart_000_0006_01C62EB5.5A054190
Content-Type: text/html;
	charset="Windows-1252"
Content-Transfer-Encoding: quoted-printable

<html xmlns:o=3D"urn:schemas-microsoft-com:office:office" =
xmlns:w=3D"urn:schemas-microsoft-com:office:word" =
xmlns=3D"http://www.w3.org/TR/REC-html40";>

<head>
<meta http-equiv=3DContent-Type content=3D"text/html; =
charset=3Dwindows-1252">
<meta name=3DProgId content=3DWord.Document>
<meta name=3DGenerator content=3D"Microsoft Word 9">
<meta name=3DOriginator content=3D"Microsoft Word 9">
<link rel=3DFile-List href=3D"cid:filelist.xml(at)01C62EB5.57AECE70">
<!--[if gte mso 9]><xml>
 <o:OfficeDocumentSettings>
  <o:DoNotRelyOnCSS/>
 </o:OfficeDocumentSettings>
</xml><![endif]--><!--[if gte mso 9]><xml>
 <w:WordDocument>
  <w:Zoom>0</w:Zoom>
  <w:DocumentKind>DocumentEmail</w:DocumentKind>
  <w:EnvelopeVis/>
 </w:WordDocument>
</xml><![endif]-->
<style>
<!--
 /* Font Definitions */
(at)font-face
	{font-family:Tahoma;
	panose-1:2 11 6 4 3 5 4 4 2 4;
	mso-font-charset:0;
	mso-generic-font-family:swiss;
	mso-font-pitch:variable;
	mso-font-signature:553679495 -2147483648 8 0 66047 0;}
(at)font-face
	{font-family:"Arial Unicode MS";
	panose-1:2 11 6 4 2 2 2 2 2 4;
	mso-font-charset:128;
	mso-generic-font-family:swiss;
	mso-font-pitch:variable;
	mso-font-signature:-1 -369098753 63 0 4129023 0;}
(at)font-face
	{font-family:"\(at)Arial Unicode MS";
	panose-1:2 11 6 4 2 2 2 2 2 4;
	mso-font-charset:128;
	mso-generic-font-family:swiss;
	mso-font-pitch:variable;
	mso-font-signature:-1 -369098753 63 0 4129023 0;}
 /* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
	{mso-style-parent:"";
	margin:0in;
	margin-bottom:.0001pt;
	mso-pagination:widow-orphan;
	font-size:12.0pt;
	font-family:"Times New Roman";
	mso-fareast-font-family:"Times New Roman";}
a:link, span.MsoHyperlink
	{color:blue;
	text-decoration:underline;
	text-underline:single;}
a:visited, span.MsoHyperlinkFollowed
	{color:blue;
	text-decoration:underline;
	text-underline:single;}
p.MsoAutoSig, li.MsoAutoSig, div.MsoAutoSig
	{margin:0in;
	margin-bottom:.0001pt;
	mso-pagination:widow-orphan;
	font-size:12.0pt;
	font-family:"Times New Roman";
	mso-fareast-font-family:"Times New Roman";}
p
	{margin-right:0in;
	mso-margin-top-alt:auto;
	mso-margin-bottom-alt:auto;
	margin-left:0in;
	mso-pagination:widow-orphan;
	font-size:12.0pt;
	font-family:"Times New Roman";
	mso-fareast-font-family:"Times New Roman";}
span.gmailquote
	{mso-style-name:gmail_quote;}
span.e
	{mso-style-name:e;}
span.EmailStyle20
	{mso-style-type:personal-reply;
	mso-ansi-font-size:10.0pt;
	mso-ascii-font-family:Arial;
	mso-hansi-font-family:Arial;
	mso-bidi-font-family:Arial;
	color:navy;}
(at)page Section1
	{size:8.5in 11.0in;
	margin:1.0in 1.25in 1.0in 1.25in;
	mso-header-margin:.5in;
	mso-footer-margin:.5in;
	mso-paper-source:0;}
div.Section1
	{page:Section1;}
-->
</style>
</head>

<body lang=3DEN-US link=3Dblue vlink=3Dblue style=3D'tab-interval:.5in'>

<div class=3DSection1>

<p class=3DMsoNormal><span class=3DEmailStyle20><font size=3D2 =
color=3Dnavy face=3DArial><span
style=3D'font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Arial'>Ok=
, it
took me a while to figure how to do it in c++ but thanks for pointing me =
in the
right direction. Now I have encountered another problem though: When you =
apply
hair to a cluster, how can you know from which vertex each hair guide =
point is
attached to? I know that the guide hair points are in packs of 14 (ie. =
0..13
first guide hair, 14..27 the second=85) and a cluster is a list of =
indexes of
polygons=85 but how do you make the link? How do you know from which =
vertex each
guide hair originates?<o:p></o:p></span></font></span></p>

<p class=3DMsoNormal><span class=3DEmailStyle20><font size=3D2 =
color=3Dnavy face=3DArial><span
style=3D'font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Arial'><!=
[if =
!supportEmptyParas]>&nbsp;<![endif]><o:p></o:p></span></font></span></p>

<p class=3DMsoNormal style=3D'margin-left:.5in'><font size=3D2 =
color=3Dblack
face=3DTahoma><span =
style=3D'font-size:10.0pt;font-family:Tahoma;color:black'>-----Original
Message-----<br>
<b><span style=3D'font-weight:bold'>From:</span></b> =
owner-xsi(at)Softimage.COM
[mailto:owner-xsi(at)Softimage.COM]<b><span style=3D'font-weight:bold'>On =
Behalf Of </span></b>guillaume
laforge<br>
<b><span style=3D'font-weight:bold'>Sent:</span></b> Friday, February =
10, 2006
3:42 PM<br>
<b><span style=3D'font-weight:bold'>To:</span></b> XSI(at)Softimage.COM<br>
<b><span style=3D'font-weight:bold'>Subject:</span></b> Re: get cluster =
from
HairPrimitive</span></font></p>

<p class=3DMsoNormal style=3D'margin-left:.5in'><font size=3D3 =
face=3D"Times New Roman"><span
style=3D'font-size:12.0pt'><![if =
!supportEmptyParas]>&nbsp;<![endif]><o:p></o:p></span></font></p>

<p class=3DMsoNormal style=3D'margin-left:.5in'><font size=3D3 =
color=3Dblack
face=3D"Times New Roman"><span style=3D'font-size:12.0pt;color:black'>Hi =
Mathieu,</span></font><font
color=3Dblack><span =
style=3D'color:black;mso-color-alt:windowtext'><o:p></o:p></span></font><=
/p>

<p class=3DMsoNormal style=3D'margin-left:.5in'><font size=3D3 =
color=3Dblack
face=3D"Times New Roman"><span =
style=3D'font-size:12.0pt;color:black'>&nbsp;</span></font><font
color=3Dblack><span =
style=3D'color:black;mso-color-alt:windowtext'><o:p></o:p></span></font><=
/p>

<p class=3DMsoNormal style=3D'margin-left:.5in'><font size=3D3 =
color=3Dblack
face=3D"Times New Roman"><span =
style=3D'font-size:12.0pt;color:black'>From the hair
primitive you can enumerate its construction history and find the hair
operator. You can use the SDK explorer to know the group name of the =
target (
the cluster) and then find this target.</span></font><font =
color=3Dblack><span
style=3D'color:black;mso-color-alt:windowtext'><o:p></o:p></span></font><=
/p>

<p class=3DMsoNormal style=3D'margin-left:.5in'><font size=3D3 =
color=3Dblack
face=3D"Times New Roman"><span =
style=3D'font-size:12.0pt;color:black'>&nbsp;</span></font><font
color=3Dblack><span =
style=3D'color:black;mso-color-alt:windowtext'><o:p></o:p></span></font><=
/p>

<p class=3DMsoNormal style=3D'margin-left:.5in'><font size=3D3 =
color=3Dblack
face=3D"Times New Roman"><span style=3D'font-size:12.0pt;color:black'>I =
made a
little function to select a hair cluster :</span></font><font =
color=3Dblack><span
style=3D'color:black;mso-color-alt:windowtext'><o:p></o:p></span></font><=
/p>

<p class=3DMsoNormal style=3D'margin-left:.5in'><font size=3D3 =
color=3Dblack
face=3D"Times New Roman"><span =
style=3D'font-size:12.0pt;color:black'>&nbsp;</span></font><font
color=3Dblack><span =
style=3D'color:black;mso-color-alt:windowtext'><o:p></o:p></span></font><=
/p>

<p style=3D'margin-left:.5in'><font size=3D2 color=3Dblack face=3D"Times =
New Roman"><span
style=3D'font-size:10.0pt;color:black'>//the selected hair object<br>
var oHair =3D Selection.item(0);<br>
<br>
SelectHairCluster(oHair);&nbsp;</span></font><font size=3D2 =
color=3Dblack><span
style=3D'font-size:10.0pt;color:black;mso-color-alt:windowtext'><o:p></o:=
p></span></font></p>

<p style=3D'margin-left:.5in'><font size=3D2 color=3Dblack face=3D"Times =
New Roman"><span
style=3D'font-size:10.0pt;color:black'>function =
SelectHairCluster(HairObject){<br>
//Find the hair operator.<br>
oEnum =3D new Enumerator( oHair.ActivePrimitive.ConstructionHistory =
);<br>
for (;!oEnum.atEnd();oEnum.moveNext()){<br>
//logmessage(oEnum.item().name) <br>
if( oEnum.item().name =3D=3D &quot;Hair Generator Operator&quot; ){<br>
oOp =3D oEnum.item();<br>
oEnumInPort =3D new Enumerator( oOp.InputPorts ) ;<br>
for (;!oEnumInPort.atEnd();oEnumInPort.moveNext() ){<br>
var oInPort =3D oEnumInPort.item () ;<br>
if(oInPort.GroupName =3D=3D &quot;Group_1&quot;){<br>
var oCluster =3D oInPort.Target2<br>
}}}}<br>
if(oCluster) SelectObj(oCluster);<br>
}</span></font><font size=3D2 color=3Dblack><span =
style=3D'font-size:10.0pt;
color:black;mso-color-alt:windowtext'><o:p></o:p></span></font></p>

<p class=3DMsoNormal style=3D'margin-left:.5in'><font size=3D3 =
color=3Dblack
face=3D"Times New Roman"><span =
style=3D'font-size:12.0pt;color:black'><br>
Hope this help</span></font><font color=3Dblack><span =
style=3D'color:black;
mso-color-alt:windowtext'><o:p></o:p></span></font></p>

<p class=3DMsoNormal style=3D'margin-left:.5in'><font size=3D3 =
color=3Dblack
face=3D"Times New Roman"><span =
style=3D'font-size:12.0pt;color:black'>&nbsp;</span></font><font
color=3Dblack><span =
style=3D'color:black;mso-color-alt:windowtext'><o:p></o:p></span></font><=
/p>

<p class=3DMsoNormal style=3D'margin-left:.5in'><font size=3D3 =
color=3Dblack
face=3D"Times New Roman"><span =
style=3D'font-size:12.0pt;color:black'>Cheers</span></font><font
color=3Dblack><span =
style=3D'color:black;mso-color-alt:windowtext'><o:p></o:p></span></font><=
/p>

<p class=3DMsoNormal style=3D'margin-left:.5in'><font size=3D3 =
color=3Dblack
face=3D"Times New Roman"><span =
style=3D'font-size:12.0pt;color:black'>&nbsp;</span></font><font
color=3Dblack><span =
style=3D'color:black;mso-color-alt:windowtext'><o:p></o:p></span></font><=
/p>

<p class=3DMsoNormal style=3D'margin-left:.5in'><font size=3D3 =
color=3Dblack
face=3D"Times New Roman"><span =
style=3D'font-size:12.0pt;color:black'>Guillaume
Laforge<br>
&nbsp;</span></font><font color=3Dblack><span =
style=3D'color:black;mso-color-alt:
windowtext'><o:p></o:p></span></font></p>

<p class=3DMsoNormal style=3D'margin-left:.5in'><font size=3D3 =
color=3Dblack
face=3D"Times New Roman"><span =
style=3D'font-size:12.0pt;color:black'>&nbsp;</span></font><font
color=3Dblack><span =
style=3D'color:black;mso-color-alt:windowtext'><o:p></o:p></span></font><=
/p>

<p class=3DMsoNormal style=3D'margin-left:.5in'><span =
class=3Dgmailquote><font
size=3D3 color=3Dblack face=3D"Times New Roman"><span =
style=3D'font-size:12.0pt;
color:black'>On 2/10/06, <b><span style=3D'font-weight:bold'>Mathieu =
Leclaire</span></b>
&lt;<a href=3D"mailto:mleclair(at)hybride.com">mleclair(at)hybride.com</a>&gt; =
wrote:</span></font></span><font
color=3Dblack><span style=3D'color:black'> </span></font><font =
color=3Dblack><span
style=3D'color:black;mso-color-alt:windowtext'><o:p></o:p></span></font><=
/p>

<div style=3D'border:none;border-left:solid #CCCCCC .75pt;padding:0in =
0in 0in 6.0pt'>

<p style=3D'margin-left:40.8pt;border:none;mso-border-left-alt:solid =
#CCCCCC .75pt;
padding:0in;mso-padding-alt:0in 0in 0in 6.0pt'><font size=3D2 =
color=3Dnavy
face=3DArial><span =
style=3D'font-size:10.0pt;font-family:Arial;color:navy'>Ok=85 so
how do I make my way to the input ports starting from a HairPrimitive? =
How do I
extract the HairGenOp from the HairPrimitive? I've been browsing through =
the
SDK but I can't figure out how to extract the Operators starting from a
Primitive=85 can anyone clear this up for me please? </span></font><font
color=3Dblack><span =
style=3D'color:black;mso-color-alt:windowtext'><o:p></o:p></span></font><=
/p>

<span id=3D"q_1095554bab1541e9_1">

<p style=3D'margin-left:40.8pt;border:none;mso-border-left-alt:solid =
#CCCCCC .75pt;
padding:0in;mso-padding-alt:0in 0in 0in 6.0pt'><font size=3D2 =
color=3Dnavy
face=3DArial><span =
style=3D'font-size:10.0pt;font-family:Arial;color:navy'>&nbsp;</span></fo=
nt><font
color=3Dblack><span =
style=3D'color:black;mso-color-alt:windowtext'><o:p></o:p></span></font><=
/p>

<p style=3D'margin-left:40.8pt;border:none;mso-border-left-alt:solid =
#CCCCCC .75pt;
padding:0in;mso-padding-alt:0in 0in 0in 6.0pt'><font size=3D2 =
color=3Dnavy
face=3DArial><span =
style=3D'font-size:10.0pt;font-family:Arial;color:navy'>&nbsp;</span></fo=
nt><font
color=3Dblack><span =
style=3D'color:black;mso-color-alt:windowtext'><o:p></o:p></span></font><=
/p>

</div>

<div style=3D'border:none;border-left:solid #CCCCCC .75pt;padding:0in =
0in 0in 6.0pt'>

<p style=3D'margin-left:76.8pt;border:none;mso-border-left-alt:solid =
#CCCCCC .75pt;
padding:0in;mso-padding-alt:0in 0in 0in 6.0pt'><font size=3D2 =
color=3Dblack
face=3DTahoma><span =
style=3D'font-size:10.0pt;font-family:Tahoma;color:black'>-----Original
Message-----<br>
<b><span style=3D'font-weight:bold'>From:</span></b> <a
href=3D"mailto:owner-xsi(at)Softimage.COM" target=3D"_blank"
onclick=3D"return =
top.js.OpenExtLink(window,event,this)">owner-xsi(at)Softimage.COM</a>
[mailto:<a href=3D"mailto:owner-xsi(at)Softimage.COM" target=3D"_blank"
onclick=3D"return top.js.OpenExtLink(window,event,this)"> =
owner-xsi(at)Softimage.COM</a>]<b><span
style=3D'font-weight:bold'>On Behalf Of </span></b>Aloys Baillet<br>
<b><span style=3D'font-weight:bold'>Sent:</span></b> Thursday, February =
09, 2006
11:08 PM<br>
<b><span style=3D'font-weight:bold'>To:</span></b> <a
href=3D"mailto:XSI(at)Softimage.COM" target=3D"_blank"
onclick=3D"return =
top.js.OpenExtLink(window,event,this)">XSI(at)Softimage.COM</a><br>
<b><span style=3D'font-weight:bold'>Subject:</span></b> Re: get cluster =
from
HairPrimitive </span></font><font color=3Dblack><span =
style=3D'color:black;
mso-color-alt:windowtext'><o:p></o:p></span></font></p>

<p style=3D'margin-left:76.8pt;border:none;mso-border-left-alt:solid =
#CCCCCC .75pt;
padding:0in;mso-padding-alt:0in 0in 0in 6.0pt'><font size=3D3 =
color=3Dblack
face=3D"Arial Unicode MS"><span =
style=3D'font-size:12.0pt;font-family:"Arial Unicode MS";
color:black'>&nbsp;</span></font><font color=3Dblack><span =
style=3D'color:black;
mso-color-alt:windowtext'><o:p></o:p></span></font></p>

<p =
style=3D'margin-bottom:12.0pt;margin-left:76.8pt;border:none;mso-border-l=
eft-alt:
solid #CCCCCC .75pt;padding:0in;mso-padding-alt:0in 0in 0in 6.0pt'><font
size=3D3 color=3Dblack face=3D"Arial Unicode MS"><span =
style=3D'font-size:12.0pt;
font-family:"Arial Unicode MS";color:black'>Hi,<br>
<br>
You can find it in the input ports of the HairGenOp... <br>
<br>
Cheers,<br>
<br>
Aloys</span></font><font color=3Dblack><span =
style=3D'color:black;mso-color-alt:
windowtext'><o:p></o:p></span></font></p>

<p style=3D'margin-left:76.8pt;border:none;mso-border-left-alt:solid =
#CCCCCC .75pt;
padding:0in;mso-padding-alt:0in 0in 0in 6.0pt'><font size=3D3 =
color=3Dblack
face=3D"Arial Unicode MS"><span =
style=3D'font-size:12.0pt;font-family:"Arial Unicode MS";
color:black'>On 2/10/06, <b><span style=3D'font-weight:bold'>Mathieu =
Leclaire</span></b>
&lt;<a href=3D"mailto:mleclair(at)hybride.com" target=3D"_blank"
onclick=3D"return top.js.OpenExtLink(window,event,this)"> =
mleclair(at)hybride.com</a>&gt;
wrote:</span></font><font color=3Dblack><span =
style=3D'color:black;mso-color-alt:
windowtext'><o:p></o:p></span></font></p>

</div>

<p style=3D'margin-left:81.6pt'><font size=3D3 color=3Dblack =
face=3D"Arial Unicode MS"><span
style=3D'font-size:12.0pt;font-family:"Arial Unicode =
MS";color:black'>Hi,<br>
<br>
I have a quick question: I have hair applied to the cluster of an =
object. In <br>
c++, how can I retrieve the cluster associated with the =
HairPrimitive?<br>
<br>
<br>
Mathieu Leclaire <br>
R&amp;D Programmer<br>
Hybride<br>
<br>
<br>
<br>
---<br>
Unsubscribe? Mail <a href=3D"mailto:Majordomo(at)Softimage.COM" =
target=3D"_blank"
onclick=3D"return =
top.js.OpenExtLink(window,event,this)">Majordomo(at)Softimage.COM </a>with
the following text in body: <br>
unsubscribe xsi</span></font><font color=3Dblack><span =
style=3D'color:black;
mso-color-alt:windowtext'><o:p></o:p></span></font></p>

<div style=3D'border:none;border-left:solid #CCCCCC .75pt;padding:0in =
0in 0in 6.0pt'>

<p style=3D'margin-left:76.8pt;border:none;mso-border-left-alt:solid =
#CCCCCC .75pt;
padding:0in;mso-padding-alt:0in 0in 0in 6.0pt'><font size=3D3 =
color=3Dblack
face=3D"Arial Unicode MS"><span =
style=3D'font-size:12.0pt;font-family:"Arial Unicode MS";
color:black'><br>
<br clear=3Dall>
<br>
-- <br>
Aloys Baillet - XSI Technical Director<br>
Character Dpt - Animal Logic <br>
-- </span></font><font color=3Dblack><span =
style=3D'color:black;mso-color-alt:windowtext'><o:p></o:p></span></font><=
/p>

</div>

</span>

<p class=3DMsoNormal style=3D'margin-left:.5in'><font size=3D3 =
color=3Dblack
face=3D"Times New Roman"><span =
style=3D'font-size:12.0pt;color:black'><![if =
!supportEmptyParas]>&nbsp;<![endif]></span></font><font
color=3Dblack><span =
style=3D'color:black;mso-color-alt:windowtext'><o:p></o:p></span></font><=
/p>

</div>

</body>

</html>

------=_NextPart_000_0006_01C62EB5.5A054190--



---
Unsubscribe? Mail Majordomo(at)Softimage.COM with the following text in body:
unsubscribe xsi


Search the XSI List archives here or use the advanced search form to search across mailing lists. Searching help is available.
This site supposedly brought to you by Benjamin Grosser and the Imaging Technology Group.