|11 November 2013||#1|
Join Date: Aug 2009
Deselecting objects by specyfied modyfiers
I have huge problem because I get so far but I stuck in this:
how to deselect objects in selection which contain specyfied modyfiers.
check if there is objects in my selection with turbosmooth modyfiers, if yes then deselect this object from my selection if no then do nothing
I have such a script:
for o in selection do
for m in o.modifiers where classof m == meshsmooth do
but it works only for one object, I need it to unselect all object with specyfied modyfier(s).
I would be v. gratefulfor any help.
|11 November 2013||#2|
Join Date: May 2005
You have a couple problems in your code.
The first one is that you are looping a list that gets changed during the loop and this causes the script to do funny things. So, instead of looping "selection", you better off first storing the selected objects in an array and then loop this array.
The second one is that you are looking for the wrong modifier type, "meshsmooth" is for the MeshSmooth modifier, you should be looking for "TurboSmooth".
Last edited by Codi : 11 November 2013 at 02:57 PM.
|11 November 2013||#4|
Join Date: Apr 2002
You can also check out modifierUtilities here:
Which does this and a lot of other similar operations.
|11 November 2013||#5|
Join Date: Sep 2003
Thread automatically closed
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
Note that as CGTalk Members, you agree to the terms and conditions of using this website.
|Thread Closed share thread|