I was trying to make a script to activate the Paint Select mode while turning on ignoreBackfacing so that I don't select faces from the other side when painting. To make this compatible with both EditablePoly and EditPoly, my thought process was to make a tryCatch function so that if it failed to the first clause because…
You can make the script a little shorter by using SetProperty. I like using SetProperty because it's a mapped function, so you can set a property on an array all at once. (Not used in this case.) ( max modify mode obj = modPanel.getCurrentObject() bf = #ignoreBackfacing if isProperty obj bf do setProperty obj bf true…
Ooooh thanks for linking that Kio, lots of useful lessons there for a beginner like me. I made it work! Thank you. I didn't know I could use the if and else like other languages just like that either. ( max modify mode if classof (modPanel.getCurrentObject()) == Editable_Poly then ( $.ignoreBackfacing = on…
Yea you would want to check the object, find out what class it is and then fire off the correct command. Also try to avoid "actionMan", that is usually garbage commands that the command recorder spits out. It's worth looking up the actual MaxScript commands which are much more robust and have a lot more hooks for what…
im not sure if youre aware of the classof command - its really usefull for stuff like this: https://davewortley.wordpress.com/2012/06/21/classes-superclassof-and-classof/ sorry no idea whats up with the problem itself..
Not every action in max can be replicated via maxscript commands. In this case there's no value you can set to tell max to switch to paint select region directly. The only command which allows you to cycle through the different selection options is "max cycle select", but there's no function/value exposed to maxscript…
@monster So even though the Max Listener is displaying different names for those properties, some of them have hidden aliases that'll match with their Edit/EditablePoly counterparts? Cool, thank you Juan :)
@Justo You are correct, but in this case #selectByVertex will work for both. I think back when the modeling ribbon was created they added alias for many of the properties to match.
@monster Hey Juan, thank you for answering, I always learn something new from your code. Interesting solution, and thanks to that I think I'm learning about properties and their uses. I also found here Max Listener tells me every Property I want to know if I type in stuff like 'showclass "Edit_Poly.*" ' Still, am I right…