View Full Version : list selected geometry
chayanvinayak 05-31-2008, 09:24 PM Hi ,
How can I list All selected geometries.
eg: ls -g
ls -sl
but ls command does not accept "-g" and "-sl" arguments together.
X -> `ls -sl -g`;
please suggest
cvg
|
|
GiantG
05-31-2008, 11:12 PM
Hi..
Keep in mind, when you select an object in the viewport you select the Transform and not the Mesh.
1.)
filterExpand -ex true -sm 12;
2.)
{
string $AllTranforms[] = `ls -sl`;
select `listRelatives -c`;
string $AllMeshes[] = `ls -sl -et "mesh"`;
print $AllMeshes;
}
Aikiman
05-31-2008, 11:13 PM
nvm, I just confuse you
chayanvinayak
06-01-2008, 05:51 PM
thanks GiantG .
What keyword I can put instead of "mesh" to list all selected lights.
(where I can find the help library to see all "-et" arguments as Maya does not provide this).
Thanks
butCherHeLL
06-01-2008, 06:28 PM
"lattice"
"nurbsSurface"
"nurbsCurve"
"stitchSrf"
"closeSurface"
"reverseSurface"
"smoothCurve"
"rebuildCurve"
"reverseCurve"
"trim"
"untrim"
"transformGeometry"
"mesh"
"detachSurface"
"groupParts"
"makeGroup"
"deleteComponent"
"subdiv"
"lattice"
"nurbsSurface"
"nurbsCurve"
"mesh"
"subdiv"
"particle"
"stitchSrf"
"makeGroup"
"insertKnotSurface"
"detachSurface"
"joint"
"light"
"transform"
"time"
"partition"
.
.
.
chayanvinayak
06-01-2008, 06:32 PM
is there any keyword for selecting Lights.
:( (i could not find in ur list)
butCherHeLL
06-01-2008, 06:36 PM
updated some more.
recheck list plz :wavey:
you can do with
ls -type "light"
or if you want more specify that should be like this
ls -type "ambientLight"
for more information please run the code above to see more options
butCherHeLL
06-01-2008, 06:52 PM
this script will print all nodeTypes in your scene uniquely;
string $arr[]=`ls`;
$sz=size($arr);
string $newList[];
for ($nod in $arr)
{
$nd=`nodeType $nod`;
$sz=`size $newList`;
$newList[$sz]=$nd;
}
string $newList[]=stringArrayRemoveDuplicates($newList);
for ($nod in $newList)print ($nod+"\n");
chayanvinayak
06-01-2008, 09:18 PM
thanks kursat turkay
sorry for not checking list properly :(.
I think I am not properly communicating. :)
I want to 'list' all the "selected lights".
( not selected geometries )
( not all the lights in he scene )
code does not work :
ls -sl -et "light";
ls -sl -type "light";
thanks
cvg
Aikiman
06-01-2008, 11:11 PM
ls -sl;
or if you have other things selected also such as geometry then
ls -type "light";
ashishdantu
06-02-2008, 02:07 AM
to list the 'selected' lights from the scene,
ls -sl -dag -type "light"
when we select the objects in the scene, the transform nodes are selected and so using the -dag flag will "list all Dag objects below the specified object" ......
but the -type "light" flag will return only "light" nodes under the specified object (in case you have other shape nodes parented under the selected transform nodes)..
butCherHeLL
06-02-2008, 03:33 PM
another option
select `ls -type "light"`
CGTalk Moderation
06-02-2008, 03:33 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
vBulletin v3.0.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.