Home Technical Talk

Scripted materials and param blocks

Damn muthrfuckin param blocks. Make me want to bash my head in.

I want to add some new features to our 3ds Max scripted material, but everytime our coder adds another spinner or whatnot, it totally breaks all the existing Max files... if I try and load a file that used the previous version of the material, Max crashes because the param blocks are different.

Can anyone enlighten us how to code this thing better? How do you guys cope with this BS?

Replies

  • sevenfingers
    Offline / Send Message
    sevenfingers polycounter lvl 18
    Not really a fix, since I know nothing about programming,
    but, have you guys tired merging the files to a clean scene (with the new scripted material)?
    Kind of like the reset x-form, but on a scene level.

    Other than that, sorry, no experience.
  • Eric Chadwick
    Only way (currently) to salvage is to install the old material, open the file, strip all materials, save, install new material, open, re-create all materials. PITA.

    Maybe we just need to write a conversion system. But other studios must have figured out a way to make new versions backwards compatible.
  • monster
    Offline / Send Message
    monster polycounter
    In the MaxScript Reference Index Type "Updating Scripted Plug-ins"

    You'll have to give you material plugin a version number, and when it loads an older version you can give it instructions to update the material.

    I've used scripted materials and every time it's ended badly.
  • Eric Chadwick
    [ QUOTE ]
    I've used scripted materials and every time it's ended badly.

    [/ QUOTE ] Oh that's heartening! smile.gif

    Problem is, we've got a ton of cool features. I would rather use CA's and Wiring to wire them to existing Max features (keeps it script-independent), but many of our things have no correlation whatsoever.

    Thanks for the Updating tip.
  • FatAssasin
    Offline / Send Message
    FatAssasin polycounter lvl 18
    Wish I could help, but that's not area I know much about. But I'm pretty confident that what you want to do is doable. I've run into similar updating issues with custom attributes, and I don't think scripted plugins are much different. Have you tried cgtalk or the Area?
  • Eric Chadwick
    Yeah, posted both places. Got a reply on CGTalk that said basically the same thing as monster. Our coder is looking into it, seems doable. Thanks guys!
Sign In or Register to comment.