Hey @sprunghunt , thanks for replying. Maybe I'm forgetting something obvious here, but that condition is not enough. If I create a cube and execute that from object mode, without even entering to faces or making any subobject selection, it still enters into the if and deletes faces. (if faces != 0: or if faces is not 0: )
Hi guys, I was making a script that´d delete components replicating Max's behaviour, like when you hit delete on a vertex\edge, it´ll convert that selection to face mode and then delete it. <div>cmds.select(cmds.polyListComponentConversion(tf = True)) </div><div>faces = cmds.filterExpand(sm=34) </div><div>if…
sorry I was being a bit vague -- here's some more detailed code: <div>selectObj = cmds.ls(selection = True, tr = True)</div><div><br></div><div>if len(selectObj) == 0 : cmds.select(cmds.polyListComponentConversion(tf = True)) faces = cmds.filterExpand(sm=34) if cmds.filterExpand(sm=34):…
if I run the script when I have a control vertex selected it does nothing. That's to be expected because a nurbs control vertex cannot be converted to a face. And a control vertex is not a transform - which is what the 'ls' command excludes.