﻿<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="ja">
	<id>https://wiki.blender.jp/index.php?action=history&amp;feed=atom&amp;title=Dev%3A2.5%2FSource%2FUI%2FLayoutEngine</id>
	<title>Dev:2.5/Source/UI/LayoutEngine - 版の履歴</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.blender.jp/index.php?action=history&amp;feed=atom&amp;title=Dev%3A2.5%2FSource%2FUI%2FLayoutEngine"/>
	<link rel="alternate" type="text/html" href="https://wiki.blender.jp/index.php?title=Dev:2.5/Source/UI/LayoutEngine&amp;action=history"/>
	<updated>2026-06-08T09:55:44Z</updated>
	<subtitle>このウィキのこのページに関する変更履歴</subtitle>
	<generator>MediaWiki 1.31.0</generator>
	<entry>
		<id>https://wiki.blender.jp/index.php?title=Dev:2.5/Source/UI/LayoutEngine&amp;diff=86137&amp;oldid=prev</id>
		<title>Yamyam: 1版 をインポートしました</title>
		<link rel="alternate" type="text/html" href="https://wiki.blender.jp/index.php?title=Dev:2.5/Source/UI/LayoutEngine&amp;diff=86137&amp;oldid=prev"/>
		<updated>2018-06-28T18:40:38Z</updated>

		<summary type="html">&lt;p&gt;1版 をインポートしました&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;ja&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← 古い版&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;2018年6月28日 (木) 18:40時点における版&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-notice&quot; lang=&quot;ja&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(相違点なし)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>Yamyam</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.blender.jp/index.php?title=Dev:2.5/Source/UI/LayoutEngine&amp;diff=86136&amp;oldid=prev</id>
		<title>wiki&gt;Mindrones: moved Dev:2.5/Source/UI LayoutEngine to Dev:2.5/Source/UI/LayoutEngine</title>
		<link rel="alternate" type="text/html" href="https://wiki.blender.jp/index.php?title=Dev:2.5/Source/UI/LayoutEngine&amp;diff=86136&amp;oldid=prev"/>
		<updated>2010-02-19T02:13:48Z</updated>

		<summary type="html">&lt;p&gt;moved &lt;a href=&quot;/Dev:2.5/Source/UI_LayoutEngine&quot; class=&quot;mw-redirect&quot; title=&quot;Dev:2.5/Source/UI LayoutEngine&quot;&gt;Dev:2.5/Source/UI LayoutEngine&lt;/a&gt; to &lt;a href=&quot;/Dev:2.5/Source/UI/LayoutEngine&quot; title=&quot;Dev:2.5/Source/UI/LayoutEngine&quot;&gt;Dev:2.5/Source/UI/LayoutEngine&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;新規ページ&lt;/b&gt;&lt;/p&gt;&lt;div&gt;=== WM/Region level flow  ===&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&amp;lt;br&amp;gt;'''Region Init:&amp;lt;br&amp;gt;''' &lt;br /&gt;
&lt;br /&gt;
- If region is (header, toolbar, buttons view) &amp;lt;br&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp; - find scripts how? assign somehow&amp;lt;br&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp; - call listener py script (adds a dynamic listener handler)&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
'''Region Listener:''' &lt;br /&gt;
&lt;br /&gt;
- If region is (header, toolbar, buttons view) &lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp; - match the registered listener options and send &amp;quot;refresh&amp;quot; or &amp;quot;draw&amp;quot; to region &lt;br /&gt;
&lt;br /&gt;
'''&amp;lt;br&amp;gt;Region Refresh:'''&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
- If region is (header, toolbar, buttons view)&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp; - send or store initialization info?&amp;lt;br&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp; - execute script&amp;lt;br&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp; - ends with uiLayout/uiBlock data&amp;lt;br&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp; - add or insert the standard buttons (like editor type menu) or drag/dropped stuff &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;'''Region Draw:''' &lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp; - draw using themes and uiLayout/uiBlock data&amp;lt;br&amp;gt;&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== LayOut Engine Flow &amp;lt;br&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
'''For each header, toolbar, buttons view:&amp;amp;nbsp;&amp;lt;br&amp;gt;''' &lt;br /&gt;
&lt;br /&gt;
'''Send info to Py:'''&amp;lt;br&amp;gt;- region size, region v2d info?&amp;lt;br&amp;gt;- type; bar horizontal, bar vertical, buttons view&amp;lt;br&amp;gt;- panel state, so closed panels can be skipped or forced visible&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;'''Get info from Py:'''&amp;lt;br&amp;gt;- minzoom:&amp;amp;nbsp;either draw slider or autohide region&amp;lt;br&amp;gt;- maxzoom:&amp;amp;nbsp;either stretch view, or (optionally?)&amp;amp;nbsp;draw multiple collumns of panels&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;'''If visible:'''&amp;lt;br&amp;gt;- execute script&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;'''Post:''' &lt;br /&gt;
&lt;br /&gt;
- calculate boundbox, init v2d&amp;lt;br&amp;gt;- match saved panel locations and panel state&amp;lt;br&amp;gt;- process layout into real coordinates&amp;lt;br&amp;gt;&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== Python API &amp;lt;br&amp;gt;  ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;Listener callback for refresh &lt;br /&gt;
&lt;br /&gt;
Panel name/ID&amp;amp;nbsp;registry &lt;br /&gt;
&lt;br /&gt;
Context retrieval (respecting local &amp;quot;browse&amp;quot;&amp;amp;nbsp;context if set) &lt;br /&gt;
&lt;br /&gt;
Layout hints:&amp;lt;br&amp;gt;- Collumns,&amp;amp;nbsp; flow or not&amp;lt;br&amp;gt;- Spacing&amp;lt;br&amp;gt;- Button labeling convention?&amp;lt;br&amp;gt;- Alignment&amp;lt;br&amp;gt;- Optional stylesheet or templates (py?)&amp;lt;br&amp;gt;&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Button/operator definition &amp;lt;br&amp;gt;- Pulldow menus&amp;lt;br&amp;gt;- RNA&amp;amp;nbsp;settings and Operator buttons&amp;lt;br&amp;gt;- Special harcoded UI templates, like curve, preview, etc&amp;lt;br&amp;gt;- Custom entirely python defined buttons? &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;-&amp;amp;gt;&amp;amp;nbsp;Context browser/visualizer is a C template! &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
== Layout API  ==&lt;br /&gt;
&lt;br /&gt;
When creating the buttons for a Panel, Header or Menu, a &amp;quot;UI Layout&amp;quot; is used. Based on a number of given items, layout specifiers and templates buttons will be created and positioned.&lt;br /&gt;
&lt;br /&gt;
===Items===&lt;br /&gt;
Items are the smallest entity in the layout. They correspond to one or more buttons. Item types that are implemented:&lt;br /&gt;
*RNA properties &lt;br /&gt;
*Operators &lt;br /&gt;
*Icon/Text Label&lt;br /&gt;
*Menu&lt;br /&gt;
*Separator&lt;br /&gt;
[[Image:layout_engine_items.png|align=right]]&lt;br /&gt;
&lt;br /&gt;
===Layout Specifiers===&lt;br /&gt;
Layout specifiers dictate how items are positioned. The following layout specifiers are available:&lt;br /&gt;
&lt;br /&gt;
*Column&lt;br /&gt;
[[Image:layout_engine_column.png|align=right]]&lt;br /&gt;
*Row&lt;br /&gt;
[[Image:layout_engine_row.png|align=right]]&lt;br /&gt;
*Column Flow&lt;br /&gt;
[[Image:layout_engine_column_flow.png|align=right]]&lt;br /&gt;
*Split: this one generates two or more sublayouts, which can then be filled in again.&lt;br /&gt;
[[Image:layout_engine_split.png|align=right]]&lt;br /&gt;
&lt;br /&gt;
===Templates===&lt;br /&gt;
Templates provide a pre-built block of buttons. This has two purposes:&lt;br /&gt;
* Consistent layouts for things such as ID browsers or Preview Renders.&lt;br /&gt;
* Implemented button handling in C code rather than python to ease migration, or handle difficult cases.&lt;br /&gt;
&lt;br /&gt;
Possible templates to add: &lt;br /&gt;
*ID Context/Browse &lt;br /&gt;
*Curve Mapping &lt;br /&gt;
*Colorband &lt;br /&gt;
*Preview Render &lt;br /&gt;
*List Edit&lt;br /&gt;
*Modifier&lt;br /&gt;
*Constraint&lt;br /&gt;
&lt;br /&gt;
== Multiple Datablocks  ==&lt;br /&gt;
&lt;br /&gt;
If we allow editing of multiple datablocks simultaneously, this presents a number of challenges. Rather than a single datablock / RNA pointer, a collection of them would passed along. &lt;br /&gt;
&lt;br /&gt;
*Single Button: If all values agree, display the value. If not, display a dash. &lt;br /&gt;
*If conditional on properties: If all values evaluate to true, run the code. If some evaluate to true but not all, something could indicate that there are more buttons not diplayed. If all values evaluate to false, do nothing. &lt;br /&gt;
*For loop over collection properties: the collections need to be merged somehow. A reasonable method may be to retain all items with the same name &amp;amp;amp; type in all collections. If some items only exist in some collections, there could again be an indicator that some are not displayed.&lt;br /&gt;
&lt;br /&gt;
Further some implementation issues are: &lt;br /&gt;
&lt;br /&gt;
*In python then all conditionals and for loops should take this into account, and use utility functions or perhaps builtin collection mechanisms to work with collections instead of single datablocks. &lt;br /&gt;
*Each button should not store this full collection, so such collection can be shared and stored at a higher level. &lt;br /&gt;
*Displaying 1000 objects may get quite slow, how to avoid major slowdowns on an select all operations? Have a built-in limit, abort drawing buttons after timeout, ..?&lt;br /&gt;
&lt;br /&gt;
== Performance  ==&lt;br /&gt;
&lt;br /&gt;
Ideally we would like to do minimal redraws and minimal python code evaluation. Currently in 2.5 even button highlights do a full redraw, though this will be fixed with partial redraws. Doing partial redraws while editing is more complicated, if the UI updates interactively while editing the button it becomes difficult to know if this requires a redraw, though it could be reasonable to assume none is needed, also to avoid buttons moving around while editing them. &lt;br /&gt;
&lt;br /&gt;
What the performance implications of python code evaluation are is hard to predict. In principle the python code could be run once and the layout tree stored. The difficulty with such an approach however is that also conditionals and for loops need to be part of the layout tree.&lt;/div&gt;</summary>
		<author><name>wiki&gt;Mindrones</name></author>
		
	</entry>
</feed>