Notifications
Clear all

[Closed] Can somebody break this script?

I posted this also on tech-artist.org, but have gotten few hits so far… I needed something like the riveter script that people have such fun with in Maya, and though I saw references to something similar for Max, I couldn’t for the life of me find one.

I understand that the attachment constraint does the job, but the UI for it sucks, so this script basically adds a bunch of options for applying an attachment constraint in a more user friendly way.

Since this is the first script I’ve written that I actually feel is worth showing to someone outside of my very small art team, I simultaneously crave validation and need someone to tell me what an idiot I am for doing it the hard/dumb way (provided, of course, you also tell me h ow to do it better).

This thing was written in Max 2011 x64, though I think it will work 9 and up. I have no way to verify that right now, though. I had one person tell me it was crashing his Max, though no other info was given, and I haven’t had any crashes myself, so I can’t even begin to understand what’s broken on his machine.

So, anyway… any takers willing to sling some educational mud on request out there?

edit: From an explanation to the guy with the crashes:

Ok, so I guess I need to rework the UI, if it’s that hard to figure out. Basically, the first two options set up how you want to rivet things. Project will attempt to project your rivet type by the selected axis onto the closest object. Click to place will place your rivet on the face of the object that you click.

Projection axis is at least self explanatory.

The rivet type section is where you pick your rivets… not the thing to rivet to, but the things you want to rivet. Current selection should take all currently selected objects and either project them on the selected axis, or place them where you click… all of them… Kinda useless, but I don’t see any reason to tell someone they can’t do it. Select Object(s) gives you the Pick Object(s) button to go around and select the rivets if you don’t want to use current selection. New Helper lets you just place a point object wherever you click on the destination mesh.

I’m thinking, based off of your troubles, that I don’t have error checking that will prevent you from riveting an object to itself… and this is why I want people to break it for me. I know how to use what I wrote, but other people will always try to make it do something the creator didn’t expect.

7 Replies

I tried to Use Project with Snap to Vertex using Y+ Projection and got an error.

I had 2 teapots, one selected, with use current selection, and it said:

---------------------------
  MAXScript Rollout Handler Exception
  ---------------------------
  -- Runtime error: Failure setting node property to: $Teapot:Teapot06 @ [0.000000,0.000000,0.000000]
  ---------------------------
  OK   
  ---------------------------

Error here:

		--  Constrain the point to the target node
 			controller.node = target.obj

It moved the teapot to the other one properly, but just didn’t link it.

1 Reply
(@chunks)
Joined: 11 months ago

Posts: 0

Thanks! That’s something I hadn’t accounted for. Again, it’s trying to attach-constrain an object to itself. I hadn’t done any testing with an object that’s convoluted enough to have the projection ray intersect with itself. Mostly planes and other simpler geometry.

I’ll get on that!

Also, I’m humbled that it took you no time at all to break it. sigh But this is why I posted it. your time/effort is much appreciated.

Haha, no problem. I try every way I can to break my own tools , before I release them, so I’m used to doing this stuff

Ok, so I’ve added in a filter. Some day, I’ll add in some comments for the filter, but now it should only use intersections with non-bone geometry objects excluding nodes you are using as rivets.

Try again?

I broke it again, but I figured it would break, since idk if you want to support groups. But I grouped 2 objects and tried and it failed Same spot as before.

The Click to Place with Snap to Vertex is cool. I like how that works.

I’m not sure I get how the select Objects works? So I click that, then select objects,then rivet? Maybe add tooltips to the buttons to help?

Other than that, it seems to work fine.

You’re a jerk! Thanks, though… I can probably add groups into my filter… but no. I never intended to handle groups.

Thanks! I was rather happy with that little beast.

The select objects button is there in case you don’t feel like using your current selection as rivets. You can click that button, then select your rivets. I may just remove it at this point, since it’s getting a lot of questions, and not a lot of use.

Again, feel free to use the script if you like it. I’m happy enough that someone was willing to break it and give me some input. Nobody where I work is likely to know I’m giving away a work script, or even care for that matter. Really small company.

Now I just have to figure out how to turn the rest of GoW’s offset facial rig into a working 3DStudio version…

No problem, glad to help.

I also have to test stuff myself usually. But some of my tools I had people at work use them, and I got feedback/suggestions and also told them what I planned to do and went from there.

Alot of the guys didnt know what some of my tools where or why to use them, but once I showed each of them why I made it/ how to use it, they used it almost everyday.