1
1

Compare commits

...

13 Commits

Author SHA1 Message Date
8ae25e307e Merge branch 'blender2.8' into ui_layout_gridflow 2018-06-09 16:55:06 +02:00
4319e9499e Some more tweaks and cleanup. 2018-06-09 16:38:20 +02:00
5979ea96a5 Deduplicate some code, new solution to the fixed-estimated-size problem.
New GridFlow code was duplicating most of already existing func to
handle passing layout settings from parent to new child, fixed.

Also, added new 'variable' flag to uiLayout, set for GridFlow and all
its children, that enforce items to always estimate their real ideal
size, and not some arbitrary large fixed value.
2018-06-09 16:17:02 +02:00
2b83d81f68 Merge branch 'blender2.8' into ui_layout_gridflow 2018-06-09 15:36:37 +02:00
d3fe033875 Some cleanup/refactor from code review. 2018-06-03 18:25:08 +02:00
beca377c27 Merge branch 'blender2.8' into ui_layout_gridflow
Conflicts:
	release/scripts/startup/bl_ui/properties_texture.py
	source/blenderplayer/bad_level_call_stubs/stubs.c
2018-06-03 16:35:54 +02:00
53c9fbef60 Merge branch 'master' into ui_layout_gridflow 2018-06-02 18:34:07 +02:00
341dbce1b7 Painfully enhanced columns/rows computation to make best use of available space.
Now layout will use less columns than possible, if it does not increase
number of rows. Allows to fill more evenly available space.

Also fixed some quirks and corner-cases issues.
2016-12-03 15:09:25 +01:00
c1db8d6983 Fix logical error, in our current UI height is not really adaptative, so we want max to work with heights, not average ones.
Also, add another experimental example of gridflow layout usage (needed
some hacks/tweaks to low-level UI code, by default our buttons tend to
get way to much width than actually needed!).
2016-12-03 15:09:25 +01:00
ffb515410c Factorize gridflow computation code. 2016-12-03 15:09:25 +01:00
658a7cb46f Fix gridflow layout logic, and building with bplayer.
Also add the 'modulo' option for columns number (i.e. set number
automatically, but only allow multiples of given number).

Notes: changes to properties_data_mesh.py are just for testing
obviously, will be reverted for final patch!
2016-12-03 15:09:25 +01:00
51be9ff07a Add gridflow layout RNA API 2016-12-03 15:09:25 +01:00
2de27897f3 Initial (and theorical) code for grid flow layout.
Needs RNA API, and... testing! :P
2016-12-03 15:09:25 +01:00
2 changed files with 64 additions and 3 deletions

View File

@@ -225,6 +225,34 @@ class DATA_PT_vertex_groups(MeshButtonsPanel, Panel):
col.operator("object.vertex_group_move", icon='TRIA_UP', text="").direction = 'UP'
col.operator("object.vertex_group_move", icon='TRIA_DOWN', text="").direction = 'DOWN'
box = layout.box()
box.label(text="Row, auto, col_tweak 2")
gflow = box.grid_flow(row_major=True, num_columns=0, even_columns=False, even_rows=False, align=False)
for vg in ob.vertex_groups:
gflow.prop(vg, "name", text="")
gflow.prop(vg, "lock_weight")
box = layout.box()
box.label(text="Col, auto, col_tweak 2")
gflow = box.grid_flow(row_major=False, num_columns=0, even_columns=False, even_rows=False, align=False)
for vg in ob.vertex_groups:
gflow.prop(vg, "name", text="")
gflow.prop(vg, "lock_weight")
box = layout.box()
box.label(text="Row, auto % 2, col_tweak 2")
gflow = box.grid_flow(row_major=True, num_columns=-2, even_columns=False, even_rows=False, align=False)
for vg in ob.vertex_groups:
gflow.prop(vg, "name", text="")
gflow.prop(vg, "lock_weight")
box = layout.box()
box.label(text="Col, auto % 2, col_tweak 2")
gflow = box.grid_flow(row_major=False, num_columns=-2, even_columns=False, even_rows=False, align=False)
for vg in ob.vertex_groups:
gflow.prop(vg, "name", text="")
gflow.prop(vg, "lock_weight")
if ob.vertex_groups and (ob.mode == 'EDIT' or (ob.mode == 'WEIGHT_PAINT' and ob.type == 'MESH' and ob.data.use_paint_mask_vertex)):
row = layout.row()

View File

@@ -713,7 +713,10 @@ class TEXTURE_PT_influence(TextureSlotPanel, Panel):
return sub # XXX, temp. use_map_normal needs to override.
if isinstance(idblock, ParticleSettings):
split = layout.split()
box = layout.box()
box.label(text="¡OLD LAYOUT!")
split = box.split()
col = split.column()
col.label(text="General:")
@@ -729,9 +732,9 @@ class TEXTURE_PT_influence(TextureSlotPanel, Panel):
factor_but(col, "use_map_gravity", "gravity_factor", "Gravity")
factor_but(col, "use_map_field", "field_factor", "Force Fields")
layout.label(text="Hair:")
box.label(text="Hair:")
split = layout.split()
split = box.split()
col = split.column()
factor_but(col, "use_map_length", "length_factor", "Length")
@@ -743,6 +746,36 @@ class TEXTURE_PT_influence(TextureSlotPanel, Panel):
factor_but(col, "use_map_kink_freq", "kink_freq_factor", "Kink Frequency")
factor_but(col, "use_map_rough", "rough_factor", "Rough")
layout.separator()
box = layout.box()
box.label(text="¡GRID FLOW LAYOUT!")
gflow = box.grid_flow(row_major=True, num_columns=0, even_columns=True, even_rows=False, align=False)
col = gflow.column()
col.label(text="General:")
factor_but(col, "use_map_time", "time_factor", "Time")
factor_but(col, "use_map_life", "life_factor", "Lifetime")
factor_but(col, "use_map_density", "density_factor", "Density")
factor_but(col, "use_map_size", "size_factor", "Size")
col = gflow.column()
col.label(text="Physics:")
factor_but(col, "use_map_velocity", "velocity_factor", "Velocity")
factor_but(col, "use_map_damp", "damp_factor", "Damp")
factor_but(col, "use_map_gravity", "gravity_factor", "Gravity")
factor_but(col, "use_map_field", "field_factor", "Force Fields")
col = gflow.column()
col.label(text="Hair:")
factor_but(col, "use_map_length", "length_factor", "Length")
factor_but(col, "use_map_clump", "clump_factor", "Clump")
factor_but(col, "use_map_twist", "twist_factor", "Twist")
factor_but(col, "use_map_kink_amp", "kink_amp_factor", "Kink Amplitude")
factor_but(col, "use_map_kink_freq", "kink_freq_factor", "Kink Frequency")
factor_but(col, "use_map_rough", "rough_factor", "Rough")
elif isinstance(idblock, FreestyleLineStyle):
split = layout.split()