Commit Graph

1179 Commits

Author SHA1 Message Date
Antonio Vazquez f24e9bb038 GPencil: Add new parameter for SMAA threshold
This parameter allows to define the threshold for SMAA algorithm.

Differential Revision: https://developer.blender.org/D7708
2020-05-12 17:48:28 +02:00
Jacques Lucke 6f985574b7 Cleanup: take includes out of 'extern "C"' blocks
Surrounding includes with an 'extern "C"' block is not necessary anymore.
Also that made it harder to add any C++ code to some headers, or include headers
that have "optional" C++ code like `MEM_guardedalloc.h`.

I tested compilation on linux and windows (and got help from @LazyDodo).
If this still breaks compilation due to some linker error, the header containing
the symbol in question is probably missing an 'extern "C"' block.

Differential Revision: https://developer.blender.org/D7653
2020-05-08 18:22:41 +02:00
Campbell Barton d4ffd1d91f Cleanup: declare values for enum types
Avoids accidents when adding/removing items from an enum.
2020-04-24 15:52:01 +10:00
Pablo Dobarro b8d9b5e331 Sculpt: Delay Viewport Updates
In Blender 2.81 we update and draw all nodes inside the view planes.
When navigating with a pen tablet after an operation that tags the whole
mesh to update (like undo or inverting the mask), this introduces some
lag as nodes are updating when they enter the view. The viewport is not
fully responsive again until all nodes have entered the view after the
operation.

This commit delays nodes updates until the view navigation stops, so the
viewport navigation is always fully responsive. This introduces some
artifacts while navigating,  so it can be disabled if you don't want to
see them.

I'm storing the update planes in the PBVH. This way I can add support
for some tools to update in real-time only the nodes inside this plane
while running the operator, like the mesh filter.

Reviewed By: jbakker

Differential Revision: https://developer.blender.org/D6269
2020-04-02 18:00:51 +02:00
Pablo Dobarro 1f745e2c72 Sculpt: Add global automasking options for all brushes
This adds the automasking options to the Sculpt Tool options in a way
that they affect all brushes. This is more convenient when working with
some of these options while switching brushes as they don't need to be
enabled/disabled per brush.
An automasking option is enabled if it is enabled in the brush or in the
sculpt options.

Reviewed By: jbakker

Differential Revision: https://developer.blender.org/D7304
2020-04-02 16:56:44 +02:00
Aaron Carlisle a921a4daad Mantaflow: remove reminents of high res smoke
It appears this slipped through the code review

Reviewed By: sebbas

Differential Revision: https://developer.blender.org/D6760
2020-03-26 16:29:08 -04:00
Dalai Felinto 2d1cce8331 Cleanup: `make format` after SortedIncludes change 2020-03-19 09:33:58 +01:00
Alexander Gavrilov 084bf7daee Weight Paint: Implement a new Lock-Relative mode.
This check box alters how weights are displayed and painted,
similar to Multi Paint, but in a different way. Specifically,
weights are presented as if all locked vertex groups were
deleted, and the remaining deform groups normalized.

The new feature is intended for use when balancing weights within
a group of bones while all others are locked. Enabling the option
presents weight as if the locked bones didn't exist, and their
weight was proportionally redistributed to the editable bones.

Conversely, the Multi-Paint feature allows balancing a group of
bones as a whole against all unselected bones, while ignoring
weight distribution within the selected group.

This mode also allows temporarily viewing non-normalized weights
as if they were normalized, without actually changing the values.

Differential Revision: https://developer.blender.org/D3837
2020-03-18 11:55:44 +03:00
Clément Foucault 7dd0be9554 EEVEE: Replace octahedron reflection probe by cubemap array
We implement cubemap array support for EEVEE's lightcache reflection probes.
This removes stretched texels and bottom hemisphere seams artifacts caused
by the octahedral projection previously used.

This introduce versioning code for the lightcache which will discard any
lightcache version that is not compatible.

Differential Revision: https://developer.blender.org/D7066
2020-03-11 17:12:16 +01:00
Brecht Van Lommel 796683db8e Cycles: add view layer setting to exclude volumes, like hair and surfaces 2020-03-11 11:25:57 +01:00
Antonio Vazquez 29f3af9527 GPencil: Refactor of Draw Engine, Vertex Paint and all internal functions
This commit is a full refactor of the grease pencil modules including Draw Engine, Modifiers, VFX, depsgraph update, improvements in operators and conversion of Sculpt and Weight paint tools to real brushes.

Also, a huge code cleanup has been done at all levels.

Thanks to @fclem for his work and yo @pepeland and @mendio for the testing and help in the development.

Differential Revision: https://developer.blender.org/D6293
2020-03-09 16:27:24 +01:00
Pablo Dobarro 38d6533f21 Sculpt Face Sets
Face Sets are the new system to control the visibility state of the mesh in sculpt and paint modes. They are designed to work in modes where brushes are the primary way of interaction and they provide much more control when working with meshes with complex shapes and overlapping surfaces.

This initial commit includes:
- Sculpt Face Sets data structures and PBVH rendering.
- Face Set overlay and opacity controls.
- Sculpt Undo support.
- Remesher reprojection support. The visibility state of the mesh is also preserved when remeshing.
- Automasking and Mesh filter support.
- Mask expand operator mode to expand Face Sets (Shift + W) and flood fill areas by connectivity (press Ctrl while expanding).
- Sculpt Mode Face Sets and Visibility API.
- Sculpt Face Sets creation and visibility management operators.
- Operator to randomize the Face Sets colors.
- Draw Face Sets brush tool to create and edit the Face Sets. Drawing on the mesh creates a new Face Set. Pressing Ctrl before drawing modifies the Face Set under the brush at the beginning of the stroke.
- Updated keymap and menu to work with Face Sets from Sculpt Mode (H to toggle visibility, Alt + H to show all, Shit + H to hide).
- Pie menu on the W key with Face common Sets operations.

Know limitations:
- Multires support. The Face Sets and Visibility API needs to be implemented for Multires.

Reviewed By: jbakker, #user_interface, Severin

Differential Revision: https://developer.blender.org/D6070
2020-03-05 21:07:20 +01:00
Campbell Barton 727d430811 Cleanup: move deprecated enum into versioning code 2020-02-25 16:50:06 +11:00
Jeroen Bakker be2bc97eba EEVEE: Render Passes
This patch adds new render passes to EEVEE. These passes include:

* Emission
* Diffuse Light
* Diffuse Color
* Glossy Light
* Glossy Color
* Environment
* Volume Scattering
* Volume Transmission
* Bloom
* Shadow

With these passes it will be possible to use EEVEE effectively for
compositing. During development we kept a close eye on how to get similar
results compared to cycles render passes there are some differences that
are related to how EEVEE works. For EEVEE we combined the passes to
`Diffuse` and `Specular`. There are no transmittance or sss passes anymore.
Cycles will be changed accordingly.

Cycles volume transmittance is added to multiple surface col passes. For
EEVEE we left the volume transmittance as a separate pass.

Known Limitations

* All materials that use alpha blending will not be rendered in the render
  passes. Other transparency modes are supported.
* More GPU memory is required to store the render passes. When rendering
  a HD image with all render passes enabled at max extra 570MB GPU memory is
  required.

Implementation Details

An overview of render passes have been described in
https://wiki.blender.org/wiki/Source/Render/EEVEE/RenderPasses

Future Developments

* In this implementation the materials are re-rendered for Diffuse/Glossy
  and Emission passes. We could use multi target rendering to improve the
  render speed.
* Other passes can be added later
* Don't render material based passes when only requesting AO or Shadow.
* Add more passes to the system. These could include Cryptomatte, AOV's, Vector,
  ObjectID, MaterialID, UV.

Reviewed By: Clément Foucault

Differential Revision: https://developer.blender.org/D6331
2020-02-21 11:13:43 +01:00
Campbell Barton 5dcb6fb22f Cleanup: unused enums 2020-02-20 12:19:55 +11:00
Clément Foucault e82827bf6e DRW: New High Quality Normal & Tangent extract
This patch adds a dedicated path to extract 16bit normals instead of packing them into 10bits/comp.
The tangents are also packed to 10bits/comp if not using the new High Quality Normal option.

Fix T61024 Degraded texture shading on dense meshes

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D6614
2020-02-19 01:57:06 +01:00
Campbell Barton f829fefe8a Cleanup: spelling 2020-02-15 15:58:06 +11:00
Campbell Barton fa5837c5e8 Cleanup: remove unused RenderData.displaymode 2020-02-15 15:24:03 +11:00
Lukas Stockner 4af74f453d Freestyle: Add option for rendering Freestyle to a separate pass
This allows for more flexibility in Compositing compared to the
hardcoded alpha-over that is currently used.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D6829
2020-02-14 00:33:50 +01:00
Bastien Montagne b841167ee3 Refactor readfile's liblink code.
Liblink specific ID type function was so far running a loop over all IDs
of relevant type, unlike almost any other 'ID-callback-like' functions
in Blender, which usually let the looping controll to calling code.

The latter approach is more convinient when one want to add generic
(i.e. type-agnostic) code, since it typically only has to change code in
one place (caller function) instead of tens of places (all the callback
functions).

This commit also changes/sanitizes a few things that had nothing to do
in main liblink code, like mesh conversion from tessfaces to polys
(which can be done in after-linking versionning code), or scenes' cycles
detection/check regarding background 'set' scenes.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D6727
2020-02-05 16:18:17 +01:00
Sergey Sharybin cbbbb9d179 Fix wrong DNA alignment on arm{el,hf} and mipsel
Technically, pointers are to be padded with followup pointer.
2020-01-22 15:34:27 +01:00
Campbell Barton 96ebdbc90f Fix deprecated DNA define checks
Also remove dead code which checked for SPACE_TIME.
2019-12-17 09:49:23 +11:00
Pablo Dobarro 448669a630 Fix T72092: Clay Strips Brush stroke crash with Brush Detail Size
Some other areas in the brush code outside sculpt mode assume that
pressure is multiplied directly on top of the initial size. This patch
calculates the pixel radius correctly using the brush size from sculpt
mode to get the dyntopo detail size.
When the new brush input system is in place, all these values will come
directly from the brush input code with all the custom curves applied
per brush, so all paint modes will have a correct brush behavior and all
this sculpt mode specific code won't be necessary.

Reviewed By: jbakker

Maniphest Tasks: T72092

Differential Revision: https://developer.blender.org/D6339
2019-12-09 16:57:39 +01:00
Campbell Barton 6ffcddc10a Tool System: experimental fallback tool support
Implement T66304 as an experimental option,
available under the preferences "Experimental" section.

- When enabled most tools in the 3D view have a gizmo.
- Dragging outside the gizmo uses the 'fallback' tool.
- The fallback tool can be changed or disabled in the tool options
  or from a pie menu (Alt-W).
2019-12-07 06:03:00 +11:00
Pablo Dobarro 9251b07720 Sculpt/Paint: Remove Unified SIZE_PRESSURE and ALPHA_PRESSURE
The relation between the pressure/size and the pressure/alpha is a
fundamental property that defines the behavior of a brush, so it does
not make sense to have it unified across all brushes. This applies both
for sculpting and painting.

Some of the new 2.82 brushes need pressure/size or pressure/alpha to be
enabled to work propely, while others don't. Users should not be
switching on and off this property manually when changing brushes if they
want to use unified size. This is also causing that some users are using
the brushes with an incorrect configuration.

Reviewed By: jbakker

Differential Revision: https://developer.blender.org/D6291
2019-11-27 17:17:46 +01:00
Jeroen Bakker 7959dcd4f6 RenderViewport: Texture Format
When doing viewport rendering the color management happens on the CPU.
This has overhead in downloading a float texture from the gpu and
performing color management on the CPU.

Based on the scene fileformat bit depth the result will be rendered to
a byte texture where the colormanagement happens on the GPU or a float
texture where the colormanagement happens on the CPU.

This is only done during `Viewport Render Animation` in other
cases a float texture is being used.

Baseline (HD render of wanderer.blend workbench engine no samples) 15.688038 s
After changes: 9.412880s

Reviewed By: fclem

Differential Revision: https://developer.blender.org/D6195
2019-11-27 15:54:15 +01:00
Campbell Barton 249f4423ee Cleanup: doxygen comments
Also correct some outdated symbol references,
add missing 'name' commands.
2019-11-25 01:51:11 +11:00
Hans Goudey ba1e9ae473 Bevel: Custom Profile and CurveProfile Widget
Custom profiles in bevel allows the profile curve to be controlled by
manually placed control points. Orientation is regularized along
groups of edges, and the 'pipe case' is updated. This commit includes
many updates to comments and changed variable names as well.

A 'cutoff' vertex mesh method is added to bevel in addition to the
existing grid fill option for replacing vertices.

The UI of the bevel modifier and tool are updated and unified.

Also, a 'CurveProfile' widget is added to BKE for defining the profile
in the interface, which may be useful in other situations.

Many thanks to Howard, my mentor for this GSoC project.

Reviewers: howardt, campbellbarton

Differential Revision: https://developer.blender.org/D5516
2019-11-20 16:25:28 -05:00
mano-wii 44d67b6dc8 Transform: Add option to exclude back facing geometry from snapping
Add new `Backface Culling` option to the snapping properties.
This option has nothing to do with the view3d display or the
workbench `Backface Culling` option.

Limitation:
- In edit mode, this option only affects snap to faces.

Maniphest Tasks: T71217

Differential Revision: https://developer.blender.org/D6155
2019-10-31 14:09:53 -03:00
Campbell Barton 16665ad753 Cleanup: remove unused viewport fx_settings 2019-10-18 19:10:25 +11:00
Dalai Felinto 0812949bbc Local Collections: Allow users to show hidden collections
Users now can turn on in a viewport collections that are temporarily
hidden (eye) in the view layer.

Design task: T61327

As for the implementation, I had to decouple the visibility in the
depsgraph from the visibility in the view layer.

Also there is a "bug" that in a way was there before which is some
operators (e.g., writing a text inside of a text object, tab into edit
mode) run regardless of the visibility of the active object. The bug was
present already (with object type visibility restriction) in 2.80 so if
we decide to tackle it, can be done separately (I have a patch for it
though P1132).

Reviewed by: brecht (thank you)

Differential Revision: D5992
2019-10-08 19:16:05 -03:00
Dalai Felinto 92736a7b75 Per-Viewport Collection Visibility
Support per-viewport collection visibility options.

Note 1: There is no way to show a collection that was not visible before
due to depsgraph. Otherwise we would risk having all the collections in
the depsgraph and I believe this is not the idea.

An alternative would be to have a new depsgraph for viewports that are
not local. Something to keep in mind if we do per-viewport current frame
in the future.

So for now what we do is to only allow collections visibility to be
disabled/hidden in this mode.

Note 2: hide_viewport (the eye icon) doesn't really matter for
depsgraph. So after the merge we can still ignore it to show the
collections locally in a viewport with no problems for the depsgraph.

Reviewers: brecht, sergey
Subscribers: billreynish

Related task: T61327
Differential Revision: https://developer.blender.org/D5611
2019-09-13 12:37:35 -03:00
Antonio Vazquez 0174185e2f GPencil: New Simplify Tint option
This is useful to disable all layers tint in one step and it will be used for future operators.
2019-09-10 17:41:23 +02:00
Campbell Barton 056bb7721e Cleanup: remove unused scene struct members 2019-09-09 22:39:58 +10:00
Charlie Jolly a94bf0e134 GPencil: Guides: Refactor and add new ISO option
+ Simplify code, move into own function and run once rather than on every point
+ Improved snapping when a stroke is between increments
+ Added ISO grid option for lines specified by Angle under guide settings
+ Radial snapping mode uses Angle as an offset

Differential Revision: https://developer.blender.org/D5668
2019-09-06 14:07:26 +01:00
Clément Foucault d8aaf25c23 Eevee: Shadow map refactor
Reviewed By: brecht

Differential Revision: http://developer.blender.org/D5659
2019-09-05 17:37:50 +02:00
Jeroen Bakker fc99297411 Fix T66950: WeightPaint Bone Selection Overlay
In weightpaint it is possible to enable the bone selection mode. During
drawing the overlay was rendered, but during selection this was ignored.
Users needed to double click in order to select bones even when the overlay
was enabled.

This patch makes bone selection possible during weight painting using the pose mode bone
selection overlay with a single click.

Reviewed By: fclem, campbellbarton

Differential Revision: https://developer.blender.org/D5629
2019-09-03 14:09:44 +02:00
Campbell Barton 69a966aca0 Transform: option to transform parent objects without children
Supports parent/child chains with mixed selections.

Currently accessible from the pivot popover
(may be moved along with the other options here).
2019-08-29 01:53:07 +10:00
mano-wii 6b189d2bcf Edit Mesh: New option "Split Edges & Faces" to "AutoMerge"
Ref T66423

Differential revision: https://developer.blender.org/D5562
2019-08-26 14:15:25 -03:00
Campbell Barton 6eadd40597 Cleanup: redundant struct declarations 2019-08-25 16:45:47 +10:00
Campbell Barton acdb14d264 Transform: option to transform origins in object mode
Currently supports mesh, armature, lattice, curve & metaballs.

Access from pivot popover.
2019-08-24 07:34:43 +10:00
mano-wii a244384864 Fix T68969: current value '0' matches no enum in 'ToolSettings', '(null)', 'snap_node_element'
I don't think a versioning solution is necessary in this case.
But it can still be implemented.
2019-08-22 09:10:46 -03:00
mano-wii 75127b6be7 Revert "Fix grid snap value in recent snapping updates"
This reverts commit 48a7f979a5.

Another solution to come.
2019-08-22 09:10:46 -03:00
Campbell Barton 48a7f979a5 Fix grid snap value in recent snapping updates
Increase the size of the snap mode so the flag can be used.
2019-08-21 11:41:40 +10:00
mano-wii daba3e871f Fix conflict with "Edge Center" snap mode
`SCE_SNAP_MODE_GRID` is used for both nodes and objects.
I don't think it's worth versioning in this case.
2019-08-20 19:35:11 -03:00
mano-wii dd08d68df8 Transform: New Snap Option: Edge Perpendicular
Part of T66420

Option for snapping to the nearest point of a reference coordinate.
The patch also adds Edge Center and Perpendicular snaps to the ruler.

{F7675906}

Reviewers: campbellbarton, brecht

Reviewed By: campbellbarton

Differential Revision: https://developer.blender.org/D5543
2019-08-20 19:18:50 -03:00
mano-wii 58341242bf Editor Transform: New Snap Option Middle
Part of T66420

Reviewers: campbellbarton, brecht

Reviewed By: campbellbarton

Differential Revision: https://developer.blender.org/D5532
2019-08-20 15:07:48 -03:00
Antonioya 85f90ed6fd Fix T68723: GPencil - Split Select mode for Sculpt and Edit mode
Actually, the selection mode is not visible in Sculpt mode when mask is enabled, but still is used.
Also, the mode is shared between Edit mode and Sculpt mode and for meshes the selector is by mode.

This commit splits the select mode in different properties and show the selector in Sculpt mode to define the Select mode. Also, the Select Mask button has been removed and now the Select Mode buttons work equal to Meshes where the select buttons are the mask enable too.

Fixed some old code not valid detected during these changes.

Differential Revision: https://developer.blender.org/D5500
2019-08-17 16:26:46 +02:00
Your Name f08662d3ed Sculpting: Remove Show Diffuse Color Option
This should have been removed in 2.80 as the functionality was removed.
This feature now does not do anything and can be removed.

Differential Revision: https://developer.blender.org/D5411
2019-08-04 11:53:48 -04:00
Campbell Barton 760dbd1cbf Cleanup: misc spelling fixes
T68035 by @luzpaz
2019-08-01 14:02:41 +10:00
Campbell Barton a08fb46700 UI: move edge-tag option from the scene into the operator
This was a very specific option to display in global tool settings.

Now this is exposed in the operator when edge-select mode is enabled.
2019-05-21 11:15:26 +10:00
Howard Trickey 43500671dc Normal UI: Remove normals toolbar and add/muliply menu options.
See T64324 for discussion re improving normal editing ui.
As next step, remove the face_strength tool settings because
menu operator now includes that. Move face_strenth enum to
better place.
Remove normals toolbar panel because only thing left
(normal_vector) can stay hidden for copy/paste.
Remove add vector and multiply vector menu entries as
they are useless without ui method for specifying operand,
and they are very low utility operations anyway.
2019-05-20 08:51:53 -04:00
Jeroen Bakker bc3139d792 Cycles/Eevee: unify depth of field settings for cameras
There is now a checkbox to enable/disable depth of field per camera. For Eevee
this replace the scene level setting. For Cycles there is now only an F-Stop
value, no longer a Radius.

Existing files are converted based on Cycles or Eevee being set in the scene.

Differential Revision: https://developer.blender.org/D4882
2019-05-17 17:59:26 +02:00
Clément Foucault 52669dda80 Eevee: Remove the Volumetric Render checkbox
This is to simplify the usage of Volumetrics.

Now it automatically detect if there is any Volumetric material in the
view and allocate the needed buffer if any.
2019-05-17 13:38:42 +02:00
Clément Foucault b526221315 Eevee: Remove the Subsurface Render checkbox
This is to simplify the usage of SSS.

Now it automatically detect if there is any SSS material in the view and
allocate the needed buffer if any.
2019-05-17 13:38:42 +02:00
Campbell Barton 2c0db07eed DNA: remove unused 'osa' member
Also correct unused flag comment, use doxy cross references.
2019-05-03 12:07:25 +10:00
Jeroen Bakker b52a0c78af Workbench,EEVEE: Viewport Render Samples
- Add `render_aa` and `viewport_aa` sampling setting for workbench. 0
   samples means no AA, 1 sample uses FXAA and more samples will use
   TAA.
   The viewport `gpu_viewport_quality` can still limit viewport anti-aliasing
   method.
 - Use TAA when rendering images. (this used to be CPU based FSAA)
 - Removed `R_OSA` related settings.

Reviewers: fclem, brecht

Maniphest Tasks: T60847

Differential Revision: https://developer.blender.org/D4773
2019-05-02 16:19:12 +02:00
Campbell Barton 5b14b56542 Cleanup: typos in comments 2019-05-02 18:25:36 +10:00
Campbell Barton 928becec60 UV Sculpt: improve tool-system integration
In 2.7x UV sculpt was a kind of sub-mode
(a toggle with it's own key-map & drawing code).

Move this to an operator that uses the tool-system,
this simplifies internal logic, especially brush selection
which now matches sculpt and other paint modes.

- Remove toggle used to enable uv sculpt.
- Expose the brush, which was already used but there was no way to
  select different brushes.
- Make UV sculpt use paint paint tool slots
  (using brushes how all other paint mode currently do).
- Move UV Sculpt keymap to the tools keymap.
- Remove Q to toggle UV sculpt mode,
  S/P/G keys to switch tools.
2019-05-01 20:32:38 +10:00
Campbell Barton 909665a0d4 ClangFormat: run with ReflowComments on source/
Prepare for enabling ReflowComments.
2019-05-01 11:13:14 +10:00
Jeroen Bakker d1f6ea2793 Sequencer: Scene Strip Performance
- Merged SEQ_OFSDRAW with V3D_OFSDRAW and define in the
       DNA_view3d_types: Due to this FSAA always kicked in making the
       rendering slow.
     - Removed `Texture Solid` and `DOF`.
     - Now when chosing Solid rendering the settings
       of the original scene is used.
     - Added a global override to use scene specific shading. In the
       Future we will need to enhanced this so user can change the
       settings.
     - Added support for LookDev. LookDev crashed as it needed the
       `evil_C` what was not set
     - LookDev mode will always show the scene + world lights.

Reviewed By: brecht, fclem

Maniphest Tasks: T62517

Differential Revision: https://developer.blender.org/D4738
2019-04-30 14:01:22 +02:00
Campbell Barton e83d4d9637 UI: reorganize proportional editing options
- Move connected & projected into individual toggles.
- Top-level proportional editing button now only toggles.
- Use popover for proportional edit-mode falloff and options.

Note that it's no longer possible to toggle connected via key bindings,
although this could be supported again if it's needed.

Resolves T58081
2019-04-30 14:48:39 +10:00
Campbell Barton e12c08e8d1 ClangFormat: apply to source, most of intern
Apply clang format as proposed in T53211.

For details on usage and instructions for migrating branches
without conflicts, see:

https://wiki.blender.org/wiki/Tools/ClangFormat
2019-04-17 06:21:24 +02:00
Campbell Barton dbc058301b Cleanup: trailing commas 2019-04-16 16:40:47 +02:00
Campbell Barton 14884cda1f Gizmo: move transform to a persistent option
Based on feedback from animators, this is useful to keep as a view
option (as in 2.7x).

Now the transform gizmos can be enabled from the popover,
the tools still work for location/scale/rotation.
The transform tool has been removed.

See T63518
2019-04-13 20:58:25 +02:00
Campbell Barton 8f5ba8e1a1 Cleanup: spaces around operators in DNA headers 2019-03-18 14:23:34 +11:00
Antonioya 6577618d5b GPencil: Changes in Fill and new 3D Cursor View Plane
This commit groups several options that were tested in grease pencil branch:

- Changes to fill algorithms and improves, specially in small areas and stroke corners.
  New options has been added in order to define how the fill is working and internally there are optimizations in detect the small areas in the extremes.

  Kudos to @charlie for coding this fill improvements.

- New 3D cursor view plane option.

  Now it's possible to lock the drawing plane to the 3D cursor and use the 3D cursor orientation. This allows more flexibility when you are drawing and reduce the need to create geometry to draw over surfaces.

- Canvas Grid now can be locked to 3D cursor.
- New option to reproject stroke using 3D cursor.
- Small tweaks and fixes.

Changes reviewed by @pepeland and @mendio
2019-03-17 19:47:56 +01:00
Campbell Barton cc5bdf0293 Cleanup: rename DEPRECATED to UNUSED
While the flags have been deprecated they're currently unused.
Rename for clarity.
2019-03-17 10:34:59 +11:00
Bastien Montagne ab0bc65c24 Refactor CDData masks, to have one mask per mesh elem type.
We already have different storages for cddata of verts, edges etc.,
'simply' do the same for the mask flags we use all around Blender code
to request some data, or limit some operation to some layers, etc.

Reason we need this is that some cddata types (like Normals) are
actually shared between verts/polys/loops, and we don’t want to generate
clnors everytime we request vnors!

As a side note, this also does final fix to T59338, which was the
trigger for this patch (need to request computed loop normals for
another mesh than evaluated one).

Reviewers: brecht, campbellbarton, sergey

Differential Revision: https://developer.blender.org/D4407
2019-03-07 11:29:50 +01:00
Campbell Barton d1f7ae29a2 Cleanup: use "_pad" prefix for pad vars 2019-02-27 22:20:29 +11:00
Campbell Barton 6a03199b50 Cleanup: use '_pad' convention for padding in all DNA structs
Avoids mixing these in with regular variables in code-completion.

Use char for pad members except for 'void *', to make size clearer.

Removed/shrink a few redundant padding vars which were >= 8 bytes.
2019-02-27 15:09:48 +11:00
Campbell Barton de13d0a80c doxygen: add newline after \file
While \file doesn't need an argument, it can't have another doxy
command after it.
2019-02-18 08:22:12 +11:00
Campbell Barton 19a703b0db Cleanup: remove unused bStats struct 2019-02-17 18:09:38 +11:00
Sergey Sharybin 6e40e3489f Add global control over disabling high-resolution smoke draw
Can be found in the viewport's simplify panel, allows to easily
disable high-res display for all the smokes in the scene.
2019-02-15 17:55:24 +01:00
Campbell Barton e1edb51699 Correct error in last commit 2019-02-08 09:41:28 +11:00
Campbell Barton 261d42cd84 Cleanup: clear deprecated flags 2019-02-08 09:31:59 +11:00
Campbell Barton eef4077f18 Cleanup: remove redundant doxygen \file argument
Move \ingroup onto same line to be more compact and
make it clear the file is in the group.
2019-02-06 15:45:22 +11:00
Campbell Barton 65ec7ec524 Cleanup: remove redundant, invalid info from headers
BF-admins agree to remove header information that isn't useful,
to reduce noise.

- BEGIN/END license blocks

  Developers should add non license comments as separate comment blocks.
  No need for separator text.

- Contributors

  This is often invalid, outdated or misleading
  especially when splitting files.

  It's more useful to git-blame to find out who has developed the code.

See P901 for script to perform these edits.
2019-02-02 01:36:28 +11:00
Campbell Barton c0f88ed8a8 Cleanup: sort forward declarations of enum & struct
Done using:
  source/tools/utils_maintenance/c_sort_blocks.py
2019-01-28 21:17:58 +11:00
Campbell Barton b8467273b8 Cleanup: redundant defines
Comment or remove unused defines.
2019-01-26 19:15:30 +11:00
Campbell Barton 5632e1b525 Cleanup: replace VSE /w Sequencer
This abbreviation isn't used anywhere else in Blender's UI.
2019-01-25 09:44:32 +11:00
Campbell Barton 88a80fcec8 Cleanup: commas at the end of enums
Without this clang-format may wrap them onto a single line.
2019-01-16 00:03:03 +11:00
Campbell Barton 328a0f975b Cleanup: comment line length (DNA)
Prevents clang-format wrapping text before comments.
2019-01-15 23:15:35 +11:00
Antonioya bb9c9d0eaa GP: New Cutter, Constraints and Segment selection
This commit groups a set of new tools that were tested in grease pencil object branch before moving to master. We decide to do all the development in a separated branch because it could break master during days or weeks before the new tools were ready to deploy.

The commit includes:

- New Cutter tool to trim strokes and help cleaning up drawings.

- New set of constraints and guides to draw different types of shapes. All the credits for this development goes to Charlie Jolly (@charlie), thanks for your help!

- Segment selection mode to select strokes between intersections.

- New operator to change strokes cap mode.

- New option to display only keyframed frames. This option is very important when fill strokes with color.

- Multiple small fixes and tweaks.

Thanks to @pepeland and @mendio for their ideas, tests, reviews and support.

Note: Still pending the final icons for Cutter in Toolbar and Segment Selection in Topbar. @billreynish could help us here?
2019-01-11 19:21:56 +01:00
Clément Foucault b98e6743dc Texture Paint: Add filtering option for texture paint overlay
The overlay should now use the texture interpolation setting in material
mode.

In image mode, there is now a new button to let the user choose the texture
filter. The option is located in the Texture Slots popover and only shows
in Image mode.
2019-01-11 16:00:23 +01:00
Brecht Van Lommel ae2af46920 Fix inconsistent naming and behavior for base visible/selected/editable.
Fixes T60251.
2019-01-08 18:50:44 +01:00
Campbell Barton 299ff7dcd1 Cleanup: corrections to last commit 2019-01-08 01:00:40 +11:00
Campbell Barton 5a43406e1b Cleanup: move DNA comments before struct members
Needed for clang-format in some cases, see: T53211
2019-01-08 00:43:00 +11:00
Brecht Van Lommel ba1cae5a04 Fix some inconsistencies in object visibility/selectability tests. 2019-01-03 15:19:32 +01:00
Campbell Barton 8fbba22205 Cleanup: rename manipulator references 2019-01-02 15:43:58 +11:00
Campbell Barton 5484ed01ad Cleanup: use '_pad' in DNA
Convention used elsewhere, has advantage pad vars don't autocomplete
with other vars beginning w/ 'p'.
2019-01-02 15:38:45 +11:00
Campbell Barton 2b3effe0ce Cleanup: rename target_weight -> weight
Match name of mesh weight paint.
2019-01-02 15:31:56 +11:00
Brecht Van Lommel 3f4e3f718f Cycles: restore old sample and material override settings for view layers.
Since there will be no view layer overrides in 2.80, this is needed still.
2018-12-28 18:59:33 +01:00
Philipp Oeser c07ae0e821 Fix T59922: crash reading files with older renderlayers
- own error in rB2c196de56bbb163048b08f321983234a5e72e804
- now introduce RE_PASSNAME_DEPRECATED placeholder for old passes
- also dont allocate NodeImageLayers for these

Reviewers: brecht

Maniphest Tasks: T59922

Differential Revision: https://developer.blender.org/D4132
2018-12-28 11:32:33 +01:00
Philipp Oeser 2c196de56b cleanup: remove unused passes
- use_pass_indirect, use_pass_specular from ViewLayer RNA
- RGBA, DIFFUSE, SPEC, REFLECT, REFRACT, INDIRECT usages from remaining
places

Reviewers: brecht

Differential Revision: https://developer.blender.org/D4117
2018-12-27 15:22:33 +01:00
Campbell Barton f7dc6a63fb Gizmo: optional custom orientations for transform
This aims to resolve a conflict where some users want to keep keyboard
axis setting global, even when the orientation is set to something else.

Move/rotate/scale can optionally each have a separate orientation.

Some UI changes will be made next.
2018-12-19 20:57:51 +11:00
Brecht Van Lommel a3e4c333b9 Transform: when snap affect is off for a transform mode, ignore snap settings entirely.
Ref D4022.
2018-12-18 12:14:38 +01:00
Campbell Barton 879c966598 Transform: option to use incremental snapping
This resolves this issue where users would enable a snapping mode
besides incremental (vertex for eg), then notice strange behavior w/
rotate and scale.
While this ability can be useful, it's quite an obscure use case.

Now changing snap-modes keeps rotate and scale using incremental snap,
with the option for these modes to be affected by other snapping modes.

D4022 by @kioku w/ own minor edits.
2018-12-18 10:08:23 +11:00
Campbell Barton d72d2d4133 DNA: clear / remove deprecated flags
- Clear deprecated flags for ID's:
  Scene, Sequence, World, Object & Mesh.
- Clear deprecated flags for Spaces: outliner, 3D view & image.
- Remove unused `Mesh.drawflag`
- Remove unused `USER_ALLWINCODECS`, `USER_MMB_PASTE`.
- Remove `V3D_SOLID_TEX` & `V3D_ZBUF_SELECT` - used in a few areas.
- Flip `Object.empty_image_visibility_flag`
  (avoids do-version on each new flag)
- Rename 'Backside' -> 'Back' in context of drawing - showing 'Back'
  makes sense.
2018-12-17 13:55:06 +11:00
Campbell Barton 9149e89421 Merge branch 'master' into blende2.8 2018-12-17 10:25:40 +11:00
Campbell Barton 98f43ba3e4 Cleanup: use bit-shifted flag definitions in DNA 2018-12-17 09:55:47 +11:00
Antonioya 351f537fa8 GP: New Curve primitive and other primitive improvements
This commit adds support for new curve tool and adds more functionalities to the existing primitives, including new handles, editing, stroke thickness curve, noise, preview of the real stroke, etc.

Thanks to @charlie for his great contribution to this improvement.
2018-12-15 17:21:47 +01:00
Sybren A. Stüvel e2d9166473 Metadata: add hostname to the available metadata options
Having the hostname allows us to identify which machine rendered which
frame in our render farm.

This simply uses the host's name, and doesn't do any DNS lookup of any
IP address of the machine. As such, it's only usable for identification
purposes, and not for reachability over a network.

Reviewers: sergey, brecht

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D4047
2018-12-07 17:29:07 +01:00
Dalai Felinto cc61b21dff Partial fix to T58917 - No valid cage
The fix itself simply is to store the cage object as a pointer instead
of a string/name.

That said baking with or without cage is yielding very different results
than in 2.7.
2018-12-07 10:44:19 -02:00
Campbell Barton 40f45a7eac Cleanup: redundant NULL checks
Also use unsigned shifting for values not in int range.
2018-12-01 19:36:57 +11:00
Clément Foucault e68c0bf76a Workbench: Add Shadow Focus and change Shadow Orientation
Shadow focus let the user choose how hard are is the shadows transition.
Harder shadow transition can be used for stylistic effects or more uniform
shading.

Make shadow orientation respect the same orientation as the studio light
(view from +Y direction aka. front view). Make the default shadow direction
more similar to the default light position (the default light object, not
the default studio lighting).
2018-11-30 15:40:57 +01:00
Brecht Van Lommel d5778b5bc1 UI: rename "OpenGL" render engine to "Workbench".
Neither is very descriptive for its task, but at least workbench is more
future proof and distinguishes it from Eevee.
2018-11-26 19:05:37 +01:00
Antonioya 99f7934e19 GP: New Blend Layers functionality
Now it's possible define the blend mode between layers including the option to clamp the layer using underlying layers.

Also a new Simplify option has been added to disable blend layers.
2018-11-26 18:12:39 +01:00
Campbell Barton f968256b42 Fix T58027: Scene.ray_cast crash
Reintroduce BASE_VISIBLE_BGMODE

D3987 by @Soundwave
2018-11-26 15:52:10 +11:00
Dalai Felinto 4c3ed98ca2 Local View
Bring back per-viewport localview. This is based on Blender 2.79.
We have a limit of 16 different local view viewports.

We are using both the numpad /, as well as the regular /.

Missing features:
* Hack to make sure lights are always visible.
* Make rendered mode with external engines to support this as well
  (probably just need to support this in the RNA iterators).
* Support over 16 viewports by taking existing viewports out of local view.

The code can use a cleanup pass in the future to unify the test to see
if an object is visible (or we can use TESTBASE in more places).
2018-11-25 09:50:34 -02:00
Dalai Felinto 9be5b2d23f Pass viewport to BASE_ related tests, for viewport view/select restrictions
Note: functions like select all are still not respecting that.
I will fix this as part of the local view commit though.
2018-11-23 15:13:14 -02:00
Antonioya 3a64d7ca48 GP: Remove Target Weight switch 2018-11-21 09:03:17 +01:00
Antonioya a4a9123c33 GP: Refactor target weight paint
Now, the target weight is defined as the final maximum value with a new property and all fields have be moved to brush struct.
2018-11-20 20:05:37 +01:00
Antonioya ec908beab3 GP: New option to paint a predefined weight
Enabling this option, the weight is set to the predefined value and not the result of the sum of the paint actions.
2018-11-20 18:12:04 +01:00
Antonioya 64920a8feb GP: Harmonize Sculpt Struct and field names
Changed the following names:

- GP_EditBrush_Data->GP_Sculpt_Data
- eGP_EditBrush_Types->eGP_Sculpt_Types
- eGP_EditBrush_Flag->eGP_Sculpt_Flag
- eGP_BrushEdit_SettingsFlag->eGP_Sculpt_SettingsFlag
- GP_BrushEdit_Settings->GP_Sculpt_Settings
- GP_EDITBRUSH_FLAG*->GP_SCULPT_FLAG*
- GP_EDITBRUSH_TYPE*->GP_SCULPT_TYPE*
- GP_BRUSHEDIT_FLAG_*->GP_SCULPT_SETT_FLAG_*
2018-11-18 19:30:20 +01:00
Clément Foucault ffa461f13c Eevee: Add Filter Quality setting
This setting can be tweaked to improve glossy reflection cubemaps.

It increases the sample count for each roughness level.
This settings affect the lookdev mode quality as well.
2018-11-15 20:04:47 +01:00
Clément Foucault 1b321048a7 Eevee: Add Glossy Reflection clamping
This enables reducing the noise comming from very bright light sources
(like a sun) that can be found in distant HDRIs.

The lost energy may be replaced manually by a sunlight that compensate the
this loss.

This clamping only concerns Reflection Cubmaps and is done on all on all
of them.

Setting to 0.0 disables it (default).
2018-11-15 20:04:47 +01:00
Clément Foucault c2164e579c Eevee: Add irradiance smoothing
This is a parameter that will make the interpolation between irradiance
cells of a same Irradiance Volume smoother, reducing the weight of the
light leaking correction factors.

It is usefull in some cases to avoid harsh lighting transition that can
happen when a sample point it near a surface.
2018-11-15 18:16:30 +01:00
Clément Foucault 516e000aa9 Eevee: Add Light Threshold value
This is an important change. Starting from now, all lights have a finite
influence radius (similar to the old sphere option for BI).

In order to avoid costly setup time, this distance is first computed
automatically based on a light threshold. The distance is computed
at the light origin and using the inverse square falloff. The setting
can be found inside the render settings panel > shadow tab.

This light threshold does not take the light shape into account an may not
suit every case. That's why we provide a per lamp override where you can
just set the cutt off distance (Light Properties Panel > Light >
Custom Distance).

The influence distance is also used as shadow far clip distance.

This influence distance does not concerns sun lights that still have a
far clip distance.

---

This change is important because it makes it possible to cull lights
an improve performance drastically in the future.
2018-11-15 18:16:30 +01:00
Campbell Barton fb70ee0bb5 Cleanup: minor gpencil changes
- Replace BKE_brush_getactive_gpencil -> BKE_paint_brush
  (no need for per-paint-type brush access).
- Rename TOT_GP_EDITBRUSH_TYPES -> GP_EDITBRUSH_TYPE_MAX
  (avoid sharing prefix w/ unrelated constants).
- Rename instances of `GP_EditBrush_Data` to 'gp_brush'
  (`Brush` is typically called 'brush').
2018-11-12 09:59:16 +11:00
Campbell Barton 1b928c2d9a Paint: add tool offset & mode to runtime data
It was getting too impractical to call BKE_paint_brush_tool_info
which needed to lookup the scene pointers.

Now each store tool offset and brush mode in 'Paint.runtime'
2018-11-05 16:18:43 +11:00
Antonioya 5cfcee8c39 GP: Reorganize Canvas Grid
Now the grid is always controlled by the topbar selector and not in the canvas panel. To have two places to define orientation was confuse.

The orientation by default (no lock) is always to view plane.
2018-11-04 13:00:37 +01:00
Campbell Barton ac8d787327 Tool System: brushes are now categorized by tool
The toolbar now shows brush types, the brush selector now
only shows brushes matching the current tool type.

Details:

- Add's Paint.tool_slots (used by the toolbar).
- Removed custom grease pencil brush tool code.
- Bumped subversion.

See T57526 for details.
2018-11-02 19:40:39 +11:00
Antonioya 1237e50c9b GP: Reorganize origin popover and top area
- Draw on back buttons moves near mode
- zDepth offset moved from View Panel to Popover
- Target for Stroke mode moved to popover
- New First point snap mode
2018-11-01 17:05:04 +01:00
Clément Foucault cde64619ca Eevee: Implement Overscan option
This option make the internal render size larger than the output size in
order to minimize screenspace effects disapearing at the render edges.

The overscan size added around the render is the maximum dimension
multiplied by the overscan percentage.
2018-10-31 18:32:54 +01:00
Clément Foucault b8331b79e6 Eevee: Implement jittered soft shadowmap
This new option is located in the shadows options in the render settings.
This approach is simple and just randomize the shadow map position (not
the lamp itself) and just let the temporal supersampling do the average of
all the shadowing. The downside is that is needs quite a large number of
samples to give smooth results and individual sample position can remain
visible.

Enabling this option will make the viewport refresh all shadow maps every
redraw so it has a serious performance impact.

This approach is not physicaly based at all and will not match cycles.

----

The sampling for point lamps (spheres) is not
2018-10-28 21:48:22 +01:00
Campbell Barton 678c200309 Gizmo: remove 'Click Anywhere' option
Having an invisible gizmo caused event handling problems (see: T56603).

This is hard to avoid since gizmos are similar to buttons in the way
they have priority over the regular keymap.

Transform events use tweak so events to fall though to the general
view 3d keymap (for cursor placement for eg).
2018-10-18 12:36:39 +11:00
Jacques Lucke 2d21eb79ad Units: Support for fixed units
Users can select the main unit they want to use now.
Previously the displayed unit always depended on the magnitude of the value.
The old behavior can be restored by switching to the "Adaptive" mode for length, mass and time units.

Meters, kilograms and seconds are the default units for new and old scenes.

The selected unit is also the default unit for user input.
E.g. if cm is selected, whenever the user inputs a unitless number into a field of type length, it will be interpreted as cm.

Reviewer: brecht

Differential: https://developer.blender.org/D3740
2018-10-03 10:20:16 +02:00
Campbell Barton 1f2c4f8809 Cleanup: use standard prefix for boolean settings
Avoid using 'add' as a prefix, it reads like a method.
2018-10-01 12:00:08 +10:00
Sergey Sharybin b880c13c3a Merge branch 'master' into blender2.8 2018-09-28 13:58:30 +02:00
Brecht Van Lommel 45271007cf Fix T56905: unsupported channel layout error writing AAC audio.
This uses same mapping as Audaspace to specify channel layout, which was
missing before.
2018-09-28 12:07:05 +02:00
Antonioya 0f7e858f06 GP: New pressure option for sculpt brush radius 2018-09-25 20:43:50 +02:00
Antonioya 67a6cb665e GP: New select mode
Now it's possible select points or strokes
2018-09-20 11:56:59 +02:00
Campbell Barton 9759059d58 Cleanup: use SCE_GIZMO_ prefix for gizmo_flag 2018-09-17 12:51:32 +10:00
Brecht Van Lommel fc115e1ab2 Cleanup: remove legacy layer and dupli code. 2018-09-04 16:11:27 +02:00
Sergey Sharybin 296a1afc0c Cleanup: Remove unused lay_updated
Is no longer used, having it around was more of a confusion than
anything else.
2018-09-03 12:17:55 +02:00
Campbell Barton 0ddf3e110e Cleanup: comment blocks 2018-09-02 18:51:31 +10:00
Campbell Barton ae57383648 Cleanup: comment blocks 2018-09-02 18:28:27 +10:00
Antonioya f2d8241b23 GP: Add weights while drawing strokes
Now it's possible to add the weight of the current selected vertex group to any new stroke created.

This is very handy when add drawings after the weight paint was done and it will be required with Armatures.
2018-08-30 11:11:47 +02:00
Brecht Van Lommel 42f7767dab Cleanup: rename files from group to collection to match contents. 2018-08-29 16:25:50 +02:00
Brecht Van Lommel 82e59d4c18 Cleanup: remove unused R_ORTHO / R_PANORAMA flags. 2018-08-15 18:40:56 +02:00
Campbell Barton 98c304e865 Gizmo: add option to catch all mouse clicks
This was previously default behavior, now it's default.
2018-08-10 21:04:06 +10:00
Rohan Rathi 2b41b208c7 Merge branch 'soc-2018-bevel' into blender2.8 2018-08-09 19:52:07 +05:30
Antonioya 563e17091d GP: Add Simplify Shader FX option
This option was missing when old VFX modifers were backported as Shader FX.
2018-08-06 17:01:47 +02:00
Bastien Montagne 936d1cef6e Merge branch 'blender2.8' into soc-2018-bevel
Conflicts:
	release/scripts/addons
	release/scripts/startup/bl_ui/space_view3d_toolbar.py
	source/blender/editors/space_outliner/outliner_draw.c
2018-08-01 14:16:41 +02:00
Antonioya 66da2f537a New Grease Pencil object for 2D animation
This commit merge the full development done in greasepencil-object branch and include mainly the following features.

- New grease pencil object.
- New drawing engine.
- New grease pencil modes Draw/Sculpt/Edit and Weight Paint.
- New brushes for grease pencil.
- New modifiers for grease pencil.
- New shaders FX.
- New material system (replace old palettes and colors).
- Split of annotations (old grease pencil) and new grease pencil object.
- UI adapted to blender 2.8.

You can get more info here:

https://code.blender.org/2017/12/drawing-2d-animation-in-blender-2-8/
https://code.blender.org/2018/07/grease-pencil-status-update/

This is the result of nearly two years of development and I want thanks firstly the other members of the grease pencil team: Daniel M. Lara, Matias Mendiola and Joshua Leung for their support, ideas and to keep working in the project all the time, without them this project had been impossible.

Also, I want thanks other Blender developers for their help, advices and to be there always to help me, and specially to Clément Foucault, Dalai Felinto, Pablo Vázquez and Campbell Barton.
2018-07-31 10:50:43 +02:00
Clément Foucault 87090abb95 Eevee: Remove Colored volumetric option.
This option is not necessary as it uses as much memory as the mono-chromatic
transmistance.
2018-07-23 17:44:34 +02:00
Rohan Rathi 4e6bcd10e5 Merge branch 'blender2.8' into soc-2018-bevel 2018-07-21 19:29:15 +05:30
Brecht Van Lommel 644fadf2f0 Render: add "OpenGL" render engine.
This is intended for quick renders for previsualization, animation previews
or sequencer previews. It provides the same settings as found in the 3D view
Shading popover in solid display mode, but in the scene render properties.

The "Workbench" engine was removed, and this name no longer appears in the
user interface, it's purely an internal name. We might come up with a better
name for this OpenGL engine still, but it's good to be consistent with the
OpenGL Render operator name since this has a similar purpose.
2018-07-17 16:46:09 +02:00
Campbell Barton 5ebebcfbff WM: rename manipulator to gizmo internally 2018-07-14 23:49:00 +02:00
Clément Foucault 1a43e08187 Eevee: LightCache: Initial Implementation
This separate probe rendering from viewport rendering, making possible to
run the baking in another thread (non blocking and faster).

The baked lighting is saved in the blend file. Nothing needs to be
recomputed on load.

There is a few missing bits / bugs:
- Cache cannot be saved to disk as a separate file, it is saved in the DNA
  for now making file larger and memory usage higher.
- Auto update only cubemaps does update the grids (bug).
- Probes cannot be updated individually (considered as dynamic).
- Light Cache cannot be (re)generated during render.
2018-07-10 15:31:34 +02:00
Macelaru Tiberiu 2203b041e1 Sculpting: add Manual detail mode for dynamic topology.
In this mode mesh detail does not change on each stroke, but only when
using flood fill.

Differential Revision: https://developer.blender.org/D3515
2018-07-02 20:08:42 +02:00
Rohan Rathi 31e43d021f Merge branch 'blender2.8' into soc-2018-bevel 2018-07-02 23:31:19 +05:30
Brecht Van Lommel 817bf582c2 Cleanup: rename object base flags to be more clear. 2018-06-25 14:09:17 +02:00
Campbell Barton a997b5d17b Tool System: transform can now toggle loc/rot/scale 2018-06-22 19:23:27 +02:00
Rohan Rathi c73a6b0d42 Merge branch 'blender2.8' into soc-2018-bevel 2018-06-20 22:29:44 +05:30
Campbell Barton 0d8b92267d Object Mode: make mode locking optional
Design from T55246 is kept while allowing 2.7x behavior.
2018-06-18 20:43:26 +02:00
Campbell Barton 06a1a66a9b Merge branch 'master' into blender2.8 2018-06-17 17:10:19 +02:00
Campbell Barton 78fbd146f3 Cleanup: trailing space for DNA headers 2018-06-17 17:04:09 +02:00
Jeroen Bakker b6b1e0f56c T55454: removal of clay engine
The ClayEngine was introduced to test the blender2.8 architecture during
development. As currently we have the wanted features implemented with
matcaps we are going to remove the clay engine as it was never intended
to be an official releasable engine

Note: The test cases are never run. But when enabled will be skipped as
they were implemented over the Clay Engine
2018-06-12 15:32:31 +02:00
Rohan Rathi 1255129932 Merge branch 'blender2.8' into soc-2018-bevel 2018-06-11 21:03:07 +05:30
Brecht Van Lommel 05111d79d0 Cleanup: remove unused DAG_EVAL_PREVIEW mode. 2018-06-11 17:06:28 +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
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
Rohan Rathi 842245ac55 Merge branch 'blender2.8' into soc-2018-bevel 2018-05-29 11:10:54 +05:30
Campbell Barton 581b021a1f Cleanup: unused defines 2018-05-26 13:15:55 +02:00
Campbell Barton c9c95ed25f Cleanup: unused defines 2018-05-26 13:12:00 +02:00
Rohan Rathi 5d2d36b068 Applied soc-2017-normal-tools 2018-05-25 22:24:24 +05:30
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
Brecht Van Lommel 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
Dalai Felinto e51bf11b15 Remove ViewLayer settings - cleanup 1/2 2018-05-16 23:13:28 +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
Jeroen Bakker 197af58baa Workbench: Cleaner Shadow edges own shadow 2018-05-15 15:40:12 +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
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
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
Campbell Barton a48186c5d7 Orientation for 3D cursor
Currently set when setting the cursor location,
optionally used as an orientation type.

Intended for use by tools too.

See: D3208
2018-05-08 15:35:04 +02:00
Brecht Van Lommel 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
Brecht Van Lommel 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
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
Brecht Van Lommel 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
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
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 410810d42f Workbench: Added Object Color to collection_properties 2018-04-16 15:01:31 +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
Campbell Barton 4a2b64e43d Minor change to last commit 2018-04-06 18:17:18 +02:00
Campbell Barton 6b2cf4e86e Delete object crashed (missing NULL check)
Error in recent removal of workspace.object_mode
2018-04-06 18:15:51 +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
Campbell Barton b65ea517eb Merge branch 'master' into blender2.8
- Undo that changes modes currently asserts,
  since undo is now screen data.

  Most likely we will change how object mode and workspaces work
  since it's not practical/maintainable at the moment.

- Removed view_layer from particle settings
  (wasn't needed and complicated undo).
2018-04-01 11:03:25 +02:00
Brecht Van Lommel 93e0e716f3 Merge branch 'master' into blender2.8 2018-03-10 19:06:28 +01:00
Brecht Van Lommel 23ccf5767f Cycles: add roughness baking support, using squared roughness convention. 2018-03-10 18:37:33 +01:00
Campbell Barton 769c9a2363 Object Mode: remove Scene.obedit
This means we can support having the same scene in different windows
with different edit-objects.
2018-02-14 08:49:20 +11:00
Campbell Barton c8597a465f Object Mode: remove Scene.obedit
Add ED_screen_window_find, BKE_workspace_edit_object
2018-02-13 20:55:12 +11:00