Commit Graph

96610 Commits

Author SHA1 Message Date
Campbell Barton
f0df4d6c35 Fix T67577: Add-on unregister can't access preferences on factory reset 2020-06-03 14:46:52 +10:00
Campbell Barton
2749e6a639 Cleanup: remove redundant call to addon_utils.reset_all()
This is already called by wm_homefile_read
2020-06-03 14:46:52 +10:00
Campbell Barton
2004f9a342 Cleanup: move shared functionality to wm_file_read_pre
This matches wm_file_read_post.
2020-06-03 14:46:52 +10:00
Campbell Barton
45b5f4e3df Cleanup: minor changes to wm_homefile_read
Move app_template assignment to the top of the function,
this simplifies further changes.
2020-06-03 14:46:52 +10:00
Hans Goudey
a5e9f024f2 Fix T77289: Crash when typing negative numbers
This was caused by an oversight in rB45dbc38a8b15. When the next operation
character is found the offset is shifted in the original string. The remaining
length has to be recalculated with that offset before shifting the remaining
characters to make room for the ")".
2020-06-03 00:37:26 -04:00
Aaron Carlisle
2e52b3206c PyDoc: Fix warnings from out of bounds include statement 2020-06-02 18:21:42 -04:00
Clément Foucault
650dedfd10 Cleanup: GPUTexture: Remove uneeded bind 2020-06-02 23:44:22 +02:00
Clément Foucault
a1f9eebc0b DRW: Remove automatic bind locations and use hardcoded locations for textures
This cleanup use the recent changes in shader interface to allow querying
the binding location a texture should use.

This should aleviate all issue we have with texture state change recompiling
the shaders at drawtime.

All binds are now treated like persistent binds and will stick until a new
shading group bind a different shader. The only difference is that you can
still change it with a new subgroup or same shader shgroup.

Since unbinding can be heavy we only do it when using `--debug-gpu`.
2020-06-02 23:44:22 +02:00
Clément Foucault
47eccac21c GPUShaderInterface: Fix out of bound reads 2020-06-02 23:44:22 +02:00
Clément Foucault
ee4bafc63a GPU: Texture: Remove multibind tracking
This is more of a limitation than it is a solution.
2020-06-02 23:44:22 +02:00
Clément Foucault
beef67d1df GPUShader: Bind shader for interface creation
This will fix the bindpoints not being set at interface creation
2020-06-02 23:44:22 +02:00
Hans Goudey
ea92f8207a Revert "UI: Fix T77173: Report Background Colors for 2.83 Release"
This reverts commit 7fc0053c27e5e9ba3cc946898c7c11a8545f2777.
2020-06-02 15:59:37 -04:00
Hans Goudey
e391b3e0fb Merge branch 'blender-v2.83-release' 2020-06-02 15:58:38 -04:00
Philipp Oeser
a87eee65fc Fix T76196: Curve Display hides wires as soon as any part has faces [due
to filling/extrude/etc]

Caused by rB6da097136cf4.

The file in the report has some parts of the curve object generate faces
[due to success in filling] and some others dont [where filling isnt
possible].

rB6da097136cf4 disabled the wires/curves drawing whenever any faces
would be generated (but the only way to see all wires was to set the
Fill Mode to None then).

So now only skip the wires/curves drawing if we are _not_ in wireframe
viewport shading and the object's viewport display options is above
'WIRE'.

This is an alternative fix to D7594 (and I think the better alternative,
thx @stevewarner suggesting this).

Maniphest Tasks: T76196

Differential Revision: https://developer.blender.org/D7874
2020-06-02 21:42:34 +02:00
Hans Goudey
7fc0053c27 UI: Fix T77173: Report Background Colors for 2.83 Release
This is a temporary solution for T77173 for the 2.83 release. D7203
provides a more long term solution for future releases.

This adds theme colors for the three report backgrounds, setting them
to the color used in 2.82. A separate commit in the addons repository
will follow for changes to the bundled themes.

Differential Revision: https://developer.blender.org/D7908
2020-06-02 15:04:46 -04:00
Pablo Dobarro
85098bdb89 Fix T76776: Implement vertex_visibility_get for PBVH_GRIDS
This was missing from when Face Sets were enabled in Multires, so it was
always considering that all vertices in the grids are visible. This
should also fix other unreported bugs.

Reviewed By: sergey

Maniphest Tasks: T76776

Differential Revision: https://developer.blender.org/D7809
2020-06-02 20:52:46 +02:00
Hans Goudey
071cc71fb0 Cleanup: Use const context for some UI templates
- uiTemplateID: Straightforward, just const for the template
    and the functions it calls
  - uiTemplateCacheFile: Create a function in rna_ui.c because
    the generated RNA callback doesn't have const context.

Differential Revision: https://developer.blender.org/D7895
2020-06-02 14:09:01 -04:00
Jeroen Bakker
dcdbcf1ec1 Fix: Crash Edit Mode Selection RCS 2020-06-02 19:57:02 +02:00
Tautvydas Andrikys
ffb3365fb2 Fix T63588: Cycles unnecessarily updates background importance sampling map
With modifications by Brecht to solve T77273, crash enabling portal lights.
2020-06-02 19:48:51 +02:00
Brecht Van Lommel
0465086223 Merge branch 'blender-v2.83-release' 2020-06-02 19:48:45 +02:00
Brecht Van Lommel
52cc412e0f Revert "Fix T63588: Cycles unnecessarily updates background importance sampling map"
This reverts commit 33ce0cb5a1edea4b5aaa7d37f6ad74b3b35b95f8.

Fix T77273: crash enabling portal lights. The optimization for background
updates can be added back later for 2.90 and 2.83.1.
2020-06-02 19:44:12 +02:00
Pablo Dobarro
572c472754 Cleanup: Always use pbvh in PBVH BKE files
Reviewed By: sergey

Differential Revision: https://developer.blender.org/D7889
2020-06-02 19:40:08 +02:00
Jeroen Bakker
4153606edd Fix: Crash When Selecting In Edit Mode
TaskGraph wasn't initialized in `DRW_draw_select_id`
2020-06-02 19:09:38 +02:00
Pablo Dobarro
b08caeb92b Sculpt: Improve twist axis in Pose FK mode
Previously, the twist rotation was aligned using the stroke location.
This was causing unexpected results when rotating some Face Sets rigs.
Now the intersection with the first Face Set in the flood fill is used,
which produces much better results.

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D7900
2020-06-02 18:39:41 +02:00
Pablo Dobarro
ca09625dcc Cleanup: Remove unused grab delta in Pose Brush
The grab delta is not used in do_pose_brush_task_cb_ex, so there is no
reason to add it to SculptThreadedTaskData

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D7901
2020-06-02 18:38:20 +02:00
Julian Eisel
417ebc3845 UI: Expand linked/overriden collections by default in the Outliner
When linking or overriding an instanced collection, the new collection item in
the Outliner is now un-collapsed by default.
Linking and overriding is typically used in production scenes, where
collections tend to contain many items (children, grand-children, etc.). If all
collections in that hierarchy are expanded by default, the Outliner gets
flooded with items. So users ended up manually collapsing the collections.

Part of T76555.

Reviewed by: Andy Goralczyk, Bastien Montange.

Differential Revision: https://developer.blender.org/D7626
2020-06-02 17:59:08 +02:00
Julian Eisel
bd3ab27410 Library Overrides: Don't move collections to Scene Collection when overriding
When using the "Make Library Override" operator on instance collections, keep
the overriden collection in the parent collection of the instance empty.
Previoulsy the collection would be added to the scene collection, which was
confusing and not what users expected. It was placed there for a reason after
all.

Part of T76555.

Reviewed by: Andy Goralczyk, Bastien Montange.

Differential Revision: https://developer.blender.org/D7626
2020-06-02 17:59:08 +02:00
Julian Eisel
1743326889 Library Overrides: Unlink instance empty after "Make Library Override"
Unlink (delete if single-user) collection instance empty once an override is
added to the collection through the "Make Library Override" operator. It isn't
used as a collection instance anymore then so the emtpy is an annoying left
over that has no purpose.

Part of T76555.

Reviewed by: Andy Goralczyk, Bastien Montange.

Differential Revision: https://developer.blender.org/D7626
2020-06-02 17:59:08 +02:00
cdf0d95a50 Fix T77126: Documented frame_change_pre and frame_change_post handlers
The documentation for the `frame_change_pre` and `frame_change_post`
handlers was really sparse, and suggested that `frame_change_pre` is
called before the frame changes. This is not the case; it's called after
the frame has changed, but before the dependency graph has been updated
for it.

No functional changes, just updated documentation.

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

Reviewed by: sergey
2020-06-02 17:31:45 +02:00
Bastien Montagne
6a70d7e09f Fix utterly broken versionning code for weight modifier.
Own fault in some recent patch rewiew/commit...
2020-06-02 17:30:02 +02:00
Bastien Montagne
9d9f35d946 Cleanup: factorize duplicated code in WVG modifiers' RNA. 2020-06-02 17:30:02 +02:00
Campbell Barton
5ef44dd83f Cleanup: unused argument 2020-06-03 01:05:25 +10:00
Campbell Barton
9713df4e92 Merge branch 'blender-v2.83-release' 2020-06-03 00:59:56 +10:00
Campbell Barton
2c204432df Merge branch 'blender-v2.83-release' 2020-06-03 00:59:52 +10:00
Campbell Barton
e69f70e11f Revert "Fix T67577: Add-on unregister can't access preferences on factory reset"
This reverts commit f18ed7ad890ee5c89fc6e6a22e76c732fb5fc1bc.

Better leave the fix for 2.9 series.
2020-06-03 00:59:45 +10:00
Campbell Barton
50994eace6 Fix T66967: skin modifier crash scaling skin radius to zero 2020-06-03 00:59:44 +10:00
Clément Foucault
b18c2a3c41 EEVEE: Refactor of eevee_material.c
These are the modifications:

-With DRW modification we reduce the number of passes we need to populate.
-Rename passes for consistent naming.
-Reduce complexity in code compilation
-Cleanup how renderpass accumulation passes are setup, using pass instances.
-Make sculpt mode compatible with shadows
-Make hair passes compatible with SSS
-Error shader and lookdev materials now use standalone materials.
-Support default shader (world and material) using a default nodetree internally.
-Change BLEND_CLIP to be emulated by gpu nodetree. Making less shader variations.
-Use BLI_memblock for cache memory allocation.
-Renderpasses are handled by switching a UBO ref bind.

One major hack in this patch is the use of modified pointer as ghash keys.
This rely on the assumption that the keys will never overlap because the
number of options per key will never be bigger than the pointed struct.

The use of one single nodetree to support default material is also a bit hacky
since it won't support concurent usage of this nodetree.
(see EEVEE_shader_default_surface_nodetree)

Another change is that objects with shader errors now appear solid magenta instead
of shaded magenta. This is only because of code reuse purpose but could be changed
if really needed.

Reviewed By: jbakker

Differential Revision: https://developer.blender.org/D7642
2020-06-02 16:58:07 +02:00
Campbell Barton
eba3aa1837 Revert "Fix T67577: Add-on unregister can't access preferences on factory reset"
This reverts commit f18ed7ad890ee5c89fc6e6a22e76c732fb5fc1bc.

Better leave the fix for 2.9 series.
2020-06-03 00:54:29 +10:00
Clément Foucault
b82cb0ad32 Cleanup: GPU: Remove GPU_shaderinterface_uniform_ensure 2020-06-02 16:46:38 +02:00
Clément Foucault
38cfcdd51b DRW: Remove defered uniform creation 2020-06-02 16:46:38 +02:00
Clément Foucault
cb59ef1032 OCIO: GLSL: Avoid undefined behavior
Set ubo binding after shaderinterface creation as GPU_shaderinterface_create
will call glUniformBlockBinding.
2020-06-02 16:46:38 +02:00
Jeroen Bakker
0749cff957 Depsgraph: Remove unneeded RNA_path_resolve
Found during research of {T77124}. In `build_driver_data` an identical
 RNA_path is resolved twice. In stead of resolving it twice this patch
will construct the `property_exit_key` based on the resolution of
`property_entry_key`.

This change isn't noticeable for users. Just a cleanup as it isn't
needed to do the same logic twice.

Reviewed By: Sergey Sharybin

Differential Revision: https://developer.blender.org/D7872
2020-06-02 16:02:59 +02:00
Jeroen Bakker
752139556f BVHCache: Performance
This patch changes the BVHCache implementation. It will use
a primitive array in stead of the ListBase. The locking is also
changed from a global lock to a per cache instance lock.

The performance of `gabby.blend` available on the cloud increased from 9.7
fps to 10.5 fps.

Reviewed By: Brecht van Lommel

Differential Revision: https://developer.blender.org/D7817
2020-06-02 16:01:14 +02:00
Jeroen Bakker
bf34b0c8f4 DrawManager: Graph Task Scheduling
This patch uses a graph flow scheduler for creating all mesh batches.
On a Ryzen 1700 the framerate of Spring/020_02A.anim.blend went from 10 fps to 11.5 fps.

For each mesh where batches needs to be updated a sub-graph will be added to the task_graph.
This sub-graph starts with an extract_render_data_node. This fills/converts the required data
from Mesh.

Small extractions and extractions that can't be multi-threaded are grouped in a single
`extract_single_threaded_task_node`.

Other extractions will create a node for each loop exceeding 4096 items. these nodes are
linked to the `user_data_init_task_node`. the `user_data_init_task_node` prepares the userdata
needed for the extraction based on the data extracted from the mesh.

Note: If the `lines` and `lines_loose` are requested, the `lines_loose` sub-buffer is created
as part of the lines extraction. When the lines_loose is only requested the sub-buffer is
created from the existing `lines` buffer. It is assumed that the lines buffer is always
requested before or together with the lines_loose what is always the case (see
`DRW_batch_requested(cache->batch.loose_edges, GPU_PRIM_LINES)` in `draw_cache_impl_mesh.c`).

Reviewed By: Clément Foucault

Differential Revision: https://developer.blender.org/D7618
2020-06-02 15:54:45 +02:00
Campbell Barton
0a00fbd265 Fix T66967: skin modifier crash scaling skin radius to zero 2020-06-02 23:45:51 +10:00
Bastien Montagne
21443056b7 Turn most flags in BlenderDefRNA into proper bool. 2020-06-02 15:18:14 +02:00
Bastien Montagne
43ec8c287f Cleanup: RNA: use BlenderDefRNAtruct named members initialization. 2020-06-02 15:14:10 +02:00
Clément Foucault
cecda64e2e GPU: ShaderInterface: Refactor to setup all uniform at creation time
This remove the complexity of queriying the locations at runtime and
allows for more performance and upfront binding specifications.

The benefit of doing everything at creation time is that we can assign binding
points in a predictable order which is going to be somewhat the same for
every similar shader.

This also rewrite GPU_vertformat_from_shader to not use shaderface.

This is to keep the shaderface simple. If it becomes necessary to not query
the shader after creation (i.e: vulkan?) we could just create the vert
format in advance at compilation for PyGPU shaders.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D7879
2020-06-02 12:11:39 +02:00
Clément Foucault
bdda53fdb2 GPU: Texture: Replace internal sampler state by explicit state object
This makes it easier to track as well as allowing us to sample the same
texture with different sampling parameters (which should fix the related
T73942 in the long run).

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D7831
2020-06-02 10:47:56 +02:00
Campbell Barton
074d469165 Merge branch 'blender-v2.83-release' 2020-06-02 18:39:28 +10:00