I don't think there's any easy way to supress warning messages in general, unfortunately, other than doing temporary re-routing of output streams. Perhaps if you gave some information as to exactly what the warning message was, though, people might be able to give advice on how to avoid it.
As for the components - if you are starting with a string name, then yeah, the easiest way to convert that into usable API objects is generally through MSelectionList. Note that you'll have to use MSelectionList.add(stringName), or else call one of the MGlobal selection list methods in order to get anything actually useful into your MSelectionList. - Paul On Sun, Apr 12, 2009 at 6:43 AM, sunny <[email protected]> wrote: > hi all, > > i have two question on maya python api. actually i am writting a simple code > to modify skinweights > any help be appreciated.. > > how to supress warning messages in maya pyhon api. > i am setting skinweights using " MFnskinCluster.setWeights " > function but i am getting warning message > (but all the weights are getting loaded properly) > any way to supress warning message. like wise there is catchQuite command in > mel. > > my second question is How can I acess component of geometry given the name > of object using API > way i am doing it selecting all the componenet in maya and running > > selList = om.MSelectionList() > allCompObj = om.MObject() > dagPathCom = om.MDagPath() > selList.getDagPath( 0,dagPathCom ,allCompObj) > > any better method to do same?? > > thanks > > sunnyC. > > -- > myCG > http://3drigger.com/sunny > > > > --~--~---------~--~----~------------~-------~--~----~ http://groups.google.com/group/python_inside_maya -~----------~----~----~----~------~----~------~--~---
