Shulin
10-24-2007, 10:51 PM
I currently have a shader editor program that I wrote that interacts with my 3ds plugin that modifies the material used on an object in the scene. The plugin is not MaxScript, it was done from the SDK in c++.
Right now, in order for the user to see the changes that have occured behind the scenes, they have to modify the scene in some way (pan the camera, turn wireframe on/off, etc.). I would like to know what functions I need to call in order to update the viewports so that the changes are shown immediately. I really just need to know how to clear the cache of the objects so that they get redrawn with the new data.
Thanks for the help.
Here's things I have tried:
Attempt 1: GetCOREInterface()->ForceCompleteRedraw(false);
This didn’t work out so well. While it did accomplish what I was looking for, it caused 3DSMax to crash pretty often.
Attempt 2: GetCOREInterface()->SetTime(GetCOREInterface()->GetTime(), TRUE);
Didn’t really work out so well. Didn’t update fast enough, or when it did update, the whole viewport wasn’t being redrawn so I was having weird pieces missing.
Attempt 3: GetCOREInterface()->RedrawViews(GetCOREInterface()->GetTime());
Didn’t work at all.
Right now, in order for the user to see the changes that have occured behind the scenes, they have to modify the scene in some way (pan the camera, turn wireframe on/off, etc.). I would like to know what functions I need to call in order to update the viewports so that the changes are shown immediately. I really just need to know how to clear the cache of the objects so that they get redrawn with the new data.
Thanks for the help.
Here's things I have tried:
Attempt 1: GetCOREInterface()->ForceCompleteRedraw(false);
This didn’t work out so well. While it did accomplish what I was looking for, it caused 3DSMax to crash pretty often.
Attempt 2: GetCOREInterface()->SetTime(GetCOREInterface()->GetTime(), TRUE);
Didn’t really work out so well. Didn’t update fast enough, or when it did update, the whole viewport wasn’t being redrawn so I was having weird pieces missing.
Attempt 3: GetCOREInterface()->RedrawViews(GetCOREInterface()->GetTime());
Didn’t work at all.
