COCKOS
CONFEDERATED FORUMS
Cockos : REAPER : NINJAM : Forums
Forum Home : Register : FAQ : Members List : Search :
Old 12-09-2017, 09:36 PM   #1
jan hase
Human being with feelings
 
Join Date: Jul 2017
Posts: 25
Default How to call SerializeState()

Hello everyone,

I wanted to implement Chunks Un/SerializeState() Functions in my Plugin to save TextEntries. So i studied the behavior of IPlugChunks and recognized, that whenever a Slider of the Multislider is moved the SerializeState Function is called - so far so nice

So i Implemented it in my Plugin and whenever i turned a Knob SerializeState() was NOT called. So my question is, how can i make it that Serializestate() is called when I move my faders or knobs or change an TextEntry. i couldnt find anything doing that in IPlugChunks, it seems to me its build in the Multislider...but i couldnt find anything.
jan hase is offline   Reply With Quote
Old 12-10-2017, 12:09 PM   #2
Xenakios
Human being with feelings
 
Xenakios's Avatar
 
Join Date: Feb 2007
Location: Oulu, Finland
Posts: 8,062
Default

I guess the ModifyCurrentPreset() call in this method of MultiSliderControlV causes the serialize function to be called :

Code:
void OnMouseUp(int x, int y, IMouseMod* pMod)
  {
    //TODO: check this isn't going to cause problems... this will happen from the gui thread
    mPlug->ModifyCurrentPreset();
    mPlug->DirtyPTCompareState();
  }
Also in resource.h there is : #define PLUG_DOES_STATE_CHUNKS 1
__________________
I am no longer part of the REAPER community. Please don't contact me with any REAPER-related issues.
Xenakios is offline   Reply With Quote
Old 12-13-2017, 05:39 AM   #3
jan hase
Human being with feelings
 
Join Date: Jul 2017
Posts: 25
Default

Thank you Xenakios, ModifyCurrentPreset() works :-)
jan hase is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 11:14 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.