Forum Groups
  All forums
    Help & Feedback
      Work in progress
      Finished Art
      Non-Max related

Featured Threads
  inspiration alert!!!
(36 replies)
  Indespensible MaxScripts, Plugins and 3rd Party Tools
(37 replies)
  The allmighty FREE Resources Thread !
(17 replies)
  spam alert!!!
(4886 replies)
  Maxforums member photo gallery index
(114 replies)
  Maxforums Member Tutorials
(89 replies)
  three cheers to maxforums...
(240 replies)
  101 Things you didnt know in Max...
(198 replies)
  A Face tutorial from MDB101 :D
(95 replies) Members Gallery
(516 replies)
(637 replies)
  Dub's Maxscript Tutorial Index
(119 replies)

Maxunderground news unavailable

First page  Go to the previous page   [01]  [02]  [03]  Go to the next page  Last page
Little MAXScript Project. (Object Repair Tool)
show user profile  Dave
Finished enough, after using it for a day in work I've already got a few features I want to add (and possibly deduct), but here is the current version in a good usable state:

(image = link)

Install Instructions


Original Message Below----------------------------------------------------

Howdy ho!

Not requesting help with the script just yet, but I'm working on a little automated tool that basically runs through a bunch of tasks I end up doing on an almost-daily basis anyway.

I'm debating whether the "Smoothing" and "Converting To" bits will be included in the final version, but thought I'd check in here to see if there's something else I could be including. Most of it already works... which surprises me greatly, even wired the spinner up to the vert weld threshold without looking up any reference!

I've no doubt that my code is messy as hell... but I'm really enjoying MAXScript at the moment.

Ideally... suggestions would need to be "non-lethal"... there's a reason Reset XForm is last in that list (it runs through the script top > down, applying only the checked boxes)

Snapshot should probably be at the top... thinking about it.... hmmm

"I flew over Egypt once"

read 1187 times
2/18/2011 1:15:23 AM (last edit: 2/22/2011 1:26:58 AM)
show user profile  LionDebt
Looks pretty useful. I can only imagine how badly you, [edit: your clients, colleagues or fellow incompetent max-users] must break an object so badly to need a dedicated repair tool for it - on an almost-daily basis ;D
read 1175 times
2/18/2011 1:25:24 AM (last edit: 2/18/2011 1:32:21 AM)
show user profile  Dave
Hint: Not my objects.

"I flew over Egypt once"

read 1173 times
2/18/2011 1:25:58 AM (last edit: 2/18/2011 1:25:58 AM)
show user profile  LionDebt
Edited accordingly ;).
read 1165 times
2/18/2011 1:32:31 AM (last edit: 2/18/2011 1:32:31 AM)
show user profile  K-tonne
maybe a button to hold the scene under the save warning
also you could put in an ngon counter which i know has been done before so you could incorperate that code i guess if you want

Website and Portfolio

read 1158 times
2/18/2011 1:46:08 AM (last edit: 2/18/2011 1:46:08 AM)
show user profile  Garp
Just wondering what's easier for the user: having options to check and one Do It button or... a button for each function that executes its function immediately on the current selection?
And also, how does the snapshot option work?

Glad to see you picking up mxs that fast and enjoying it, Dave. Any chance to see the code (when you're done, of course)?

read 1153 times
2/18/2011 2:00:00 AM (last edit: 2/18/2011 2:00:00 AM)
show user profile  Dave
Cheers fellas, liking the thoughts so far.

Garp, this is where I get slapped for being a noob, but my snapshot script is:

holder = $
mySnapshot = snapshot selection[1]
delete holder
select mySnapshot

Took me a while to work out a way to run it without the snapshot dialogue box popping up, which obviously isn't cool. (I'm beginning to not like the things the listener tells me!). The next issue was that the target object always needs to remain in selection for the script to continue, buuut the snapshot version of the mesh is never selected... so, yeah... the above was my way around that, and as you can see... the original gets wiped.

I'll throw up the whole script tomorrow sometime, should be "finished" by then, then I'll begin any changes... really diggin' the button for each function idea.

"I flew over Egypt once"

read 1145 times
2/18/2011 2:15:25 AM (last edit: 2/18/2011 2:16:30 AM)
show user profile  Garp
Careful when using $ or selection. They're not the same.
What happens with your code if you have several objects selected?

read 1135 times
2/18/2011 3:03:42 AM (last edit: 2/18/2011 3:03:42 AM)
show user profile  Dub.
There is no shame in using the maxscript reference. There is a lot of good stuff in there. I use it reguarly. You should pretty much ignore what the listener tells you. Most of it is not good code at all.


read 1115 times
2/18/2011 8:42:26 AM (last edit: 2/18/2011 8:42:26 AM)
show user profile  advance-software
Checkboxes instead of buttons per function might be better if you remember the checkbox settings between uses. That way you don't have to click a bunch of times for common configurations.

read 1114 times
2/18/2011 8:43:11 AM (last edit: 2/18/2011 8:43:20 AM)
show user profile  horizon
^what AS said

For my work I need to place almost every object to 0,0,0 with its pivot on the bottom of the object, maybe that would be nice.
Pivot move would have to be before the 0,0,0 in the script to work properly

And perhaps a "don't change" button for smoothing and "don't collapse" for converting to would be nice.

read 1108 times
2/18/2011 9:39:07 AM (last edit: 2/18/2011 9:39:07 AM)
show user profile  Dave

I thought about that! And thus:

if selection.count != 1 then
messagebox "Select one object only kplzthx"

Yeah I've gotten stuck in the past with uses of $ and selection. This script is for a single object only though... so should be okay.

Dub, I'm not ashamed of the reference! I just like it when I don't need to use it. Makes me feel like I'm actually learning!

AS: A decent idea, no idea how to implement it though!

Horizon, Aye I hear you... I was tempted to remove the pivot changing stuff but perhaps it just needs to be able to do more than just center it.

"I flew over Egypt once"

read 1089 times
2/18/2011 12:24:29 PM (last edit: 2/18/2011 12:24:58 PM)
show user profile  advance-software
save the checkbox states to a file then reload it next time the dialog shows up & initialize the checkboxes appropriately.

Example file format:


btw - why would you ever want to convert to mesh instead of poly ?
read 1083 times
2/18/2011 12:47:16 PM (last edit: 2/18/2011 12:47:16 PM)
show user profile  horizon

Also, why not doing "for obj in $ do" instead of forcing users to select only one object?

read 1076 times
2/18/2011 1:18:02 PM (last edit: 2/18/2011 1:18:02 PM)
show user profile  Garp
Good thinking about the test but still, you should not mix them and reserve $ to quick typing in the listener. What if later you want to be able to run the script on several objects at once?

An alternative to AS's suggestion (managing an .ini file) is to use global variables. That way, the first time you start the script the values are set to their default as specified in your code. But if you change them, they will be remembered throughout the current session.
Look at this code:

When you run the script, a global is declared and tested to see if it already contains a value. If not, it's set to its default. When the setDef button is pressed, the current value is assigned to the global.

Global variables are generally not a good idea. If other scripts are using globals with the same name, it's gonna be a mess. So if you have to use globals, always give them rather complicated names, like RepairToolDefWeldVerts, RepairToolDefCenterPivot, etc.

About the reference, personally I always launch it before even opening a new script window.

edit: concerning snapshot, if you're not using it to capture an animated object at a specific frame, collapseStack myObject might be a lot simpler.

read 1073 times
2/18/2011 1:24:24 PM (last edit: 2/18/2011 1:38:50 PM)
First page  Go to the previous page   [01]  [02]  [03]  Go to the next page  Last page
#Maxforums IRC
Open chat window