[Closed] custom attributes annoyances
Hi all,
I have setup some stuff with custom attributes but sometimes I run into small glitches. I’m finding it very tricky to work out why these things are cropping up. Let me explain.
Originally, before I knew better, I had got into a pickle where in several max scenes there were (unknown to me due to my ignorance) different definitions with the same parameters etc. I had stupidly not included a classid so each time I applied what I thought was ‘the’ attribute def, i actually added ‘a’ version of the attribute def.
Once I found out what a fool I had been I fixed this and reprocessed all necessary max files replacing and muddle of defs with a single class-id-ified consistent definition, or so I thought.
My defs are loaded in my startup script file which lives in stdplugs/stdscripts, so should get loaded before anything else. Despite this, occasionally when loading a max file the defs get blatted over by an older version. I can only assume that the max file contains an older version somehow and loading it causes the proper latest version to be replaced.
I’d like for my defined attribute set to be pervasive, and if I load an old scene with defs applied in the past for them to update.
My question to you experts is – have i just done something silly, or to get the desired behaviour will I have to delve into some callback related stuff to refresh the attribute defs script on scene load? I feel this would work but if I am missing a trick I’d rather do it a proper way.
Many thanks in advance for any help which can be granted,
I think that I would go with the call backs. Almost ever production I’m on I set up a load/merge call back for updating scene files. Then for each asset I fileIn a unique script or a master one for problems like you are trying to over come. You are going to have to identify what you need to replace. One thing that I also do there is always have a version number tacked on to an asset so that I can quickly identify the version of it. Each time the asset is updated I increment up the version number.
Sounds like a plan. I was secretly hoping I had just missed setting up a parameter or somesuch. Thanks very much for answering Mr. Neale, I was hoping you would, you hold the custom attributes pedigree as far as I can tell.