Hi there, I'm trying to write a command plugin for maya, which I'd like to give a list of assets from the scene:
cmds.ls(selection=True) I'd like to then accept this list into my command either as an argument or give it to a flag, but this is where my knowledge stops. I'd like to be able to do one of the following: (As an argument) assets = cmds.ls(selection=True) cmds.my_command(assets, some_flags=True) (To a flag) assets = cmds.ls(selection=True) cmds.my_command(asset_flag=assets, some_flags=True) My first attempt was trying to use a flag, but getting a list from a flag wasn't trivial, so I'm now trying to get it as an argument using: arg_parser_data = om.MArgParser(self.syntax(), args) assets = om.MSelectionList() success = arg_parser_data.getObjects(assets) However I keep getting an unhelpful "Internal Failure Error" from maya. Any help or indications would be great! Thanks, Russ -- 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+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/3df69889-f6d6-4164-b01f-7c1b0b0ecf46%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.