[Bf-committers] UI alignement changes in r59434
Thomas Dinges
blender at dingto.org
Sun Sep 29 13:54:27 CEST 2013
Hi everyone,
A few weeks ago the behaviour for UI alignement changed:
https://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=59434
I alreaddy raised concerns back then, but didn't push hard enough, as I
was unsure myself.
Well, the main problem here is, that it breakes UIs. For Blender itself,
various fixes were needed after that commit.
Let's have an example:
Before the change, this code was fine:
col = layout.column(align=True)
rol = col.row()
row.prop()
row.prop()
As the mother layout (col) was aligned, the sublayouts were too. Now we
need to specify align=True in the sublayout too, otherwise it's lost.
rol = col.row(align=True)
I think we should solve this in the other way. Basically, revert to the
former behaviour, but allow people to disable the alignement in sublayouts.
col = layout.column(align=True)
rol = col.row(align=False)
row.prop()
row.prop()
This would not break the API, and would be more intutitive as well imo.
I just talked to Jens in IRC, the Luxrender Addon suffers a lot from
this change, and we both did not find an easy solution to change it
(easy = not change hundreds of lines manually).
I am sure more Addons have this problem. Also I don't see this obvious
Py API Breackage mentioned anywhere?
http://wiki.blender.org/index.php/Dev:Ref/Release_Notes/2.69
Can we please revert to the former state, and if possible add the
align=False override possibility?
Best regards,
Thomas
More information about the Bf-committers
mailing list