SDK plugin bug


#1

Hi all, I’m having trouble with a custom modifier plugin. If the modifier is hidden and the file is saved, closed and re opened it will turn back on!

I hunting through the help files to find a function that fixes this issues. The code generated by the wizard has this issue. Any advice would be greatly appreciated.


#2

don’t use the wizard.


#3

Why is the wizard bad. This is my only bug?


#4

looks like I have exactly the same issue with my wizard generated mod


#5

In your overridden Save/Load functions, make sure you call the base class functions. So:

IOResult MyCustomModifier::Save(ISave* isave)
{
    Modifier::Save(isave); //NEED THIS LINE

    //your code goes here
	
    return IO_OK;
}

and

IOResult MyCustomModifier::Load(ILoad* iload)
{
    Modifier::Load(iload); //NEED THIS LINE

    //your code goes here
	
    return IO_OK;
}

If you don’t call the base class functions, things like modifier enabled/disabled state won’t be saved to the file.


#6

Thanks ivanisavich, this completely fixed it!!!