And to explain again why your snippet didn't work and the
myObject==myObject always passes, consider this..

1==1

And then

x=1
x==x

Basically comparing a value to itself is always going to pass.

Justin

On Sat, Apr 8, 2017, 6:25 PM NAS18 <[email protected]> wrote:

>
> it does work.. thank you so much  :)
>
> On Saturday, April 8, 2017 at 6:47:54 AM UTC+1, Alok Gandhi wrote:
>
> Just to reiterate, use this, it will work and is much simpler:
>
> def delcube(self, *args):
>     todelete = cmds.ls("myCube*", sl=True, dag=True, v=True, ud=False)
>     for obj in todelete:
>         try:
>            cmds.delete(obj)
>         except ValueError:
>             # Shape Node already deleted
>             pass
>
> --
> 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/1049c7e3-6afa-48e7-8579-7792713975a6%40googlegroups.com
> <https://groups.google.com/d/msgid/python_inside_maya/1049c7e3-6afa-48e7-8579-7792713975a6%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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/CAPGFgA3fm8r%3Do_Fo0%2BnPr_%2BpTvyHDmk4rxu%3D4JuU420dg2iVtg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to