5 weeks agoCycles: add function to clear resumable chunk
Brecht Van Lommel [Fri, 10 May 2019 21:32:58 +0000 (23:32 +0200)]
Cycles: add function to clear resumable chunk

5 weeks agoAudaspace: porting changes from upstream.
Jörg Müller [Fri, 10 May 2019 21:01:04 +0000 (23:01 +0200)]
Audaspace: porting changes from upstream.

- Silence now has an optional sample rate parameter.
- Fix: wrong length reported by modulator and superpose.
- Minor formatting, include and documentation fixes.

5 weeks agoTests: Be more explicit about the required location of the tests folder.
Ray Molenkamp [Fri, 10 May 2019 20:19:29 +0000 (14:19 -0600)]
Tests: Be more explicit about the required location of the tests folder.

5 weeks agoCleanup: Use const qualifier for curve utilities
Sergey Sharybin [Fri, 10 May 2019 15:12:33 +0000 (17:12 +0200)]
Cleanup: Use const qualifier for curve utilities

5 weeks agoCleanup: Remove unused functions
Sergey Sharybin [Fri, 10 May 2019 15:26:16 +0000 (17:26 +0200)]
Cleanup: Remove unused functions

5 weeks agoCleanup: Remove old deprecated DerivedMesh functions
Sergey Sharybin [Fri, 10 May 2019 15:28:21 +0000 (17:28 +0200)]
Cleanup: Remove old deprecated DerivedMesh functions

Were ifdef-ed for a long time.

5 weeks agoFix T64338: make snap menu in 2.7x keymap use regular instead of pie menu
Carlo Andreacchio [Fri, 10 May 2019 15:22:26 +0000 (17:22 +0200)]
Fix T64338: make snap menu in 2.7x keymap use regular instead of pie menu

Differential Revision:

5 weeks agoUI: allow to cancel editing of vector widgets with escape and RMB
Alessio Monti di Sopra [Fri, 10 May 2019 15:21:24 +0000 (17:21 +0200)]
UI: allow to cancel editing of vector widgets with escape and RMB

Differential Revision:

5 weeks agoFix T64434: error with save system info after recent changes
George Vogiatzis [Fri, 10 May 2019 15:15:05 +0000 (17:15 +0200)]
Fix T64434: error with save system info after recent changes

Differential Revision:

5 weeks agoFix T64399 Crash when trying to enter edit mode on instanced objects
Clément Foucault [Fri, 10 May 2019 14:51:19 +0000 (16:51 +0200)]
Fix T64399 Crash when trying to enter edit mode on instanced objects

5 weeks agoFix T64420 Weight Paint colours not visible
Clément Foucault [Fri, 10 May 2019 13:03:18 +0000 (15:03 +0200)]
Fix T64420 Weight Paint colours not visible

5 weeks agoFix T64284 Mirrored Instances have flipped normals/face orientation
Clément Foucault [Fri, 10 May 2019 12:46:01 +0000 (14:46 +0200)]
Fix T64284 Mirrored Instances have flipped normals/face orientation

It was a missing invert matrix update and also setting the OB_NEG_SCALE.

This defeats the purpose of not computing it in the draw manager but this
is more local and is have not a dramatic impact on performance.

5 weeks agoFix failing tests when Cycles is enabled
Brecht Van Lommel [Fri, 10 May 2019 11:29:43 +0000 (13:29 +0200)]
Fix failing tests when Cycles is enabled

The --env-system-scripts hack does not work with it, it can't find the cycles
Python module then when importing add-ons.

5 weeks agoOverlays: Use common_view_lib.glsl
Clément Foucault [Thu, 9 May 2019 23:57:42 +0000 (01:57 +0200)]
Overlays: Use common_view_lib.glsl

This removes ModelViewProjectionMatrix usage

5 weeks agoWorkbench: Use common_view_lib.glsl
Clément Foucault [Thu, 9 May 2019 22:18:52 +0000 (00:18 +0200)]
Workbench: Use common_view_lib.glsl

This removes ModelViewProjectionMatrix usage

5 weeks agoGPencil: Use common_view_lib.glsl
Clément Foucault [Thu, 9 May 2019 20:27:44 +0000 (22:27 +0200)]
GPencil: Use common_view_lib.glsl

5 weeks agoDRW: Remove ModelViewMatrix Usage
Clément Foucault [Thu, 9 May 2019 20:10:38 +0000 (22:10 +0200)]
DRW: Remove ModelViewMatrix Usage

5 weeks agoEevee: Update matrices operations to not use combined matrices
Clément Foucault [Thu, 9 May 2019 14:16:12 +0000 (16:16 +0200)]
Eevee: Update matrices operations to not use combined matrices

5 weeks agoCleanup: DRW: Renaming of glsl utility macros
Clément Foucault [Thu, 9 May 2019 13:31:54 +0000 (15:31 +0200)]
Cleanup: DRW: Renaming of glsl utility macros

5 weeks agoAdd ability to create a keyboard shortcut for more mode settings.
Sebastian Parborg [Fri, 10 May 2019 09:55:52 +0000 (11:55 +0200)]
Add ability to create a keyboard shortcut for more mode settings.

This adds the ability to assign shortcuts to boolean settings and enums
via the right click menu.

Reviewed By: Brecht

Differential Revision:

5 weeks agoCleanup: split setup_app_data into two functions
Campbell Barton [Fri, 10 May 2019 08:46:13 +0000 (18:46 +1000)]
Cleanup: split setup_app_data into two functions

Allows for skipping either preferences or data-blocks.
Previously setup_app_data was used for both.

5 weeks agoPreferences: write preferences on exit
Campbell Barton [Fri, 10 May 2019 08:29:58 +0000 (18:29 +1000)]
Preferences: write preferences on exit

This avoids the issue where user added shortcuts or quick favourites
are lost on exit.

5 weeks agoPreferences: add is_dirty member
Campbell Barton [Fri, 10 May 2019 05:57:23 +0000 (15:57 +1000)]
Preferences: add is_dirty member

Tag preferences as dirty when changed (prepare for adding auto-save).

5 weeks agoCleanup: move preference saving logic into blendfile.c
Campbell Barton [Fri, 10 May 2019 05:46:31 +0000 (15:46 +1000)]
Cleanup: move preference saving logic into blendfile.c

5 weeks agoFix T64304: Objects in appended scene from 2.79 file disappear after saving.
Bastien Montagne [Fri, 10 May 2019 08:09:23 +0000 (10:09 +0200)]
Fix T64304: Objects in appended scene from 2.79 file disappear after saving.

Versionning code generating collections from old 2.79 scene layers was
setting new collections' library from scene, but it also needs to
properly set the `LIB_TAG_INDIRECT` tag, otherwise localizing code does
not know what to do, and most of append process fails.

5 weeks agoUI: expose tool settings in the 3D view side-bar
Campbell Barton [Fri, 10 May 2019 03:43:07 +0000 (13:43 +1000)]
UI: expose tool settings in the 3D view side-bar

Internally tool settings have been moved to the 3D view.
Added the ability for to draw panels from another space/region
so they can be mirrored in the properties editor.

5 weeks agoCleanup: use more explicit check for buttons context
Campbell Barton [Fri, 10 May 2019 02:51:04 +0000 (12:51 +1000)]
Cleanup: use more explicit check for buttons context

5 weeks agoCleanup: avoid some floating point divisions in drawing code
Brecht Van Lommel [Thu, 9 May 2019 17:37:31 +0000 (19:37 +0200)]
Cleanup: avoid some floating point divisions in drawing code

5 weeks agoUI: improve timeline playhead scrubber drawing
Harley Acheson [Thu, 9 May 2019 17:28:31 +0000 (19:28 +0200)]
UI: improve timeline playhead scrubber drawing

Minimum width, always centered on the vertical frame line, antialiased.

Differential Revision:

5 weeks agoFix T64076: color ramp overlaps scrollbar
Harley Acheson [Thu, 9 May 2019 17:27:33 +0000 (19:27 +0200)]
Fix T64076: color ramp overlaps scrollbar

Differential Revision:

5 weeks agoUI: dim icons in inactive tabs, similar to text
Brecht Van Lommel [Thu, 9 May 2019 15:37:26 +0000 (17:37 +0200)]
UI: dim icons in inactive tabs, similar to text

This makes the properties editor navigation bar less saturated. Internally
the icon theme coloring was refactored a bit to move more towards the button
drawing code.

5 weeks agoCleanup: reduce number of UI_icon_draw variations
Brecht Van Lommel [Thu, 9 May 2019 17:19:52 +0000 (19:19 +0200)]
Cleanup: reduce number of UI_icon_draw variations

5 weeks agoThemes: add setting to draw border around icons, use for Blender Light
Jeroen Bakker [Thu, 9 May 2019 13:53:44 +0000 (15:53 +0200)]
Themes: add setting to draw border around icons, use for Blender Light

Monochrome colored icons don't work well on a dark background, so now we can
add a border around them. Note that most icons in the interface will remain
without a border, just the outliner and properties editor navigation have
colored icons and those will get a border. Other icons continue to be drawn
in the text colored without a border.

Differential Revision:

5 weeks agoThemes: add scene icon color category, for consistency in properties tab bar
Brecht Van Lommel [Thu, 9 May 2019 15:07:06 +0000 (17:07 +0200)]
Themes: add scene icon color category, for consistency in properties tab bar

The icons here still need to be dimmed when the tab is inactive.

5 weeks agoGPencil: Lock rotation of textures
Antonioya [Thu, 9 May 2019 17:53:25 +0000 (19:53 +0200)]
GPencil: Lock rotation of textures

By default the texture is locked and only the box is aligned when Follow Drawing Path is enabled.

Before, when the Follow was disabled, the texture was always aligned to top and it was not affected by object rotation. Now, the texture always is rotated with object rotation.

5 weeks agoDrawManager/GreasePencil: Select Correct ViewLayer
Jeroen Bakker [Tue, 7 May 2019 13:01:12 +0000 (15:01 +0200)]
DrawManager/GreasePencil: Select Correct ViewLayer

The DrawManager assumed that the first render layer was the render layer
where GP needed to render on. In viewport this is always the case as we
only have a single view layer. When rendering this can be multiple when
multiple layers are rendered and composited in the compositor.

In stead of the assumption that the first render layer is the render
layer we need to draw on, we search for the render layer with the same
name as the viewlayer.

Reviewed By: fclem, brecht, antoniov

Maniphest Tasks: T63099

Differential Revision:

5 weeks agoWorkbench: Viewport AA Preferences
Jeroen Bakker [Wed, 8 May 2019 13:38:11 +0000 (15:38 +0200)]
Workbench: Viewport AA Preferences

In recent changes the viewport_quality setting was not working what
users expected. This change will separate the anti-aliasing method that
is being used.

We now have three settings:

* scene.display.render_aa: Will be used during `Render Image`.
* scene.display.viewport_aa: Will be used during `Viewport Render Image`.
* userpref.viewport_aa: Will be used in the 3d view.

The viewport_quality setting has been replaced by the viewport_aa
setting as it was the only thing in currently controlled.

Reviewed By: brecht

Maniphest Tasks: T64132

Differential Revision:

5 weeks agoFix T64384 : Crash when switching to wireframe on tree_creature blend
Clément Foucault [Thu, 9 May 2019 12:36:49 +0000 (14:36 +0200)]
Fix T64384 : Crash when switching to wireframe on tree_creature blend

Was missing NULL pointer check

5 weeks agoTests: add tests/report.html that links to all HTML test reports
Brecht Van Lommel [Thu, 9 May 2019 11:45:46 +0000 (13:45 +0200)]
Tests: add tests/report.html that links to all HTML test reports

Currently this is for Cycles, Eevee and workbench tests.

5 weeks agoUI: rename Look Dev 'Ball' to 'Sphere'
Campbell Barton [Thu, 9 May 2019 11:35:52 +0000 (21:35 +1000)]
UI: rename Look Dev 'Ball' to 'Sphere'

D4813 by @Gvgeo

5 weeks agoDepsGraph: Multi ViewLayer Selection
Jeroen Bakker [Wed, 8 May 2019 07:45:20 +0000 (09:45 +0200)]
DepsGraph: Multi ViewLayer Selection

When using multiple viewlayers and switching between them the selection
gets buggy. The reason for this is that the select_id is updated based
on the index in the viewlayer. This makes the select_id not unique as
objects might be shared or not shared at all.

This fix will update the select_id on all objects in main. This will be triggered in all the selection operators.

Reviewed By: sergey, brecht

Maniphest Tasks: T55617

Differential Revision:

5 weeks agoFix T64363 Eevee: Texture coordinates node turns material color to pink
Clément Foucault [Thu, 9 May 2019 10:46:29 +0000 (12:46 +0200)]
Fix T64363 Eevee: Texture coordinates node turns material color to pink

Sorry for that :(

5 weeks agoFix T64329 Crash when switching to Texture Paint
Clément Foucault [Thu, 9 May 2019 10:10:47 +0000 (12:10 +0200)]
Fix T64329 Crash when switching to Texture Paint

5 weeks ago3D Grid: Use View UBO & small cleanup
Clément Foucault [Thu, 9 May 2019 09:58:33 +0000 (11:58 +0200)]
3D Grid: Use View UBO & small cleanup

5 weeks agoI18n disambiguation: Drag (physics force vs. mouse action).
Bastien Montagne [Thu, 9 May 2019 08:52:34 +0000 (10:52 +0200)]
I18n disambiguation: Drag (physics force vs. mouse action).

Part of T43295.

5 weeks agoI18n disambiguation: setting particles' parent/children appart.
Bastien Montagne [Thu, 9 May 2019 08:31:11 +0000 (10:31 +0200)]
I18n disambiguation: setting particles' parent/children appart.

Looks like in some languages common generic parent/child relationship
does notn apply well to those.

Part of T43295.

5 weeks agoI18n disambiguation: Translation (of UI vs. moving something).
Bastien Montagne [Thu, 9 May 2019 08:09:14 +0000 (10:09 +0200)]
I18n disambiguation: Translation (of UI vs. moving something).

Part of T43295.

5 weeks agoFix Crash with armature using custom shapes
Clément Foucault [Thu, 9 May 2019 09:35:45 +0000 (11:35 +0200)]
Fix Crash with armature using custom shapes

5 weeks agoMove out pose edit options into the pose data
Sebastian Parborg [Thu, 9 May 2019 09:19:38 +0000 (11:19 +0200)]
Move out pose edit options into the pose data

Move pose edit mode booleans out of the armature data into the pose data

Reviewed By: Brecht

Differential Revision:

5 weeks agoFix T64308: bake animation not working after recent bendy bone changes
Lucas Veber [Thu, 9 May 2019 00:56:30 +0000 (02:56 +0200)]
Fix T64308: bake animation not working after recent bendy bone changes

Differential Revision:

5 weeks agoFix T64366 DRW: Crash opening Mr Elephant scene since recent commit
Clément Foucault [Thu, 9 May 2019 09:16:54 +0000 (11:16 +0200)]
Fix T64366 DRW: Crash opening Mr Elephant scene since recent commit

5 weeks agoFix T64296 Z-axis overlay vanishes at scene origin in 3D Viewport
Clément Foucault [Thu, 9 May 2019 08:59:25 +0000 (10:59 +0200)]
Fix T64296 Z-axis overlay vanishes at scene origin in 3D Viewport

Grid shader was still using deprecated eye vector.

5 weeks agoFix: Nav_bar context menu in preferences
Campbell Barton [Thu, 9 May 2019 08:40:42 +0000 (18:40 +1000)]
Fix: Nav_bar context menu in preferences

Also merge the keymaps for header/footer/navbar.

D4736 by @Gvgeo with edits

5 weeks agoUI: minor improvements to font menu
Campbell Barton [Thu, 9 May 2019 06:57:59 +0000 (16:57 +1000)]
UI: minor improvements to font menu

D4814 by @RedMser with edits

5 weeks agoKeymap: automate using OSKey for Ctrl on macos
Campbell Barton [Thu, 9 May 2019 06:09:25 +0000 (16:09 +1000)]
Keymap: automate using OSKey for Ctrl on macos

Replace hard coded use of oskey with a function.

Add checks to avoid conflicting bindings with the OS.

5 weeks agoFix crash displaying UV's
Campbell Barton [Thu, 9 May 2019 04:46:44 +0000 (14:46 +1000)]
Fix crash displaying UV's

5 weeks agoFix bpy.utils.script_paths ignoring user_pref arg
Campbell Barton [Thu, 9 May 2019 03:21:53 +0000 (13:21 +1000)]
Fix bpy.utils.script_paths ignoring user_pref arg

5 weeks agoCleanup: unused bpyml module
Campbell Barton [Thu, 9 May 2019 03:14:07 +0000 (13:14 +1000)]
Cleanup: unused bpyml module

Was for declarative style UI definitions,
but never ended up being used.

5 weeks agoCleanup: unused args/vars/imports in modules
Campbell Barton [Thu, 9 May 2019 03:11:36 +0000 (13:11 +1000)]
Cleanup: unused args/vars/imports in modules

5 weeks agoCleanup: unused args/vars/imports in bl_operators
Campbell Barton [Wed, 8 May 2019 23:15:01 +0000 (09:15 +1000)]
Cleanup: unused args/vars/imports in bl_operators

5 weeks agoCleanup: redundant function call
Campbell Barton [Wed, 8 May 2019 22:54:27 +0000 (08:54 +1000)]
Cleanup: redundant function call

5 weeks agoCleanup: use __doc__ instead of bl_description
Campbell Barton [Wed, 8 May 2019 22:50:14 +0000 (08:50 +1000)]
Cleanup: use __doc__ instead of bl_description

In keeping with other Python operators,
also assign object a variable.

5 weeks agoUI Particles: Move message about parting inside Parting panel.
Pablo Vazquez [Wed, 8 May 2019 23:54:00 +0000 (01:54 +0200)]
UI Particles: Move message about parting inside Parting panel.

Grayout parting settings if using virtual parents, and minor layout
adjustment: align min and max sliders together.

5 weeks agoCleanup: DRW: Remove DRW_pass_free
Clément Foucault [Wed, 8 May 2019 22:38:48 +0000 (00:38 +0200)]
Cleanup: DRW: Remove DRW_pass_free

5 weeks agoDRW: Remove support for NormalMatrix
Clément Foucault [Wed, 8 May 2019 22:27:11 +0000 (00:27 +0200)]
DRW: Remove support for NormalMatrix

5 weeks agoFix T64158 Eevee: Mixed SSS shader becomes brighter and brighter
Clément Foucault [Wed, 8 May 2019 22:10:15 +0000 (00:10 +0200)]
Fix T64158 Eevee: Mixed SSS shader becomes brighter and brighter

This change the logic a bit, when 2 bsdfs using SSS are mixed, we use the
one with the biggest radius (on a per pixel basis).

This change from previous behavior which was to select input 1 if radius
was greater than 0.

5 weeks agoFix T64334: T-key error-message in Dopesheet source list
William Reynish [Wed, 8 May 2019 21:34:10 +0000 (23:34 +0200)]
Fix T64334: T-key error-message in Dopesheet source list

The Dopesheet doesn't have a toolbar, yet the source list region still had a keymap entry for it

5 weeks agoCleanup: GPUShader: Remove unused edge fancy shader
Clément Foucault [Wed, 8 May 2019 21:27:51 +0000 (23:27 +0200)]
Cleanup: GPUShader: Remove unused edge fancy shader

5 weeks agoGPU: Refactor some shader for a bit more efficiency
Clément Foucault [Wed, 8 May 2019 21:23:31 +0000 (23:23 +0200)]
GPU: Refactor some shader for a bit more efficiency

Remove matrices multiplication and use more correct codestyle for variables

5 weeks agoEevee: Fix Tangent vectors using NormalMatrix and make them world space
Clément Foucault [Wed, 8 May 2019 21:21:09 +0000 (23:21 +0200)]
Eevee: Fix Tangent vectors using NormalMatrix and make them world space

Making them world space by default remove a lot of legacy conversion from

5 weeks agoOverlay: Remove use of NormalMatrix
Clément Foucault [Wed, 8 May 2019 21:13:09 +0000 (23:13 +0200)]
Overlay: Remove use of NormalMatrix

5 weeks agoUI messages: Rename 'Light' to 'Lite' for compression method.
Bastien Montagne [Wed, 8 May 2019 20:24:10 +0000 (22:24 +0200)]
UI messages: Rename 'Light' to 'Lite' for compression method.

While not exactly optimal, that's the only disambiguation solution I
found doable for translations (i18n). ID names tend to sneak
everywhere, including in places where we have no access to i18n context
currently (like menu labels e.g.).

Other alternative would have been to use 'Lightweight', but that is a
tad too long, we love short UI messages as much as possible.

The genius who decided that it was critical to rename ID lamp to light
in 2.8 is welcome to find a better solution...

Part of T43295.

5 weeks agoI18n: Disambiguation for 'Cycles' used also by some anim modifier.
Bastien Montagne [Wed, 8 May 2019 20:02:54 +0000 (22:02 +0200)]
I18n: Disambiguation for 'Cycles' used also by some anim modifier.

Part of T43295.

5 weeks agoWorkbench: Use common_view_lib and remove NormalMatrix usage
Clément Foucault [Wed, 8 May 2019 20:08:20 +0000 (22:08 +0200)]
Workbench: Use common_view_lib and remove NormalMatrix usage

This is in order to lower the number of matrices to compute.

5 weeks agoMesh Batch Cache: Fix crash when comming from eevee to wireframe mode
Clément Foucault [Wed, 8 May 2019 20:01:34 +0000 (22:01 +0200)]
Mesh Batch Cache: Fix crash when comming from eevee to wireframe mode

And add check in debug build.

5 weeks agoDRW: Remove WorldNormalMatrix
Clément Foucault [Wed, 8 May 2019 18:13:24 +0000 (20:13 +0200)]
DRW: Remove WorldNormalMatrix

5 weeks agoEevee: Remove uneeded normalization
Clément Foucault [Wed, 8 May 2019 17:35:48 +0000 (19:35 +0200)]
Eevee: Remove uneeded normalization

Clément Foucault [Wed, 8 May 2019 17:33:54 +0000 (19:33 +0200)]

The end goal for this is to lower the number of needed matrices.

This also cleanup some uneeded transformation.

5 weeks agoOverlay Mode: Use common_view_lib
Clément Foucault [Wed, 8 May 2019 17:30:03 +0000 (19:30 +0200)]
Overlay Mode: Use common_view_lib

This is in order to centralize all matrices transformations.

5 weeks agoDefaults: change default settings in a few editors
Brecht Van Lommel [Wed, 8 May 2019 16:08:35 +0000 (18:08 +0200)]
Defaults: change default settings in a few editors

* Timeline has summary collapsed to show only one row of keyframes.
* Cavity default is screen space curvature (faster).
* Scripting workspace text editor uses syntax highlight and line numbers.
* Marker lines enabled by default in all animation editors.
* Movie clip editor pivot point default to median.

Ref T63986.

5 weeks agoTheme: tweak source list background color for animation editors.
Pablo Vazquez [Wed, 8 May 2019 15:24:48 +0000 (17:24 +0200)]
Theme: tweak source list background color for animation editors.

Helps to avoid blending with the timeline out-of-range area, match region
background and scrubbing area as well.

5 weeks agoCleanup: DRW/GPU: Remove eye vector uniform
Clément Foucault [Wed, 8 May 2019 15:19:44 +0000 (17:19 +0200)]
Cleanup: DRW/GPU: Remove eye vector uniform

5 weeks agoCleanup: Remove BKE_MESH_BATCH_DIRTY_MAYBE_ALL
Clément Foucault [Tue, 7 May 2019 20:45:14 +0000 (22:45 +0200)]

5 weeks agoCleanup: draw_common: Use switch instead of ifs
Clément Foucault [Tue, 7 May 2019 20:01:45 +0000 (22:01 +0200)]
Cleanup: draw_common: Use switch instead of ifs

5 weeks agoCleanup: Mesh Batch Cache: Remove unused BKE_MESH_BATCH_DIRTY_SCULPT_COORDS
Clément Foucault [Tue, 7 May 2019 21:47:32 +0000 (23:47 +0200)]
Cleanup: Mesh Batch Cache: Remove unused BKE_MESH_BATCH_DIRTY_SCULPT_COORDS

5 weeks agoCleanup: GPUShader: Use switch instead of ifs
Clément Foucault [Tue, 7 May 2019 15:14:11 +0000 (17:14 +0200)]
Cleanup: GPUShader: Use switch instead of ifs

5 weeks agoDRW: Copy matrix in case of ModelMatrixInverse being used
Clément Foucault [Wed, 8 May 2019 15:14:54 +0000 (17:14 +0200)]
DRW: Copy matrix in case of ModelMatrixInverse being used

ob->imat is garanteed to be valid by the depsgraph.

5 weeks agoWireframe: Refactor vertex shader to use less matrices
Clément Foucault [Wed, 8 May 2019 15:12:24 +0000 (17:12 +0200)]
Wireframe: Refactor vertex shader to use less matrices

This means less matrices needs to be prepared by the CPU.

5 weeks agoDRW: Speedup: Only do batch cache request and validation once for duplis
Clément Foucault [Wed, 8 May 2019 10:02:49 +0000 (12:02 +0200)]
DRW: Speedup: Only do batch cache request and validation once for duplis

5 weeks agoMesh Batch Cache: Speedup: Only alloc gpu_attrs if needed and don't clear
Clément Foucault [Wed, 8 May 2019 10:00:50 +0000 (12:00 +0200)]
Mesh Batch Cache: Speedup: Only alloc gpu_attrs if needed and don't clear

No need to clear since GPU_material_vertex_attrs is overriding

5 weeks agoMesh Batch Cache: Speedup: Use flags to early remove unecessary checks
Clément Foucault [Tue, 7 May 2019 22:12:24 +0000 (00:12 +0200)]
Mesh Batch Cache: Speedup: Use flags to early remove unecessary checks

5 weeks agoDRW: Make batch validation run first during iteration
Clément Foucault [Tue, 7 May 2019 21:21:16 +0000 (23:21 +0200)]
DRW: Make batch validation run first during iteration

This reduces the cost of querying the batches to the batch cache.

5 weeks agoDRW: Move all batch request functions to own header
Clément Foucault [Tue, 7 May 2019 21:02:42 +0000 (23:02 +0200)]
DRW: Move all batch request functions to own header

This is in order to using BLI_INLINE for thoses functions and keep headers
cleany separated.

5 weeks agoDRW: Change function orders to improve CPU cache efficiency
Clément Foucault [Tue, 7 May 2019 20:08:42 +0000 (22:08 +0200)]
DRW: Change function orders to improve CPU cache efficiency

These changes seems to impact cache efficiency as it uses shgroup just
after creating a DRWCall before shgroup.

5 weeks agoObject Overlay: Add dupli fast path
Clément Foucault [Tue, 7 May 2019 20:09:28 +0000 (22:09 +0200)]
Object Overlay: Add dupli fast path

5 weeks agoWireframe: Create dupli fast path using DRW_duplidata_get
Clément Foucault [Tue, 7 May 2019 18:56:55 +0000 (20:56 +0200)]
Wireframe: Create dupli fast path using DRW_duplidata_get

5 weeks agoDRW: Add DRW_duplidata_get to create fast path for duplis
Clément Foucault [Tue, 7 May 2019 18:56:20 +0000 (20:56 +0200)]
DRW: Add DRW_duplidata_get to create fast path for duplis

This is in order to create less shading group when using duplis.

Data for dupli objects keep in draw manager state until the source object
changes so retrieval is fast.

Note that this system could be extended to all meshes.

5 weeks agoGPUViewport: Fix possible hash colision with enabled engines
Clément Foucault [Tue, 7 May 2019 16:42:28 +0000 (18:42 +0200)]
GPUViewport: Fix possible hash colision with enabled engines

Also fix engine data validation that was not previously not working.

5 weeks agoDRW: Remove uneeded calls to drw_viewport_engine_data_ensure when iterating
Clément Foucault [Tue, 7 May 2019 16:40:02 +0000 (18:40 +0200)]
DRW: Remove uneeded calls to drw_viewport_engine_data_ensure when iterating

This remove a bit of overhead specially in scene with lots of objects.

5 weeks agoDRW: Replace BLI_mempool by BLI_memblock
Clément Foucault [Tue, 7 May 2019 16:01:14 +0000 (18:01 +0200)]
DRW: Replace BLI_mempool by BLI_memblock

This remove a avoid the big overhead present in BLI_mempool when it is