PDA

View Full Version : Multiples rollout, one paramblock ?


kittikun
04-23-2009, 09:47 AM
Hi all,

I'm currently having an issue when using different ParamBlockDesc to add rollouts to my modifier, only the last declared ParamBlockDesc will fill its values into the dialog. For example

static ParamBlockDesc2 basic_param_blck
(
0, _T("Basics"), 0, GetModifierTestDesc(), P_AUTO_CONSTRUCT + P_AUTO_UI, SIMPMOD_PBLOCKREF,
IDD_BASICS, IDS_BASICS, 0, 0, NULL,

... params definitions....

end
);

static ParamBlockDesc2 mesh_param_blck
(
0, _T("Mesh"), 0, GetModifierTestDesc(), P_AUTO_CONSTRUCT + P_AUTO_UI, SIMPMOD_PBLOCKREF,
IDD_MESH, IDS_PHYSYCAL_MESH, 0, 0, NULL,

... params definitions....

end
);

Both dialogs will appear but only mesh_param_blck parameters will be filled. If I comment mesh_param_blck, basic_param_blck will correctly be filled.

Could the problem be because i'm specifying the same ClassDesc2 for each ?

Do I have to merge them into a single ParamBlockDesc to have it working correctly ? I tried to do that but how do you declare 2 dialogs in the same ParamBlockDesc ?

Thanks !

SyncViewS
04-23-2009, 11:20 AM
Hi kittikun,
by reading the 3ds Max 2010 SDK Help (http://usa.autodesk.com/adsk/servlet/item?id=12755414&siteID=123112&linkID=9241175), it seems you should have a single parameter block describing data for both rollups. Look for "Using Multiple Roll-ups", it shows a short example too.

The P_MULTIMAP flag in the parameter block descriptor indicates that the block being described will have more than one rollup.
- Enrico

kittikun
04-23-2009, 01:55 PM
Wow thanks !

I would never have thought looking into the 2010 doc since i'm using 2009 but it works for both...

CGTalk Moderation
04-23-2009, 01:55 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.