Message 1 of 6
2024+ SME setfocus issue
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello.
I have a function that "clicks" Menu items in Slate Material Editor by sending windows.postMessages (Alt > arrows > enter... etc.). The purpose of the script is to disable "Auto Open Nodeslots" feature. I didn't find any other way to disable it.
Here is the code that worked fine before Autodesk moved Slate to QT in 2024. Now the code doesn't work in max 2024 and 2025.
fn SmeToggleautoOpenNodeslots sme_hwnd =
(
(SME.GetMainframe()).SetFocus()
windows.postMessage sme_hwnd 0x104 0x12 0x20380001
windows.postMessage sme_hwnd 0x105 0x12 0xC0380001
for i=1 to 4 do
(
windows.postMessage sme_hwnd 0x100 0x27 0x114D0001
windows.postMessage sme_hwnd 0x101 0x27 0xD14D0001
)
windows.postMessage sme_hwnd 0x100 0x28 0x11500001
windows.postMessage sme_hwnd 0x101 0x28 0xD1500001
for i=1 to 2 do
(
windows.postMessage sme_hwnd 0x100 0x1B 0x10010001
windows.postMessage sme_hwnd 0x101 0x1B 0xD0010001
)
windows.sendMessage sme_hwnd 0x201 0 0
windows.sendMessage sme_hwnd 0x202 0 0
windows.sendMessage sme_hwnd 0xC752 0 0
windows.postMessage sme_hwnd 0xC752 1 0
windows.processPostedMessages()
(SME.GetMainframe()).SetFocus()
windows.sendMessage sme_hwnd 0x111 40050 0
windows.processPostedMessages()
)It looks like SetFocus just doesn't work in Slate anymore, or maybe postMessages don't, I'm not sure.
Can someone proof it or even help me to fix the issue please? Thanks.