View Full Version : Why does my MaxScript work sometimes and then not
05-06-2009, 08:33 PM
Attached script and sample scene to play with.
You should be able to launch scripts by using Tools>Evaluate All and watch it rig the bones.
I had a problem which I thought I had cured when the scripts crash Max. Now it's back and I've no idea what to do. Just wanted to see if someone else could recreate the error.
If I select chunks of script and do Tools>Evaluate Line/Selection it works. Very strange.
05-07-2009, 01:52 AM
fwiw - crash confirmed. Lots of UI flickering followed by some error (didn't see it.. will have to enable logging or keep listener in view) followed by a long pause while max decides to crash and eventually the crash itself.
05-07-2009, 02:24 AM
looks like the errors generated are all of type..
Type error: custAttributes.add requires MSCustAttribDef, got: undefined
I'd imagine another RigShoulder() should have followed, but max crashes before that
05-07-2009, 03:05 AM
looks like there's several confusing bits and pieces...
the custattributes are set up in an execute(), but they don't actually enter the max system for further evaluation in your inline script until the function is closed.. so you'd probably have to generate those outside of the function; though I don't see any dynamic part of the attribute definition, so I'm not sure why you're using execute in the first place...
then once the attribute has been defined, it gets stuck in rig_foot() on...
$.transform.controller.goalSize = 6 /* change size of controller */
-- Unknown property: "transform" in $selection
which sounds about right, as the current selection is multiple objects - all the bones, looks like. That's due to rename_objects(), which selects all of the objects.
( for kicks - if it didn't.. what object was -supposed- to be selected for rig_foot() to work properly? )
Is there a chunk of code missing somewhere, somehow?
05-07-2009, 08:25 AM
Many thanks for your time spent on this.
I'm going through the script again.
Do you know a better way to do the Attritube Holder? I have tried the method used for the PEN_Attibute_Holder 2 but using 'Attribute_Holder' is not recognised. Does it have a different name in MaxScript?
I've just changed the order in which the Attritube Holder is defined. The whole scripts runs through with no errors. It's done that before and then broken again.
Anyway, if you get time, try the attached script.
05-07-2009, 08:25 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
vBulletin v3.0.5, Copyright ©2000-2015, Jelsoft Enterprises Ltd.