Thanks for the replies
changing render layers it's exactly what I am trying to avoid as it would
significantly slow down the tool I am working on.
I can query the layer overrides from a different layer. For example:
Curr Layer is A:
print cmds.getAttr("B.adjustments[1].value") / / return 1
But I cannot change the value of B.adjustments[1] unless I have layer B as
the active layer
Thanks
J
On Thursday, 30 October 2014 07:31:45 UTC, Fredrik Averpil wrote:
>
> I usually do it like this (sort of):
>
> current_layer = cmds.editRenderLayerGlobals( query=True,
> currentRenderLayer=True ) # Register the currently active render layer
> cmds.editRenderLayerGlobals(currentRenderLayer='renderLayerA') # step to
> renderLayerA
> cmds.setAttr('vraySettings.primaryEngine', 0) # Set some value
> cmds.editRenderLayerAdjustment('vraySettings.primaryEngine') # Create the
> override
> ...
> ...
> ...
> cmds.editRenderLayerGlobals(currentRenderLayer=current_layer) # Step back to
> the renderlayer you had active before running the script
>
>
>
> On Wed, Oct 29, 2014 at 10:52 PM, Justin Israel <[email protected]
> <javascript:>> wrote:
>
>> Sorry no one has replied to this. I will take a stab. Do you mean how to
>> change RenderLayer Member Overrides, programmatically?
>>
>> Like this?
>>
>> cmds.setAttr("layer1.attributeOverrideScript", "primaryVisibility=",
>> type="string")
>>
>> cmds.setAttr("layer1.attributeOverrideScript", "primaryVisibility=0",
>> type="string")
>>
>> cmds.setAttr("layer1.attributeOverrideScript", "primaryVisibility=1",
>> type="string")
>>
>>
>>
>> On Tue, Oct 28, 2014 at 10:41 PM, <[email protected] <javascript:>>
>> wrote:
>>
>>> Hi all
>>>
>>> Does anyone know any scripting to change a layer override attribute
>>> value without actually having that render Layer active?
>>>
>>> So active Render Layer is A and I am going to set an objects primary ray
>>> off/on for Render Layer B.
>>>
>>> Thanks
>>>
>>> Jacob
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Python Programming for Autodesk Maya" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to [email protected]
>>> <javascript:>.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/python_inside_maya/44926a6c-88b8-4b0a-a7b0-630281b1d91b%40googlegroups.com
>>> .
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Python Programming for Autodesk Maya" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to [email protected] <javascript:>.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/python_inside_maya/CAPGFgA0zfs42JLKV2NwXFPUvgdfK_J8%3D31YjhFgabzyJcYNieg%40mail.gmail.com
>>
>> <https://groups.google.com/d/msgid/python_inside_maya/CAPGFgA0zfs42JLKV2NwXFPUvgdfK_J8%3D31YjhFgabzyJcYNieg%40mail.gmail.com?utm_medium=email&utm_source=footer>
>> .
>>
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
--
You received this message because you are subscribed to the Google Groups
"Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/python_inside_maya/9a289f0c-728f-43d7-a7eb-498674364bec%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.