Notifications
Clear all

[Closed] Multiples rollout, one paramblock ?

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 !

2 Replies

Hi kittikun,
by reading the 3ds Max 2010 SDK Help, 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

Wow thanks !

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