Hi all,
i'm looking for a way to disable a button when selected any object in scene and enabled with not selected too.
thanks for your help.
Forum topic · General Scripting
By paparalla · 2016-05-05
Hi all,
i'm looking for a way to disable a button when selected any object in scene and enabled with not selected too.
thanks for your help.
Comments (7)
Comment policy
Enjoy
Thanks so much!!!
It is exactly what I wanted thanks you very much. Can you help me whit a one more thing please?
OK, I need something like this...
If selection object have a UVmap modifier -- disable the button, but if not Add modifier to object.
Here my little sample but its work only when "pressed button" and if the uvwmap is the first in the modifier list to the objects selection. I need this only when you select objects or not, and no matter order the UV map in the object selected.
Try(DestroyDialog Rtest)catch()
rollout Rtest "Test-Rollout"
(
button bt1 "DetectUVmap"
on bt1 pressed do
(
for i in selection do
m = 1
if classOf geometry[1].modifiers[m] != Uvwmap then
(
messagebox "Add_UVmap" beep:off
obj = selection[1]
size= obj.max.x - obj.min.x
uvmodifier = uvwmap name:"Fit Bitmap" maptype:4 length:(size) width:(size) height:(size)
addmodifier obj uvmodifier
)
else messagebox "Uvmap exist" beep:off
)
)
CreateDialog Rtest ()
Thanks!
.
Thanks =)
Thansks Miauu you are crack!
This doesn't make sense with a mixed selection where some objects already have the modifier and some don't. I'd avoid disabling a part of the UI, let the user decide and just skip all the objects that already have the modifier applied
Thanks again!
thanks for your time Swordslayer!
Thanks again!
Thansk for your time wordslayer. Am very happy :)