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-22       - By Guillaume Laforge

 Back
Reply:     1     2     3     4     5     6     7  

eheh ! Mine is longer than yours ;-)

Seriously, where do you find "CCACF571-B1B8-11d3-9E9B-009027BC38DD" ???
And it run really faster !

Cheers.


Guillaume Laforge
CG artist
www.vol2nuit.fr



-- -- Original Message -- --
From: "Bernard Lebel" <softimage@(protected)>
To: <XSI@(protected)>
Sent: Tuesday, February 22, 2005 12:37 AM
Subject: Re: select by wire color


> My god! That's a bunch of lines there Guillaume! ;-)
>
>
> // Create empty collection to store display properties
> var oColl = XSIFactory.CreateObject( "XSI.Collection" );
>
> // Find and enumerate display properties
> // ATTENTION TO EMAIL FORMATTING:
> // The following, up to and including .moveNext() ), is one line!
> for( var oPropsEnum = new Enumerator( findobjects( null,
> "{CCACF571-B1B8-11d3-9E9B-009027BC38DD}" ) ); !oPropsEnum.atEnd();
> oPropsEnum.moveNext() )
> {
> // Test wire color index value, -->> put your own value here!
> if( oPropsEnum.item().parameters( "wirecol" ).value == 3 )
> {
> oColl.add( oPropsEnum.item().parent );
> }
> }
>
> // Select objects
> selectobj( oColl );
>
>
>
> Guillaume Laforge wrote:
>> 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");
>> }
>> }
>>
>
> ---
> Unsubscribe? Mail Majordomo@(protected) with the following text in body:
> unsubscribe xsi
>



---
Unsubscribe? Mail Majordomo@(protected) with the following text in body:
unsubscribe xsi