UILayout.box does not align correctly #28391
Closed
opened 2011-08-28 05:27:59 +02:00 by Dany Lebel
·
14 comments
No Branch/Tag Specified
main
blender-v3.6-release
blender-v4.1-release
blender-v4.0-release
blender-v3.3-release
blender-v3.5-release
brush-assets-project
blender-v2.93-release
blender-v3.4-release
xr-dev
blender-v3.2-release
blender-v3.1-release
screenshots-manual
gltf_vtree
blender-v2.83-release
blender-v3.0-release
xr-controller-support
studio-sprite-fright
asset-browser-poselib
blender-v2.92-release
blender-v2.91-release
blender-v2.90-release
greasepencil-addon
xr-world-navigation
soc-2019-openxr
blender-v2.82-release
blender-v2.81-release
filebrowser_redesign
blender-v2.80-release
blender2.7
blender-v2.79b-release
blender-v2.79a-release
blender-v2.79-release
fbx_experiments
blender-v2.78b-release
collada-2
blender-v2.78-release
rigify_fixes
fbx_io_export_ignore_parents
v3.6.21
v3.6.20
v3.6.19
v3.6.18
v3.6.17
v3.6.16
v3.6.15
v3.6.14
v3.3.21
v3.6.13
v3.3.20
v3.6.12
v3.3.19
v4.1.1
v3.6.11
v3.3.18
v4.1.0
v3.3.17
v3.6.10
v3.6.9
v3.3.16
v3.6.8
v3.3.15
v3.6.7
v3.3.14
v4.0.2
v4.0.1
v4.0.0
v3.6.5
v3.3.12
v3.6.4
v3.6.3
v3.3.11
v3.6.2
v3.3.10
v3.6.1
v3.3.9
v3.6.0
v3.3.8
v3.3.7
v2.93.18
v3.5.1
v3.3.6
v2.93.17
v3.5.0
v2.93.16
v3.3.5
v3.3.4
v2.93.15
v2.93.14
v3.3.3
v2.93.13
v2.93.12
v3.4.1
v3.3.2
v3.4.0
v3.3.1
v2.93.11
v3.3.0
v3.2.2
v2.93.10
v3.2.1
v3.2.0
v2.83.20
v2.93.9
v3.1.2
v3.1.1
v3.1.0
v2.83.19
v2.93.8
v3.0.1
v2.93.7
v3.0.0
v2.93.6
v2.93.5
v2.83.18
v2.93.4
v2.93.3
v2.83.17
v2.93.2
v2.93.1
v2.83.16
v2.93.0
v2.83.15
v2.83.14
v2.83.13
v2.92.0
v2.83.12
v2.91.2
v2.83.10
v2.91.0
v2.83.9
v2.83.8
v2.83.7
v2.90.1
v2.83.6
v2.90.0
v2.83.5
v2.83.4
v2.83.3
v2.83.2
v2.83.1
v2.83
v2.82a
v2.82
v2.81a
v2.81
v2.80
v2.80-rc3
v2.80-rc2
v2.80-rc1
v2.79b
v2.79a
v2.79
v2.79-rc2
v2.79-rc1
v2.78b
v2.78a
v2.78
v2.78-rc2
v2.78-rc1
v2.77a
v2.77
v2.77-rc2
v2.77-rc1
v2.76a
v2.76
v2.76-rc3
v2.76-rc1
v2.75
v2.75-rc2
v2.75-rc1
v2.74
v2.74-rc4
v2.74-rc3
v2.74-rc2
v2.74-rc1
v2.73a
v2.73
v2.73-rc1
v2.72
v2.72-rc1
v2.71
v2.71-rc1
v2.70a
v2.70
v2.70-rc
v2.69
v2.68
v2.67b
v2.67a
v2.67
v2.66a
v2.66
v2.65a
v2.65
v2.64a
v2.64
v2.63a
v2.63
v2.62
v2.61
v2.60a
v2.60
v2.59
v2.58a
v2.58
v2.57b
v2.57a
v2.57
v2.56a
v2.56
v2.55
v2.54
v2.53
Labels
Clear labels
Interest
Animation & Rigging
Interest
Blender Cloud
Interest
Collada
Interest
Core
Interest
Documentation
Interest
Eevee & Viewport
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
Import and Export
Interest
Modeling
Interest
Modifiers
Interest
Nodes & Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds, Tests & Devices
Interest
Python API
Interest
Rendering & Cycles
Interest
Sculpt, Paint & Texture
Interest
Translations
Interest
UV Editing
Interest
User Interface
Interest
VFX & Video
Meta
Good First Issue
Meta
Papercut
Module
Add-ons (BF-Blender)
Module
Add-ons (Community)
Platform
Linux
Platform
Windows
Platform
macOS
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
Milestone
No items
No Milestone
Projects
Clear projects
No project
Assignees
Hoshinova
James-McCarthy-4
Sebastian-Herholz
casey-bianco-davis
gandalf3
Blendify Aaron Carlisle
quantimoney Aditya Y Jeppu
Alaska Alaska
AlessandroZomparelli Alessandro Zomparelli
angavrilov Alexander Gavrilov
frogstomp Aleš Jelovčan
AlfonsoAnnarumma Alfonso Annarumma
amelief Amélie Fondevilla
elubie Andrea Weikert
Andy_Goralczyk Andy Goralczyk
ankitm Ankit Meel
Anthony-Roberts Anthony Roberts
antoniov Antonio Vazquez
aras_p Aras Pranckevicius
Arnd Arnd Marijnissen
aurelw Aurel W
bartvdbraak Bart van der Braak
mont29 Bastien Montagne
blender-bot Blender Bot
bnagirniak Bogdan Nagirniak
BClark Brad Clark
brecht Brecht Van Lommel
BrianSavery Brian Savery (AMD)
ideasman42 Campbell Barton
CharlesWardlaw Charles Wardlaw
CharlieJolly Charlie Jolly
Chris_Blackbourn Chris Blackbourn
lateasusual Chris Clyne (Lateasusual)
ChrisLend Christoph Lendenfeld
HobbesOS Cian Jinks
Blendphys Clemens Barth
fclem Clément Foucault
cmbasnett Colin Basnett
Kdaf Colin Marmond
dfelinto Dalai Felinto
pioverfour Damien Picard
DanielBystedt Daniel Bystedt
DanielGrauer Daniel Grauer
pepe-school-land Daniel Martinez Lara
zanqdo Daniel Salazar
Mets Demeter Dzadik
erik85 Erik Abrahamsson
EugenioPignataro Eugenio Pignataro
EAW Evan Wilson
filedescriptor Falk David
fsiddi Francesco Siddi
GaiaClary Gaia Clary
DagerD Georgiy Markelov
mano-wii Germano Cavalcante
GregZaal Greg Zaal
zazizizou Habib Gahbiche
HooglyBoogly Hans Goudey
Harley Harley Acheson
weasel Henrik D.
Hjalti Hjalti Hjálmarsson
howardt Howard Trickey
nirved-1 Hristo Gueorguiev
mod_moder Iliya Katushenock
brita Inês Almeida
icappiello Ivan Cappiello
JacquesLucke Jacques Lucke
Jason-Fielder Jason Fielder
JasonSchleifer Jason schleifer
Jebbly Jeffrey Liu
Jeroen-Bakker Jeroen Bakker
deadpin Jesse Yurkovich
neXyon Joerg Mueller
eliphaz John Kiril Swenson
guitargeek Johnny Matthews
Brainzman Jonas Holzman
JoniMercado Jonatan Mercado
JonathanWilliamson Jonathan Williamson
JorgeBernalMartinez Jorge Bernal
JosephEagar Joseph Eagar
JoshuaLeung Joshua Leung
Bone-Studio Juan Gea
jpbouza-4 Juan Pablo Bouza
JulianEisel Julian Eisel
JulienDuroure Julien Duroure
JulienKaspar Julien Kaspar
Wahooney Keith Boshoff
kevindietrich Kévin Dietrich
lone_noel Leon Schittek
LucianoMunoz Luciano Muñoz Sessarego
LukasStockner Lukas Stockner
LukasTonne Lukas Tönne
LunaRood Luna Rood
MaiLavelle Mai Lavelle
nacioss Marco
EosFoxx Marion Stalke
Baardaap Martijn Versteegh
scorpion81 Martin Felke
mendio Matias Mendiola
Matt-McLin Matt McLin
MetinSeven Metin Seven
wave Michael B Johnson
Michael-Jones Michael Jones (Apple)
makowalski Michael Kowalski
pragma37 Miguel Pozo
MikhailRachinskiy Mikhail Rachinskiy
nrupsis Nate Rupsis
jesterking Nathan Letwory
nathanvegdahl Nathan Vegdahl
PrototypeNM1 Nicholas Rishel
nfauvet Nicolas Fauvet
nickberckley Nika Kutsniashvili
Sirgienko Nikita Sirgienko
OmarEmaraDev Omar Emara
pablovazquez Pablo Vazquez
PaoloAcampora Paolo Acampora
PascalSchon Pascal Schön
pmoursnv Patrick Mours
PaulGeraskin Pavel Geraskin
muxed-reality Peter Kim
lichtwerk Philipp Oeser
P2design Pierrick PICAUT
PratikPB2123 Pratik Borhade
Limarest Ramil Roosileht
revolt_randy Randy Blose
farsthary Raul Fernandez Hernandez
LazyDodo Ray molenkamp
RemigiuszFiedler Remigiusz Fiedler
iss Richard Antalik
rjg Robert Guetzkow
Imaginer Ryan Inch
salipour Sahar A. Kashi
SamuelBernou Samuel Bernou
Sayak-Biswas Sayak Biswas
Sean-Kim Sean Kim
sherholz Sebastian Herholz
sebastian_k Sebastian Koenig
ZedDB Sebastian Parborg
NRGSille Sebastian Sille
sebbas Sebastián Barschkis
Sergey Sergey Sharybin
IRIEShinsuke Shinsuke Irie
sidd017 Siddhartha Jejurkar
SietseB Sietse Brouwer
SimonThommes Simon Thommes
SonnyCampbell_Unity Sonny Campbell
Stefan_Werner Stefan Werner
Lockal Sv. Lockal
dr.sybren Sybren A. Stüvel
Mysteryem Thomas Barlow
ThomasDinges Thomas Dinges
TomMusgrove Tom Musgrove
Ton Ton Roosendaal
BassamKurdali Ursula kurdali
Vasyl-Pidhirskyi Vasyl Pidhirskyi
VilemDuha Vilem Duha
cwolf3d Vladimir Spivak
WannesMalfait Wannes Malfait
wbmoss_dev Wayde Moss
weizhen Weizhen Huang
leesonw William Leeson
xavierh Xavier Hallade
jenkm Yevgeny Makarov
ChengduLittleA YimingWu
dairin0d dima glib
gfxcoder jon denning
kursadk kursad k
nutti nutti
StephenLeger stephen leger
Clear assignees
No Assignees
Leon Eckardt
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender-addons#28391
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
%%%In the python api it is possible to create boxes in which other properties or operators may be put. The elements of a panel can generally be aligned. But the boxes have some problems dealing with alignment. A simple script is attached with this issue to demonstrate the problem.
Changed status to: 'Open'
blender/blender#43286 was marked as duplicate of this issue
%%%looks like you used API not very correct -- i can't see where you're placing properties in the box. They're adding to layout or column in attached script. If you want property be added to box you should do the following:
box = layout.box() # create box
box.prop(...) # add property to box (place valid arguments here)
Attaching modified script which works.
All works fine with api usage i showed, so closing report. Feel free to poke me here if there'll be more issues noticed.%%%
%%%Hi Sergey,
yes, I know how to use the box() object and put some properties or other things in it, I use it often. I wrote this script as simple as it can be to demonstrate the issue. I was not talking about aligning properties inside a box. The bug I am describing is not present in your script.
My issue:
In fact, I was talking about aligning the box ITSELF to another object (property, operator...). If you look carefully to my example, you'll see that there is three boxes which are aligned with other properties inside a column(align=True).
The first has nothing inside of it and alignes correctly. The lower corners of the box are smoothed with the upper corners of the x location property. This is working correctly but is useless since there is nothing inside the box.
The second one does not align correctly. And the only difference between the first one is that the box is placed under the properties. The box does align with the properties, but the corners are not smoothed. Why does it smooth when it is above and not when it is under.
The third one is the same as the first one except that there is a label in it. But the simple fact to put something in the box breaks the smoothed corners.
I develped an addon where I expected a box to align smoothly with other properties. The addon is paint_palette.py it is on projects.blender.org and it is now also in the trunk. You can look at it to see an example of a situation using what I am talking about.
UIlayout.box, as an ui object, has the possibility to align itself with other ui objects inside a column or a row. It would be inconsistent to not allow it to smooth correctly as the other objects do.
Thank you for your time and considering my issue.%%%
%%%Pardon, nisunderstand initial issue, re-opening.%%%
%%%Old 2011 reports gets a bit dusty. :)
I attached "box_align_2013.py" which shows the issue. Open the script in text editor and check the panel in the scene tab.
Comment the one prop line (line 20) and the box looks fine. But in the current config it fails. %%%
%%%Note: the error is caused by ui_item_align() adding the buttons to the head of the list. Attempted to fix by changing the order but this just gives other similar problems.
Looks like we should really have ui_block_do_align() be able to check for adjacent boxes without them being together in the button list.%%%
Changed status from 'Open' to: 'Archived'
There're quite enough osf things related on widgets alignment.. Perhaps at some point we'll need to revisit interface engine. For now moving to TODO http://wiki.blender.org/index.php/Dev:2.5/Source/Development/Todo/UserInterface#UI_Widgets
Added subscribers: @Leon95, @JulianEisel
Changed status from 'Archived' to: 'Open'
Merged in blender/blender#43286, another example of alignment failing (though not
box
)Changed status from 'Open' to: 'Resolved'
Solved with {D1573}/rB3d39b98f94a6cd3d4445226dd04d5ba3261bf10b