Thank you Justin,

it works great,





On Tue, Nov 26, 2013 at 2:45 AM, Justin Israel <[email protected]>wrote:

> Something like this?
>
>     def doIt(self, args):
>         util = OpenMaya.MScriptUtil()
>
>         name = args.asString(0)
>
>         util.createFromInt(1)
>         ptr = util.asUintPtr()
>         weights = args.asDoubleArray(ptr)
>
>         print "Name:", name, "; Weights:", weights
>
> cmds.myCommand("pCube1", [1.0, 2.2, 3.3])
> # Name: pCube1 ; Weights: [1.0, 2.2, 3.3]
>
>
> On Nov 26, 2013, at 2:41 PM, ynedelin wrote:
>
> hey guys
> how to pass a list of floats to a scripted command?
> first of all can it be done?
>
> Let say I want to have this
>
> myCommand(‘pCube1’, [list of skin weights])
>
>
> thank you
> yury
>
>
>
>
>
> --
> 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 [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/python_inside_maya/130d1de1-2a56-4efa-9b18-c8f49fb81572%40googlegroups.com
> .
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>  --
> 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 [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/python_inside_maya/2F990BEA-CCF9-4DDF-BF6E-37D56815225F%40gmail.com
> .
>
> For more options, visit https://groups.google.com/groups/opt_out.
>

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/CACqGSchFmYOMix%3D-3TRVfOrrs7_OYgcy%3Dgkycoci4B5MHBz1kw%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to