render layers from "reference files" are hidden

450 views
Skip to first unread message

stephenkmann

unread,
Sep 9, 2009, 10:58:55 AM9/9/09
to maya...@googlegroups.com
Does anyone know how to tell if a layer is "hidden" or not?
 I'm looking but I havn't found the attribute

 ie:

 reference a scene file ( doesn't actually need extra renderLayers)
 
and run this

 ls -type "renderLayer"


what you should find, is that you have render Layers that are not Shown in the renderLayer editor

 I would love to delete them!
as well as find the attr that tells them to show up or not show up

 thanks

 -=s

Stefan Andersson

unread,
Sep 9, 2009, 11:10:53 AM9/9/09
to maya...@googlegroups.com
In python
# ---------------------------------------------------------------------------------------------
# begin python script
import maya.cmds as cmds

# list the renderlayers in your scene

renderLayers = cmds.ls (type='renderLayer')

layersOff = []
for rl in renderLayers:
renderable = cmds.getAttr(rl+'.renderable')
if renderable == 0:
layersOff.append(rl)
# print all layers that are turned off
for layer in layersOff:
print layer

#comment below out to delete the layer
#for layer in layersOff:
# cmds.delete(layer)

# end of python script
# ---------------------------------------------------------------------------------------------
I haven't tested it with a reference file, but I think that would
work. Give it a test
I hope it will work for you

regards
stefan

--
[ protector of penguins - abuser of pixels ]

stephenkmann

unread,
Sep 9, 2009, 11:30:09 AM9/9/09
to maya...@googlegroups.com
naw, that will only give you if its renderable or not

 what I'm looking for at the renderLayers that don't even show up in your renderLayer Editor.

 

Stefan Andersson

unread,
Sep 9, 2009, 12:11:32 PM9/9/09
to maya...@googlegroups.com
aha, didn't even know that they could be hidden.

-stefan

--

Steve Davy

unread,
Sep 9, 2009, 1:26:51 PM9/9/09
to maya...@googlegroups.com

<3756790b0909090830p3c...@mail.gmail.com>
Content-Type: text/plain; charset="Windows-1252"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0


Steve I have found that hidden layers that don't show in the layer editors =
usually are visible in the relationship editor and can be deleted from ther=
e

________________________________
> Date: Wed=2C 9 Sep 2009 11:30:09 -0400
> Subject: [maya_he3d] Re: render layers from "reference files" are hidden
> From: stephe...@gmail.com
> To: maya...@googlegroups.com
>
> naw=2C that will only give you if its renderable or not
>
> what I'm looking for at the renderLayers that don't even show up in your =
renderLayer Editor.
>
>
=0A=
_________________________________________________________________=0A=
Microsoft brings you a new way to search the web. Try Bing=99 now=0A=
http://www.bing.com?form=3DMFEHPG&publ=3DWLHMTAG&crea=3DTEXT_MFEHPG_Core_ta=
gline_try bing_1x1=

stephenkmann

unread,
Sep 9, 2009, 2:29:51 PM9/9/09
to maya...@googlegroups.com
I'm looking to get at them with MEL
 
 


Steve Davy

unread,
Sep 9, 2009, 4:59:55 PM9/9/09
to maya...@googlegroups.com

<3756790b0909091129s262...@mail.gmail.com>
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0


seems pretty unlikely you'd be able to query that with MEL? Since it's a bu=
g and the hidden layers are of indeterminate status?

________________________________
> Date: Wed=2C 9 Sep 2009 14:29:51 -0400


> Subject: [maya_he3d] Re: render layers from "reference files" are hidden
> From: stephe...@gmail.com
> To: maya...@googlegroups.com
>

> I'm looking to get at them with MEL
>
>
>
>

=0A=
_________________________________________________________________=0A=
Insert movie times and more without leaving Hotmail=AE.=0A=
http://windowslive.com/Tutorial/Hotmail/QuickAdd?ocid=3DTXT_TAGLM_WL_HM_Tut=
orial_QuickAdd_062009=

dwarren

unread,
Sep 9, 2009, 11:49:40 PM9/9/09
to maya_he3d
There will be a bunch of renderLayerManager nodes in the file, due to
the references, 'ls -type renderLayerManager' should list them.

From there you can find out what render layers aren't connected to
your 'default' renderLayerManager node (the one called simply
'renderLayerManager') -- if they're not connected to that default
node, they won't show up in the render layer editor main UI, AFAIK.

They'll still be referenced, though, so short of importing the
references first I'm not sure how you're going to delete them...

However, it's quite possible that I'm misinterpreting what you're
trying to do.

stephe...@gmail.com

unread,
Sep 11, 2009, 8:19:46 AM9/11/09
to maya...@googlegroups.com
Ill give that a look. That should give me what I want. There are a number of issues I'm dealing with but first I need to identify the layers. While they were still reffed I could just do a ref check. But there is a point I import those refs and that's where things got dicy.
Thanks for the tip!

-=s
Sent from my Verizon Wireless BlackBerry

-----Original Message-----
From: dwarren <deana...@gmail.com>

Date: Wed, 9 Sep 2009 20:49:40
To: maya_he3d<maya...@googlegroups.com>
Subject: [maya_he3d] Re: render layers from "reference files" are hidden



Reply all
Reply to author
Forward
0 new messages