[Maya-Python] Re: Remove reference edits via Python?

2014-10-30 Thread Luke Harris
I was doing this recently with pymel. Maya says that you can now remove ref edits while the reference is loaded, but I've noticed this isn't always the case, so I still unload it first for safety for ref in pm.listReferences(): ref.unload() for edit in ref.getReferenceEdits(): #

Re: [Maya-Python] mayapy crash on exit when using pymel

2014-10-30 Thread f.michal
W dniu 2014-10-30 18:08, Paul Molodowitch pisze: Just to clarify - this crash isn't caused by pymel - it's caused by the loading of certain "standard" maya plugins (sceneAssembly and xgen being two that I know of). The reason why it happens when you import pymel, as opposed to just maya.standa

Re: [Maya-Python] mayapy crash on exit when using pymel

2014-10-30 Thread Paul Molodowitch
Just to clarify - this crash isn't caused by pymel - it's caused by the loading of certain "standard" maya plugins (sceneAssembly and xgen being two that I know of). The reason why it happens when you import pymel, as opposed to just maya.standalone.initialize(), is that pymel mimics "standard" ma

Re: [Maya-Python] Modify layer override values (without render layer change)

2014-10-30 Thread Jacob Gonzalez
by the looks of it, you are right. so basically, what I'd like to achieve can't be done! Thans On Thursday, 30 October 2014 11:11:03 UTC, Fredrik Averpil wrote: > > I may be wrong here but as far as I know you need the renderlayer you wish > to modify to be the currently active renderlayer. >

[Maya-Python] Re: Remove reference edits via Python?

2014-10-30 Thread Fredrik Averpil
And if it makes it easier to somehow solve this ... I'm looking to remove *all* reference edits. ​ > -- 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

[Maya-Python] Remove reference edits via Python?

2014-10-30 Thread Fredrik Averpil
Hi, I’m having problems performing this via Python. If using the UI, you would right click the reference and choose to list the reference edits. Then you can select each edit and hit “Remove reference edit”. I’ve successfully been able to list reference edits in various ways with: cmds.reference

Re: [Maya-Python] Modify layer override values (without render layer change)

2014-10-30 Thread Fredrik Averpil
I may be wrong here but as far as I know you need the renderlayer you wish to modify to be the currently active renderlayer. Regards, Fredrik -- You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group. To unsubscribe from this group

Re: [Maya-Python] Modify layer override values (without render layer change)

2014-10-30 Thread Jacob Gonzalez
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

[Maya-Python] Adding custom attributes - attribute editor problems

2014-10-30 Thread Michał Frątczak
I'm adding custom attributes to light nodes and having problems with attribute editor. Currently I use: scriptJob -permanent -e DagObjectCreated "AddExtraLightAttrs"; If AttributeEditor is already open when I create new light, new attrs are added _after_ AE refresh - this results in total me

Re: [Maya-Python] mayapy crash on exit when using pymel

2014-10-30 Thread Michał Frątczak
That works. Thanks ! On Wednesday, October 29, 2014 10:17:49 PM UTC+1, colas wrote: > > hi, > you can use at the end of your script > > cmds.file(new=True, force=True) > os._exit(0) > > greets, > Colas > > > 2014-10-29 11:21 GMT-04:00 Michał Frątczak >: > >> Hello >> mayapy crashes when exiting.

Re: [Maya-Python] Modify layer override values (without render layer change)

2014-10-30 Thread Fredrik Averpil
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) #