Attribute Manager - Active tab
-
On 15/02/2018 at 00:37, xxxxxxxx wrote:
User Information:
Cinema 4D Version: R19
Platform: Windows ;
Language(s) : C++ ;---------
Hi again,I am looking for a way to set the focus (activate) a tab in a description.
I have registered a description with 4 groups, which is visualized as 4 tabs in the Attribute Manager. An object can have 4 states, depending the state I would like to set the focus on a particular group / tab.
Is this possible, and how should I go about doing that?I know how to use the DEFAULT in the resource description, but can this be changed dynamically, using the Active Object Manager library?
Or is this something which needs to be done via GetDDescription or GetDEnabling?
-
On 15/02/2018 at 00:49, xxxxxxxx wrote:
FYI
I know I can show/hide groups depending the state, and that might be a better solution in the end, but I was actually wanting to know a solution where the appropriate tab gets the focus. -
On 15/02/2018 at 08:59, xxxxxxxx wrote:
Hi,
actually you are already on the right track with the ActiveObjectManager library.
Both ActiveObjectManager_SetObjects() and ActiveObjectManager_SetObject() have the activepage parameter, which can be used for this.
Just make sure to check for user interaction (DESCFLAGS_SET_USERINTERACTION) to only switch the tab if logical for the user. -
On 16/02/2018 at 02:01, xxxxxxxx wrote:
Hello Andreas,
I overlooked the activepage parameter. Thanks.Not sure I understand your hint at using the user interaction flag.
The user will switch between the 4 object states using CommandData plugins, each will trigger to display the appropriate tab of a same description.
What logic might I be overlooking for the user? -
On 16/02/2018 at 02:37, xxxxxxxx wrote:
Hi Daniel,
then you should be fine. I thought, you might have a mode or state parameter on your ObjectData. And then you'd need to make sure, you only react to user changes of this parameter. In reaction to commands switching the tab is perfectly fine.