Commit Graph

935 Commits

Author SHA1 Message Date
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