UserData group without title bar [SOLVED]
On 02/06/2016 at 08:32, xxxxxxxx wrote:
I have a project with a fair amount of dynamic user data and I'd really like to use groups without a title bar so my user data doesn't get all jumbled up when replacing sliders etc.
I'm using c4d.DESC_TITLEBAR to attempt to set the container to not have a title bar.
The value in the base container for the group remains False when I get the UserDataContainer again to check it and even if I go into the GUI user data settings, the boolean for title bar is indeed unchecked.
If I toggle the check box to True and back to False for title bar in the GUI user data settings, the title bar does then disappear. Unfortunately this won't be helping me in the long run.
root = c4d.GetCustomDatatypeDefault(c4d.DTYPE_GROUP) root[c4d.DESC_NAME] = "Root group" root[c4d.DESC_PARENTGROUP] = c4d.DescID(0) obj.SetUserDataContainer([c4d.ID_USERDATA, 1], root) u_id = 1 desc_UD = c4d.DescLevel(c4d.ID_USERDATA) desc_ID = c4d.DescLevel(u_id, c4d.DTYPE_GROUP, 0) desc_id = c4d.DescID(desc_UD, desc_ID) bc = c4d.GetCustomDatatypeDefault(c4d.DTYPE_GROUP) bc[c4d.DESC_NAME] = "Group 1" bc[c4d.DESC_TITLEBAR] = False bc[c4d.DESC_PARENTGROUP] = desc_id obj.SetUserDataContainer([c4d.ID_USERDATA, 2], bc)
Do I need to update something somewhere before it'll work? Is there something I'm missing? I'm always reluctant to assume things are bugs. :)
On 02/06/2016 at 12:19, xxxxxxxx wrote:
When adding new UD items. It's often required to use this message after your insert code.
This message forces the UD to fully update.
I've personally only needed to use this message when adding new UD items.
Editing or deleting existing ones doesn't seem to require it.
On 03/06/2016 at 02:19, xxxxxxxx wrote:
Thanks for the input, that's a useful message type!
This definitely helps with some other issues I've been encountering but unfortunately not this one :(
On 03/06/2016 at 03:46, xxxxxxxx wrote:
if you define a name for your group Cinema assumes that you want to display that name, so it displays the group title anyway. If you do not want to display the title you must not define a name, only the DESC_SHORT_NAME short name.
bc[c4d.DESC_SHORT_NAME] = "Group 1"
On 03/06/2016 at 03:56, xxxxxxxx wrote:
Amazing! That works perfectly.