hoknamahn Posted October 8, 2007 Share Posted October 8, 2007 (edited) I would like to create two tabs (Tab1 and Tab2) on the top level, 3 tabs in Tab1 and 2 tabs in Tab2: static PRM_Name level1SwitcherName("Level1"); static PRM_Default level1Switcher[] = { PRM_Default(3, "Tab1"), PRM_Default(2, "Tab2"), }; static PRM_Name level2SwitcherName("Level2"); static PRM_Default level2Switcher[] = { PRM_Default(3, "Tab1Child1"), PRM_Default(2, "Tab1Child2"), PRM_Default(1, "Tab1Child3"), PRM_Default(5, "Tab2Child1"), PRM_Default(6, "Tab2Child2") }; PRM_Template SOP_MegaOP::myTemplateList[] = { PRM_Template(PRM_SWITCHER, sizeof(level1Switcher)/sizeof(PRM_Default), &level1SwitcherName, level1Switcher), PRM_Template(PRM_SWITCHER, sizeof(level2Switcher)/sizeof(PRM_Default), &level2SwitcherName, level2Switcher), ... PRM_Template() }; So I expect that this code should give me what I want (Tab1->Tab1Child1, Tab1Child2, Tab1Child3 and Tab2->Tab2Child1, Tab2Child2) but result is a little bit confusing(Tab1->Tab1Child1, Tab1Child2, Tab1Child3, Tab2Child1, Tab2Child2 and nothing in Tab2). Even if I change PRM_Default(3, "Tab1") to PRM_Default(1, "Tab1") result is the same. So I've missed something but what? Edited October 8, 2007 by hoknamahn Quote Link to comment Share on other sites More sharing options...
edward Posted October 8, 2007 Share Posted October 8, 2007 What you just described is 3 switcher parameters but you've only specified two. Recall that the items _immediately_ following the switcher are used. Quote Link to comment Share on other sites More sharing options...
hoknamahn Posted October 9, 2007 Author Share Posted October 9, 2007 Arhhh, so they should be defined like switcher1 -> parameter1, parameter2, parameter3; switcher2 -> parameter1, parameter2, parameter3... Okay. Cheers. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.