Mailing List
Home
Forum Home
Softimage
Carrara
trueSpace
Dir3d-l
Maya - a powerful 3D animation and visual effects software
Macromedia Flash Development
Subjects
Cameras
scaleDown command
black out solved
Aircraft Tutorial
Mathematical XYZ ?
Its done This vs That
Its done first week
recommendations for screen video captures?
3DExplorer "Oddity "
New Director
ProTeam renewals
Fuel 's new websites (X post)
Blue peter create a make toy
targeting groups question
XPost: Shockwave 3D game ( sort of )
RES: RES: RES: Fish Modeling
Emitting particles from object intersection
Fuel 's new websites (X post)
Texturing
Big Break Contest Videos
New Plugins
Models and Texture on my updated site
Error Installing Patch tS6 6
Plasma?
Looking for Inspiration
Weird EMail Q
It 's done first week ?
Cherry not cranberry
New game
Camera Animation Problem
Particle plugins?
 
select by wire color

select by wire color

2005-02-21       - By Guillaume Laforge

 Back
Reply:     1     2     3     4     5     6     7  

Hi,

I'm currently learning scripting and I find your pb interesting :-)
My script is far to be finished ( no check to know if the collections are empty
, no interface to enter your color number etc...) but it works :-)
Just change the number by yours in var oWireColor = 50

//-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- -----
//Sel_by_wire_color.js
//Learning scripting
//Guillaume Laforge Feb. 2005

//This script select all the polymeshes with a given wire color index.

//Change the color here :
var oWireColor = 50

//Create empty collection to store polymeshes
var oPoly = new ActiveXObject( "XSI.Collection" );

//Create empty collection to store the good color polymeshes
var oGoodColorPoly = new ActiveXObject( "XSI.Collection" );

//add polymeshes to the collection
oPoly.additems( ActiveSceneRoot.FindChildren ("" , siPolyMeshType ));;

// Iterate collected polymeshes
var eCollItems = new Enumerator( oPoly );
eCollItems.moveFirst();
for (; !eCollItems.atEnd(); eCollItems.moveNext() )
{
var oItem = eCollItems.item();
oColor = GetValue(oItem+".display.wirecol");
if (oColor == oWireColor ){
logmessage ("Find the wire color objects");
oGoodColorPoly.additems ( oItem );
SelectObj ( oGoodColorPoly );
} else {
logmessage ( "finished");
}
}

//-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ----
-- ---- ---- ---- ---- ---- ------

Tell me if you've got a pb.


Cheers,

Guillaume Laforge
CG artist
www.vol2nuit.fr




-- -- Original Message -- --
From: "Victor Luckysov" <vic@(protected)>
To: <XSI@(protected)>
Sent: Monday, February 21, 2005 2:21 PM
Subject: select by wire color


> Hello XSI users,
>
> How can i selects some objects by wire color ?
>
>
>
> /vic/
> senior animator
> dr.Picture Studios www.drpicture.com
> personal web: www.vic3d.com
>
>
> ---
> Unsubscribe? Mail Majordomo@(protected) with the following text in body:
> unsubscribe xsi
>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859 (See http://iso-8859.ora-code.com)-1">
<META content="MSHTML 6.00.2900.2604" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY>
<DIV><FONT face=Arial size=2>Hi,</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>I'm currently learning scripting and I find your
pb
interesting :-)</FONT></DIV>
<DIV><FONT face=Arial size=2>My script is far to be finished ( no check to know
if the collections are empty, no interface to enter your color number etc...)
but it works :-)</FONT></DIV>
<DIV><FONT face=Arial size=2>Just change the number&nbsp;by yours in var
oWireColor = 50</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial
size=2>//-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- --
---</FONT></DIV>
<DIV>
<P><FONT face=Arial size=2>//Sel_by_wire_color.js<BR>//Learning scripting
<BR>//Guillaume Laforge Feb. 2005</FONT></P>
<P><FONT face=Arial size=2>//This script select all the polymeshes with a given
wire color index.</FONT></P>
<P><FONT face=Arial size=2>//Change the color here :<BR>var oWireColor =
50</FONT></P>
<P><FONT face=Arial size=2>//Create empty collection to store polymeshes<BR>var
oPoly = new ActiveXObject( "XSI.Collection" );</FONT></P>
<P><FONT face=Arial size=2>//Create empty collection to store the good color
polymeshes <BR>var oGoodColorPoly = new ActiveXObject( "XSI.Collection"
);</FONT></P>
<P><FONT face=Arial size=2>//add polymeshes to the collection<BR>oPoly.additems
(
ActiveSceneRoot.FindChildren ("" , siPolyMeshType ));;</FONT></P>
<P><FONT face=Arial size=2>// Iterate collected polymeshes<BR>var eCollItems =
new Enumerator( oPoly ); <BR>eCollItems.moveFirst();<BR>for (;
!eCollItems.atEnd(); eCollItems.moveNext() ) <BR>{<BR>var oItem =
eCollItems.item();<BR>oColor = GetValue(oItem+".display.wirecol");<BR>if
(oColor
== oWireColor ){<BR>logmessage ("Find the wire color
objects");<BR>oGoodColorPoly.additems ( oItem );<BR>SelectObj ( oGoodColorPoly
);<BR>} else {<BR>logmessage ( "finished");<BR>}<BR>}</FONT></P>
<P><FONT face=Arial
size=2>//-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- --
-- ---- ---- ---- ---- ---- ---- ---- ---</FONT></P>
<P><FONT face=Arial size=2>Tell me if you've got a pb.<BR></FONT></P>
<P><FONT face=Arial size=2>Cheers,</FONT></P>
<P><FONT face=Arial size=2>Guillaume Laforge<BR>CG artist<BR></FONT><A
href="http://www.vol2nuit.fr"><FONT face=Arial
size=2>www.vol2nuit.fr</FONT></A></P>
<P>&nbsp;</P></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>-- -- Original Message -- -- </FONT>
<DIV><FONT face=Arial size=2>From: "Victor Luckysov" &lt;</FONT><A
href="mailto:vic@(protected)"><FONT face=Arial
size=2>vic@(protected)</FONT></A><FONT face=Arial size=2>&gt;</FONT></DIV>
<DIV><FONT face=Arial size=2>To: &lt;</FONT><A
href="mailto:XSI@(protected)"><FONT face=Arial
size=2>XSI@(protected)</FONT></A><FONT face=Arial size=2>&gt;</FONT></DIV>
<DIV><FONT face=Arial size=2>Sent: Monday, February 21, 2005 2:21
PM</FONT></DIV>
<DIV><FONT face=Arial size=2>Subject: select by wire color</FONT></DIV></DIV>
<DIV><FONT face=Arial><BR><FONT size=2></FONT></FONT></DIV><FONT face=Arial
size=2>&gt; Hello XSI users,<BR>&gt; <BR>&gt; How can i selects some objects by
wire color ?<BR>&gt; <BR>&gt; <BR>&gt; <BR>&gt; /vic/<BR>&gt; senior
animator<BR>&gt; dr.Picture Studios </FONT><A
href="http://www.drpicture.com"><FONT face=Arial
size=2>www.drpicture.com</FONT></A><BR><FONT face=Arial size=2>&gt; personal
web: </FONT><A href="http://www.vic3d.com"><FONT face=Arial
size=2>www.vic3d.com</FONT></A><BR><FONT face=Arial size=2>&gt; <BR>&gt;
<BR>&gt; ---<BR>&gt; Unsubscribe? Mail </FONT><A
href="mailto:Majordomo@(protected)"><FONT face=Arial
size=2>Majordomo@(protected)</FONT></A><FONT face=Arial size=2> with the
following text in body:<BR>&gt; unsubscribe xsi<BR>&gt;</FONT></BODY></HTML>