Commit Graph

4044 Commits

Author SHA1 Message Date
Pablo Vazquez
afa45fb858 UI: Use flow layout for object properties context
Mainly as a proof of concept and test to use in other contexts.
2018-06-10 13:56:28 +02:00
Campbell Barton
7fdde7fd86 UI: use draw_header function for popover buttons
Add 'is_popover' for panel draw functions to check if they're in a popup.
This puts dyntopo toggle next to the popover.
2018-06-09 17:38:32 +02:00
Campbell Barton
1ce55693f5 UI: remove tools space type, use properties context
We've decieded to use tools context in properties editor.
2018-06-08 16:35:05 +02:00
Jeroen Bakker
cbbf8bbbb4 Workbench: XFlip Matcap per 3D View
Note: Icons are not yet updated.
2018-06-08 16:13:49 +02:00
Jeroen Bakker
9f2447cbd8 Code cleanup 2018-06-08 15:35:25 +02:00
Jeroen Bakker
70b3fb3781 Workbench: Custom StudioLight UI 2018-06-08 15:34:46 +02:00
Jeroen Bakker
aff6cc9cf1 Workbench: Lights user pref 2018-06-08 14:30:32 +02:00
Jeroen Bakker
b3c8ffcb3e Workbench: UI for custom studio lights/matcaps
- all known image types are supported
- BpyAPI for studiolights added
- added open user pref operator in shading menu
- possible to add multiple files in a single run

For now refreshing studio lights will free all studiolights and reinit
the whole mechanism. This can be improved by only freeing deleted, reset
updated and add new custom studiolights.

details to show currently only shows the path we perhaps want to add
other information also
2018-06-08 10:41:24 +02:00
Campbell Barton
30cd35a37b Keymap: continued testing/development
After testing in the studio and extending the event system for
drag events, we've agreed on adjustments to the new keymap,
see: T55162

- Tab: Edit-mode toggle.
- Tab + Cursor Drag: mode switching pie menu.
- Accent/Grave: for 3D view pie menu.
- F3: Search
- 1..3, Shift-1..3: Edit mesh vertex/edge/face toggle.

Other minor changes were made, however they aren't part of the design.

- Ctrl-Shift-S: Image editor Save-As (was F3)
- Ctrl-Alt-R: Repeat history (was F3)
2018-06-07 20:46:12 +02:00
Pablo Vazquez
a867e63dd6 Rename "Viewport Display SSAO" sub-panel name to Screen Space Ambient Occlusion
Since it is already a sub-panel of Viewport Display anyway
2018-06-07 12:08:40 +02:00
Jeroen Bakker
f447411a82 Bone selection: user control contrast
Experiment: let the user be in control of the alpha channel as some rigs
are hard too see during bone selection. Especially rigs that were
designed for 2.79 wireframe mode.
2018-06-07 09:26:06 +02:00
Jeroen Bakker
19d651ca9a View3DShading popover: Naming + alignment 2018-06-06 16:17:07 +02:00
Jeroen Bakker
fcf720a135 View3D: Shading Popup
- layout so cavity options are better visible
- fixed issues showing wrong options in Material mode
- added labels + seperators
2018-06-06 15:44:00 +02:00
Jeroen Bakker
f1fd5ed74f T55333 Workbench: Cavity Shader
A cavity shader based on SSAO. Works on all workbench deferred passes.

Per 3d viewport the cavity shader options can be set as different
shading needed different options. Some global options are in the
Viewport Display of the scene like num samples and distance.

Experimental: Naming of Ridges and Valleys
2018-06-06 14:51:18 +02:00
Pablo Vazquez
3b8ae85e3d Move Time Remapping into a sub-panel 2018-06-06 14:28:35 +02:00
Campbell Barton
2088bb0d49 UI: add particle brush to topbar 2018-06-06 14:06:45 +02:00
Campbell Barton
1889eec918 UI: use regular size icons for toolbar popup
Test this since the popup feels disruptive/flashing when its too large
when set smaller it looks closer to a menu w/ key-accelerators which is
the intention in this case.

It's also more likely the active tool can be placed under the cursor.
2018-06-06 08:32:25 +02:00
Clément Foucault
d5ce40a5ed Wireframe: Add slider to hide edges from coplanar faces
The default behaviour is to show the same amount of edges as 2.7.
The slider makes it possible to show all edges or even less.
2018-06-05 19:35:36 +02:00
Campbell Barton
7436fb2ef1 Merge branch 'master' into 28 2018-06-05 16:36:13 +02:00
Campbell Barton
c68429bc03 Cleanup: pep8
Use 'autopep8 --ignore E721,E722' on our UI code, only minor changes.
2018-06-05 16:32:11 +02:00
Campbell Barton
60aee3943f UI: move 3D view display options into popover
- Moved Mesh Display, Mesh Analysis & Motion Tracking
  display panels to Overlays.
- Removed Item panel from sidebar (buttons available elsewhere).

Patch by @billreynish w/ edits
2018-06-05 15:35:57 +02:00
Jeroen Bakker
a3815f8777 Workbench: Matcaps T55291
- users can use their own matcaps
.config/blender/2.80/datafiles/studiolights/matcap/ folder
- upto 100 matcaps can be loaded
- color of the matcap is influenced by the color of the material/single
color etc. To show the plain matcap use single color at 1.0
- chosing a matcap is at lighting level (flat/studio/matcap)
- matcap only possible in solid mode
- also works for X-Ray mode

As the old matcaps are still in used by the clay engine I didn't remove
it yet.
2018-06-05 11:38:33 +02:00
Campbell Barton
1df228a416 UI: context menu for other editor types
D3458 by @billreynish w/ edits.

- Context menu for dope-sheet, graph, image & node editors.
- Add type to contenxt menu header.
- Access with W-Key.
- Change UV-editor weld key binding to Shift-W.
2018-06-05 09:18:00 +02:00
William Reynish
2b4d2de253 UI: more subpanels for Cycles and Eevee. 2018-06-04 17:36:03 +02:00
William Reynish
acb5bbf9b2 UI: use subpanels for Cycles, render, scene, object, particle, curves. 2018-06-04 13:44:23 +02:00
Campbell Barton
5b64301834 Merge branch 'master' into blender2.8 2018-06-04 09:06:14 +02:00
Campbell Barton
2d3d76693a Cleanup: newlines at EOF for Python modules 2018-06-04 08:54:40 +02:00
f6743fcaa4 UI: use subpanel for particle emission source, as an example. 2018-06-03 21:36:12 +02:00
Pablo Vazquez
18a4553838 Edit menu: add Repeat Last and Repeat History 2018-06-02 23:13:03 +02:00
Campbell Barton
04d9316cf3 UI: use single column layout for particles
Also minor changes to other panels.

Patch by @billreynish
2018-06-02 21:52:52 +02:00
Dalai Felinto
bb8770b976 Fix UI for camera data
The fix bit is the split.

But since we are using col.separator() left and right we need this as well.
I still don't think the separators are the way to go, yet may as well be
consistent with the current design in place, thus the extra separator here too.
2018-06-02 11:22:44 +02:00
Campbell Barton
8433ed76b2 UI: re-order navigate manipulator
Looked as if size applied to navigation too.
2018-06-01 22:37:27 +02:00
Campbell Barton
d18cd768bb UI: use single column properties for object data
patch by @billreynish w/ minor edits
2018-06-01 19:26:07 +02:00
Jeroen Bakker
e4a727626e X-Ray: Added a slider for the alpha
- will not render when set to 0.0 for speed reasons. so when user sets
transparency to hide everything the bigger passes will be skipped.
2018-06-01 17:15:35 +02:00
William Reynish
15e5dbc2c3 UI: tweaks to viewport shading and overlay panel layouts. 2018-06-01 17:14:06 +02:00
0706b410bd UI: use same "Viewport Display" name for scene/object/material panels. 2018-06-01 17:14:06 +02:00
eef18d39cb Fix broken set collection offset from cursor operator. 2018-06-01 17:14:06 +02:00
Joshua Leung
72a360827b T54991: Restore support for Motion Path drawing in 2.8
This commit restores support for Motion Path drawing in 2.8 (as it wasn't ported over
to the new draw engines earlier, and the existing space_view3d/drawanimviz.c code was
removed during the Blender Internal removal).

Notes:
* Motion Paths are now implemented as an overlay (enabled by default).
  Therefore, you can turn all of them on/off from the "Overlays" popover

* By and large, we have kept the same draw style as was used in 2.7
  Further changes can happen later following further design work.

* One change from 2.7 is that thicker lines are used by default (2px vs 1px)


Todo's:
* There are some bad-level calls introduced here (i.e. the actgroup_to_keylist() stuff).
  These were introduced to optimise drawing performance (by avoiding full keyframes -> keylist
  conversion step on each drawcall). Instead, this has been moved to the calculation step
  (in blenkernel).  Soon, there will be some cleanups/improvements with those functions,
  so until then, we'll keep the bad level calls.


Credits:
* Clément Foucault (fclem) - Draw Engine magic + Shader Conversion/Optimisation
* Joshua Leung (Aligorith) - COW fixes, UI integration, etc.


Revision History:
See "tmp-b28-motionpath_drawing" branch (rBa12ab5b2ef49ccacae091ccb54d72de0d63f990d)
2018-06-01 16:38:21 +02:00
Vuk Gardašević
27881e9948 Fix Add menu issue when there are no collections to instance
Differential Revision: https://developer.blender.org/D3453
2018-06-01 15:27:18 +02:00
Jeroen Bakker
4eb47c303d Fix: raytrace_mirror does not exist anymore
Eevee default material settings were not showing.
2018-06-01 12:14:08 +02:00
Jeroen Bakker
c450966e95 Workbench: Material specific settings for the specular
- Uses the roughness setting of the basic eevee material
- renamed gloss_mir to roughness
- set default of roughness to 0.25
- renamed ray_mirror to metallic
- cleaned up material rna (BI mirror struct)
- use BLINN phong model
- normalize incoming/outgoing specular light
- when using camera oriented studiolight, the SolidLight will be used
for specular highlights
- EXPERIMENT: when in world oriented studiolight only the shadow direction will be used.
- change the settings of the internal light to make scenes more
readable
2018-06-01 11:01:55 +02:00
Bastien Montagne
7bdc67f5f3 Fix broken 'make single user' operator UI.
Texture option was removed, since BI engine removal...
2018-06-01 10:27:27 +02:00
Campbell Barton
c87cfcc8de 3D View: make text overlay optional 2018-06-01 08:26:55 +02:00
Campbell Barton
995fa1f4c0 UI: new tool properties space type
This currently shows panels that were in the 2.79 3D view toolbar
which are now popovers.

In some cases it's useful for these to stay open.
This commit adds a space type to do this.

Note this is currently empty in object mode.
2018-05-31 21:45:26 +02:00
Clément Foucault
bf4ce5755f Overlay: Add Wireframe overlay.
This overlay is showing mesh topology. It is usable with transparency
even if the mesh order can mess up with the expected result (some object
more prominent than others).

Edge thickness and alpha values are hardcoded for now but can easily be
added to theme or object settings.
2018-05-31 19:09:20 +02:00
Campbell Barton
8d53e8cd02 UI: hide user preferences from space menu
See T54744
2018-05-31 16:46:24 +02:00
Pablo Vazquez
0b396bc15b Minor tweaks to labels 2018-05-31 16:05:47 +02:00
Campbell Barton
d41bf6b8e8 Edit last commit
Better check if the property is set in case others want to use this
property w/o SKIP_SAVE set.
2018-05-31 12:54:44 +02:00
Campbell Barton
46508430f8 Fix tool-system re-using last space type
Even though the regression is somehow caused by 03a80facfc781
this value shouldn't be reused so apply an unrelated fix.
2018-05-31 12:51:47 +02:00
Campbell Barton
16d3f4db4c Tool System: optionally cycle tools in a group
Add the ability for key bindings to set a tool-group,
which cycles to the next tool when the tool is already active.
2018-05-30 22:17:37 +02:00
Jeroen Bakker
f5f25b843e Removed Object color from workbench. Added Highlights to FLAT shading. 2018-05-30 20:34:29 +02:00
Jeroen Bakker
eb0fcd4574 Generic Viewport Panel for Materials
Is enabled for all render engines as workbench will be rendering
SOLID/Texture modes and uses these settings.
2018-05-30 19:57:51 +02:00
Campbell Barton
85ce4d957c UI: use split property layout for some panels
Object, render, scene properties now use split-property layout,
also cycles interface.

Patch by @billreynish w/ minor edits.
2018-05-30 18:00:11 +02:00
Campbell Barton
375c1eab65 Cleanup: RNA naming, use highlight as suffux
This is whats done already elsewhere.
2018-05-30 15:33:05 +02:00
Jeroen Bakker
acaf46db0e Workbench: Specular Highlights
Added specular highlights for:
 - Solid studio shading
 - Texture studio shading
2018-05-30 14:42:07 +02:00
Clément Foucault
e0e3038b1e Hair Particles: DNA: Add properties for new GPU hairs.
Hair Particles shape properties are ported from cycles. Thoses properties
have the same defaults and have a do_version of their own. Cycles will use
theses properties instead of its custom ones.

Some realtime engine specific settings are also added to scene->r because
it's much easier to control as global values.

Bumping Version number so cycles can do its own do_version on top of the
default settings.
2018-05-30 12:25:20 +02:00
Campbell Barton
e9cd2fb23b Keymap: partially implement changes from T55162
- Use Tab key for search.
- Number keys switch modes.
- The number of the current mode can open a submode menu
  (currently only works for edit-mode)
- Ctrl-Tab, Ctrl-Shift-Tab - cycle workspaces.
2018-05-29 17:52:27 +02:00
Jeroen Bakker
f98c838b71 EEVEE: LookDev reversed the background fadeout 2018-05-29 16:22:53 +02:00
Howard Trickey
44b99d1052 For 2.8, bring back debug mode indices display. 2018-05-29 09:31:00 -04:00
Campbell Barton
756b70c6c3 UI: Expand space sub-types into the menu
Initial support for expanding editors, see: T54744
2018-05-29 12:15:26 +02:00
Jeroen Bakker
643259415d EEVEE: LookDev fade out background option 2018-05-29 12:06:48 +02:00
Jeroen Bakker
a0b08e7b66 EEVEE: LookDev use_scene_light draw option
Scene lights are rendered when
 - v3d is not available
 - or shading type is other then OB_MATERIAL
 - or shading type is OB_MATERIAL and use_scene_light is true
2018-05-29 11:01:25 +02:00
Jeroen Bakker
77e32e8819 EEVEE: LookDev overlays enabling
The mirror ball and diffuse ball are only rendered when overlays are
turned on and the lookdev overlay is turned on.
2018-05-29 09:08:32 +02:00
Dalai Felinto
66577c8732 Rename EEVEE visibility group > collection
I think we should rename the DNA as well, and break the 0.01 files using this feature.
But I will leave this decision to Clement.
2018-05-28 21:27:00 +02:00
Campbell Barton
98d4d4ce58 Tool System: workaround psys cursor conflict
This needs to be solved properly, for now add cursor-click tool
which can co-exist w/ particle paint.
2018-05-28 18:16:01 +02:00
Jeroen Bakker
765fd29d68 EEvEE: LookDev 2018-05-28 17:07:39 +02:00
Campbell Barton
9a74b60367 Merge branch 'master' into blender2.8 2018-05-27 11:06:29 +02:00
Lukas Stockner
48155c210a Cycles: Add Support for IES files as textures for light strength
This patch adds support for IES files, a file format that is commonly used to store the directional intensity distribution of light sources.
The new IES node is supposed to be plugged into the Strength input of the Emission node of the lamp.

Since people generating IES files do not really seem to care about the standard, the parser is flexible enough to accept all test files I have tried.
Some common weirdnesses are distributing values over multiple lines that should go into one line, using commas instead of spaces as delimiters and adding various useless stuff at the end of the file.

The user interface of the node is similar to the script node, the user can either select an internal Text or load a file.
Internally, IES files are handled similar to Image textures: They are stored in slots by the LightManager and each unique IES is assigned to one slot.

The local coordinate system of the lamp is used, so that the direction of the light can be changed. For UI reasons, it's usually best to add an area light,
rotate it and then change its type, since especially the point light does not immediately show its local coordinate system in the viewport.

Reviewers: #cycles, dingto, sergey, brecht

Reviewed By: #cycles, dingto, brecht

Subscribers: OgDEV, crazyrobinhood, secundar, cardboard, pisuke, intrah, swerner, micah_denn, harvester, gottfried, disnel, campbellbarton, duarteframos, Lapineige, brecht, juicyfruit, dingto, marek, rickyblender, bliblubli, lockal, sergey

Differential Revision: https://developer.blender.org/D1543
2018-05-27 01:24:57 +02:00
Campbell Barton
0d559a6730 RNA: follow boolean naming conventions 2018-05-26 11:54:25 +02:00
Campbell Barton
3e3f6754b4 Cleanup: rename RNA property to match UI 2018-05-26 09:51:21 +02:00
Diego Gangl
4dee702332 Add number and memory size formatting throughout the UI
This commit adds number formatting (thousands separator) to the baking panel. It also adds a new function to format memory sizes (KB/GB/etc) and applies it to the baking panel and scene stats. The new function is unit tested.

Reviewers: Severin
Tags: #user_interface
Differential Revision: https://developer.blender.org/D1248
2018-05-25 22:41:49 +02:00
Campbell Barton
a3a069f493 Tool System: cursor tool now transforms on drag 2018-05-25 19:43:23 +02:00
Pablo Vazquez
1bf2a7709f Timeline: Move Keying settings from sidebar to header as popover
Having them on the sidebar means we have to expand the editor every time.
2018-05-25 17:02:56 +02:00
Joshua Leung
dd22080b9a Fix: X-Axis Mirror option was missing from the Pose Options popover
Although it's mostly a rigging option, sometimes it's useful to have it when posing.
2018-05-25 15:34:25 +02:00
Campbell Barton
8a78a53e3b Keymap: place cursor on press
Needed for tablet users.
2018-05-25 12:46:52 +02:00
Campbell Barton
f04cadd83e UI: Move Split into Mesh Menu
This doesn't just apply to faces.
2018-05-25 08:31:26 +02:00
Campbell Barton
51b2622814 UI: move copy/paste into the object menu
We already have per mode copy/paste in mode specific menus.
2018-05-25 08:20:19 +02:00
Campbell Barton
b611cecf4e UI: Specials menu update
- Name "Context Menu".
- Make it more context sensitive.
- Remove some more obscure items.

Patch from @billreynish
2018-05-25 08:20:19 +02:00
Campbell Barton
302fea6b61 Change defaults
- Vertex/Edge Slide: Correct UV's = ON
- Extrude Along Normals: Even Thickness = ON
- Laplacian Smooth: Lambda Factor = 1.0
- UV/Image Editor: Normalized Coordinates = ON
- Render Image: Dithering = 1
- Image Sequence Auto Refresh = ON

See T54943
2018-05-24 21:33:39 +02:00
Campbell Barton
b04b933acf UI: use icons in render menu 2018-05-24 18:43:16 +02:00
Campbell Barton
8ea4539542 UI: View menu area operators now in submenu 2018-05-24 18:35:19 +02:00
Campbell Barton
12b261be41 UI: disable view context w/ OpenGL anim render
The 3D view menu can GL render from a single view
2018-05-24 18:16:06 +02:00
Campbell Barton
1cf17b257d UI: remove render panel, move operators to menu 2018-05-24 18:10:57 +02:00
Campbell Barton
132cda3925 Revert "UI: remove 'Render' top level menu"
This reverts commit 10e43c0aef38647d8904e758e36261c9ac0b6460.

After discussion, it's useful to have render menu
for more obscure render options.
2018-05-24 18:10:57 +02:00
Campbell Barton
72f4bdf604 UI: add top-level 'Edit' menu
Use this for undo/redo, copy/paste & preferences.
2018-05-24 16:48:28 +02:00
Lukas Stockner
5505ba8d47 Cycles/Eevee: Implement disk and ellipse shapes for area lamps
The implementation is pretty straightforward.

In Cycles, sampling the shapes is currently done w.r.t. area instead of solid angle.

There is a paper on solid angle sampling for disks [1], but the described algorithm is based on
simply sampling the enclosing square and rejecting samples outside of the disk, which is not exactly
great for Cycles' RNG (we'd need to setup a LCG for the repeated sampling) and for GPU divergence.

Even worse, the algorithm is only defined for disks. For ellipses, the basic idea still works, but a
way to analytically calculate the solid angle is required. This is technically possible [2], but the
calculation is extremely complex and still requires a lookup table for the Heuman Lambda function.

Therefore, I've decided to not implement that for now, we could still look into it later on.

In Eevee, the code uses the existing ltc_evaluate_disk to implement the lighting calculations.

[1]: "Solid Angle Sampling of Disk and Cylinder Lights"
[2]: "Analytical solution for the solid angle subtended at any point by an ellipse via a point source radiation vector potential"

Reviewers: sergey, brecht, fclem

Differential Revision: https://developer.blender.org/D3171
2018-05-24 16:43:47 +02:00
Campbell Barton
10e43c0aef UI: remove 'Render' top level menu
- Toggle render window is in the window menu.
- OpenGL render settings in the 3D View menu.
- Playback animation in the render panel.
2018-05-24 16:20:56 +02:00
Campbell Barton
58fadb379a Correct last commit 2018-05-24 16:09:20 +02:00
Campbell Barton
ad9278fdad UI: re-arrange 3D view menus
- Adjusted order and names for better consistency.
- Group add/edit/delete into menu sections.
- Move UV/Vertex color into 'Face Data' menu, matching 'Edge Data'.
- De-duplicate items between vertex/edge/face menu.
- Remove undo/redo menu (to be moved into 'Edit' menu).
- Remove Auto-Merge & Proportional Editing
  (already available from the 3D view).

Patch from @billreynish w/ edits
2018-05-24 16:00:11 +02:00
Julian Eisel
6f20fcd598 UI: Global "Status-bar" Area (WIP)
* Add horizontal bar at bottom of all non-temp windows, similar to the Top-bar.
* Status-bar is hidden in UI-less fullscreen mode
* Current contents are preliminary and based on T54861:
** Left: Current file-path if needed. "(Modified)" note if file was changed.
** Center: Scene statistics (like in 2.7 Info Editor).
** Right: Progress-bars and reports
* Internally managed as own "STATUSBAR" editor-type (hidden in UI).
* Like with the Top-bar, Status-bar data and SDNA writing is disabled.
* Most changes in low-level screen/area code are to support layout bounds that differ from window bounds.

Design task: T54861
Main changes approved by @brecht.
2018-05-23 22:38:25 +02:00
Germano
7b58073dc0 Fix INFO_MT_surface_add
It was a copy of `INFO_MT_curve_add` (I'm sure it was not intentional).
2018-05-23 17:27:10 -03:00
Campbell Barton
a455e35343 UI: move vertex/edge/face into header
These are frequently accessed,
so use the newly freed space to make them more prominent.
2018-05-23 15:41:04 +02:00
Jeroen Bakker
8d92873230 Workbench: See through
Unmultiplied the final color during compositing. Same as the revealage
buffer would do
Also use the DRW_STATE_ADDITION_FULL as it is aware of premultiplied
colors
2018-05-23 10:54:22 +02:00
Campbell Barton
96a7ed8a15 Tool System: store operator properties in the tool
This replaces last-used property use which wasn't reliable since
properties were not considered 'set' - causing them to be ignored.
2018-05-22 15:31:06 +02:00
Jeroen Bakker
dfe088c5d9 Workbench: SeeThrough draw option
Option to see through all meshes (transparency)

Works for OB_SOLID and OB_TEXTURED. Does not work for
V3D_SHADING_SHADOW.

TODO: Fresnel effect
2018-05-22 14:55:50 +02:00
Jeroen Bakker
ff19b527e8 Workbench: Calculate irradiance using radiance buffers 2018-05-22 14:55:50 +02:00
Germano
f99197fb2d Transform: Support mixed snap in 3d View.
Allows more than one snap mode to be enabled. So different combinations are possible.

Reviewers: campbellbarton

Reviewed By: campbellbarton

Subscribers: Christopher_Anderssarian, duarteframos

Tags: #bf_blender_2.8

Differential Revision: D3400
2018-05-22 08:58:56 -03:00
Campbell Barton
fbe73d1f31 UI: fix error for tools w/o a keymap 2018-05-21 13:08:44 +02:00
Campbell Barton
3b1b625ead UI: use spacebar for toolbar
- This allows quick, consistent toolbar access
  w/o conflicting w/ the keymap.
  Where pressing space before a key activates that operator as a tool
  instead of running immediately.
- Search can still be accessed by pressing spacebar again.
- When there is no toolbar for a space, operator search still opens.
2018-05-21 12:46:26 +02:00
Campbell Barton
698dbd6500 UI: generate dynamic keymap for popup toolbar
Set keys for tools based on the current keymap.

This keeps consistency between tools immediate execution.
2018-05-21 10:46:27 +02:00
Campbell Barton
768a152883 UI: proof of concept keymap for the popup toolbar 2018-05-20 22:39:19 +02:00
Campbell Barton
e65643b9a3 Cleanup: style
No need to use text keyword arg for labels
2018-05-19 16:25:40 +02:00
Campbell Barton
7cbf5db248 UI: don't disable snap popover in topbar
Snap settings still apply when transforming (holding Ctrl)

Also no need to prevent proportional edit menu from opening,
showing inactive is enough.
2018-05-19 16:23:54 +02:00
Campbell Barton
d3c89f50a0 UI: Use popover for toolbar popup operator
- Currently the popup closes immediately, could be made configurable.
- Support exiting popups when their submenu's are accessed.
2018-05-19 10:25:52 +02:00
Campbell Barton
671797e22e Correct last commit 2018-05-18 23:14:56 +02:00
Campbell Barton
ddebf1ea3b UI: Add menu to show the toolbar
For people who prefer to keep the toolbar hidden,
expose as a menu (currently Shift-Space).
2018-05-18 22:28:59 +02:00
Campbell Barton
a0b03d3fb2 Tool System: use classmethod for drawing
Allows the toolbar to be included in a popup.
2018-05-18 21:18:33 +02:00
17bd5c9d4b Collections and groups unification
OVERVIEW

* In 2.7 terminology, all layers and groups are now collection datablocks.
* These collections are nestable, linkable, instanceable, overrideable, ..
  which opens up new ways to set up scenes and link + override data.
* Viewport/render visibility and selectability are now a part of the collection
  and shared across all view layers and linkable.
* View layers define which subset of the scene collection hierarchy is excluded
  for each. For many workflows one view layer can be used, these are more of an
  advanced feature now.

OUTLINER

* The outliner now has a "View Layer" display mode instead of "Collections",
  which can display the collections and/or objects in the view layer.
* In this display mode, collections can be excluded with the right click menu.
  These will then be greyed out and their objects will be excluded.
* To view collections not linked to any scene, the "Blender File" display mode
  can be used, with the new filtering option to just see Colleciton datablocks.
* The outliner right click menus for collections and objects were reorganized.
* Drag and drop still needs to be improved. Like before, dragging the icon or
  text gives different results, we'll unify this later.

LINKING AND OVERRIDES

* Collections can now be linked into the scene without creating an instance,
  with the link/append operator or from the collections view in the outliner.
* Collections can get static overrides with the right click menu in the outliner,
  but this is rather unreliable and not clearly communicated at the moment.
* We still need to improve the make override operator to turn collection instances
  into collections with overrides directly in the scene.

PERFORMANCE

* We tried to make performance not worse than before and improve it in some
  cases. The main thing that's still a bit slower is multiple scenes, we have to
  change the layer syncing to only updated affected scenes.
* Collections keep a list of their parent collections for faster incremental
  updates in syncing and caching.
* View layer bases are now in a object -> base hash to avoid quadratic time
  lookups internally and in API functions like visible_get().

VERSIONING

* Compatibility with 2.7 files should be improved due to the new visibility
  controls. Of course users may not want to set up their scenes differently
  now to avoid having separate layers and groups.
* Compatibility with 2.8 is mostly there, and was tested on Eevee demo and Hero
  files. There's a few things which are know to be not quite compatible, like
  nested layer collections inside groups.
* The versioning code for 2.8 files is quite complicated, and isolated behind
  #ifdef so it can be removed at the end of the release cycle.

KNOWN ISSUES

* The G-key group operators in the 3D viewport were left mostly as is, they
  need to be modified still to fit better.
* Same for the groups panel in the object properties. This needs to be updated
  still, or perhaps replaced by something better.
* Collections must all have a unique name. Less restrictive namespacing is to
  be done later, we'll have to see how important this is as all objects within
  the collections must also have a unique name anyway.
* Full scene copy and delete scene are exactly doing the right thing yet.

Differential Revision: https://developer.blender.org/D3383

https://code.blender.org/2018/05/collections-and-groups/
2018-05-18 13:34:24 +02:00
Campbell Barton
b6a2dbbec2 Tool System: set cursors for draw & transform 2018-05-18 11:57:56 +02:00
Campbell Barton
8b9db543fd Tool System: add cursor (currently unused) 2018-05-18 07:58:37 +02:00
Campbell Barton
bffa9b8012 Cleanup: remove tool definition access function
No longer needed since names not values are compared
when checking if a tool is active.
2018-05-18 07:24:17 +02:00
Campbell Barton
b0c8d35142 Tool System: use context mode
Was using object mode in the workspace API which isn't
useful for accessing tools.
2018-05-17 20:28:14 +02:00
Campbell Barton
edf6676a77 Tool System: per space/mode tool support
This patch adds support for:

- Per space-type tools (3D view and edit).
- Per mode tools (object, edit, weight-paint .. etc).

The top-bar shows the last activated tools options, this is a design
issue with using a global topbar to show per-space settings.

See D3395
2018-05-17 15:57:33 +02:00
2e635b6500 Outliner: add ID type filter option for Blender File and Orphaned Data. 2018-05-17 14:27:59 +02:00
75321a3d24 Outliner: move filter menu to the left in header. 2018-05-17 14:27:58 +02:00
1f3143fcc7 Outliner: rename Data-Blocks to Data API, to make clear it's low level stuff. 2018-05-17 14:27:58 +02:00
Dalai Felinto
09e419fa8d Move Clay properties into scene
Per collection overrides are gone now.
2018-05-16 23:13:28 +02:00
Dalai Felinto
15c2801aac Move EEVEE properties into scene
We handle doversion for the scene properties, but not for the
view layer overrides.

Overrides will be implemented in a different way via dynamic overrides.
For now this data is completely lost.
2018-05-16 23:13:28 +02:00
Campbell Barton
f6601e2deb Tool System: pass space type when setting tool
Internal change only, needed because object mode is now in top-bar.
2018-05-16 19:04:29 +02:00
Clément Foucault
34c98e3d41 Eevee: Fix missing Ambient Occlusion node in add node menu. 2018-05-16 16:58:32 +02:00
Clément Foucault
f1a5fd90ba Shader Node Editor: Add Closure to RGB convertion node.
Patch D3205 by Kanzaki Wataru

Only implemented in Eevee for now. Collapse a closure to RGBA so we can
do NPR stuff on the resulting color.

Use an emission shader to convert the color back to a closure.

Doing this will break PBR and will kill any SSR and SSS effects the shader
the shader rely on. That said screen space refraction and ambient occlusion
are supported due to the way they are implemented.
2018-05-16 16:58:32 +02:00
Jeroen Bakker
e862bcd6c8 Workbench: World based studio lighting
Disabled shadows for now as the calculation of the light direction is
still to bogus.
2018-05-16 16:43:10 +02:00
Pablo Vazquez
2e4c1346bd Popover for snapping settings
See T55038
2018-05-16 14:23:46 +02:00
Pablo Vazquez
9bcddeca7a Popover for Pivot Point in top bar
From T55038
2018-05-16 12:03:53 +02:00
Jeroen Bakker
87cd4de3ba Workbench: Renamed Overlap to Outline
Outline is reserved for the Overlap Overlay
2018-05-15 17:03:59 +02:00
Jeroen Bakker
197af58baa Workbench: Cleaner Shadow edges own shadow 2018-05-15 15:40:12 +02:00
Joshua Leung
13dfa72f26 Add icon placeholders for all the armature ops that got recently added in the toolbar
The icon designers still need to create these, but it's better to have placeholders
so they remember to do it.
2018-05-15 13:50:52 +02:00
Joshua Leung
8021ac986a Pose Toolbar: Added Breakdowner/Push/Relax as separate tools
Currently all are stacked together, but perhaps if we don't get any other
tools in the meantime, it would make sense to have them separate.

Notes:
* No icons for now...
* There are some 2.8 bugs with the underlying operators (notably multi object)
2018-05-15 12:40:50 +02:00
Joshua Leung
95e7559bb6 Edit Armature Toolbar: Added some tools for "Shrink Fatten" (Alt-S) type bone transform tools
For fun, I tried adding some more edit armature tools to the toolbar to
check how this is all working. Icons are missing currently, but it's a
nice test.
2018-05-15 12:08:09 +02:00
Dalai Felinto
b1dae7bd6f Fix UI failing for vertex paint 2018-05-14 16:11:05 +02:00
Pablo Vazquez
e33016c77e UI Tweaks in 3D View
* Move Shading modes out of the popover
* Move Show Overlays out of the popover
* Test moving the Mode to the topbar again
* Move submode (select vertex, edge, face) to the topbar
* Remove icon from show_manipulator toggle
2018-05-14 14:00:37 +02:00
Campbell Barton
ddf308b04a EditMesh: Use tweak for extrude tool
Could too easily click to extrude without any offset.
2018-05-13 21:19:22 +02:00
Campbell Barton
dc4f94783d EditMesh: show XYZ axis for extrude
Always show normal axis since this is the most used,
even when another orientation is selected.
2018-05-13 21:15:56 +02:00
Campbell Barton
3767c01269 Fix issue w/ recent tool name use
Use the context space type, not the workspace.
Broke setting tools for the first time.
2018-05-13 18:39:15 +02:00
Campbell Barton
e7ee9cfd9e Tool System: tools are now set by name
This avoids having to store the tool definition in the operator
properties (on redraw).

Now just set the name, note this means we can't show the keymap in the
tool-tip anymore. This will eventually be shown in the status bar.
2018-05-13 10:01:56 +02:00
Campbell Barton
cee39da318 WM: Operator to set the tool by name
Needed to bind keys to tools (T55036).
2018-05-13 09:03:37 +02:00
Campbell Barton
03281c080c Cleanup: indentation 2018-05-13 08:32:47 +02:00
Campbell Barton
0414b0a0be Cleanup: add function to get class from space type 2018-05-13 08:13:13 +02:00
Campbell Barton
ece3634497 Cleanup: call toolsystem static methods directly
Note, may move these static methods into their own module.
2018-05-13 08:07:17 +02:00
Campbell Barton
1422c0650c UI: move pivot to the topbar
Pivot variables are now stored in scene toolsettings.
2018-05-12 22:04:45 +02:00
Campbell Barton
e0a561be1f UI: move snap & pet options into the topbar
See: T55038
2018-05-12 19:13:38 +02:00
Campbell Barton
67dda3611f UI: use icons for orientation types
See: T55038
2018-05-12 19:02:38 +02:00
Campbell Barton
7e74916562 UI: move GL render to view menu
This was taking valuable header room for a rarely used operator.
2018-05-12 15:02:13 +02:00
Campbell Barton
90b2e4ce28 UI: move orientation to the topbar
Move manipulator toggle to overlay popover.
2018-05-12 14:56:07 +02:00
Campbell Barton
b4010005de UI: move general mode options to right of topbar 2018-05-12 14:43:29 +02:00
Campbell Barton
bd30a6350b Cleanup: remove unused RNA variable 2018-05-11 21:57:02 +02:00
Campbell Barton
0a7736a2e9 Tool System: curve draw options 2018-05-11 20:25:01 +02:00
Campbell Barton
f3f309c7f8 Tool System: inset & shrink/fatten options 2018-05-11 20:24:06 +02:00
Campbell Barton
9df6978211 Tool System: mesh rip fill option 2018-05-11 20:22:04 +02:00
Campbell Barton
194cba8ba4 Merge branch 'master' into blender2.8 2018-05-11 20:13:07 +02:00