Hi I have two functions I've been testing and I've run into this problem for a long time. It seems that meshmixer returns diffrent results if you use key commands before. I wrote function test1 which does simple assigning object ids in scene to vector objects, theres one more function getCurrentId which will return id to selected right now object. By themselves they are working fine but when you try to run them one after another in test3 getCurrentId starts acting up and returning not consistent values and more inconsistent it is as more you add key functions. I suspect it has something to do in the way keys are set because when I printed them out they all were 0. If anybody had this problem let me know.
Cheers
Solved! Go to Solution.
Solved by eliot543. Go to Solution.
Meshmixer is related to state management and possibly how input events (like key commands) are affecting the program's internal state. This could be particularly tricky when testing functions like test1 and getCurrentId if there are asynchronous processes or cached states that aren't being reset properly between function calls, especially after key events.
Here are some potential causes and troubleshooting steps to consider:
1. Key Event Handlers Interference:
2. Timing and Asynchronous Behavior:
3. State Resetting Issue:
4. Meshmixer's API and Selection State:
5. Key Code Values Returning as Zero:
If you're comfortable with debugging tools, attaching a debugger to the process to inspect live state changes or stepping through your code could also help uncover the issue.
Let me know if you'd like to explore specific areas in more detail!
Can't find what you're looking for? Ask the community or share your knowledge.