

Just that the first is syntaxically the easiest to write and has less visible operations. I think this makes it hard to udnerstand becase the *llist is actually comming as if written AFTER the first item in normal syntax. Then any named items that are not to be filled by unnamed ones In what order functions must pass things: This si the same as all above the item just gets pushed first into the passed list. Well what if i have a list AND a items well you ca mix and match:įunction3(item,dict=dictitem,*list,**dict) Well thats fun but what if i allready have a list and a dictionary. now all python fuctions can be called in following way:įunction3(item,item,dict=dictitem, other=dictitem) You are asking for the dictionary, tough granted called without names python poulates the first ones of the list in order UNLESS theres a corresponding dictionary item. You give in a list with 2 members where the first will be put in foo, and second into bar. Ha ok let me explain, all python code passing happens via lists and dictionaries, so all python fnctions get 2 things inputted a list and a dictionary. This is much easier to understand how it works. +stringArray = Īnd *(+stringArray) means put each element of array one by oneīut i'm still wondering what is exectly going on.Ĭmd.setAttr(objectName+'.stringArray',len(sArray),type = "stringArray", *sArray) I got this format from CG society Python forum and it works very well.Įspecially when i can't determine the lenghth of array. it's been just two month to start learning Well i don't know about detail of this kind of syntax. Test = mc.getAttr('pSphere1.stringArray') Mc.setAttr('pSphere1'+'.stringArray',type = "stringArray",*(+stringArray)) Mc.addAttr('pSphere1',ln = 'stringArray',dt = "stringArray")
