Loading of a file resets toolbar

Reiner's picture
Project: 
Bforartists Tracker

Unfunny bug. Load UI is deactivated. But when i open another file, then the values of the Toolbar are read. This means with a blend file that wasn't opened with Bforartists before that all toolbars are activated now. The toolbar types are not affected. But the single toolbars in the toolbar types. Like the primitives.

Seems that i have to use C props instead of the python ones ...

Status: 
Closed (fixed)
Priority: 
Normal
Category: 
Bug report
Component: 
User interface
Assigned: 
Reporter: 
Created: 
Tue, 02/21/2017 - 11:25
Updated: 
Fri, 02/24/2017 - 11:37

Comments

11
Reiner's picture

Image: 
Reiner's picture

Body: Old » New
Reiner's picture

Assigned: Unassigned » Reiner
Reiner's picture

Affected are all my python props in the __init__.py file in the startup / bl_ui folder

Reiner's picture

Possible solution goes across the AddonPreferences. But i am not a happy bunny here. The better solution would be across a C prop. But i can for the life of me not find out how to connect python and c here. Making a C prop is no problem. This is done for the 3D cursor for example. But accessing the bool state by python then is the problem. Experiments ahead ...

Reiner's picture

Too much at once. We have to divide it into single issues. This issue is just for the toolbar then. Let's start with the icons / text prop.

Reiner's picture

Back to this one. I have no idea where to add the c props here ...

Reiner's picture

Fixed in port to 2.78 branch

https://github.com/Bforartists/Bforartists/commit/5818d266a9d87a1de047d3...

The c way didn't work. My knowledge is too weak here. The props are now props from AddonPreferences. I have created an addon for this. So it's Python again. But the checkboxes also exists in the toolbar. So you can change them from there too. And you need to save the user settings now to make the changes permanent, not the startup file.

Downside is, i haven't found a way to add tooltips to those props yet. Seems impossible.

Image: 
Reiner's picture

Found a way for the tooltips. So let's add them too.

Reiner's picture

Reiner's picture

Status: Active » Closed (fixed)