ScriptSpot

Forum topic · General Scripting

refresh function when selecting material in Material Editor or object in scene

By artrender.info · 2013-01-18

Description

How to listen navigation in material editor or object selection so, that I could call refresh function in a script?

I know that:
(
to_print = (medit.GetActiveMtlSlot() as string)
print to_print
)

but this is not working any time when you navigate! And I don't want to make an infinite loop to see if GetActiveMtlSlot() changes!

Please Help!

Comments (1)

Anubis · 2013-01-18

I dont think there is a direct way to handle this.

[edit] Well, this was really short reply :) so lets append a few words...

I mean that no existing callback to monitor that change, but you can use Timer control ;)