[Closed] PickObject issues
I’m getting constant crashes in a tool that uses pickObject and the count set to 4, if that matters. And I’m getting constant crashes with errors that really don’t point to anything. Any one else see problems with pickObject in Max 2011 or other? This is a simple tool as well.
Just a general question until I can get something more definite to post with some code?
Try this.
Create five objects, pick the first.
Run code below.
Choose the button in the dialog and then select the other four objects quickly. Do it a few times and in my case it takes out Max every time.
Can any one confirm this?
try(desrtoyDialog pickWalkSetup)catch()
rollout pickWalkSetup "Pick Walk Setup"
(
checkButton quickPickCb "Up ,Down, Right, Left" width:200
on quickPickCb changed state do
(
if state and selection.count==1 then
(
objs=pickObject count:4 \
select:false \
rubberBandColor:Red \
rubberBand:selection[1].pos \
)
quickPickCb.state=false
)
)
createDialog pickWalkSetup width:350
Just tried it in 2012 and I don’t get the problem. I have set the count to #multiple and removed the other parameters and it is still crashing.
And I just found a work around. I set the count to 1 and stuck it in a while loop and append the picked object to an array until I have four. Looks like that isn’t crashing.
it doesn’t crash for me. but i made a little modification in your code… does it still crash the max?
Very odd, thanks guys I will test on other machines and see what is going on. Might just need a full clean install of Max. Thanks Denis, I was playing with all sorts of things trying to see what was causing it to die on me so that extra back slash was in there. The while loop is working and should work else where to. Time to do a rebuild of the system anyways as they are getting old.
Denis, was just working on the code and don’t know what it was but something clicked and I realized I didn’t read your post right. yes it still crashes with that.
hey Paul,
hope you’re well. Code works fine in 3dsmax 2010/2011 x64. I can test at work tomorrow in 2012.