Is there any way to request all non-default attributes for an object that could potentially be of any type
using Python API?
familiar with listDefault in cmds.attributeQuery, but how to do the same operation in Api? search it in documentation, but found nothing simular yet
A little late perhaps, API questions typically get more attention at https://groups.google.com/g/python_inside_maya but to expand on your question, what is a default attribute?
- If you mean attributes present on nodes at the time of creation, as opposed to those added dynamically afterwards, then you can query whether they are “dynamic” or not with
- If you mean attributes on the baseclass of your custom plug-in, as opposed to those added by you, then I think you’re out of luck. Luckily though, the attributes rarely change so you could quite reasonably make your own listing per node type of interest and treat those as the-one-true-source
Greetings for your reply, I will look into this group, huge thanks!
I meant that maybe there is some function, which can return for me all attributes in node,
which have non-default values (values, which been changed from the moment of creation).
Currently, I think that there is no function (I have not found such, after several days of searching of documentation), but I founded several workarounds with MPlugs and isDefaultValue() or getSetAttrCmds(), with last you can even query with valueSelector using kNonDefault
Aha, yes that shouldn’t be a problem, using the methods you found. I wouldn’t call it a workaround, that looks like a proper solution to me.