[Maya-Python] unlocking referenced nodes

948 views
Skip to first unread message

ynedelin

unread,
May 17, 2010, 1:53:30 PM5/17/10
to python_inside_maya
hey all

does anyone know of a way to unlock a referenced node?

in particular an animcurve node?

yury

--
http://groups.google.com/group/python_inside_maya

Brandon Harris

unread,
May 17, 2010, 2:13:30 PM5/17/10
to python_inside_maya
isn't it like

import maya.cmds as cmds

cmds.lockNode(nodeName, lock=False)

Brandon L. Harris
--
http://groups.google.com/group/python_inside_maya

Judah Baron

unread,
May 17, 2010, 3:06:00 PM5/17/10
to python_in...@googlegroups.com
You can't just unlock a node that was locked in a referenced file. Depending on what you want to do, there may be other ways of accessing the node. Can you describe your use case a little?

-Judah
--
http://groups.google.com/group/python_inside_maya

Mark Jackson

unread,
May 17, 2010, 3:35:21 PM5/17/10
to python_inside_maya
animCurves are locked during referencing full stop, I don't think
there's any way to unlock or edit them afterwards. It's a pain as one
of the things I often found is that you may want to reference in a
sequence, but shift the curve times round to suit. As far as I know
there's no way to over-ride this.
--
http://groups.google.com/group/python_inside_maya

Mark Jackson

unread,
May 17, 2010, 3:51:10 PM5/17/10
to python_inside_maya
Actually there is a mel global that can over ride the default locking
on a node type/attr basis. I've never run it but remember reading
about it when we first looked into a referenced pipeline.

getLockReferenceExcludedNodeTypes()
getLockReferenceExcludeAttributes()

theres a chunk in the manuals that go over it. Not sure if that's what
you're after or not

Mark

yury nedelin

unread,
May 17, 2010, 5:39:50 PM5/17/10
to python_in...@googlegroups.com
thanks a lot for the tip

I will look into these scripts.

yury
--
http://groups.google.com/group/python_inside_maya

yury nedelin

unread,
May 17, 2010, 6:02:27 PM5/17/10
to python_in...@googlegroups.com
I wanted to shift the time of the animcurve and I acctualy found a way to do it , not too pretty  but it works ,

I connect the time1 node to the referenced animcurve input attribute and add addDoubleLinear between the time1 plug and the animcurve and use it as the time-offset.

yury

Ofer Koren

unread,
May 17, 2010, 6:09:19 PM5/17/10
to python_in...@googlegroups.com
Animation Layers might be useful here as well.

- Ofer
www.mrbroken.com

--
http://groups.google.com/group/python_inside_maya

yury nedelin

unread,
May 17, 2010, 6:27:20 PM5/17/10
to python_in...@googlegroups.com
yes that's exactly what I am doing this for, animation layers.

yury
--
http://groups.google.com/group/python_inside_maya
Reply all
Reply to author
Forward
0 new messages