AREA forums upgrade
Read more about the planned upgrade of our forums
  • 1/3
You are here: Forum Home / Autodesk 3ds® Max® / SDK / PostLoadCallback and ParamBlock2
IMPORTANT ANNOUNCEMENT ABOUT AREA FORUMS
  RSS 2.0 ATOM  

PostLoadCallback and ParamBlock2
Rate this thread
 
37088
 
Permlink of this thread  
avatar
  • pgregory
  • Posted: 24 November 2009 10:42 PM
  • Total Posts: 1
  • Joined: 25 November 2009 06:33 AM

Hi,

I’m trying to fixup a plugin that has quite a history. It has a paramblock2 for data, and I wish to change the behaviour of the data. I’ve added a new parameter to the paramblock to represent the new behaviour, and deprecated the old parameter by removing it from the interface code etc.

Now I need the initial value of this new parameter to be driven by the value of the old deprecated parameter on loading old content. I presumed that the correct way to do this was to implement a PostLoadCallback on the plugin object and implement the update in the ‘proc’ method on that class. However, when I read the old value from the paramblock in the PLCB proc function, I get the wrong value (not even the default value, I get 0 for this TYPE_INT parameter), not the value in the file, and yet later, when loading is complete I can debug and see that the deprecated value is actually set to the value in the file. This suggests that the paramblock values are being updated from the file “after” the PLCB is called.

Am I missing something here?

Any help appreciated.

Paul Gregory



Replies: 0