PDA

View Full Version : Is it possible to know which modifier is used ?


prettyPixel
05-23-2005, 11:51 AM
Hi
Is there a way to know which modifier is currently used by the user ?
thanks

Bobo
05-23-2005, 04:49 PM
Hi
Is there a way to know which modifier is currently used by the user ?
thanks

Can you define "used"?
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...

prettyPixel
05-23-2005, 09:09 PM
Can you define "used"?
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...

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 "unwrap channel 3".
So I can read the data at the right place...
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=%\n" mp nMod
)
)
Thanks bobo :)

CGTalk Moderation
05-23-2005, 09:09 PM
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.