Ok yes, I re-read your comment in the pastebin see what you mean now. It is
intentional
Its a modular system to create a rigged leg/arm/etc So a list of
['legCtrl1','legCtrl2','legCtrl3','legCtrl4'] etc was the intention. :)
On Thursday, November 29, 2012 4:07:08 PM UTC-5, Justin Israel wrote:
>
> noFlip_leg() doesn't return anything. Maybe you are seeing print
> statements from Maya.
> It saves its results to the self.leg_ctrl attribute every time you call it.
> So if you were to check that attribute, it would be the last one you ran.
>
>
>
> On Nov 29, 2012, at 11:13 AM, Berg Jones wrote:
>
> Thanks again. I have it working now.
>
> When you said this I can explain what Im doing...there was a trick that I
> saw in the doc..
>
> concerned that you were calling your noFlip_leg() method twice, and
> then running your useNotesTest() which then only considers the most recent
> leg? Is that right? You are not saving these curves as you go. Each run
> replaces the previous info.
>
> if i do:
>
> def noFlip_leg(self):
> pm.curve()
> cmds.rename('legCtrl#') ######### add # after name
> self.leg_ctrl = cmds.ls(sl=1) [0]
> self.leg_ctrl = self.leg_ctrl.split('|')[0]
>
> noFlip_leg()
> noFlip_leg()
> noFlip_leg()
>
> this returns legCtrl1/2/3
>
>
>
>
>
> On Thursday, November 29, 2012 2:06:31 AM UTC-5, Justin Israel wrote:
>>
>> I found the problem from your first question. The second problem is
>> slightly more confusing but maybe my notes will help. I tried to comment up
>> as much as possible with my edits using # EDIT #
>>
>> http://pastebin.com/WVxfW1FG
>>
>> For the first problem, I found where it was (line 74 of your original
>> code):
>> cmds.setAttr('ikFk_status.notes', new_ikfk_note_list, type ='string')
>> This line was passing a list to your attribute as a string. Maya was
>> happily allowing a list->string conversion to take place, corrupting your
>> data. I changed it to first join it to a string again:
>> note_string = ','.join(new_ikfk_note_list)
>> cmds.setAttr(self.GROUP_NAME, note_string, type ='string')
>>
>> For the second problem, it seems like you already had the proper
>> attributes to reference on your class, and that cmds.getAttr was not
>> appropriate. But I was concerned that you were calling your noFlip_leg()
>> method twice, and then running your useNotesTest() which then only
>> considers the most recent leg? Is that right? You are not saving these
>> curves as you go. Each run replaces the previous info.
>>
>> -- justin
>>
>>
>>
>>
> --
> view archives: http://groups.google.com/group/python_inside_maya
> change your subscription settings:
> http://groups.google.com/group/python_inside_maya/subscribe
>
>
>
--
view archives: http://groups.google.com/group/python_inside_maya
change your subscription settings:
http://groups.google.com/group/python_inside_maya/subscribe