related to Maya Array Attribute, having compound child.

344 views
Skip to first unread message

Hyun Seung Kim

unread,
Oct 29, 2014, 7:20:27 PM10/29/14
to python_in...@googlegroups.com
In fact, I have a question to ask.

Question: related to dynamic size on array attribute
Currently, I use array attribute containing compound attributes within
( target Matrices ( array ) - target 1st ( compound child  as matrix type) and target weight 1st ( compound child as float type ) )
When the plugin loaded and try to access the attribute but the size of array has not been increased.
Since maya array attribute is sparse, I thought, it should be expanded with elementByPhysicalIndex.
But Array does not seem to be increased.

Anyone might have an idea there is a way Maya API to handle array compound attributes?

Thanks in advance on any feedbacks!!


Eduardo Grana

unread,
Oct 31, 2014, 7:03:26 AM10/31/14
to python_in...@googlegroups.com
Hello Hyun,
I may be misunderstanding the question, but I'll give it a try if you don't mind ;)
As far as I know, when you have attributes and they have the default value,
maya doesn't save them anywhere, and when you ask for them, the default value is returned
( and sometimes only the values that are different from the default are returned, and you have to fill the array yourself )
Could this be what's happening?
Cheers!
Eduardo

--
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 python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/7fdba434-2182-44b4-92aa-0f9dfd9821ce%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--

Hyun Seung Kim

unread,
Nov 27, 2014, 5:34:23 PM11/27/14
to python_in...@googlegroups.com
Hello, Eduardo, sorry for not clear on question. Basically, what I am having as an issue is 
when plugin attributes created initially, array attributes can be expanded by arrayBuilder
especially on output Attribute. In my case, I want to set the size of input array attribute on plugin
dynamically but somehow, the method seems to be only working for dealing with output attribute.

later, I find it out as alternative methods that I used mel command ( getAttr ) to access on input array attribute
on maya plugin command, which seems to be the only way I can increase the array attribute size dynamically.

If you are interested in, I will follow up with actual source code and it might be much easier to read what I am trying to do..^^

thanks for response..!!



On Friday, October 31, 2014 4:03:26 AM UTC-7, Eduardo Grana wrote:
Hello Hyun,
I may be misunderstanding the question, but I'll give it a try if you don't mind ;)
As far as I know, when you have attributes and they have the default value,
maya doesn't save them anywhere, and when you ask for them, the default value is returned
( and sometimes only the values that are different from the default are returned, and you have to fill the array yourself )
Could this be what's happening?
Cheers!
Eduardo
On Wed, Oct 29, 2014 at 8:20 PM, Hyun Seung Kim <art...@gmail.com> wrote:
In fact, I have a question to ask.

Question: related to dynamic size on array attribute
Currently, I use array attribute containing compound attributes within
( target Matrices ( array ) - target 1st ( compound child  as matrix type) and target weight 1st ( compound child as float type ) )
When the plugin loaded and try to access the attribute but the size of array has not been increased.
Since maya array attribute is sparse, I thought, it should be expanded with elementByPhysicalIndex.
But Array does not seem to be increased.

Anyone might have an idea there is a way Maya API to handle array compound attributes?

Thanks in advance on any feedbacks!!


--
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 python_inside_maya+unsub...@googlegroups.com.



--
Reply all
Reply to author
Forward
0 new messages