Closed GoogleCodeExporter closed 9 years ago
btw, i realize that
strArryAttr.get()[1]
is just python at work, and not anything special pymel is doing.
nevertheless, it would be great to know how to use .set() to set a specific
index of a stringArray attr.
(i also realize that i could set the value of the array outside the attr, and
set the whole thing again.. but again, i wonder if i can change an individual
index in place?)
Original comment by mark_the...@yahoo.com
on 15 Mar 2011 at 1:45
Unfortunately, maya provides no way to set just a single value in a *Array type
attribute; if this is needed or desired, you should use an array (aka, multi)
attribute of the desired type.
While it would be possible to provide a pymel wrapper which would make it seem
like you're setting only a single item, under the hood it would have to set the
whole array; and if this is the case, I'd rather not hide the fact.
Original comment by elron...@gmail.com
on 30 Mar 2011 at 7:17
thanks elron..
i thought as much, and i totally understand the premise of pymenl not to hide
all the short-commings.. only the really big ones right?
this was an issue for me back in maya 1.5 beta! i went round and round with
alias wavefront about the confusion and subtle difference between Array And
multi, and i asked them to just make them one and the same.. a more
generalized, useful and understandable data model. but all i got back
was....crickets....
so i have worked around it.. but i still cringe that people, to this day, call
multi attrs "arrays".. when they are not array attrs at all.. they dont behave
the same way and they dont do the same thing in every case, and they are
documented separately.
i would love it if pymel would make this distinction more clearer in its own
documentation... several times, even in your last post, you called a multiAttr
and array.. and its not.
thanks
Original comment by mark_the...@yahoo.com
on 31 Mar 2011 at 3:11
Original issue reported on code.google.com by
mark_the...@yahoo.com
on 14 Mar 2011 at 9:02