Notifications
Clear all

[Closed] Is it possible to know which modifier is used ?

Hi
Is there a way to know which modifier is currently used by the user ?
thanks

2 Replies
2 Replies
(@bobo)
Joined: 2 years ago

Posts: 0

Can you define 鈥渦sed鈥?
You can query the current object in the Modifier panel.
modPanel.getCurrentObject()
There is a big chance the user is currently working with it, especially if it is in SubObjectLevel > 0鈥?/p>

(@prettypixel)
Joined: 2 years ago

Posts: 0

sorry for my bad english鈥? but You guessed the meaning of my question.

I have an object with various modifiers鈥?and with these modifiers, there are several modifiers unwrap (ok that becomes an obsession lol).

the stack:
editable poly > twist > unwrap channel 1 > twist > unwrap channel 3 > unwrap channel 2

I would like to know when I run my script which is the modifier used by the user.
For example, if the user works on the modifier 鈥渦nwrap channel 3鈥?
So I can read the data at the right place鈥?br>
I do not know if that is clearer ^^

I wrote this using modPanel.getCurrentObject :

obj=selection[1]
mp=modPanel.getCurrentObject()
if mp!=undefined then
	(
	if classof mp==Unwrap_UVW do
		(
		nMod=modPanel.getModifierIndex obj mp
		format "run the script - modifier % - position=%
" mp nMod
		)
	)

Thanks bobo