Notifications
Clear all

[Closed] modifier class filter

i was wondering how i could create a function that would check if one of my modifiers class is ie Bend?

I need it for a selectByName filter.

I tried severals things but nothing worked.

4 Replies
1 Reply
(@denist)
Joined: 2 years ago

Posts: 0

bend_modifiers = getClassInstances Bend

it returns the list of all Bend Modifiers used in the scene… If the array is empty – there is no Band Modifiers in the scene.

my explanation was incomplete.
I would like to see in my select by name dialog all the objects with a specific modifier

maybe this is what you’re looking for…


(
	fn hasModifier obj modClass =
	(
		for i = 1 to obj.modifiers.count do
			if isKindOf obj.modifiers[i] modClass then
				return true
		false
	)
	
	hasModifier $ bend
)

thanks a lot, i tried something like this, but without the isKindOf method.