Commit Graph

4044 Commits

Author SHA1 Message Date
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
Campbell Barton
925e775818 EditMesh: remove duplicate rip macro
Change the fill setting in the keymap,
this allows tool access the macro with either setting.
2018-05-11 20:02:12 +02:00
Pablo Vazquez
625c2c2943 Use Light Probe icons 2018-05-11 16:02:30 +02:00
Jeroen Bakker
6d155dc462 T54983: Bone selection overlay
Bone selection overlay is only available in pose mode.
and when active overrules the selection buffer.

This is currently `tricked` by switching the draw engines, but this is
an exception. Not sure how to solve this in a better way.

After this is solved we can look at how to localize the dim effect to only the objects connected to the active armatures. Currently it dims the whole screen (including background).

@campbellbarton I added you as reviewer as it you have done a lot in the DRW_draw_select_loop

Reviewers: campbellbarton, fclem

Reviewed By: fclem

Subscribers: campbellbarton

Tags: #bf_blender_2.8, #code_quest

Maniphest Tasks: T54983

Differential Revision: https://developer.blender.org/D3241
2018-05-11 08:17:05 +02:00
Campbell Barton
3f3326af1c EditMesh: add cube interactive tool
Initial add-cube tool which uses the scale cage to resize.

The 3D cursor is currently used to project the cursor onto.

We'll likely have more orientation options in the future.
2018-05-10 20:31:10 +02:00
Joshua Leung
5df0fed47c Timeline Header Cleanup - Part 3: Consolidate options in a "Playback" popover
The "Playback" popover now combines options from several old menus
and scattered around in other places.
2018-05-10 19:28:37 +02:00
Joshua Leung
1ac0b4e2ba Timeline Header Cleanup - Part 2: Rearrange buttons (WIP)
NOTE: This is all still heavily WIP, and still requires some additional
layout engine magic to make it all nice.

* Moved current frame, and start/end frame buttons to the end
* Put playback controls in the center
* Remove other more obscure buttons (e.g. Frame menu, lock frame to frame range)

More to follow in next commit...
2018-05-10 19:28:36 +02:00
Joshua Leung
176cb0c3f8 Timeline Header Cleanup - Part 1: Move Keying Set + Autokeying Settings to Properties Region (NKEY)
Now all Keying Set and Auto Keyframing settings can be found the in NKEY
Properties Region (right-hand-side hidden tab/drawer).

This way, we have more room to display the full names of the settings,
without clogging up the timeline header.
2018-05-10 19:28:36 +02:00
03fc491048 Outliner: move filter options to popover. 2018-05-09 15:17:17 +02:00
Jeroen Bakker
d3b80c4734 T55014: Optionally: objects not cast shadows in workbench 2018-05-09 15:14:43 +02:00
Jeroen Bakker
c0667c2f35 T55008: Migrating RE-Collection data to Scene data
in Scene DNA is available in scene.display New DNA Struct DisplayData
Added RNA (scene.display).

We already have scene.display_settings which contains non viewpoert
specific color management settings. I did not merge those two.

Patch should be in line with the ideas that @brecht wrote in T55008.

As I am not in detail aware of the decisions that have been made for the override feature I want a short review if it is in line with the plans.

Reviewers: brecht, dfelinto

Reviewed By: brecht

Subscribers: brecht

Tags: #code_quest, #bf_blender_2.8

Differential Revision: https://developer.blender.org/D3290
2018-05-09 13:38:06 +02:00
Campbell Barton
aab5ac25f2 Remove Frame Server
This feature is limited (only byte PPM output, no multi-view),
only works with specific configurations.

This also causes some maintenance overhead
when testing changes to the render pipeline.
2018-05-09 12:50:26 +02:00
e6d11c6ce6 Collections: remove per collection and view layer engine overrides.
This will be handled by the new view layer override system which will
store data elsewhere, removing the code already for easier refactoring.
2018-05-08 17:46:20 +02:00
Campbell Barton
eefaec4114 Extrude Widget: Add orientation to topbar
Add extrude operator that's intended to work on the current selection
and be activated as a tool.
2018-05-07 21:40:51 +02:00
Campbell Barton
50e28092d3 Cleanup: style 2018-05-07 21:40:51 +02:00
Clément Foucault
8ab3697e21 Armature: Add new Transparent Bone overlay option.
This is half the replacement of the old wireframe mode. It's not doing any
XRay drawing at the moment.
2018-05-07 17:00:10 +02:00
Campbell Barton
c4440cf783 UI: add particle mode popovers 2018-05-07 15:01:51 +02:00
Jeroen Bakker
f09d3a7a40 Workbench: Texture Shading mode 2018-05-07 14:59:27 +02:00
Campbell Barton
dcc4b2cc25 Fix missing show_weight from overlay UI
Missed when moving settings out of the mesh.
2018-05-06 12:17:53 +02:00
Campbell Barton
466125f3d6 EditMesh: initial extrude manipulator
This manipulator is a test for mixing do/redo,
there are still some glitches that need sorting out in
transform & the undo stack.
2018-05-06 10:14:20 +02:00
1ddedfb2af 3D viewport: rename ambient to shadow intensity, default single color to 0.8. 2018-05-05 16:01:45 +02:00
6d980020ba UI: experiment to make popover buttons draw like enum menus.
Looks better for 3D viewport shading, but needs more tweaks to distinguish
it from other button types probably.
2018-05-05 15:54:43 +02:00
b365cc017a 3D Viewport: move overlay settings from collections to 3D viewport.
For some we may add per object overrides, but for most we plan to keep them
strictly per viewport settings. Display settings from the mesh still need to
be moved here, only collections were done to remove that code.
2018-05-05 15:54:43 +02:00
2094b45447 3D Viewport: make shading and overlay DNA match UI names.
We should use consistent naming between the internal code and UI whenever
possible, only reason not to is file compatibility.
2018-05-05 15:54:36 +02:00
Jeroen Bakker
a73c02a17b Workbench: Color selector when in single color mode 2018-05-04 17:26:10 +02:00
Clément Foucault
f48e53f562 Eevee: Shadows: Separate Cube and Cascade shadow maps into 2 texture array.
This mean we can now have different shadow resolutions for both.

However each shadow type keep the same size accross all lamps because of
future "real" Cube Shadowmaps limitation and to save texture sampler slots.

That said the cascade shadow resolution could (in the future) still be
changed to be adjustable per sun lamp.
2018-05-04 16:22:23 +02:00
Jeroen Bakker
3f95daa31f Workbench: Shadows
Initial review of the shard shadows in the workbench engine.

Speed optimizations like transform feedback are not implemented yet. I first want this part to be reviewed and merged.

@fclem please check the note in drw_stencil_set it was holding back nequal == 0 as by default DST.stencil_mask was set to 0. questioin is should we remove the whole check or not.

Also I am still looking for a better name (or split the enum) for DRW_STATE_STENCIL_DEPTH_FAIL_INCR_DECR_WRAP

Reviewers: fclem

Reviewed By: fclem

Tags: #code_quest

Differential Revision: https://developer.blender.org/D3198
2018-05-04 14:08:40 +02:00
Joshua Leung
20185a8681 Cleanup "Sync Mode" (i.e. Av Sync/Framedropping) stuff
* Remove the "sync_mode" dropdown from timeline header, and move it into
  the Playback menu instead.
* Remove the confusing "Frame Dropping" and "AV Sync" entries from the
  Playback menu. These were supposed to be mutually exclusive (or else,
  the "sync_mode" menu would break).
* Turn AV Sync on by default
* Commented out the Frame Dropping and Av Sync RNA Properties too.
  THere doesn't seem to be any valid reason for these to exist?
2018-05-03 18:50:53 +02:00
Campbell Barton
656d6f47b9 Fix 3D cursor being hidden on existing 2.8 files
Flip logic for the flag avoids versioning code.
2018-05-03 18:02:13 +02:00
Jeroen Bakker
2bf333b35d Workbench: studiolight 2018-05-03 15:31:03 +02:00
Jeroen Bakker
026792ffed Workbench: Show 3D Cursor Overlay 2018-05-03 10:55:28 +02:00
Clément Foucault
1ff2646d58 Eevee: Add Lamp Specular multiplier.
It's usefull in some scenario to tweak the specular intensity of a light
without modifying the diffuse contribution.

Cycles allows it via lamps material which we currently not support in Eevee.

This is a good workaround for now.
2018-05-02 18:39:53 +02:00
Jeroen Bakker
baf0547de5 Workbench: Single Color Modes
- ability to switch between Single Color, Object Color, Material Color
and Random Color
 - fixed Shading and Lighting popover
 - Renamed Solid -> Single Color
2018-05-02 12:05:40 +02:00
Campbell Barton
85dcdb87d2 UI: fix operator redo showing empty popovers
Many operators have no options,
showing a popover button with no content isn't good.
2018-05-02 11:03:03 +02:00
Campbell Barton
c052346fbf UI: move object selector into 3D view
This matches the new convention for left-handed mode selectors,
however we're still undecided on exactly how this should work.

For now test this out as a convention for all space types.
2018-05-01 22:33:10 +02:00
Campbell Barton
52f1510613 UI: move space-mode selectors before menu items
This adds a convention to have a spaces primary mode selector
positioned to at the left of the header.
2018-05-01 18:56:52 +02:00
Jeroen Bakker
43452c254e Merge branch 'blender2.8' of git.blender.org:blender into blender2.8 2018-05-01 16:28:02 +02:00
Jeroen Bakker
be88f23b83 Overlay: Enabled wireframe drawing for vertex/weight paint
This is a temp hack, so that billrey can use blender 2.8 for
drawing the icons. Hack will be phased out by T54910
2018-05-01 16:26:31 +02:00
Campbell Barton
3f4a81232a UI: expose radial gradient as option
Was a separate tool, use option so we can extend more easily.
2018-05-01 12:48:35 +02:00
Campbell Barton
f38fbc9bed UI: add weight paint sample tools
Also use unified weight.
2018-05-01 12:20:53 +02:00
Jeroen Bakker
aad0e52e38 Workbench: Shading popover
- Moved random object color and object outline to shading popover as
these are draw options.
2018-05-01 10:43:27 +02:00
Campbell Barton
b93a76fe75 Add missing tools to vertex paint 2018-04-30 21:58:35 +02:00
Campbell Barton
a44d5b59d3 UI: order edit-mesh tools
See T54885
2018-04-30 20:40:36 +02:00
Campbell Barton
de1405949a UI: show topbar brush options w/ texture paint 2018-04-30 17:06:03 +02:00
Campbell Barton
3b9554ce9d UI: share common paint panels between all modes 2018-04-30 16:59:16 +02:00
Campbell Barton
7720525873 UI: add texture paint brushes to toolbar 2018-04-30 16:43:36 +02:00
Campbell Barton
9aef2d961d UI: add weight paint brushes to toolbar 2018-04-30 16:08:15 +02:00
Jeroen Bakker
cbe57acddf Workbench: Integration VertexPaint and WeightPaint modes
- Disable VertexPaint and WeightPaint for OB_MATERIAL and OB_RENDER. Users want to see the final result
 - When in OB_SOLID, the active object should be rendered without any color. The lighting information is multiplied with the VertexPaint/WeightPaint color
 - Removed the use_shading flag from VertexPaint and WeightPaint
 - add method to check if render engine should draw without color (DRW_object_in_only_lighting_mode)

Reviewers: fclem

Tags: #code_quest

Maniphest Tasks: T54894

Differential Revision: https://developer.blender.org/D3191
2018-04-30 15:54:38 +02:00
Campbell Barton
d9f395ac39 UI: add vertex paint tools
Generalize logic to show the paintbrush as a tool so
different paint modes can use it.
2018-04-30 15:23:04 +02:00
Joshua Leung
05cf7863c3 Fix: UI layout for "Pause" button on timeline header was broken (leaving a gap)
A recent change in the UI layout code probably broke how the scale_x
for layouts was getting handled. This was leaving a large gap
(and causing layouts to pop) when trying to scrub the timeline.

This commit fixes this with a manually-found value that largely seems
to get rid of the popping problem. There's still a little jumping (1-2 px)
but it's less distracting now.
2018-04-30 15:11:43 +02:00
Campbell Barton
78f13ee46c UI: use "none" icon if loading fails
Workaround for issues w/ two column layout when icons are missing.

Also fix reloading icons when some values aren't valid.
2018-04-30 13:57:47 +02:00
Campbell Barton
005711ffef Fix sculpt ToolDef generation
With non-default sculpt brushes, tool generation could fail.
2018-04-30 13:46:01 +02:00
Campbell Barton
ea2146c3e1 Correct error in toolbar update 2018-04-30 12:46:23 +02:00
Campbell Barton
f4697b392d Tool System: change internal definitions (again)
Was using classes to define tools, however this makes it awkward to
dynamically generate them (we can do it, but its not very "Pythonic").

Move to a named tuple.
2018-04-30 12:14:46 +02:00
Jeroen Bakker
cb37080627 Topbar: Enable Vertex Paint tools
Discussed with Campbell just to use the .dummy for now.
2018-04-30 10:40:54 +02:00
Campbell Barton
4218a94b1e UI: disable top-bar tool name drawing
Makes text jump about.
2018-04-29 18:03:01 +02:00
Campbell Barton
b5985831e2 UI: show add/subtract as icons
Saves space in the topbar
2018-04-29 17:38:17 +02:00
Campbell Barton
5cdeae2105 UI: show basic sculpt options in topbar 2018-04-29 17:33:08 +02:00
Campbell Barton
60ce3275c1 UI: use sculpt icons in the toolbar 2018-04-29 17:01:10 +02:00
Campbell Barton
695326eb8f UI: remove toolbar separator between categories
Made cursor split from selection tools, giving ugly 2 column layout.
2018-04-29 16:49:24 +02:00
Campbell Barton
65d78f4695 UI: group sculpt brushes in the toolbar
All sculpt brushes are accessible from the toolbar, grouped by type
to keep the toolbar a fixed size.
2018-04-29 16:36:31 +02:00
Campbell Barton
6f544f635b UI: fix toolbar groups w/ data_blocks 2018-04-29 16:24:40 +02:00
Campbell Barton
8c4ff84ed6 UI: hide sculpt panels from toolbar
These are already available from the topbar.
2018-04-29 16:22:40 +02:00
Campbell Barton
76282a986d UI: initial dynamically generated sculpt tools
Lots more work needed, this just lists sculpt tools in the toolbar.
2018-04-29 14:31:00 +02:00
Campbell Barton
6e76a35f07 Tool System: support data-blocks in tools
Needed so tools can set the active brush.
2018-04-29 14:30:09 +02:00
Campbell Barton
f4ba7667dc UI: support tool generators (no visible change)
This allows toolbar definitions to dynamically generate tools,
needed for generating a tool list from brushes for eg.
2018-04-29 12:28:21 +02:00
e017876f78 3D View: add initial view.shading and view.overlay in RNA.
These are mostly empty still, many properties need to be renamed and moved there.
2018-04-29 09:55:47 +02:00
03957b9487 3D View: move shading and overlay settings into popovers.
* This is just moving buttons to get a bit closer to the intended design,
  better naming and layout is needed.
* Popovers currently work best when the 3D view header is at the top, with
  the most important settings nearest to the mouse. Open design question is
  if we should flip (part of) the buttons if header is at the bottom.
* Another question is if selecintg a shading mode enum should immediately
  close the popover since those are changed often, unlike the other settings
  for which it seems more convenient to keep the popover open.
2018-04-29 09:22:00 +02:00
cb53c9bc7b Fix use of removed Blender Internal properties. 2018-04-29 09:18:54 +02:00
ca7964c24b UI: fix toolbar not snapping properly with system DPI and display scale. 2018-04-28 20:50:47 +02:00
61759f3b55 Cleanup: remove code for removed Blender Internal properties. 2018-04-28 16:15:42 +02:00
Campbell Barton
a74097dc19 UI: Add icon color saturation preference
Toolbar icon saturation can now be set from the preferences,
(use 0.4 by default).
2018-04-28 13:34:52 +02:00
Campbell Barton
e1417c665d UI: split toolbar layout from button creation
Having single & multi-column checks inline were becoming unmanageable.

Use a generator to define the layout,
allows for easily adding different layouts in the future.
2018-04-28 11:42:53 +02:00
a593cc046c UI: put active tool buttons in center topbar region. 2018-04-28 10:42:58 +02:00
Campbell Barton
cfa1700792 UI: add loopcut & edge offset tools
Also fix minor layout bug.
2018-04-27 23:08:25 +02:00
Campbell Barton
c42a47d177 UI: add new transform tool that enables all widgets
Also add bevel tool.
2018-04-27 22:49:52 +02:00
Campbell Barton
e724238457 Tool System: use release_confirm for extrude 2018-04-27 20:43:41 +02:00
Campbell Barton
c4a24a7f5d Tool System: inset tool now completes on release 2018-04-27 20:38:29 +02:00
Campbell Barton
0adabe33bd UI: respect separators for row layout 2018-04-27 20:03:43 +02:00
Campbell Barton
782240636c UI: use new extrude icon and correct keymap 2018-04-27 19:16:00 +02:00
Campbell Barton
351d782286 UI: disable 3 column toolbars
They conflict a little with showing a narrow toolbar w/ text.
2018-04-27 18:20:48 +02:00
Campbell Barton
eb4c60124c UI: multi-column toolbar support 2018-04-27 18:02:45 +02:00
Antony Riakiotakis
ca66112b29 Fix missing icons in non-portable local builds.
The problem is that some local path is always returned by
bpy_resource_path. The function does not enforce a check for existence
of the path in the low level code.

Since client code may indeed not care about existence of the directory,
I leave bpy_resource_path alone and patch the python code to check for
existence. An  extra argument that enforces the check might be a better
solution, but I will be leaving this to the UI team.
2018-04-27 17:10:39 +03:00
Antony Riakiotakis
84a706a366 Minor fix, report missing instead of corrupt icon if file does not exist 2018-04-27 15:34:54 +03:00
Campbell Barton
85ea14df2f UI: support for tool settings in the top-bar
This uses the operators last used properties
to store settings to use on the next execution.
2018-04-27 14:17:12 +02:00
Campbell Barton
9504652687 UI: move tool definitions to classes
Originally it was nice to have a small list of definitions
with tools inline.

However we need to be able to define drawing functions for tools
which Python can't easily inline.

Use function for keymap definition,
support creating a function from a tuple as well
(handy for simple key-maps).
2018-04-27 13:55:04 +02:00
e01cadd657 WM: new offscreen window draw method to replace all existing methods.
For Blender 2.8 we had to be compatible with very old OpenGL versions, and
triple buffer was designed to work without offscreen rendering, by copying
the the backbuffer to a texture right before swapping. This way we could
avoid redrawing unchanged regions by copying them from this texture on the
next redraws. Triple buffer used to suffer from poor performance and driver
bugs on specific cards, so alternative draw methods remained available.

Now that we require newer OpenGL, we can have just a single draw method
that draw each region into an offscreen buffer, and then draws those to
the screen. This has some advantages:

* Poor 3D view performance when using Region Overlap should be solved now,
  since we can also cache overlapping regions in offscreen buffers.
* Page flip, anaglyph and interlace stereo drawing can be a little faster
  by avoiding a copy to an intermediate texture.
* The new 3D view drawing already writes to an offscreen buffer, which we
  can draw from directly instead of duplicating it to another buffer.
* Eventually we will be able to remove depth and stencil buffers from the
  window and save memory, though at the moment there are still some tools
  using it so it's not possible yet.
* This also fixes a bug with Eevee sampling not progressing with stereo
  drawing in the 3D viewport.

Differential Revision: https://developer.blender.org/D3061
2018-04-27 12:14:14 +02:00
Campbell Barton
868c9ac408 UI: show active tool in the topbar 2018-04-27 10:50:11 +02:00
Campbell Barton
226c757b44 UI: add darker theme color for toolbar items 2018-04-26 21:18:27 +02:00
67b014af48 Workspaces: active view layer now always comes from workspace, not scene.
Both the scene and workspace had an active view layer, and it was confusing
which settings were being used or displayed where. Now we always have one,
so there is no mismatch.

The "View Layers" tab in the properties editor is now "View Layer", no longer
showing a list of layers. Instead view layers can be added and removed with
the workspace view layer selector. They are also listed and selectable in the
outliner.

Single layer rendering uses the active view layer from the workspace.

This fixes bugs where the wrong active view layer was used, but more places
remain that are wrong and are now using the first view layer in the scene.
These are all marked with BKE_view_layer_context_active_PLACEHOLDER.
2018-04-26 17:06:14 +02:00
5876856f7b Properties: remove redundant settings from workspaces tab.
Use render settings and active view layer will be handled elsewhere.
Also change icon to not be confusing with render layers.

Probably we should get rid of the workspace tab entirely and do it in
the user preferences, but that's for later.
2018-04-26 16:37:59 +02:00
Campbell Barton
2fc5f3f378 UI: support icon reloading (F8 key) 2018-04-26 15:19:56 +02:00
Campbell Barton
05c9ddb2d6 UI: correct icon 2018-04-26 15:02:50 +02:00
Campbell Barton
b98311f847 Cleanup: avoid direct access to private class 2018-04-26 14:55:46 +02:00
Julian Eisel
35742e882f Merge branch 'master' into blender2.8 2018-04-26 14:24:41 +02:00
Philipp Oeser
d37dcc4880 Fix discontinuity in default UVs for a torus
Reported in T47489 by Simon Windmill (coolpowers) who also provided the
fix, thanx.

Reviewed by Sebastian Witt (witt)
2018-04-26 11:18:59 +02:00
Jeroen Bakker
ba9b01d3c0 Merge branch 'blender2.8-workbench' into blender2.8 2018-04-26 08:47:28 +02:00
Jeroen Bakker
6c608b2f8a Workbench: Environment Light
- Changed defaults
 - Updated render panel
2018-04-26 08:31:14 +02:00
Campbell Barton
4afbbb8cf9 UI: correct toolbar w/ text display
Missed in tuple to dict refactor.
2018-04-26 08:18:41 +02:00
Campbell Barton
f7d9db5e68 Missed last commit 2018-04-26 08:10:52 +02:00
Campbell Barton
52454f1290 UI: fix toolbar naming collision bug
Active tool name needed to be unique from all other tools.
This caused problems since different modes have different tools with the
same name (Armature/Mesh click to extrude for eg).

Tool names now only need to be unique per mode.
2018-04-26 08:09:03 +02:00
Jeroen Bakker
e4ee23f780 Merge branch 'blender2.8' into blender2.8-workbench 2018-04-26 07:52:09 +02:00
Campbell Barton
3e2edb160f UI: update tool docstring
Also assert on invalid tool definitions.
2018-04-26 07:39:15 +02:00
Campbell Barton
37ca6ef7d8 UI: use dict for tool definitions
Using tuple was becoming too cryptic - new settings needed to be added
last and the purpose of each wasn't very clear.
2018-04-26 07:31:39 +02:00
Clément Foucault
5337f66e81 EEVEE: UI: Add missing separator. 2018-04-25 17:43:18 +02:00
Clément Foucault
d19dc5f891 EEVEE: UI: Merge the custom parallax checkbox with the panel title. 2018-04-25 17:43:18 +02:00
Jeroen Bakker
5f97331ffc Workbench: Added studio lighting to view layer 2018-04-25 15:59:15 +02:00
Campbell Barton
cdfc4c0d1d Search local before system path
This works in both cases,
where system path would return a path even when it's missing.
2018-04-25 14:13:32 +02:00
Dalai Felinto
791b9d821b Multi-View: Moving panel to render, and rename to Stereoscopy
Multi-View was never a per-viewlayer option. And now that we have viewlayer
it is better to name it in a more recognizable way:

"Stereoscopy" instad of plain "Views".
2018-04-25 12:12:43 +02:00
Jeroen Bakker
35220ccde0 Silhouette Overlap Overlay
Added Object Overlap Overlay

 - Added R32UI support to GPU_framebuffer
 - Added R32U support to draw manager
 - The overlay mode has a object data pass that will render 'needed' data to specific buffers so we can mix them together via a deferred rendering. In future will also add UV's and other data
 - Overlap is implemented as an overlay so it could be used on top of the Scene lighted Solid mode (that will be rendered by Eevee.

Reviewers: fclem, brecht

Reviewed By: fclem

Subscribers: sergey

Tags: #code_quest

Maniphest Tasks: T54726

Differential Revision: https://developer.blender.org/D3174
2018-04-25 11:09:49 +02:00
Campbell Barton
4d6cdb8b89 UI: add extrude icon 2018-04-25 09:21:49 +02:00
Campbell Barton
deb98cfe5a UI: show all pain mode panels in the topbar
This shows some which need to be hidden (eventually).
2018-04-25 08:20:01 +02:00
Campbell Barton
ca49a9edce UI: move mode options to the topbar
Remove toolbar panels which have items available in menus.
2018-04-25 08:16:21 +02:00
Campbell Barton
b00d971efe UI: Apply remove redo region
This was a disabled part of the top-bar merge (code by @Severin)

The only change made is to move to redo UI into a popover.
2018-04-25 07:55:50 +02:00
Campbell Barton
e944e215bf UI: remove history & object tools
Add object shading menu.
2018-04-25 07:25:08 +02:00
Campbell Barton
6a9d215ad5 UI: remove mesh panel 2018-04-25 07:12:34 +02:00
Campbell Barton
64e3051ebe UI: remove shading & uv's panel 2018-04-24 21:07:05 +02:00
Campbell Barton
987fc30959 UI: disable grease pencil panel
Disable poll functions since branch replaces this code.
2018-04-24 21:05:24 +02:00
Campbell Barton
1a8b24e1b1 UI: move rigid body physics to menu 2018-04-24 20:46:18 +02:00
Campbell Barton
f3692c6ab9 UI: remove animation panel 2018-04-24 20:37:37 +02:00
Campbell Barton
34d6b48c47 UI: remove relations panel 2018-04-24 19:54:22 +02:00
Campbell Barton
5d3f1d1f78 UI: remove transform panels 2018-04-24 19:35:11 +02:00
Joshua Leung
ef08e77a46 Markers: Move "Bind Camera to Marker" from 'View' Menu to the Markers menu proper
It was always weird that this tool for markers was stored in a different
menu where it was hard to find.
2018-04-24 19:18:31 +02:00
Campbell Barton
00d4e99955 UI: move mesh-weights from panels to menus
Also de-duplicate edit/object mode menus.
2018-04-24 17:04:43 +02:00
Campbell Barton
354dbdde01 UI: hide toolbar text when narrow 2018-04-24 16:33:38 +02:00
Campbell Barton
e4724b1c8b UI: remove create panel
Move create to the menus.
2018-04-24 16:13:03 +02:00
Campbell Barton
a59bf99f1d UI: remove toolbar header 2018-04-24 16:04:07 +02:00
Campbell Barton
9c5025d67d UI: use new icons in toolbar 2018-04-24 15:32:45 +02:00
Clément Foucault
8fb9dfbec5 EEVEE: LightProbes: Add Visibility Group to DNA/RNA/UI. 2018-04-24 12:48:43 +02:00
67f23cff53 Topbar: clarify command settings name, remove placeholder button. 2018-04-24 11:35:25 +02:00
Campbell Barton
1da1288544 Check LOCAL datafiles if SYSTEM not found 2018-04-24 10:45:57 +02:00
Campbell Barton
3581b997d4 UI: use icons for the toolbar 2018-04-24 09:19:28 +02:00
Bastien Montagne
89f7fb0aef Pqrtiql fix of some operators in object.py.
They were still trying to set active object of Scene.

Select hierarchy with extend option is still not zorking for some
;ysterious reasons. :/
2018-04-23 14:26:07 +02:00
Bastien Montagne
21c250926c Cleanup some remaining LOD stuff after BGE removal. 2018-04-23 14:12:34 +02:00
Joshua Leung
3f21023f24 Fix: View All/Selected entries in new "timeline" not working
These entries were still referring to the old standalone timeline editor
2018-04-23 14:05:55 +02:00
Campbell Barton
100e10e4b0 WM: use last_redo operator
Was showing operators that weren't meant to display in the UI.
2018-04-23 12:36:20 +02:00
Joshua Leung
cd289f6ea5 UI Tweak: Bring Graph Editor's mode selector left of the menus, as is now done for Dopesheet 2018-04-23 12:01:59 +02:00
Dalai Felinto
387bf726ac UI: Editor outline color themable
Note: Not bothering with doversion, re-using 280, 10 bump.
2018-04-22 22:55:18 +02:00
15ca90489f UI: make button roundness themeable. 2018-04-22 21:47:51 +02:00
Campbell Barton
e6d1fb87c6 UI: Initial popover support for panels
- UILayout.popover(.. panel_type ..)
  A single panel
- UILayout.popover_group(.. panel categories ..)
  Expands all panels matching args.

Currently used in the topbar for redo and paint options.
2018-04-22 17:45:14 +02:00
Campbell Barton
5eb20bd152 Cleanup: style 2018-04-22 09:09:28 +02:00
0f2b4cb68a Topbar: remove info editor menus, rename topbar menus for script compatibility.
We can still rename them later, but avoid breaking stuff for now.
2018-04-21 12:43:27 +02:00
e89fefdc69 Topbar: visual tweaks
* Make bottom half of topbar a bit higher
* Make tabs higher and put them closer together
* Remove screen layouts dropdown, we'll have one layout per window
* Hide action zones from topbar
* Don't change topbar background color when activating
2018-04-21 12:41:20 +02:00
Campbell Barton
e9d940ca2f Fix topbar UI w/ no active object 2018-04-20 23:08:08 +02:00
Joshua Leung
5374865523 Dopesheet-Timeline: Removal of Timeline Editor!
This commit removes all references to the old timeline editor.

Unfortuantely, the removal of the Timeline spacetype defining
functions has ended up breaking the version patching code I'd
been working on earlier (as now, the editor gets marked as
"unknown/info" before we get a chance to patch it!)
2018-04-20 18:55:56 +02:00
Joshua Leung
0f77060ebc Move the set start/end frame operators from Timeline to Animation module
Eventually the idea is that they'll get remapped to some more global/generic hotkey
that can get used across all animation editors (see T54728). However, to facilitate
the removal of the timeline editor, it's better we do this now.
2018-04-20 18:54:41 +02:00
Joshua Leung
cc06e0fbe8 Dopesheet-Timeline: First steps towards making the Timeline a mode of the DopeSheet Editor
For many years, animators have been requesting the ability to edit keyframes in the
timeline. However, implementing such tools in the timeline quickly becomes a slippery
slope, where we'll eventually end up having to duplicate all the functionality from the
dopesheet editor.

Discussing with William and Pablo this morning, we realised that perhaps it might be possible
to just make the Timeline a mode of the Dopesheet Editor (and kill off the old standalone
Timeline), meaning that we essentially get all the Dopesheet Editor goodness for free!
Also, with some proposed UI updates (i.e. allowing "submodes" of editors to be part of the
the main editors selector), it might not even matter that there isn't an "actual" timeline
editor anymore.

This commit implements the following changes (which are actually sufficient for supporting
most basic workflows):
* Timeline mode in Dopesheet Editor
* Tweaks to UI code to make the Timeline header/menus show up in Dopesheet editor

TODO:
* Hide channels list when switching to timeline mode
* Port over cache-file indicators
* Add missing timeline-only settings that need a new home in the dopesheet
* Go through fixing all timeline editor operators (e.g. Bind to camera)
* Port over start/end frame shading (and adjust preview range rendering to make the
  distinction between these clear)
* Remove old timeline editor, and transfer over any leftover code
2018-04-20 18:54:40 +02:00
Clément Foucault
be307d6032 Eevee: TAA Reprojection: Add layer property. 2018-04-20 18:29:33 +02:00
Julian Eisel
5f6c45498c UI: New Global Top-Bar (WIP)
== Main Features/Changes for Users

* Add horizontal bar at top of all non-temp windows, consisting out of two horizontal sub-bars.
* Upper sub-bar contains global menus (File, Render, etc.), tabs for workspaces and scene selector.
* Lower sub-bar contains object mode selector, screen-layout and render-layer selector. Later operator and/or tool settings will be placed here.
* Individual sections of the topbar are individually scrollable.
* Workspace tabs can be double- or ctrl-clicked for renaming and contain 'x' icon for deleting.
* Top-bar should scale nicely with DPI.
* The lower half of the top-bar can be hided by dragging the lower top-bar edge up. Better hiding options are planned (e.g. hide in fullscreen modes).
* Info editors at the top of the window and using the full window width with be replaced by the top-bar.
* In fullscreen modes, no more info editor is added on top, the top-bar replaces it.

== Technical Features/Changes

* Adds initial support for global areas

  A global area is part of the window, not part of the regular screen-layout.
  I've added a macro iterator to iterate over both, global and screen-layout level areas. When iterating over areas, from now on developers should always consider if they have to include global areas.
* Adds a TOPBAR editor type

  The editor type is hidden in the UI editor type menu.
* Adds a variation of the ID template to display IDs as tab buttons (template_ID_tabs in BPY)
* Does various changes to RNA button creation code to improve their appearance in the horizontal top-bar.
* Adds support for dynamically sized regions. That is, regions that scale automatically to the layout bounds.

  The code for this is currently a big hack (it's based on drawing the UI multiple times). This should definitely be improved.
* Adds a template for displaying operator properties optimized for the top-bar. This will probably change a lot still and is in fact disabled in code.

Since the final top-bar design depends a lot on other 2.8 designs (mainly tool-system and workspaces), we decided to not show the operator or tool settings in the top-bar for now. That means most of the lower sub-bar is empty for the time being.

NOTE: Top-bar or global area data is not written to files or SDNA. They are simply added to the window when opening Blender or reading a file. This allows us doing changes to the top-bar without having to care for compatibility.

== ToDo's

It's a bit hard to predict all the ToDo's here are the known main ones:
* Add options for the new active-tool system and for operator redo to the topbar.
* Automatically hide the top-bar in fullscreen modes.
* General visual polish.
* Top-bar drag & drop support (WIP in temp-tab_drag_drop).
* Improve dynamic regions (should also fix some layout glitches).
* Make internal terminology consistent.
* Enable topbar file writing once design is more advanced.
* Address TODO's and XXX's in code :)

Thanks @brecht for the review! And @sergey for the complaining ;)

Differential Revision: D2758
2018-04-20 17:14:52 +02:00
Campbell Barton
b95df9957d UI: move manipulator to tool-system
Current manipulator now follows active tool.
2018-04-20 15:59:42 +02:00
Jeroen Bakker
c7d3eb2a7e Workbench: Draw random object colors
Basic implementation hashes the ob->id.name. In the future we should use
an golden ratio offset algorithm as it can make a better random
palettte.
2018-04-20 14:38:55 +02:00
Jeroen Bakker
6f61983da3 Merge branch 'blender2.8' into blender2.8-workbench 2018-04-20 12:49:02 +02:00
Jeroen Bakker
cc0c971f84 Workbench: Added the basics for the OverlayMode
Implemented the face orientation overlay for testing.
Overlay mode is only drawn when there are overlays to be rendered.
The overlay mode is rendered before the object mode.
2018-04-20 10:45:46 +02:00
Campbell Barton
36773e35f6 Remove Armature Sketching & Retarget
While the feature is interesting, it's not much from what we can tell.

Retargeting is an important feature but needs
to fit in better with typical animation work-flows.

See: T52809
2018-04-20 10:34:48 +02:00
Ton Roosendaal
51b796ff15 Remove Blender Internal and legacy viewport from Blender 2.8.
Brecht authored this commit, but he gave me the honours to actually
do it. Here it goes; Blender Internal. Bye bye, you did great!

* Point density, voxel data, ocean, environment map textures were removed,
  as these only worked within BI rendering. Note that the ocean modifier
  and the Cycles point density shader node continue to work.
* Dynamic paint using material shading was removed, as this only worked
  with BI. If we ever wanted to support this again probably it should go
  through the baking API.
* GPU shader export through the Python API was removed. This only worked
  for the old BI GLSL shaders, which no longer exists. Doing something
  similar for Eevee would be significantly more complicated because it
  uses a lot of multiplass rendering and logic outside the shader, it's
  probably impractical.
* Collada material import / export code is mostly gone, as it only worked
  for BI materials. We need to add Cycles / Eevee material support at some
  point.
* The mesh noise operator was removed since it only worked with BI
  material texture slots. A displacement modifier can be used instead.
* The delete texture paint slot operator was removed since it only worked
  for BI material texture slots. Could be added back with node support.

* Not all legacy viewport features are supported in the new viewport, but
  their code was removed. If we need to bring anything back we can look at
  older git revisions.
* There is some legacy viewport code that I could not remove yet, and some
  that I probably missed.
* Shader node execution code was left mostly intact, even though it is not
  used anywhere now. We may eventually use this to replace the texture
  nodes with Cycles / Eevee shader nodes.

* The Cycles Bake panel now includes settings for baking multires normal
  and displacement maps. The underlying code needs to be merged properly,
  and we plan to add back support for multires AO baking and add support
  to Cycles baking for features like vertex color, displacement, and other
  missing baking features.

* This commit removes DNA and the Python API for BI material, lamp, world
  and scene settings. This breaks a lot of addons.
* There is more DNA that can be removed or renamed, where Cycles or Eevee
  are reusing some old BI properties but the names are not really correct
  anymore.
* Texture slots for materials, lamps and world were removed. They remain
  for brushes, particles and freestyle linestyles.
* 'BLENDER_RENDER' remains in the COMPAT_ENGINES of UI panels. Cycles and
  other renderers use this to find all panels to show, minus a few panels
  that they have their own replacement for.
2018-04-19 17:35:25 +02:00
Jeroen Bakker
733fd3eabd Workbench: removed per collection object color
Will be part of the collection manager where per collection the
ob->col can be set. This currently depends on DepsGraph +
CollectionManager.

I removed it for now so the code won't influence development
2018-04-19 15:22:30 +02:00
Campbell Barton
9d6a175756 Merge branch 'master' into blender2.8 2018-04-19 12:53:21 +02:00
Jeroen Bakker
b0d5e74fcc Workbench: drawtype object color from collection to v3d
Now every 3d view can have its own solid draw color setting
2018-04-19 12:44:37 +02:00
Sergey Sharybin
63225d7c8b Port particle instance modifier changes from Gooseberry branch
The work is mainly from Lukas Toenne, with some modifications from myself.

Includes following obvious changes:

- Particle system selection is now name-based, with lookup menu.
- Lots of new options to control varieties.

Changes comparing to the Gooseberry branch:

- Default values and versioning code ensures same behavior as the
  old modifier.

- Custom data layers are coming from vertex color, the modifier
  does not create arbitrary layers now. The hope is to keep data
  more manageable, and maybe make it easier to select in the shader
  later on.

  This means, values are quantized to 256 values, but it should be
  enough to get varieties in practice.

Reviewers: brecht, campbellbarton

Reviewed By: brecht

Subscribers: eyecandy

Differential Revision: https://developer.blender.org/D3157
2018-04-19 10:51:18 +02:00
1802c6e4a1 Fix use of missing properties in UI after game engine removal. 2018-04-19 10:32:39 +02:00
Jeroen Bakker
16fac020e0 Workbench: Option to use Object color
- added `object_color_type` where the user can set if the collection
determines the color, or the object will be used for the color.
Implemented it as an enum as later this can have a random color option.
- moved OB_LIGHTING_* to DNA_view3d_types and renamed it.
- Fixed some DRY in workbench_materials.c. Can remove more DRY's but
will need to discuss the responsibility of the workbench engine as it
might become part of the eevee renderer.
2018-04-19 09:45:52 +02:00
f9cf2e2f6c Workspaces: remove workspace engine, use 3D viewport draw mode instead.
ViewRender was removed, which means we can't get the render engine for files
saved in 2.8. We assume that any files saved in 2.8 were intended to use Eevee
and set the engine to that.

A fix included with this is that .blend thumbails now draw with Clay mode,
and never Eevee or Cycles. These were drawn with solid mode in 2.7, and should
be very fast and not e.g. load heavy image textures.

Differential Revision: https://developer.blender.org/D3156
2018-04-18 16:35:38 +02:00
15850a8740 Workbench: don't change to workbench drawtype for files saved in 2.8.
Assume files saved in 2.8 were intended for Eevee and set them to material
viewport shading. In Eevee this is equal to rendered draw mode, in Cycles
this will draw with Eevee. This way Eevee demo files still show something
interesting when opened.
2018-04-18 16:35:38 +02:00
Campbell Barton
7d055da327 Move transform orientation to scene
This was stored in the workspace, selected from the view.
Move both to scene since custom orientations are closely related to your
scene data.
2018-04-18 09:16:15 +02:00
Jeroen Bakker
3f762dd764 Workbench: clean up the viewport shading code
- added the drawtype_solid, drawtype_wireframe, drawtype_texture to
View3D
- enabled workbench panels for important render engines
- merged workbench_materials to solid_flat_mode. All draw modes will get
its own fast implementation in the workbench
2018-04-17 22:11:56 +02:00
Bastien Montagne
49f7ca3b9d Add overridable control to 'edit' feature of custom props. 2018-04-17 18:07:08 +02:00
Dalai Felinto
fb24813d64 Remove game properties in image editor
The following properties were used by the Blender Game Engine and no longer
need to be around:

* Animated
* Tiles
* Clamp
* Mapping
2018-04-17 17:51:28 +02:00
Dalai Felinto
159806140f Removing Blender Game Engine from Blender 2.8
Folders removed entirely:
* //extern/recastnavigation
* //intern/decklink
* //intern/moto
* //source/blender/editors/space_logic
* //source/blenderplayer
* //source/gameengine

This includes DNA data and any reference to the BGE code in Blender itself.
We are bumping the subversion.

Pending tasks:
* Tile/clamp code in image editor draw code.
* Viewport drawing code (so much of this will go away because of BI removal
  that we can wait until then to remove this.
2018-04-17 17:51:28 +02:00
Jeroen Bakker
d26b7592b8 Workbench: Switching Draw engines based on draw mode 2018-04-17 16:34:41 +02:00
Jeroen Bakker
410810d42f Workbench: Added Object Color to collection_properties 2018-04-16 15:01:31 +02:00
7b9fb32591 Python API: remove preview/render resolution settings from API functions.
For correct results these must have been set already when the depsgraph was
created and evaluated, so all dependencies have appropriate resolutions too.

For particle we no longer backup and restore the viewport particles to avoid
overwriting them during render, as copy-on-write solves this for us. Even
without COW particles seem to work ok.

This also removes the particle simplification options based on camera. This
was never used much and only available in Blender Internal.

Differential Revision: https://developer.blender.org/D3148
2018-04-13 14:38:59 +02:00
Bastien Montagne
07fc6c9224 Merge branch 'master' into blender2.8 2018-04-13 12:19:31 +02:00
Bastien Montagne
332846b188 Remove editor type selector from File Browser when in 'Operator' mode.
Having that one when opening a file or loading some lib makes absolutely
no sense, and switching that 'temp' editor to some other type can
trigger all kind of funny bugs...

Note that using the shortcuts keys (Shift-F5 etc.) is still possible,
removing those seems a bit more involved. :/
2018-04-13 12:14:50 +02:00
Sergey Sharybin
6962119e7f Merge branch 'master' into blender2.8 2018-04-10 12:00:10 +02:00
Mai Lavelle
c0ac908fe8 Fix crash when no object is active
Could happen when deleting the active object or opening an old file
2018-04-09 22:03:33 -04:00
Campbell Barton
ec91948dd7 Cleanup: unused variable 2018-04-09 19:01:49 +02:00
Sybren A. Stüvel
c1a2f973da Merge branch 'master' into blender2.8 2018-04-09 15:44:28 +02:00
Sybren A. Stüvel
7e39d151d8 Added support for the WEBM/VP9 video codec
WEBM is the codec name, and VP9 is the encoder (the older encoder "VP8"
is less efficient than VP9).

WEBM/VP9 and h.264 both have options to control the file size versus
compression time (e.g. fast but big, or slow and small, for the same
output quality). Since WEBM/VP9 only has three choices, I've chosen to
map those to 3 of the 9 possible choices of h.264:

- BEST → SLOWER
- GOOD → MEDIUM
- REALTIME → SUPERFAST

The VERYSLOW and ULTRAFAST options give very little extra benefit.

Reviewed by: @Severin
2018-04-09 15:27:11 +02:00
Sybren A. Stüvel
a981206fd1 Merge branch 'master' into blender2.8 2018-04-08 14:07:34 +02:00
Sybren A. Stüvel
245e01c30a Encoding panel clarifications
The encoding panel mentions "None" in a few places, which is confusing.
- "Codec: None" now reads "No Video"
- "Audio Codec: None" now reads "No Audio"
- "Output Quality: None; ..." now reads "Constant Bitrate"

When selecting "No Video" the remaining video encoding options are
hidden, making it even more explicit that there will not be video in the
output file.

The label "Codec" now reads "Video Codec" for symmetry with "Audio
Codec".
2018-04-08 13:46:29 +02:00
Campbell Barton
e0452cc5a9 Fix edit-mesh select next
Last change introduced error, return would stop looking over candidates.

D3137 by @nBurn
2018-04-07 19:54:59 +02:00
Campbell Barton
3e998b8860 Fix object mode workspace check 2018-04-06 18:31:32 +02:00
Campbell Barton
eb7b701137 Fix error where find-next missed None check
Thanks to @nBurn
2018-04-05 18:48:48 +02:00
Campbell Barton
1c24c04e60 Remove workspace object mode, reverts changes w/ 2.8
This caused too many problems syncing object modes
with multiple objects/windows/workspaces, see: D3130 for details.
2018-04-05 18:21:14 +02:00
Sybren A. Stüvel
57329304b0 Merge branch 'master' into blender2.8 2018-04-05 16:58:41 +02:00
Sybren A. Stüvel
6c3110a661 Write the scene render frame range to image/video files
This is useful to create a mapping from the frame range in the video to
frame index in the blend file.

Part of: https://developer.blender.org/D2273

Reviewed by: @campbellbarton
2018-04-05 16:50:24 +02:00
Sergey Sharybin
39585e1abc Fix undefined workspace in UI script 2018-04-04 12:33:10 +02:00
Sergey Sharybin
eaf8608ba5 Merge branch 'master' into blender2.8 2018-04-04 09:54:50 +02:00
Campbell Barton
2f723a414f BMesh: remove redundant loop in select-next-active
Thanks to @nBurn for spotting
2018-04-03 18:32:55 +02:00
Bastien Montagne
6744c34a26 Merge branch 'master' into blender2.8 2018-04-03 16:13:13 +02:00
Bastien Montagne
96f565b380 Fix T54477: Broken utf8 strings in old .blend files
Back in the days (2.4x and before), it was rather easy to get some
invalid utf-8 strings in Blender. This is totally breaking modern code,
so this commit adds a simple 'check & fix strings' operator, available
from the main File menu.
2018-04-03 16:03:11 +02:00
Campbell Barton
557db587b7 Merge branch 'master' into blender2.8 2018-04-01 11:14:09 +02:00
Campbell Barton
f48895f74a Correct accidental changes by C Logging addition
Error in 891c1cfc9a3
2018-04-01 10:23:28 +02:00
Campbell Barton
891c1cfc9a C Logging: use instead of printf for messages
- See `--log` help message for usage.
- Supports enabling categories.
- Color severity.
- Optionally logs to a file.
- Currently use to replace printf calls in wm module.

See D3120 for details.
2018-03-30 18:57:41 +02:00
Aaron Carlisle
354dfdac88 UI: Edit mode move edge data tool into a menu
UI: Edit mode move edge data tool into a menu

See also:

- D1741
- T46853

Reviewers: Severin, meta-androcto, campbellbarton

Subscribers: mont29, #user_interface

Tags: #user_interface

Differential Revision: https://developer.blender.org/D2259
2018-03-29 14:26:49 -04:00
Antonio Vazquez
0080878d67 Merge branch 'master' into blender2.8 2018-03-22 19:21:36 +01:00
Aaron Carlisle
27d9863fa5 Fix T54172: Avoid jumping panel length during playback 2018-03-22 11:42:35 -04:00
Sergey Sharybin
18e2a5df1a Merge branch 'master' into blender2.8 2018-03-22 16:41:37 +01:00
Sybren A. Stüvel
cfe43f8d1a Fix T54360: FFMPEG bitrate not editable for all codecs
The bitrate selection was hidden when a CRF mode was chosen and then
switched to a codec that doesn't support CRF.
2018-03-22 14:47:22 +01:00
Sergey Sharybin
e35f964daa Cleanup: Use more python way of checking boolean 2018-03-22 09:33:15 +01:00
Campbell Barton
69eb452622 Merge branch 'master' into blender2.8 2018-03-21 16:27:48 +01:00