code-google-com / pymel

Automatically exported from code.google.com/p/pymel
0 stars 0 forks source link

setKeyable on compound attrs should propagate to child attrs #139

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
well, it'd be nice if it did anyway.  so something like:

PyNode( 'persp' ).translate.setKeyable( False )

would set keyable flag on tx, ty and tz to False.

Original issue reported on code.google.com by macaroni...@gmail.com on 1 Jan 2010 at 1:46

GoogleCodeExporter commented 9 years ago
where does the setKeyable code even exist?

Original comment by macaroni...@gmail.com on 1 Jan 2010 at 1:58

GoogleCodeExporter commented 9 years ago
setKeyable is (I believe) auto-wrapped from MFnAttribute.setKeyable... the
auto-wrapping magic happens MetaMayaTypeWrapper, which is the metaclass for the 
pymel
Attribute type.

If you're looking to modify the behavior of Attribute.setKeyable, you can just 
add a
new method directly to the Attribute class, and have that wrap the appropriate 
mel
cmd (setAttr in this case, I think).  If there's a hand-defined method, it will
override any similarly named auto-wrapped command.

Original comment by elron...@gmail.com on 1 Jan 2010 at 4:14

GoogleCodeExporter commented 9 years ago
...incidentally, there's a number of cases for which it would be nice to have
propogation-type behavior for attributes... and not just for compound elements, 
but
array attributes as well.  Unfortunately, this behavior isn't built into the 
commands
we wrap, and it's something we haven't gotten around yet to adding ourselves.

Original comment by elron...@gmail.com on 1 Jan 2010 at 4:21

GoogleCodeExporter commented 9 years ago
sweet!  thanks, I'll see if I can figure something out.

incidentally, who do you get an account here?

I guess I should probably learn how all the unit tests work and whatnot first - 
any 
data on that?  I'm a bit of a unit test n00b...  and should absolutely not be.

Original comment by macaroni...@gmail.com on 1 Jan 2010 at 5:31

GoogleCodeExporter commented 9 years ago
since this is not currently supported by setAttr -keyable, this is being marked 
as an 
"enhancement", i.e. feature request.  it most likely won't make it into 1.0.0, 
but can be 
included in a future release. 

Original comment by chad...@gmail.com on 4 Jan 2010 at 10:56

GoogleCodeExporter commented 9 years ago

Original comment by chad...@gmail.com on 10 Mar 2010 at 4:58