1
1

Compare commits

...

3244 Commits

Author SHA1 Message Date
d8f46a4452 EEVEE: Motion Blur: Use CFRA instead of depsgraph ctime
This fixes time remapping issues.
2020-06-12 15:17:15 +02:00
a737ca11e1 EEVEE: Motion Blur: Fix issues with animated objects visibility 2020-06-12 14:21:17 +02:00
92520f1791 Merge branch 'master' into eevee-motionblur-object 2020-06-12 14:07:13 +02:00
fd14d1cceb DRW: Avoid undefined behavior when running multiple iteration
This was caused by DST.dupli_origin not being reset properly. This had
not effect in master but has effect in EEVEE motion blur branch.
2020-06-12 14:06:53 +02:00
6a1a894df1 EEVEE: Motion Blur: Support Duplis and assume they are always moving 2020-06-12 14:04:17 +02:00
a809631ff2 VR: Fix too dark rendering on SteamVR
Apply the sRGB transform workaround we already apply for Monado (and used
to apply for Windows Mixed Reality).
2020-06-12 13:12:45 +02:00
f12fe3c23e VR: SteamVR is now a supported OpenXR runtime! (Windows only)
Steam just released a SteamVR update with OpenXR Developer Preview
support:
https://steamcommunity.com/games/250820/announcements/detail/2396425843528787270.

Once SteamVR is set up for OpenXR (see link above), it works with
Blender "out of the box", thanks to OpenXR!

We have to apply the sRGB transform workaround for SteamVR though,
otherwise it renders way too dark. Done in the next commit.

Note that AMD users may still only see a pink screen, because the
OpenGL-DirectX compatibility fails. I will check on a fix again.
For SteamVR on Linux we may have to wait for until it supports OpenGL
rendering for OpenXR. Alternatively, we *could* add initial Vulkan
support at Ghost level and use Vulkan<->OpenGL interoperability
extensions, Monado uses these as  well.
2020-06-12 13:12:14 +02:00
16595b9ea1 Cleanup: split object data deform functions into their own files
Move armature/curve functions into their headers,
they were previously in BKE_lattice.h
2020-06-12 16:27:46 +10:00
5549fa5466 Cleanup: use doxy sections for armature.c 2020-06-12 15:06:07 +10:00
f79856f9fb Cleanup: minor changes to deform functions
- Use 'float (*)[3]' to avoid casts.
- Remove unnecessary float[3] copy in gpencil_deform_verts.
- Use MEM_SAFE_FREE
- Use const arguments.
2020-06-12 14:39:49 +10:00
24d39620fb Cleanup: split deform functions that take target object-data
Prefer meaningful function names over redundant NULL arguments.

Also clarify variable names as it wasn't obvious the object-data
is part of the object target.
2020-06-12 13:53:25 +10:00
c02baf8b50 Cleanup: use BKE_ prefix for deform functions 2020-06-12 12:52:24 +10:00
c73ee8d998 Makefile: Add build target for release
Fixes T77353
2020-06-11 17:28:01 -04:00
c98f92f998 EEVEE: Motion Blur: Auto detect animation and deformation on objects
This remove the overhead of deformation and normal motion blur
for all static objects.
2020-06-11 22:27:29 +02:00
4f9d1a5765 EEVEE: Motion Blur: Use less VRAM and improve larger blur
Larger blur now use a more stable approach. We repeat the expand process
instead of making tiles bigger.
2020-06-11 20:37:51 +02:00
526e8a3da1 GPencil: Cleanup transform code 2020-06-11 20:35:50 +02:00
a03ebe9431 UI: Adjust names for Find/Replace Set Selection
This is really doing two operation so using the ampersand makes more 
sense.
Also selection sounds better than selected.
This also adjusts the name in the text Edit menu which was an issue 
raised in T68738
2020-06-11 14:05:57 -04:00
a61ba6c73d Fix possibility to add objects in override collections.
Override collections do not support that, add proper checks in BKE code
adding objects to collections.

Also try to find a suitable collection in parents in that case.

Note that this is enforced on 'public' API level, internal code can
still bypass those checks if needed. Exposing this possibility to public
API should not be needed.
2020-06-11 17:33:06 +02:00
33359237fe EEVEE: Motion Blur: Expose max blur and depth scale 2020-06-11 16:37:11 +02:00
3d18bd5c51 BLI: define default hash function for const types 2020-06-11 16:16:44 +02:00
49af2f85c3 BLI: fix forwarding with incorrect type 2020-06-11 16:01:25 +02:00
a364032dff Cleanup: fix terminology in comment 2020-06-11 15:39:53 +02:00
e44045745d BLI: don't pass const pointers to placement new operator
This resulted in compile errors.
2020-06-11 15:37:09 +02:00
e22098616c BLI: include <new> header
This header defines default placement versions of operator new.
2020-06-11 15:37:09 +02:00
Jeroen Bakker
ed00b5def6 Fix T77657: NVIDIA Quadro FX4800 crash on startup
Limit support for `GLEW_ARB_base_instance` to OpenGL 4.0 and higher. NVIDIA Quadro FX 4800
(TeraScale) report that they support GLEW_ARB_base_instance, but the driver does not support
`GLEW_ARB_draw_indirect` as it has an OpenGL3 context what also matches the minimum needed
requirements.

We use `GLEW_ARB_draw_indirect` as a target for `glMapBuffer(Range)` what is part of the
OpenGL 4 API. So better disable it when we don't have an OpenGL4 context.

Note: fix should be ported to Blender 2.83 LTS

Reviewed By: Clément Foucault

Differential Revision: https://developer.blender.org/D7994
2020-06-11 15:34:35 +02:00
8ac06377a5 EEVEE: Motion Blur: Fix camera near/far values uniforms 2020-06-11 15:05:21 +02:00
a0c947ed4c EEVEE: Motion Blur: Replace Wang Hash Noise function by blue noise 2020-06-11 14:27:20 +02:00
9385d887d1 Fix bad poll function for constraints in liboverrides. 2020-06-11 12:01:20 +02:00
95aa8ffed5 BLI: fix printing name in print_stats methods of Map, Set and VectorSet 2020-06-11 11:21:51 +02:00
665acd2903 Fix T69497: Color Correction node ignores mask in certain cases
Happens when some of the color correction terms are mathematically
undefined: foe example, when pow() is to be calculated and the X
argument is negative.

There is no ground-truth result in such cases, so ignore such terms
entirely.

This is a generalization of D6696 from Jacques.

Differential Revision: https://developer.blender.org/D7966
2020-06-11 11:02:33 +02:00
f028760b83 BLI: make Map::Item and Map::MutableItem more accessible
This makes it easier to write range-for loops over all items
in the map without using auto.
2020-06-11 10:48:52 +02:00
3f648f5b42 Fix T77171: File selector doesn't tag preferences to be saved 2020-06-11 17:24:00 +10:00
e43a948a2c Sequencer: view toggle no longer cycles over SEQUENCER_PREVIEW state
- Remove the operator, use a generic operator instead.
- Switch between PREVIEW/SEQUENCER as the mixed state isn't as useful.
- Add menu item  to make the shortcut discoverable.
- Remove unused & broken "View Type" menu.
2020-06-11 16:36:23 +10:00
e916817520 Cleanup: move sequencer view operators into sequencer_view.c 2020-06-11 16:01:47 +10:00
cc064acf0f UI: exclude context menus from menu search
This causes the search result to be less predictable as well as
including menu items multiple times.
2020-06-11 15:39:03 +10:00
a76fc2f7ed WM: utility function to iterate on menu types 2020-06-11 15:35:46 +10:00
2c463a8250 ImBuf: use more accurate DPI/PPM conversion
Use 0.0254 for conversion as 39.3700787 isn't exactly 1/0.0254
and can't be written as a round float/double.
2020-06-11 15:04:11 +10:00
0439094105 Cleanup: make the sculpt convert type follow transform convention 2020-06-10 16:36:16 -03:00
bfa5eceb89 UI: Only set panel data expand flag for active panels
This solves a crash when switching from the modifiers tab to an armature
object and expanding a panel. Thanks to Alexander Gavrilov for mentioning
the problem.
2020-06-10 14:56:52 -04:00
faf5f7b63d Cleanup: fix compiler warning after recent changes
It would be good to use override for all member functions, but doing it for
only somes generates compiler warning.
2020-06-10 20:34:01 +02:00
63930c41bc Fix Cycles viewport missing refresh when changing scene hair settings
This code was not updated for the CoW depsgraph.
2020-06-10 19:48:08 +02:00
0621c13b3e Add proper handling of liboverrides to Scene deep copy.
Followup to rB74ec37b70cbc8dc2, also missed a case in collection
deepcopy then.
2020-06-10 19:45:52 +02:00
14bd92b12f Installdeps: Fix broken commit rBe3396d8bfc94.
Not sure why final version of the change was lost...
2020-06-10 19:45:52 +02:00
91462fbb31 Cleanup: Remove no more used ED_object_single_users.
This utils was only used for scenes' full copy, and was using old
deprecated ways to deal with ID relations and such. Good riddance!
2020-06-10 19:45:52 +02:00
4f314ee5b9 Cleanup: rename BKE_scene_copy to _update.
Matches other similar cases for collection and object, and general
naming rule (copy is for generic ID copying, duplicate is for more
involved and poweful behaviors specific to an ID type).
2020-06-10 19:45:52 +02:00
eee35ebdfb Make BKE_scene_copy fully handle all duplicate modes, deep copy included.
This greatly simplifies and unifies logic.

Also addresses T77255: full scene copy will now use same preferences
parameters as object or collection duplicate to choose which data-blocks
to copy along.
2020-06-10 19:45:52 +02:00
b05fa123d7 Make `BKE_collection_duplicate able to handle master collections.
Those are then assumed already duplicated, and not touched. However, all
of ther objects and sub-collections can still be processed as with any
other regular collection...
2020-06-10 19:45:52 +02:00
5fab2ce500 EEVEE: Motion Blur: Randomize velocity tile boundaries to avoid artifacts
This follows the paper implementation. This gives nice results on complex
motions.
2020-06-10 19:43:05 +02:00
e7744caf64 EEVEE: Motion Blur: Use Tile max dominant velocity reduction pre-passes
This makes the bluring post process quicker.
2020-06-10 19:41:58 +02:00
474b288933 BLI: add Map.pop_default method
There is a nice use case for this in depsgraph code.

Also I added some previously missing calls to std::move.
2020-06-10 19:02:34 +02:00
20658e6a29 Fix T77047: Dyntopo Sample detail size on hidden mesh causes crash
The `Toolbar` and `Sidebar` hide the corresponding panel
`VIEW3D_PT_sculpt_dyntopo` by polling for context.sculpt_object and
context.tool_settings.sculpt. In the Active Tool in the Properties
Editor this poll does not return False though, thus the
sample_detail_size is possible from there.

Second security check (the operator poll `SCULPT_mode_poll`) checks the
active object -- that is still valid even if hidden, so we are allowed
to execute the operator. However the active object becomes NULL once the
area is switched in `sample_detail()` -- see `CTX_wm_area_set`), leading
to the crash.

Dont think there is a quick and easy way to do this in the poll from the
Properties Editor, so just check for a valid active abject in the
operator and return OPERATOR_CANCELLED if we dont have it.

Maniphest Tasks: T77047

Differential Revision: https://developer.blender.org/D7832
2020-06-10 18:46:41 +02:00
4b39de677d Fix T74101: File Browser in macOS fullscreen crashes or makes windows unusable
When closing the File Browser window after making it fullscreen, Blender would
either crash or all windows would disappear, with no obvious way to bring them
back.

The "fix" is to not allow fullscreen for File Browsers (or any future "dialog"
windows), but only maximizing. From what I can tell that's how secondary
windows are supposed to work on macOS. What we previously did seemed like
something macOS doesn't handle cleanly, and I didn't find a simple way to do so
on our side.
2020-06-10 18:40:05 +02:00
84d4447bc5 BLI: fix type forwarding in Map
Without this change, the code might do an unwanted conversion.
2020-06-10 18:27:18 +02:00
4c172f7ca6 BLI: support constructing StringRef from start and end pointer 2020-06-10 18:27:18 +02:00
2d695367a7 UI: More specific modifier move to index operator description 2020-06-10 11:23:03 -04:00
a9dfad831b Fix T77694: Start panel animation when expansion data changes
During normal drawing there is a rather complicated method to check
whether the panels should be animating. It's not set up to deal with
the panel expansion changing from outside the UI, which is now possible
with the panel expansion connected to the modifier's show_expanded
property.

The solution is to activate panel animation if setting the expansion
property has changed.
2020-06-10 11:16:55 -04:00
b0ac7a89b0 UI: Only set first bit of modifier expansion fag with Python
Only the flag for the top level panels is exposed with RNA, so this adds
a set method to only change that bit.
2020-06-10 11:08:58 -04:00
9b784668ae Cleanup: use proper enum type in parameter of BKE_scene_copy. 2020-06-10 17:01:15 +02:00
74ec37b70c Enable (deep) copy of overrides.
This commit enables basic copy of overrides on generic ID level, as well
as from (deep) copy operators for objects and collections.

So e.g. if your linked overridden caracter is in a collection, you can
now (from the outliner) Duplicate that override collection to get a new
overriding copy of the character.

We still need operators (new or modifying existing ones) to handle that
from 3DView e.g.

Note that deep copy code for objects/collections (and incidently
animdata) had to be modified to avoid duplicating/making local IDs that
remain linked ones being used by overrides ones.
2020-06-10 16:48:49 +02:00
1d0017089c Fix (unreported) disapearance of some overrides after save & reload.
The override operations generated from 'do not follow' RNA pointer
properties (i.e. pointers to other IDs) were not properly clearing their
'no more used' flag, and hence were incorrectly deleted on second save.
2020-06-10 16:48:49 +02:00
3ea04d3e11 Blenloader: Don't just crash when a struct name is not known
Related to T77524.

This brings back the old way of handling corrupted data.
2020-06-10 16:31:41 +02:00
6fe32d7fd6 Fix T77524: Don't try to write storage of node with undefined node
This cannot work, because the storagename is the empty string.
2020-06-10 16:16:03 +02:00
d62bbf4079 UI: Show library names grayed out and right-aligned in menus
Should separate the data-block name better from the library name and improve
readability.
2020-06-10 15:52:10 +02:00
93c8955a72 Mesh Edit: preserve Custom Normal vectors in topology operators.
Custom Loop Normals are normally encoded relative to the default
normals, similar to normal maps, allowing them to naturally follow
mesh deformations. Changes to mesh topology however often result
in nonsensical effects that are not desired.

The Remove Doubles operation especially (now known as Merge By
Distance) is intended as a purely topological operation, and
definitely should not change the vector of the custom normals.

This patch implements that behavior by converting the relative
encoding into an absolute vector layer for the duration of the
operation. It also modifies other Merge types in this way for
consistency, the Rip operator as their inverse counterpart;
and also Delete, Dissolve, Connect Path and Knife operators
as other examples more related to topology than shape.

On the technical side, this ports mesh_normals_loop_custom_set
to BMesh, and then uses a temporary Custom Data layer to store
the normals as vectors for the duration of the above mentioned
operations. When the normals are converted back to custom data,
the caller can choose whether to mark edges as sharp to preserve
distinct normals, or just average them instead. All but Remove
Doubles choose to average for now.

Differential Revision: https://developer.blender.org/D4994
2020-06-10 16:51:22 +03:00
a58dc25b07 Cleanup: improve custom data type names
This is related to T76659.

This just renames data type names to `CD_PROP_STRING`, `CD_PROP_FLOAT`
and `CD_PROP_INT32`. It makes them a bit more specific and removes
unnecessary abbreviations.

Reviewers: brecht

Differential Revision: https://developer.blender.org/D7980
2020-06-10 15:47:31 +02:00
cc26041d36 Depsgraph: use blender::Set instead of std::set
We decided that `blender::Set` should be the default choice for a set
data structure in Blender.

Reviewers: sergey

Differential Revision: https://developer.blender.org/D7982
2020-06-10 15:42:35 +02:00
a7ea07c677 Depsgraph: use blender::Vector instead of std::vector
We decided that `blender::Vector` should be the default choice for
a vector data structure in Blender.

Reviewers: sergey

Differential Revision: https://developer.blender.org/D7981
2020-06-10 15:33:50 +02:00
0852d13bbd Depsgraph: use native Set data structure
Differential Revision: https://developer.blender.org/D7982
2020-06-10 15:24:03 +02:00
044b824c9d Cleanup: remove unused MBALL_NOSEL flag 2020-06-10 23:01:57 +10:00
eda58c47b8 Cleanup: asan warning with bit-shifting flag 2020-06-10 23:01:57 +10:00
4fefe3ac3b BLI: rename tests from "array_ref" to "span"
This was missing in an earlier commit.
2020-06-10 14:50:29 +02:00
a71f073dfb BLI: add Map.pop_try method
I found this pattern in depsgraph code more than once.
2020-06-10 14:47:22 +02:00
75ce20a000 Cleanup: redundant headers 2020-06-10 22:34:11 +10:00
0ca0ad5318 Cleanup: move BKE_mesh_wrapper functions into own header 2020-06-10 22:34:11 +10:00
84a0a6d16c BLI: update behavior of Map.lookup_or_add
Previously, this function would expect a callback function as parameter.
This behavior is now in Map.lookup_or_add_cb. The new version just
takes the key and value directly.
2020-06-10 14:15:04 +02:00
f367f1e5a5 Cycles: Improve OptiX viewport denoising performance with CUDA rendering
With this patch Cycles recognizing when a logical OptiX and CUDA device represent the same
physical GPU and attempts to eliminate unnecessary tile copies for viewport rendering if that
is the case for all active devices. In addition, denoising is now no longer performed on the first
available OptiX device only, but instead it will try to match CUDA and OptiX
rendering/denoising devices exactly to maximize utilization.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D7975
2020-06-10 14:12:13 +02:00
00f8cfd4ac Merge branch 'master' into eevee-motionblur-object 2020-06-10 13:37:36 +02:00
d12f6a90b1 Fix T77599 Image UV editor use linear interpolation 2020-06-10 13:37:04 +02:00
d4315040ad Cycles: Fix CUDA compilation after cone sampling fix 2020-06-10 13:02:43 +02:00
146473f083 GPencil: Include new Bevel parameters when convert stroke to Curve
These new parameters allow to define bevel depth and resolution.

Related to T77631
2020-06-10 11:42:35 +02:00
82f51fe913 Fix T77356: Texture Preview not taking alpha into account
Since rB329b4c3363e4 a texture preview is not rendered through the
preview.blend and a renderengine anymore [unlike materials etc.]

Alpha wasnt handled in that commit, take that into account now.

sidenote: not sure if we should be looking into drawing alpha with a
checkerboard in the background for texture previews (see texture
previews elsewhere)?

sidenote 2: might also be good to document where the "calculate" and
"invert" alpha options are still used? [looks a bit inconsistent:
compositor uses it, Image Editor as well as Render Engines dont?]

Maniphest Tasks: T77356

Differential Revision: https://developer.blender.org/D7929
2020-06-10 11:07:20 +02:00
df50104e1c Fix T77068: UV Proportional Edit "Connected Only" option affects UV
clipping (even if the proportional edit itself is disabled)

Checking T_PROP_EDIT_ALL returns true for _any_ of the options, so just
check for T_PROP_EDIT.

Note: this might expand to other similar checks (e.g. header text)

Maniphest Tasks: T77068

Differential Revision: https://developer.blender.org/D7927
2020-06-10 11:02:09 +02:00
fc8a7a44b2 Fix T77560: Bone selection crashes
The was caused by 8b347fc2cd as the old BONESEL_NOSEL flag
handled the -1 case (used for none).

Instead of checking for -1, remove these elements from the array
as selection code makes decisions based on the number of hits detected.
2020-06-10 18:04:01 +10:00
edb4e553f5 LibOverride: Fix issues related to ID name differences.
Local datablocks (including overrides) need to have a unique name, which
can then differ from the reference linked one (especially when there are
several local overrides of a same linked data).

Issue is, ID name is a 'rna name property', and as such used as
reference when dealing with override of collections of IDs, so we cannot
have a changing name.

The solution implemented here should work and is simple, but it may have
some issues in corner cases (time will say), it is not really robust.

Alternative solution would be to store ID pointers as reference in
override operations, instead of there name. But that would potentially
add quiet a lot of overhead to foreach looping in `lib_query.c`.
2020-06-10 09:38:34 +02:00
2d1b560a4e Fix T77632: Deform modifier auto-binding not working
Regression in deaff945d0
2020-06-10 15:54:05 +10:00
a4bb4b6e65 Mesh: utility functions to access wrapped mesh coordinates 2020-06-10 15:54:00 +10:00
48ca66cfe7 Fix T77195: Crash with edit-mesh viewport measurements enabled
Simplify looping over faces & tessellation data.

Regression in 6526c3ced8, the index accessed wasn't valid.
2020-06-10 13:46:10 +10:00
46e0ec05ef Cleanup: Move each special_aftertrans_update to their respective TransData file 2020-06-09 20:27:51 -03:00
63a40ed422 Cycles: Fix uniform cone sampling
This code is currently only used for the Glossy Toon BSDF, but it's a generic
building block that might be used for other things in the future.

To see why the current code does not give a uniform distribution, consider that
it chooses both angles uniformly, but the smaller the angle from the center of
the cone is, the smaller the differential solid angle is (similar to how
sampling disks by choosing radius and phi uniformly does not work).

Differential Revision: https://developer.blender.org/D7948
2020-06-09 22:19:15 +02:00
d3f83d9f95 UI: Remove extra separator in some cases 2020-06-09 15:11:14 -04:00
d1932a8ed6 Fix missing animation decorators for pointer buttons
Also, remove manually placed decorator for vertex groups in modifiers. This was
only needed because of this bug, and the layout was slightly misaligned.
2020-06-09 20:42:22 +02:00
819ebc9901 UI: Set modifier panel expansion on every redraw
This will fix situations where the modifier epansion was set elsewhere
besides the UI, like from the python console, solving the drawing part
of T77502.

Also adds  update tags to the show_expanded property, which means
the properties window redraws when the property changes.
2020-06-09 13:41:50 -04:00
cb9de95d61 Sculpt: Face Set Edit Operator
This operator performs an edit operation in the active face set defined
by the cursor position and updates the visibility. For now, it has a
Grow and Shrink operations, similar to Select More/Less in edit mode or
to the mask filter Grow/Shrink modes. More operations can be added in
the future.

In multires, this updates the visibility of an entire face from the base
mesh at once, which makes it very convenient to edit the visible area
without manipulating the face set directly.

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D7367
2020-06-09 19:09:50 +02:00
77789a1904 Sculpt: Pose Squash and Stretch deform mode
This implements squash and stretch as a deform mode for the Pose Brush.
It is similar to scale, but it applies different scale values in different
axis. To achieve this, the pivot local space of the transform needs to
be aligned to the segment when using this deform mode to apply the scale
in the correct direction.

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D7934
2020-06-09 18:49:10 +02:00
075156de9f Voxel Size Edit: Fix text not readable when zooming in the viewport
Previously the scale of the text was using object space, so when working
with scaled objects or small meshes the size of the text was wrong. Now
it calculates a scale in screen space, so the text size should be much
more predictable

Reviewed By: sergey, Severin

Differential Revision: https://developer.blender.org/D7941
2020-06-09 18:28:41 +02:00
69b67d4f07 Fix Edit Voxel Size label in preview
The format string was wrong so it was rendering an extra % character

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D7942
2020-06-09 18:27:18 +02:00
53d1a729cc UI: Avoid rebuilding Outliner tree on simple button interactions
E.g. simply on button hover changes, the tree would be needlessly rebuilt.

I wouldn't be surprised if this causes side-effects, for some state changes we
may still have to do a full rebuild.
2020-06-09 18:12:56 +02:00
ee64b595da Fix T77504: Operator search gives wrong results
Regression in e8ab0137f8
2020-06-10 01:18:17 +10:00
e1cc9aa7f2 Nodes: efficient node tree queries and inlining
This adds two data structures that wrap a node tree. However, they work
on different abstraction levels.

`NodeTreeRef` is an immutable structure that makes working with a node
tree in C++ much more efficient and convenient. It supports various
queries efficiently, that are not easily possible using just `bNodeTree`.

`DerivedNodeTree` builds on top of `NodeTreeRef`. It contains a flattened
view on the node tree, i.e. with node groups being inlined. Every inlined
node still knows its "call stack". It supports pretty much the same queries
as `NodeTreeRef`.

Both data structures come with a dot graph exporter for debugging purposes.

Reviewers: brecht

Differential Revision: https://developer.blender.org/D7628
2020-06-09 17:08:41 +02:00
b37fca650e Cleanup: Move pointcache dna to separate file
Reviewers: brecht

Differential Revision: https://developer.blender.org/D7965
2020-06-09 17:01:54 +02:00
0cb59866af Cleanup: extract function for common function call sequence 2020-06-09 16:43:34 +02:00
4622434c34 Fix T76894: Disable clipping region selection in material/rendered mode
In this case the draw engine isn't responsible for the selection, but
the editor is.

Reviewed By: Clément Foucault

Differential Revision: https://developer.blender.org/D7955
2020-06-09 16:31:40 +02:00
Evan Wilson
84a5bd9135 Fix T76984: Normal node not drawing properly in compositor
Differential Revision: https://developer.blender.org/D7827
2020-06-09 16:29:31 +02:00
4e9efa80ca Cleanup: correct enum names in comments 2020-06-09 16:23:27 +02:00
9d75f23566 BLI: remove incorrect const 2020-06-09 16:23:27 +02:00
37d68871b7 GPencil: Keep original stroke when reproject
When reproject a stroke sometimes is good to keep the copy of the original stroke to create volume effects

Related to T77639

{F8603513}

Reviewed By: mendio, pepeland

Maniphest Tasks: T77639

Differential Revision: https://developer.blender.org/D7963
50258
2020-06-09 15:46:55 +02:00
c23b1de2cf Fix T72936: Incorrect gizmo orientation with inherit rotation disabled 2020-06-09 22:35:11 +10:00
3ffb52d114 Fix T77448: Camera Solver constraint can't be converted to f-curve
A regression caused by c57f65c088 as a fix of another issue.

Added an exception for camera solver as that is always pointing
to camera object.

Since this is a regression which happened in 2.83.0 this change is
a candidate to be ported to the 2.83.1.
2020-06-09 14:06:35 +02:00
b7150183e7 Cleanup: Silence some overflow warnings in transform code 2020-06-09 08:51:51 -03:00
75008dc4b9 EEVEE: Motion Blur: Use closest interpolation for sampling
This Avoid halo artifacts
2020-06-09 13:35:08 +02:00
8522b429b5 Transform: Fixes after recent refactor
Pointed by strict compiler warnings, but some of the reports were
actually a real bugs:

- Access uninitialized memory of td_mirror_iter.

  Assuming that iterator is to point to the first element of the
  data array.

- Lattice's recalc data was never called.

There is also a fix for redundant declaration of recalcData() and
missing declaration of recalcData_lattice().
2020-06-09 12:19:44 +02:00
5620a09e0d Cleanup: move hashing of OperationIDKey to member function 2020-06-09 12:08:32 +02:00
f7c0f1b8b8 BLI: rename ArrayRef to Span
This also renames `MutableArrayRef` to `MutableSpan`.
The name "Span" works better, because `std::span` will provide
similar functionality in C++20. Furthermore, a shorter, more
concise name for a common data structure is nice.
2020-06-09 11:58:47 +02:00
7d2b4ae9c6 Fix menu operator/search clipping the last character
Noted in T77504
2020-06-09 19:25:59 +10:00
128296129a GPencil: Cleanup doxygen comments 2020-06-09 11:17:21 +02:00
74b0713d8a Fix warning-as-error about int to uint conversion in new BLI CPP code.
Was breaking build for me here...
2020-06-09 11:16:32 +02:00
874a078d86 GPencil: Improve viewlayer masking check
Check if the mask layer is used in a layer that is going to be used in the current viewlayer.

Related to T77667
2020-06-09 11:13:23 +02:00
d68e29b62c Workbench: Fix missing NULL pointer check 2020-06-09 10:59:31 +02:00
9bb7d6ed68 BLI: put C++ data structures in "blender" namespace instead of "BLI"
We plan to use the "blender" namespace in other modules as well.
2020-06-09 10:27:24 +02:00
d8678e02ec BLI: generally improve C++ data structures
The main focus here was to improve the docs significantly. Furthermore,
I reimplemented `Set`, `Map` and `VectorSet`. They are now (usually)
faster, simpler and more customizable. I also rewrote `Stack` to make
it more efficient by avoiding unnecessary copies.

Thanks to everyone who helped with constructive feedback.

Approved by brecht and sybren.

Differential Revision: https://developer.blender.org/D7931
2020-06-09 10:15:43 +02:00
50258d55e7 Cleanup: remove debug prints in py.ops.nla.bake() 2020-06-09 17:57:50 +10:00
7a0ad20e5f Fix mistake in recent fix for text editor overflow 2020-06-09 17:39:43 +10:00
1355d9cc8c Sequencer: restore behavior removed from recent refactor 2020-06-09 16:49:33 +10:00
f88d59ecf8 Fix T77148: Crash changing multiple values for sequencer strips
This was caused by assuming all strips were the same type.
2020-06-09 16:24:50 +10:00
0c4bc09092 Docs: comment text scale behavior
Avoid misunderstanding that caused T77609.
2020-06-09 15:19:31 +10:00
70a27d0a63 Fix T77609: Scale to Fit Text Box fails when text is too narrow
Caused by error in fix for T75965 (83d9ba341e).
2020-06-09 15:07:59 +10:00
f326b6a18e Cleanup: avoid addition with large strings in Python
This is known to be inefficient, use a second write call instead.
2020-06-09 13:40:51 +10:00
8ded0dd4d5 EEVEE: Motion Blur: Split both direction accumulation 2020-06-08 23:38:26 +02:00
e5062a775e EEVEE: Motion Blur: Do not request motion blur data in viewport 2020-06-08 19:21:25 +02:00
13aa113d7d EEVEE: Motion Blur: Simplify shader code 2020-06-08 19:20:56 +02:00
9f7d84b656 Cycles: Add support for P2P memory distribution (e.g. via NVLink)
This change modifies the multi-device implementation to support memory distribution
across devices, to reduce the overall memory footprint of large scenes and allow scenes to
fit entirely into combined GPU memory that previously had to fall back to host memory.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D7426
2020-06-08 17:55:49 +02:00
0a907657d4 Functions: Run-time type system and index mask
This adds a new `CPPType` that encapsulates information about how to handle
instances of a specific data type. This is necessary for the function evaluation
system, which will be used to evaluate most of the particle node trees.

Furthermore, this adds an `IndexMask` class which offers a surprisingly useful
abstraction over an array containing unsigned integers. It makes two assumptions
about the underlying integer array:
* The integers are in ascending order.
* There are no duplicates.

`IndexMask` will be used to "select" certain particles that will be
processed in a data-oriented way. Sometimes, operations don't have to
be applied to all particles, but only some, those that are in the indexed by
the `IndexMask`. The two limitations imposed by an `IndexMask` allow for
better performance.

Reviewers: brecht

Differential Revision: https://developer.blender.org/D7957
2020-06-08 17:37:43 +02:00
b5846ebce7 Fix T77603: OSL parser fails when script ends with comment without newline
Reviewers: brecht

Differential Revision: https://developer.blender.org/D7958
2020-06-08 17:01:47 +02:00
6f96dfabe5 Simulations: initial simulation state and cache
The current particle state is stored in a `CustomData` instance and
the cache is stored in `PointCache`.

The current state exists on the copy-on-write copies of the simulation,
while the cache only exists in the original data block.

This patch implements a temporary trivial particle simulation that does not
use the node system yet. It is used for testing and will be replaced soon.

`PointCache` still has some limitations that need to be overcome using
separate refactorings. For example, we need to be able to store the number
of particles in the point cache. Also we need to change which attributes
are stored for a particle system more dynamically than is currently possible afaik.

Reviewers: brecht

Differential Revision: https://developer.blender.org/D7836
2020-06-08 15:49:17 +02:00
bf4198cdaf Fix crash running "Edit Voxel Size" operator outside of a main 3D View region
Accessed `RegionView3D` data from context, which of course would only be set if
actually executed from a main 3D View region.
2020-06-08 15:45:00 +02:00
e3396d8bfc Installdeps: better handling of python versions.
now that we stick to some outdated py version, some distro (like current
debian testing) will feature several python3 dev package, but other
dependant libs like numpy are only built against current default version
of python (3.8 now in deb testing)...

In order to be able to use distro packages we need to allow using higher
versions of python, and set relevant CMake option accordingly.
2020-06-08 15:38:11 +02:00
d8876e78a1 Merge branch 'master' into eevee-motionblur-object 2020-06-08 13:35:07 +02:00
1c189aa70a Fix T70873: Pivot Center doesn't compute mirror elements 2020-06-08 08:23:37 -03:00
335c1e48ee Cleanup: Create a header for TransData declarations 2020-06-08 08:23:37 -03:00
4f4141c8f4 Cleanup: Move TransDataSeq declaration to its TransData file 2020-06-08 08:23:37 -03:00
6e53b28898 Cleanup: Move TransDataNla declaration to its TransData file 2020-06-08 08:23:37 -03:00
e54fb1b819 Cleanup: Move each recalcData to their respective TransData file 2020-06-08 08:23:37 -03:00
826769d1c7 Cleanup: Split transform conversion of edge and uv to their own files 2020-06-08 08:23:37 -03:00
34b4dca9f1 Cleanup: Move TransSeq declaration to tansform_convert 2020-06-08 08:23:37 -03:00
0e040ef3fb Cleanup: Rename function
I forgot to remove the "_access" suffix in a previous rename.
2020-06-08 12:44:33 +02:00
f71a2fc6c3 Fix T76273 Glitches caused by glCopyImageSubData on windows + intel gpu
We limit this fix to Windows Intel GPU whose driver reports at most GL 4.4
support. This limits the fix to the range of reported GPU.
2020-06-08 12:09:51 +02:00
460c1d8e20 Revert "UI: Bevel: Show Offset type before offset amount"
This reverts commit f50222ba2e.
2020-06-08 05:40:19 -04:00
4d168e0b8c Modifiers: fix copy paste mistake in recent refactor 2020-06-08 11:01:32 +02:00
1f6d1213d2 Workbench: Use eGPUSamplerState to change texture sampling behavior
This removes some fragment shader hacks and improve the support of
different repeat & filtering modes.

This fix T77453 Image texture not repeating in viewport
2020-06-08 10:58:45 +02:00
11ba9eec70 GPencil: Show only first frame if current frame is equals or greater than current frame
Previously, the first frame was displayed from frame 0, but now, the first frame is only displayed when the current frame is equal or greater than the keyframe number.

The previous system was logical when the grease pencil was not an object, but now it seems more logical to display the keyframe if the current frame is equal to or greater than the keyframe number.

Reviewed By: mendio, pepeland

Differential Revision: https://developer.blender.org/D7851
2020-06-08 09:04:25 +02:00
917ab4fbf9 UI: use term 'Merge Distance' instead of 'Merge Limit' 2020-06-07 23:40:14 -04:00
c175ff19d8 UI: Fix Wrong UI Label after recent modifier changes 2020-06-07 23:37:17 -04:00
f50222ba2e UI: Bevel: Show Offset type before offset amount
Because this controls how the amount is used in should be set first and 
is more important therefor place it at the top.

This is also consistent with other areas in Blender
2020-06-07 21:03:26 -04:00
b4ef87afb6 UI: Modifiers: Use Falloff subpanel for Weight Proximity
This makes the UI consitent with the weight edit modifier
2020-06-07 20:17:19 -04:00
24904301e5 Fix: Wrong UI Label for mesh cache play mode 2020-06-07 19:09:35 -04:00
112c86fd5d UI: Use Proper Title Case 2020-06-07 19:00:47 -04:00
281319653e UI: Do Use term 'Subsurf' 2020-06-07 18:16:56 -04:00
ccbf858bb8 Fix T77487: Only disable Multires Buttons in Edit Mode
Previously the operator buttons were disabled in every mode but
edit mode and sculpt mode.
2020-06-07 11:49:38 -04:00
00961d062a GPencil: Fix unreported Shift+F OPacity key not working
This wa snot working since the new scale thickness was included.
2020-06-07 16:18:02 +02:00
dc6cee4724 Fix T77520: GPencil viewlayer filter produce crash with masking layers
If a layer is used for masking, it cannot be filtered by viewlayer because the masked layer needs to have the mask layers in the draw pipeline.

This check is only done in final render.
2020-06-07 13:06:39 +02:00
8f25cfdbfd Refactor: use new api for some remaining functions in writefile 2020-06-07 12:22:19 +02:00
3e07d958f1 Cleanup: remove unused functions 2020-06-07 12:14:17 +02:00
561a81eb24 Refactor: use new api in remaining direct linking code 2020-06-07 12:12:48 +02:00
f6524032ca Refactor: use new api for direct linking pointcache and particle system 2020-06-07 12:05:30 +02:00
a7de01aaa9 Refactor: use new api for direct linking customdata 2020-06-07 11:58:58 +02:00
5f7007a962 Refactor: use new api for direct linking packedfile and dverts 2020-06-07 11:55:27 +02:00
1626c526f8 Refactor: use new api to check if endian switch is required 2020-06-07 11:51:07 +02:00
ab2b9821fc Cleanup: remove unused test_pointer_array function 2020-06-07 11:48:18 +02:00
eb31037503 Refactor: use new api for direct linking movie clip data 2020-06-07 11:47:37 +02:00
01132d4a83 Refactor: use new api for direct linking id properties 2020-06-07 11:42:58 +02:00
5ff8a2ca0e Refactor: use new api to simplify IDP_DirectLinkGroup_OrFree 2020-06-07 11:34:23 +02:00
b8afd4e8bb Refactor: use new api for direct linking bones, view layer and userdef 2020-06-07 11:30:32 +02:00
f0f666541e Refactor: use new api for direct_link_id_common 2020-06-07 11:16:14 +02:00
959267ffcc Refactor: use new api for direct linking preview image 2020-06-07 11:08:38 +02:00
766b3037eb Refactor: use new api for direct linking curvemapping and its callers 2020-06-07 11:07:08 +02:00
ee4732ca22 Refactor: use new api for direct linking gpencil modifiers and shaderfxs 2020-06-07 11:00:48 +02:00
ce9a64c454 Refactor: use new api for direct linking modifiers 2020-06-07 10:56:06 +02:00
a99a8061ae Refactor: use new api for direct linking keying sets, node sockets and pose 2020-06-07 10:35:34 +02:00
6c6658ccc0 Refactor: use new api for direct linking animdata 2020-06-07 10:27:42 +02:00
aed11c673e Fix T77456: Broken vertex paint undo on high-poly objects.
This is a critical fix that should also be backported to 2.83.1

Fairly stupid bug in fact, code detecting changes across undo steps was
assuming that each BHEAD (a block of data in blendfiles) would not be larger
than one memory chunk... Which is the case in alsmost every situation,
besides some super-heavy geometries, and other similar things (images
would also be affected e.g.).
2020-06-06 16:18:39 +02:00
03a693922d Cleanup: Fix typo and other issues in some comment. 2020-06-06 16:18:39 +02:00
5198cb1813 Fix typo in recent bone selection refactor
Thanks to @jbakker for pointing this out.
2020-06-06 23:32:46 +10:00
6c114a139b Refactor: use new api for direct linking paint curve, cachefile and workspace 2020-06-06 14:46:27 +02:00
033b6a7fb4 Refactor: use new api for direct linking particlesettings, movieclip, mask, linestyle and palette 2020-06-06 14:43:06 +02:00
9b3fda0357 Refactor: use new api for direct linking armature, action, nodetree and brush 2020-06-06 14:34:57 +02:00
a5e56efc98 Refactor: use new api for direct linking lattice, world, camera, speaker, sound, lightprobe and collection 2020-06-06 14:25:34 +02:00
18b57d3e2c Refactor: use new api for direct linking light, vfong, text, ipo and key 2020-06-06 14:17:27 +02:00
9a3d54943a Refactor: use new api for direct linking mball, material, texture and image 2020-06-06 14:10:43 +02:00
1800127355 Refactor: use new api for direct linking mesh and curve 2020-06-06 14:02:03 +02:00
cf3e617913 Refactor: use new api for direct linking scene and object 2020-06-06 13:55:59 +02:00
125acdf933 Refactor: use new api for direct linking hair, pointcloud, volume and simulation 2020-06-06 13:28:00 +02:00
0eb969dd99 Refactor: use new api for direct linking screen and gpencil 2020-06-06 13:20:20 +02:00
1d066050b6 Refactor: use new api in direct_link_windowmanager 2020-06-06 12:53:59 +02:00
5146034aa9 Blenloader: simplify list reading api 2020-06-06 12:53:36 +02:00
Marcelo Demian Gómez
7bd73f562a Fix T77473: Removing GPencil vertex group mix data
When removing a vertex group from a Grease Pencil object, if the vertex group is not the last one that was added, the information for the remaining groups weights gets mixed up.

Minor edit of the patch for clang format.

Differential Revision: https://developer.blender.org/D7943
2020-06-06 10:19:26 +02:00
f5781384ae GPencil: Fix unreported fill helper lines not displayed
When use the helper lines (red lines) with fill tool, the lines were not displayed in some situations.
2020-06-06 10:04:56 +02:00
a39cc5ae4d Fix for T77478: Quiet Conversion Error/Warning
Quiet warning/error about int and float multiplication.

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

Reviewed by Ray Molenkamp
2020-06-05 17:05:06 -07:00
b74cc23dc4 UI: Ability to Print Bold and Italics
Adds the ability to print text in bold or italics style, synthesized from a single base UI font.

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

Reviewed by Brecht Van Lommel
2020-06-05 15:39:17 -07:00
fc672ce8e2 Refactor: use new api for remaining direct data writing 2020-06-05 21:55:45 +02:00
60b8db587f Blenloader: new write_struct_at_address api functions 2020-06-05 21:55:45 +02:00
f0047e6754 Refactor: use new api for write_movieclip and write_keyingsets 2020-06-05 21:55:45 +02:00
0f1361bbc3 UI: Apply Latest Changes to Multires Modifier
These changes didn't make it through the transition to the new UI layout.
- Add "has_displacement" check
- Add "sculpt_levels" property
- Give subdivide operators the operator name so they work
2020-06-05 15:31:04 -04:00
5340556710 Refactor: remove temporary IDP_WriteProperty_new_api 2020-06-05 21:22:43 +02:00
7949953b1e Refactor: use new api in write_userdef 2020-06-05 21:19:03 +02:00
a77350cce2 Cleanup: remove unused functions 2020-06-05 20:56:36 +02:00
69c9204026 Refactor: use new api for write_curvemapping and its users 2020-06-05 20:55:42 +02:00
26fb0d4258 Refactor: use new api to finish write_object 2020-06-05 20:46:27 +02:00
c3e88fdd03 Refactor: use new api for write_pointcaches 2020-06-05 20:40:38 +02:00
a943b65f1b Refactor: use new api in write_area_map 2020-06-05 20:34:59 +02:00
4df20c058d Refactor: use new api in write_bone 2020-06-05 20:34:59 +02:00
2ee95e91f7 Remove context check from constraint and shaderfx edit poll
This mirrors 1f78e86070 from 2018 for mesh modifiers.

Differential Revision: https://developer.blender.org/D7940
2020-06-05 14:30:15 -04:00
70ad18b94d Fix T77335: Circle Select tool selects faces perpendicular to the view
Internally the face dots are being drawn when the Edges option of the
overlay (not the selection mode) is disabled.
2020-06-05 14:49:57 -03:00
b91b90f0dd Fluid: Cleanup internal Python object names
Manta Python objects should not carry the global ID in their names.
2020-06-05 18:52:33 +02:00
b16a85fe0b Cleanup: use 'r_' prefix for return arguments in math_color 2020-06-06 00:46:25 +10:00
9b099c8612 UI: Drag and Drop Modifiers, Layout Updates
This patch implements the list panel system D7490 for modifiers.
It also moves modifier drawing to a callback in ModifierTypeInfo
in line with the extensible architecture refactoring goal T75724.

This adds a PanelRegister callback and utilities for registering
panels and subpanels. It also adds the callbacks for expansion saving
and drag and drop reordering described in D7490.

These utilities, callbacks, and other common UI elements shared
between modifiers live in MOD_ui_common.c.

Because modifier buttons are now in panels, we can make use of
subpanels for organization. The UI layouts also use the single
column layout style consistently used elsewhere in Blender.
Additionally, the mode-setting buttons are aligned and ordered
consistently with the outliner.

However, the large number of UI changes in this patch may mean
that additional polishing is required in master.

Thanks to William Reynish (@billreynish) who did a fair amount of the
layout work and to Julian Eisel (@Severin) for consistent help.

Differential Revision: https://developer.blender.org/D7498
2020-06-05 10:41:03 -04:00
4e70e0e384 LibOverride: RNA: Cleanup no more needed property-specific override flags. 2020-06-05 16:37:40 +02:00
846dde590f Cleanup: use doxy sections for sequencer edit, select 2020-06-06 00:12:31 +10:00
0f64de6b9b Cleanup: compiler warning 2020-06-06 00:12:28 +10:00
e9659d0e6e Fix failing assert when dragging panel close to region edge
Forgot to include this change from Julian Eisel @Severin in the
previous commit.
2020-06-05 10:05:47 -04:00
859505a3da UI: Pan 2D Region When Dragging to Boundary
This adds a modal operator called Edge Pan, which is meant to run invisibly
while something inside a region is being dragged. This patch applies this
to dragging panels, but it can be used elsewhere too.

The speed (which is defined relative to how far the mouse is beyond the
boundary) and delay are easily adjustible. and the speed also increases
smoothly from a start value to a max to make it feel more interactive
and less robotic.

Differential Revision: https://developer.blender.org/D7465
2020-06-05 10:01:20 -04:00
1270984e13 Refactor: use new api in write_customdata 2020-06-05 15:54:19 +02:00
b77834ceb1 Refactor: use new api for writing modifiers 2020-06-05 15:38:36 +02:00
a8afe509da Refactor: use new api in write_nodetree_nolib 2020-06-05 15:22:43 +02:00
0ee98c654e Refactor: use new api in write_animdata 2020-06-05 15:15:28 +02:00
abeda01ac6 GPencil: Improve Vertex Paint in filled areas
When use the Tint tool, it was very difficult to tint the filled areas if the strokes had very few points or the area was big.

Differential Revision: https://developer.blender.org/D7936
2020-06-05 15:11:08 +02:00
67b17684e6 Fix T77396: crash in memfile undo code after recent optimizations.
Optimizations in rBcda15408582e8de5b405 do not guarantee anymore that
consecutive memchunks in two consecutive undo steps are actually about
the same data (and hence can share the same buffer when unchanged).

This buffer sharing can now happen without any particular order, so we
need to change the process when 'merging' two undo memfiles together.

Note that existing code was not logically correct either, even with
previous undo storage code, since it would blindly transfer ownership of
the buffer to the second memchunk, without checking whether the first
one was actually the owner of it or not (a same buffer can be shared by
matching memchunks in many consecutive memfiles/undo steps).
2020-06-05 14:54:54 +02:00
ff5d24f8be Refactor: use new api in write_iddata 2020-06-05 14:45:32 +02:00
f797a5406d Refactor: use new api for writing object, mesh and particlesettings 2020-06-05 14:41:42 +02:00
a6cd77bad1 Refactor: use new api for writing camera, lattice, vfont and key 2020-06-05 14:32:26 +02:00
0a41a85bf3 Refactor: use new api for writing curve, mball, image, light, world, material and texture 2020-06-05 14:25:07 +02:00
b78fb8b987 Cleanup: remove unused sequencer marker code from 2.4x 2020-06-05 22:18:58 +10:00
74fa600ede Sequencer: split select side of frame out of the select operator
The select operator was getting overloaded with functionality
unrelated to selecting the strip at the mouse position.

- Don't save settings, allowing the keymap only to include
  non-default options.

- Fix selecting strips overlapping the current frame
  overwrite all flags.
2020-06-05 22:14:02 +10:00
d850daf416 Refactor: use new api for writing collection, action and gpencil 2020-06-05 14:09:35 +02:00
43294e5f49 Refactor: use new api in write_scene 2020-06-05 13:55:45 +02:00
60a786e711 Refactor: use compile time dna struct ids in blenloader api 2020-06-05 13:55:45 +02:00
5ed2ed28ab CodeCleanup: Supressed warning 2020-06-05 13:40:22 +02:00
dc69747f72 Refactor: use new api for writing linestyle, cachefile, hair, pointcloud, volume and simulation 2020-06-05 13:29:46 +02:00
e4e8259d39 Refactor: use new api for writing movieclip, mask, probe, nodetree, brush, palette and paintcurve 2020-06-05 13:14:39 +02:00
2396daf921 Refactor: use new api for writing screen, armature, text and speaker 2020-06-05 12:53:39 +02:00
a1d55bdd53 Refactor: use new api in write_workspace 2020-06-05 12:35:20 +02:00
473aaa389c Cycles: Enable OptiX on all Maxwell+ GPUs 2020-06-05 12:33:00 +02:00
56da8dae67 Refactor: use new api in write_windowmanager 2020-06-05 12:29:40 +02:00
0e6c648f3f Refactor: Move IDProperty writing to new API 2020-06-05 12:21:19 +02:00
7d32a259bf Installdeps: make embree use TBB.
Following changes done to makedeps in rBc7329da14b22.
2020-06-05 12:01:18 +02:00
1c5479167f Cleanup: Strict compiler warning 2020-06-05 11:59:45 +02:00
48075b2c05 Blenloader: New API that will be used for blenloader decentralization
Design Task: T76372

This part of a larger refactoring towards a more extensible architecture
in Blender: T75724

The API is defined in `BLO_read_write.h`. It adds the small data structures
`BlendWriter`, `BlendDataReader`, `BlendLibReader` and `BlendExpander`.
Those contain context about the current read/write operation. Furthermore,
it adds many functions with the prefixes `BLO_write_*`, `BLO_read_*` and
`BLO_expand_*`.

Lib linking and expanding will probably be handled by the more generic libquery
system eventually. The corresponding parts of the API can be removed then.
2020-06-05 11:44:36 +02:00
ce7409fd13 Cleanup: use ED_object_ prefix for constraint functions
- ED_object_constraint_list_from_constraint was get_constraint_lb
- ED_object_constraint_list_from_context    was get_active_constraints
- ED_object_constraint_active_get   was get_active_constraint
- ED_object_constraint_active_set   was ED_object_constraint_set_active
2020-06-05 18:59:47 +10:00
5e55153c89 LibOverride: Cleanup: remove useless per-property override flag.
now that we have more 'global' ways to control that, we can save us
quiet a fwe calls....
2020-06-05 10:57:21 +02:00
191edd224a Cleanup: rename suffix 'conv' to 'convert' 2020-06-05 18:27:38 +10:00
f2d5c53966 Fix accessing online manual for PropertyGroups
Alternate fix for the issue raised in D7837
2020-06-05 18:09:00 +10:00
e8b8e16b24 Code Cleanup: fcurve function naming 2020-06-05 09:30:15 +02:00
fe6be70875 CleanUp: Introduce BKE_fcurve_create 2020-06-05 08:41:35 +02:00
e3a32a22bf GPencil: Channel Lock tooltip
After talking with UI team, we decided to change the tooltip.
2020-06-05 08:27:52 +02:00
0aa2c10ad1 Cleanup: remove braces from previous commit (no functional changes) 2020-06-05 16:12:22 +10:00
8b347fc2cd Armature: increase maximum delectable bones from 4096 to 8192
Remove BONESEL_NOSEL which isn't needed.

Addresses issue raised in T77378.
2020-06-05 16:04:35 +10:00
fd63220a35 Cleanup: maybe uninitialized variable warning 2020-06-05 14:55:15 +10:00
9e96c6d054 Cleanup: spelling 2020-06-05 14:34:00 +10:00
b2d1c4873f Cleanup: remove unnecessary inline header
Caused by lsp/clang applying *fixes* automatically, tsk.
2020-06-05 14:33:59 +10:00
c7329da14b Build: use TBB as Embree tasking system
This avoids launching additional threads and solves some console warnings on
Linux + AMD Ryzen CPU.
2020-06-05 00:58:31 +02:00
0b28f0410c Fix make deps build errors with conflicting Boost system packages 2020-06-05 00:58:31 +02:00
b168c255aa GPUTexture: Make GPU_texture_unbind_all faster on newer opengl version 2020-06-04 21:28:19 +02:00
ba5b303c88 DRW: Fix T77370: Redundant anti aliasing/blur effect 2020-06-04 21:28:19 +02:00
1d72fc5a1a LibOverride: Add Pointer properties to 'overridable by default'.
There is in fact no reason not to do so, RNA pointers are either to
other IDs (which is properly handled by default diffing code), or to
sub-structures that should almost always  be diffed as well.

Exceptions (like backward ID pointers or strictly runtime caches and
data) are to be handled with proper 'no comparison' flag in any case.
2020-06-04 18:06:47 +02:00
d71f9b9886 LibOverride: cleanup Collection case.
This should not give any real difference, those were already
overridable.
2020-06-04 18:06:47 +02:00
f2a0532111 Disable gravity in Draw Face Sets brush
Applying gravity to this brush does not make much sense and undo/redo
won't work correctly as it uses a different undo type.

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D7925
2020-06-04 18:05:46 +02:00
15ed2f841c Fix Sharpen mesh filter in Multires
Instead of accumulating displacement for each vertex into the neighbors, accumulate the opposite displacement from each neighbor into the vertex. I think this is the same and it does not produce artifacts in Multires.

Reviewed By: sergey, brecht

Differential Revision: https://developer.blender.org/D7508
2020-06-04 18:04:07 +02:00
caca3d9c97 installdeps: fix bad FFMPEG official version number.
re T77035.
2020-06-04 17:35:33 +02:00
c7a2ed69be GPencil: Fix Lock Frame Dopesheet tooltip
The old tooltip was not clear enough
2020-06-04 16:55:19 +02:00
c604d2762f Fix T77358: Gpencil can't select geometry within transparent layers
This was an old check of opacity for editable layers, but with new system it's not needed because you can use the edit lines.
2020-06-04 16:41:46 +02:00
733a3e3a70 Fix T77164: scaling/rotation fails for 3 selected NURB points 2020-06-05 00:40:14 +10:00
3da4724f72 Fix T77367: Blender's snap package ignores command line options 2020-06-05 00:39:45 +10:00
fd061f61c7 GPUShaderInterface: Reduce creation time on some drivers.
Querying GL_UNIFORM_BLOCK_INDEX seems to be a problem on apple drivers.
2020-06-04 15:28:45 +02:00
3b4ef08d68 Fix Grease Pencil panel showing as first panel in render properties
Move it lower next to the Freestyle panel.
2020-06-04 14:44:00 +02:00
41866070d3 Cleanup: remove unused flag 2020-06-04 14:37:20 +02:00
953c232db3 Fix T77276: Generating Python API docs raises many warnings 2020-06-04 22:31:54 +10:00
e8592a0412 Merge branch 'master' into eevee-motionblur-object
# Conflicts:
#	source/blender/draw/engines/eevee/eevee_data.c
#	source/blender/draw/engines/eevee/eevee_effects.c
#	source/blender/draw/engines/eevee/eevee_motion_blur.c
#	source/blender/gpu/GPU_vertex_format.h
#	source/blender/makesdna/DNA_userdef_types.h
#	source/blender/makesrna/intern/rna_userdef.c
2020-06-04 14:24:10 +02:00
10b34ad697 GPUShaderInterface: Change builtin array to array of location/bind
This reduce the base size of the shaderinterface from 400 to 136 bytes.
Improves memory usage and cache coherency when querying a lot of uniforms
at once.
2020-06-04 14:17:06 +02:00
5837de6879 Cleanup: DRW: Add comment and remove bitfields. 2020-06-04 14:17:06 +02:00
7534bbfa34 GPUShaderInterface: Add Builtin Uniform blocks query
This makes the query of theses mandatory uniforms faster.
2020-06-04 14:17:06 +02:00
1438c1cfd5 Merge branch 'blender-v2.83-release' 2020-06-04 13:49:50 +02:00
30395a491f Fix T77073: Objects cannot be activated after collection exclude
When excluding a collection containing the active object in either
texture paint or particle edit mode, the object could not be reactivated
when the collection was re-enabled. This is because the object's mode
was left in TEXTURE_PAINT or PARTICLE_EDIT, and the activation code did
not have cases to handle these modes.

This moves the code that is run when toggling out of texture paint or
particle edit modes to functions so activation can properly toggle off
the respective interaction mode.
2020-06-04 21:48:04 +10:00
c7c3908b8e Cleanup: split particle & texture paint mode switching into utility functions 2020-06-04 21:36:33 +10:00
0f32029522 Fix T77315 Overlay: Selection Highlighting not working with complex scene
Was caused by a UBO bind to the wrong slot.
2020-06-04 12:57:26 +02:00
78017916f7 Fix error removing the image paint cursor
Mix up with imapaint.paintcursor & imapaint.paint.paint_cursor
Remove imapaint.paintcursor since it wasn't used.

Also rename paint_cursor_start_explicit() to paint_cursor_start(),
removing the existing paint_cursor_start() since it took the paint
struct from the context, a value that's known by all callers.
2020-06-04 20:24:57 +10:00
465a9f65de Cleanup: remove window manager argument for paint cursor API
This caused an additional argument when exiting object modes
and many other low level functions which don't need to access context.

This simplifies fixing T77073.
2020-06-04 18:41:16 +10:00
1a23b0be97 LibOverride: Make all modifiers properties overridable.
This is second and last part of T77083.
2020-06-04 10:26:05 +02:00
f9892bd6cf Fix T77264: Mantaflow: Liquid checkbox doesn't turn on while switching
between fluid types

When switching to gas, the fluids were not actually destroyed, leading to
the situation that they were then destroyed when actually switching to
liquid.

Maniphest Tasks: T77264

Differential Revision: https://developer.blender.org/D7907
2020-06-04 09:49:05 +02:00
244ed645e0 GPencil: Improve selection in Fill areas
Now when use selection if the selection area is inside a filled area, the stroke is selected. Before it was necessary to select the border of the stroke.
2020-06-04 09:37:12 +02:00
fe13f3db81 UV: use selection for 'Seams from Islands'
Use bmesh connectivity data to simplify logic.
2020-06-04 17:10:45 +10:00
67a617e196 Cleanup: move auto-execute operators into userpref_ops.c 2020-06-04 16:23:07 +10:00
7aa47083d0 Cleanup: update sections for wm_files.c 2020-06-04 16:10:01 +10:00
Johan Walles
e723ec04fb UI: more informative light energy description based on light type 2020-06-04 13:23:47 +10:00
67b10fcc22 Fix error in recent fix for T77290 2020-06-04 12:40:17 +10:00
b94ab93dfb Eyedropper: Support get samples from other windows
This fix T77226

Differential Revision: https://developer.blender.org/D7910
2020-06-03 15:45:57 -03:00
a4e0bccb87 Cleanup: Use ELEM Macro 2020-06-03 13:34:24 -04:00
0849af4591 Linux: update appdata for 2.83 release 2020-06-03 19:10:51 +02:00
86385d7ebd Fix build error for Cycles standalone
This does not affect the Blender release.

Ref D7915
2020-06-03 19:10:51 +02:00
bd68312cb6 LibOverride: Make camera data-block properties overrideable.
Note that you still have to make overrides of obdata IDs by hand (and
deal with remapping of pointers yourself) for now.
2020-06-03 18:57:49 +02:00
2cdfc1b4af LibOverride: Make constraints fully overrideable.
All settings of constraints should be overrideable now.
Modifiers will follow tomorrow.

Part of T77083.
2020-06-03 18:46:36 +02:00
fc1bb36668 LibOverride: fix debug timing code. 2020-06-03 18:46:18 +02:00
26aa64b688 Fix broken split layout in encoding options
The "Max B-frames" options were misplaced. Uses the usual layout of a checkbox
together with the number button now.
Reported by Peter Fog (@tintwotin), thanks!
2020-06-03 18:12:29 +02:00
ef0ff4aaf2 GPencil: Fix unreported error in Dots Strokes material initialization
The materials was not initializated in the right mode.
2020-06-03 18:01:34 +02:00
dbb1f56e55 Fix T77290: Crash displaying vertex colors in edit mode
Regression from deaff945d0, follow logic from d98ae27f02.
2020-06-04 01:52:33 +10:00
de9c04c287 Cleanup: clang format, warning 2020-06-04 01:18:39 +10:00
51cd6d22c5 Cleanup: GPUMaterilal: Texture Node: Remove unused functions 2020-06-03 16:43:31 +02:00
15a24f3d7f GPUMaterial: Fix shader compilation when using UDIM textures 2020-06-03 16:42:54 +02:00
Nathan Letwory
211b6c29f7 Remove trailing space 2020-06-03 17:38:22 +03:00
96eab08755 DRW: Always unbind texture after drawing
This fix issues with the image editor
2020-06-03 16:24:04 +02:00
b2dcff4c21 GPUMaterial: Rework/simplify image texture filtering
This use the latest GPUTexture change to use the sampler state to avoid
the pole issues instead of using GLSL hacks.

This should fix T73942: Eevee mipmaps not respecting border mode.

Note that this also fix some discrepencies between cycles and eevee (like
boxmapping + clip).
2020-06-03 16:18:50 +02:00
054923c860 GPUMaterial: Rework/simplify environment texture filtering
This use the latest GPUTexture change to use the sampler state to avoid
the pole issues instead of using GLSL hacks.
2020-06-03 16:18:50 +02:00
47bdb28841 GPUTexture: Fix samplers configuration typo 2020-06-03 16:18:50 +02:00
91cc1f38ae GPUMaterial: Add support for different sampler state per image sampler
This bridge between the new sampler state support from GPUTexture and
draw material handling.

The Sampler State is just the one from the texture for now. No change in
logic.
2020-06-03 16:18:50 +02:00
866e067d65 GPUTexture: Add support for binding textures with custom sampler states 2020-06-03 16:18:50 +02:00
4184371fb0 Fix T77156: GPencil view layer filter by layer not working
This was removed by error during the refactor done in 2.83.

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

Reviewers: @fclem
2020-06-03 15:57:09 +02:00
df17ee202b Fix T77203: Mantaflow Bake All cannot be resumed
The manual is also more explicit about this now (rBM6725).
2020-06-03 14:54:40 +02:00
Nathan Letwory
82e3bd4bbb Ensure submodules are at correct commits for 2.83 2020-06-03 15:23:39 +03:00
Nathan Letwory
3c9f80c898 Move 2.83 from beta to release 2020-06-03 15:21:51 +03:00
Nathan Letwory
dc8475ec6a Splash: new image for 2.83 by Ian Hubert 2020-06-03 15:19:34 +03:00
cda1540858 Undo: Detect/find proper memchunk for a given ID during undo step writing.
Most of the time current (based on order) system works fine, but when you add
or rename (i.e. re-sort) some ID, every data/memchunk afterwards would be out
of sync and hence re-stored in memory (and reported as changed).

Now we are storing the ID's session_uuid in the memchunks, which allows to
actually always find the first memchunk for an already existing ID stored in
previous undo steps, and compare the right memory.

Note that current, based-on-order system is still used almost all of the time,
search in the new ghash is only performed for a few data-blocks (when needed at all).

Reviewed By: brecht

Maniphest Tasks: T60695

Differential Revision: https://developer.blender.org/D7877
2020-06-03 12:07:45 +02:00
Bastien Montagne
3384bb2c66 RNA: add option to enable by default lib overridale flag of defined properties.
Similar to the one allowing to deactivate DNA check, etc.

Will helps reduce verbosity when making many new properties overridable.

Note that pointer properties always remain non-overridable by default,
since basically only ID pointers should be.

Reviewed By: brecht

Maniphest Tasks: T77083

Differential Revision: https://developer.blender.org/D7906
2020-06-03 11:18:11 +02:00
0e14eb7b31 Cleanup: DRW: Remove support for ModelViewProjectionMatrix
This has been replace by manual model+viewproj transform inside the shader.
2020-06-03 11:02:56 +02:00
75015f27ba Cleanup: DRW: Remove support for builtin matrices 2020-06-03 11:02:56 +02:00
d4f1efad00 DRW: Remove use of builtin matrices and replace by common_view_lib 2020-06-03 11:02:56 +02:00
3e4c8d48aa Cleanup: DRW: Remove builtin 3D only shader usage 2020-06-03 11:02:56 +02:00
55f8758b87 GPUImmediate: Fix array uniform not working 2020-06-03 11:02:56 +02:00
59bfcd8c5d Cleanup: DRW: Remove persistent uniform functions 2020-06-03 11:02:56 +02:00
9b0543389b Fix domain voxel size indicator drawing
Use already calculated cell_size directly.

Part of T77030.
2020-06-03 10:58:42 +02:00
6f21137722 Object: refactor mode switching
Functionality here has become confusing over time,
this removes duplicate, similar functions, preferring to set the mode
instead of toggle, enter, exit.

Mode switching utility function behaved differently regarding undo,
'ED_object_mode_toggle' for example didn't skip the undo push
where 'ED_object_mode_set' did.
Some callers chose these functions based on the intended undo behavior,
even when toggling didn't make sense.

There was also ED_object_mode_generic_enter which was similar to
ED_object_mode_set, instead of the reverse of ED_object_mode_generic_exit.

Simplify object mode switching internals:

- Replace ED_object_mode_generic_enter with ED_object_mode_set.
- Remove ED_object_mode_toggle as nearly all callers needed to check
  the current mode so toggling would set the mode argument correctly.
- Use ED_object_mode_set for the object mode switching operator
  to simplify logic.
- Add ED_object_mode_set_ex which has an argument to disable undo,
  needed when loading undo data needs to set the mode.
- Remove unused ED_object_mode_exit.
2020-06-03 18:29:06 +10:00
53cb1a32db Cleanup: remove ED_gpencil_setup_modes from object mode set
Grease pencil mode switching functions already call this.
2020-06-03 18:26:02 +10:00
3b6e223a03 Fix app-template warning disabling a template without a Python module 2020-06-03 14:46:52 +10:00
f0df4d6c35 Fix T67577: Add-on unregister can't access preferences on factory reset 2020-06-03 14:46:52 +10:00
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
2004f9a342 Cleanup: move shared functionality to wm_file_read_pre
This matches wm_file_read_post.
2020-06-03 14:46:52 +10:00
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
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
2e52b3206c PyDoc: Fix warnings from out of bounds include statement 2020-06-02 18:21:42 -04:00
650dedfd10 Cleanup: GPUTexture: Remove uneeded bind 2020-06-02 23:44:22 +02:00
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
47eccac21c GPUShaderInterface: Fix out of bound reads 2020-06-02 23:44:22 +02:00
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
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
ea92f8207a Revert "UI: Fix T77173: Report Background Colors for 2.83 Release"
This reverts commit 7fc0053c27.
2020-06-02 15:59:37 -04:00
e391b3e0fb Merge branch 'blender-v2.83-release' 2020-06-02 15:58:38 -04:00
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
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
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
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
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
0465086223 Merge branch 'blender-v2.83-release' 2020-06-02 19:48:45 +02:00
52cc412e0f Revert "Fix T63588: Cycles unnecessarily updates background importance sampling map"
This reverts commit 33ce0cb5a1.

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
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
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
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
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
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
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
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
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
9d9f35d946 Cleanup: factorize duplicated code in WVG modifiers' RNA. 2020-06-02 17:30:02 +02:00
5ef44dd83f Cleanup: unused argument 2020-06-03 01:05:25 +10:00
9713df4e92 Merge branch 'blender-v2.83-release' 2020-06-03 00:59:56 +10:00
2c204432df Merge branch 'blender-v2.83-release' 2020-06-03 00:59:52 +10:00
e69f70e11f Revert "Fix T67577: Add-on unregister can't access preferences on factory reset"
This reverts commit f18ed7ad89.

Better leave the fix for 2.9 series.
2020-06-03 00:59:45 +10:00
50994eace6 Fix T66967: skin modifier crash scaling skin radius to zero 2020-06-03 00:59:44 +10:00
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
eba3aa1837 Revert "Fix T67577: Add-on unregister can't access preferences on factory reset"
This reverts commit f18ed7ad89.

Better leave the fix for 2.9 series.
2020-06-03 00:54:29 +10:00
b82cb0ad32 Cleanup: GPU: Remove GPU_shaderinterface_uniform_ensure 2020-06-02 16:46:38 +02:00
38cfcdd51b DRW: Remove defered uniform creation 2020-06-02 16:46:38 +02:00
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
0a00fbd265 Fix T66967: skin modifier crash scaling skin radius to zero 2020-06-02 23:45:51 +10:00
21443056b7 Turn most flags in BlenderDefRNA into proper bool. 2020-06-02 15:18:14 +02:00
43ec8c287f Cleanup: RNA: use BlenderDefRNAtruct named members initialization. 2020-06-02 15:14:10 +02:00
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
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
074d469165 Merge branch 'blender-v2.83-release' 2020-06-02 18:39:28 +10:00
ae2f21f378 Fix T76533: Gizmo uses active face center in edge selection mode
Only use the active face when it's selected.
2020-06-02 18:38:58 +10:00
ea516bed72 Merge branch 'blender-v2.83-release' 2020-06-02 10:33:26 +02:00
6aef27602a Cleanup: use C++'s nullptr instead of our own C NULL define, in C++ code. 2020-06-02 10:32:21 +02:00
b724922f1a Merge branch 'blender-v2.83-release' 2020-06-02 10:26:14 +02:00
428c0f9ad5 Fix T77192: Crash when opening bunny.blend file.
New depsgraph code handling drivers was not checking for possible NULL
rna_path, as done everywhere else in code...
2020-06-02 10:21:19 +02:00
c6957e50e8 Merge branch 'blender-v2.83-release' 2020-06-02 18:06:31 +10:00
81f817e7b4 Fix T72088: Missing header redraw when transform changes snap 2020-06-02 18:05:00 +10:00
17d8e7f833 Merge branch 'blender-v2.83-release' 2020-06-02 16:24:30 +10:00
de6c935261 Cleanup: code comments for mode switching
Comment on mode switching cases that are supported,
including the issue from recent regression T77217
which is easy to miss since it's not used in the default key-map.
2020-06-02 16:12:36 +10:00
Johan Walles
9c410c77eb UI: rename Cycles point light Size to Radius, for consistency and clarity
Differential Revision: https://developer.blender.org/D7888
2020-06-02 08:08:59 +02:00
59e793d3bd Cycles: add missing light angle for distant lights in XML reading
Contributed by howetuft.

Differential Revision: https://developer.blender.org/D7891
2020-06-02 08:08:52 +02:00
a8907e409a Merge branch 'blender-v2.83-release' 2020-06-02 08:08:43 +02:00
Stefan Werner
c7280ce65b Cycles: Added shadow terminator offset parameter.
A new user parameter can be used to shift the shadow terminator
towards the light source. With it, one can hide some of the
artifacts that appear on coarse meshes with smooth shading.

Note that this technique is not engery conserving.

This is based on the work by the Appleseed renderer team.

Differential Revision: https://developer.blender.org/D7634
2020-06-02 07:27:14 +02:00
7881c251f3 Fix build error in Cycles standalone without guarded allocator
Solution suggested by howetuft.

Differential Revision: https://developer.blender.org/D7892
2020-06-02 06:27:39 +02:00
Garry R. Osgood
389d550412 Fix T77106: Cycles crash baking with AO shader node
Differential Revision: https://developer.blender.org/D7890
2020-06-02 06:25:08 +02:00
18cda8be87 Cycles: change perspective depth pass to be more standard
Now it matches Eevee, OpenGL and other renderers. Panoramic camera depth passes
are unchanged, and are still distance from the camera center.
2020-06-02 04:54:44 +02:00
98c301d25e Fix NaN in Cycles environment texture importance sampling in some scenes
Cause identified by Ray Molenkamp.
2020-06-02 04:54:39 +02:00
f58e76119a Fix T77239: snap 3D cursor in edit-mode 2020-06-02 12:19:35 +10:00
4f3e686cad Cleanup: Remove Obsolete Current Frame Indicator Drawing Code
This code was made obsolete by the changes to the animation editor
scrubbing areas in D4654.

Differential Revision: https://developer.blender.org/D7898
2020-06-01 22:12:09 -04:00
8b63c6241d Fix snap3d crash (missing NULL check) 2020-06-02 10:50:53 +10:00
1d4bae8566 Sculpt: Cloth Filter
This tool is similar to the cloth brush, but it applies the cloth
simulation deformation to the whole mesh in an uniform way. The
simulation can be controlled using the mask to pin vertices and the face
sets to define force action areas.

It uses the same solver as the cloth brush which now no longer depends
on StrokeCache.

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D7857
2020-06-01 22:37:06 +02:00
3778f168f6 Sculpt: Pose Brush Face Sets FK mode
This Pose Brush origin mode simulates an FK deformation in the entire
model when clicking on the face sets, as they were controls of a fully
rigged character. Combined with the previous Face Sets modes that allow
creating IK chains, the pose brush should now be able to simulate most
of the common rigs deformations.

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D7839
2020-06-01 22:30:01 +02:00
5c54a609a9 Cleanup: Remove unused flag 2020-06-01 17:20:28 -03:00
91fb07f361 Fix mesh filter using the wrong face set as active
This was returning the wrong face set in cases where the active vertex
has more than one available face set.

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D7858
2020-06-01 22:18:59 +02:00
3cce8afe2c UI: Rename "View Camera Center" Op to "Frame Camera Bounds"
The current name isn't very specific about what the operator does.
The operation is more about lining up the edges with the viewport
edges than centering the view.

Differential Revision: https://developer.blender.org/D7866
2020-06-01 11:35:16 -04:00
b0038b8d73 Fix T77139: UI: Add "View Camera Center" to View Menu
The "View Camera Center" operator was not accessible by the new menu search.

Differential Revision: https://developer.blender.org/D7865
2020-06-01 11:34:07 -04:00
45dbc38a8b Fix T74552: Distribute negatives in number input
This applies a relatively simple solution for fixing some unintuitive
cases in unit handling.

Currently entering -1m50cm evaluates to -0.5m, and similarly 1'6"
evaulates to just half a foot. So effectively there's an implied + just
between the numbers, which is quite confusing.

This works by adding parentheses so the negative distributes to the
block of values before the next operator.

For example:
|         Before         |           After            |
| `-1m50cm + 1m -2m50cm` | `-(1m50cm) + 1m -(2m50cm)` |
|   `-4m + 0.5 / -1.1`   |   `-(4m) + 0.5 / -(1.1)`   |
|         `-1'6"`        |         `-(1'6")`          |
|        `-1e-2cm`       |        `-(1e-2cm) `        |

Reviewed By: campbellbarton

Differential Revision: https://developer.blender.org/D7813
2020-06-01 08:22:27 -04:00
8d670546f9 Merge branch 'blender-v2.83-release' 2020-06-01 12:12:57 +02:00
31cf87a29e Fix py api doc gen script after recent versionning changes. 2020-06-01 12:10:56 +02:00
19f3f6cd85 Merge branch 'blender-v2.83-release' 2020-06-01 19:00:23 +10:00
c204e3348c Fix T77217: Object mode toggle doesn't work
Toggling object mode to the previous wasn't working, also resolves a
case when toggling modes would cause an extra, unnecessary mode switch.
Own regression in 5159b8e1ea.
2020-06-01 18:56:43 +10:00
9936e23b85 Merge branch 'blender-v2.83-release' 2020-06-01 16:27:23 +10:00
10966926ce Merge branch 'blender-v2.83-release' 2020-06-01 16:27:18 +10:00
520f08aa56 Fix T77241: NDOF navigation doesn't work with the knife tool
Also allow NDOF with loop-cut.
2020-06-01 16:21:30 +10:00
49bd44f5c8 Cleanup: unused variable warning
Also remove unnecessary function return value.
2020-06-01 15:04:47 +10:00
81c33f0ba7 Cleanup: clang-format 2020-06-01 15:04:30 +10:00
c71be9a552 UI: rename "Select Playhead" to "Select -> Side of Current Frame"
Make this consistent with meshes select side of active,
also rename "Under" to "Overlap" as this is confusing since
strips can be considered above/under each other
relative to their channels.
2020-06-01 15:00:25 +10:00
946ae26349 UI: use term current frame instead of playhead
Avoid mixing different terminologies up,
current frame is used in a majority of Blender.
2020-06-01 15:00:25 +10:00
c315e56434 Cleanup: warning 2020-06-01 15:00:25 +10:00
89cd9f110b Fix T77043: Incorrect cache invalidation when changing resolution.
Invalidate cache of scene, not scene strips using said scene.
2020-06-01 06:25:36 +02:00
d4483b6d15 Cleanup: error building on Linux 2020-06-01 14:14:21 +10:00
f18ed7ad89 Fix T67577: Add-on unregister can't access preferences on factory reset 2020-06-01 14:06:55 +10:00
Peter Fog
b5cfb23fa7 VSE UI: Text panel adjustments
This patch adjusts a number of text panel elements:

- The text entry widget has become larger in order to distinguish it from the strip name.
- Wrap has been moved up under the text, since this doesn't relate to bounding box.
- Alignment X/Y has been renamed to Anchor X/Y, since this is the achor point of the text point, and not the Alignment of the text.
- Offset and Crop was completely missing from the Text strip panel, these has been added.

Reviewed By: billreynish

Differential Revision: https://developer.blender.org/D7869
2020-06-01 05:41:09 +02:00
Peter Fog
adf9ff6359 VSE UI: Add a proxy menu to Preview/View menu
Add Proxy Setup, Build and View to a menu in the Preview View menu.

Reviewed By: ISS, billreynish, pablovazquez

Differential Revision: https://developer.blender.org/D7734
2020-06-01 05:32:36 +02:00
Peter Fog
42dcb1090b VSE: Use color picker for color strip.
Reviewed By: billreynish, ISS

Differential Revision: https://developer.blender.org/D6114
2020-06-01 05:17:20 +02:00
Peter Fog
102a7ae2d9 VSE: Add warnings for failed proxy encoding
Add more descriptive warnings if building proxy fails.
Prevent progressbar from showing if no valid strip is selected.

Reviewed By: ISS

Differential Revision: https://developer.blender.org/D7689
2020-06-01 05:12:06 +02:00
Peter Fog
95e3356a27 VSE: Add select under playhead, and shortcuts for left, right, under.
Add `UNDER` option for `left_right` property of `sequencer.select` operator.
Add Equal as shortcut for select under playhead, and move Insert Gaps to backspace + ctrl.
Add extend shortcut for left, right under options.
The function is added to Select > Playhead menu.

Reviewed By: ISS

Differential Revision: https://developer.blender.org/D7679
2020-06-01 04:39:40 +02:00
d0e028a78e Merge branch 'blender-v2.83-release' 2020-06-01 12:12:06 +10:00
d5a92b188b Cleanup: warnings 2020-06-01 12:06:34 +10:00
fcccee0c33 Cleanup: Remove unnecessary step in calling snap callback 2020-05-31 18:28:52 -03:00
14af27e63d Fix T77194: Force global orientation on select constraint (Shift MMB) not working
This feature was a hack to prevent mmb select to print the orientation from menu in pre 2.80 versions.
Removing this feature as it is no longer an issue.
2020-05-31 18:28:52 -03:00
4cb883b6b2 Deps: Update OIIO + ImageLibs + OSL + Helpers
This is the cluster of OIIO and friends , since they are all kinda tangled best to deal with this as a single unit

OIIO 2.1.15.0
png 1.6.37
jpeg 2.0.4
opencolorio 1.1.1
tiff 4.1.0
OSL 1.10.10
pugixml 1.10
openjpeg 2.3.1

Differential Revision: https://developer.blender.org/D7727
Reviewed by: brecht
2020-05-31 13:15:40 -06:00
6f1056ae63 Deps: iconv 1.16 2020-05-31 10:33:11 -06:00
ba711824b3 Fix T77206: G + MMB Doesn't work in Graph Editor if the transform orientation is set to 'Local'
Scene orientation is used only for 3DView.
2020-05-30 18:11:50 -03:00
347c191292 Remove leftover debugging code 2020-05-30 18:11:50 -03:00
9d725fc0cf Merge branch 'blender-v2.83-release' 2020-05-30 17:33:34 +02:00
ec26260132 GPencil: Fix unreported wrong Sculpt brushes initialization in Templates
The Sculpt brushes were not properly initialized when use 2D template or other templates.

Also, using the default template (not factory settings) could be situations where the brushes were not updated.

This problem was introduced when some versioning code was removed in order to avoid duplicated brush creation.
2020-05-30 17:33:09 +02:00
515e8e4f7c Fix T77166: Transforming bone with constraint does not follow mouse position
Bug introduced in rBc75a665c442e
2020-05-30 12:12:36 -03:00
55598269d2 Cleanup: Deduplicate code 2020-05-30 11:28:53 -03:00
a574478d90 Fix T77183: Axis moves with object when constraint movement and using local transform 2020-05-30 11:10:07 -03:00
3d014fa815 Cleanup: Initialize gizmo snap keymap before using 2020-05-30 10:59:27 -03:00
63bcee81f6 GHOST/wayland: use 'is_dialog' flag to prevent drawing into same window 2020-05-30 12:23:39 +01:00
2ee94c954d Fix LayerTypeInfo for CD_PROP_COL
This was introduced in rBd7282537f016 and had the wrong struct name
specified, leading to errors in writing/saving.

Stumbled over this when testing a color layer for pointclouds.

Differential Revision: https://developer.blender.org/D7882
2020-05-29 20:08:38 +02:00
a9689737b3 Cleanup: Use Consistent Capitalization of "Anti-Aliasing" 2020-05-29 13:57:40 -04:00
664c608fb7 Merge branch 'blender-v2.83-release' 2020-05-29 19:43:32 +02:00
691a1e3357 EEVEE: Fix memory leak when using SSS render pass.
Differential Revision: https://developer.blender.org/D7876
2020-05-29 19:42:53 +02:00
D. O
907cab45ff Modifiers: add invert vgroup weights options to operands of Mix modifier.
Please note that vertices which are in a vgroup are not affected by this
option (which means that affected vertices from 'selection' modes remain
the same). Only the weights of selected vertices get inverted.

Reviewed By: mont29

Differential Revision: https://developer.blender.org/D7811
2020-05-29 18:55:28 +02:00
c93a88413d Merge branch 'blender-v2.83-release' 2020-05-29 18:05:04 +02:00
Cody Winchester
43853d0528 Fix: Array modifier start cap not updating with object changes
When setting the start cap of the array modifier it does not update when
updating the start cap objects geometry.

This patch switches the property update to rna_Modifier_dependency_update,
the same as the end cap which works properly.

Reviewed By: mont29

Differential Revision: https://developer.blender.org/D7584
2020-05-29 17:56:42 +02:00
Brecht Van Lommel
a86b5df005 Blender: change bugfix release versioning from a/b/c to .1/.2/.3
The file subversion is no longer used in the Python API or user interface,
and is now internal to Blender.

User interface, Python API and file I/O metadata now use more consistent
formatting for version numbers. Official releases use "2.83.0", "2.83.1",
and releases under development use "2.90.0 Alpha", "2.90.0 Beta".

Some Python add-ons may need to lower the Blender version in bl_info to
(2, 83, 0) or (2, 90, 0) if they used a subversion number higher than 0.
https://wiki.blender.org/wiki/Reference/Release_Notes/2.83/Python_API#Compatibility

This change is in preparation of LTS releases, and also brings us more
in line with semantic versioning.

Fixes T76058.

Differential Revision: https://developer.blender.org/D7748
2020-05-29 17:48:26 +02:00
Peter Fog
67795c90fc VSE: Remove delete confirmation pop-up
It is not needed with the current undo system.

Differential Revision: https://developer.blender.org/D7807
2020-05-29 09:53:52 -04:00
d1bc233ffe Undo: Writefile: fix 'id changed' detected when resorting IDs.
The ListBase next/prev pointers will change everytime you add or rename
an ID, also for 'neighbors' data-blocks in the list, causing unnecessary
'changed' detection.

This info is not needed in blendfile anyway, so just NULLify it.
2020-05-29 14:30:02 +02:00
1d2b89304a Fix T77130: Visually broken/stepped wireframe in object mode (regression)
Create a new shader for the selection fix.

Differential Revision: https://developer.blender.org/D7873
2020-05-29 11:59:40 +02:00
Manuel Castilla
582d3153a1 Fix T73972: Collection in outliner grayed out when all collection children are disabled
There is no reason to have the children enable/disable state to
influence the parent collection. Specially considering that the parent
collection itself can have objects that would be visible.

Reviewed by: dfelinto, brecht

Differential Revision: http://developer.blender.org/D7864
2020-05-29 11:31:49 +02:00
7022c73249 Keymap: remove explicit 3D cursor entry for add tool
Passing through events to place the cursor, as other tools do.
2020-05-29 18:13:44 +10:00
8ec59757d1 Gizmo: fix crash in recent snap gizmo addition 2020-05-29 16:12:44 +10:00
654fde2dd2 PyAPI: use bpy_rna_types_capi.c to set type methods
Remove use of '_bpy' as an intermediate module to store functions
which were then assigned in bpy_types.py.
2020-05-29 15:55:25 +10:00
e115b7b06d PyAPI: support static & class methods for C RNA API methods
Previously the static/class flag was ignored,
always using class methods.
2020-05-29 15:55:20 +10:00
5510d5825b Keymap: swap shift and alt for interactive add tool
Match original proposal.
2020-05-29 13:18:50 +10:00
d1f4adab24 Cleanup: spelling, correct reference to 'Mesh.mcol' 2020-05-29 12:58:29 +10:00
dbdb8a3355 Cleanup: line length, single quote enums, invalid URL 2020-05-29 12:45:46 +10:00
5ec18ae4ab Docs: replace warnings with note for complexity information
Reserve warnings for situations such as corrupt data which can
cause crashes.
2020-05-29 12:42:09 +10:00
2deb6c5177 Fix for T77111: Joins Areas Without Creating Invalid Edges
Properly align every involved edge when performing 'tolerant' area joins.

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

Reviewed by Brecht Van Lommel
2020-05-28 11:34:31 -07:00
Peter Fog
1be79dc2a0 VSE UI: Add buttons for swap Effect strip inputs
The feature where the active strip determines what strip will be the
first input in effect strips can be quite a puzzle for users.
The operator to swap the inputs is hidden in the Strip menu.

This adds the swapping to the Effect sidebar panel.

Differential Revision: https://developer.blender.org/D7849
2020-05-28 14:17:22 -04:00
Peter Fog
155cd03599 VSE UI: Move Scene strip and Mask strip above Adjustment in Sidebar
This is consistent with the other strip specific properties.

Differential Revision: https://developer.blender.org/D7677
2020-05-28 12:53:06 -04:00
Peter Fog
b8bcbaaf0e VSE UI: Rename Scene Strip Panel and Move View Panel Up
- Rename "Scene Preview/Render" to "Scene Strip Display",
   since this relates to Scene Strips.
 - Move the "Scene Strip Display" down, so the view settings are on top.

Differential Revision: https://developer.blender.org/D7676
2020-05-28 12:42:44 -04:00
Peter Fog
82cbf93f20 VSE UI: Group Show Elements in View Menu, Use Consistent Naming
Use the "Show..." syntax for Show elements in View menu.

Differential Revision: https://developer.blender.org/D7344
2020-05-28 12:23:11 -04:00
Peter Fog
6cbb56418f VSE UI: rename Trim Offset to Slip Offset
The operator was at some point renamed from Trim to Slip,
but not yet in the header text.

Differential Revision: https://developer.blender.org/D7712
2020-05-28 12:15:41 -04:00
Peter Fog
a099478cad UI: Use Heading to Remove Text strip Shadow Subpanel
The new "heading=" option allows for a more simple way to expose the
Text strip Shadow operator.

Differential Revision: https://developer.blender.org/D7535
2020-05-28 12:11:53 -04:00
3923062d13 Cleanup: GPU: Fix warning 2020-05-28 14:04:52 +02:00
a9073ccb68 Merge branch 'blender-v2.83-release' 2020-05-28 13:43:57 +02:00
ff1040c6fe GPencil: Reduce aliasing for subpixel lines 2020-05-28 13:42:39 +02:00
59b730b643 GPU: Fix compilation warning about uninitialized values 2020-05-28 13:42:11 +02:00
c7a7dc743d Cleanup: DRW: Remove array suffix from uniform name 2020-05-28 13:42:11 +02:00
bf690ecd39 DRW: Add DRW_shgroup_uniform_vec4_array_copy 2020-05-28 13:42:11 +02:00
68d6b73fde Readfile: move all calls to 'id_us_ensure_real' to direct_link functions.
That kind of 'own' ID management has really nothing to do in lib_link
code.
2020-05-28 12:13:16 +02:00
1335f2d272 Fix T65889: Hair Particles not updating when using image sequence 2020-05-28 10:47:01 +02:00
806db47fd8 Depsgraoh: Fix missing texture node allocation
It was causing wrong binding for image animation: since there was no
ID node for texture at the moment of build_animdata original texture
ID was passed to the callback. This is not what is supposed to happen.

This is part of fix for T65889.
2020-05-28 10:47:01 +02:00
3d2f143000 Cleanup: remove unused struct members from RenderStats 2020-05-28 16:57:19 +10:00
4ddb7a33a4 Cleanup: spelling 2020-05-28 16:42:31 +10:00
5c8ccad652 Fix cone primitive creating duplicate vertices
Using remove double wasn't reliable as the matrix argument
could cause vertices to be further apart than the threshold allowed for.

This happened when adding cones using the new add tool.
2020-05-28 16:17:00 +10:00
122cb1aea8 Object: new add object tool, currently for primitive types
- Interactively adding primitives with two clicks.
- Scene orientation used for new objects.
- Depth [view-plane, axis-plane, surface]
- Origin [base, center]
- Primitive types [cube, cylinder, cone, uv-sphere, ico-sphere ]
- Settings for object types in the top-bar.

Shortcuts:

- Snapping (Ctrl).
- Constrain 1:1 aspect (Shift).
- Toggle center (Alt).

Part of T57210 design task.
2020-05-28 15:08:58 +10:00
16943c0146 Object: add scale argument to creation operators
Needed for to create objects of a specific size.
2020-05-28 14:34:00 +10:00
d35a33ef72 Gizmo: add flag for gizmos to ignore keymap events
Needed for the snap gizmo not to steal mouse events from the tool.
2020-05-28 14:34:00 +10:00
cdcbcca25e Cleanup: missing braces warning 2020-05-28 14:34:00 +10:00
d7282537f0 CD_PROP_COL datalayer
This implements a generic color datalayer and its functions. Based on
D5975.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D7838
2020-05-27 20:04:46 +02:00
80d6421f28 Ruler: Remove highlight hack 2020-05-27 14:27:37 -03:00
0b793514fa Cleanup: Use bitmaps insteand of bool and char arrays
This was propsed in D7059, so I applied it to the rest of the code

Reviewed By: campbellbarton, sergey

Differential Revision: https://developer.blender.org/D7480
2020-05-27 18:36:05 +02:00
79e529c5ec Fix T77109: Cycles viewport render crash after object add and undo 2020-05-27 18:03:17 +02:00
7e80aa7ca6 Update the default Face Set when creating Face Sets from visible
If all vertices in the sculpt are visible create the new face set and
update the default face set. This is the same as disabling the overlay,
so it will not have the extra performance cost of rendering a colored
face set twice that gives no information.

Reviewed By: jbakker

Differential Revision: https://developer.blender.org/D7530
2020-05-27 17:35:54 +02:00
735119dd0f Fix T75096: Crash when using liquid simulation as dynamic paint brush
Reviewers: sergey

Differential Revision: https://developer.blender.org/D7853
2020-05-27 16:15:06 +02:00
49c295813b Merge branch 'blender-v2.83-release' 2020-05-27 15:31:03 +02:00
28d9368538 Fix T76947: Optix realtime denoiser progressively reduces brightness of very bright objects
The input data to the OptiX denoiser was clamped to 0..10000 as required, but it could easily
exceed that range with a high number of samples (since the data contains the overall sum). To
fix that, divide by the number of samples first and multiply it back in after the denoiser ran.
2020-05-27 15:17:47 +02:00
efa4ae17f0 OpenSubdiv: Only store edges topology for non-smooth edges
This change makes it so vertices of edge are only stored when edge
has non-zero crease. This allows to lower memory footprint of 1.5M
faces from 78 MiB to 54 MiB in the case all creases are zero.

Meshes with crease are more hard to predict due to array-based
storage, so it all depends on index of edge with crease. Worst case
(all edges are creased) still stays at 78 MiB.
2020-05-27 12:07:16 +02:00
8cd17a9529 OpenSubdiv: Allow any order of edge topology/sharpness assignment
Makes it possible to set adjacent vertices after edge sharpness.

Initially it seemed like useful sanity check, but with time it
became rather a burden.
2020-05-27 12:07:16 +02:00
42cb1e3a2c OpenSubdiv: Optimize faces storage in mesh topology
Avoid per-face pointer and allocation: store everything as continuous
arrays.

Memory footprint for 1.5M faces:

- Theoretical worst case (all vertices and edges have crease) memory
  goes down from 114 MiB to 96 MiB (15% improvement).

  This case is not currently achievable since Blender does not expose
  vertex crease yet.

- Current real life worst case (all edges have crease) memory goes
  down from 108 MiB to 90 MiB (17% improvement).

- Best case (no creases at all) memory goes down from 96 MiB to 78 MiB
  (19% improvement).
2020-05-27 12:07:16 +02:00
c971731b8f OpenSubdiv: Add regression tests for mesh topology
While this looks trivial it already allowed to catch issues in one
of previous attempt to optimize memory usage. It will totally be
useful for an upcoming refactor of face topology storage.
2020-05-27 12:07:16 +02:00
38b50fe393 OpenSubdiv: Hide individual topology elements
Move all API to happen via MeshTopology.

This is a preparation for an upcoming memory optimization.
2020-05-27 12:07:16 +02:00
15bcfc5b19 OpenSubdiv: Cleanup, remove unused code
There is no need in edge map anymore.
2020-05-27 12:07:16 +02:00
12c42738f3 OpenSubdiv: Add TODO avoid checking face-varying topology for equality 2020-05-27 12:07:16 +02:00
8e9fdd2f31 OpenSubdiv: Move preliminary geometry counters check to mesh topology 2020-05-27 12:07:16 +02:00
a444400900 OpenSubdiv: Keep explicit storage of base mesh faces
Allows to perform comparison by doing linear comparison of indices.

Before cyclic match was used to deal with possibly changed winding from
OpenSubdiv side.

Speeds up comparison (and hence improves FPS), makes code more reliable
nut uses more memory.
2020-05-27 12:07:16 +02:00
1e0de7c2ea OpenSubdiv: Compare edge topology
This change makes it so topology refiner comparison will check vertices
of all existing/provided edges.

The initial claim that due to manifold nature of mesh there is no need
in "deep" edges check was wrong: some areas might only provide edges
with non-zero creases. So if crease of one edge goes changes from 1.0
to 0.0 and crease of other edge goes from 0.0 to 1.0 the old comparison
code would not have caught it.
2020-05-27 12:07:16 +02:00
6a8193e505 OpenSubdiv: Refactor, move mesh topology comparison to own file
Makes it easier to follow and extend.
2020-05-27 12:07:16 +02:00
ece54172d0 OpenSubdiv: Use explicit storage for edge sharpness
Similar to previous change in vertex sharpness, explicitly store value
provided by the converter.

Allows to avoid rather fragile check for boundary edges.

Also allows to avoid need in constructing edge map. This lowers memory
footprint of the comparison process and avoids memory allocations
during the comparison (which is an extra benefit from the performance
point of view).
2020-05-27 12:07:16 +02:00
16aef5dc4a OpenSubdiv: Allow use of regular ordered map 2020-05-27 12:07:16 +02:00
ad4cef38e3 OpenSubdiv: Refactor, move comparison to own file 2020-05-27 12:07:16 +02:00
614d70a87d OpenSubdiv: Compare sharpness based on converter
This change starts the transition of topology refiner comparison
to compare actual values given by the converter, which will not be
affected by the refinement or face winding synchronization steps.

Currently is only implemented for vertex sharpness, but will be
extended further as followup development.

Fixes T71908: Subdiv: Incorrect topology comparison, leading to poor performance
2020-05-27 12:07:16 +02:00
717d968fb9 OpenSubdiv: Add explicit storage for mesh topology
The idea is to use this explicit storage for topology comparison rather
than using base level. While this will have memory overhead it allows
to simplify comparison of such things as:

- Vertex sharpness (where base level from topology refiner will have it
  refined, meaning it will be different from what application requested
  for non-manifold and corner vertices).

- It will allow to simplify face-vertices comparison, where currently
  O(N^2) algorithm is used due to possible difference in face winding.

- It will also allow to avoid comparison-time allocation of edge map.

Currently no functional changes, just preparing for development which
will happen next.
2020-05-27 12:07:16 +02:00
5d8515ed86 OpenSubdiv: Add move semantic to the namespace 2020-05-27 12:07:16 +02:00
b5ef644ef6 OpenSubdiv: Refactor, pass higher level object through comparison 2020-05-27 12:07:16 +02:00
444ca1a117 OpenSubdiv: Refactor, move utils to base
Also split them across utilities and types.
2020-05-27 12:07:16 +02:00
39cf673132 OpenSubdiv: Refactor, move base C-API file to base folder 2020-05-27 12:07:16 +02:00
98197343e8 OpenSubdiv: Cleanup, use C++ range based loop
Avoid indirection via define.
2020-05-27 12:07:16 +02:00
be03a756e5 OpenSubdiv: Cleanup, move utility function to base type conversion 2020-05-27 12:07:16 +02:00
0ff665e4ce OpenSubdiv: Refactor, move type conversion to base fodler 2020-05-27 12:07:16 +02:00
4886a704b3 OpenSubdiv: Refactor, move evaluator to own folder 2020-05-27 12:07:16 +02:00
6fc9d106ad OpenSubdiv: Completely disable topology verification
Previously it was enabled for debug builds, now it is to be enabled
explicitly.

The reason for this is to reduce overhead when debugging other areas
which might involve subdivision surface. When conversion is to be
debugged set this manually in the code.
2020-05-27 12:07:16 +02:00
0d089ce881 OpenSubdiv: Refactor, move edge map to base folder 2020-05-27 12:07:16 +02:00
4ab36c4393 OpenSubdiv: Refactor creation of topology refiner
Consolidate it inside of the topology refiner implementation class,
which would allow to store extra data acquired during construction
of the OpenSubdiv's object.
2020-05-27 12:07:15 +02:00
57aae2a355 OpenSubdiv: Refactor, use C++ allocation for internal classes
Only use OBJECT_GUARDED_{NEW. DELETE} for structures which are part of
public C-API (and hence can not have new/delete operators overloaded).

Could try being brave and override new/delete from under C++ ifdef.
2020-05-27 12:07:15 +02:00
c81a5f58f8 OpenSubdiv: Refactor, move topology refiner factory to topology folder 2020-05-27 12:07:15 +02:00
67fe31d751 OpenSubdiv: Refactor, move topology refiner to own folder
In the future factory will also be moved there.
2020-05-27 12:07:15 +02:00
7c0bea0d65 OpenSubdiv: Refactor, move device specific code to own files
Also, move all device files to own folder.

Makes it so checks for device availability are done in a localized
place.
2020-05-27 12:07:15 +02:00
Konrad Puklicki
e490dc4346 UI: Skip unnecessary cursor setting
Currently, in sculpting, weight paint and vertex paint modes every cursor
movement triggers redraw of a brush. During that redraw, native cursor is set.
Under the hood, setting the cursor causes freeing of previous cursor and
allocating a new one. In most cases, in previously mentioned modes, recreating
cursor is unnecessary since cursor stays the same.

This patch adds a check which skips cursor change if requested cursor is
already set. The check could be added in pain_cursor.c, but I felt adding it
inside WM_cursor_set function would hopefully skip more unnecessary cursor
reallocations.

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

Reviewed by: Julian Eisel
2020-05-27 12:06:35 +02:00
bab5fbb66c Merge remote-tracking branch 'origin/blender-v2.83-release' 2020-05-27 12:01:04 +02:00
1c3b2b5dd8 Fix T77105: Crashes when clicking "new scene" button
This was introduced on ecc395e473.

Effectively this is reverting that commit for cases when
scene->toolsettings->sculpt is NULL. But since the facesets are only
working for sculpting this should be fine.
2020-05-27 12:00:00 +02:00
Stefan Werner
ecc15c55d4 Cycles: Upgraded Embree to version 3.10.0
Enabled round linear hair in Embree.

Differential Revision: https://developer.blender.org/D7623
2020-05-27 10:10:18 +02:00
7836242065 Cleanup: remove unused Main struct from snap context 2020-05-27 16:54:34 +10:00
355d129965 Gizmo: lazy initialize snap context
ED_gizmotypes_snap_3d_context_get could have returned NULL,
rename _get(..) to _ensure(..) and initialize the snap context
in this function.
2020-05-27 16:47:30 +10:00
1f7a791a53 Ruler: Implement Snap Gizmo
The snap point can now be viewed when activating the tool.
2020-05-27 00:16:32 -03:00
2e73e1390e Gizmo Library: New Snap Gizmo
Generic snap gizmo to be used for different tools.

The Gizmo can be configured initially by the following properties:
- `"snap_elements_force"`, `"prev_point"`

The following properties can be read as return:
- `"location"`, `"normal"`, `"snap_elem_index"`

This property can be linked to another (tool_setting.snap_elements):
- `"snap_elements"`

And this 3 extra utilities have been added:
- `ED_gizmotypes_snap_3d_draw_util`,
- `ED_gizmotypes_snap_3d_context_get`,
- `ED_gizmotypes_snap_3d_update`.

Differential Revision: https://developer.blender.org/D7071
2020-05-27 00:14:11 -03:00
7ed7901c00 Gizmo: add flag to disable tooltip
For some gizmos that follow the mouse cursor, this gets in the way.
2020-05-27 12:24:29 +10:00
43af0f4d16 Cleanup: pass const wm for WM_keymap_active 2020-05-27 12:09:52 +10:00
6c1cf395f2 Cleanup: remove unnecessary copy constructor
Caused deprecated-copy warnings as it wasn't used.
2020-05-27 11:50:54 +10:00
a739dc67ef Cleanup: sort file, structs 2020-05-27 10:52:07 +10:00
e5458fa4e5 Cleanup: warning 2020-05-27 10:52:00 +10:00
a8551f93e6 Merge branch 'blender-v2.83-release' 2020-05-26 16:52:15 -06:00
f772a4b8fa Fix: A few missing outliner selection sync tags
Add selection syncing for object add named (e.g. drag and drop from
outliner to 3D view), outliner right click (a sync when the context menu
is cancelled), and for object selection from Python.
2020-05-26 16:42:21 -06:00
eb5422828a Cleanup: Quiet unused variable warning in non-debug builds 2020-05-26 16:02:08 -04:00
5171d86806 UI: List Panel System
This implements a general system to implement drag and drop, subpanels,
and UI animation for the stack UIs in Blender. There are NO functional
changes in this patch, but it makes it relatively trivial to implement
these features for stacks.

The biggest complication to using panels to implement the UI for lists
is that there can be multiple modifiers of the same type. Currently there
is an assumed 1 to 1 relationship between every panel and its type, but
there can be multiple list items of the same type, so we have to break
this relationship. The mapping between panels and their data is stored
with an index in the panel's runtime struct.

To make use the system for a list like modifiers, four components
must be added:
1. A panel type defined and registered for each list data type, with a
    known mapping between list data types and panel idnames.
1. A function called by interface code to build the add the panel
    layouts with the provided helper functions.
    - UI_panel_list_matches_data will check if the panel list needs to
      be rebuilt.
    - UI_panels_free_instanced will remove the existing list panels
    - UI_panel_add_instanced adds a list panel of a given type.
3. An expand flag for the list data and implementations of
    get_list_data_expand_flag and set_list_data_expand_flag.
4. For reordering, the panel type's reorder callback. This is called
   when the instanced panels are drag-dropped. This requires
   implementing a "move to index" operator for the list data.

Reviewed By: Severin, brecht

Differential Revision: https://developer.blender.org/D7490
2020-05-26 15:39:49 -04:00
Cody Winchester
de257b6366 Modifiers: Add normalize weights option to vertex weight modifiers
Original patch by Cody Winchester (@CodyWinch), several fixes and
cleanup by Bastien Montagne (@mont29).

Differential revision: https://developer.blender.org/D7656
2020-05-26 20:56:27 +02:00
00674c12cc Merge branch 'blender-v2.83-release' 2020-05-26 20:49:53 +02:00
18f33f293b Fix Cloth Brush grab deformation mode
The grab mode was not correctly implemented, so the way it was working
was confusing for users.
- Grab delta was calculated in increments from the last stroke position, so it did not match the behavior of a grab brush. I refactored the grab delta calculation to make this change more explicit.
- Grab displacement was not calculated from the original coordinates
- Grab was using an incorrect strength

Grab is now setting the position of the affected vertices directly and
the constraints solve the rest of the cloth. I also tried to implement
an alternative version based on applying forces to move the vertices to
the grab position, but I think this is more controllable and the grab
falloff can be adjusted by tweaking the simulation falloff.

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D7756
2020-05-26 20:48:46 +02:00
9aea7dc7c6 Fix Pose Brush origin position with large brush size
When the brush size is bigger than the entire mesh, fdata.tot_co can be
0, so the pose origin will default to (0,0,0), which does not make much
sense. After this patch, the pose origin will be set to the farthest
vertex from the pose origin, which at least should be in the surface of
the mesh and in most cases in the direction the pose brush was already
detecting the origin.

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D7773
2020-05-26 20:45:20 +02:00
9b0f65c4a6 Fix naming in the PBVH neighbor iterator macro
The only possible name for the iterator was ni, this should fix that.

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D7774
2020-05-26 20:43:14 +02:00
5f63344e84 Fix PBVH API returning wrong normal when using shape keys and modifiers
The implementation of this function should match the one in
SCULPT_vertex_co_get. This does not solve the issue when sculpting with
modifiers active but I think this code is wrong

Reviewed By: sergey, brecht

Differential Revision: https://developer.blender.org/D7805
2020-05-26 20:40:27 +02:00
a2baf50242 Cleanup/refactor: Workspace API, boilerplate code, early exit
* Simplify workspace API a bit
* Comment on behavior of workspace-layout relations where exposed in API
* Remove annoying getters/setters
* Avoid lookups if we can early exit
* A NULL check is removed in `direct_link_workspace()` that I don't see
  a need for. Am not 100% sure though, fingers crossed.

In general these changes should improve readability and make things
easier to reason about.
2020-05-26 20:32:21 +02:00
1f223b9a1f UI: Windows Shell Links & Improved Mac Aliases
Adds support for Windows Shell Links (shortcuts) to the File Browser. Extended Mac Alias usage. Better visualization of linked items.

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

Reviewed by Campbell Barton
2020-05-26 08:15:50 -07:00
78eae89c39 Merge remote-tracking branch 'origin/blender-v2.83-release' 2020-05-26 16:44:35 +02:00
a1c9d42584 Fix T77021: Alembic export of animated mesh with multiple UV maps fails
This was caused by a side-effect of our exporting code's memory
management (Alembic considers data "written" and "final" when its C++
objects go out of scope) in combination with my change in
rB65574463fa2d. I removed an "only export UVs on the first frame" clause
because it was unclear why this restriction was there. As it turns out,
it breaks the export of the 2nd and subsequent UV maps on an animated
mesh. Effectively, on every frame the Alembic library thought we want to
create a new UV map, instead of continuing to write a new frame of data
to the existing one.

This is resolved by keeping a reference to the C++ objects for the UV
maps in memory while the exporter is running.
2020-05-26 16:42:01 +02:00
4102e7ed81 Fix T77032: Crash when creating GPUOffscreen without GPUContext in Python 2020-05-26 11:38:19 -03:00
d8733539b7 Merge branch 'blender-v2.83-release' 2020-05-26 16:26:16 +02:00
f3cf29ac96 Fix T77074: Collections: Exclude From ViewLayer toggle crashes
Consider this a bandaid fix (similar to rBe2724abc22d5).

Real issue seems to be that object is still in OB_MODE_PARTICLE_EDIT
whereas it should be in OB_MODE_OBJECT after toggling 'Exclude From
ViewLayer'. So while this patch prevents the crash, it leaves the object
in a weird state (it cannot be selected for example), needs further
investigation.

Maniphest Tasks: T77074

Differential Revision: https://developer.blender.org/D7843
2020-05-26 16:22:41 +02:00
4114e89020 Fix overlapping tabs placement when used in right Top-bar split
Didn't respect alignment rules for split layouts.

Reported in T77075.
2020-05-26 15:42:50 +02:00
14b1c55e11 Cleanup: Remove uneeded NULL checks on ed_screen_context
view_layer should never be NULL.
2020-05-26 15:08:45 +02:00
299682bde7 Merge branch 'blender-v2.83-release' 2020-05-26 15:04:17 +02:00
d3275178fe Fix T77082: Greasepencil error accessing material dropdown on an object without materials
Differential Revision: https://developer.blender.org/D7841
2020-05-26 14:55:37 +02:00
35bd596876 Merge branch 'blender-v2.83-release' 2020-05-26 14:53:19 +02:00
2299f6b5a7 Fix T77049: VSE Image cache is not refreshed when strip are muted/
unmuted in metastrip

Maniphest Tasks: T77049

Differential Revision: https://developer.blender.org/D7834
2020-05-26 14:49:19 +02:00
e790f1a8dc Merge branch 'blender-v2.83-release' 2020-05-26 14:24:50 +02:00
23520cbd13 Cleanup: Avoid mixing unlink-operator and menu name for ID-templates
The context menu name for `UILayout.template_ID_tabs()` would be passed
through multiple functions as `unlinkop`.
2020-05-26 13:28:21 +02:00
2a692e05c8 Fix T77075: Crash omitting optional UILayout.template_ID_tabs parameter 2020-05-26 12:56:53 +02:00
13e17cbd47 Cleanup: remove unused includes from lib_query.c 2020-05-26 12:33:28 +02:00
b44c3ac1e9 Fix/Cleanup: Move some animdata versioning code out of liblinking process.
This was propably added way before we had the after-lib-link versionning
code, but now doing that sort of fixes at liblink time is bad.
2020-05-26 12:33:28 +02:00
4835a09bb1 Cleanup: Create afterliblink doversion for 2.90... and move relevant code there.
Seriously... Please comply with design and do not add 2.9x versionning
code to 2.8x versioning functions!
2020-05-26 12:33:28 +02:00
13b10ab852 Fix/refactor foreach_id handling of animdata.
Now callbacks for animdata, nla strip and fcurve are in their own proper
BKE files (mimicking `foreach_id` callback of `IDTypeInfo`).

This commit also fixes some missing handling of ID pointers (text ID and
IDProperties of script fcurve modifier...).
2020-05-26 12:33:28 +02:00
fc2bb44e94 Fix T68209: Crash opening pre 2.8 file with maximized area
Versioning for workspaces didn't update the map used to determine which
layout is active for a workspace in a specific window. Library code now
called the function to make a workspace active (even if it already was
active), which would also use this map to determine the active layout --
the wrong one.

Error in initial workspace integration, but only uncovered recently.
Likely through 0d8a8ce03b.
2020-05-26 12:19:27 +02:00
5a1ab3e9ae Fix T77067: GPencil Object without materials cannot use Vertex Color mode 2020-05-26 12:13:25 +02:00
825d5c9992 Fix T76522: Grease Pencil transform fill and Adjust Last Operation panel issue
The exec method was totally wrong and also the UI panel was not logic. 

Also changes to make the transformation smoother and the code more simple.

Reviewed By: lichtwerk, mendio

Maniphest Tasks: T76522

Differential Revision: https://developer.blender.org/D7741
2020-05-26 11:22:32 +02:00
2dd6d0ce4b Fix T76926: Crash with Full Screen file browser window preference
Alternative fix for T75292 & T73579 (see b75ce05c3b), that does not
cause this crash.

The crash happened because cancelling the file browser removes its
screen (as in bScreen). Before rBb75ce05c3b0f, the file browser event
wouldn't be handled any further then. After it, it would still be passed
to other areas, while the screen pointer was dangling.
Now the event is only skipped for UI handlers.

Reviewed by: Julian Eisel
2020-05-26 10:38:46 +02:00
49f59092e7 Curves: Implement Handles for selected points only
When editing a complex curve is very annoying to have all handles at a time. Also, this is a requirement for the current GSoC Edit Grease Pencil using curves.
I have seen that this improvement can be used in any other area of blender, so I have decided to publish the option in the overlay panel..

Reviewed By: fclem, #user_interface, billreynish, Severin

Differential Revision: https://developer.blender.org/D7754
2020-05-26 10:37:47 +02:00
ecc395e473 Fix T76902: face sets checkbox broken
Due to recent changes the face sets checkbox broke. The cause is that
{7d38f5036794} changed the responsibility of drawing and updating sculpt GPU
buffers to fix render glitches.

This patch moves the checkboxes evaluation to the overlay engine.
2020-05-26 08:48:57 +02:00
77fdd189e4 Fix T76970: Unneccessary update calls viewport
Due to recent changes clicks in the node editor would trigger a
depsgraph update resulting in too many redraws. This patch limits
the updates to when workbench shown in texture mode in any visible
screen.

There are still cases where too many updates are created. For example when
there are a Cycles render viewport and a Workbench texture viewport on the
same screen.

This fix is meant as a workaround. The actual fix should add a mechanism
to the depsgraph and the viewports should check if they need to be redrawn.

Reviewed By: Brecht van Lommel

Differential Revision: https://developer.blender.org/D7830
2020-05-26 08:29:24 +02:00
495a98d623 BLI_assert: prevent abort from suppressing return-type warning
Recent commit deaff945d0 broke release builds but not debug builds,
with this change the warning happens in both cases.
2020-05-26 13:40:21 +10:00
4e8693ffcd Improved Area Border Selection and Dragging
Allow use of the full width of visible borders when dragging to resize areas.

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

Reviewed by Brecht Van Lommel
2020-05-25 16:29:21 -07:00
5254ffa17b Fix T77051: IC keymap hotkey conflict in mode switching with GP object 2020-05-25 21:50:07 +02:00
39aa122a0e DRW: Selection: Extend small object selection workaround to all overlays
Fix T77015 box select doesnt select cameras when zoomed out, lasso and circle select do work.
2020-05-25 19:35:07 +02:00
4a9a8611f2 Fix T72121: Measurements are being drawn incorrectly if one end is off screen
The solution is to distribute the drawing for part to be done in 3d
(dashed lines, arc) and another part in 2d (text and caps).

Ref T72121

Reviewed By: fclem

Maniphest Tasks: T72121

Differential Revision: https://developer.blender.org/D6361
2020-05-25 19:17:59 +02:00
4464a9425b Calculate epsilon values for interp_weights_poly to improve accuracy
interp_weights_poly_v2 would have too large epsilon values for small
polygons. To solve this we now calculate the appropriate epsilon value
so it can gracefully handle big and small values.

To make sure there was no regression, these changes were tested with the
files in T36105, T31581. Also with a surface deform modifier test file
attached in the differential below.

Reviewed By: Brecht

Differential Revision: http://developer.blender.org/D7772
2020-05-25 18:59:14 +02:00
c19cc7ef81 GPUTexture: Make GPU_texture_clear workaround fast.
This way we have a convenient way to clear individual textures.
2020-05-25 18:37:44 +02:00
6fbeded285 Fix T76926: Crash with Full Screen file browser window preference
Alternative fix for T75292 & T73579 (see b75ce05c3b), that does not
cause this crash.

The crash happened because cancelling the file browser removes its
screen (as in bScreen). Before rBb75ce05c3b0f, the file browser event
wouldn't be handled any further then. After it, it would still be passed
to other areas, while the screen pointer was dangling.
Now the event is only skipped for UI handlers.

Reviewed by: Julian Eisel
2020-05-25 18:33:12 +02:00
31cb4133b9 Fix T77009: texture baking crash on Windows
Only happens in master, but DynamicArray implementation is wrong also in 2.83.
Thanks to Jesse Y and Ray Molenkamp for investigating.
2020-05-25 18:17:30 +02:00
52c356c199 Cleanup wrong format specifier in a debug printf. 2020-05-25 17:49:58 +02:00
396bf6ca78 Fix T73164: Undo does not always properly clear no-more-used library data.
Solution is actually very simple, and even makes existing code simpler:
just write all lib IDs when storing and undo step. That way we do not
have to guess which indirectly used library should be kept or not after
an undo step reading.
2020-05-25 17:44:27 +02:00
6d4dc22e17 Sculpt: Pose Brush Scale/Transform deform mode
This is an alternative deformation brush for the Pose Brush intended
quickly change the proportions of the mesh. The regular mode scales
using the segment's origin as a pivot. The inverted mode drags the
entire segment using the grab delta.

The only difference with the regular pose brush is that it is not
compatible with IK, so the option is disabled and set to 1 segment. The
rest of the options should work as expected.

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D7374
2020-05-25 17:35:39 +02:00
28d81f7b24 Fix T76957: Rigid body "Animated" text cutoff
Removes the flow layout from the panel. No reason to use that here,
surrounding code doesn't either. Probably an unintentional left-over.
2020-05-25 17:26:22 +02:00
9f1f7ba2bb Fix T76925: more Cycles OpenCL compile errors with some drivers on Linux 2020-05-25 17:06:10 +02:00
f53ae843b3 Fix T76267: Stencil texture with negative scale dissapears after
clicking Image Aspect

Calculate with positive areas here and ensure stencil_dimension stays
positive.

Maniphest Tasks: T76267

Differential Revision: https://developer.blender.org/D7821
2020-05-25 16:57:36 +02:00
ce0db0d329 UI: Fix T76918: 3D Mouse Inconsistent / Inaccessible UI
This consolidates the UI code for NDOF input settings, making all
settings accessible from the preferences. This works around an issue
where the Space Navigator's "Menu" button doesn't trigger the settings
menu in Blender.

I also took the opportunity to redo the UI layout.

Note: Separate commit for 2.83 because UI layouts features
have diverged.

Differential Revision: https://developer.blender.org/D7806
2020-05-25 10:53:17 -04:00
2ba3214a21 UI/Physics: Show error enabling Rigid Body if compiled without Bullet
Would just silently fail, which is confusing.
Should only impact custom builds.
2020-05-25 16:49:18 +02:00
7a51eb5340 Merge remote-tracking branch 'origin/blender-v2.83-release' 2020-05-25 16:37:43 +02:00
219ce574b5 Revert "UI: View3D Cursor Changes"
This change is yet to be followed by a more comprehensive design
proposal including:

* How to differentiate the modes apart.
* More clear definition of tools and the rules for their components (gizmo, cursor).
* Selection as a non-tool vs drag option.

This can be revisited for 2.90 with more time. For now the UI team
agrees to revert this.

--
This reverts commit 4aa703aa14.
2020-05-25 16:28:55 +02:00
1b06d5742e Fix building after rBdeaff945d0b9... sic. 2020-05-25 16:07:37 +02:00
ec0ba8e3b5 VR: Fix big performance bottleneck for simple scenes
Blender's main loop puts the main thread to sleep for 5ms if no user input was
received from the OS. We never want that to happen while the VR session is
running, which runs on the main thread too.

For simpler scenes, where the viewport already draws fast, this may have quite
some impact. E.g. in my tests, the classroom scene went from ~55 to quite
stable 90 FPS in solid mode (total render time as measured and averaged by
Windows Mixed Reality utilities). With Eevee, it only went from 41 to 47 FPS.
In complex files, there's barely a difference. E.g. less than 1 FPS increase in
a Spring file (both Solid mode and Eevee).
2020-05-25 15:52:24 +02:00
026eba8523 Fix T76941: "Set Inverse" in Child Of constraint broken with armatures
When the Child Of constraint is owned by a bone, before the constraint is
run the matrix is converted from world to pose space. However, setting the
inverse should also take the armature object's transform into account.
2020-05-25 15:46:08 +02:00
8b849f39e8 Merge branch 'blender-v2.83-release'
Conflicts:
	source/blender/blenkernel/intern/lib_id.c
2020-05-25 15:43:54 +02:00
849f5bee19 Cleanup: ID makelocal code: remove useless and confusing debug code.
Thing is, user code should not have the responsibility to check that
libquery is valid. Such checks are only source of confusion and errors
as nobody will think about finding and updating them in some obscure
specific area of the code...
2020-05-25 15:38:36 +02:00
b01d2ea72a Libquery: Refactor: add bmain to data passed to callback.
No reason to enforce defining own callback user data for something that
controlling has already available...
2020-05-25 15:28:15 +02:00
e0ff032711 Fix T76997: bad handling of embedded IDs in partial append.
Code dealing with embedded data was pre-existing proper generic
handling of those by `BKE_library_foreach_ID_link()` - and was never
updated for scene's master collection it would seem...

Note that such fix/refactor is a bit risky at this point in the release
cycle, but on the other end previous situation was really broken. So
finger crossed. :|
2020-05-25 15:28:15 +02:00
7a37db6125 Fix T76997: bad handling of embedded IDs in partial append.
Code dealing with embedded data was pre-existing proper generic
handling of those by `BKE_library_foreach_ID_link()` - and was never
updated for scene's master collection it would seem...

Note that such fix/refactor is a bit risky at this point in the release
cycle, but on the other end previous situation was really broken. So
finger crossed. :|
2020-05-25 15:11:36 +02:00
deaff945d0 Mesh: skip conversion from edit-mesh to mesh in edit-mode
This resolves a performance regression in 2.8x where every edit-mode
update performed an edit-mesh to mesh conversion.

Now the conversion will be lazily initialized if/when it's required.

New BKE_mesh_wrapper_* functions abstract over mesh data access.
Currently only edit-mesh and regular meshes are supported.
In the future sub-surface meshes may be supported too.
2020-05-25 23:07:30 +10:00
df8cbdc696 Merge branch 'blender-v2.83-release' 2020-05-25 14:10:20 +02:00
a8a6b3627a Fix autokeyframing masks not updating properly
Spotted while looking into T76872

Maniphest Tasks: T76872

Differential Revision: https://developer.blender.org/D7786
2020-05-25 13:56:49 +02:00
0270941b70 Merge branch 'blender-v2.83-release' 2020-05-25 21:43:54 +10:00
7e9480b6cd Tests: correct the blender path for non-portable installations 2020-05-25 21:28:03 +10:00
dc3f404a70 Cleanup: unused variable warnings 2020-05-25 21:03:45 +10:00
3c40d2485f Merge branch 'blender-v2.83-release' 2020-05-25 21:01:38 +10:00
1a60aba46f Merge branch 'blender-v2.83-release' 2020-05-25 21:01:34 +10:00
d65f60764b GTest: BLI_ghash_performance_test was failing
Change the seed from 0 to 1, so BLI_ghash_performance_test doesn't
assert with duplicate keys.
2020-05-25 20:52:10 +10:00
baa1886791 Fix T76990: Crash shortest path select with 'face stepping' when no faces.
Note that this sometimes gives no solution when there is a mix of edges
with and without faces... But at leat this should be safe fix.
2020-05-25 12:44:10 +02:00
9ef272bae3 Task: Graph Flow Task Scheduling
Add TBB::flow graph scheduling to BLI_task.

Using flow graphs, a graph of nodes (tasks) and links can be defined.
Work can flow though the graph. During this process the execution of the nodes will be
scheduled among the available threads.

We are planning to use this to improve the threading in the draw manager.

The implemented API is still limited it only supports sequential flows. Joins and buffers
are not supported. We could eventually support them as part of an CPP API. These features
from uses compile time templates and are hard to make a clean C-API for this.

Reviewed By: Sergey Sharybin, Brecht van Lommel

Differential Revision: https://developer.blender.org/D7578
2020-05-25 12:38:12 +02:00
87e9557cd1 Simulations: pass simulation data block to update function 2020-05-25 12:23:55 +02:00
60bed34f16 install_deps: update libraries versions.
- FFMPEG: 4.3.2
- OpenSubDiv: 3.4.3
- OpenXR SDK: 1.0.8
- Switch form SDL 1.2 to SDL 2.0

Re T77035, T77007, T77010 and T77011
2020-05-25 11:54:30 +02:00
1c467d77de Cleanup: typo 2020-05-25 11:39:52 +02:00
528f0b95c4 Merge remote-tracking branch 'origin/blender-v2.83-release' 2020-05-25 10:45:39 +02:00
41bb0548b0 Fix T76897: Lamp Power Not Updating from Driver
Lamps were not tagged with `ID_RECALC_SHADING` when they were updated
from drivers. As a result, Cycles considered the lamp as unchanged. This
is resolved by having a (seemingly non-functional) callback in a new
`LIGHT_UPDATE` depsgraph node.

This patch unconditionally adds the `LIGHT_UPDATE` node + the relation
from the lamp's PARAMETERS node.

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

Reviewed by: brecht
2020-05-25 10:07:10 +02:00
9b9f84b317 Fix crash when converting BMesh to Mesh with shape keys
The `BM_mesh_bm_to_me()` function copies shape keys from the BMesh to
the Mesh. However, it tries to copy the same number of shape keys as are
defined on the target mesh. Since the target mesh does not necessarily
have the same number of shape keys as the BMesh, this would crash if the
target Mesh has more.

Found while performing some tests for {D7785}.

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

Reviewed by: brecht
2020-05-25 09:43:01 +02:00
5a842b3412 Merge branch 'blender-v2.83-release' 2020-05-25 15:55:54 +10:00
c15bb3b55f Fix T77031: Blender as pymodule crashes when rendering
No longer enforce WITH_HEADLESS when building as a Python module
as it disables GPU access which is needed for rendering.
2020-05-25 15:53:43 +10:00
ffcb87813b Merge branch 'blender-v2.83-release' 2020-05-25 15:01:01 +10:00
dc429d5910 Merge branch 'blender-v2.83-release' 2020-05-25 15:00:58 +10:00
31f3e9082a Cleanup: make format 2020-05-25 14:55:48 +10:00
f274b8c102 CMake: disable WITH_USD with blender_lite configurations 2020-05-25 14:54:41 +10:00
0700521833 Py Docs: Update Sphinx and Theme Dependencies
`sphinx_rtd_theme==0.5.0rc1` probably should not be used for 2.83 but it 
would be nice to test
2020-05-24 19:23:28 -04:00
5db2d9c82b Deps: ffmpeg 4.2.3 + codecs update
This diff updates:
FFmpeg : 4.3.2
libogg : 1.3.4
flac   : 1.3.3
vpx    : 1.8.2
xvid   : 1.3.7
x264   : 33f9e1474613f59392be5ab6a7e7abf60fa63622

x264 seemingly has given up on even providing snapshots
and has been updated to the latest hash available at
this time.

faad has been removed since ffmpeg has not supported
it since 2010.
2020-05-24 15:18:39 -06:00
f13b687551 Merge branch 'blender-v2.83-release' 2020-05-24 21:14:23 +02:00
0d0df683d9 Fix(unreported): Crash on prefetching while transforming strip.
While investigating T76274, I found crash scenario when playhead is near end
frame and moving a strip. It is not as easy to reproduce, about 5% success
rate, and it will be even harder after rB4066c921fbe5. Exact cause wasn't
identified yet.

I wanted to disable prefetching during modal operator execution in VSE, but
currently I don't have any signalling method in place. Checking for G.moving
seems to resolve this problem, but it doesn't adress root cause of bug.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D7820
2020-05-24 21:03:31 +02:00
6b8555e01c VR: Fix big performance bottleneck for simple scenes
Blender's main loop puts the main thread to sleep for 5ms if no user input was
received from the OS. We never want that to happen while the VR session is
running, which runs on the main thread too.

For simpler scenes, where the viewport already draws fast, this may have quite
some impact. E.g. in my tests, the classroom scene went from ~55 to quite
stable 90 FPS in solid mode (total render time as measured and averaged by
Windows Mixed Reality utilities). With Eevee, it only went from 41 to 47 FPS.
In complex files, there's barely a difference. E.g. less than 1 FPS increase in
a Spring file (both Solid mode and Eevee).
2020-05-24 17:26:31 +02:00
8e4c74292a Fix T77000: Preferences window can not be opened from script operator
The operators to open the Preferences, Driver Editor, or Info Log window did
not work when executed from another operator or the Python console. Should work
for all of these now.

I considered using operator properties instead, so the position could be set by
a script, with some fallback (e.g. current window center). But decided that's
not really worth the boilerplate and decreased code readability. Can still be
done if there's a need for it.
2020-05-24 16:14:11 +02:00
f43bb98646 Merge branch 'blender-v2.83-release' 2020-05-24 10:22:28 +02:00
22462fed00 Fix T77003: GPencil Paint presets not initializated
In som ecases, the Paint was not ready when the brushes and palette were created. Now, first the paint is checked.
2020-05-24 10:22:03 +02:00
525fc36a80 Deps : XR_OpenXR_SDK 1.0.8 2020-05-23 15:58:15 -06:00
2ddd9813ef deps: SDL 2.0.12 2020-05-23 15:41:44 -06:00
157b9e78a4 Deps: OpenSubDiv 3.4.3 2020-05-23 15:21:28 -06:00
93f60a4da5 Deps: Freetype 2.10.2 2020-05-23 14:37:17 -06:00
f5cd06ed45 deps: OpenAL 1.20.1 2020-05-23 14:02:34 -06:00
1f34a34fa5 Merge branch 'blender-v2.83-release' 2020-05-23 10:43:41 -06:00
6f8d99322c Fix T76578: Show bone visibility driver in outliner
Allow setting drivers and keyframes for the bone visibility restriction
icon in the outliner. Before the button was a simple icon button, but it
is now connected to the RNA property to show the driven or keyframed
state.

Also when hiding a bone from the outliner it would be deselected, but
from the properties editor it would remain selected. This moves the
deselection to the RNA update function to ensure the bone is always
deselected.

Differential Revision: https://developer.blender.org/D7825
2020-05-23 10:36:54 -06:00
041e440649 Merge branch 'blender-v2.83-release' 2020-05-23 15:26:24 +02:00
b4613e0bca GPencil: Fix unreported Noise modifier does not work in axis aligned strokes
If the stroke is totally straight, the normal was not calculated properly.
2020-05-23 15:25:54 +02:00
08c1f5bf33 Cycles: Improve sampling of area lights
This patch uses the sampling method described in "A Low Distortion Map Between Triangle and Square" by Eric Heitz.
The benefit is avoiding sqrt in the calculation, which could be cheaper on some architectures, and the result is
more even sampling across the triangle surface.

Based on ideas from
https://pharr.org/matt/blog/2019/02/27/triangle-sampling-1.html
https://pharr.org/matt/blog/2019/03/13/triangle-sampling-1.5.html

Reviewed By: Brecht Van Lommel

Differential Revision: https://developer.blender.org/D6566
2020-05-23 14:21:49 +02:00
86fa8dc7f7 Merge branch 'blender-v2.83-release' 2020-05-22 22:59:02 +02:00
ece8ecb4dd Cleanup: remove unnecessary NULL test 2020-05-22 22:57:58 +02:00
Ankit
e8dd8c2829 Cleanup: silence deprecation warnings of Carbon Finder Favorites items
Differential Revision: https://developer.blender.org/D7655
2020-05-22 21:52:38 +02:00
f27e122d95 Fix T76925: Cycles OpenCL compile error with some drivers on Linux 2020-05-22 21:50:24 +02:00
e8209c36e6 Cleanup: Deduplicate code 2020-05-22 14:58:56 -03:00
45f17e10ec Fix redo with local orientation 2020-05-22 14:43:51 -03:00
a958725f81 Fix unused parameter ftext 2020-05-22 14:43:51 -03:00
3bc15c097c Fix T76940: Empty HUD (Redo Panel)
If the redo panel was made visible with the same size it had before
(e.g. stored in the file), the runtime region coordinates wouldn't get
set and ended up being all 0. E.g. the simplest way to cause this was
having a collapsed HUD, saving the file, re-opening it with the same
effective DPI and doing an operation so the closed HUD would appear
again.

Now the size is always recalculated if the visibility state of the HUD
changes.
2020-05-22 18:40:10 +02:00
43d33b3626 Merge branch 'blender-v2.83-release' 2020-05-22 17:48:10 +02:00
98689f51c0 Fix T74443: No render in VP9 lossless mode
We define Lossless as CRF 0 (which is usually the best quality and is
working fine with other codecs afaict), but since WebM only allows for
CRF values between 2-32 and actually has a dedicated "lossless" mode, I
suggest using that (it produces large files though, so double-checking
would be welcome).

https://trac.ffmpeg.org/wiki/Encode/VP9#LosslessVP9

Maniphest Tasks: T74443

Differential Revision: https://developer.blender.org/D7800
2020-05-22 17:41:27 +02:00
cbd4b8ebb0 Fix T76974: Shear Tool Misses Orientation 2020-05-22 12:39:57 -03:00
c75a665c44 Transform: refactoring - unify constraint and default orientation 2020-05-22 12:39:56 -03:00
06860ba29b Merge branch 'blender-v2.83-release' 2020-05-22 17:21:52 +02:00
a76e804309 Fix T76960: fluid baking operators not working with pinned object
Maniphest Tasks: T76960

Differential Revision: https://developer.blender.org/D7819
2020-05-22 17:16:31 +02:00
1633a65d41 RNA: Make enum properties compatible with raw access.
This will allow to use foreach_get/set on enums of RNA collection items,
which can save a lot of time in some cases (see incoming FBX updates).
2020-05-22 15:41:34 +02:00
Jeroen Bakker
0236863c6d Fix T73115: In Front Drawing Bone Envelope Distance
The in front drawing was not supported for transparent part of the   armature. This patch adds a second transparent pass for drawing in
front.

Reviewed By: Clément Foucault

Differential Revision: https://developer.blender.org/D7763
2020-05-22 15:09:48 +02:00
920b698746 Merge branch 'blender-v2.83-release' 2020-05-22 22:42:16 +10:00
8ddcc7fd51 Merge branch 'blender-v2.83-release' 2020-05-22 22:20:01 +10:00
69e331201e UV: remove "UV Local View" for UV editing
This feature was added when Blender used tex-face (per-face images),
but doesn't make as much sense since this was removed.

Removing this from UV edit-mode as this wasn't working in any
of the 2.8x releases, causing UV's to be visible but unselectable.

Resolves issue raised in T76958.
2020-05-22 22:18:32 +10:00
Jeroen Bakker
59aed2a255 Fix T73726: Workbench Closest Interpolation Artifacts
All textures in workbench are using linear interpolation. The fragment
shader modifies the uv coordinates to sample always in the center of a
texel. In rare conditions the GPU could sample an incorrect value due to
rounding errors making some rendering artifacts.

This patch skips the interpolation in the fragment shader to remove
these render artifacts.

Reviewed By: Clément Foucault

Differential Revision: https://developer.blender.org/D7816
2020-05-22 14:11:36 +02:00
f990b42504 Revert "UI: Remove duplicate Mark/Clear Seam entries from Edge menus"
Seams are widely used outside UV context so it's okay to duplicate entries.
Based on community feedback, thanks!

This reverts commit fc62a3366c.
2020-05-22 13:41:48 +02:00
f5c682045d Merge branch 'blender-v2.83-release' 2020-05-22 13:36:23 +02:00
4066c921fb Fix (unreported): prefetching wastes resources when end frame is reached
This bug is not really visible for user. When end frame is reached by
prefetching thread, it doesn't stop and keeps on getting images from
cache.

Add chech for this situation and simplify logic involved in suspending,
so it's easier to read.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D7757
2020-05-22 13:31:49 +02:00
c4edc6f3f7 Fix (unreported): Don't restart prefetching during rendering.
Prefetching is stopped in BKE_sequencer_cache_cleanup, but is restarted quickly.

Prefetching has negative effect on performance while rendering.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D7751
2020-05-22 13:05:08 +02:00
a1a333a1e9 Fix T76774: Crash on prefetching sequences from another scene.
When rendering another scene, caching in disabled by setting
local_context.skip_cache = true. Precondition checking for this flag was
missing in BKE_sequencer_cache_get and it wasn't first thing to check in
BKE_sequencer_cache_put.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D7750
2020-05-22 12:59:26 +02:00
fbbc0229b8 Cleanup: only use nullptr in USD exporter
This removes all use of `NULL` from the USD Exporter, also when calling
into C code.

No functional changes.
2020-05-22 10:12:13 +02:00
b87d81be96 Wayland: support key repeat 2020-05-22 18:09:17 +10:00
fe739f8c26 GHOST: fix GHOST_System::getMilliSeconds()
This wasn't returning milliseconds, causing problems with key repeat.
2020-05-22 18:08:13 +10:00
ce6fd6b6a2 Fix missing header building with wayland 2020-05-22 16:47:59 +10:00
Jeroen Bakker
42f8d52401 Fix T64277: Inverted Wheelmouse
When using CTRL wheel mouse the items were selected in a different order than when opening the menu and use the wheel mouse.

Reviewed By: Brecht van Lommel

Differential Revision: https://developer.blender.org/D7791
2020-05-22 07:32:44 +02:00
3aacd8a4ab Merge branch 'blender-v2.83-release' 2020-05-22 12:40:02 +10:00
1b994a37f4 Fix Python console cursor height 2020-05-22 12:36:39 +10:00
8f21f867e7 Fix T76949: Crash When Selecting Materials Tab.
Dummy typo in own recent libquery refactor, of course that one missed
change was on a line not covered by our tests or the production file
used for validation...
2020-05-21 23:20:29 +02:00
70c483e7db libquery: Cleanup: finish refactor by removing no more used code. 2020-05-21 19:37:57 +02:00
3cb6efd3ab Libquery refactor: Cleanup (remove no more used macros). 2020-05-21 19:36:05 +02:00
1f6ef73f98 Refactor: Move scene foreach_id to new IDTypeInfo structure. 2020-05-21 19:29:55 +02:00
c732edbaa4 Refactor: Move object foreach_id to new IDTypeInfo structure. 2020-05-21 19:09:48 +02:00
ce74df6248 Refactor: Move NOP idtypes foreach_id to new IDTypeInfo structure. 2020-05-21 18:35:11 +02:00
7e4654e4ce UI: Fix T76918: 3D Mouse Inconsistent / Inaccessible UI
This consolidates the UI code for NDOF input settings, making all
settings accessible from the preferences. This works around an issue
where the Space Navigator's "Menu" button doesn't trigger the settings
menu in Blender.

I also took the opportunity to redo the UI layout.

Differential Revision: https://developer.blender.org/D7806
2020-05-21 11:42:23 -04:00
df14b11526 GPencil: Cleanup macro 2020-05-21 16:25:35 +02:00
a39ca327bc Fix T76935: Current orientation not taken in account when using "Align to transform orientation" 2020-05-21 11:01:06 -03:00
de7d32bb7d Fix T76933: 'Align to Transform Orientation' crashes for Custom orientations 2020-05-21 11:01:06 -03:00
2fe615ab9f Merge branch 'blender-v2.83-release' 2020-05-21 23:07:18 +10:00
8a8c61190b Docs: note that the color-ramp uses image alpha
Avoid misunderstanding from T59110
2020-05-21 23:03:24 +10:00
0c9e73845c BLI: improve Vector test 2020-05-21 14:35:19 +02:00
03d8783db0 Merge branch 'blender-v2.83-release' 2020-05-21 19:34:41 +10:00
376b69cbff Fix T73568: Vertex selection fails in weight-paint mode
Lasso, circle, box select fails in weight paint mode with modifiers.
2020-05-21 19:32:15 +10:00
2efd00d4d2 Merge branch 'blender-v2.83-release' 2020-05-21 18:19:10 +10:00
d15efbdc56 Fix T76922: Meta-balls created twice the specified size 2020-05-21 18:18:00 +10:00
850fbe8547 Merge branch 'blender-v2.83-release' 2020-05-21 16:34:36 +10:00
c13bf40ab1 Merge branch 'blender-v2.83-release' 2020-05-21 16:34:20 +10:00
0ff663b6fc Merge branch 'blender-v2.83-release' 2020-05-21 16:33:28 +10:00
8d648e0972 Cleanup: spelling 2020-05-21 16:22:37 +10:00
fcfb87def9 Cleanup: excess blank lines and parenthesis 2020-05-21 16:17:44 +10:00
f66bfb5a86 Cleanup: quiet uninitialized warning
It's possible for the value to be uninitialized
in the case of loading newer preferences into an older Blender.
2020-05-21 15:57:46 +10:00
bbef6fe336 Merge branch 'blender-v2.83-release' 2020-05-21 12:59:55 +10:00
8ecfa6a828 Merge branch 'blender-v2.83-release' 2020-05-21 12:59:51 +10:00
b4a6418e2b Cleanup: add doxy sections for event queue handling
The main function to handle events didn't have it's own section.
2020-05-21 12:22:32 +10:00
522e6c0c06 Cleanup: add asserts for textview drawing
This would have prevented T74298.
2020-05-21 12:22:32 +10:00
8a0840b0ee Merge branch 'blender-v2.83-release'
# Conflicts:
#	source/blender/draw/engines/eevee/eevee_volumes.c
2020-05-20 22:56:09 +02:00
af3a55bb1b Overlay: Wireframe: Add visualization for Hairs in wireframe mode
This only works for particle systems for now.

Fix T61928 Wireframe mode hair not visible
2020-05-20 22:54:04 +02:00
71fa460145 UI: Remove Panel Grid Snapping While Dragging
The reason to have this isn't quite clear, but it looks like a vestige
of the 2.5 transition. Removing this makes dragging panels feel
much more responsive.

Thanks to Julian Eisel @Severin for the original change.

Differential Revision: https://developer.blender.org/D7803
2020-05-20 16:27:44 -04:00
6d7dc2265f UI: Rephrase Tooltip to Avoid 2nd Person 2020-05-20 15:53:45 -04:00
8bff3ec76b Transform: Don't negate the z axis of the View orientation
This was so because of the rotate transformation mode but it can make
other modes confusing and add unnecessary complexity.
2020-05-20 16:22:28 -03:00
600fd1c6f0 Fix T76919: Wrong orientation when changing translate to rotate
During the refactor of the transform operations, in an attempt to
maintain previous behavior, the default orientation of the translate
and resize operations became `Global` and the rotate operation became
`View`.

Now the default is always `View`, and on redo, the translate and rotate
operations are saved as `Global`.
2020-05-20 16:22:10 -03:00
29afadcb15 GPencil: Create new frame when Erase only if additive drawing is enabled
Differential Revision: https://developer.blender.org/D7804
2020-05-20 20:33:49 +02:00
b9aa2acecd Refactor: Move collection foreach_id to new IDTypeInfo structure. 2020-05-20 18:43:47 +02:00
e2b87aabb6 Cleanup collection handling in lib_query code.
Now we do not need anymore that extra function...
2020-05-20 18:43:47 +02:00
1c79484d53 Libquery: refactor: handle scene's master collection like any othe embedded ID. 2020-05-20 18:43:46 +02:00
3a284a37fd Refactor: Move simulation foreach_id to new IDTypeInfo structure. 2020-05-20 18:43:46 +02:00
ee44283393 Refactor: Move pointcloud and volume foreach_id to new IDTypeInfo structure. 2020-05-20 18:43:46 +02:00
2059b30ee2 Cleanup: Keep common IDTypeInfo code separated from ID type specific API.
Also remove useless IDTypeInfo callbacks.
2020-05-20 18:43:46 +02:00
4d613018ee Refactor: Move hair foreach_id to new IDTypeInfo structure. 2020-05-20 18:43:46 +02:00
e2d961809b Cleanup: Keep common IDTypeInfo code separated from ID type specific API.
Also remove useless IDTypeInfo callbacks.
2020-05-20 18:43:46 +02:00
140935ee7e Refactor: Move grease pencil foreach_id to new IDTypeInfo structure. 2020-05-20 18:43:46 +02:00
e4e31e4f14 Fix T76916: Cycles missing deform motion blur for shape key + subdiv modifier 2020-05-20 18:00:34 +02:00
93b5682444 Fix T76909 GPencil: Layers with mask(s) invisible when using "in front"
The gpSceneDepthTexture is using a dummy 1px texture which was generating
wrong values for uvs when sampling gpMaskTexture.

Use the max size of both since any of the 2 can use dummy texture.
2020-05-20 17:48:24 +02:00
e15ffc0c54 UI: Fix Wideline AA for timeline 2020-05-20 17:48:24 +02:00
796412dca0 UI: Allow registering File Browser as child of other child windows
E.g. when opening the File Browser from the Preferences window, it would
be the child of the main window the Preferences belong to. Now it can be
a child of the Preferences window itself.
The File Browser always stays on top of its parent window. Which avoids
some issues with OS window management, see T76418 and T72693.
Also removes a now unnecessary workaround to move the child window back
to the front after closing the file browser (opening the file browser
would move the main window and the file browser to the front).

Fixes T76418, T72693.
2020-05-20 17:10:25 +02:00
8fe448b44d Fix T75197: Eevee does not render instanced smoke
This check was introduced in rBc8005703f298, but does not
seem necessary anymore.

Reviewers: fclem, sebbas, brecht

Differential Revision: https://developer.blender.org/D7799
2020-05-20 16:55:43 +02:00
ccf43fe605 Cycles: Fix rendering instanced smoke domain.
The problem was that Cycles would store a pointer to an object in
`DEGObjectIterData->templ_dupli_object`. This pointer was then accessed
when the iterator was already freed.

Reviewers: brecht

Differential Revision: https://developer.blender.org/D7797
2020-05-20 16:53:28 +02:00
aa0e98d707 Merge branch 'blender-v2.83-release' 2020-05-20 16:52:03 +02:00
b44101950d Fix T73979: Wrong location of fluid mesh when domain origin is not in center
Reviewers: sebbas

Differential Revision: https://developer.blender.org/D7802
2020-05-20 16:52:03 +02:00
c1545c9a9d Fluid: Fix for non-moving liquid particles
Issue was introduced in 7bb3d9787e with new Mantaflow files from 61280e5af3.
2020-05-20 16:37:29 +02:00
717577d5fc BLI: Fix VectorSet copy constructor
Thanks to Howard for pointing that out.
2020-05-20 15:47:32 +02:00
e1050fb395 Merge branch 'blender-v2.83-release' 2020-05-20 15:31:54 +02:00
9897ef6a20 Fix T70948: Library Override: Parenting library override objects does not save offset from parent.
Parent inverse matrix needs to be overridable as well...
2020-05-20 15:31:02 +02:00
22c30219e7 Merge branch 'blender-v2.83-release' 2020-05-20 15:17:21 +02:00
d33c27d68b Fix T75457: Toggle brushes using same hotkey twice is broken
Caused by rB47da01a4db1d.

Above commit did not change the toolname it was setting when the brush
was actually toggled.

Maniphest Tasks: T75457

Differential Revision: https://developer.blender.org/D7792
2020-05-20 15:05:33 +02:00
3a5a158362 Merge branch 'blender-v2.83-release' 2020-05-20 22:16:42 +10:00
707a4c355f Merge branch 'blender-v2.83-release' 2020-05-20 22:16:34 +10:00
eb57377f12 Fix T76794: Number button cursor overrides eyedropper cursor
Pressing 'E' over a number button to pick a distance was keeping
left-right arrows instead of using the eye-dropper cursor.

Workaround this by clearing the active button before setting the cursor.
2020-05-20 22:07:55 +10:00
7d3bf5166d Fix color picker being used for non-color buttons such as rotation
Issue raised in T76794
2020-05-20 22:04:56 +10:00
578b0c00ca Merge branch 'blender-v2.83-release' 2020-05-20 10:43:02 +02:00
3360db83c4 Fix T76883: Zero users scenes after undo.
Some tags need to be preserved when we reuse existing ID entirely.
AFAICT, currently this is only the EXTRAUSER one.
2020-05-20 10:39:50 +02:00
db6e267bfc Fix T74298: Incorrect cursor position in Python console 2020-05-20 18:16:52 +10:00
ec86db82b0 Merge branch 'blender-v2.83-release' 2020-05-20 15:00:57 +10:00
5fe7605f3d Fix the current pixelsize impacting thumbnails 2020-05-20 14:58:57 +10:00
f69ecce14b Merge branch 'blender-v2.83-release' 2020-05-20 13:53:26 +10:00
a296dff2c8 Correct invalid limits in last commit 2020-05-20 13:48:25 +10:00
31137004ae UI: add text to icon-only menu items when displayed in search
Without this icon-only buttons in popovers don't have any text.
2020-05-20 12:43:02 +10:00
bfdfa35e6e Merge branch 'blender-v2.83-release' 2020-05-20 03:34:31 +02:00
aa02a05bc7 Fix T75977: Lower the merge limit in the bisect/mirror operation in symmetrize
This operation is using the code of the mirror modifier, so no default
is guaranteed to work in all cases. This value matches the defaults of
the mirror modifier.

Reviewed By: jbakker

Maniphest Tasks: T75977

Differential Revision: https://developer.blender.org/D7495
2020-05-20 03:24:51 +02:00
dfe8195dfe Cleanup: compiler warning 2020-05-20 01:15:08 +02:00
8f050b6825 Fix Cycles viewport render fully restarting after undo
With the optimized undo datablock pointers remain the same, so Cycles can now
update just the parts that changed.
2020-05-20 01:11:42 +02:00
499c0229f7 Fix T76858: non-thread safe sculpt memory allocation when using --debug-memory
By default the guarded memory allocator is not thread safe, that needs to be
initialized.
2020-05-20 00:33:49 +02:00
4f622c9a08 Fix Windows build after recent guardedalloc changes 2020-05-20 00:32:17 +02:00
e610964e89 Merge branch 'blender-v2.83-release' 2020-05-20 01:22:54 +02:00
183ba284f2 Cleanup: make guarded memory allocation always thread safe
Previously this would be enabled when threads were used, but threads are now
basically always in use so there is no point. Further, this is only needed for
guarded allocation with --debug-memory which is not performance critical.
2020-05-20 01:03:05 +02:00
120e9924c1 Cleanup: remove legacy mmap memory allocation for 32 bit
This helped to go beyond the 4GB limit, but is no longer relevant for 64 bit.
2020-05-20 00:57:41 +02:00
33fc42bd65 Merge branch 'blender-v2.83-release' 2020-05-20 00:46:15 +02:00
5ca8875f69 Fix T73148: Incorrect Repeat Last for transforms with Individual Origins and Normal orientation
`pvec` was confusing and was adding steps that are apparently unnecessary.
So the code has been redone so as not to use this pvec.
2020-05-19 18:54:57 -03:00
3bced3b306 Fix flag conflict in transform operators
This added some redundant properties
2020-05-19 18:54:57 -03:00
5267ce8e03 Merge branch 'blender-v2.83-release' 2020-05-19 23:42:32 +02:00
59cfb20fa1 Fix PBVH parallel range not initializing user data correctly in some cases
This was already changed for the TBB-based BLI_task_parallel_range in master.
This task local storage should always be initialized from the template, not
copied from another task which may be executing at the time the copy happens.

This may not fix any actual bug, we only use this user data for parallel reduce
and it's not clear that TBB ever calls the copy constructor for that case.

Ref T76858
2020-05-19 23:36:28 +02:00
8d63d7337c Fix unnecessary buffer reallocation in sculpt mode, causing an assert
Probably did not cause an actual, the assert is a performance warning.

Ref T76858
2020-05-19 23:36:12 +02:00
20c30534aa Fix T75383:Bevel weird behaviour when using bevel weights
Don't use the cube corner special case when the offsets are different
for the three edges involved. The generic VMesh for this situation isn't
perfect, but it's much better than a failed cube corner VMesh.

Tests pass.
2020-05-19 16:54:05 -04:00
42d77fbea1 UI: Make timeline vertical bars thickness work on OSX
Make use of Polyline shader.
2020-05-19 22:43:42 +02:00
8e0a57f9bd Merge branch 'blender-v2.83-release' 2020-05-19 16:40:53 -04:00
c554f4e14f Fix T75383:Bevel weird behaviour when using bevel weights
Don't use the cube corner special case when the offsets are different
for the three edges involved. The generic VMesh for this situation isn't
perfect, but it's much better than a failed cube corner VMesh.

Tests pass.
2020-05-19 16:40:40 -04:00
13125e0948 GPU: Attempt to fix Crash on startup with Intel HD Graphics 620/630
This only enables the workarounds that we know have effects on intels.
We could add the other workarounds if needed.

Related task T72098
2020-05-19 22:24:25 +02:00
a5a069c272 Fix T76080 Workbench: Background Glitches caused by Screen Cavity effect 2020-05-19 21:37:43 +02:00
0a19b8a5b4 OpenSubdiv: Remove old GPU code
This code was accidentally reintroduced in e73d7d27dc.
2020-05-19 21:35:47 +02:00
a3bdbb5e5b Merge branch 'blender-v2.83-release' 2020-05-19 16:32:43 -03:00
d6cc16831a Fix T73594: Scale Cage sometimes has incorrect center in edit mode
Differential Revision: https://developer.blender.org/D6803
2020-05-19 16:30:21 -03:00
5201bc9dd4 Fix T66916 UI: Wrong information in Status bar after cancelling a render
Fixed thanks to @manowii
2020-05-19 21:23:56 +02:00
e73d7d27dc Merge branch 'blender-v2.83-release' 2020-05-19 21:23:54 +02:00
7bb3d9787e Fix T76812: [Mantaflow] Inflow particles not continuous
Makes use of the new particle skipping option introduced in f25a882955cb.
2020-05-19 21:12:30 +02:00
61280e5af3 Fluid: Updated Mantaflow source files
Includes changes for particle skipping during advection.
2020-05-19 21:12:30 +02:00
fa270a37e8 Fix T76564 Curve: Missing orco cause mesh to not render 2020-05-19 21:01:21 +02:00
a4cbacacbf Fix T73847 Overlay: Camera orthographic scale moves background image 2020-05-19 21:01:21 +02:00
08b4faef01 Properly fix: T71040 / T58983 Ocean Modifier crashes at high resolutions
For a more detailed description of the issue see the commit
message for rB497cd3d7dd6e497be484eb78a8ddb23f53b20343

This change moves fftw to a shared library and reverts the bandaid
we did for 2.83.
2020-05-19 12:28:19 -06:00
a6c0874355 win/deps: generate sndfiles import library with ms lib tool
Unsure what it is that upsets it so much, but when linking
both sndfile and fftw dynamically, the linker gets confused
and thinks that fftw is importing sf_close from the blender
binary (which makes *NO* sense) leading to a start-up error.

Generating the import library from the .def file using the
ms lib tool creates an import library that works fine.
2020-05-19 12:22:36 -06:00
059f79bdd7 Clarify autokeyframe tootip
This applies to masks as well.

Spotted while looking into T76872.

Differential Revision: https://developer.blender.org/D7788
2020-05-19 18:43:30 +02:00
cfb7664d5b Fix: build error due to missing definitions
Reviewers: sergey, brecht

Differential Revision: https://developer.blender.org/D7787
2020-05-19 17:36:40 +02:00
dd62d95687 Merge branch 'blender-v2.83-release' 2020-05-19 17:10:44 +02:00
7fcf2e7d4a Fix T74577: world_to_camera_view broken for off-axis projection
The issue was that the projection would be inverted.
So if you shifted 0.1 along the y axis, world_to_camera_view would act
as if you had shited it -0.1 along the y axis.
2020-05-19 16:27:09 +02:00
813ff8913b UI: Small Changes to Graph Editor Active Vertex Panel
- X / Y value orders are all consistent, between handles and the keyframe.
  - Values are labeled consistently, with just "Frame" and "Value"
  - The more important type property that can affect the others comes first.
  - The "type" property provides nice visual separation between the
    handle properties.

Reviewed By: sybren, billreynish

Differential Revision: https://developer.blender.org/D7738
2020-05-19 10:27:07 -04:00
338abd6f68 Merge branch 'blender-v2.83-release' 2020-05-19 16:03:24 +02:00
0c20fce2f2 Fix T76697: [Mantaflow] mesh generation does not account for some particles
Adapted mesh generation to account for domains with disabled fractionstoo.
2020-05-19 16:02:38 +02:00
Josh Belanich
03fa66d274 Fix T72889: Cycles camera motion blur not usng more than 2 steps
Differential Revision: https://developer.blender.org/D7782
2020-05-19 15:40:56 +02:00
46c35dc283 Fix UV shadow drawing not respecting 'UV Opacity' setting
reapply changes from 30cbbccc60 / D7764 that were only meant for
master. Sorry for the noise!
2020-05-19 15:35:28 +02:00
a95afed6de Merge remote-tracking branch 'origin/blender-v2.83-release' 2020-05-19 15:24:45 +02:00
9ccc73ade8 Animation: Make dopesheet filter labels consistent
There are three different label styles for the three Dopesheet filter
labels:

- "Display Hidden", which uses "Display" rather than "Show" as the other
  two options.
- "Show Errors", which does not use the word "only" to indicate it will
  hide all the non-error channels.
- "Only Selected", so no "show" or "display" in the label at all.

This commit changes:
- Always use the word "Show", not "Display".
- Always use the word "Only" when enabling the filter hides everything
  else.

Reviewed By: billreynish

Differential Revision: https://developer.blender.org/D7742
2020-05-19 15:23:44 +02:00
Jeroen Bakker
9ac4e4a1c7 Fix T76375: UDIM Rectangular Tiled Image EEVEE freezes Blender
When packing the image the height of the tile was checked to the width
of the packing area. This resulted that the tile was ignored.

Reviewed By: Clément Foucault

Differential Revision: https://developer.blender.org/D7784
2020-05-19 15:20:40 +02:00
cc485191e4 Merge branch 'blender-v2.83-release' 2020-05-19 15:18:39 +02:00
a6646fb0d0 Fix T76881: Changing "Use Speed Vectors" deletes all existing cache
Reviewers: sebbas
2020-05-19 15:18:33 +02:00
8c4965f86d Fix build error after 30cbbccc60
That part only applies to master, sorry for the noise
2020-05-19 15:17:11 +02:00
14278cd932 Fix T76694: Fluid cache is deleted when changing Upres Factor
Reviewers: sebbas
2020-05-19 15:13:25 +02:00
eb1cb7cb81 Merge branch 'blender-v2.83-release' 2020-05-19 14:45:07 +02:00
30cbbccc60 Fix (unreported) UV shadow not drawing smooth
When showing UV edges after modifiers [draw_uvs_shadow], these were never
drawn anti-aliased [in contrast to the 'main' UVs].

Also: they did not respect the new 'UV Opacity' setting.

Differential Revision: https://developer.blender.org/D7764
2020-05-19 14:42:19 +02:00
22998abe92 Merge branch 'blender-v2.83-release' 2020-05-19 14:17:40 +02:00
675ba2073d Fix T75694: Compositor Backdrop boundbox missing updates
This adds notifiers for backimage_move & backimage_fit.

Maniphest Tasks: T75694

Differential Revision: https://developer.blender.org/D7778
2020-05-19 14:16:22 +02:00
325307d82b Merge branch 'blender-v2.83-release' 2020-05-19 13:59:39 +02:00
4fa1fc29bd Fluid: Cleanup unused variables 2020-05-19 12:33:17 +02:00
e5c5e25c68 GPencil: Make is_nofill_stroke property editable
This can be used by some add-ons.
2020-05-19 12:24:42 +02:00
82bda82ec4 Fix T76541: OpenGl Depth Picking not selecting frontmost object
The issue was that we used GL_ALWAYS for depth checking here which would
lead to the depth information from objects being messed up.

It would not represent which object was closest to the camera.

Reviewed By: Clément Foucault, Jeroen Bakker, Campbell Barton

Differential Revision: http://developer.blender.org/D7710
2020-05-19 12:22:28 +02:00
25dea3e65e Fix T76717: Set Rotation Mode Incorrectly Recalculates Bone Rotation In Pose Mode
The issue was that we didn't convert the current rotational values.
We simply just switched mode without doing any data conversions.
2020-05-19 12:22:18 +02:00
10528a5cd4 Fix Frame Dropping not dropping the correct amount of frames
Previously the playback mode "Frame Dropping" would not drop the correct
number of frames which would lead to slow playback.

For example, the playback target is 60fps.  However we can only muster
around 32 fps.

The delta frames from the last step is in this case ~1.98 or so.

With the previous code, we would floor this.  That would lead us to step
forward one frame each time, effectively playing back the animation at
half the speed as we will try to render every frame.

To fix this we simply save the remaining fraction from the previous
frame and use it to compute the current frame step.

Reviewed By: Sybren

Differential Revision: http://developer.blender.org/D7694
2020-05-19 12:22:07 +02:00
24e5c64ea2 Made pose push/relax to breakdown behave smooth on rotations
A follow up to T67212. I missed that the rotation interpolation had its
own code path.

The previous rotation push code was actually wrong (but smooth).

Now all of the actions behave correctly and is smoothly interpolated.
2020-05-19 12:21:53 +02:00
cddfa7a449 Fix T72729: Mask Modifier Loose Edges Not Shown
When using the mask modifier loose edges could be added to the mesh.
These edges weren't marked as loose edges and wasn't picked up by other
areas of blender.

This fix recalculates the loose edges so they have the correct flag
`ME_LOOSE_EDGE`.

Reviewed By: Sybren Stüvel

Differential Revision: https://developer.blender.org/D7766
2020-05-19 10:12:57 +02:00
b96ccb5126 Fix T76865: Vertex paint draws hidden but cannot be painted onto 2020-05-19 18:06:27 +10:00
f89b89fa7f CMake: Enable WITH_USD by default
Having USD disabled by default was an oversight, and could have been
corrected earlier. It's already enabled by default in the
`blender_release.cmake` and `blender_full.cmake`.
2020-05-19 09:39:51 +02:00
291136eece Fix T76689: Armature layers not indicating the existence of bones
From what I can see, there are two issues at play in {T76689} and its merged-in report {T76590}:

- In Blender ≤ 2.79 the bone layer dots were updated in the draw code. This ensured the info was up to date before drawing. This is no longer possible, as the drawing code uses evaluated objects, and those should not be written to. This has been addressed in rB709f126e8143 by calling the update function explicitly in various places in the code. The problem is that this wasn't added to all necessary spots.
- When in edit mode, changes are made to the edit bones but not to the 'actual' bones (this is synced when exiting edit mode). This causes undo to mess up the layer indicators.

I think both issues can be addressed by having the dependency graph update the used layer info as part of the armature evaluation. This will make the undo system work properly, and allows the removal of some `BKE_armature_refresh_layer_used()` from various places.

There is still the issue that there are two functions (`BKE_armature_refresh_layer_used()` and `ED_armature_edit_refresh_layer_used()`) that are both responsible for updating `bArmature::layer_used`. This is a trickier thing to solve, though, as the definition of the `EditBone` struct resides in the armature editor module. This means that blenkernel can't iterate over edit bones, but on the other hand the dependency graph shouldn't call any editor functions either. This is why I left the `ED_armature_edit_refresh_layer_used()` calls untouched.

The downside of recalculating `layer_used` from the dependency graph (at least in the way that I did it now) is that it is called every time a user moves a bone in pose mode. This frequency of updates is not necessary.

Differential Revision: https://developer.blender.org/D7709
2020-05-19 09:39:51 +02:00
888427cabb Fix T76780: Freestyle pass for one scene not accessible in compositor in other scenes
Current implementation would update the nodetree of the freestyle scene not the composite scene.

Reviewed By: Dalai Felinto

Differential Revision: https://developer.blender.org/D7770
2020-05-19 08:24:52 +02:00
fc06c248ed Fix T73169: Side by Side Stereo Rendering Glitches
Side by side and top down views were rendered using an unset matrix.
This fix will reset the matrix just before copying the views to the
screen.

Reviewed By: Clément Foucault, Dalai Felinto

Differential Revision: https://developer.blender.org/D7777
2020-05-19 08:22:05 +02:00
ac8b36535e Cleanup: Creator Args Spelling
Differential Revision: https://developer.blender.org/D7735
2020-05-19 00:54:37 -04:00
5fa58fb8a2 Fix T76821: Generalize Use Flow Tooltip 2020-05-19 00:53:59 -04:00
1151bcd53d Merge branch 'blender-v2.83-release' 2020-05-19 13:31:48 +10:00
f557198540 Merge branch 'blender-v2.83-release' 2020-05-19 13:31:44 +10:00
15bf81268c Fix switching to particle edit-mode from editmode
Similar to T76859
2020-05-19 13:27:08 +10:00
1afa97d547 Fix T76859: Cannot switch from editmode to texturepaint mode
Caused by 5159b8e1ea.
2020-05-19 13:18:10 +10:00
7bd07c9f5a Merge branch 'blender-v2.83-release' 2020-05-19 01:33:08 +02:00
ff7a30d928 Fix sculpt mask interpolation in subdivisions
The interpolation function of the datalayer was misssing so the sculpt
mask data was corrupted every time a subdivision surface modifier was
applied.

Reviewed By: jbakker

Differential Revision: https://developer.blender.org/D7640
2020-05-19 01:31:55 +02:00
79a48c5676 Merge branch 'blender-v2.83-release' 2020-05-19 01:08:23 +02:00
7c9c8cee7b Fix T76397: Missing value property on Clear Mask pie menu
Without this value defined it was reusing the same 1.0 value after using
fill mask, so it was not working.

Reviewed By: jbakker

Maniphest Tasks: T76397

Differential Revision: https://developer.blender.org/D7699
2020-05-19 01:07:38 +02:00
393050e8e5 Merge remote-tracking branch 'origin/blender-v2.83-release' 2020-05-18 16:37:57 -06:00
497cd3d7dd Fix: T71040 / T58983 Ocean Modifier crashes at high resolutions
This is not as much a fix as a work around, but given the real
involves replacing how we build fftw, it is not eligible for 2.83
which is in BCON3 already.

The root of the issue lies with (how we build) fftw3

The first issue is: fftw does not build with MSVC, there are other
dependencies that are not compatible with MSVC and for those we
build the libraries required with mingw64, same for fftw

The second issue is: for reasons unknown we really really really
liked all deps to link statically so wherever possible we did so.

Now during the building of the fftw it linked a few symbols from
libgcc (which we do not ship) like __chkstk_ms, for which we passed
some flags to stop generating calls to it. Problem solved! There
is no way this could possibly turn around and bite us in the rear.

fast forward to today mystery crashes that look like a race condition.

What is happening is, we tell the linker that each thread will require
a 2-megabyte stack, now if every thread immediately allocated 2 megs,
that be 'rough' on the memory usage. So, what happens is (for all apps
not just blender), 2 megs are reserved but not backed by any real memory
and the first page is allocated for use by the stack, now as the stack
grows, it will eventually grow out of that first page, and end up in
an area that has not been allocated yet, to deal with that the allocated
page is followed by a guard page, someone touches the guard page it's
time to grow the stack!

Meanwhile in FFTW is it's doing substantial allocation using alloca
(up to 64 kb) on the stack, jumping over the guard page, and ending
up in reserved but not yet committed memory, causing an access violation.

Now if you think, that doesn't sound right! something should have
protected us from that! You are correct! That thing was __chkstk_ms
which we disabled.

Given we do not want a dependency on libgcc while building with MSVC
the proper solution is to build fftw as a shared library which will
statically link any bits and pieces it needs, however that change
is a little bit too big to be doing in BCON3.

So as a work around, we change the size the stack grows from 8k to
68k which gives fftw a little bit more wiggle room to keep it out
of trouble most of the time.

Note this only sidesteps the issue, this may come up again if the
conditions are just right, and a proper solution will need to be
implemented for 2.90.
2020-05-18 16:35:53 -06:00
c4ee94328f Fix invalid bit shift when GPU shader attribute is not found 2020-05-18 21:22:02 +02:00
0bdb827bdf Fix NULL pointer access reported by ASAN (harmless in practice but still weak) 2020-05-18 21:20:10 +02:00
e0ae229acb Fix potential crash due to dyntopo GPU buffer invalid memory access
When the number of triangles in a node became zero, the wireframe batch was
not freed along with the triangles batch and could still reference a freed
vertex buffer.

Ref T76858
2020-05-18 21:01:41 +02:00
afbe71342b Fix T76813: Snap to Edge Center returning a different normal from snap to Edge
This difference was intentional, but using the edge direction as normal is more useful.
2020-05-18 15:19:13 -03:00
06c57d3e7a Refactor: Move workspace foreach_id to new IDTypeInfo structure. 2020-05-18 19:01:20 +02:00
8f10f9d5dc Refactor: Move WindowManager and Screen foreach_id to new IDTypeInfo structure.
That one was a bit more complicated, and is still only partial refactor
(ultimately we want to have a foreach_id callback in SpaceType itself I
think...).
2020-05-18 18:51:06 +02:00
ae97a7ac10 Refactor: Move action foreach_id to new IDTypeInfo structure. 2020-05-18 18:43:11 +02:00
38a8d3aff1 Merge branch 'blender-v2.83-release' 2020-05-18 17:56:57 +02:00
46a4a53824 Outliner: Fix (unreported) more data-changing operators missing undo. 2020-05-18 17:56:33 +02:00
35f9c3b9a4 Merge branch 'blender-v2.83-release' 2020-05-18 17:35:30 +02:00
20b94257dc Fix part of T76544: dyntopo sculpt undo stack memory leak 2020-05-18 17:25:09 +02:00
31fc01eecb OIpenSubdiv: Cleanup, move to a better sounding namespace
The code is not only part of C-API, but also implements Blender-specific
glue level implementation.
2020-05-18 17:25:07 +02:00
9bc7ea5496 Fix T76814: [Mantaflow] Surface Tension always works
Initialize the curvature grid and compute the laplacian only if the diffusion flag is set.
2020-05-18 17:19:51 +02:00
fa116a9bbe Fix T76795: Missing node tree update after remove-on-cancel
Reviewers: brecht

Differential Revision: https://developer.blender.org/D7775
2020-05-18 17:08:57 +02:00
2ad5131f77 OpenSubdiv: Cleanyp, remove old GPU code
All parts of drawing (shaders, GL mesh descriptor, material partitioner
and so on) needs to be redone for the draw manager and new OpenSubdiv
library.

Removing untested code which is doomed to be replaced to make localized
refactoring easier.
2020-05-18 17:06:48 +02:00
22f68f85a4 OpenSubdiv: Cleanup, remove unused topology orientation code
The code was trying to make winding consistent and manifold, same as
OpenSubdiv expects it to.

Unfortunately, the code was having some issues in corner cases so the
winding wasn't really correct.
Fortunately, the latter (compared to when this code was originally
written) supports orientation on OpenSubdiv side.

Removing code which is currently unused in Blender and which had
known issues. Is simple enough to bring the code from Git history
if the functionality is needed in the future.
2020-05-18 17:06:48 +02:00
54665233eb OpenSubdiv: Cleanup, Remove from legacy SubsurfCCG code
The CPU side implementation is done on a new dedicate base ground.
The GPU side must be redone anyway.
2020-05-18 17:06:48 +02:00
151fb62190 Merge branch 'blender-v2.83-release' 2020-05-18 17:04:43 +02:00
0d57ab611c Fix T76851: GPencil brush is reset after change mode
This was introduced by commit rBe58525706328

Now, the brush is not changed when change mode.

Thanks @Alaska for helping with this bug.
2020-05-18 17:04:17 +02:00
6eb00fb02e Fix T76730 DRW: Sorting of empty shading groups.
This is to fix an assert in EEVEE caused by a transparent shading group
that is create but not populated by any drawcall.
2020-05-18 16:59:04 +02:00
0bd7e202fb Curves: Disable Curve Normals by default
This patch just disable the curve Normals by default.

Reviewed By: #user_interface, billreynish, Severin

Differential Revision: https://developer.blender.org/D7755
2020-05-18 16:38:53 +02:00
cb8d8335b2 Fix T76828 Grease Pencil: Toggle Caps doesn't work
This was a logic error.
2020-05-18 16:01:07 +02:00
19413c4a82 Cleanup: GPencil: Fix float double promotion 2020-05-18 16:01:07 +02:00
48a5b1664a Merge branch 'blender-v2.83-release' 2020-05-18 15:54:30 +02:00
27cac4a102 Fix T62422: Baking ray distance do not work
The previous naming scheme for the "selected to active" baking options
lead to confusion and they were not describing what they actually did.

To remedy this, I've added a new settings that does what the older setting implied it did.

Reviewed By: Brecht, Dalai, Andy Davies

Differential Revision: http://developer.blender.org/D7733
2020-05-18 15:50:36 +02:00
121b2c0424 Fix T76799: Crash from undoing the copy-pasting of multiple data blocks.
Bug was actually in outliner code, paste operator would not generate any
undo step...

This was not correct ever, but with new undo code this has become a
critical issue, it cannot survive a situation where current main data
has been changed without a proper undo push.

This illustrates again how much of a catastrophic mess the 'tools'
callbacks of the outliner are currently, it has already caused us quiet
some pain in the past, and will keep doing so until this is fully
sanitized am afraid.

Would strongly suggest getting rid of thosw nasty mix of custom
callbacks requiring manual undo pushes, I do not see the added value of
this compared to regular menus calling regular operators. It only adds
confusion and extra code for nothing...
2020-05-18 15:47:03 +02:00
dcf67fdf7f UI: Widget: Make emboss offset dependent of line width 2020-05-18 15:27:30 +02:00
27b23148fa UI: Widgets: Reduce constants count in shader 2020-05-18 15:27:29 +02:00
6ede93bab3 Cleanup: Put GPU_state_init inside gpu_state.c
Also put glDisable(GL_DITHER) in it since we don't even use it (but is
enabled by default).

Also leave GL_MULTISAMPLE on by default since it has no impact on non-MSAA
framebuffers.
2020-05-18 15:27:29 +02:00
18dd289e1a Merge branch 'blender-v2.83-release' 2020-05-18 21:29:26 +10:00
80b340b034 Merge branch 'blender-v2.83-release' 2020-05-18 21:29:23 +10:00
b487ef6116 Fix T76593: Coordinate limit of 10,000 units
This is no longer needed for number button dragging to work properly.
2020-05-18 21:16:00 +10:00
b75ce05c3b Fix T75292: File-select events not handled while modal handler is active
Reviewers: Severin

Differential Revision: https://developer.blender.org/D7720
2020-05-18 11:59:53 +02:00
b1492b76ba Alembic: Fix bad allocation with invalid knots data
It is not impossible that the number of knots is stored wrong in the
file (for example, it will be 1 knot only).

This change fixes bad memory allocation and bad memory access in such
cases. It also fixes strict compiler warning which was mentioning that
the allocation size is wrong),

There isn't really the correct way of dealing with such situation, so
simply fall back to Blender's knots calculation.

Differential Revision: https://developer.blender.org/D7765
2020-05-18 11:50:34 +02:00
9796cb1661 Fix T76721: ASAN crash on animation rendering
Simple solution: remove the code which was causing bad threading
conflicts.

This code was a part of workaround for a specific state of linked
scene. It seems to be not needed anymore, since the pose is ensured
to be up to date by the following call stack:

- Dependency graph update,
- Copy-=on-write operation called on object.
- object_copy_data().
- BKE_pose_rebuild().

The workaround was a no-functional change for the dependency graph
anyway, because it was modifying original objects, not the ones
which are evaluated.
2020-05-18 11:48:24 +02:00
f3edff2d7d AVI: Fix read past array bounds
It is not enough to copy max of destination buffer size bytes, the
source might be smaller than the destination size.
2020-05-18 11:05:45 +02:00
005d04e145 Manta: Cleanup, strict compiler flag
For some reason was only visible with gcc-10 in release builds.

Kind of makes sense since there is no CMake code which removes strict
compiler flag, so deal with strict flags in the code itself.
2020-05-18 11:05:45 +02:00
a432cb2ad9 Merge branch 'blender-v2.83-release' 2020-05-18 18:58:21 +10:00
008e964940 Fix T76852: Breakdowner remembers limits last used 2020-05-18 18:49:40 +10:00
470ed9f074 Merge branch 'blender-v2.83-release' 2020-05-18 10:49:23 +02:00
04d15f1625 Fix T76573: Make links with Multires leading to crash 2020-05-18 10:48:45 +02:00
52d8b3a014 Fix T76849: Duplicate templates show in the New menu 2020-05-18 17:59:52 +10:00
a4b2734fe2 Fix T76801: Renaming bone in pose mode doesn't redraw the viewport names
The RNA name property of pose bones did not have any update logic defined.

Same issue also applied to the channel name in animation editors.

Duplicated the update logic from (edit-)bones now, other pose bone functions do
this too...
2020-05-18 09:51:20 +02:00
68ba154869 Merge branch 'blender-v2.83-release' 2020-05-18 17:14:28 +10:00
fd8d2ceafe Merge branch 'blender-v2.83-release' 2020-05-18 17:14:24 +10:00
815ffaa6c1 Merge branch 'blender-v2.83-release' 2020-05-18 17:14:17 +10:00
98e18c41b6 Cleanup: unused warning in last commit 2020-05-18 17:11:48 +10:00
2a3797b109 Cleanup: remove NULL checks from object mode switching take #2
Re-apply changes from 54ea356240,
with a poll function that uses the same active object as the operator,
matching other mode switching functions.
2020-05-18 17:07:23 +10:00
ff144edd8c Revert "Cleanup: remove redundant active object NULL check & poll"
This reverts commit 54ea356240 it
introduced crashes when trying to go to edit mode when the active
object was hidden.

Fix T76837
2020-05-18 08:32:07 +02:00
218579fa53 Merge branch 'blender-v2.83-release' 2020-05-18 16:30:34 +10:00
cfea716128 Fix error mixing incompatible enums when generating the proxy name 2020-05-18 16:12:17 +10:00
41825c7e0d Merge branch 'blender-v2.83-release' 2020-05-18 14:37:48 +10:00
9af72792a3 Cleanup: quiet enum conversion warning 2020-05-18 14:36:02 +10:00
5c5a638b57 Fix: Build error with MSVC
A parenthesized type followed by an initializer list is a non-standard explicit type conversion syntax.

Removing the cast seems fine for both MSVC and GCC
2020-05-17 12:22:14 -06:00
dde7a762c3 Fluid: Bake cache for more frames by default 2020-05-17 17:09:29 +02:00
fe257cc384 Fix T74060: Smoke flow force field not working with Mantaflow Gas
cb252ca8d316 was also needed to fix the velocity loading from the cache.
2020-05-17 17:09:28 +02:00
a975cb9207 Fluid: Foundation for new OpenVDB file IO
This commit lays the foundation for support for OpenVDB caching with multiple grids per cache file.
2020-05-17 17:09:28 +02:00
0abe5936b7 Fluid: Cleanup namespace std 2020-05-17 17:09:28 +02:00
eaf7d36d66 UI: Graph Editor: Draw Handles Lines With Smoothing
Enabling "Use High Quality Display" in the graph editor enables
AA for the curves, this enables it for bezier handles too.

Differential Revision: https://developer.blender.org/D7740
2020-05-15 15:12:58 -04:00
d9773edaa3 Cycles: code refactor to bake using regular render session and tiles
There should be no user visible change from this, except that tile size
now affects performance. The goal here is to simplify bake denoising in
D3099, letting it reuse more denoising tiles and pass code.

A lot of code is now shared with regular rendering, with the two main
differences being that we read some render result passes from the bake API
when starting to render a tile, and call the bake kernel instead of the
path trace kernel.

With this kind of design where Cycles asks for tiles from the bake API,
it should eventually be easier to reduce memory usage, show tiles as
they are baked, or bake multiple passes at once, though there's still
quite some work needed for that.

Reviewers: #cycles

Subscribers: monio, wmatyjewicz, lukasstockner97, michaelknubben

Differential Revision: https://developer.blender.org/D3108
2020-05-15 20:25:24 +02:00
3ff8ca60e9 Merge branch 'blender-v2.83-release' 2020-05-15 19:38:40 +02:00
e5ace51295 Fix T76734: Changing Envelope FModifier controlpoints missing update
Issue is that update functions defined in
`rna_def_fmodifier_envelope_ctrl` (namely `rna_FModifier_update`) are
actually never called.

This is because UI code for FCurve modifiers often does not use RNA
buttons but uses custom update functions (or non at all). For example,
rB9a88bd55903a did this for the generators, envelope control points did
not have this at all.

This is now changed to use RNA buttons for the envelope control points,
this could done for other non-RNA buttons as well to get rid of
'validate_fmodifier_cb()'.

Maniphest Tasks: T76734

Differential Revision: https://developer.blender.org/D7732
2020-05-15 19:29:33 +02:00
e1c2eba4de Merge branch 'blender-v2.83-release' 2020-05-15 19:26:02 +02:00
abcb23f5a3 Fix T76698: Movie clip stabilize display ignore footage colorspace
settings

Stabilized ImBuf just needs to use the same colorspace and alpha
settings as the original one.

Maniphest Tasks: T76698

Differential Revision: https://developer.blender.org/D7713
2020-05-15 19:08:58 +02:00
a8fc3c88ef Refactor: Move linestyle foreach_id to new IDTypeInfo structure. 2020-05-15 19:03:53 +02:00
7ff933089a Refactor: Move mask foreach_id to new IDTypeInfo structure. 2020-05-15 19:03:53 +02:00
c44d6fb987 Refactor: Move movieclip foreach_id to new IDTypeInfo structure. 2020-05-15 19:03:53 +02:00
0055aa994d Refactor: Move particle foreach_id to new IDTypeInfo structure. 2020-05-15 19:03:53 +02:00
a952f8dab0 Merge branch 'blender-v2.83-release' 2020-05-15 18:40:19 +02:00
001d70eb2b Fix T76277: Remove wrong cast in rna_NodeTree_update
This patch fixes T76277 by removing the incorrect cast from
`ptr->data` to `bNode`. The address of `ptr->owner_id` and
`ptr->data` both point to the node tree. Passing the node tree
incorrectly as a node into the `ED_node_tag_update_nodetree`
corrupts the data, because it attempts to set flags on the
node.

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D7747
2020-05-15 18:29:42 +02:00
ecec6547c7 Merge branch 'blender-v2.83-release' 2020-05-15 18:02:10 +02:00
9632a06201 Fix embedded IDs not being enough/properly initialized.
Among other things, they were missing library pointer, session uuid
initialization, etc.

Fix T74546: Corrupted nodegroups crash blender when copy pasting or
appending them.

Fix (unreported) asserts when undoing some production scenes (from
coffee run e.g.).

Initialy caused by rB0aac74f18f2d.
2020-05-15 17:57:13 +02:00
b14243be77 blenlib: BLI_file_attributes() Correction
Adds an Correction to properly handle possibility of overflow of path name.

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

Reviewed by Brecht Van Lommel
2020-05-15 08:11:57 -07:00
0f2c7f3864 Merge branch 'blender-v2.83-release' 2020-05-15 16:54:33 +02:00
0541906162 Cleanup: rename readfile utils dealing with embedded IDs to proper name. 2020-05-15 16:54:03 +02:00
363f18c8b5 Merge branch 'blender-v2.83-release' 2020-05-15 16:51:36 +02:00
1cad0a627e GPencil: Fix unreported missing Sculpt/Vertex/Weight paint brushes
This error was introduced wit the change in commit https://developer.blender.org/rB6a850f3cc840

As the brushes were not created, all modes except Edit were broken. 

Now, the brushes and palette are not created when load the file in versioning code, but when the mode is enabled.

Also, if the brush already exist, the parameters are not reset as it was done in the versioning code in order to keep user settings.

The same logic is used for the default palette.
2020-05-15 16:50:38 +02:00
d6e0b55b1c Merge branch 'blender-v2.83-release' 2020-05-15 16:32:50 +02:00
a269761ec1 Cleanup: clang format
Sorry for the noise, somehow missed that in rB0a32f6c8686c.
2020-05-15 16:31:18 +02:00
b67f649077 Merge branch 'blender-v2.83-release' 2020-05-15 16:02:12 +02:00
266caa1820 Fix T76755: texture paint on udims crash
Caused by rB5593efec01c2.

Use first texture if we dont have an ImageUser (instead of multiview
one). Same fix as in rB9ace7e243978 / T74925.

Maniphest Tasks: T76755

Differential Revision: https://developer.blender.org/D7743
2020-05-15 15:56:35 +02:00
998e26704b Merge branch 'blender-v2.83-release' 2020-05-15 23:16:39 +10:00
fe0036c586 Fix T76563: Transforming an auto-aligned point won't set it aligned
When local origins are used or a single control point is selected,
change the handle types from auto to aligned.
2020-05-15 23:13:57 +10:00
2b36cf3118 Libmv: Fix crash solving when having negative frames
Don't use linear array with frame as an index since it has the
following disadvantages:

- Requires every application to take care of frame remapping, which
  could be way more annoying than it sounds.

- Inefficient from memory point of view when solving part of a footage
  which is closer to the end of frame range.

Using map technically is slower from performance point of view, but
could not feel any difference as the actual computation is way more
complex than access of camera on individual frames.

Solves crash aspect of T72009
2020-05-15 14:59:25 +02:00
86580c437b Cleanup: int->BVHCacheType enum 2020-05-15 13:55:01 +02:00
03659c2cf9 Merge branch 'blender-v2.83-release' 2020-05-15 13:47:04 +02:00
a5d394fad2 Fix segfault when trying to free uninitialized loop normals
Forgot this corner case when I created the new normal flip code.
2020-05-15 13:39:35 +02:00
0a32f6c868 Fix T76710: objects get lost in linked/overridden collections
Right now:
- drag-drop in the Outliner prevents dropping inside linked collections
- drag-drop in the Outliner allows dropping inside overridden
collections (should not be the case)
- `Object Properties` > `Collections` panel allows to add to overridden
collection (should not be the case)
- `Object Properties` > `Collections` panel filters out non-local
collections (so adding to linked collections is forbidden)
- `bpy collection.objects.link()` allows to add to linked collections
(should not be the case)
- `bpy collection.objects.link()` allows to add to overridden
collections (should not be the case)

While this might be supported in the future for overriden collections,
these cases should not be allowed atm. since objects get lost on file
reload.

Note: for the case of the `Object Properties` > `Collections` panel,
this could be improved further to filter out overridden collections as
well.

Reviewers: mont29, brecht

Subscribers:
2020-05-15 13:32:15 +02:00
3a14c011f9 GPencil: Fix unreported crash using U key in Draw mode
The problem was the preview could be not available when press the key.
2020-05-15 13:05:58 +02:00
04517ee936 Merge remote-tracking branch 'origin/blender-v2.83-release' 2020-05-15 12:59:24 +02:00
0ae64a9945 Fix T76695: Not exporting normals properly in Alembic format
When auto-smooth enabled, but no custom normals layer present, the Alembic
exporter would incorrectly assume the mesh was shaded smooth. This is now
corrected, and normals are always written when auto-smooth is enabled.
2020-05-15 12:58:48 +02:00
5f95912afc BLI: add missing include for size_t 2020-05-15 12:48:45 +02:00
7049d2dc58 Fix T76778: Dopesheet "Show Errors" affects timeline
Since the timeline is a variation of the dopesheet, it also respects
some of the dopesheet settings.

The "Selected Only" setting is overridden from a scene property (since
rB4904eadc0f38) and the "Display Hidden" dopesheet setting seems to be
ignored.

This commit adds the remaining "Show Errors" setting to the menu,
allowing it to be updated from the timeline.
2020-05-15 11:54:17 +02:00
547f50b5e0 Libmv: Add map utility 2020-05-15 11:20:45 +02:00
6398892121 Libmv: Cleanup, spelling 2020-05-15 11:20:45 +02:00
f1cb11f0fa Merge branch 'blender-v2.83-release' 2020-05-15 10:53:32 +02:00
19d822c677 Fix T76740: Static Override - Library Override Crash
Missing proper tagging of 'backward' pointer from fcurve to its group in
RNA would lead to infinite loop...

Issue was triggered by override, but crash could be generated from other
places as well (like from py console), on any action actually...
2020-05-15 10:46:55 +02:00
e60560bda0 Fix T76738: Duplicate brushes cause assertion on undo
Changes for 2.90 versioning.
2020-05-15 17:53:03 +10:00
559a8886d6 Merge branch 'blender-v2.83-release' 2020-05-15 17:48:31 +10:00
20c25bffda Merge branch 'blender-v2.83-release' 2020-05-15 17:47:58 +10:00
656692913b Merge branch 'blender-v2.83-release' 2020-05-15 17:47:54 +10:00
3c0fd51cf4 Fix T76738: Duplicate brushes cause assertion on undo 2020-05-15 17:45:41 +10:00
6a850f3cc8 Fix duplicate ID's being created when appending/linking
This removes grease pencil brush creation/dat-block delete on load,
since this causes duplicate data-blocks.

Add assert to prevent this happening in the future
since the error is isn't obvious.
2020-05-15 17:42:01 +10:00
c361f911f9 Fix error versioning paint-slots pre-2.80 2020-05-15 16:51:33 +10:00
191c562f98 Merge branch 'blender-v2.83-release' 2020-05-15 12:52:31 +10:00
4ce1829289 Cleanup: don't check flags as booleans
Causes unexpected behavior when adding new flags.
2020-05-15 12:47:47 +10:00
c880e54a95 Cycles: Refactor microfacet BSDFs to remove separate anisotropy code
Since the sampling and evaluation functions handle both cases anyways,
there's not really a point for keeping the distinction in the kernel,
so we might as well cut down the number of CLOSURE_BSDF_MICROFACETs a bit.

Differential Revision: https://developer.blender.org/D7736
2020-05-15 00:52:57 +02:00
8d918fe0f2 Merge branch 'blender-v2.83-release' 2020-05-14 21:50:07 +02:00
f716bb3b71 GPencil: Add licence text at header 2020-05-14 21:49:44 +02:00
516e1b4031 Fix T76025: Flip/recalc steep custom normals produces wrong result
The issue was the custom loop normal data would be mangled when we
reversed the face loops.

The flip face code will now correctly flip the custom face normals so
they are not left in an undefined state.

Reviewed By: Bastien

Differential Revision: http://developer.blender.org/D7528
2020-05-14 21:17:33 +02:00
2efe77ca51 Fix missing hinting information in default font
Updates the font file to bring back hinting data, which got lost somehow
in dc3f073d1c.

Second and (hopefully) final fix for T75898.
2020-05-14 20:17:26 +02:00
Nikhil Shringarpurey
3ced9c1c72 Fix missing hinting information in monospace font
Updates the monospace font file to bring back hinting data, which got
lost somehow in dc3f073d1c.

Partial fix for T75898.
2020-05-14 20:17:07 +02:00
6716baa1f7 Fix T76476 EEVEE: Invalid Vector to Float conversion for nodegroups
The previous code only handled the RGBA socket case. For vectors, we simply
use the average of the 3 compoments. This is done using a temp Vector Math
node using the dot operation.
2020-05-14 19:57:51 +02:00
4ac748c099 Merge branch 'blender-v2.83-release' 2020-05-14 19:54:15 +02:00
5f31e5031c GPencil: Fix unreported problem filling textured strokes
The internal image used for filling was not correct when the texture was used in stroke and this makes impossible get a right filling.
2020-05-14 19:53:55 +02:00
cc3d3a453e Fix: Broken build with TBB disabled.
Lite builds without TBB and still needs the alternative codepath
2020-05-14 10:39:12 -06:00
Tautvydas Andrikys
33ce0cb5a1 Fix T63588: Cycles unnecessarily updates background importance sampling map 2020-05-14 17:56:50 +02:00
461fee5328 BLI: deduplicate address sanitizer code
Reviewers: brecht, campbellbarton

Differential Revision: https://developer.blender.org/D7731
2020-05-14 17:42:54 +02:00
5940485369 Fix T76168 Workbench: Shadows behind a culled backface are inverted 2020-05-14 17:41:05 +02:00
16d8a683be Fix T73984: unnecessary Cycles viewport updates with object texture coordinates
Remove old code that added extra updates for shaders that have a dependency on
objects. The dependency graph can now tell Cycles when a material is affected by
an object transform.
2020-05-14 17:39:37 +02:00
ea84c12a2b Merge remote-tracking branch 'origin/blender-v2.83-release' 2020-05-14 17:14:12 +02:00
72492eb2a2 Update RNA Manual References after camera fix
There was no link to the base camera* properties (e.g., lens).
2020-05-14 17:13:52 +02:00
dc4983dfdd Merge branch 'blender-v2.83-release' 2020-05-14 16:49:18 +02:00
78e3b7c28d Sculpt: Render Face Sets always as flat shading
This removes the smooth shading rendering from the face set overlay when
smooth shading is enabled.

Reviewed By: jbakker

Maniphest Tasks: T74906, T74622, T75331, T76530

Differential Revision: https://developer.blender.org/D7105
2020-05-14 16:47:50 +02:00
fa23e313f1 Merge branch 'blender-v2.83-release' 2020-05-14 16:32:38 +02:00
e585257063 GPencil: Changes in 2D template
Differential Revision: https://developer.blender.org/D7619
2020-05-14 16:31:51 +02:00
bd80c21635 Merge branch 'blender-v2.83-release' 2020-05-14 16:23:24 +02:00
Ankit
b7386c66f9 Fix T76150: Viewport Axes not toggling correctly when 'Floor' and 'Grid' are turned off
Fix T76150
While comparing with the deleted file [1] in the commit [2], saw this
little addition which most probably was added for optimisation.
Removing it fixes the behaviour too.

To test:
- In Viewport Overlays > Guides, uncheck both Grid & Floor.
- Try toggling all three axes individually.
- Z just sticks. X cannot be shown without Y enabled.

[1] https://developer.blender.org/diffusion/B/change/master/source/blender/draw/modes/object_mode.c;9516921c05bd9fee5c94942eb8e38f47ba7e4351
[2] {rB9516921c05bd9fee5c94942eb8e38f47ba7e4351}

Reviewed By: fclem

Maniphest Tasks: T76150

Differential Revision: https://developer.blender.org/D7568
2020-05-14 16:22:55 +02:00
ada03e8673 UI: Fix Unreported missing background for azone arrow
This was caused by the sRGB viewport changes. The fix is to modify the
alpha values manually. The shader was also missing a srgb fix.
2020-05-14 16:16:29 +02:00
0909b564a9 Fix T76413 Gizmos: Trackball's preselection highlighting is too bright
This was caused by the sRGB viewport changes. The fix is to modify the
alpha values manually.
2020-05-14 16:16:29 +02:00
c233271b0b Fix T76126 Overlay: Glitch when hiding Nurb vertices 2020-05-14 16:16:29 +02:00
97f50c71b9 Fix --debug-cycles printing CUDA devices twice
Reuse the CUDA devices list for Optix device detection.
2020-05-14 16:07:22 +02:00
fc4f2571ba GPencil: Remove creation of Tint brush in versioning code
This is not required.
2020-05-14 15:57:43 +02:00
a260d1cd69 Clip Editor: Fix camera error curve drawing
It didn't work correctly when there in no continuously solved camera
segment (aka there is a single isolated frame with solved camera).

Basically, don't start drawing curve segment until it's known there
is enough points for at least one segment.

On user level it seemed to be fine, but it was assert failure in
debug builds.
2020-05-14 15:44:18 +02:00
16b9841fc1 Cleanup: Remove unused variable 2020-05-14 15:09:12 +02:00
236794d07a Merge branch 'blender-v2.83-release' 2020-05-14 14:30:34 +02:00
Jeroen Bakker
7965c735f1 Fix T73286: Projection Painting Dense Mesh Bleed
When projection painting a dense mesh a face can be marked
PROJ_FACE_DEGENERATE when it is too small. Degenerative faces are
handled differently and as documented can create incorrect results.

Not sure what these incorrect results are and if there could be a better
solution for handling these results.

This fix would only mark a face degenerative when all the verts are the
same.

Reviewed By: Campbell Barton

Differential Revision: https://developer.blender.org/D7662
2020-05-14 14:30:02 +02:00
Jeroen Bakker
c9360b239b Fix T73286: Projection Painting Dense Mesh Bleed
When projection painting a dense mesh a face can be marked
PROJ_FACE_DEGENERATE when it is too small. Degenerative faces are
handled differently and as documented can create incorrect results.

Not sure what these incorrect results are and if there could be a better
solution for handling these results.

This fix would only mark a face degenerative when all the verts are the
same.

Reviewed By: Campbell Barton

Differential Revision: https://developer.blender.org/D7662
2020-05-14 14:28:27 +02:00
08ac4d3d71 Fix T76553: Blender Freezes When Playing Back Animation
In some cases blender could freeze. When threads are blocked (waiting for other tasks completion) the scheduler can let the thread perform a different task. If this task wants a write-lock for something that was read-locked in the stack a dead lock will happen.

For task pools every task is isolated. For range tasks the inner loop will be isolated. The implementation is limited as isolation in TBB uses functors which are tricky to add to a C API. We decided to start with a simple and adapt were we need to.

During testing we came to this setup as it was reliable (we weren't able to let it freeze or crash) and didn't had noticeable performance impact.

Reviewed By: Brecht van Lommel

Differential Revision: https://developer.blender.org/D7688
2020-05-14 13:54:16 +02:00
36d9f7e375 Fix T76541: OpenGl Depth Picking not selecting frontmost object
The issue was that we used GL_ALWAYS for depth checking here which would
lead to the depth information from objects being messed up.

It would not represent which object was closest to the camera.

Reviewed By: Clément Foucault, Jeroen Bakker, Campbell Barton

Differential Revision: http://developer.blender.org/D7710
2020-05-14 13:46:23 +02:00
Jeroen Bakker
eb23b39b7f Fix T76558: Decreasing Viewport Anti-Aliasing Samples Makes Scene Whiter
When setting the Viewport Anti-Aliasing samples in the user preferences
to a lower sample count the anti-aliasing was not reset. This lead to
incorrect result as the accum buffer would still hold the values of the
larger sample count.

This fix resets the TAA when the sample count is changed.

Reviewed By: Clément Foucault

Differential Revision: https://developer.blender.org/D7728
2020-05-14 12:44:42 +02:00
Jeroen Bakker
80fffba132 Fix T76729: Particle Hair Get Occluded by Overlays
When using an external render engine Blender will still draw an OpenGL
depth buffer for the overlay engine to work correctly. Particle systems
were ignored, what lead to occluded hair and other artifacts.

Reviewed By: Clément Foucault

Differential Revision: https://developer.blender.org/D7730
2020-05-14 12:43:14 +02:00
a88316b4a6 Cleanup: Remove uneeded loop
The Region loop was not required.
2020-05-14 12:29:44 +02:00
Jeroen Bakker
7d38f50367 Fix T75908: Sculpt GPU Batches + Render Artifacts
When sculpting the GPU batches are constructed with only the required data
for a single viewport. When that viewport changes shading or coloring mode (object
to vertex) batches might not hold all the needed information.

There is also a case when you have two 3d viewport one in object color
mode and the other in vertex color mode that the GPU batches were
updated without any vertex colors.

In order to fix these category of issues this patch would always
construct the full GPU batches for sculpting.

Reviewed By: Clément Foucault, Pablo Dobarro

Maniphest Tasks: T75908

Differential Revision: https://developer.blender.org/D7701
2020-05-14 11:58:33 +02:00
975c45df9a Cleanup: don't use deprecated exception specifications
Usage of exception specifications is discouraged by the C++ core guidelines.
2020-05-14 11:24:50 +02:00
Yevgeny Makarov
f17e7e0b62 UI: Tweak development branch splash image to exclude rounded corners
The rounded corners are now done at runtime within Blender, see
04828b7d99.

Fixes T76040.
2020-05-14 11:02:56 +02:00
b0686af32b Merge branch 'blender-v2.83-release' 2020-05-14 18:48:48 +10:00
5d2e54af37 Merge branch 'blender-v2.83-release' 2020-05-14 18:48:45 +10:00
21e5a72798 Merge branch 'blender-v2.83-release' 2020-05-14 18:48:43 +10:00
13769bcbe5 Fluid: Rename smoke flow forces to fluid flow forces
Better to use more general term since in theory these forces can be used for smoke and liquid.
2020-05-14 10:41:00 +02:00
9ebb3a386e Fix T76732: Error detecting modifier key clicks
At the time of checking, the previous type isn't the last key pressed.
2020-05-14 18:02:37 +10:00
fee46615f4 WM: include previous value, type in event printing 2020-05-14 17:59:14 +10:00
e22ea3dc0e Cleanup: sync clang-format with master
Avoid noisy diff's & conflicts.
2020-05-14 17:11:24 +10:00
de6a866114 Merge branch 'blender-v2.83-release' 2020-05-14 15:26:32 +10:00
0892ce85b2 Merge branch 'blender-v2.83-release' 2020-05-14 15:26:30 +10:00
cdc7a93c36 Merge branch 'blender-v2.83-release' 2020-05-14 15:26:27 +10:00
1cbc3a8f2b Fix undo-push assert for some modes with zero undo steps
Also fixes files not being tagged as modified with zero undo steps.
2020-05-14 15:18:51 +10:00
0cd9b1243c Fix sculpt/paint missing undo-step limiting 2020-05-14 14:52:07 +10:00
95a47ff226 Cleanup: move assignment out of loop 2020-05-14 13:52:56 +10:00
1fadda344c Merge branch 'blender-v2.83-release' 2020-05-14 04:19:11 +02:00
4341b5b2fe Fix T59954: View all Sequences doesn't show all sequences
Set boundbox_seq start X minimum value to SFRA.

This should be part of rBf66b5edf98c9, but I forgot to include this change.
2020-05-14 04:10:29 +02:00
27ef012ac7 Fix T52782: crash rendering more virtual parent particles than children 2020-05-14 03:42:09 +02:00
db1099c0ae Merge branch 'blender-v2.83-release' 2020-05-14 03:09:33 +02:00
ec324d8741 Fix T59089: --engine command line option does not affect 3D viewport render 2020-05-14 03:08:08 +02:00
879032d2ab Cleanup: Correct order of proxy resolutions
Wrong order introduced by rB7fc60bff14a6: UI: Layout changes for new checkbox layout possibilities
2020-05-14 02:59:19 +02:00
2c61b7f354 Fix T75071: rendering fails when all render layers disabled, but using compositor 2020-05-14 02:45:43 +02:00
88841559de Fix T66005: crash deleting render slot while rendering to it 2020-05-14 02:38:02 +02:00
e2eb47191d Fix T75715: crash rendering animation with persistent images 2020-05-14 02:14:18 +02:00
bd18ffe1f8 Fix T76388: Freestyle not respecting Show Emitter settings 2020-05-14 02:14:18 +02:00
c8060a78fd GHOST/wayland: style fix 2020-05-13 23:51:51 +01:00
a53917152e GHOST/wayland: fix cursor buffer deallocation 2020-05-13 23:13:48 +01:00
bd3c842c56 GHOST/wayland: remove unused 'registry' 2020-05-13 23:13:48 +01:00
d62c98a02d GPencil: Change tooltip 2020-05-13 22:49:30 +02:00
b369d46eb7 GPencil: Add new X-Ray option for Canvas Grid
In some situations is good to have a grid visible anot beeing occulde by meshes.

By default is OFF.

Differential Revision: https://developer.blender.org/D7721
2020-05-13 22:49:24 +02:00
71298a1da9 Revert "GPencil: Add new X-Ray option for Canvas Grid"
This reverts commit fd025b0b7a.
2020-05-13 22:48:52 +02:00
5ee71320c6 Revert "GPencil: Change tooltip"
This reverts commit 7b688a6b04.
2020-05-13 22:48:44 +02:00
7b688a6b04 GPencil: Change tooltip 2020-05-13 22:44:15 +02:00
fd025b0b7a GPencil: Add new X-Ray option for Canvas Grid
In some situations is good to have a grid visible anot beeing occulde by meshes.

By default is OFF.

Differential Revision: https://developer.blender.org/D7721
2020-05-13 22:44:04 +02:00
891b91928a Merge branch 'blender-v2.83-release' 2020-05-13 15:26:34 -04:00
16cc424bc5 Fix T75365: memory leak when writing PNG fails due to lack of disk space 2020-05-13 21:22:06 +02:00
2bc5c18714 Fix wrong Volume object step size tooltip 2020-05-13 21:22:06 +02:00
5e96c43854 Fix T76556: Apply parenting when joining parent into object
The current behavior isn't necessarily "incorrect," but it's unintuitive
and confusing. A simple fix is to apply parentinv before finishing the
operator.

However, there may still be issues when the object's parent has a parent.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D7723
2020-05-13 15:21:30 -04:00
4da3044abc Refactor: Move brush foreach_id to new IDTypeInfo structure. 2020-05-13 19:52:19 +02:00
e4890fa564 Refactor: Move lightprobe foreach_id to new IDTypeInfo structure. 2020-05-13 19:39:47 +02:00
c0e1bd815b Cleanup: Keep IDTypeInfo separated from ID type specific API.
Also do not define IDTypeInfo callback when default generic code is
enough...
2020-05-13 19:34:34 +02:00
58cc5c8573 Refactor: Move speaker foreach_id to new IDTypeInfo structure. 2020-05-13 19:30:04 +02:00
3a896bb373 Refactor: Move world foreach_id to new IDTypeInfo structure. 2020-05-13 19:22:46 +02:00
658b254e3e Cleanup: Keep IDTypeInfo separated from ID type specific API.
Also do not define IDTypeInfo callback when default generic code is
enough...
2020-05-13 19:11:19 +02:00
73f38f8db0 Refactor: Move shapekey foreach_id to new IDTypeInfo structure. 2020-05-13 19:08:54 +02:00
9ac5413ac0 Refactor: Move camera foreach_id to new IDTypeInfo structure. 2020-05-13 19:01:20 +02:00
c9048441f5 Cleanup: Do not mix IDTypeInfo code with rest of an ID type specific API... 2020-05-13 18:54:13 +02:00
91ecab5000 Merge branch 'blender-v2.83-release' 2020-05-13 18:48:11 +02:00
2b5e301ea4 Fix T75574: Instant crash: averaging custom normals on model.
Fairly critical code mistake actually, since it uses malloca,
BLI_smallstack should *never* be declared inside a loop...

Also optimized handling of the `loop_weight` heapsimple, we can also
only create and use a single one for all edited objects...

Found two other operators potentially affected by same issue (split
normals, and weld edges into faces).
2020-05-13 18:47:44 +02:00
5445353095 Fix T76654: Wrong text in Face Set boundary automasking brush property
Reviewed By: Blendify

Maniphest Tasks: T76654

Differential Revision: https://developer.blender.org/D7697
2020-05-13 17:06:48 +02:00
95583a398c Fix T76717: Set Rotation Mode Incorrectly Recalculates Bone Rotation In Pose Mode
The issue was that we didn't convert the current rotational values.
We simply just switched mode without doing any data conversions.
2020-05-13 16:29:19 +02:00
5b043b0724 Merge branch 'blender-v2.83-release' 2020-05-13 15:49:26 +02:00
c7f74863dd Fix T76711: override data-blocks could be renamed in the outliner
Overriding datablock should never have an editable name.

This also moves the check for linked/overridden datablocks above the
check for master-collection (otherwise a linked/overriden collection
could still be renamed)

Maniphest Tasks: T76711

Differential Revision: https://developer.blender.org/D7718
2020-05-13 15:30:16 +02:00
3a1426afbd Merge branch 'blender-v2.83-release' 2020-05-13 23:19:29 +10:00
e7d5e16af1 Merge branch 'blender-v2.83-release' 2020-05-13 23:19:22 +10:00
facc9bc878 Merge branch 'blender-v2.83-release' 2020-05-13 23:19:18 +10:00
5159b8e1ea Fix extra undo step when switching object modes
Changing between modes would always add a user visible undo step
that set object mode.

Avoid storing this extra undo step on object mode switching.
2020-05-13 23:14:01 +10:00
54ea356240 Cleanup: remove redundant active object NULL check & poll
This was from 66da2f537a but never did anything,
as a NULL object always exited at the beginning of the operator.
2020-05-13 23:14:01 +10:00
4e32398668 Cleanup: unused arg 2020-05-13 23:14:01 +10:00
ed4647b5d7 Fix missing ID tag when converting objects
Parenting to a curve path animation depends on both geometry and
transform components. Conversion of mesh to curve will make it so
parent have path animation, conversion of curve to mesh makes it
so there is no more path animation. Both cases affects children
of the converted objects, and it's not possible to rely on special
case for curve parent in the dependency graph as that link will be
lost after conversion of curve to mesh.

Simplest approach is to tag object for both geometry and transform
update, which will ensure all children are at valid state after
the conversion.
2020-05-13 14:26:50 +02:00
9db08b77e4 Fluid: Fix for refactor 99ee1de094
Fix incorrect file IO functions.
2020-05-13 13:05:01 +02:00
498bd0772e Merge branch 'blender-v2.83-release' 2020-05-13 13:03:55 +02:00
cbcc15bdaf Fix T65426: GPencil mirror modifier doesn't work as expected
The mirror was not working if the original object had transformations.

Also some code cleanup.
2020-05-13 13:00:24 +02:00
2afb597572 Fix T76665: Wrong files selected when using box select
Reviewers: Severin

Differential Revision: https://developer.blender.org/D7705
2020-05-13 12:50:14 +02:00
b55c78a289 Simulation: Add modifier to access simulation data
For now the "Simulation" modifier only exists for point cloud objects, because
we need this for the particle system. Right now, the modifier is doing nothing.

There is a new `DEG_add_simulation_relation` function that is used
by the modifier to make sure that the simulation is evaluated before
the modifier is executed.

Reviewers: brecht, sergey

Differential Revision: https://developer.blender.org/D7549
2020-05-13 12:39:17 +02:00
23fd95458c Multires: Fix wrong or missing mask propagation
Propagation when changing sculpt level was missing. In fact, the mask
was simply completely removed when changing sculpt level.

Subdivision worked for simple and linear subdivision, but Catmull-Clark
was giving empty results.

Fixes propagation part of T76386.
2020-05-13 12:11:27 +02:00
0790d90d02 Multires: Update and add comments 2020-05-13 12:08:12 +02:00
2843af9357 Multires: Fix mask interpolation weights
Weights were in the different order from corners.

Doesn't fix propagation issues, but fixes an essential step towards
fully correct propagation.
2020-05-13 12:08:11 +02:00
099dd0690c Fix T76481: Fast clicks over Dopesheet toggles trigger renaming
Making this work reliably on the event system side is difficult. So
instead, let the toggle icons take and swallow double-click events on
the UI handler level.

The second change in this patch seems to be only needed for touchpads.
Without it, renaming would still be triggered sometimes, because the
hovered button wasn't re-activated fast enough.
2020-05-13 11:51:52 +02:00
61a3d55d06 Merge branch 'blender-v2.83-release' 2020-05-13 11:42:56 +02:00
eb27595ac4 Fix T76703: GPencil bone parenting missing dependency update
Maniphest Tasks: T76703

Differential Revision: https://developer.blender.org/D7715
2020-05-13 11:30:37 +02:00
6fbb01e641 Merge branch 'blender-v2.83-release' 2020-05-13 10:39:59 +02:00
cda25f8f38 Fix T76646: Crash when changing Size in Add Cube pop-up in some cases.
Remove resetting of ID uuid session counter, it is not really needed
anymore, and not trivial to do this properly everytime.

Thanks @brecht for investigating this.
2020-05-13 10:37:02 +02:00
d8274efcdb Merge branch 'blender-v2.83-release' 2020-05-13 18:24:07 +10:00
79511fca20 Fix zero tablet pressure for simulated events
Impacted sculpt/paint tests.
2020-05-13 18:19:54 +10:00
7415855042 Fix typing Z ignores in text fields
Own error undo/redo key check.
2020-05-13 17:43:15 +10:00
adcc81341d UI: show an error when a search fails
Useful in cases when making a typo before pressing enter.
2020-05-13 17:03:46 +10:00
e8e003ee8b Merge branch 'blender-v2.83-release' 2020-05-13 16:08:59 +10:00
8799fbbef8 Merge branch 'blender-v2.83-release' 2020-05-13 16:08:56 +10:00
7ff47680c6 Merge branch 'blender-v2.83-release' 2020-05-13 16:08:50 +10:00
3edfe352ee Merge branch 'blender-v2.83-release' 2020-05-13 16:08:41 +10:00
0e0ebdb65c Fix crash accessing the clipboard
The clipboard can change between checking it's length and
copying into the allocated buffer.

Move this from RNA to the C/Python API.
2020-05-13 16:01:26 +10:00
75d0287cee PyAPI: support PyGetSetDef when extending RNA types
Support extending properties as well as methods.
2020-05-13 15:57:29 +10:00
8f4f3cce03 Cleanup: split RNA type extension methods into it's own API
This isn't so closely related to the RNA API,
it's a way to use the C/Python API to extend RNA types
and can be in it's own file.
2020-05-13 15:54:09 +10:00
13130ca293 Cleanup: warning 2020-05-13 15:47:51 +10:00
429841e5fd Merge branch 'blender-v2.83-release' 2020-05-13 03:00:34 +02:00
9253386dcb Fix T76488: fix mask extract poll function
This was returning true in edit mode, causing the crash

Reviewed By: jbakker

Maniphest Tasks: T76488

Differential Revision: https://developer.blender.org/D7645
2020-05-13 02:59:31 +02:00
05dd9ca06c Fix T75347: Update cloth brushes in versioning with a valid mass value
The file attached in the report has a cloth brush saved with a particle
mass of 0.0, which causes all sort of issues in the solver. I don't know
how that brush was created, but it does not seems to be possible to do
in the current version (reset values are correct, property limits are
correct and a default brush is created in versioning_defaults). This
resets all brushes with an invalid value to 1.0.

Reviewed By: jbakker

Maniphest Tasks: T75347

Differential Revision: https://developer.blender.org/D7698
2020-05-13 02:55:30 +02:00
ce35cfd208 Fix T76306: Disable use creases when there is displacement data
Use creases changes the limit surface, so the displacemente data is
won't be correct if this option is modified without updating the
displacement.

Reviewed By: sergey

Maniphest Tasks: T76306

Differential Revision: https://developer.blender.org/D7700
2020-05-13 02:52:46 +02:00
bf0a554114 Fix T75968: PBVH raycast returns wrong active vertex
nearest_vertex_co was not reset when a new triangle was intersected by
the ray, so it was always returning the closest vertex to the real
cursor position in any triangle, which was not always the triangle under
the cursor.

Reviewed By: sergey

Maniphest Tasks: T75968

Differential Revision: https://developer.blender.org/D7485
2020-05-13 02:49:38 +02:00
f9d0f59bed Merge branch 'blender-v2.83-release' 2020-05-13 00:14:44 +02:00
50ef801a79 Fix T76320: Thread race condition on undo with prefetching enabled
Stop prefetch jobs before undoing.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D7633
2020-05-13 00:10:58 +02:00
75e989dab6 GHOST: fix cursor buffer handling when toggling visibility 2020-05-12 23:05:24 +01:00
5b86fe6f33 UI: About Blender Dialog
Adds an 'About Blender' dialog to the 'App' menu to display information like branch and hash.

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

Reviewed by Campbell Barton
2020-05-12 14:29:59 -07:00
613715a994 Merge branch 'blender-v2.83-release' 2020-05-12 23:19:00 +02:00
be69f23b68 Fix T70612: Sequencer Crash on enabling Prefetch
Disable (skip) preftching scene strips if they target 3D scene.
Try to continue prefetching complete frame if disk cache images are found.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D7514
2020-05-12 23:13:18 +02:00
5873bd82da Merge branch 'blender-v2.83-release' 2020-05-12 22:31:29 +02:00
4930eb15f7 Fix T74012: missing fluid simulation domain panels in workbench
Maniphest Tasks: T74012

Differential Revision: https://developer.blender.org/D7706
2020-05-12 22:19:53 +02:00
5ca1eb96c7 Merge branch 'blender-v2.83-release' 2020-05-12 21:57:04 +02:00
829dce524d Fix T72920: Snap package fails to play audio and blocks audio in other apps
ALSA and OSS are not available for the snap packages, and trying to initialize
them seems to cause some problems for other applications. Instead configure
OpenAL and SDL to use PulseAudio, and set PULSE_SERVER environment variable to
make it work.
2020-05-12 21:52:43 +02:00
a5eee1f935 Fix T76535: Eevee + Freestyle render crash with many strokes
Freestyle would create a huge amount of material slots with the same material,
causing issues in Eevee use of alloca().
2020-05-12 21:51:12 +02:00
bfdb27f494 Fix incorrect assert in Cycles node socket get/set functions
Thanks to Subrahmanya Oruganti for spotting these.
2020-05-12 21:50:49 +02:00
80953aed33 Fix CMake using different OpenEXR / USD includes and libraries in some cases
Search for all potential library names in each directory, otherwise e.g.
libImath-2_2.a from a system directory will be preferred over libImath.a even
if we specified a directory.
2020-05-12 21:50:49 +02:00
122a3169e2 Fix missing standard OpenColorIO roles, as reported by ociocheck
These are not used by Blender, but can be used by other software using our
configuration.
2020-05-12 21:50:42 +02:00
289242fef9 Transform orientation tweaks
If the orietation is setted as a parameter, it is best to refer
to it as a constraint orietation so that it can be reused in
successive axis presses.

This is useful to retrieve the orientation of the extrude for example.
2020-05-12 15:44:19 -03:00
36e3847093 Fix T76635: Clicking the text button X in a pop-up doesn't clear
In this case giving `CTX_wm_menu()` priority over `CTX_wm_region()` is all
that's needed and makes sense (since we want exactly the hovered button, not
some other active button in the region/menu hierarchy).

The situation with pop-ups is still tricky, see T73565. But as a first step
it's probably good to let functions be more explicit about what they want when
querying UI context. So I added a variation of a UI-context function for cases
like this.
2020-05-12 20:40:56 +02:00
fc59febb1b UI/Animation: Don't change Graph Editor cursor from scrubbing region
Do not execute the operator to change the Graph Editor cursor when changing the
active frame through the scrubbing region. This is not what users expect, see
T76599.

Removes an explicit exception to not let the regular frame change operator
execute in the Graph Editor. It was needed to let the cursor operator run
instead, but the interplay between the two operators is now handled at keymap
level.

Fixes T76599.
2020-05-12 19:40:41 +02:00
94b9141c95 Fix T76693: Inconsistent rotation Shortcut vs Gizmos
Problem introduced in rB4deea4f4c57a
2020-05-12 14:35:27 -03:00
fc62a3366c UI: Remove duplicate Mark/Clear Seam entries from Edge menus
These already exist in the UV menu (both in the 3D Viewport and UV Editor)
which makes it more clear that this feature is related to UV Unwrapping.
2020-05-12 19:07:15 +02:00
13d0f74b80 Refactor: Move lamp foreach_id to new IDTypeInfo structure. 2020-05-12 18:54:57 +02:00
8ce0c9111d Refactor: Move texture foreach_id to new IDTypeInfo structure. 2020-05-12 18:54:57 +02:00
5fd64c014f Refactor: Move armature foreach_id to new IDTypeInfo structure. 2020-05-12 18:54:57 +02:00
9996688b71 Refactor: Move library foreach_id to new IDTypeInfo structure. 2020-05-12 18:54:57 +02:00
70b73732fe Refactor: Move lattice foreach_id to new IDTypeInfo structure. 2020-05-12 18:54:57 +02:00
b1b93c2ef1 Refactor: Move metaball foreach_id to new IDTypeInfo structure. 2020-05-12 18:54:57 +02:00
ef6610dec5 Refactor: Move Curve foreach_id to new IDTypeInfo structure. 2020-05-12 18:54:57 +02:00
1606e732c2 Merge branch 'blender-v2.83-release' 2020-05-12 18:00:41 +02:00
ac1a6565df Fix T76113 GPU: Crash closing file browsers with AMD GPUs
This fixes crash in the free mesa driver for amd gpus. This crash seems to
only happen on linux.
2020-05-12 18:00:00 +02:00
33f9fe3c62 Merge branch 'blender-v2.83-release'
Conflicts:
	release/scripts/startup/bl_ui/properties_render.py
	source/blender/blenkernel/BKE_blender_version.h
2020-05-12 17:54:20 +02:00
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
be4b3c64ad Fix T74694: Sculpt Mask Influences Weight/Vertex Paint Drawing
Sculpt overlay assumed that the sculpt session was always in sculpt
mode. But the sculpt session was also used for Vertex/Weight painting.
This resulted that when a mask was defined in the sculpt mode this
resulted into render artifacts.

This patch adds a check to see if the object has a sculpt session for
OB_MODE_SCULPT.

Reviewed By: Clément Foucault

Differential Revision: https://developer.blender.org/D7704
2020-05-12 16:21:38 +02:00
25c67a65d6 Merge branch 'blender-v2.83-release' 2020-05-12 16:16:30 +02:00
8da7ab11cf Fix T76053: Rigid Body properties disappears after deleting rigid body constraint object and undoing.
Since we re-use same addresses of IDs with newly read data, and never
remap old IDs to 'proper' 'old' ID pointers, it implies that old IDs
being deleted will have many ID pointers to new, valid data that we want
to keep.

In general anyway, code from IDTypeInfo (i.e. low-level ID management
code) should never do anything outside of its own ID scope, we cannot
guarantee that given ID is in fully valid state regarding its relations
to other data-blocks.
2020-05-12 16:13:52 +02:00
fd271b6b24 Merge branch 'blender-v2.83-release' 2020-05-12 15:58:35 +02:00
c7651be1e1 Multires: Cleanup, clarify comments 2020-05-12 15:58:21 +02:00
dbc13a37ca UI: Rename 'View Zoom In/Out' to 'Zoom In/Out'
This rename was done time ago but still missing in some areas.
2020-05-12 15:58:00 +02:00
08b4c9a815 Multires: Correct NULL-pointer check
There is some hard-to-reproduce scenario when top level
would have masks allocated, but without masks on the sculpt
level.

Need to check proper array before accessing its elements.
The check for top-level masks is done by the caller.
2020-05-12 15:49:31 +02:00
82e8df01ac UI: Rename 'View All' operator to 'Frame All'
This change was done time ago but it was still missing in some operators.
2020-05-12 15:44:59 +02:00
1b289029bb Merge remote-tracking branch 'origin/blender-v2.83-release' 2020-05-12 15:08:03 +02:00
94cbfb71bc Fix T76132: Can't import Alembic with changing UVs
In the Alembic importer, the animation of UVs and normals was
overlooked; when the mesh geometry is not animated, the entire mesh was
considered constant.

T76132 concerns both the exporting and importing of changing UVs. This
commit fixes the importing.
2020-05-12 15:07:09 +02:00
65574463fa Fix T76132: Can't export Alembic with changing UVs
In the Alembic exporter, UVs were only exported on the first frame. This
is an issue, as when exporting an animated mesh the topology can change,
and then the UV coordinates of the first frame are no longer valid.

T76132 concerns both exporting and importing changing UVs. This fixes
the exporting.
2020-05-12 15:07:09 +02:00
e5bb02aaa4 Fix T76669: Crash when doing right click on channel
Reviewers: lichtwerk, sybren

Differential Revision: https://developer.blender.org/D7702
2020-05-12 14:47:21 +02:00
f7715b3337 Merge branch 'blender-v2.83-release' 2020-05-12 22:10:21 +10:00
4d8ec4439f Merge branch 'blender-v2.83-release' 2020-05-12 22:10:17 +10:00
94934199e7 Merge branch 'blender-v2.83-release' 2020-05-12 22:10:13 +10:00
03727082e9 Merge branch 'blender-v2.83-release' 2020-05-12 22:10:10 +10:00
65381e220e Fix T76507: Reading clipboard blocks keyboard input on X11 2020-05-12 22:09:11 +10:00
2b7741003e Cleanup: tag unused function 2020-05-12 22:09:03 +10:00
973ab436f0 Fix T76514: Invalid geometry in Alembic crashes Blender
Even though {T76514} is caused by invalid geometry, and thus technically
constitutes a bug in the software that created the Alembic file, I would
like Blender not to crash on importing such a file.

The error in the Alembic file consists of invalid mesh loops, where
consecutive loops refer to the same vertex. The `BKE_mesh_validate()`
can actually correct these errors, so this commit focuses on two things:

- Letting Blender survive the situation until the mesh is loaded, and
- Detecting the error so that `BKE_mesh_validate()` can be called only
  when necessary. This ensures there is only a minimal impact on
  performance when loading actually valid data.

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

Reviewed By: JacquesLucke
2020-05-12 13:58:40 +02:00
fffcb6e480 Fix T74818: improve tooltip for initial fluid velocity 2020-05-12 13:55:58 +02:00
94734d6454 Fix Frame Dropping not dropping the correct amount of frames
Previously the playback mode "Frame Dropping" would not drop the correct
number of frames which would lead to slow playback.

For example, the playback target is 60fps.  However we can only muster
around 32 fps.

The delta frames from the last step is in this case ~1.98 or so.

With the previous code, we would floor this.  That would lead us to step
forward one frame each time, effectively playing back the animation at
half the speed as we will try to render every frame.

To fix this we simply save the remaining fraction from the previous
frame and use it to compute the current frame step.

Reviewed By: Sybren

Differential Revision: http://developer.blender.org/D7694
2020-05-12 13:24:20 +02:00
07fc240d72 UI: invoke operators in search menu instead of execute
Reviewers: campbellbarton

Differential Revision: https://developer.blender.org/D7639
2020-05-12 13:19:51 +02:00
06763eace7 Merge branch 'blender-v2.83-release' 2020-05-12 12:23:41 +02:00
cfbcc94451 Fix T75492: Only positive shrink factor values can be animated
A better fix would probably be to check if the value is animated,
but I'm not sure how to do that.

Reviewers: zeddb

Differential Revision: https://developer.blender.org/D7692
2020-05-12 12:22:36 +02:00
0c1b1e734e Merge branch 'blender-v2.83-release' 2020-05-12 12:21:16 +02:00
a50c131a0d Fix T75889: Cannot bake mantaflow via Python API
The issue was the usage of the global `__main__` Python module.
When running scripts in the text editor, Blender would overwrite
the `__main__` module.

Reviewers: sebbas

Differential Revision: https://developer.blender.org/D7690
2020-05-12 12:18:09 +02:00
2008bcb0bb Fluid: remove special treatment for running Python code on windows
We discussed this in D7690 and could not find a reason for this
code anymore. It might just be leftover from some even older code.
2020-05-12 12:18:09 +02:00
390d27548c Cleanup: Remove print statement 2020-05-12 12:05:48 +02:00
e0b5a20231 Preferences: Customize default empty size for collection instances
The old value (1.0) was often too large in practice. When many collection
instances are created, the large empties create a mess in the viewport.

This adds a new preference setting in `Editing -> Objects -> New Objects`
called `Instance Empty Size`.

The value will be used as display size for new empties containing a
collection instance.

Reviewers: Severin

Differential Revision: https://developer.blender.org/D7650
2020-05-12 10:59:41 +02:00
f1f3381873 Merge branch 'blender-v2.83-release' 2020-05-12 10:39:00 +02:00
d896df3ccd Fix T73973: GPencil Fill fails when zoom the image
The problem was related of how the initial pixel to create outline was detected. Now, a limit is set for any image to keep a fillable image in all situations, not only when some strokes contain the fill.
2020-05-12 10:35:56 +02:00
c1d8eb01c5 GPencil: Cleanup wrong ID delete
Differential Revision: https://developer.blender.org/D7691
2020-05-12 10:35:49 +02:00
f20133aeec Merge branch 'blender-v2.83-release' 2020-05-12 07:59:47 +02:00
Jeroen Bakker
24140444f2 Fix T75556: Select Emitter Object via Hair
{rB3685347b4172} introduced a conservative depth rendering for
selection. The conservative depth rendering assumed that all geometry
are triangle based. Hair is lined base.

This patch will use a normal depth shader for rendering hair.

Reviewed By: Clément Foucault

Differential Revision: https://developer.blender.org/D7661
2020-05-12 07:58:37 +02:00
Jeroen Bakker
849672a991 Fix T75556: Select Emitter Object via Hair
{rB3685347b4172} introduced a conservative depth rendering for
selection. The conservative depth rendering assumed that all geometry
are triangle based. Hair is lined base.

This patch will use a normal depth shader for rendering hair.

Reviewed By: Clément Foucault

Differential Revision: https://developer.blender.org/D7661
2020-05-12 07:51:45 +02:00
859eee7e15 Merge branch 'blender-v2.83-release' 2020-05-12 14:41:54 +10:00
21fdd00108 Merge branch 'blender-v2.83-release' 2020-05-12 14:41:50 +10:00
bbb5fa2a16 Merge branch 'blender-v2.83-release' 2020-05-12 14:41:43 +10:00
eaa21df505 Fix T71882: Offset Edge Slide doesn't switch selection mode
Based on D6335 with modifications.
2020-05-12 14:38:01 +10:00
Anthony Edlin
750b370c25 Fix EDBM_selectmode_disable_multi_ex return value
This always return changed, even when no changes were made.
2020-05-12 14:33:29 +10:00
bff679f8f9 UI: add offset edge slide to edge menu
This was only available in the context menu which only shows
when the selection was set to edge-mode, even though this
works in other modes.
2020-05-12 13:53:46 +10:00
9947b1fda6 Merge branch 'blender-v2.83-release' 2020-05-12 12:53:48 +10:00
8770f35305 Cleanup: remove DNA_screen_types.h, use struct qualifier
Also remove draw-manager & depsgraph headers in interface_icons.c

Change this in 2.83 to prevent merge issues in master with
interface_intern.h header.
2020-05-12 12:46:29 +10:00
5852f97dc2 API Docs: Fix broken url markup 2020-05-11 21:35:33 -04:00
1e12468b84 UI: undo/redo support for text fields
Support undo/redo when editing text buttons.
2020-05-12 11:32:14 +10:00
542ff416e2 Fix T76285: Missing 'Toggle X-Ray' operator description
Author: @Alaska

Differential Revision: https://developer.blender.org/D7591
2020-05-11 17:02:11 -04:00
a692418bc2 Merge branch 'blender-v2.83-release' 2020-05-11 21:20:32 +02:00
8956e9e5f6 Fix mathutils box_pack_2d docstring
Differential Revision: https://developer.blender.org/D7667
2020-05-11 21:18:42 +02:00
9618875b96 Merge branch 'blender-v2.83-release' 2020-05-11 20:59:12 +02:00
a116912fd6 Fix (unreported) greasepencil crash calling transform_fill from outside
3DView

Operator relies on 3DView, poll for it.

Spotted while looking into T76522.

Reviewers: antoniov

Differential Revision: https://developer.blender.org/D7665
2020-05-11 20:46:13 +02:00
e10eaaad13 Merge branch 'blender-v2.83-release' 2020-05-11 20:31:58 +02:00
acd5f5285e Fix T76538: Prevent nodesocket creation on certain nodes
- no sockets on Frame nodes
- no Input sockets on Group Input nodes
- no Output sockets on Group Output nodes

Maniphest Tasks: T76538

Differential Revision: https://developer.blender.org/D7671
2020-05-11 20:26:00 +02:00
4deea4f4c5 Fix T76504: Extrusion doesn't take in account the current transform orientation
Use orientation defined in the scene when changing constraint
2020-05-11 15:10:50 -03:00
b026965f80 Revert "Fix T76504: Change in behavior of constraints orientation"
This reverts commit 2f63e47931.
2020-05-11 13:43:29 -03:00
508124b5be Fix error in last transform orient commit 2020-05-11 13:25:37 -03:00
3c56746863 Windows: Re-enable incremental linking
It was disabled in D7520 to keep the pdb's from growing out
of control however the increased link time is just not worth
it.

I'll keep an eye on the dailies and see if we have to come up
with a different solution.
2020-05-11 10:01:54 -06:00
dfbb3d82f7 Merge branch 'blender-v2.83-release' 2020-05-11 17:54:32 +02:00
365e9cb6aa Overlay: Replace depth blitting by GPU_texture_copy
This is an attempt to fix the related T74243.
2020-05-11 17:53:45 +02:00
a1363f74bf Fix T76216 Workbench: Glicht when switching from quad views to normal view
This was because of the use of uninitialized buffers for TAA.
This patch is a quick fix for the issue which is a missing tagging for a
complete viewport update.
2020-05-11 17:53:45 +02:00
e3861b949a DRW: Fix debug performance stats 2020-05-11 17:53:45 +02:00
15e71781b9 Merge branch 'blender-v2.83-release' 2020-05-11 17:38:50 +02:00
4e1a6b48e7 Fix T76559: Crash after deleting material leaves invalid pointer in node editor.
No idea why node editor remap callback was only handling scene IDs (and
not any other ntree owner)...

Note that this should be a safe fix, but it unvails a nice can of worm,
at some point we should ba able to handle all of that through libquery
only, get rid of editor's remap callbacks, and probably sanitize usages
of ID pointers by some of them, like that nodetree editor.

Current situation remains a fairly fragile mess...
2020-05-11 17:24:56 +02:00
6f5bc1fc2b Merge branch 'blender-v2.83-release' 2020-05-11 17:14:15 +02:00
249ccab111 Fix T76621: UILayout.prop_search() broken for data-block names
If the search menu was used for a string property, and a data-block was
selected from the search, the value set would be an invalid name. The property
would get the modified UI string, not the proper data name set.

Mistake in rBd6cefef98f87.

This is more of a temporary fix to make the menu behave like before above's
commit. So the library hints this added will not be shown for string properties
anymore. This would need further changes in the UI code (see
https://developer.blender.org/P1380) but is too unsafe for 2.83 at this point.
Even if this is done, the note below still applies.

NOTE: Data-blocks should not be referenced by name only, as it's possible to
have duplicate data-block names with linking and especially with library
overriding.
Instead, pointer properties should be used, `UILayout.prop_search()` can then
properly deal with linked and overridden data-blocks.
2020-05-11 17:13:04 +02:00
ccf97e1013 Version bump to 2.90.1 for versioning code 2020-05-11 16:28:16 +02:00
e407fdd9c4 Cleanup: Add space line removed by error 2020-05-11 16:28:15 +02:00
bdcf2083a3 GPencil: Cleanup unneeded initializations 2020-05-11 16:28:15 +02:00
d63956d0e5 GPencil: Replace material name with material pointer for Modifiers filter
Before, the material name was used to filter the effect of the stroke, but after the last changes in the ID code, now it's not working.

After talking with @severin, we agreed to replace the material name with a pointer. Also, this fix a design issue when the materials were linked.

Related to T76594

Differential Revision: https://developer.blender.org/D7681  with some minor changes
2020-05-11 16:28:15 +02:00
870e081bcd UI: Curve Edit Stroke Panel Layout
Also removes the 'Curve Stroke' panel that showed globally for curve
edit mode. This means the settings will not be available without the
draw tool selected.

Reviewed By: billreynish, campbellbarton

Differential Revision: https://developer.blender.org/D7652
2020-05-11 10:16:52 -04:00
af8bd43e35 Merge branch 'blender-v2.83-release' 2020-05-11 10:45:20 -03:00
Sergey Sharybin
27e3361eb5 Fix T74713: Unpredictable active texture node for Workbench
The selection operator was not being correctly marked for update.
This restores the behavior seen in blender 2.79.
2020-05-11 10:44:19 -03:00
Sergey Sharybin
4d677ec90d Fix T74713: Unpredictable active texture node for Workbench
The selection operator was not being correctly marked for update.
This restores the behavior seen in blender 2.79.
2020-05-11 10:35:30 -03:00
8c6391a9b3 Merge branch 'blender-v2.83-release' 2020-05-11 15:32:50 +02:00
86a16e7381 Fix T76512: Sculpt mode: crash when applying base
Differential Revision: https://developer.blender.org/D7663
2020-05-11 15:26:09 +02:00
76c64af00c Fix T76630: Crash when changing transform value with Custom Orientation 2020-05-11 09:47:25 -03:00
815855b91b Fix T76642: Incorrect behavior limiting undo steps 2020-05-11 22:20:51 +10:00
267e4d130a Merge branch 'blender-v2.83-release' 2020-05-11 13:55:52 +02:00
3d3a75fc2a Fix T76598: GPencil - Set a lower limit for Thickness modifier
The old value was too high. Now, the limit of pressure is 0, but anyway, the stroke will be always visible because there is a minimum thickness of 1 pixel.
2020-05-11 13:55:21 +02:00
ced4dfa349 Cleanup: Toggle X-Ray button, removed nested ternary operators
Replaced two nested ternary operators combined with dynamic attribute
access, with a simple `if`/`elif`/`else` construct.

No functional changes.
2020-05-11 13:02:21 +02:00
a1593fa05b GPencil: New Percentage parameter in Build modifier
Add a factor to determine the percentage affected.

This parameter is used to hide part of the stroke and to have a full control of how the points are displayed and not linked to current scene frame.

{F8526502}

{F8526511}

Reviewed By: mendio, pepeland

Differential Revision: https://developer.blender.org/D7682
2020-05-11 12:57:22 +02:00
e82d8c60f0 Annotations: Small tooltip change 2020-05-11 12:39:32 +02:00
Juanfran Matheu
9a7c4e2d44 Annotations: Add Stabilization for draw tool
This patch adds the stabilizer feature of GP to the annotations.

It has a toggle to activate it "Use Stabilizer", and two properties to control the behaviour of the smooth effect (factor and radius).
You can also use shift at start or in the air to temporaly use this feature.

{F8518283}

Differential Revision: https://developer.blender.org/D7648
2020-05-11 12:39:23 +02:00
672a0af081 Fix T76438: Wrong calculation of depth for Follow Track constraint
Need to transform direction as such, without adding translation component
of the camera matrix.
2020-05-11 11:45:20 +02:00
38732c74fc Tracking: Cleanup, split code of follow track constraint
Makes a set of more isolated individual functions, which should make
it more clear what's going on. Improved naming, added some comments.

Some extra cleanup is possible to get rid of generic vectors called
vec and disp.
2020-05-11 11:24:44 +02:00
de53c039ad UI: show tool-tips in menu search 2020-05-11 18:43:50 +10:00
067587c51b Merge branch 'blender-v2.83-release' 2020-05-11 18:31:04 +10:00
1a382d0579 Merge branch 'blender-v2.83-release' 2020-05-11 18:30:59 +10:00
668867558e UI: apply vertical tool-tip offset in pixel-space
Was applying in ui-block space which changed offset
at different zoom levels.
2020-05-11 18:30:02 +10:00
d6f48e21fc Cleanup: unused arg, clang-format 2020-05-11 18:08:21 +10:00
0e41305344 Cleanup: reference 'bpy.types.bpy_struct' directly
Previously there wasn't a way to access this directly from bpy.types.
2020-05-11 16:56:09 +10:00
364780bce5 Docs: list inherited C/Python API functions 2020-05-11 16:43:49 +10:00
63849aac95 Fix duplicate property references in generated API docs 2020-05-11 16:41:06 +10:00
e3673fd869 Fix building docs with sphinx 3.x 2020-05-11 16:09:56 +10:00
f4d65b0d6e Docs: update API docs, adding reference to bl_rna_get_subclass. 2020-05-11 15:48:51 +10:00
6222a9bf27 Cleanup: unused variable 2020-05-11 15:48:51 +10:00
9bda322468 Merge branch 'blender-v2.83-release' 2020-05-11 07:31:09 +02:00
0461727553 Fix T75998: Precision of 'Unit Scale' and 'Grid Scale' are mismatched
Change hard limits of scale_length RNA property to 1e-9 - 1e+9.
This makes it easier to work with small or large metric units.
2020-05-11 07:23:22 +02:00
51ac411ce8 Cleanup: add ED_screen_areas_iter to clang-format ForEachMacros 2020-05-10 15:42:06 +02:00
4816b1f11d Merge branch 'blender-v2.83-release' 2020-05-10 08:29:52 +02:00
eaee2b4119 Fix T36263: Pasted strip doesnt have F-Curve keyframes from the original
Original code for copying strips tried to change strip name 2 times before
copying and once again after pasting.

Store structs in clipboard in unchanged state, so we can reference data after
pasting easily.

Better method would probably be storing animation data in clipboard as well,
so we can copy animated strips even between scenes.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D7638
2020-05-10 08:26:24 +02:00
78296366df Merge branch 'blender-v2.83-release' 2020-05-10 08:05:03 +02:00
a1b3effd55 Fix T71300: Crash on rendering scene recursively from sequencer
Adding recursive scenes has been disabled, but old files still can be opened.

Add check if scene will render itself.
Opening such file will produce warning on open and error on running render.

Reviewed By: campbellbarton

Differential Revision: https://developer.blender.org/D7562
2020-05-10 07:51:20 +02:00
76e56e2ba7 Windows: Ignore context record for backtrace is address is 0.
T76602 reported a crash with the exception address being 0,
this stack naturally could not be walked and no backtrace was
reported for the main thread. Which would have been helpful.

This change modifies the behaviour of the crash handler to ignore
the context record if it contains no useful information and
walk the current stack to get some information about what lead
to the crash.
2020-05-09 18:12:14 -06:00
f2178b7f97 deps/windows: Fix wrong crt for libjpeg and pthreads
The msvc linker had been warning about libcmt being dragged
in for a bit, finally tracked the issue down to the deps of
jpeg and pthreads which both ignored our cflags.

this diff changes them both to use the dynamic crt rather
than the static one so they'll be in line with all our
other libraries.
2020-05-09 12:47:59 -06:00
633fee72d5 Fix T76427: edit mesh undo hanges when building without TBB
Background task pools would not restart threads if reused multiple times,
thanks to Jeroen for identifying the cause of this problem.

Differential Revision: https://developer.blender.org/D7659
2020-05-09 17:17:20 +02:00
9be28095cb Fix building on NetBSD 2020-05-09 23:22:50 +10:00
9b02415ec8 Cleanup: doxy comments 2020-05-09 17:36:12 +10:00
d06384aa41 Cleanup: spelling 2020-05-09 17:19:28 +10:00
00e99959d3 Cleanup: double-spaces in comments 2020-05-09 17:15:43 +10:00
904249b4f3 Doxygen: Fix warnings in Doxyfile 2020-05-08 19:53:32 -04:00
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
0d0dcfd643 Install_deps: Add support to compile TBB when we cannot find version.
We now want to use fairly recent TBB (2018 at least?), so distro a bit
old will not have required package anymore...

Tested with Debian, other distro "should work" (c), but tests there are
much welcome! ;)
2020-05-08 18:05:30 +02:00
2d30c4a35b install_deps: Fix (unreported) typo in OpenXR build code.
Was breaking up proper behavior of 'need to rebuild' checks for that
lib.
2020-05-08 18:05:30 +02:00
e517734708 install_deps: Fix (unreported) broken logic in OIIO building.
Not sure where that code was comming from, but it was breaking the
cleanup/update_deps logic...
2020-05-08 18:05:30 +02:00
7d8c5d5623 install_deps: Fix (unreported) broken Boost source URL. 2020-05-08 18:05:30 +02:00
be3c0862ba Cleanup: install_deps: Simplify the 'no distro' code a bit.
We never deal with packages then, and only ever build (if we do
anything), no reason to make things more complicated than needed...
2020-05-08 18:05:30 +02:00
883dfda024 install_deps: Fix (unreported) bad handling of deps between libs.
Previous code would forec built libs to always be rebuilt when one of
their deps was using a package. While this could be useful when said
package was actually updated, this generates way too much false
positives.

Now only rebuild a built lib when we actually switch from built to
package for one of its deps.
2020-05-08 18:05:30 +02:00
96f305c63d Windows: Include symbol file in module information
When writing out the module information in a crashdump
we did not include what symbol file was loaded and if
that symbol file actually matches our executable.

Given the backtraces may contain invalid information
if the symbols are unmatched this is relevant to know.

This diff adds the symbol file and an indication if
unmatched symbols are used.
2020-05-08 10:01:56 -06:00
a1c2441390 Windows: Improve private symbol detection
To detect if private of public symbols were loaded we were relying
on a strcmp with a known filename, which was not great, the symbol
api has a field we can query which should be more flexible and
reliable.
2020-05-08 09:46:39 -06:00
cc1fb9d177 Windows: Fix BLI_assert backtrace.
With the recent backtrace overhaul, the fact that BLI_assert calls
BLI_system_backtrace slipped somehow trough the cracks, causing
issues for debug builds.

This change allows BLI_system_backtrace to run again without having
an exception record.

Also minor improvements to the comments.
2020-05-08 09:39:41 -06:00
fc0842593f USD: Export hair/particle system with name of system (and not its settings)
Particle systems have two names: the name of the particle system itself,
and the name of the particle system settings. The USD exporter used to
use the latter name, and now switched to the former. This is to be in
line with the Alembic exporter, as well as to give users more freedom in
the naming (the particle system can have a unique name but still share
settings from other particle systems).
2020-05-08 17:28:00 +02:00
d359a84430 Merge branch 'blender-v2.83-release' 2020-05-08 17:03:51 +02:00
385559843e Fluid: Adjusted secondary particles timestep and gravity options
Secondary particles are now compatible with the new gravity setup.
2020-05-08 16:59:11 +02:00
ebbaae625f Fluid: Updated Mantaflow source files
Includes more flexible options for dt, dx in secondary particles plugin.
2020-05-08 16:59:10 +02:00
Robert Guetzkow
ce76e17584 Fix T65012: Update depsgraph for matcap flipping
The matcap flipping didn't work with the workbench engine in rendered mode because
of a missing depedency graph update. This commit tags the scene id for a dependency
graph update in `toggle_matcap_flip`.

Reviewed By: fclem, sergey

Differential Revision: https://developer.blender.org/D7657
2020-05-08 16:49:54 +02:00
470cdeeae0 Fix Assert: Wireframe XRay during Sculpting
In the situation that the viewport was set to solid/texture mode and
switch to wireframe and sculpt mode, an assert was triggered in
`workbench_cache_sculpt_populate`.
2020-05-08 15:47:04 +02:00
ac9fe9c2c1 Cleanup: USD, removed unnecessary variable
No functional changes.
2020-05-08 15:41:50 +02:00
163f21db8c Cleanup: USD test, clarfied comment
No functional changes
2020-05-08 15:41:50 +02:00
c3570ab51d Cleanup: USD, made AbstractHierarchyIterator::get_writer const
No functional changes.
2020-05-08 15:10:28 +02:00
d931981d24 Cleanup: USD, added some clarifying comments
No functional changes.
2020-05-08 15:10:28 +02:00
f9d9bf41f6 Tests: Alembic, log entire command when abcls fails
This makes it easier to manually run the `abcls` when a test fails, aiding
inspection & fixing.

No function changes to actual Blender code.
2020-05-08 15:10:28 +02:00
18f833be29 Additional fix for T76426: Mantaflow Liquid - Gravity not respecting Time Scale from domain.
Removed time scale from another conversion factor. See also changes from 6400f54b4c.
2020-05-08 13:11:39 +02:00
d9a9e64e8c Cleanup: USD, refactored export graph construction
The construction of the export graph is now split into a few steps:
- Construct a `HierarchyContext` object for the to-be-exported object.
- Determine the graph index, i.e. the export-parent and the duplicator.
- Update the `HierarchyContext` object for this graph index.

This allows the upcoming new Alembic exporter to override the location of
an object in the export graph, in order to support "flattened" exports.
Aside from that, this also simply makes the code cleaner.

No functional changes.
2020-05-08 12:26:25 +02:00
163a48f203 Cleanup: Alembic, moved axis conversion functions into their own files
The long-term goal is to move code out of `abc_util.{h,cc}` into either
files with better, more concrete names, or simply into the one file
where they are used.

No functional changes.
2020-05-08 12:19:43 +02:00
298356a9c0 GPencil: Fix typo error in previous rename 2020-05-08 11:15:42 +02:00
32f7495e5a Cleanup: clang-format 2020-05-08 19:02:03 +10:00
c532c6c109 Merge branch 'blender-v2.83-release' 2020-05-08 18:57:32 +10:00
fc3cc2ca3a Merge branch 'blender-v2.83-release' 2020-05-08 18:57:29 +10:00
3daf1b151b Merge branch 'blender-v2.83-release' 2020-05-08 18:57:25 +10:00
f10fb04162 Merge branch 'blender-v2.83-release' 2020-05-08 18:57:20 +10:00
b1c4db1fbe Fix T76484: Infinite event handling when loading with load_ui=False
When loading a file from the Python console with load_ui=False,
the event was never freed from the queue causing the command
to continuously be executed.
2020-05-08 18:55:24 +10:00
a2f4d7b8a3 GPencil: Refactor - Rename modifier and shder functions
This change is to align names with changes in T76498
2020-05-08 10:34:42 +02:00
2bb9a465e6 Fix T76498: Refactoring - Rename BKE modifiers funtions 2020-05-08 10:34:35 +02:00
b4d50d3f07 Cleanup: Doxygen: fix markup warnings for links 2020-05-07 23:43:19 -04:00
34792f5e81 Cleanup: Doxygen: Remove Blank Page 2020-05-07 23:43:19 -04:00
21dd3524c0 Fix typo in recent quadric cleanup 2020-05-08 12:42:10 +10:00
eefa82a022 Cleanup: callback naming for search button & update doc-strings
Callback naming didn't always make it clear which function updated
the search contents and the function used to execute the action.
2020-05-08 12:36:35 +10:00
7f5570ceff Fix T76324: face set operators not working from Python console by default
Operators should almost always implement exec() so that they can work without
user event input. In this case there was no reason to have invoke() at all
since no event is needed.
2020-05-08 02:02:49 +02:00
2a8ba9c08e Fix T76471: timer not removed after changing file browser to another type
The file browser exit() callback was not called. RNA get functions should never
modify data, here the area type info to be changed before the screen and area
were properly updated.
2020-05-08 01:51:40 +02:00
7a4e045d8f Fix T76525: crash drawing metaballs with multiple material slots 2020-05-08 00:51:32 +02:00
c6cda3c09c Merge branch 'blender-v2.83-release' 2020-05-07 23:33:20 +02:00
e6dd29ce6e Fix T75958 Overlay: Blender Crashes when selecting without Depth Picking 2020-05-07 23:33:01 +02:00
933c721ccb Fix T76045 Gizmo: line_width does not work in latest version 2020-05-07 23:33:01 +02:00
4d5af14852 Fix T76393 Gizmo: Crash on assert(batch->program_in_use == 0)
This also fix line width support for button2D shape batch
2020-05-07 23:33:01 +02:00
04c04b6f4d Merge branch 'blender-v2.83-release' 2020-05-07 22:06:22 +02:00
05fafb05b1 Fix T76510: Eevee OpenVDB render artifacts due to texture clamping 2020-05-07 22:02:39 +02:00
b5eeef834f Fix direction of the Gizmo Extrude adjustment axis
The extrude adjustment gizmo reads the last constrained axis set.
So it is important to keep the final value actually used.
2020-05-07 16:51:51 -03:00
2f63e47931 Fix T76504: Change in behavior of constraints orientation
The Extrude operator, whose orientation is NORMAL, has undergone some seemingly accidental changes:
- In 2.79 if you press the same key as the axis in constraint, it changes from Normal to No Contraint -> Global -> Normal and repeat this.
- In 2.80 it changes from Normal to Local -> No Contraint -> Global -> Local and repeat this.

This committee resumes the behavior of 2.79
2020-05-07 16:51:51 -03:00
5473f0c49d Fix T76468: volume sequence render not using correct frame in renders
Render datablocks were copying state from original datablocks, where the frame
number and loaded volume grids were out of sync.
2020-05-07 21:14:30 +02:00
ab122c73ba Fluid: Use cached value for total time value
The old time_total initialization was in trouble if scenes made use of a variable framelength (e.g. by animating the time scale parameter).
2020-05-07 17:33:35 +02:00
6400f54b4c Fix T76426: Mantaflow Liquid - Gravity not respecting Time Scale from domain.
Removed timescale from conversion factor - factors should stay constant even if timescale changes.
2020-05-07 17:33:35 +02:00
b09189500d Refactor: libquery: Add NodeTree foreach_id support. 2020-05-07 16:54:32 +02:00
95f8f321b6 Refactor: libquery: Add Material foreach_id support. 2020-05-07 16:49:11 +02:00
339c3e3473 Fix (unreported) mistake in argument passing.
passing the address of the pointer instead of the pointer itself...
2020-05-07 16:49:11 +02:00
cb8a197bc7 Refactor: libquery: Add Mesh foreach_id support. 2020-05-07 16:49:11 +02:00
e39878b90e Initial step to move libquery to IDTypeInfo.
Part of T74960 (and hence T75724).

This commit only adds the basics helper code, and alter some internal libquery
code to use it.

Porting each IDType to the new system will be done gradually from there,
to allow better detection and handling of potential issues.

Differential Revision: https://developer.blender.org/D7598
2020-05-07 16:49:11 +02:00
c59c318f33 Cleanup: sort includes 2020-05-07 16:06:51 +02:00
82704ac3ed UI: support context menu in menu search popup 2020-05-07 23:38:44 +10:00
daf10d17f4 Cleanup: split search menu separator argument into own function 2020-05-07 23:32:14 +10:00
74c01afe22 Cleanup: split button search callbacks into their own struct 2020-05-07 23:32:14 +10:00
7181342e62 Merge branch 'blender-v2.83-release' 2020-05-07 15:14:54 +02:00
d8c3aad800 GPencil: Add support for Link Modifiers
This adds support to the Link modifiers data. This was missing.

Also I did a small cleanup using LISTBASE_FOREACH macro.

Related to T76478

Reviewed By: campbellbarton

Differential Revision: https://developer.blender.org/D7643
2020-05-07 15:12:36 +02:00
b571516237 GPencil: Include new Brush random curves
Now the brushes have several new random settings and use curves to define the effect. The curves have been moved below the parameter to keep UI standards and extra curve panels have been removed.

{F8505387}

The new curves are:

* Hue.
* Saturation.
* Value.

New option to random at stroke level instead to random at point level for the following values:

* Thickness.
* Strength.
* UV.
* Hue.
* Saturation.
* Value.

Curves have been moved below the corresponding parameter and only are displayed in properties panel. Display the curves in the popover made it unusable.

{F8505392}

Also, the Pressure random has been renamed to Radius because the old name was not clear enough.

Reviewed By: mendio, pablovazquez

Differential Revision: https://developer.blender.org/D7577
2020-05-07 15:11:16 +02:00
9b7754883b Merge branch 'blender-v2.83-release' 2020-05-07 14:40:55 +02:00
Nicolas Fauvet
1c0e22b982 VR: Fix OpenXR state freeze on Oculus after taking off HMD
With the Oculus runtime, the VR session would freeze when taking off the HMD
and putting it back on. This was caused by the deletion of graphics resources
too early in the OpenXR state machine, at least for Oculus.
The resources will now only be freed once the session is actually destroyed.

Also fixes an issue where it wasn't possible to stop the session via the UI
when the HMD was taken off.

Reviewed By: Julian Eisel

Differential Revision: https://developer.blender.org/D7635
2020-05-07 14:38:10 +02:00
Jeroen Bakker
ed1fb242a8 Fix T76469: OpenCL 1.2 Compilation
Recent changes assumed OpenCL 2.0 platform. This adds a check to see if
we are compiling on an OpenCL 2.0 platform.

Patch was tested on:
* AMD Radeon Pro WX 7100 with amdgpu-pro-19.50-1011208-ubuntu-18.04 drivers
* AMD Vega 64 with amdgpu-pro-20.10-1048554-ubuntu-18.04 drivers
* AMD RX 5700 with amdgpu-pro-20.10-1048554-ubuntu-18.04 drivers

Reviewed By: Brecht van Lommel

Differential Revision: https://developer.blender.org/D7637
2020-05-07 14:34:50 +02:00
Nicolas Fauvet
6e0540671c VR: Fix OpenXR state freeze on Oculus after taking off HMD
With the Oculus runtime, the VR session would freeze when taking off the HMD
and putting it back on. This was caused by the deletion of graphics resources
too early in the OpenXR state machine, at least for Oculus.
The resources will now only be freed once the session is actually destroyed.

Also fixes an issue where it wasn't possible to stop the session via the UI
when the HMD was taken off.

Reviewed By: Julian Eisel

Differential Revision: https://developer.blender.org/D7635
2020-05-07 14:28:28 +02:00
850a539c90 BLI: improve linear allocator documentation 2020-05-07 14:21:48 +02:00
45adcc51b2 macOS: Remove workaround for old quit dialog
Got added in 1a30e52142 (and tweaked in follow-ups) but shouldn't be needed
anymore with the newer popup based quit dialog.

It prevents Blender from quitting properly in case macOS closed all Blender
windows. This may happen in some corner-cases unfortunately (e.g. T74101) which
would be nice to have addressed at some point. Until then, users shouldn't have
to force-kill Blender to shut it down if they run into this.
2020-05-07 13:55:14 +02:00
b9491476e5 Cleanup: remove unused operator arguments to UI_popup_block_invoke_ex
Add optional can_refresh argument, useful to prevent text field
from exiting on refresh.
2020-05-07 21:38:08 +10:00
8d1e3594fe Merge branch 'blender-v2.83-release' 2020-05-07 13:24:25 +02:00
18dbc8f5c1 Resolve keymap conflict for poselib
Caused by rBe07b245fe1f4 (new 'Select Linked' posemode op).
Above commit took CTRL+L (and this is kept for consistency with other
'Select Linked' operators).

So now keymap for poselib is:
poselib browse: ALT+L (was CTRL+L -- conflict here)
poselib add pose: SHIFT+L (same as before)
poselib remove pose: SHIFT+ALT+L (was ALT+L)
poselib rename pose: SHIFT+CTRL+L (same as before)

ref. D7542
2020-05-07 13:22:13 +02:00
4f846d9d2a Merge branch 'blender-v2.83-release' 2020-05-07 12:53:19 +02:00
2a2aa6abd0 Fix T75793: Mirror modifier UV flip only works on first UDIM Tile
Was flipping around the 0-1 range, now (optionally) flip around each tile.

Also added this option for BMesh bmo_mirror.

Reviewed By: campbellbarton

Maniphest Tasks: T75793

Differential Revision: https://developer.blender.org/D7460
2020-05-07 12:48:58 +02:00
45a77ba09d Merge branch 'blender-v2.83-release' 2020-05-07 12:17:00 +02:00
3fed85f9d2 Fix T76500: Annotation Tooltip in Movie Clip Editor is using old grease pencil text 2020-05-07 12:16:33 +02:00
ebd7e87f33 Cleanup: Replace for loop with LISTBASE_FOREACH macro 2020-05-07 10:11:57 +02:00
Stefan Werner
04a3bdcc52 Blenlib: Added explicit BLI_INLINE in perlin noise.
A few tiny functions were not inlined even in some release
configurations. Added BLI_INLINE as extra compiler hint in
places that the profiler showed at hot spots when populating
geometry with hair.
2020-05-07 10:04:19 +02:00
a834c819ee GPencil: Add support for Link Modifiers
This adds support to the Link modifiers data. This was missing.

Also I did a small cleanup using LISTBASE_FOREACH macro.

Related to T76478

Reviewed By: campbellbarton

Differential Revision: https://developer.blender.org/D7643
2020-05-07 09:58:08 +02:00
b1374a8ce9 Fix menu search expanding file browser menus 2020-05-07 12:27:10 +10:00
1dced6d814 Cleanup: use eSpace_Type in switch statements
Use eSpace_Type in cases where it's likely newly added spaces
should be handled.
2020-05-07 11:15:32 +10:00
5cb143cc4c Cleanup: comments for menu search 2020-05-07 10:55:39 +10:00
d2ee2abde7 Fix uninitialized variable in recent menu search commit 2020-05-07 10:46:48 +10:00
05da8132d8 BLT: include a non-executing reference to context in macros
Prevent errors when building without translations.
2020-05-07 09:00:38 +10:00
b0f3a53989 Cleanup: missing header 2020-05-07 08:50:30 +10:00
786ff13540 Fix UI string without title-case
When using Preferences->Lights->Install, the type option in the operator
properties would show as "type", but should be "Type".
2020-05-06 23:55:14 +02:00
9605c26166 Fix Python error in scene without sequencer 2020-05-06 18:18:32 +02:00
a5ffc6309e GPencil: Split Curve geometry functions to new file
This prepare the code for future curve editors
2020-05-06 18:14:05 +02:00
3bc3b58e4c Fix build error after rBb9bb752e0e852d
This looks like a misplaced variable definition, which is then used
out of scope later.
2020-05-06 10:26:59 -04:00
43f601f1c4 Merge branch 'blender-v2.83-release' 2020-05-06 11:13:50 -03:00
c57f65c088 Fix T76440: Follow Track -> Constraint to F-Curve has no effect
Differential Revision: https://developer.blender.org/D7630
2020-05-06 11:11:32 -03:00
Juanfran Matheu
668dd146f6 Annotations: Add different arrow styles for line tool
This patch adds different kind of shapes/styles for the line extremes while using the annotation line tool.

Current Styles: (following @mendio mockup)
  - Arrow (closed arrow)
  - Open Arrow
  - Segment
  - Square
For future it would be great to have icons, it would be more intuitive (and less space) with previews of what each end / start of line does, like the google slides one as reference:

{F8511116}

Reviewed By: #grease_pencil, antoniov, HooglyBoogly

Differential Revision: https://developer.blender.org/D7608
2020-05-06 15:58:12 +02:00
969d6b157e Fix expanding time-line menus when searching 2020-05-06 22:52:52 +10:00
0f0f06645f Fix error in last commit 2020-05-06 22:52:10 +10:00
b9bb752e0e UI: search menus from all visible areas when using the edit menu
Without this, only actions in the top-bar were visible
which isn't very useful.

Now menus are extracted from the areas used in the active window,
unless this search is activated by the key shortcut,
in this case the current area is used.
2020-05-06 22:40:21 +10:00
5461c7526a Depsgraph: Fix memory leak
I introduced the issue in rBb21a3e77027.
2020-05-06 14:01:44 +02:00
578e976710 Merge branch 'blender-v2.83-release' 2020-05-06 13:25:48 +02:00
11d440f1a2 Fix T76430: Quick smoke not rendering Cycles and Eevee
Temporary fix that will skip cache invalidation from flow / effector objects.
2020-05-06 13:25:00 +02:00
f90c93b2c3 Merge branch 'blender-v2.83-release' 2020-05-06 12:40:25 +02:00
7043f8b815 Fix T76416: Armature Deform parenting option doesn't work with Grease Pencil objects
If we parent with type `PAR_ARMATURE` (where vertexgroups are already
set up and named correctly according to the corresponding bones), we
still need an armature modifier. This just wasnt added.

In contrast to meshes [which add their armature modifier early in
`ED_object_parent_set`], grease pencil used to do this (adding the
armature modifier) in `ED_gpencil_add_armature_weights`.

Now split ED_gpencil_add_armature_weights in two:
- ED_gpencil_add_armature
- ED_gpencil_add_armature_weights (which calls ED_gpencil_add_armature)
- use ED_gpencil_add_armature for the PAR_ARMATURE case

Maniphest Tasks: T76416

Differential Revision: https://developer.blender.org/D7625
2020-05-06 12:26:56 +02:00
6fdbe25094 Merge branch 'blender-v2.83-release' 2020-05-06 12:22:25 +02:00
c98240139e Fix T76470: GPencil sequence interpolate crash when not enough frames in layer
If try to interpolate a layer without an active a next frame, the interpolation failed.

Now, check for both frames before start interpolation.
2020-05-06 12:21:53 +02:00
09603401ca Cleanup: Remove unused parameter 2020-05-06 10:18:48 +02:00
f14319e2d7 Cleanup: Remove old invalid comment 2020-05-06 10:15:11 +02:00
c0bbf1553f Cleanup: move search templates into their own files 2020-05-06 16:00:09 +10:00
6fe3bbed34 Cleanup: restore text alignment lost by clang-format 2020-05-06 15:38:32 +10:00
61d35c06a1 Cleanup: use doxy sections 2020-05-06 12:45:04 +10:00
9959322d6e Merge branch 'blender-v2.83-release' 2020-05-06 12:26:01 +10:00
4dc124f642 Cleanup: warning 2020-05-06 12:25:51 +10:00
c6aa014d3a Fix T76445: Selecting an object no longer cycles past the active
In 2.79, selecting an object would cycle past the first object
even if selection cycling wasn't in use.

Restore this behavior as it wasn't intentionally removed
and it's useful to be able to select an object behind the
current active object.
2020-05-06 12:18:18 +10:00
8b74d6673a Fix num-pad access on wayland
Always interpret keypad keys as if numpad is enabled,
this matches other platforms.

Also add missing quote key.
2020-05-06 11:10:29 +10:00
Christian Rauch
4af9578ab7 Fix T76429: GHOST/Wayland event's don't correspond to physical keys 2020-05-06 10:20:32 +10:00
b0d6b03763 Merge branch 'blender-v2.83-release' 2020-05-06 08:30:37 +10:00
c0798cad02 Merge branch 'blender-v2.83-release' 2020-05-06 08:30:31 +10:00
c036ef1369 Fix T76392: Crash loading app-template with Load UI disabled 2020-05-06 08:28:20 +10:00
39ea222339 Cleanup: warnings 2020-05-06 08:18:00 +10:00
84eaaad94c Fix wrong XR notifier bit value 2020-05-05 22:56:00 +02:00
c9ff8b5cd6 Various fixes, cleanup and improvements to i18n module.
* Remove multi-processing in messages class update, was no giving much
  speedup if any at all.
* Remove some debug prints.
* Make messages class pickleable.

* Filter better actual setting values from Settings class.
* Make settings pickleable.

All this will allow to use multi-processing in the i18n addon itself.
2020-05-05 18:08:40 +02:00
527c81c6f8 Merge branch 'blender-v2.83-release' 2020-05-05 17:16:27 +02:00
e6fab27d6a Fix T75743: Implement restore for brushes that modify their own data
This implements the restore function for Draw Face Sets and Layer, which
don't affect coordinates or masks directly. This is needed for the
anchored and dot brush strokes.

Layer frees the current displacement and a new one is created on each
stroke sample. Draw Face Sets copies the data back from the first undo
node to the mesh datalayer.

Also fixes T75727

Reviewed By: jbakker

Maniphest Tasks: T75727

Differential Revision: https://developer.blender.org/D7442
2020-05-05 17:14:30 +02:00
9d8a583482 Fix T76414: crash using Python module that uses NVRTC
Hide the nvrtc* symbols just like we did for cu* already.
2020-05-05 16:01:18 +02:00
9535dbcee0 UI: Gray out shortcut indicator in search menus
In other menus we already gray out the shortcut string, just in the search menu
that wasn't the case.

We may also want to draw other hints like this in the future, e.g. the library
name for linked data-blocks in search menus. And then it's also nicer to have
it grayed out to separate it visually from the data-block name.
2020-05-05 15:37:11 +02:00
e7470c9dbe Merge branch 'blender-v2.83-release' 2020-05-05 15:14:09 +02:00
bb7a23bdff Fix build with precompiled libraries picking up OpenEXR from install_deps.sh 2020-05-05 15:06:49 +02:00
d97c83712c Cycles: mark CUDA 10.2 as officially supported
It appears to work fine after a recent bugfix and testing for the past few
weeks.
2020-05-05 15:06:49 +02:00
4e5a328e55 Tasks: support build with TBB version 2017
Make the task pool implementation compatible with older versions that are
used by install_deps.sh.
2020-05-05 14:06:08 +02:00
c54ced9f55 Build: print TBB ON/OFF state on first configure, cleanup old TBB logic 2020-05-05 14:06:08 +02:00
be498a21ed Fix T76417: Gpencil Join did not supported weight join
Now the operator keep the weights of all strokes when joining.
2020-05-05 12:51:48 +02:00
c4d50b9ed4 Merge branch 'blender-v2.83-release' 2020-05-05 19:22:31 +10:00
da48defcfa Fix T76402: App templates prevent factory settings theme reset 2020-05-05 19:20:53 +10:00
db09b57d4e Cleanup: use int instead of short for lasso array length
There was no reason to use a short here,
this was just a convention from existing code.
2020-05-05 16:26:14 +10:00
65194dc71a Cleanup: clang-format
Minor difference caused by clang-format v10.0
2020-05-05 16:06:12 +10:00
f55e92107a Cleanup: warnings 2020-05-05 16:05:51 +10:00
8217fba8c5 Merge branch 'blender-v2.83-release' 2020-05-05 13:47:10 +10:00
9b8e0c6d0f Merge branch 'blender-v2.83-release' 2020-05-05 13:47:05 +10:00
75be3bc4b9 Merge branch 'blender-v2.83-release' 2020-05-05 13:46:58 +10:00
36ad59b550 Fix T76224: Grid fill offset doesn't work
Regression in own recent commit b1037aa88f.
2020-05-05 13:13:48 +10:00
d8133b3eb9 Fix T76318: lower part of new preferences window does not work
Regression after recent changes. The precise cause is unclear to me, but
we do not need to update the size right after creating a new window.
2020-05-04 23:58:58 +02:00
ac6be6759e Fix Cycles Python error when device name is not a valid UTF-8 string
This may fix or help diagnose T76378.
2020-05-04 23:07:01 +02:00
375a50dad9 Merge branch 'blender-v2.83-release' 2020-05-04 18:18:15 +02:00
8b5868cc15 Fix T75883: Smoke simulations with Adaptive Domain broken for 'Final' bakes with OpenVDB in 2.83
Config files always use the .uni extenstion.
2020-05-04 18:16:09 +02:00
1771c7e441 Merge remote-tracking branch 'origin/blender-v2.83-release' 2020-05-04 18:08:17 +02:00
0c8b872188 Fix T76355: USD test fails in debug mode
Thanks @LazyDodo for the help!

No functional changes.
2020-05-04 18:03:19 +02:00
41da5df29b Merge branch 'blender-v2.83-release' 2020-05-04 17:49:49 +02:00
4a38a12024 Fix T76251: Animated procedural texture does not influence particle system
Dependancy missing while building depsgraph for particle systems.
fix: adding a relation texture->particles when texture has animation data.

Reviewed By: sergey

Maniphest Tasks: T76251

Differential Revision: https://developer.blender.org/D7573
2020-05-04 17:48:26 +02:00
673f44fa16 Merge branch 'blender-v2.83-release' 2020-05-04 17:40:57 +02:00
1222f561a2 Revert "Fix T76313: Redo in Multires doesn't bring back stroke made after a subdivide"
The fix was actually missing few bits:

- Firstly, the operator itself is not to do UNDO push
- Secondly, multires sculpt/top level are not pushed to the undo
  node, so undo can not happen reliably.

It should be possible to incorporate some of the work from WIP patch
for propagation undo, but it needs more work.

Reverting code base to the previous state, since currently things
are actually a bit more confusing then they used to be.

This reverts commit 0c928087a3.
2020-05-04 17:38:15 +02:00
7b35a9818c Merge branch 'blender-v2.83-release' 2020-05-04 17:17:38 +02:00
df16c23832 Add StringMap.LookupOrAdd and StringMap.LookupOrAddDefault 2020-05-04 17:12:23 +02:00
0c928087a3 Fix T76313: Redo in Multires doesn't bring back stroke made after a subdivide
Differential Revision: https://developer.blender.org/D7620
2020-05-04 17:10:16 +02:00
ba43c2a040 Windows: Silence LNK4099 warning.
Ever since debug symbols were added for release builds the linker
has been on the chatty side about symbols being missing for our
binary libs.

There's currently no plans to supply those, so best for the linker
not to warn us about them.
2020-05-04 08:29:48 -06:00
d8011902f4 Merge branch 'blender-v2.83-release' 2020-05-04 10:21:07 -04:00
133c2381ec Fix T76062: Interpolate Radius in Curve Subdivide Special Case
Differential Revision: https://developer.blender.org/D7523
2020-05-04 10:20:25 -04:00
b3553c0961 Cleanup: USD tests, use EXPECT_LT and EXPECT_FALSE where appropriate
Unfortunately there is no `EXPECT_NOT_LT`; as the `HierarchyContext` only
has an `operator<()` function, testing for `(A < B) == false` is different
than simply testing `(A >= B)`.

No functional changes.
2020-05-04 16:17:54 +02:00
37182c369a GPU: Set Default Buffer Size Immediate Mode
We set the default buffer size for strict buffers to 0. This increased
the performance on intel but reduced the performance on old AMD cards.
This patch sets back the default buffer size for strict buffers. After
testing I didn't detect a slow-down anymore.

Note that today new firmwares were pushed to the device what might fix
some issues.
2020-05-04 16:00:47 +02:00
194070e6f4 Added missing return statement
Every code path through the `fcurve_eval_keyframes_interpolate()` function
has a valid `return` statement, but in debug mode GCC still doesn't like it.
2020-05-04 15:47:33 +02:00
0a1fbfee2b Tweak the pressure/size dynamic range of Clay Strips
The current clay strips brush has a huge dynamic range which is nice for
certain effects, but in some pen tablets it is quite hard to control on
the higher values and it ends up producing unwanted artifacts. This
changes the input curves a bit in an attempt to make it more
controllable.

After adding a brush management system I will expose all these values to
be configurable per brush (the round version of clay strips is a little
bit better with different curves, but that is something that we can't
support now), but for now this default are probably safer.

Reviewed By: jbakker

Differential Revision: https://developer.blender.org/D7524
2020-05-04 15:41:28 +02:00
31ba186983 Merge remote-tracking branch 'origin/blender-v2.83-release' 2020-05-04 15:30:17 +02:00
079fc65e0a T76121 Driver depending on animated modifier property does not update
This fixes an issue where an animated modifier property that's used as
variable in a driver wouldn't animate that driver's value.

Building the relations for the driver target creates the relation
`PARAMETERS_EVAL` → `DRIVER(variable)`. Building the relations for the
FCurve targeting the modifier property creates the relation
`ANIMATION_EXIT` → `GEOMETRY_EVAL_INIT`.

This means that there is NOT a relation `ANIMATION_EXIT` →
`PARAMETERS_EVAL`, and as a result, the driver is not properly updated
when its variable reads animated data. This is resolved in this commit
by adding the missing relation.

Differential Revision: https://developer.blender.org/D7615
2020-05-04 15:29:19 +02:00
19ea4ba9c5 Fix T76399: Wrong API docs for mathutils.Vector.dot 2020-05-04 14:33:48 +02:00
d1226a6d9d Revert "Possible fix for T76113: Use GL_STATIC_DRAW in immBegin"
This reverts commit 7df51ca11a.
Did not solve the main problem.
2020-05-04 08:41:07 -03:00
6ea71cb104 Fluid: Fix for refactor 99ee1de094
Use booleans instead of 0 / 1 in Python
2020-05-04 13:39:05 +02:00
838e1f248d Nodes: add Combine Strings and Group Instance ID node UIs
Reviewers: brecht

Differential Revision: https://developer.blender.org/D7494
2020-05-04 12:49:25 +02:00
9adb81f584 Modifiers: Rename Simulate category to Physics
While the name "Simulate" might be more accurate, there is
a naming collision with the new modifier added in D7549.
Therefore, we decided to rename the category for now.
2020-05-04 12:24:12 +02:00
9eb46d6c29 Cleanup: rename mcords to mcoords
- 'coords' is an abbreviation for coordinates, not 'cords'.
- Rename 'moves' to 'coords_len'.
2020-05-04 19:50:06 +10:00
2addc868de Cleanup: pass ARegion, View2D as const 2020-05-04 19:32:59 +10:00
411c5238a2 UV: support edge-selection for box/circle/lasso select 2020-05-04 19:20:08 +10:00
88b9505b84 BLI: simplify memory management in OpenAddressingArray 2020-05-04 11:11:46 +02:00
fdebdfa320 Cleanup: rename uv_sel_co_from_eve, pass in UV layer offset 2020-05-04 17:08:57 +10:00
a9ef6d5ad7 Cleanup: replace UV_SELECT_ISLAND_LIMIT macro with a function
Also make return argument last for uvedit_pixel_to_float.
2020-05-04 17:00:11 +10:00
b048272825 Cleanup: split selection operations into uvedit_select.c 2020-05-04 16:59:35 +10:00
b84c380aaa Merge branch 'blender-v2.83-release' 2020-05-04 08:24:08 +02:00
000fdd8a6e GPencil: Fix Chisel Brush pressure
In previous commit the pressure was disabled by error.
2020-05-04 08:23:27 +02:00
7b9d6ef2b6 Cleanup: use ELEM macro 2020-05-04 14:03:41 +10:00
33bdd91fb8 Windows: Move tbb to being dynamic library
Static tbb has always been frowned upon [1] sofar it has worked for us but
given our reliance on tbb is about to increase (D7475), I'd like to move the library
to more supported configuration. Which means moving it to be a dynamic library

The libs part of this change is in rBL62416

Reviewed By: Brecht

Differential Revision: https://developer.blender.org/D7570
2020-05-03 16:25:56 -06:00
70fe988dc4 Fluid: Cleanup use of std in MANTA wrapper
Moved std namespace to beginning of class.
2020-05-03 21:10:52 +02:00
82f9ed9305 Fluid: Cleanup in main MANTA wrapper
Use shorter variable names.
2020-05-03 21:10:52 +02:00
99ee1de094 Fluid: Refactored 'Modifier Data to Python' value transfer function
This function needed a bigger cleanup, especially after the problem from T76276.
2020-05-03 21:10:51 +02:00
57cfa8e2d0 Merge branch 'blender-v2.83-release' 2020-05-03 20:42:37 +02:00
331bf04fad GPencil: Hide Canvas Grid when Surface or Stroke mode is enabled
This was introduced by error during refactor. The grid must not be visible in these modes.
2020-05-03 20:42:18 +02:00
bbfae8f184 Merge branch 'blender-v2.83-release' 2020-05-03 20:35:30 +02:00
a577291b03 Fix T76364: GPencil grid is not located in the right place
During the refactor, the location of the grid was broken. Now, the grid is in Object origin or 3D cursor origin as it was in 2.82.
2020-05-03 20:34:48 +02:00
ff8288ad1e Windows: Replace BLI_File* calls with system calls in system_win32.c
Using BLI calls in this file triggered a condition where
poorly modelled dependencies in cmake (ie bf_blenlib using
zlib headers but not linking the libraries) leading to
linker error in debug builds of some of the tests.

This diff sidesteps the dependencies issue by using native
calls rather than BLI calls to check if a file exists and
what its size is. Effectively sweeping the issue right back
under the rug where I found it.

The best solution would be to audit all libraries and ensure
they have proper link requirements set, but that requires
significantly more time than I have available right now.
(zlib in blenlib was one of them and would have been easy
to fix, but there were others that required more work)

The alternative is tests that fail to build which worse.

I'll revisit this and fix it properly but for now this will
have to do.
2020-05-03 12:07:22 -06:00
fe891d581d Audaspace: update from upstream
- Changing API for time values from float to double for better precision.
- Fixing minor mistakes in the documentation.
- Fixing minor unnecessary large memory allocation.
2020-05-03 15:30:35 +02:00
2b7d5caae8 Merge branch 'blender-v2.83-release' 2020-05-03 13:34:55 +02:00
1a6119c8e4 GPencil: More changes to improve Chisel brush
More small tweaks to get the right "feeling" when drawing.

The defaults has been tested by @pepeland.
2020-05-03 13:34:35 +02:00
6a0cb48149 GHOST: cleanup platform checks, fix Wayland + X11
- Building with Wayland + X11 missed an exception include.
- Move HEADLESS check first, since it's the same on all platforms.
2020-05-03 20:24:24 +10:00
a6380d063f Cleanup: store BLF buffer size in a variable 2020-05-03 18:10:25 +10:00
ccaab72685 BLF: use 'int' for internal glyph x,y bearing
These were stored as float but were originally cast from an int
and were often cast back to int.

Also use int pairs for dimensions values.
2020-05-03 18:01:20 +10:00
Harley Acheson
5366eb89c6 UI: improve widget text cursor position
Use BLF_boundbox_foreach_glyph for more accurate cursor placement.
2020-05-03 17:08:05 +10:00
0d65520f05 BLF: add new arguments to BLF_GlyphBoundsFn
- glyph_bounds: to get the character width.
- glyph_bearing: lower left character starting point.

These values are needed for more precise glyph calculations.
2020-05-03 16:51:34 +10:00
d388c1c524 Cleanup: sort file lists 2020-05-03 13:45:40 +10:00
76be35efb2 Cleanup: clang-format 2020-05-03 13:42:49 +10:00
b64fdbfb98 Cleanup: remove unused alpha argument 2020-05-03 13:40:56 +10:00
6408cd00c5 Annotations: Remove old unused code
This code was part of the old grease pencil when annotations was not a separated module.
2020-05-02 18:01:58 +02:00
7df51ca11a Possible fix for T76113: Use GL_STATIC_DRAW in immBegin
This fixes a freeze when closing temporary windows with `AMD Radeon HD 7570M`
The performance is practically the same between calls (with a micro advantage for `GL_STATIC_DRAW`)
I couldn't check the difference in memory usage.
The ideal would be profile in different setups.
But due to the seriousness of the bug, these tests were postponed.
2020-05-02 10:21:38 -03:00
5ef94c9c41 Merge branch 'blender-v2.83-release' 2020-05-02 13:35:19 +02:00
1623fdb3bc Cleanup: Fix return NULL from bool type function 2020-05-02 13:33:23 +02:00
719cff1414 Merge branch 'blender-v2.83-release' 2020-05-02 10:48:15 +02:00
cfdff4fb63 GPencil: Improve Market Chisel angle algorithm
With the previous commit, the angle effect was too subtle. Now the effect is more visible,
2020-05-02 10:47:45 +02:00
03b911dd87 Merge branch 'blender-v2.83-release' 2020-05-01 22:12:47 -06:00
e590199949 Revert "Outliner: Fix selection sync for various operators"
This reverts commit 92d62148be.

When merging in from blender-v2.83-release the merge was somehow rebased
after viewing the log.
2020-05-01 22:10:46 -06:00
92d62148be Outliner: Fix selection sync for various operators
Add missing outliner selection sync tagging for various non-outliner
operators.
* Curve separate
* Grease Pencil separate
* Mesh separate
* Make instances real
* 3D view paste
* Sequencer paste
* Armature delete, dissolve, separate, duplicate, subdivide, extrude,
  click extrude, primitive add
* Pose Group select, delete

Resolves T71404
2020-05-01 21:42:56 -06:00
c06a40006d Outliner: Fix selection sync for various operators
Add missing outliner selection sync tagging for various non-outliner
operators.
* Curve separate
* Grease Pencil separate
* Mesh separate
* Make instances real
* 3D view paste
* Sequencer paste
* Armature delete, dissolve, separate, duplicate, subdivide, extrude,
  click extrude, primitive add
* Pose Group select, delete

Resolves T71404
2020-05-01 21:13:19 -06:00
83304e4c22 Merge branch 'blender-v2.83-release' 2020-05-01 23:55:13 +02:00
7212dbd7be Fix T76062: Interpolate Radius in Curve Subdivide Special Case
Differential Revision: https://developer.blender.org/D7523
2020-05-01 16:49:36 -05:00
bba11c68c4 Fix T75995: Cycles render artifacts with overlapping volumes
This is a workaround, but a proper solution requires significant changes to
ray intersection in the kernel.
2020-05-01 23:42:42 +02:00
447a7f510e Fix T76309: changing AOV type does not update compositor socket 2020-05-01 23:10:45 +02:00
433eaffd55 Fix some LLVM symbols outside of the llvm namespace being public on Linux
This may help with T68052, crashes with Intel NEO OpenCL driver.
2020-05-01 22:59:01 +02:00
805a78e396 Cleanup: compiler warning with clang 10 2020-05-01 22:58:57 +02:00
06839379c5 Transform: Allow orientation change with custom matrix in modal 2020-05-01 17:41:06 -03:00
Nikhil Shringarpurey
51aa0ea58f Fx build error with MSBuild on Windows
Differential Revision: https://developer.blender.org/D7587
2020-05-01 22:03:26 +02:00
87602d886f Merge branch 'blender-v2.83-release' 2020-05-01 21:28:55 +02:00
Richard Antalik
98990f6ba4 Fix T76033: VSE crash with prefetch, disk cache and meta strips
`BKE_sequencer_prefetch_get_original_sequence()` didn't look in metas
and returned NULL. This caused crash in disk cache that was trying to
read seq->name.

Add function that will look in meta strips recursively and condition
that seq must not be NULL.

Reviewed By: brecht

Maniphest Tasks: T76033

Differential Revision: https://developer.blender.org/D7597
2020-05-01 21:22:04 +02:00
b52b5e15af Outliner: Fix selection extend not toggling
An unintentional side-effect of rBfe7528ee919b was that when
extend-selecting a selected element in the outliner, it would be
deselected and activated rather than selected and activated.

This commit restores the expected toggling behavior. Consistent behavior
for extend-selecting child datablocks is not resolvable without a much
larger cleanup of the outliner select functions.
2020-05-01 13:01:31 -06:00
9ca78c9bcc Fix for T76281: Engine Info Overlay Formatting
Allow render engine info to display correctly among other text overlays and scene statistics.

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

Reviewed by Brecht Van Lommel
2020-05-01 10:30:38 -07:00
eddddceb8e Merge branch 'blender-v2.83-release' 2020-05-01 19:17:29 +02:00
716638458d GPencil: Fix unreported noise using Market Chisel pen
The interpolated points recalculated the angle again and this added noise. The angle must not be calculated and must use the previous thickness.
2020-05-01 19:17:04 +02:00
57d1db27c7 Cleanup: Animation, refactored FCurve interpolation
Early returns are used to heavily reduce code indentation and clean up
some code flow.

No functional changes.
2020-05-01 17:37:28 +02:00
5b6ee80351 Cleanup: Animation, split FCurve interpolation into separate function 2020-05-01 17:37:28 +02:00
9c2c697011 Tracking: Cleanup, localize variable
Also avoid possible accumulation of floating point error.
2020-05-01 16:13:10 +02:00
b22abd112d Tracking: Cleanup, localize iterator variables 2020-05-01 16:13:10 +02:00
60741cfe18 Fix: Fix build error on windows
Headers and implementation had slightly different signatures
2020-05-01 08:06:34 -06:00
b83a8d6fc4 Cleanup: Animation, unify FCurve extrapolation
Previously there were two functions for FCurve extrapolation, one for
before the first keyframe, and the other for after the last. After the
previous cleanup made the variable names consistent, it was clear that
the code was almost identical. The biggest difference was in the sign of
many of the calculations, which was cancelled out by swapping `B-A` to
`A-B`. This showed that the computations are actually the same, and the
only remaining difference was which neighbouring handle to use in case
of Bézier curves.

No functional changes.

# Conflicts:
#	source/blender/blenkernel/intern/fcurve.c
2020-05-01 15:38:45 +02:00
f651548c2e Cleanup: Animation, refactored FCurve extrapolation
Variables have been renamed so that they refer to the endpoint and its
neighbor (rather than `bezt`, `prevbezt`, or `lastbezt`), and
unnecessary variables have been removed. By returning early the code
flow is also easier to understand.

No functional changes.
2020-05-01 15:38:45 +02:00
75370684fa Cleanup: Animation, split FCurve extrapolation into separate functions
The `fcurve_eval_keyframes` consists of three parts:
- Before the first keyframe
- After the last keyframe
- Between the keyframes

This commit splits the first two parts into separate functions. This is
the first of a series of refactors, which will be committed into smaller
parts so that each is easier to follow & validate.

No functional changes.
2020-05-01 15:38:45 +02:00
b523911e86 Windows: Support backtraces on release builds.
This diff add supports for crash logs on windows for
release builds. This can be toggled on/off with the
`WITH_WINDOWS_PDB` cmake option. by default it is on.

Things to take into consideration:

Release builds are hightly optimized and the resulting
backtraces can be wrong/misleading, take the backtrace
as a general area where the problem resides rather than
an exact location.

By default we ship a minimized symbol file that can only
resolve the function names. This was chosen to strike
a balance between growth in size of the download vs
functionality gained. If more detailed information is
required such as source file + line number information
a full pdb can be shipped by setting `WITH_WINDOWS_STRIPPED_PDB`
to off.

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

Reviewed by: brecht
2020-05-01 07:37:48 -06:00
4cc8123377 UI: Use property split layout and decorators for material properties
Use the automatic property split layout (hence, change to the new 40/60% split
ratio) and add decorator buttons for animatable properties.
This actually applies to all node input buttons in the properties, e.g. world shading,
light shading, texture nodes.

Doing this makes the layout more consistent with other layouts in the
properties. But the decorators are also a useful hint for users that these
options can be animated. Previously using decorators and the automatic split
layout wasn't possible, I've done a number of changes now to have it supported.
Before I moved the socket icons to the left side, the decorators also looked
weird (two circle icons next to each other).

{F8497704} With nested items: {F8497708}

Reviewed By: William Reynish, Pablo Vazquez

Differential Revision: https://developer.blender.org/D7544
2020-05-01 15:21:41 +02:00
2188175891 Transform: Invert shear direction aligned to view
Issue introduced in rBc57e4418bb85.
2020-05-01 10:00:13 -03:00
d49b148459 Revert "Improve proportional edit drawing"
Accident!

This reverts commit ae049a6c6a.
2020-05-01 09:35:29 -03:00
185e1d5395 Fix T76254: 'Normal' Transformation Orientation using Global
Issue introduced in rBc57e4418bb85.
2020-05-01 09:32:22 -03:00
ae049a6c6a Improve proportional edit drawing
(This is a simplified version of D4786)

The advantage of highlighting the points would be to indicate more
clearly what is affected by the proportional edit.

The default circle is not so informative and sometimes it is even off
screen so the user loses the quick identification of the influence.
(See T75482)

The disadvantage of this design is that the points could end up hiding
the mesh.

The original patch added the option `draw_proportional_gradient`, but I
prefer to avoid adding more options and more information to the
interface.

I'm not sure if the advantages outweigh the disadvantages.

{F8504097}

Reviewers: #user_interface, #modeling

Subscribers:
2020-05-01 09:32:22 -03:00
aa72e3abf9 Cleanup: moved drivers to BKE_fcurve_driver.h / fcurve_driver.c
All the driver-specific code in `fcurve.c` has been moved into a new file
`fcurve_driver.c`. The corresponding declarations have been moved from
`BKE_fcurve.h` to `BKE_fcurve_driver.h`.

All the `#include "BKE_fcurve.h"` statements have been investigated and
replaced with `BKE_fcurve_driver.h` where necessary.

No functional changes.
2020-05-01 13:08:22 +02:00
28bdf669a9 Fix: added missing buildinfo to BKE_fcurve test 2020-05-01 12:45:53 +02:00
d7d140ec7f CMake: add WITH_GHOST_X11 option
- Support building only with Wayland.
- In this case, show useful error messages
  when Wayland fails to load.
2020-05-01 20:07:01 +10:00
9a4844cfdb Tests: Animation, added unittests for FCurve evaluation
This introduces unittests for FCurve evaluation.

No functional changes to actual Blender code.

Differential Revision: https://developer.blender.org/D6778
2020-05-01 11:56:59 +02:00
d1c0d77e18 Merge branch 'blender-v2.83-release' 2020-05-01 11:47:55 +02:00
Demeter Dzadik
b2d850efc0 Cleanup: Solidify modifier: Remove unneccessary error message.
For any modifier, the expected output when the input mesh is empty, is an
empty mesh. So this error message was useless, and could spam the
console in some usecases of the modifier stack...

Reviewed By: weasel, mont29

Differential Revision: https://developer.blender.org/D7571
2020-05-01 11:41:38 +02:00
e28d2e5184 Cleanup: duplicate include, define from Wayland patch 2020-05-01 19:28:43 +10:00
7ded7610ce Cleanup: rename WITH_X11 to WITH_GHOST_X11
Matches WITH_GHOST_{SDL|WAYLAND}
2020-05-01 19:14:50 +10:00
47fea20dc8 GHOST: set the window state on wayland startup 2020-05-01 18:43:11 +10:00
d602af73d3 WM: remove X11 hard coded window size workaround
Causes issues with Wayland and is no longer required for Gnome/KDE.
2020-05-01 18:43:00 +10:00
aff5e18adb Cleanup: replace inline dot-product with dot_v4v4 2020-05-01 15:05:39 +10:00
ff1174e52c Cleanup: improve readability for color assignment 2020-05-01 15:05:25 +10:00
a6fbd4c9c8 Cleanup: pass const arguments to texture functions 2020-05-01 14:40:35 +10:00
b7117b5728 Cleanup: avoid returning a bit-flag as a float
Texture functions were returning a float which was cast back to an int
to use as a flag.
2020-05-01 14:19:04 +10:00
f7d98d3582 Cleanup: rename externtex to RE_texture_evaluate
- Pass in return arguments last.
- Pass in RGBA as a vector.
- Use boolean return argument.
2020-05-01 14:03:12 +10:00
635754a876 Cleanup: use sections for outliner sources 2020-05-01 13:27:20 +10:00
5ee1c7f695 Cleanup: spelling, comments 2020-05-01 12:36:19 +10:00
0cb53d4740 Cleanup: warnings 2020-05-01 12:34:43 +10:00
7a809a7504 Curve: Force pretesselate modifier to output a Mesh output
This is to improve the case of T71055 where curves share the same batch
cache when they shouldn't.

This however, does not help to fix edit mode display.

The real fix would be to have a similar handling to what the mesh modifiers
do and duplicate the whole Curve data. But this is too much work/change for
the 2.83 release.

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D7569
2020-05-01 00:07:38 +02:00
4d790516fb Curve: Force pretesselate modifier to output a Mesh output
This is to improve the case of T71055 where curves share the same batch
cache when they shouldn't.

This however, does not help to fix edit mode display.

The real fix would be to have a similar handling to what the mesh modifiers
do and duplicate the whole Curve data. But this is too much work/change for
the 2.83 release.

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D7569
2020-05-01 00:03:28 +02:00
03f4d20bcf Revert "Windows: Support backtraces on release builds."
Issues with older cmake.
2020-04-30 14:00:11 -06:00
Israel Medina
99cb6dbe65 VSE: Add frame interpolation option to speed effect
Do cross transition from current to next frame instead of displaying
one image for n frames.

Reviewed By: ISS, sergey, campbellbarton

Differential Revision: https://developer.blender.org/D7417
2020-04-30 21:51:22 +02:00
1d63db2044 Fix: Windows build bot script error
Partial revert of D7520
2020-04-30 13:34:11 -06:00
1960b8a361 UI: Fix animating panels after drag changing region size
The previous commit for this issue, 8e08d80e52, missed the case
where the panel animates to its aligned position when the mouse is
released.
2020-04-30 14:21:14 -05:00
713ad9d971 Fix T76276: Compiler Error C1061 due to too many nested if/else in MANTA_main.cpp
The compiler error should be fixed by removing the 'else if' blocks. However, this function should still be refactored in the future.
2020-04-30 20:54:53 +02:00
d8abef6d7c clean-up: Remove left over debug print. 2020-04-30 12:54:32 -06:00
f90a716e68 Windows: Support backtraces on release builds.
This diff add supports for crash logs on windows for
release builds. This can be toggled on/off with the
`WITH_WINDOWS_PDB` cmake option. by default it is on.

Things to take into consideration:

Release builds are hightly optimized and the resulting
backtraces can be wrong/misleading, take the backtrace
as a general area where the problem resides rather than
an exact location.

By default we ship a minimized symbol file that can only
resolve the function names. This was chosen to strike
a balance between growth in size of the download vs
functionality gained. If more detailed information is
required such as source file + line number information
a full pdb can be shipped by setting `WITH_WINDOWS_STRIPPED_PDB`
to off.

The Release in the title of this diff refers to the
release build type, not the official blender releases.

Initially this will only be enabled for nightly build
bot versions of blender, official releases as of now
will not ship with symbols.

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

Reviewed by: brecht
2020-04-30 12:41:16 -06:00
Julian Eisel
8e08d80e52 Fix dragging panels changing region size
While dragging panels, the region size would change which would feel glitchy.

See D7462 for a demo of the issue.
2020-04-30 19:20:01 +02:00
d44f323df5 Fix crash when switching subdivision level in Multires
When using multires_reshape_context_create_from_ccg to create the
context mmd is null, so the subdivision smooth mode can't be checked
there.

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D7579
2020-04-30 18:43:59 +02:00
38456d3e82 Cleanup: Fix compiler warning 2020-04-30 18:10:23 +02:00
31d3f034ab Fix T76097: Simulations don't take animated gravity into account
Together with 21485e94aa this commit should fix the issue with animated gravity values.
2020-04-30 18:09:05 +02:00
4612ca3ede Cleanup: simplify a bit libquery code. 2020-04-30 18:01:47 +02:00
f4b020eec3 Merge branch 'blender-v2.83-release' 2020-04-30 17:57:46 +02:00
f5237f7704 Fix long OptiX BVH build times in Cycles with many objects
Looping over all primitives for every object is really slow, so this patch avoids that by moving
the necessary assignments inline with the primitive merging done for every geometry.
2020-04-30 17:57:01 +02:00
21485e94aa Fluid: Refactored fluid gravity settings
Refactored setup that converts from Blender to Mantaflow units.
2020-04-30 17:33:22 +02:00
c4a850b7c2 Updated Mantaflow source files 2020-04-30 17:33:22 +02:00
e7e6b02ed9 Fluid: Minor cleanup and sanity checks 2020-04-30 17:33:22 +02:00
713b4c10a6 UI: Statistics Visual Changes
Improving scene statistics readability, and showing objects count while in Edit mode.

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

Reviewed by Campbell Barton
2020-04-30 08:16:33 -07:00
134619fabb Multires: Subdivide Simple and Subdivide Linear
This introduces two alternative subdivision modes that generates
displacement on the grids that look as Simple subdivisions but while
using the Catmull-Clark subdivision type in the modifier. This way,
Simple and Catmull-Clark subdivision can be combined when creating new
levels if needed, for example, to sculpt hard surface objects.

Subdivide simple smooths the sculpted data when creating a new
subdivision level. Subdivide linear also preserves the sharpness
in the sculpted data.

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D7415
2020-04-30 16:57:29 +02:00
f28875a998 Multires: Unsubdivide and Rebuild Subdivisions
This implements the main unsubdivide algorithm which rebuilds a base mesh and extracts the grid's data from a high resolution mesh.
It includes the Rebuild Subdivisions operator, which generates all subdivision levels down to the level 0 base mesh.

It supports:
- Rebuilding an arbitrary number of levels (Unsubdivide) or as many levels as possible down to level 0 in a single step (Rebuild Subdivisions).
- Rebuilding with already existing grids.
- Meshes with n-gons and triangles
- Meshes with more than 2 faces per edge
- Base mesh made completely out of triangles
- Meshes without poles
- Meshes with multiple disconnected elements at the same subdivision level

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D7372
2020-04-30 16:49:56 +02:00
d4c547b7bd Multires: Enable sculpting in all subdivision levels
Return the correct sculpt level in BKE_multires_sculpt_level_get and
enable the property in the UI

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D7575
2020-04-30 16:45:01 +02:00
6a7e9f2b76 GPencil: Add material selector to context menus
Now it's possible to select the material in context menu and new menu to select material.

The patch and workflow  has been tested in greasepencil-object branch.

* New Material selector in Draw mode Context menu:

{F8499259}

* Pressing `U`key in Draw mode display material menu.

{F8503224}

Reviewed By: mendio, pepeland

Differential Revision: https://developer.blender.org/D7554
2020-04-30 16:13:23 +02:00
dc0a564c06 Merge branch 'blender-v2.83-release' 2020-04-30 15:55:35 +02:00
9ee7fc15af Fluid: Removed domain size option from diffusion panel
Domain size parameter no longer needed (unsed right now). Domain size is directly taken from object.
2020-04-30 15:42:44 +02:00
4d63dfca4c Fluid: Reset noise emission value at the beginning of an adaptive frame
Emission values should not accumulate beyond one frame, only during the adaptive steps of one frame.
2020-04-30 15:42:44 +02:00
6121c28501 Fix T75895: Unable to Compile Cycles on NAVI/Linux
This patch will add some compiler hints to break unrolling in the
nestled for loops of the voronoi node.

Reviewed by: Brecht van Lommel

Differential Revision: https://developer.blender.org/D7574
2020-04-30 15:04:40 +02:00
7163e159c5 UI: add all operators to search menu when developer extras is enabled
This allows developers to easily access operators they're working on,
without having to add them to the interface first.
2020-04-30 21:54:50 +10:00
ea77584d36 Fix orientation change in Redo
Some transform redo operations require contraint to be enabled.
Issue introduced in rBc57e4418bb85.
2020-04-30 08:52:38 -03:00
41b45d9159 Fix T76260: Inverted rotation in non-3d views
Issue introduced in rBc57e4418bb85.
2020-04-30 08:38:18 -03:00
ae98a033c8 Outliner: Add new delete operator
In the industry standard keymap, both deleting objects and collections
were mapped to the same keys causing confusion when only collections
could be deleted through the keymap.

This adds a new delete operator to delete all selected objects and
collections, accessible from both the keymap and context menu. Now any
selected objects and collections are deleted when Delete is chosen from
the keymap. This also updates the tooltip description which was
previously undocumented.

Resolves T67462
2020-04-30 19:53:36 +10:00
79269e4237 Merge branch 'blender-v2.83-release' 2020-04-30 10:48:09 +02:00
36bf067ddc Fix T76236: GPencil drrawing resetting posed positions with armature after layer renaming
The datablock was not tagged for updating.
2020-04-30 10:47:39 +02:00
7f4c4011ce Cleanup: replace unordered_map with switch statement
Was performing 2x look-ups, checking keys doesn't benefit noticeably
from hash look-ups.
2020-04-30 17:56:51 +10:00
328da12598 Merge branch 'blender-v2.83-release' 2020-04-30 09:55:31 +02:00
2b094be949 Fix T75985: Texture paint brush gradients results in wrong color
A Colorband's CBData color **is not** considered `PROP_COLOR_GAMMA`.
A Brushes color **is** considered `PROP_COLOR_GAMMA`.
(PROP_COLOR_GAMMA is used for colors which would be color managed before
display, could be renamed to something better once...)

This leads to different rgb values in ColorBand.CBData of br->gradient
and brush->rgb for seemingly identical colors. (this is because color
pickers do differently in case block->is_color_gamma_picker/
ui_but_is_color_gamma)

Now it looks like `paint_brush_color_get` is expected to return a color
in sRGB (according to @jbakker this is for legacy reasons) so we need to
run the colorband colors through linear -> sRGB.

It might very well be the case that a much deeper cleanup in this area
is needed, this is just a fix to get gradient brush colors
consistent again...

Maniphest Tasks: T75985

Differential Revision: https://developer.blender.org/D7501
2020-04-30 09:54:09 +02:00
02c77e4e5c Fix animation player checkerboard drawing with alpha channels
Was using uninitialized theme values.
2020-04-30 17:45:02 +10:00
070bf01d37 GHOST: fix WITH_GHOST_DEBUG option
Changing the order of include changes broke GHOST_DEBUG,
however it was using defines in a fragile way.

Fix by removing 'GHOST_DEBUG' and use 'WITH_GHOST_DEBUG' which
was already defined by CMake.
2020-04-30 17:28:28 +10:00
52186a39af Cleanup: printf warning 2020-04-30 17:28:28 +10:00
e1d4c3bc36 Cleanup: clang-format 2020-04-30 17:28:28 +10:00
040e98dfc9 Cleanup: unused variable warnings 2020-04-30 17:28:28 +10:00
d8a3f3595a Task: Use TBB as Task Scheduler
This patch enables TBB as the default task scheduler. TBB stands for Threading Building Blocks and is developed by Intel. The library contains several threading patters. This patch maps blenders BLI_task_* function to their counterpart. After this patch we can add more patterns. A promising one is TBB:graph that can be used for depsgraph, draw manager and compositor.

Performance changes depends on the actual hardware. It was tested on different hardwares from laptops to workstations and we didn't detected any downgrade of the performance.
* Linux Xeon E5-2699 v4 got FPS boost from 12 to 17 using Spring's 04_010_A.anim.blend.
* AMD Ryzen Threadripper 2990WX 32-Core Animation playback goes from 9.5-10.5 FPS to 13.0-14.0 FPS on Agent 327 , 10_03_B.anim.blend.

Reviewed By: brecht, sergey

Differential Revision: https://developer.blender.org/D7475
2020-04-30 08:09:21 +02:00
a18ad3c3b6 CMake: use system include for generated headers 2020-04-30 16:01:41 +10:00
66e70fe299 GHOST: initial Wayland support
Usable with the CMake option 'WITH_GHOST_WAYLAND'

The following functionality is working:

- Building with X11 and Wayland at the same time,
  wayland is used when available.
- Keyboard, pointer handling.
- Cursor handling.
- Dedicated off-screen windows.
- Drag & drop.
- Copy & paste.
- Pointer grabbing.

See D6567 for further details.
2020-04-30 14:21:50 +10:00
00e0034b13 Merge branch 'blender-v2.83-release' 2020-04-29 21:38:18 +02:00
cd833d8879 Readfile: debug check all IDs are properly linked at the end.
Should prevent issue fixed by previous commit to happen again (since
read code, especially in undo case, is not really straight forward to
follow anymore).
2020-04-29 21:35:13 +02:00
d07dab0d61 Fix T76225: Cycles View layer filters are grayed out while still working
Mistake in rB7fc60bff14a6.

Maniphest Tasks: T76225

Differential Revision: https://developer.blender.org/D7566
2020-04-29 19:25:17 +02:00
a54c1f1e77 Fix T76155: 'Object lost data' on copy-pasting with new undo code. 2020-04-29 18:11:33 +02:00
7f5367eaae Windows: Fix RelWithDebInfo missing symbol information
issue introduced in rB55a2682348df94d0ff2f57d786b7a557312d0345
2020-04-29 09:17:34 -06:00
080732ae5c Fix crash with Orbit Around Selection
Missing check of `NULL` `op` introduced in rBc57e4418bb85.
2020-04-29 12:12:28 -03:00
b7bcd0a87c Tracking: Implement Nuke/Natron distortion model
Neither Nuke nor Natron support OpenCV's radial distortion model
which makes it impossible to have any kind of interoperability.

The new model is available under the distortion model menu in Lens
settings.

Differential Revision: https://developer.blender.org/D7484
2020-04-29 16:39:30 +02:00
0ddf5860f5 Fix Python bz2 module failing to import on older macOS versions
Found by failing bundled modules test. The bz2 library was compiled without
proper minimum SDK version flags.
2020-04-29 16:25:46 +02:00
6c4ef6159c Fix T71334: top part of render window disappears on repeated renders 2020-04-29 14:56:17 +02:00
0cfd2d6f4b VR: Reset pose offsets when changing base pose
The offsets are applied after toggling positional tracking off, so that
the view does not jump at that moment. But when changing the base pose,
keeping that offset doesn't make sense. Especially with landmarks, which
are supposed to give precise positions/rotations to jump to. For that
part the VR Scene Inspection Add-on will need a little adjustment
though.

Also exposes an explicit function to the Python API to reset the
offsets, to be used by the Add-on.

This is mostly untested since I don't have access to an HMD currently.
2020-04-29 13:53:25 +02:00
c57e4418bb Transform Orientation Refactor
- Use `t->spacemtx` as the orientation matrix instead `t->orient_matrix`.
- Unify constraint behavior between modal and non-modal.
- Simplify code to remove old workarounds and rearrange struct members.

This fix T66142 since the actual `orient_type` (in the case
`V3D_ORIENT_NORMAL`) is used during Redo instead of always using
`V3D_ORIENT_CUSTOM_MATRIX`).

Differential Revision: https://developer.blender.org/D7469
2020-04-29 08:07:25 -03:00
980cebc459 Merge branch 'blender-v2.83-release' 2020-04-29 11:44:56 +02:00
157f836493 Depsgraph: use native BLI data structures in registry
Reviewers: sergey

Differential Revision: https://developer.blender.org/D7559
2020-04-29 11:37:19 +02:00
2845b232a7 Fix T75522: Math node truncate operator tooltip provides no explanation 2020-04-29 11:36:20 +02:00
657188c1a2 Merge branch 'blender-v2.83-release' 2020-04-29 11:25:08 +02:00
08048f7cce Fix T75810: Child bone frozen when both Auto IK and X-Axis mirror are
used

Caused by {rBa6a9a12e8f32}

Other relevant commits:
rBb8ca806b7798e2f8dd6effca8f0d081b3cd8c23f
rBde530a95dc7b482dc22c933b9b8b2a98c79b5663

The issue is caused by some leftover BONE_TRANSFORM_MIRROR flags on a
bone from previous runs (file in the report had the flag still on
forearm.R).

With these false leftover flags still set, `pose_grab_with_ik()` cannot
work correctly. Culprit commit above removed the early clearing of this
flag on all bones, this should be restored [this happened in
`count_set_pose_transflags()`].

This should only be done in the beginning of the transform process, so
now still clear the flags early in 'createTransPose()' [but dont restore
this in 'count_set_pose_transflags()' -- this will be called from
special_aftertrans_update again, so placing the clearance here only
complicates things (autokeyframe_pose() still needs to work as well)...]

Maniphest Tasks: T75810

Differential Revision: https://developer.blender.org/D7527
2020-04-29 11:18:38 +02:00
fed5e0ca04 Merge branch 'blender-v2.83-release' 2020-04-29 11:10:24 +02:00
e07b245fe1 Armature posemode: add mouse independent "Select Linked" operator
The current "Select Linked" operator works based on mouse position and
makes no sense to call from the menus and was removed in rB536055e1ee0b.

This patch adds an operator independent from mouse position that just
selects all bones in relation to selected bones (and adds back menu
entries, adds keymap entry CTRL+L).

The original operator is renamed to 'select_linked_pick' internally
(this is now more in line to how "Select Linked" works for meshes,
curves etc)

ref T76071

Maniphest Tasks: T76071

Differential Revision: https://developer.blender.org/D7542
2020-04-29 11:06:41 +02:00
cedf9f5cb7 Fix/cleanup: lib_query: missing case handling of new ID_SIM type.
Also update comments.
2020-04-29 11:05:45 +02:00
9a9ecad65f Merge branch 'blender-v2.83-release'
Conflicts:
	source/blender/blenkernel/intern/lib_query.c
2020-04-29 10:57:47 +02:00
afeddd42e6 Cleanup: use LISTBASE_FOREACH iterator everywhere possible in libquery.
Done also in 2.83 release branch to avoid too much conflicts on merging
(some of those were already done for nodes in master, and gave me
conflicts yesterday...).
2020-04-29 10:53:34 +02:00
3af52c6ec3 Merge branch 'blender-v2.83-release' 2020-04-29 10:27:42 +02:00
839fe335d2 Fix crash after 475bd6b occuring on each render end, we need another nullcheck here
(cherry picked from commit 3ea67e08fe)
2020-04-29 10:26:32 +02:00
1e58255c40 Merge branch 'blender-v2.83-release' 2020-04-29 10:16:42 +02:00
Anthony Edlin
b3ac6d1348 nstall_deps: USD: Add root usd library directory to build args.
Add root usd library directory to build arguments, same as other libraries.
Also fix error/typo in compile_USD regarding _is_building.

Reviewed By: mont29

Differential Revision: https://developer.blender.org/D7563
2020-04-29 10:15:55 +02:00
770605312f Merge branch 'blender-v2.83-release' 2020-04-29 10:14:55 +02:00
601a1a3fda Fix T76185: GPencil from Curve ignores Cyclic when curve has only 2 points
Also changed default thickness to 10 because after draw engine refactor the final line was too thin.
2020-04-29 10:14:20 +02:00
21ef8c4d44 Cleanup: use const args for depsgraph functions 2020-04-29 12:36:33 +10:00
af835ee6f8 Cleanup: use doxy sections for multires & subdiv sources 2020-04-29 12:21:12 +10:00
3ea67e08fe Fix crash after 475bd6b occuring on each render end, we need another nullcheck here 2020-04-28 23:49:52 +02:00
cec9dbc997 Merge branch 'blender-v2.83-release' 2020-04-28 22:42:15 +02:00
05274ca829 Fix T75432: Cycles progressive refine render slow with denoising data
Only perform denoising prefilter for the last sample, not every sample.
2020-04-28 22:40:44 +02:00
d66aa52528 Cleanup: Use more descriptive names for functions
count_set_pose_transflags --> transform_convert_pose_transflags_update
count_bone_select --> armature_bone_transflags_update_recursive

Also don't mix `BONE_TRANSFORM_MIRROR` with `BONE_TRANSFORM` in
transflag. (This was a mess introduced in rBde530a95dc7b).
2020-04-28 17:32:05 -03:00
b443e1b7d4 UI: Improve DataTransfer Modifier Error Message
Differential Revision: https://developer.blender.org/D7546
2020-04-28 15:15:36 -05:00
4d06c1c25b BLI: add VectorSet.is_empty method 2020-04-28 19:18:12 +02:00
44ac789a3a GPencil: Remove redundant UVs text
It's clear you change the UVs
2020-04-28 18:42:26 +02:00
cdd980cd56 GPencil: Rename modifier Texture to Texture Mapping 2020-04-28 18:40:18 +02:00
d366658d2d GPencil: Remove redundant Control word from UI 2020-04-28 18:35:49 +02:00
c1e6865ee3 Cleanup: remove unnecessary includes 2020-04-28 18:08:00 +02:00
67bd6bbcdd Depsgraph: use BLI::Vector for Relations
Reviewers: sergey

Differential Revision: https://developer.blender.org/D7556
2020-04-28 17:53:09 +02:00
05283f8c96 Depsgraph: Use BLI::Map for constraint_to_pchan_map_
Reviewers: sergey

Differential Revision: https://developer.blender.org/D7553
2020-04-28 17:44:36 +02:00
7dfa1b18c1 Depsgraph: use BLI::Set for entry_tags
Reviewers: sergey

Differential Revision: https://developer.blender.org/D7555
2020-04-28 17:40:23 +02:00
7bc4a436a0 Merge branch 'blender-v2.83-release' 2020-04-28 17:18:01 +02:00
475bd6b829 Fix T76179: Unable to select render passes when a render has fewer
passes than one in another slot

If a particular pass is not available in a slot we are switching to,
still show the menu, but with a blank name for the currently selected
item so that the user can change it to a valid value.

thx @brecht for providing the standard way Blender deals with these
kinds of situations.

Maniphest Tasks: T76179

Differential Revision: https://developer.blender.org/D7552
2020-04-28 17:06:53 +02:00
a72eed7dd5 BLI: rename Vector.empty to Vector.is_empty 2020-04-28 17:04:07 +02:00
c05ef1459c BLI: add Set.clear method 2020-04-28 16:41:37 +02:00
d575b72c16 BLI: add Set.is_empty method 2020-04-28 16:35:49 +02:00
69e8de434f Depsgraph: use BLI::Map in RootPChanMap
Reviewers: sergey, sybren

Differential Revision: https://developer.blender.org/D7521
2020-04-28 15:56:53 +02:00
6278b48ea1 Merge branch 'blender-v2.83-release'
Conflicts:
	source/blender/blenkernel/intern/lib_query.c
	source/blender/depsgraph/intern/builder/deg_builder_relations.cc
2020-04-28 15:40:12 +02:00
37e08e526c Depsgraph: Add IDProperties handling.
Fix T75279: BLI_assert failed when deleting object in debug build
(only).

And all general cases of ID pointer idproperties that would use a
data-block not referenced anywhere else in the depsgraph.

This includes idproperties from:
* All ID types;
* Bones and pose bones;
* Sequences;
* Nodes and sockets.

Differential Revision: https://developer.blender.org/D7551
2020-04-28 15:31:08 +02:00
9f090bac5c IDProperties: add a foreach looper and use it in libquery code.
Note: part of fix for T75279.

Differential Revision: https://developer.blender.org/D7550
2020-04-28 15:25:19 +02:00
1c7317a6da BLI: add library to simplify writing dot graph exporters
See D6799 for some examples on how to use the library.

Reviewers: sergey

Differential Revision: https://developer.blender.org/D6799
2020-04-28 14:05:24 +02:00
9c65ac7311 BLI: add Map.lookup_or_add_default method 2020-04-28 13:55:36 +02:00
7d85b6431f Fix T76044: update Cycles to build with OSL 1.11 master 2020-04-28 13:50:31 +02:00
2c60221080 Cleanup: Missing include directories after recent cleanup 2020-04-28 13:33:18 +02:00
20100009f6 Fix armature roll test failing on macOS 2020-04-28 13:31:59 +02:00
7d1bb2edfd Cleanup: Strict compiler warning in release mode 2020-04-28 13:31:01 +02:00
8da80e7771 Merge branch 'blender-v2.83-release' 2020-04-28 13:02:06 +02:00
2db4a5bb9f Cleanup: remove unused string module
This is legacy code that can simply be replaced by std::string.
2020-04-28 12:57:39 +02:00
2580fa1602 Cleanup: remove STR_String usage from GHOST 2020-04-28 12:57:39 +02:00
6cab53eaaa Tests: fix some tests passing even if there are Python errors
Blender was not configured to exit with non-zero return code on Python errors.
A bunch of tests worked around this but not all. This removes the need for such
workarounds.
2020-04-28 12:50:16 +02:00
b21a3e7702 Depsgraph: Use BLI::Map in more places
Reviewers: sergey

Differential Revision: https://developer.blender.org/D7519
2020-04-28 12:49:52 +02:00
a7bd835644 Fix Python bundled module test error
We don't bundle cffi, rather the ffi library is used for ctypes. This test is
currently passing even when there are errors, that will be fixed next.
2020-04-28 12:48:29 +02:00
Himanshi Kalra
b9f422c4be Tests: add physics tests cloth and softybody
This uses the same framework as automated modifier tests. It adds a physics
modifier, bakes and compares vertex coordinates on the end frame.

Differential Revision: https://developer.blender.org/D7017
2020-04-28 12:29:46 +02:00
18e9626e41 Strengthen modifiers test validation, from D7397.
Submitting on behalf of Jesse Y (deadpin).
In test harness for modifier testing, now run mesh validation
on output mesh. Also, fix printing so it interleaves properly.
2020-04-28 12:27:33 +02:00
4adc68bdf8 Fix T75973: don't show raw Python errors to users for invalid shortcut paths
There are cases when a user can accidentally assign an operator to toggle an
invalid property to e.g. left click, which shows Python errors to the users.
Rather than throw an error and e.g. break 3D viewport selection for the user,
just print an error to the console.

The root cause of such bugs should be fixed as well, but a working Blender
is most important here.
2020-04-28 12:27:33 +02:00
9c2715ffda BLI: add Map.is_empty() method 2020-04-28 11:44:10 +02:00
7acc8a5a92 Depsgraph: Use BLI::Map for RNANodeQuery.id_data_map_
Reviewers: sergey

Differential Revision: https://developer.blender.org/D7512
2020-04-28 11:39:49 +02:00
0372121e17 UI: Title case for 'Prefetch Frames' in VSE 2020-04-28 11:27:05 +02:00
a66162e1f6 Cleanup: trailing whitespace 2020-04-28 11:11:35 +02:00
3afa2e94ba Merge branch 'blender-v2.83-release' 2020-04-28 18:38:15 +10:00
90f01d5048 Fix select linked in pose mode
Only one of child bones would be selected when the bone under the
cursor had multiple children.
2020-04-28 18:35:52 +10:00
c7144d780d Merge branch 'blender-v2.83-release' 2020-04-28 16:17:12 +10:00
64e242244d Fix T75993: Mark Seam from UV editor operates on unselected faces 2020-04-28 16:14:09 +10:00
4f639b893b Merge branch 'blender-v2.83-release' 2020-04-28 15:48:44 +10:00
612757b524 Fix T76098: Dragging text selection with offset resets select start 2020-04-28 15:47:09 +10:00
a8d684d87f Merge branch 'blender-v2.83-release' 2020-04-28 13:49:25 +10:00
ef1187387b Fix T76152: Shortcut underline under wrong letter
Use glyph bounds to calculate a better underline position.
2020-04-28 13:48:15 +10:00
e78470d954 BLF: add utility function to loop over glyph bounds 2020-04-28 13:34:56 +10:00
33017e9529 Cleanup: unused variable 2020-04-28 13:05:18 +10:00
fd0cb58122 Merge branch 'blender-v2.83-release' 2020-04-27 21:15:11 +02:00
133bf05b18 Fix T75736 Viewport update problem when switching between view layers
The problem comes from the fact by no data being modified when switching
viewlayers.

To follow what the external render engines do, we completely reset the
viewport by freeing the GPUViewport to avoid any cached data from being
kept.
2020-04-27 21:14:10 +02:00
84e40ee846 Fix T75910 Overlay: Face Orientation not working for "In Front" objects 2020-04-27 21:14:10 +02:00
6830307b94 Merge remote-tracking branch 'origin/blender-v2.83-release' 2020-04-27 13:05:22 -06:00
ad01bab6c3 cleanup: Remove unused variable 2020-04-27 13:04:44 -06:00
15081cf6df Merge remote-tracking branch 'origin/blender-v2.83-release' 2020-04-27 13:01:24 -06:00
7951ec2641 Cleanup: Fix warning about initialization order with MSVC 2020-04-27 13:00:53 -06:00
ea75701529 Merge branch 'blender-v2.83-release' 2020-04-27 20:06:10 +02:00
a1b1f2acd4 Workbench: Fix weight paint overlay and wireframe for infront object
This fix case where you have wireframe on top of infront objects but
workbench AA conflicts and they appear to not be occluded.

Also T74923 is still fixed but we extend the fix to not mess the case when
using a mode that does not support infront.
2020-04-27 20:05:42 +02:00
94c514cf34 Merge branch 'blender-v2.83-release' 2020-04-27 18:32:32 +02:00
yves
af876b12f1 Fix T75519: Graph editor tooltips give false impression of the toggle state
It is just a quick fix for the tooltips in the graph editor, it replaces:
-  "F-curve modifiers are disabled" with "Enable F-Curve modifiers"
-  "F-curve is visible in graph editor for editing" with "F-Curve visibility in Graph Editor".

Reviewed By: billreynish

Maniphest Tasks: T75519

Differential Revision: https://developer.blender.org/D7387
2020-04-27 18:27:48 +02:00
5f3990d69a Merge branch 'blender-v2.83-release' 2020-04-27 18:15:47 +02:00
fbae4c5ba3 Fix T74700: "Convert Text to Curve" disregards "Text on Curve"
There was an assert here as well since using the original object to read
from was having an empty runtime curve cache.

Now use BKE_vfont_to_curve_ex instead of BKE_vfont_to_curve, so we can
read from the evaluated object and write to the original curves in order
to have the modified data taken into account on next object evaluation.
(BKE_vfont_to_curve would read and write to/from the same object)

Final solution provided by @sergey in that report, thx!
2020-04-27 18:04:19 +02:00
0a7dd1ec49 Merge branch 'blender-v2.83-release' 2020-04-27 12:09:17 -03:00
a4df7f78a8 Fix T75398: Redo with Shift R always uses the previous pivot center
Overwriting the pivot center was an attempt to fix T71455.
The solution now is to save the direction in the "mirror" property.
2020-04-27 12:07:29 -03:00
61f0941321 Cleanup: Use common utility to get direction for TIME_EXTEND 2020-04-27 12:07:29 -03:00
b0f207db15 UI: (Internal) utility for more controllable property split layout
Adds a wrapper-struct to create and return the three layouts required
for the propery split layout (i.e. `UILayout.use_property_split`). This
gives more flexibility for special treatment.
E.g. needed for adding the arrow icon buttons when there is a hierarchy
of nodes to be represented in the material properties (needs inserting
in the text column to not offset the split layout).

This commit also makes use of the utility for
`uiItemL_respect_property_split()`.
2020-04-27 17:01:40 +02:00
5559edf3c7 Merge branch 'blender-v2.83-release' 2020-04-27 16:57:58 +02:00
995611640e Cleanup: clang format
missed in rB4fd005fefb01.
2020-04-27 16:55:59 +02:00
4119e9c60b Merge branch 'blender-v2.83-release' 2020-04-27 16:46:17 +02:00
4fd005fefb Fix T76131: Crash combing Hair using Python
Caused by rBe82827bf6ed5.

DRW_draw_depth_object calls DRW_mesh_batch_cache_create_requested with
NULL scene, but that is accessed later on...

Scene is actually available, so pass that around.

Maniphest Tasks: T76131

Differential Revision: https://developer.blender.org/D7540
2020-04-27 16:40:45 +02:00
6842958c9b UI: Add (internal) option to use property splitting for label-less items
Usually items without labels don't use the property split layout and
just use the full layout width. In some cases that is not wanted because
it looks odd if single items within the split layout use the full width.
The option is unused but would be needed for adding decorators to the
material properties.
2020-04-27 16:38:27 +02:00
b6592c83b5 Merge branch 'blender-v2.83-release' 2020-04-27 16:26:59 +02:00
8f289196cf Fix T76111: UV editor's View Selected not working in multiobject editing
Seems like this was left out when UV operators were converted to multi-
object-editing, ref T54645.

Maniphest Tasks: T76111, T54645

Differential Revision: https://developer.blender.org/D7537
2020-04-27 16:18:09 +02:00
7c782b8f27 Merge branch 'blender-v2.83-release' 2020-04-27 16:13:44 +02:00
536055e1ee remove "Select Linked" from the posemode select menu
The operator in its current state is based on mouse position and doesnt
make sense to be called from a menu.
(In fact it should be called 'select_linked_pick' internally and a
separate 'select_linked' should be implemented similar to how "Select
Linked" works for meshes, curves etc -- see D7542 for this)

Note: We had the same thing for particles recently:
rBdd9dfadaac9b: remove "Select Linked" from the particle select and
context menu
rB5ca7c85e105d: Particle editmode: add mouse independent "Select Linked"
operator

Fixes T76071

Maniphest Tasks: T76071

Differential Revision: https://developer.blender.org/D7543
2020-04-27 16:10:31 +02:00
3d7ac7feba Merge branch 'blender-v2.83-release' 2020-04-27 23:24:49 +10:00
b1037aa88f Fix T76148: Grid fill crashes with multiple connected loops 2020-04-27 23:22:58 +10:00
3c858246cd UI: Support array properties for UILayout.prop_decorator()
Previously `UILayout.prop_decorator()` (or `uiItemDecoratorR()` in C)
only worked for single items, not for arrays. The decorators are added
vertically, like `UILayout.prop()` adds them.
This will be needed for adding decorators to material properties, but
will likely have other use-cases as well.

Also, `None` (or `NULL`) can be passed for the data-pointer and property
now to create blank decorators (as already possible for
`uiItemDecoratorR_prop` in C).
2020-04-27 14:57:29 +02:00
f346fd3212 Merge branch 'blender-v2.83-release' 2020-04-27 10:49:56 +02:00
7300e8a9fe GPencil: Change defaults for Gradient materials
The old values did not display a valid gradient by default.
2020-04-27 10:49:33 +02:00
fc1ea38c63 Merge branch 'blender-v2.83-release' 2020-04-27 16:50:24 +10:00
Robert Guetzkow
bb1e794d58 Fix T72476: Crash when drag & drop Color in the Image Editor 2020-04-27 16:44:47 +10:00
Christian Rauch
0da05720de GPU: add assert for immBegin buffer size & context 2020-04-27 15:27:53 +10:00
Christian Rauch
54eb701978 Cleanup: add newline to ghost warning print 2020-04-27 15:27:18 +10:00
490c32c425 CMake: add WITH_LINKER_LLD option for unix platforms
Can give considerably faster linking, especially for debug builds.

This may be enabled by default but needs to be more thoroughly tested.
2020-04-27 14:14:00 +10:00
13abd3784a Merge branch 'blender-v2.83-release' 2020-04-27 00:57:17 +02:00
d0d16eb7d3 Fix T74346 VSE: Prefetching doesn't work properly with property animations
Make sure depsgraph was updated before evaluating the animation.

Reviewed By: ISS

Differential Revision: https://developer.blender.org/D7467
2020-04-27 00:51:44 +02:00
Peter Fog
8a94903c09 VSE: Remove decorate from Expand and Mute in Modifiers
Remove decorate from Expand and Mute in VSE Modifiers,
since these elements aren't using decorate elsewhere.

Reviewed By: billreynish

Differential Revision: https://developer.blender.org/D7420
2020-04-27 00:14:04 +02:00
0edf3f5680 Merge branch 'blender-v2.83-release' 2020-04-27 00:06:00 +02:00
c13ad410a6 Fix T74603: Tweaking offsets causes strips to "reverse"
Add range function to RNA properties.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D7285
2020-04-27 00:04:23 +02:00
576ecbd694 Merge branch 'blender-v2.83-release' 2020-04-26 23:44:12 +02:00
dea1c1b9eb Fix T75495: Blender crashes opening a VSE .blend file
During scene copy modifier mask strips are relinked to point to strips in
new scene. If strip used as mask is in different seqbase, this can fail,
if seqbase is not copied yet.

Add SEQ_DUPE_IS_RECURSIVE_CALL flag to avoid relinking modifiers during recursive call.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D7412
2020-04-26 23:40:18 +02:00
a2de3d86de Fix utterly wrong decorator button logic
This was in fact completely messed up, but it worked by accident for all
current cases. That is, we always inserted the decorator buttons
immediately after the button they applied to. So the first button
comparision in ui_but_anim_decorate_find_attached_button() would
succeed, because it just compared a few values that all happened to be
NULL and thus the comparison returned true.

Further, avoid NULL-pointer dereferences and incorrect printing.
2020-04-26 17:39:12 +02:00
066b0248df Merge branch 'blender-v2.83-release' 2020-04-26 12:26:26 +02:00
05b94c9c54 GPU: Add better support for texture copy fallback
Depth texture copy using glCopyTexSubImage2D is undefined behavior since
you cannot bind GL_DEPTH_ATTACHMENT to glReadBuffer.

Using glBlitFramebuffer as a fallback.
2020-04-26 12:25:52 +02:00
8d8414cd21 Merge branch 'blender-v2.83-release' 2020-04-25 19:42:52 +02:00
f418eddf8e GPencil: Fix unreported small offset when use Stroke mode
When using the Stroke mode, the reprojection function add a small offset of 0.5 to +X and +Y. Now this effect is removed subtracting this value before doing the conversion.
2020-04-25 19:40:12 +02:00
e54a206e15 GPencil: Fix unreported jagged lines when using Stroke mode
When use the Stroke reproject mode, the precission of the conversion makes the line produce a very small noise effect.

Now, if the stroke mode is enabled, a small smooth is done using a factor depending of the input samples.

The values of the smooth effect were provided by @pepeland after several testing.
2020-04-25 19:37:06 +02:00
78887318e2 Merge branch 'blender-v2.83-release' 2020-04-25 10:41:44 +02:00
53106934f9 Fix T76078: GPencil: frames interpolation erase strokes
In some situations the stroke could be tagged and this tag was used to delete the interpolated strokes.

Now, the frames used as interpolated range are untagged before creating the interpolated strokes.
2020-04-25 10:40:09 +02:00
2b95f2439e Merge branch 'blender-v2.83-release' 2020-04-24 20:53:34 -06:00
4ab85a3380 Cleanup: Select sync from outliner
Move the condition to check if selection syncing is enabled to inside
the syncing function rather than before each time it is called.
2020-04-24 20:22:46 -06:00
5d14463e1a Fix: Selection syncing for outliner operators
A few outliner operators that modify selection were not tagging for a
selection sync which led to selection inconsistencies. This adds syncing
for the following operators:
* Duplicating and deleting collections
* Selecting/deselecting collection contents
* Drag and drop
* Object select, deselect, delete, and delete hierarchy
2020-04-24 20:18:39 -06:00
c5f4d5e448 BLI: add LinearAllocator
This allocator is useful when it is necessary to allocate many small elements.
2020-04-24 23:52:55 +02:00
1f2b1d520f BLI: improve StringRef.copy 2020-04-24 23:35:17 +02:00
ebe0d7ca5e BLI: add DefaultHash specializations for StringRef and StringRefNull 2020-04-24 23:14:33 +02:00
62f6255b47 BLI: Implement StringMap.add and StringMap.add_or_modify 2020-04-24 22:33:48 +02:00
fd10ac9aca UI: Move Scene Statistics to the 3D Viewport
Removes statistics from footer and to an (optional) overlay in 3DView.

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

Reviewed by Campbell Barton
2020-04-24 11:05:40 -07:00
a8441fc900 Fix T69753 Instanced Metaballs not rendering but showing up in Viewport
This hides the original metaballs when they are used in
duplifaces/-verts instancing, and still shows the instanced metaballs.

The visibility of the original metaballs is now determined by the
visibility of the instancer. I'm not too thrilled about this, but at
least it gives users the ability to show/hide the metaballs for
viewport/render.

Differential Revision: https://developer.blender.org/D7478
2020-04-24 17:23:44 +02:00
be5c9d45bd Tests: use explicit Python to run unit tests
CentOS on the buildbot still runs Python 3.6, which is also used for the
unit tests. This means that the tests can't use language features that
are available to Blender itself. And testing with a different version of
Python than will be used by the actual code seems like a bad idea to me.

This commit adds `TEST_PYTHON_EXECUTABLE` as advanced CMake option. This
will allow us to set a specific Python executable when we need it. When
not set, a platform-specific default will be used:

- On Windows, the `python….exe` from the installation directory. This is
  just like before this patch, except that this patch adds the
  overridability.
- On macOS/Linux, the `${PYTHON_EXECUTABLE}` as found by CMake.

Every platform should now have a value (configured by the user or
detected by CMake) for `TEST_PYTHON_EXE`, so there is no need to allow
running without. This also removes the need to have some Python files
marked as executable.

If `TEST_PYTHON_EXE` is not user-configured, and thus the above default
is used, a status message is logged by CMake. I've seen this a lot in
other projects, and I like that it shows which values are auto-detected.
However, it's not common in Blender, so if we want we can either remove
it now, or remove it after the buildbot has been set up correctly.

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

Reviewed by: campbellbarton, mont29, sergey
2020-04-24 17:10:22 +02:00
be00902082 Defaults: Change default axes for Track To constraint
The main use-case for the Track To constraint is camera tracking, so
this sets up a better default for this. That is, track to -Z with Y up.

Agreed on internally with Pablo Vazquez and William Reynish. Should
there be a reason to revert this, that would be fine compatibility-wise.
2020-04-24 16:17:47 +02:00
246d59ff0f Defaults: Reduce near-clipping in factory settings
For newly opened 3D Views, the default would actually be 0.01m. But the
code to update the default for all existing 3D Views in the
startup.blend was missing. So the defaults were out-of-sync.

0.01m is the more reasonable default as agreed on by the UI team.
2020-04-24 16:17:47 +02:00
47ae0affc8 Depsgraph: Use BLI::Map instead of GHash for operations_map
Reviewers: sergey

Differential Revision: https://developer.blender.org/D7509
2020-04-24 11:34:04 +02:00
69b6c89842 Depsgraph: Use BLI::Set instead of std::unordered_set
Reviewers: sergey

Differential Revision: https://developer.blender.org/D7506
2020-04-24 10:48:25 +02:00
ed32afd962 Merge branch 'blender-v2.83-release' 2020-04-24 10:40:42 +02:00
4542b50afc T75631: New multires shrinkage problem
The old Subdivide button was behaving as if subdivision modifier was
applied on top of the multires. This was the source of shrinkage since
the behavior of the limit surface: limit surface of a sparse point
from another limit surface makes final result appear smaller.

The new behavior is based on propagating delta against base mesh's
limit surface to the top level. Effectively, this is as if we've
sculpted on old top level and then propagated to the new top level.

Differential Revision: https://developer.blender.org/D7505
2020-04-24 10:29:26 +02:00
0de591ac39 Merge branch 'blender-v2.83-release' 2020-04-24 18:14:18 +10:00
1625b7c37c Fix T75749: UI button text selecting is broken by text offset 2020-04-24 18:13:43 +10:00
c2bf0c1d54 Merge branch 'blender-v2.83-release' 2020-04-24 17:41:34 +10:00
e8d3996e67 Fix edit-mesh selection mode switching causing two undo pushes 2020-04-24 17:39:11 +10:00
b0b6fb8a93 Fix edit-mesh moving from edge to face mode with Ctrl held
Faces could be selected without any of their edges or vertices selected.
2020-04-24 17:28:46 +10:00
a8e89db291 Merge branch 'blender-v2.83-release' 2020-04-24 17:07:23 +10:00
9b56b2b2b9 UI: add mesh skin-resize to menu
Resolves T75925
2020-04-24 17:06:55 +10:00
d4ffd1d91f Cleanup: declare values for enum types
Avoids accidents when adding/removing items from an enum.
2020-04-24 15:52:01 +10:00
c1e4b369b0 Merge branch 'blender-v2.83-release' 2020-04-24 13:28:11 +10:00
001629a362 Fix T75946: Intersect (knife) doesn't cut all intersections 2020-04-24 13:26:17 +10:00
d2aa4ada50 Merge branch 'blender-v2.83-release' 2020-04-24 12:27:12 +10:00
d428cca124 Fix T63787: Knife intersect crashes 2020-04-24 12:18:29 +10:00
9667f89e82 Cleanup: correct printf warnings for bmesh interesect debugging 2020-04-24 11:47:41 +10:00
af0a042da7 Cleanup: remove unused arg, clang-format 2020-04-24 11:43:30 +10:00
826f6dd9ee Merge branch 'blender-v2.83-release' 2020-04-23 23:08:20 +02:00
d712f1f83a GPU: Add Polyline shader (wide line emulation)
This new shader is able to emulate smooth wide lines drawing using a
geometry shader.

This shader needs viewportSize and lineWidth uniforms to be set.

There is multiple variants to replace the usage of wide lines for most
shaders.

This patch only fix the gizmo_types files and the navigation gizmo.
Other areas could be fixed afterward, I just limited the patch size.

Fix T57570.

Reviewed By: billreynish

Differential Revision: https://developer.blender.org/D7487
2020-04-23 23:07:48 +02:00
d0ff3434cf Fix T73741 Grid Floor render on top of Wireframe objects
Go for a bias towards background to avoid loosing wireframe objects.
2020-04-23 22:21:22 +02:00
54e1b63567 Fix T74173 Assert when scaling camera in viewport to zero 2020-04-23 21:50:32 +02:00
ed4f33a7bd Cleanup: silence unused parameter warning 2020-04-23 20:49:42 +02:00
8f5a4a4da3 BLI: various data structure improvements
* Rename template parameter N to InlineBufferCapacity
* Expose InlineBufferCapacity parameter for Set and Map
* Add some comments
* Fixed an error that I introduced recently
2020-04-23 20:05:53 +02:00
7d98dfd6bb Merge branch 'blender-v2.83-release' 2020-04-23 18:26:22 +02:00
0fbcb824d0 Fix T76014: correct description of COLLECTION_OT_objects_remove_all
before rB17bd5c9d4b1e it was "Remove selected objects from all groups"

- `BKE_object_groups_clear` is not checking if a collection is linked
to the current scene...
- rB713010bd7795 did not change that either

So this indeed removes selection from _all_ collections, so account for
that in the operator description/idname.

Reviewers: brecht

https://developer.blender.org/D7500
2020-04-23 18:20:26 +02:00
c03b6f6f0b Fix T73195: stereo camera view does not show background image 2020-04-23 18:01:33 +02:00
40f2c92460 Fix T72506 EEVEE: Collection Holdout propagates accross material instances
This fix the issue by introducing a default material only for collection
holdouts. This avoids hash colision when the same material is used in
collections without holdout enabled.
2020-04-23 17:41:21 +02:00
2467f4df79 Fix T75607: crash trying to sculpt while remesh is in progress
The interface is already locked, but the paint brush drawing could stll be
reading the mesh that was being edited in another thread.
2020-04-23 17:10:23 +02:00
53de2c3e4f Cleanup: Add assert to crash earlier
This makes T75096 crash earlier.
2020-04-23 15:47:38 +02:00
5e04548500 Merge branch 'blender-v2.83-release' 2020-04-23 15:45:46 +02:00
869472b3f0 Fix T75611: slow transform of many objects at the same time
Solve O(n^2) time complexity problem where a dependency graph iterator loops
over all nodes to clear flags, which happened for every object at the start
of transform.

Differential Revision: https://developer.blender.org/D7503
2020-04-23 15:41:57 +02:00
3b47f335c6 BLI: remove TaskParallelRangePool
This is not currently used and will take some work to support with TBB, so
remove it until we have a new implementation based on TBB.

Fixes T76005, parallel range pool tests failing.

Ref D7475
2020-04-23 15:39:34 +02:00
1fce2ea743 Merge branch 'blender-v2.83-release' 2020-04-23 15:15:04 +02:00
694c0547c2 Fix T73680: Scene and fluid modifier gravity are scaled differently
Reviewers: sebbas

Differential Revision: https://developer.blender.org/D7483
2020-04-23 15:10:20 +02:00
6524aaf685 Fix T76008: Fluid inflow with negative initial velocity is not working
This is a regression introduced in rBa0fe22095e6d9b8b194c2cf6f9a7c7b419d7e61c.

I changed it so that the velocity with the highest magnitude is considered and
not the highest value per coordinate.

Reviewers: sebbas

Differential Revision: https://developer.blender.org/D7502
2020-04-23 15:00:48 +02:00
5afba30c69 Fix T75987: crash entering edit mode with keyed particles 2020-04-23 14:51:41 +02:00
1c84cd8198 Merge branch 'blender-v2.83-release' 2020-04-23 14:49:38 +02:00
a0652430d0 Array modifier: limit maximum amount of generated geometry.
Fixes T75278: Crash when modifier "Array-Fit Curve-Relative Offset"
nears zero.
2020-04-23 14:48:48 +02:00
35ecfefaec Made pose push/relax to breakdown behave smooth on rotations
A follow up to T67212. I missed that the rotation interpolation had its
own code path.

The previous rotation push code was actually wrong (but smooth).

Now all of the actions behave correctly and is smoothly interpolated.
2020-04-23 14:15:31 +02:00
8f51f60948 Fix T76005: BLI_task test failing after recent changes
This was an error in changes made to this test to accomodate the new reduce
callback.
2020-04-23 14:04:29 +02:00
3a0af215b9 Fix headless build failure on macOS 2020-04-23 13:19:54 +02:00
614621747e BLI: optimize VectorSet implementation
Instead of building on top of `BLI::Vector`, just use a raw array
and handle the growing in `BLI::VectorSet`.

After this change, the existing `EdgeSet` can be reimplemented using
`BLI::VectorSet` without performance regressions.
2020-04-23 12:02:06 +02:00
68cfce1519 Merge branch 'blender-v2.83-release' 2020-04-23 18:38:41 +10:00
8dedbb1747 Fix T75836: Light target misses updates while dragging 2020-04-23 18:25:29 +10:00
6c0ddf1110 Merge branch 'blender-v2.83-release' 2020-04-23 16:15:55 +10:00
b900a5e452 Fix T74172: Mirror with bisect results in holes
Enable snap-to-center when bisecting.
2020-04-23 16:14:07 +10:00
6489f5a8ec Merge branch 'blender-v2.83-release' 2020-04-23 15:09:54 +10:00
83d9ba341e Fix T75965: Scale to Fit Text Box fails with a single word 2020-04-23 15:03:47 +10:00
b785feb3d7 Merge branch 'blender-v2.83-release' 2020-04-23 12:12:34 +10:00
e812512e1d Cleanup: clang-format, unused warning 2020-04-23 12:10:41 +10:00
5491c045af Cleanup: add explicit enum values in DNA_rigidbody_types.h 2020-04-23 12:06:35 +10:00
101ec2f3b8 Merge branch 'blender-v2.83-release' 2020-04-23 12:02:25 +10:00
c3accabef9 Fix invalid rigid body constraint values during 2.83 development
Own error in cleanup from 5dcb6fb22f unintentionally
changed enum values. Although this code violated our own
rules to use explicit values to avoid this happening.
2020-04-23 11:46:52 +10:00
c632396733 Fix T75991: crash when rigidbody encounters unknown constraint type
This just adds a check to prevent the crash,
Versioning invalid types still needed.
2020-04-23 11:31:47 +10:00
f6f4ab3ebf Merge branch 'blender-v2.83-release' 2020-04-22 21:42:09 +02:00
a68bd94d11 Workbench: Use GPU_texture_copy instead of GPU_framebuffer_blit for TAA
This fixes T75477 which seems to be a driver but caused by framebuffer
blitting.
2020-04-22 21:41:10 +02:00
f7753bf97f GPU: Add GPU_texture_copy
This allow to copy entire texture in a faster way than using framebuffer
blitting.

This uses ARB_copy_image extension if available and fallback to
glCopyTexSubImage2D for older gl version.

Both method should be as fast if not faster than the framebuffer blitting.
2020-04-22 21:41:10 +02:00
6f8d5eaa28 Merge branch 'blender-v2.83-release' 2020-04-22 21:04:58 +02:00
d17b371a83 UI: Always check if IME Supported After Changing Language
Changing from IME-enabled language to English did not turn off IME.

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

Reviewed by Campbell Barton
2020-04-22 21:03:13 +02:00
c3d8fa1301 UI: Always check if IME Supported After Changing Language
Changing from IME-enabled language to English did not turn off IME.

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

Reviewed by Campbell Barton
2020-04-22 11:28:15 -07:00
821316b034 Reset submodule to the right place in master
Accidently changed on rB0dfe30502a02.
2020-04-22 20:20:48 +02:00
22cf2572d9 Merge branch 'blender-v2.83-release' 2020-04-22 19:20:11 +02:00
0dfe30502a Fix T75938: Workbench normal direction for matcaps
Set useMatcap to ensure correct normal direction when using matcaps
in the workbench engine.
2020-04-22 19:13:38 +02:00
f9649e2bf1 Fix T75994: Crash with 'Split Edges and Faces' | Auto-Merge
It occurred when an edge was collapsed into a vert that was not part of it.
This is common when the distance for merging is relatively large.
2020-04-22 12:53:19 -03:00
f5b540593c Fix T75994: Crash with 'Split Edges and Faces' | Auto-Merge
It occurred when an edge was collapsed into a vert that was not part of it.
This is common when the distance for merging is relatively large.
2020-04-22 12:48:16 -03:00
de168b4115 Merge branch 'blender-v2.83-release' 2020-04-22 17:13:21 +02:00
878cd0e124 Silence annoying error message in writefile on undo step storage.
Fix T75318: Error spam in console when opening file from 2.7x.
2020-04-22 17:12:49 +02:00
cdc399a055 Merge branch 'blender-v2.83-release' 2020-04-22 17:05:04 +02:00
45f8d1783b Cleanup: Fix strict compiler warning 2020-04-22 16:56:43 +02:00
cf5147f69f Fix T74423: Cycles rendering artifacts with CUDA 10.2
Work around what appears to be a compiler bug, just changing the code a bit
without any functional changes.
2020-04-22 16:40:52 +02:00
138b0c970e GPencil: Change Thickness Profile icon 2020-04-22 16:40:26 +02:00
0fe3e38b57 Cleanup: Spelling in function name
Should be no functional changes.
2020-04-22 16:32:45 +02:00
07ed64aae6 Fluid: Use maximum for initial velocity grid application
Using MAX2 when writing intial velocities into the grid prevents overriding initial velocities when using multiple flow objects that are close to each other.
2020-04-22 16:19:19 +02:00
f148bd3795 Fluid: Fixes for cache 'Replay' mode
General fixes and improvements for the cache. Previous commits on fluids broke the 'Replay' cache a bit.
2020-04-22 16:19:19 +02:00
6485d8b78a Fluid: Fix for caches being released when file is loaded 2020-04-22 16:18:13 +02:00
fdea3dd7e7 Fluid: Fix for inconsistent behavior with flow and effector objects
Fixes issue with flow and effector objects which were not being used after resuming a bake job.
This issue has been reported in T75729 and T75758.
2020-04-22 16:18:13 +02:00
d19277c72f Fluid: Added missing outflow object type to enable / disable flow flag
There is no reason to not include outflow objects here too.
2020-04-22 16:18:13 +02:00
650f9cfe93 Fluid: Improved cache 'Replay' option
When using the 'Replay' cache mode the cache needs to be invalidated whenever simulation variables have been changed.
The invalidation will always only affect the according subcaches, e.g. when changing a mesh paramter only the mesh cache will be invalidated, the base cache will remain intact.
Before this change Blender always invalidated the entire cache.
2020-04-22 16:16:23 +02:00
abdd4117b1 Fluid: Cleanup in MANTA main class
More concise return types for cache import functions and general cleanup.
2020-04-22 16:16:23 +02:00
40e9dc638b Fluid: Remove noise bake call from Python
Saving noise cache files is handled in fluid.c.
2020-04-22 16:16:23 +02:00
06e3df4ce4 Fix T75681: Mantaflow crash when trying to bake a cupcake: The CG solver diverged, residual norm > 1e30
Ensures that there are no enclosed holes between an obstacle and the domain walls.
2020-04-22 16:16:23 +02:00
5cae44ef6d Fluid: Minor UI fix for diffusion panel
Was missing active option.
2020-04-22 16:16:23 +02:00
912ac457a6 Merge branch 'blender-v2.83-release' 2020-04-22 16:01:17 +02:00
9000ec3013 Cleanup: clarify and update some flags descriptions in libquery code. 2020-04-22 15:58:55 +02:00
6a1056c6a8 Merge branch 'blender-v2.83-release' 2020-04-22 15:54:04 +02:00
28f7c80c46 Fix invalid RNA path for transform orientations.
Fix T75861: Impossible to set Shortcut (hotkey) on Transform Orientation
or Pivot Point.
2020-04-22 15:53:33 +02:00
6c9bebd827 Tests: Fix build error in BKE_armature test
Test does not link due to missing symbols, needs
buildinfoobj to link against when WITH_BUILDINFO is on
2020-04-22 07:47:32 -06:00
a0fe22095e Fluid: Use maximum for initial velocity grid application
Using MAX2 when writing intial velocities into the grid prevents overriding initial velocities when using multiple flow objects that are close to each other.
2020-04-22 15:30:06 +02:00
8d5ae15040 Fluid: Fixes for cache 'Replay' mode
General fixes and improvements for the cache. Previous commits on fluids broke the 'Replay' cache a bit.
2020-04-22 15:26:51 +02:00
a47a975a55 Merge branch 'blender-v2.83-release' 2020-04-22 14:38:59 +02:00
6c9a882340 Fix T75964: changing object's viewport display color does not update
cycles

Caused by rB00466e756e33.

While that commit sounds logical, Cycles uses is_updated_transform() to
detect updates.

Now introduce is_updated_shading() and use that on top.

Maniphest Tasks: T75964

Differential Revision: https://developer.blender.org/D7493
2020-04-22 14:31:32 +02:00
e5052e8bde Merge branch 'blender-v2.83-release' 2020-04-22 14:28:10 +02:00
9aeb475e99 Subdiv: Fix wrong non-manifold subdivision in certain cases
Was happening when only partial subset of callbacks was specified.

The reason was that there was a callback to specify edges sharpness
but no callback to specify vertex sharpness, so the special case for
non-manifold edges was not run.

Fixes T75697: Multires in simple mode doesn't work correct on a plane
2020-04-22 14:26:12 +02:00
c69a047b90 Merge branch 'blender-v2.83-release' 2020-04-22 14:23:00 +02:00
Brecht Van Lommel
aa09a46fd7 Objects: add infrastructure for hair, pointcloud, volume modifiers
There is no user visible difference in standard builds, as there are no
volume modifiers yet. When using WITH_NEW_OBJECT_TYPES some deform only
modifiers are now available for hair and pointcloud objects.

Differential Revision: https://developer.blender.org/D7141
2020-04-22 14:20:31 +02:00
dfe22c2900 Cleanup: comment and semicolons 2020-04-22 14:17:19 +02:00
470f17f21c Fix T75974: Multiobject editing UV hiding/unhiding does not work
Seems like this was left out when UV operators were converted to multi-
object-editing, ref T54645.

Maniphest Tasks: T75974

Differential Revision: https://developer.blender.org/D7492
2020-04-22 14:07:43 +02:00
bc83fc9c04 Fix T75981: crash in sculpt mode with mesh that used to have multiple materials
The material indices in a mesh can exceed the number of available materials
slots in the object or mesh, sculpt drawing was not taking that into account.
2020-04-22 13:59:14 +02:00
b2cc2dda9c Fix 3D viewport select using grease pencil engine when not needed
Other draw loops also avoid the overhead of grease pencil drawing when there
are no grease pencil objects in the scene. It's a little faster to skip those
shaders and buffer when not needed.
2020-04-22 13:44:06 +02:00
aba78caa11 Fix T75625: crash on exit in macOS after selecting objects
This code to free shaders by casting a struct to a pointer array is not valid
in general, and particularly when compiling with Clang (on Linux and macOS) it
fails and can read invalid/uninitialized memory .
2020-04-22 13:44:06 +02:00
8eeae02cb0 Merge branch 'blender-v2.83-release' 2020-04-22 21:41:28 +10:00
c7991bcefc BLI: add ScopedTimer
This adds a simple timer that can be used for performance measurements in C++.
More sophisticated timers are possible (e.g. one that takes averages, logs the results, ...).
However, I found that this simple timer is good enough for 99% of my use cases.

To use it just write `SCOPED_TIMER("my timer name");` or more commonly `SCOPED_TIMER(__func__);`
into some scope.

Reviewers: sergey

Differential Revision: https://developer.blender.org/D7491
2020-04-22 12:53:47 +02:00
3542c5eb72 Fix T75971: 3D Text invisible when fill set to None 2020-04-22 19:46:53 +10:00
21f811cb6d Merge branch 'blender-v2.83-release' 2020-04-22 11:37:36 +02:00
1998154ff4 Undo: Minor optimization: do not write Scene's 3DCursor.
Probably not much gained here, but that's one thing less potentially
making the scene seen as changed in undo steps...
2020-04-22 11:37:09 +02:00
0faeca806c Fix T75719: Undo system: Debug assert while undoing several operations.
Caused by some pointer collision when re-allocating data-blocks during
undo (due to creation/deletion of those).

Patch by @brecht, many thanks.
2020-04-22 11:37:09 +02:00
f7374737ef Fix T75909: icons memory leak in headless build 2020-04-21 21:44:44 +02:00
13e3a1c532 Fix T75969: view layer add with Copy Settings does not copy all data 2020-04-21 19:59:35 +02:00
8845b27dce Merge branch 'blender-v2.83-release' 2020-04-21 18:29:25 +02:00
bc3aab3fa5 Fix T75893: Undo causes crash with "Load UI" disabled.
We need to re-generate a new session uuid for the UI-related data-blocks
that are kept across file reading, when load UI is disabled. Otherwise
there will be several IDs with same uuid, which is an ensured way to
crash in new undo code.
2020-04-21 18:26:32 +02:00
93e193399d Tests: added unit test for mat3_vec_to_roll() function
This was used to investigate T73840. Since the armature math is far from
simple, I thought it would be a good idea to start writing some unit
tests for it.

No functional changes in Blender itself.
2020-04-21 17:58:27 +02:00
38f4b95635 Cleanup: added missing header to BKE_armature.h
No functional changes.
2020-04-21 17:58:27 +02:00
29e9506a7f BLI: simplify naming of listbase wrapper 2020-04-21 17:38:19 +02:00
3059353b38 BLI: Use .hh extension for C++ headers in blenlib 2020-04-21 17:31:56 +02:00
0e52b91f97 BLI: add float2, float3, float4x4, Color4f and Color4b
Reviewers: brecht, campbellbarton, sergey

Differential Revision: https://developer.blender.org/D7450
2020-04-21 16:57:00 +02:00
805c52b1fd Libmv: Cleanup, naming
Initial bundle adjustment only supported OpenCV's radial distortion
model, so the cost functor was called after it.

Nowadays it supports more than this single model, so naming was a bit
wrong and misleading.
2020-04-21 16:41:23 +02:00
b08e18ff36 CleanUp: Remove thread_id from TaskFreeFunction
It isn't used; cleanup related to {D7475}
2020-04-21 15:57:51 +02:00
2d6ad88466 CleanUp: Renamed BLI_task_pool_userdata to BLI_task_pool_user_data
In preparation for {D7475}
2020-04-21 15:37:36 +02:00
23919d2275 Fix T75845: some dependencies update missing when painting textures.
issue: Painting a texture that is set as a particle system influencer, doesn't
update particles. An external trigger (such as changing influence slider)
is required to update particles.

fix: The root cause is a missing relationship from image to texture in the
dependency graph.

test: Once fixed, image texture painting updates expected dependencies
such as particle system influence or displacement modifier.

Reviewed By: sergey

Maniphest Tasks: T75845

Differential Revision: https://developer.blender.org/D7472
2020-04-21 15:27:21 +02:00
6505dd1985 UI: Use heading for File Browser column toggles in popover 2020-04-21 15:13:58 +02:00
ec14bee20d Cleanup: remove unused includes 2020-04-21 14:57:19 +02:00
2de0cc5adc Merge branch 'blender-v2.83-release' 2020-04-21 14:34:22 +02:00
b4993a9032 Fix: Incorrect f-string in previews.py
Contributed by @deadpin

Differential Revision: https://developer.blender.org/D7458
2020-04-21 14:33:37 +02:00
f4ee9643ad Fix Linux/GCC build error after recent changes 2020-04-21 14:28:26 +02:00
Miguel Porces
ad23b1e91d UV: add Reset operator to menu in uv editor
Differential Revision: https://developer.blender.org/D7482
2020-04-21 14:20:42 +02:00
a93ed3bcb7 Strengthen modifiers test validation, from D7397.
Submitting on behalf of Jesse Y (deadpin).
In test harness for modifier testing, now run mesh validation
on output mesh. Also, fix printing so it interleaves properly.
2020-04-21 08:15:26 -04:00
9528fa2c46 Merge remote-tracking branch 'origin/blender-v2.83-release' 2020-04-21 13:24:47 +02:00
6f598ecc1a Fix T75472 Crash on "Remove Empty Animation Data" in NLA editor
The `ANIMFILTER_NODUPLIS` option, to prevent duplicates in the list of
animation data to be freed, was missing. This caused a use-after-free.
2020-04-21 13:24:20 +02:00
81d29a9f61 Merge branch 'blender-v2.83-release' 2020-04-21 13:17:39 +02:00
5fed9ac9b5 Fix clang-format differences between version 6 and 9
Version 6 does not appear to respect clang-format off for header sorting.
2020-04-21 13:16:59 +02:00
1c86912068 Cleanup: clang-format 2020-04-21 13:16:34 +02:00
06a2ae281b Merge branch 'blender-v2.83-release' 2020-04-21 12:55:40 +02:00
c73d6162be Fix T75920: Add object - Align to 3D cursor not working.
3DCursor is UI data (hence not expected to be affected by undo) that is
stored in actual data (Scene)... So it needs some special care during
undo.

New undo code now re-reads data into existing memory, which means
copying of 3DCursor data has to happen earlier in that case, when we
still have both old and newly read data available.
2020-04-21 12:52:18 +02:00
49a29c9c76 Cleanup: Fix strict compiler warning 2020-04-21 12:49:12 +02:00
a02da85b55 Libmv: Cleanup, spelling and naming in bundle adjustment
Just more things which were discovered to be annoying on unclear when
adding more features to this code.
2020-04-21 12:25:45 +02:00
55a2682348 Windows: Add sccache support.
sccache [1] is one of the few ccache like solutions that will
work on windows.

sccache support can be enabled with the `WITH_WINDOWS_SCCACHE`
cmake option however it will only will work with ninja as the
build system, msbuild is not supported currently.

Advanced option, developes are expected to obtain and configure
sccache on their own.

```
Full build no cache 1428.90s (100.00%)
Full build cached    434.34s ( 30.40%)
```

[1] https://github.com/mozilla/sccache

Reviewed By: nicholas_rishel, Brecht

Differential Revision: https://developer.blender.org/D7466
2020-04-20 12:51:43 -06:00
9618bd9202 Merge branch 'blender-v2.83-release' 2020-04-20 18:55:08 +02:00
be7c51d076 Fix T75885: Mesh deform modifier not updating on own transforms
Added the missing relation.

Maniphest Tasks: T75885

Differential Revision: https://developer.blender.org/D7473
2020-04-20 18:50:18 +02:00
749181ff4d Libmv: Cleanup, spelling in comment 2020-04-20 17:26:45 +02:00
e9c9e1c2c7 Libmv: De-duplicate creation of residual block
Allows to centralize logic which is needed to check which cost functor
to use for the specific intrinsics.
2020-04-20 16:26:39 +02:00
f0e8965090 Libmv: Cleanup reprojection cost function
Make it smaller and more clear how and what it operates on.
2020-04-20 16:26:32 +02:00
ce82e9e64a Libmv: Pass entire camera intrinsics to reprojection error functor
Currently no functional changes, but allows to have access to some
invariant settings of camera intrinsics such as image dimensions.
2020-04-20 16:26:32 +02:00
c334020d8f Libmv: Cleanup, rephrase comment 2020-04-20 16:26:32 +02:00
838d452843 Libmv: Cleanup, fix indentation 2020-04-20 16:26:31 +02:00
584f112548 Libmv: Cleanup, spelling in comments 2020-04-20 16:26:31 +02:00
3135791395 Tracking: Specify image image for (un)distortion model
Allows to support distortion models which needs to know actual
image dimensions to apply or inverse camera intrinsics.
2020-04-20 16:26:31 +02:00
Henrik Dick
7865185d98 Fix T75840: Add check for not generated edges
The value of `new_edge` is `SOLIDIFY_EMPTY_TAG=2^32-1` if the edge is not generated.
The code from D7334 was missing this check.

Reviewed By: mont29

Maniphest Tasks: T75840

Differential Revision: https://developer.blender.org/D7463
2020-04-20 16:16:04 +02:00
665bf41f3c Cleanup: rename "nested" to "embedded"
Reviewers: mont29

Differential Revision: https://developer.blender.org/D7476
2020-04-20 16:14:45 +02:00
d1da2f0b9e Fix: Add extern "C" to RNA_enum_types.h 2020-04-20 15:58:59 +02:00
7ff0f896e8 UI: Use different icon to remove user-created shortcuts in Preferences
There was no way for users to visually tell appart shortcut items
they've added themselves and the default ones. Both used the same 'x'
icon to remove the item.
Modified items already showed a back-arrow icon; this commit makes
user-created shortcuts use an icon that has both, a back-arrow and a
'x'.

The icon is in fact from the Movie Clip Editor, but William Reynish and
I concluded that it's not worth creating and adding a new one just to
short-term fix this small annoyance. And the icon actually fits the
purpose surprisingly well :) {F8485176}
2020-04-20 15:56:57 +02:00
8dbbac43bb Simulations: Add Boolean Math, Switch and Float Compare node UI
Reviewers: brecht

Differential Revision: https://developer.blender.org/D7424
2020-04-20 15:27:58 +02:00
dcb45992bf Merge branch 'blender-v2.83-release' 2020-04-20 15:27:27 +02:00
aa2544793d Various typos fixes in UI messages. 2020-04-20 15:27:01 +02:00
b78f2675d7 Simulations: Use some shader nodes in simulation node trees
Reviewers: brecht

Differential Revision: https://developer.blender.org/D7422
2020-04-20 15:17:36 +02:00
915866f0d9 Fix T75914: Assert Knife Tool
Actually the assert was incorrect. It tested for an active buffer, but
an batch would also be ok.
2020-04-20 15:10:21 +02:00
9f7bea6e83 Simulations: UI for core particle nodes
This commit adds the initial set of particles nodes. These are fairly
low level and are expected to be put into groups that we ship with Blender.

See D7384 for a description of the individual nodes.

Reviewers: brecht

Differential Revision: https://developer.blender.org/D7384
2020-04-20 14:47:13 +02:00
e7acf17b74 Nodes: Add emitters, events, forces and control flow socket types
These socket types will be necessary for particle nodes.
The way these sockets are drawn can be changed separately.

Reviewers: brecht

Differential Revision: https://developer.blender.org/D7349
2020-04-20 13:41:21 +02:00
8759813abd Nodes: New Object and Image socket types
Those new socket types will be necessary for particle nodes.

The main difficulty with adding these socket types is that they
are the first that reference ID data in their `value`.
Therefore, user counting code had to be added in a couple new places.

Reviewers: brecht, mont29

Differential Revision: https://developer.blender.org/D7347
2020-04-20 13:27:45 +02:00
2b2d3c14fe Simulations: Embed simulation node tree in simulation data block
This adds an embedded node tree to the simulation data block dna.
The UI in the `Simulation Editor` has been updated to show a list
of simulation data blocks, instead of individual node trees.

The new `SpaceNodeEditor.simulation` property wraps the existing
`SpaceNodeEditor.id` property. It allows scripts to get and set
the simulation data block that is being edited.

Reviewers: brecht, mont29

Differential Revision: https://developer.blender.org/D7301
2020-04-20 12:56:16 +02:00
8d53e59e32 Cleanup: Remove unnecessary callbacks where default behavior is fine
See comments in D7225.
2020-04-20 11:22:55 +02:00
1b01d10998 Cleanup: typo 2020-04-20 11:22:55 +02:00
67593a41dd Merge branch 'blender-v2.83-release' 2020-04-20 11:20:38 +02:00
25e774422c Cleanup: ID management: Light ID type.
Keep IDType code at head of each ID file, instead of mixing it with more
specific API. Also do not define callbacks when defautl generic handling
is fine.
2020-04-20 11:20:05 +02:00
bc71074d0a Fix T75922: Removing custom orientation doesn't update gizmo 2020-04-20 19:12:46 +10:00
0247ee5f53 Simulations: Add simulation node tree type
This implements a new builtin node tree type called `SimulationNodeTree`.
It is not yet embedded in the `Simulation` data block.

The node tree will initially be used for the new particle nodes system.

When the cmake option `WITH_NEW_SIMULATION_TYPE` is enabled, a new
`Simulation Editor` is shown in the editors menu (which is just a node editor).

This patch does not add entries to the Add Node menu, so it is empty.

Reviewers: brecht

Differential Revision: https://developer.blender.org/D7287
2020-04-20 10:58:43 +02:00
eb4e3bbe68 Simulations: Add new simulation data block
This data block will be the container for simulation node trees.
It will be used for the new particle node system (T73324).

The new data block has the type `ID_SIM`.
It is not visible to users and other developers by default yet.
To enable it, activate the cmake option `WITH_NEW_SIMULATION_TYPE`.

New simulation data blocks can be created by running `bpy.data.simulations.new("name")`.

Reviewers: brecht

Differential Revision: https://developer.blender.org/D7225
2020-04-20 10:45:18 +02:00
5f5ec7b0ed Merge branch 'blender-v2.83-release' 2020-04-20 18:36:48 +10:00
005bba2a81 Keymap: Add sequencer scrub with box-select & RMB select
Also support selecting by dragging a box over the strips which
previously did nothing.
2020-04-20 18:35:41 +10:00
0e7871f9c3 Merge branch 'blender-v2.83-release' 2020-04-20 17:40:39 +10:00
0e6c56760c Fix T74600: Sequencer blade tool inaccessible with RMB select
Declare `anim.change_frame` explicitly for each editor.

In sequencer, scrubbing in editor area is possible only with
select/tweak tool.

This change is to resolve conflict between scrubbing and tool actions.
2020-04-20 17:15:47 +10:00
2a96e8be39 Cleanup: redundant parenthesis, NULL checks 2020-04-20 12:15:49 +10:00
9d3b1d361d Merge branch 'blender-v2.83-release' 2020-04-20 12:15:03 +10:00
23bb42a06e Cleanup: accidental value declaration with struct type 2020-04-20 12:11:12 +10:00
b293517d7b Merge branch 'blender-v2.83-release' 2020-04-20 11:58:15 +10:00
30bfa991f8 Fix invalid comparison checking button unit type
Checking button unit type was length for proportional
multi-button adjustment wasn't working.
2020-04-20 11:54:47 +10:00
9776b8a05e Merge branch 'blender-v2.83-release' 2020-04-20 02:19:42 +02:00
Pablo Dobarro
28f667c7c4 Fix T75778: Missing ME_VERT_PBVH_UPDATE in Surface Smooth
Without this flag the PBVH won't update taking the modified vertices
into account.

Reviewed By: brecht

Maniphest Tasks: T75778

Differential Revision: https://developer.blender.org/D7453
2020-04-20 02:18:28 +02:00
7e72b74713 Fix T75766: Smooth mask using mesh vert indices direclty
In the vertex iterator vd.index should always be used. I probably
introduced this in a refactor.

Reviewed By: jbakker

Maniphest Tasks: T75766

Differential Revision: https://developer.blender.org/D7446
2020-04-20 02:14:11 +02:00
44a386b88c Fix T75329: Missing show_face_sets checks for Multires
These values were hardcoded before Face Sets were enabled for Multires,
so enable the show_face_sets checks now.

Reviewed By: jbakker

Maniphest Tasks: T75329

Differential Revision: https://developer.blender.org/D7444
2020-04-20 02:12:28 +02:00
65aaa13a00 Fix T75662: Surface Smooth filter not checking face sets
In the main mesh filter loop vertex that do not have the active face set
are skipped, so in the following surface smooth displacement loop these
vertices were deformed using an uninitialized laplacian_disp value.
Now the main loop initializes the laplacian_disp for all vertices and
the deformation based on face sets is skipped in the second loop.

Reviewed By: jbakker

Maniphest Tasks: T75662

Differential Revision: https://developer.blender.org/D7443
2020-04-20 02:10:42 +02:00
Pablo Dobarro
35cbf3b5dc Fix crash on Multires Face Set visibility sync
Multires uses the data of the Face Sets stored in the base mesh to
manage the grid's visibility, so these pointers can no longer be set to
NULL when editing Multires objects as they are requried for some operations.

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D7431
2020-04-20 02:07:49 +02:00
251234ad43 Merge branch 'blender-v2.83-release' 2020-04-20 01:06:49 +02:00
d290bdd42a Fix missing Outliner selection syncing on "Select Hierarchy"
Adds syncing to a few operations that change selection, to avoid some
annoyances (like drag and drop of hierarchy to a different collection
only linking the parent to the collection).

Note that there's further refinement work for selection syncing in
D5572, but is awaiting some code design decisions. Meanwhile such quite
annoying issues should be fixed.

Addresses T75610.
2020-04-20 01:00:02 +02:00
a331d79900 Fluid: Fix for caches being released when file is loaded 2020-04-19 21:15:40 +02:00
76c1a91cfa Fluid: Fix for inconsistent behavior with flow and effector objects
Fixes issue with flow and effector objects which were not being used after resuming a bake job.
This issue has been reported in T75729 and T75758.
2020-04-19 21:15:40 +02:00
6c4a7e0ac3 Fluid: Added missing outflow object type to enable / disable flow flag
There is no reason to not include outflow objects here too.
2020-04-19 21:15:40 +02:00
c1c97c3d4a Merge branch 'blender-v2.83-release' 2020-04-19 21:07:59 +02:00
2816b22b38 Fix T75902 Workbench: render crash 2020-04-19 21:07:47 +02:00
1760b8c59f Fix T75878: Modifiers disappearing from UI
Typo in 4f9a56cbc4.
2020-04-19 19:06:11 +02:00
d7f05fd445 Fix T74809: Use after free when merging specific areas
Was incorrectly triggering animation for panels which would be free'd
before the animation ended.
2020-04-19 19:05:49 +02:00
5cc7e2ae16 Cleanup: Remove extra line 2020-04-19 17:29:35 +02:00
Cody Winchester
a39a6517af GPencil: Add Texture modifier
This patch aims to add a new modifier for grease pencil objects that gives more control over the strokes texture UVs.

There are 3 modes.
1 Control the stroke texture UVs alone
2 Control the fill texture UVs alone
3 Control both the fill and stroke texture UVs

For the stroke texture UVs there are 2 options for fitting the texture to the stroke.
1 The texture uvs are kept a consistent length how it currently is set by default.
2 The uvs are normalized to fit the length of the stroke regardless of how long or short it gets allowing the texture to fit the length of the stroke.

 There are then 2 controls to scale up and down the uvs and an offset value that allows moving the texture along the stroke.

For the fill texture UVs it includes all of the transformational controls. Location offset, scale, and rotation.

Reviewed By: antoniov, mendio

Differential Revision: https://developer.blender.org/D7439
2020-04-19 17:29:35 +02:00
a0a59972e7 Fix T75878: Modifiers disappearing from UI
Typo in 4f9a56cbc4.
2020-04-19 15:03:44 +02:00
3cd147b49f Fix T74809: Use after free when merging specific areas
Was incorrectly triggering animation for panels which would be free'd
before the animation ended.
2020-04-19 14:36:22 +02:00
1f1520a045 Merge branch 'blender-v2.83-release' 2020-04-18 18:48:40 +02:00
89d49ae218 GPencil: Disable animation for Onion Custom Colors
This was forgotten by error. All Onion props must be disabled.
2020-04-18 18:48:17 +02:00
221a7002a9 GPencil: Make properties animatable
Make use lights and mask properties animatable.
2020-04-18 16:23:58 +02:00
bfdcb6bed6 GPencil: Add header to Use Lights
This use the new header column
2020-04-18 16:18:17 +02:00
1c62ba80b1 Merge branch 'blender-v2.83-release' 2020-04-18 16:09:48 +02:00
101f00e696 GPencil: Fix missing patch of default Material names 2020-04-18 16:09:22 +02:00
a444c7e0e2 Merge branch 'blender-v2.83-release' 2020-04-18 13:16:20 +02:00
d809a0260e GPencil: Fix duplicated default brushes and change settings
Removed old duplicated brushes and change the settings of some brushes.
2020-04-18 13:15:51 +02:00
fda754145a Annotations: Add Onion Skin support in VSE
This was removed in previous versions, but can be useful in some situations.
2020-04-18 10:49:42 +02:00
62103e7d42 Industry Compat keymap: Add keys for Remesh 2020-04-18 08:33:38 +02:00
746684519b UI: Use new layout features for the NLA sidebar
Improves alignment.
2020-04-18 08:32:21 +02:00
f96a689b3b Merge remote-tracking branch 'origin/blender-v2.83-release' 2020-04-17 18:20:16 -06:00
Gary Oberbrunner
8fd9516a71 Fix: Build error on headless build
This simple patch removes an "UNUSED_VARS" macro referencing
a variable which doesn't exist (r_unit_size).

It only affects the headless build

Differential Revision: https://developer.blender.org/D7464
Reviewed By: harley
2020-04-17 18:19:56 -06:00
0fe8239470 UI: Make headings fit within regular Properties width
Before recent changes, we used Min/Max here too.
2020-04-17 22:06:06 +02:00
a6c14faa06 Merge branch 'blender-v2.83-release' 2020-04-17 22:04:10 +02:00
76b3aac802 Fix T75842: GPencil Edit mode of unselected object is visible
The overlay must be enabled only for the active object.
2020-04-17 22:03:46 +02:00
59d7fbb052 Merge branch 'blender-v2.83-release' 2020-04-17 21:54:26 +02:00
156319d2b3 Fix T74199 Overlay: Turning off overlays also hides edges 2020-04-17 21:53:38 +02:00
842e817bf7 Fix T73815 Overlay: Z axis line doesn't show alone on the workspace 2020-04-17 21:08:34 +02:00
c3994aa443 Fix typo causing compilation to fail
Sorry guys I thought I had compile before testing.
2020-04-17 20:57:25 +02:00
f2acfb460f UI: Add separator after Local Camera row 2020-04-17 20:43:12 +02:00
b7d603b41c Fix T75832 DRW Hair: Crash caused by shader compilation
This also fix it the volume velocity needles.
2020-04-17 20:43:05 +02:00
cad1ddc1e8 GPU: Fix typo making RG16F use 16 bytes instead of 4 2020-04-17 20:28:55 +02:00
2fc8daff10 GPU: Fix missing SRGB8_ALPHA8 debug string 2020-04-17 20:27:58 +02:00
a2f075b996 Merge branch 'blender-v2.83-release' 2020-04-17 19:42:53 +02:00
75ded99ff9 Fix T75811: GPencil Sculpt not working when use Subdivide
When use the subdivide modifier the number of points was not correct and can produce segment faults.

Also, the points were selected by default and this was wrong.
2020-04-17 19:41:57 +02:00
23c52d9584 Merge branch 'blender-v2.83-release' 2020-04-17 18:41:25 +02:00
e491573060 Fix poor video sequencer preferences UI layout
Sequencer related properties were not grouped together, and it wasn't
clear that the disk cache settings were about the sequencer. Now moved
sequencer settings into own panel.
2020-04-17 17:59:14 +02:00
1f232e9ae9 Merge branch 'blender-v2.83-release' 2020-04-17 17:53:37 +02:00
f915549ee7 Fix T75786: GPencil Modifiers were not overridable... 2020-04-17 17:49:12 +02:00
4ffa5e5703 Fix (unreported) bda locking of whole GP modifiers whem GP obdata is linked.
Only applys to obdata feature is supposed to be locked in that case, not
the whole modifier.
2020-04-17 17:49:12 +02:00
398d0bf57e Fix python registration error in previous commit 2020-04-17 17:08:37 +02:00
7fc60bff14 UI: Layout changes for new checkbox layout possibilities
Follow-up to previous commit.

Some examples:
{F8473507} {F8473508} {F8473509} {F8473510}
For more screenshots, please see D7430.

We use column or row headings here to bring more structure, and to give
the eye visual anchors which aid eye-scanning. The left-aligned
checkboxes likewise help with this. And we keep the adherence to the
center line, so the alignment matches up between the various buttons and
controls.

* Changes the property split percentage from 50/50% to 40/60%. This is
  needed to give enough space for the checkboxes. But in most cases this
  looks better anyway - see Transform panel. In some cases it simply
  fills out the available space more efficently.
* Fix various hacks where we previously used manually defined splits.
  When we did this, the alignment was never quite right, and the layout
  code was a mess.
* Adds column headings to many places where a list of checkboxes all
  share a common purpose or leading text.
* Add checkbox + value configurations various places where a checkbox
  only serves to enable the value slider
* Removes most uses of grid flow layout. The grid flow layouts combine
  poorly with column headings, and also they would mess alignment up
  badly. The grid flow layouts also often made buttons and controls jump
  around on the screen if you would just resize editors slightly,
  causing visual confusion, making users lose their place. The logic for
  at what time the list of items would re-flow was often flawed, jumping
  to multiple columns too fast or too late - and frankly, the grid flow
  layouts would often just look bad.

Maniphest Task: https://developer.blender.org/T65965

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

Reviewed by: Brecht Van Lommel, Pablo Vazquez.

Most work here by William Reynish, few changes by Julian Eisel.
2020-04-17 17:00:57 +02:00
219049bb3b UI: Better split layout support for checkboxes
Makes the following layout changes possible:
{F8473498} {F8473499} {F8473502}

The next commit will contain many layout changes to make good use of
these new possibilities. The result should be more consistent, easier to
read and should give a more organized impression. Additionally, it
should be possible to replace many sub-panels with compacter layouts.

Main changes:
* Checkboxes now respect the property split layouts
* Add support for row and column headers (i.e.
  `uiLayout.column(heading="Foo")`, `uiLayout.row(heading="Bar")`). If the
  first property added to this layout doesn't insert anything into the label
  split column, the heading is inserted there. Otherwise, it's inserted as own
  item.
* Add support for manually inserting decorators for an existing item
  (`uiLayout.prop_decorator()`). That way layout creators can manually insert
  this, which was the only way I saw to support property split layouts with a
  checkbox before the actual property. {F8471883}
* Autogenerated layouts for operator properties look bad if there are only
  checkboxes (which only use half the region width). So before creating the
  layout, we iterate over visible properties and disable split layout if all
  are booleans. I think this is fine, if needed we could also add layout hints
  to operators.
* `uiTemplateOperatorPropertyButs()` now handles macros itself, the caller
  used to be responsible for this. Code that didn't handle these so far never
  used macros I think, so this change should be invisible.
* Remove manual property split layout from autogenerated operator properties
  layout.
* Padding of checkboxes is tweaked to make their label visually more connected
  to the checkboxes.
* Support split layout for menus (should work for `uiLayout.menu()`,
  `.operator_menu_enum()`, `.prop_menu_enum()`, maybe more)

Maniphest Task: https://developer.blender.org/T65965

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

Reviewed by: Brecht Van Lommel, William Reynish, Pablo Vazques
2020-04-17 17:00:57 +02:00
20614d331d Merge remote-tracking branch 'origin/blender-v2.83-release' 2020-04-17 16:39:40 +02:00
6adb254bb0 Fix T75686: Animating scene audio volume doesn't work
Scene audio volume changes require the scene to be tagged with
`ID_RECALC_AUDIO_VOLUME` (see `BKE_scene_update_sound()`). Tagging
happens in the RNA update function `rna_Scene_volume_update()`, but that
function is not called by the animation system. As a result, animated
volume changes are not sent to the audio system.

This commit adds a new depsgraph operation node that sets this tag when
necessary, so that the animated values are used in the rest of the
depsgraph evaluation.

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D7429
2020-04-17 16:33:05 +02:00
d923fb784f Task: Separate Finalize into Reduce And Free
In preparation of TBB we need to split the finalize function into reduce
and free. Reduce is used to combine results and free for freeing any
allocated memory.

The reduce function is called to join user data chunk into another, to reduce the
result to the original userdata_chunk memory. These functions should have no side
effects so that they can be run on any thread.
The free functions should free data created during execution (TaskParallelRangeFunc).

Original patch by Brecht van Lommel
{rB61f49db843cf5095203112226ae386f301be1e1a}.

Reviewed By: Brecht van Lommel, Bastien Montagne

Differential Revision: https://developer.blender.org/D7394
2020-04-17 16:06:54 +02:00
74fcb531de Merge remote-tracking branch 'origin/blender-v2.83-release' 2020-04-17 08:05:13 -06:00
27941b027b Windows: Fix working directory issue in debug batch files
Batch files did not work when you ran them from a
different working directory.
2020-04-17 08:04:49 -06:00
795a874d0b Merge branch 'blender-v2.83-release'
Conflicts:
	source/blender/makesdna/DNA_userdef_types.h
	source/blender/makesrna/intern/rna_userdef.c
2020-04-17 15:16:16 +02:00
c565d0764f Enable new undo code by default.
Note that given how experimental is working currently, I had to rename
and inverse the effect of the experimental undo flag, which will now
instead activate legacy code when set.
2020-04-17 15:13:25 +02:00
a250be980a Fix T74805 Workbench: Back faces flicker with Auto Depth is enabled 2020-04-17 14:57:36 +02:00
96825403a6 Overlay: Fix unreported bug: Edit mode overlays drawing during auto depth
This would double draw the edit cage on top of the other overlays.
2020-04-17 14:57:35 +02:00
95a018aa32 Workbench: Fix unreported bug: garbage viewport when changing AA settings
Was caused by uninitialized buffer.
2020-04-17 14:57:35 +02:00
c87dd76937 Fix T75774: rename Musgrave texture output from Fac to Height
To make it clear that's not in the 0..1, but more of a terrain height value
without a strict range.
2020-04-17 14:28:24 +02:00
493c623b13 Merge branch 'blender-v2.83-release' 2020-04-17 20:24:03 +10:00
adc6659de5 Fix T75820: Child bone head vanishes when connected parent is hidden 2020-04-17 20:21:25 +10:00
40d90456ea Fix logical error in BLI_hash_pointer_to_color
'hash_b' was always zero as it's range was bit-shifted away.
2020-04-17 19:30:14 +10:00
f8ca1da138 Merge branch 'blender-v2.83-release' 2020-04-17 19:19:22 +10:00
1b7ceb0aff Fix normal smoothing for light positioning gizmo 2020-04-17 19:18:08 +10:00
53ff71725a Merge branch 'blender-v2.83-release' 2020-04-17 18:52:27 +10:00
b6279b7415 Fix T75794: Light point gizmo translate jumps
Holding Ctrl while dragging the light point gizmo would use
uninitialized stack memory if the normal had not been
initialized by a surface.

Now holding Ctrl can be used to drag,
even when there is no surface to orient to.
2020-04-17 18:51:09 +10:00
e77821eeca Merge branch 'blender-v2.83-release' 2020-04-17 18:17:23 +10:00
774b61189c Fix T75796: Misaligned quit dialog keymap 2020-04-17 18:09:05 +10:00
841b0c2bf5 Merge branch 'blender-v2.83-release' 2020-04-17 08:25:10 +02:00
42224bf623 GPencil: Add always empty frame when add new layer
The dopesheet needs to have a frame to display the channel, so an empty frame is created in the current frame.

See T66505 for details of why an empty channel cannot be displayed.
2020-04-17 08:24:22 +02:00
03faffa10b UI: support A-Z accelerator keys for pie menus
Converting menus to PIE's was removing convenient key accelerators.
2020-04-17 15:50:47 +10:00
f1f68b3f9a Fix toggling quad-view loosing 3D view clipping 2020-04-17 15:30:18 +10:00
19c7ef3067 UV: minor adjustments to opacity adjustment
- Allow 0.0..1.0 range, as even at 0.0 the selection is still visible.
- Correct versioning code, not to overwrite the value for new files.
2020-04-17 13:53:15 +10:00
cbd6c5735d GNUmakefile: remove style checking targets
This has been removed since clang-format now enforces code-style.
2020-04-17 12:33:40 +10:00
0f0436c15e Cleanup: comments for ui_draw_menu_item & correct argument name 2020-04-17 11:16:48 +10:00
ab93e568eb Cleanup: use colon after doxygen parameters, spelling 2020-04-17 11:15:00 +10:00
0733bd0d64 UI: Fix bad flow layout
The layout of the new sequencer disk cache were not handled well with 
large preference windows.
2020-04-16 20:00:14 -04:00
27e39cc533 GPencil: Add always empty frame when add new layer
The dopesheet needs to have a frame to display the channel, so an empty frame is created in the current frame.

See T66505 for details of why an empty channel cannot be displayed.
2020-04-16 22:43:41 +02:00
9029690a5d UI: Remove old hacks for dynamic scrollbar hiding
Although we still dynamically hide scrollbars, they don't change the
region size anymore. They are simply drawn on top of the region content.
Because of this, some hacks introduced by fa28e50ac2 are no longer
necessary.
Without these hacks, the scrollbar visibility is evaluated much more
often (cheap operation) which should be more reliable and possibly solve
some glitches.

Also replaces integers passed as booleans.

Fixes T75782.
2020-04-16 20:50:51 +02:00
b374fcc98f Merge branch 'blender-v2.83-release' 2020-04-16 17:45:07 +02:00
8cb10c124e Fix T75675: Unlinking [with setting users to zero] not clearing
LIB_TAG_EXTRAUSER_SET flag

For example in the Image Editor, an assert would be triggered after
unlinking an image [with setting users to zero] and then setting the
image for the Image Editor again.

Whenever we set an Image for Image Editor, the Image ID is flagged
LIB_TAG_EXTRAUSER_SET, when we unlink [with setting users to zero] this
flag was not cleared.

quote @mont29: "a proper fix would be to move this to modern code, and
actually delete the ID..." but that is for later.

Maniphest Tasks: T75675

Differential Revision: https://developer.blender.org/D7452
2020-04-16 17:38:05 +02:00
67ddf68dd9 Merge branch 'blender-v2.83-release' 2020-04-16 17:09:01 +02:00
e9bf624a49 Fix T75680: Nodegroup user count increased when file saved in edit group mode.
This editor's code was a bit schizophrenic, some parts considering its
nodetree usages as real refcounted ones, others, as shallow 'user one'
ones...

Editors should not be real ID users anyway, unless there are *very* good
reasons for it, so swich it to fully 'shallow' usage now.
2020-04-16 17:08:46 +02:00
db600fd639 Fix Memory Leak in Shader Interface 2020-04-16 16:55:46 +02:00
2a68b41b7d Fix T74964 Stereo 3D anaglyph and interlace not working
Caused by framebuffer initialized in the wrong context.
2020-04-16 16:24:22 +02:00
e22e766cf8 Merge branch 'blender-v2.83-release' 2020-04-16 16:22:08 +02:00
81bb2a143c Fix T75730: Properly remove unused override properties/operations.
While code is supposed to handle gracefully invalid override operations,
it is much cleaner to avoid those completely.
2020-04-16 16:21:11 +02:00
dac6091207 Fix (unreported) crash on use-after-free in liboverride deletion code. 2020-04-16 16:21:11 +02:00
0438944b34 Refactor/strengthen a bit invalid operands checks when applying an override operation. 2020-04-16 16:21:11 +02:00
e3d575b376 Fix T75730: Crash on read of liboverride data when missing source modifier.
While this should not happen, we still want to handle those errors
gracefully from user perspective (i.e. assert for devs, no crash for
users).

Actual fix of root cause of the issue will come later.
2020-04-16 16:21:11 +02:00
d34c5eec19 GPU: Fix Negative Shift
glAttributes also include `gl_` names. These don't have a location and
should be ignored during shader interface creation. Those internal names
received a location of -1 and therefore the bitmasking was undefined.

Users wouldn't notice this, but ASAN warned developers of this situation.
ASAN could quit making ASAN un-usable as most shaders have this issue.

Reviewed By: Clément Foucault`

Differential Revision: https://developer.blender.org/D7448
2020-04-16 16:20:40 +02:00
Brecht Van Lommel
79a58eef05 Fix T73977, T73825: ignore Python user site-packages directory by default
This goes along with the existing changes to ignore PYTHONPATH by default.
--python-use-system-env now controls both.

Differential Revision: https://developer.blender.org/D6962
2020-04-16 15:58:31 +02:00
a1420da027 Merge branch 'blender-v2.83-release' 2020-04-16 15:57:37 +02:00
a9dd6d004b Fix T75780: Gpencil Sculpt brushes not working with old files
The patching of brushes was not done.
2020-04-16 15:53:58 +02:00
816597d6da Fix T75785: "Extrude Faces Along Normals" throws error 2020-04-16 10:44:48 -03:00
8a506b9660 Merge branch 'blender-v2.83-release' 2020-04-16 10:32:46 -03:00
dcb443416e Fix memcpy overlapping buffers
This crashes with ASAN enabled.
```
==39366==ERROR: AddressSanitizer: memcpy-param-overlap: memory ranges [0x6230000ae848,0x6230000ae85a) and [0x6230000ae851, 0x6230000ae863) overlap
```
2020-04-16 10:31:51 -03:00
7ef2dd8424 UI: Move node socket icons to the left of node input buttons
Node input buttons (e.g. in the material properties) used to draw their
icons on the right of the buttons. However since they represent inputs,
it makes more sense conceptually to have them on the left.
Further, we might want to add the usual decorator buttons (to control
keyframes or display other states) to the material properties as well.
Having two circle icons next to each other would be confusing.

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

Reviewed by: Brecht Van Lommel, William Reynish
2020-04-16 15:29:19 +02:00
675d42dfc3 UI: Draw real node sockets for node input buttons
For buttons representing node inputs (e.g. in the material properties)
rather than drawing some generic socket icon, the actual sockets are
drawn now. That includes color, shape and the selection outline.

This should make it easier to understand what these buttons relate to.

Screenshots: {F8469252}, {F8469248} (The left alignment will be done in
a follow-up commit.)

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

Reviewed by: Brecht Van Lommel, Clément Foucault, William Reynish
2020-04-16 15:29:19 +02:00
737a4309e8 Cleanup: typo in comment 2020-04-16 15:22:15 +02:00
cdd406f4bd Cleanup: unused variable warning
Not needed since rB1685f5824d91.
2020-04-16 14:34:14 +02:00
13876d50ce Merge branch 'blender-v2.83-release' 2020-04-16 14:12:09 +02:00
3ea4d3dc07 Fix (unreported) Image Editor UI drawing too dark
Caused by rBf0221ff6674f.

Only draw the Image buffer itself in display space.

Differential Revision: https://developer.blender.org/D7449
2020-04-16 14:04:30 +02:00
70a6c737ec Cleanup: Deduplicate getting node tree from id
Differential Revision: https://developer.blender.org/D7438

Reviewers: mont29
2020-04-16 12:06:01 +02:00
3468434b6b Theme: adjust active UV face color in the theme
This color had it's alpha reduced in the drawing code,
as the active face is no longer stippled.

Now the color is used from the theme without adjusting the alpha.
2020-04-16 18:46:32 +10:00
90d3fe1e4d UV: support changing the opacity of the UV overlay
Add this option as it's useful to adjust how much UV's
cover the image when UV mapping.

D5348 by @EitanSomething with edits
2020-04-16 18:26:07 +10:00
ec263547b5 Merge branch 'blender-v2.83-release' 2020-04-16 08:58:25 +02:00
Jeroen Bakker
5d9d246851 GPUImmediate: Use 2 Buffers For (Un)Strict
We used to have a single buffer that was shared between strict and
unstrict draw calls. This leads to many recreation events for the draw
buffers. This patch separates the Unstrict draw buffer from the strict
draw buffer.

This improves performance on Windows Intel 10th gen platform.
On a reference platfor before the patch I got 10 FPS, after this patch
it became 34fps. Note that the same test normally on a low end GPU can
get to 60fps so this does not solve all teh bottlenecks yet.

Reviewed By: Clément Foucault

Differential Revision: https://developer.blender.org/D7421
2020-04-16 08:46:31 +02:00
Jeroen Bakker
502b8e0f08 GPUViewport: Use GPUBatch for viewport drawing
When drawing the viewport to the screen the draw calls were not batched.
This resulted in measurable slowdown on Windows Intel 10th gen
platforms.

This patch would cache the last draw calls per viewport. Our API does
support partial redrawing of the viewport, but that isn't used anywhere.

This patch does not include stereoscopy rendering. This still uses the
imm approach and would still be slow on certain hardware.

Reviewed By: Clément Foucault

Differential Revision: https://developer.blender.org/D7357
2020-04-16 08:41:53 +02:00
a703bbb4d7 Fix T75567: Paint Mode Wireframe Incorrect
The loop normal VBO is used in two manners. In edit mode to draw the
edge normals. And in paint mode to draw the wireframe. This commit
checks which VBO is needed and build the correct one.

This allows show the wireframe correct in paint mode, when the object is
subdivided.

Reviewed By: Clément Foucault

Differential Revision: https://developer.blender.org/D7419
2020-04-16 08:34:55 +02:00
ef19cd395f Fix T75455: High World Space Cavity Samples Crash
When setting the number of cavity samples to a high number blender could
write out of bounds.

This patch will harmonize the number of iterations in the same way how
it is done during execution.

Reviewed By: Clément Foucault

Differential Revision: https://developer.blender.org/D7425
2020-04-16 08:32:34 +02:00
0301aff285 Fix T75620: Lamp gizmo flips direction for negative scaled objects 2020-04-16 15:55:04 +10:00
e322f7a3a2 UI: disable shade flat/smooth in sculpt mode 2020-04-16 12:06:50 +10:00
002752f021 Object: only apply smooth/flat to the active object in paint modes
Also some minor improvements:

- Only run once per object data instance.
- Correction for mesh smooth flag being used on curves.
- Move curve operation into utility function.
2020-04-16 11:47:48 +10:00
1685f5824d Cleanup: remove unused scene argument 2020-04-16 11:05:52 +10:00
bc0ed16537 Cleanup: use sections for object_edit.c 2020-04-16 10:59:41 +10:00
d409ce1593 Logging: log warnings which had been disabled since 2.4x 2020-04-16 10:59:41 +10:00
32cd853294 Merge branch 'blender-v2.83-release' 2020-04-16 00:31:33 +02:00
f0221ff667 Fix T75750 Image Editor: Rendered result is much brighter than in viewport 2020-04-15 23:34:19 +02:00
e0d7b6c78d Fix T75751 Overlay: Clipping Region crashes Blender 2020-04-15 22:30:55 +02:00
e08ac50a5c Fix T75443 Color Management: Use after free crash when using curve mapping
The root cause is that viewport can draw cached version of themself but
the scene can have been updated and the pointed curvemapping could have
been freed.

To workaround this we just keep a copy of the curvemap at the viewport
level.
2020-04-15 22:30:55 +02:00
851baa40a1 Operator: Add 'dissolve_and_intersect' option for 'Extrude and Move on Normals'
This allows easy choice of operators when editing keymaps
2020-04-15 16:02:28 -03:00
03a931a876 Cleanup: Remove unused operator 2020-04-15 16:02:28 -03:00
ed8184cff0 UI theme: Make Properties panels opaque
The resulting colors are unchanged, but panels now appear opaque when dragging over other panels
2020-04-15 20:12:43 +02:00
3b0d86d8b1 UI: Draw subpanels on top while dragging
Currently the background of a panel is drawn on top of its subpanels
when it is dragged. The solution is to also "select" the subpanels so they
are drawn on top in UI_panels_draw.

Differential Revision: https://developer.blender.org/D7440
2020-04-15 13:11:48 -05:00
e9a3a1afd1 Mantaflow: Change Defaults to Improve Instantaneous Playback
- Change the default cache method to replay
- Change the default resolution to 32 (The same as old smoke)
  which have a speedup of about 4x (~4 FPS vs. ~16 FPS on initial 
playback)

Peformance was tested with 3700x and RTX 2070

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

Fixes T73799
2020-04-15 13:54:08 -04:00
f49ffd7f1c Update RNA Manual References 2020-04-15 13:48:59 -04:00
11a6d840da Merge branch 'blender-v2.83-release' 2020-04-15 18:50:17 +02:00
Vincent Blankfield
eb46b55e56 Fix T75613: "In Front" setting did not override image empty "Depth"
Differential Revision: https://developer.blender.org/D7418

Reviewers: campbellbarton, brecht
2020-04-15 18:49:32 +02:00
4dc534aa04 Merge branch 'blender-v2.83-release' 2020-04-15 17:46:09 +02:00
f250b1f5a0 Fix assert for Image Editor invert/resize operators
Caused by rB2bf4c74130ff.

For undo, the ImageUser's scene should be NULL (see D7022 for
discussion).

PaintTiles were already doing it beforehand in ED_image_paint_tile_push,
but Image ops [scale/invert] are calling
ED_image_undo_push_begin_with_image directly.

Now actually set the UndoImageHandle iuser.scene to NULL (rather than
asserting)

ref T75675

Maniphest Tasks: T75675

Differential Revision: https://developer.blender.org/D7435
2020-04-15 17:20:59 +02:00
ec574b5b09 Cleanup: remove (unused) RNA update cache
Introduced in 2011 in rB6a392e8cb505, it was disabled again soon after
in rBb062056c05a3 and traces to it partly removed in rB21744217cea9.

Now remove completely.

quote @sergey:
We shouldn't be having partially working unused code.
If we ever need some sort of update cache it would need to have clear
design first, and the code could be resurrected from history if needed.

Differential Revision: https://developer.blender.org/D7432
2020-04-15 17:05:33 +02:00
b79a5bdd5a View3D: New tool 'Extrude, Dissolve and Intersect'
Basically this new tool constitutes a macro that uses the parameters of
the Extrude and Translate operators that were recently implemented.

Thanks to @CandleComet for initial implementation.

Differential Revision: https://developer.blender.org/D7222
2020-04-15 12:01:54 -03:00
8f86da71fe Operator: Add 'use_automerge_and_split' option for Translate 2020-04-15 12:01:54 -03:00
fe513a5b61 Operator: Add 'use_dissolve_ortho_edges' option for Extrude 2020-04-15 12:01:54 -03:00
7af84255c7 Cleanup: typo 2020-04-15 16:57:28 +02:00
debd8aab4a UI: default to searching menus instead of operators
Menus from the top-bar, space-header and key bindings are used
to gather menus to populate the search popup.

Giving better context and default options for operators.

Part of T74157

Enabling "Developer Extras" exposes operator search in the Edit menu,
as this can be useful for developers to run operators
without first exposing them in the interface.
2020-04-16 00:32:30 +10:00
f83ccbc673 Cleanup: unused variable, spelling 2020-04-16 00:12:39 +10:00
549b854187 Fix: Replace ID_HA with ID_PT in pointcloud.c 2020-04-15 15:57:25 +02:00
7d1c7a6485 Fix splash screen not showing button to load config from 2.83 into 2.90 2020-04-15 15:54:42 +02:00
Nathan Letwory
5fb4ff7711 Ensure 2.90 is still alpha for bcon1 2020-04-15 16:02:24 +03:00
Nathan Letwory
69a2af7e84 Merge branch 'blender-v2.83-release' 2020-04-15 16:01:49 +03:00
Nathan Letwory
b9ec9afce1 Bump master to 2.90 alpha for bcon1 2020-04-15 16:01:35 +03:00
7de86ad61f Fluid: Improved cache 'Replay' option
When using the 'Replay' cache mode the cache needs to be invalidated whenever simulation variables have been changed.
The invalidation will always only affect the according subcaches, e.g. when changing a mesh paramter only the mesh cache will be invalidated, the base cache will remain intact.
Before this change Blender always invalidated the entire cache.
2020-04-15 14:22:47 +02:00
0f6044610f Fluid: Cleanup in MANTA main class
More concise return types for cache import functions and general cleanup.
2020-04-15 14:22:47 +02:00
d9db8f8b7c Fluid: Remove noise bake call from Python
Saving noise cache files is handled in fluid.c.
2020-04-15 14:18:00 +02:00
e21fdfc8e4 Fix T75681: Mantaflow crash when trying to bake a cupcake: The CG solver diverged, residual norm > 1e30
Ensures that there are no enclosed holes between an obstacle and the domain walls.
2020-04-15 14:18:00 +02:00
d6de81eed6 Fluid: Minor UI fix for diffusion panel
Was missing active option.
2020-04-15 14:18:00 +02:00
Nathan Letwory
54736d5058 Bump release cycle to beta for 2.83 2020-04-15 15:03:05 +03:00
Nathan Letwory
9ca1b721b4 Ensure master points at latest submodule heads 2020-04-15 14:41:47 +03:00
8fcbbcf2e6 Fix unreported Auto IK crash when using targetless IK.
Needed to use a temporary pchan iterator to make sure that we keep track
of the selected bone.
2020-04-15 13:25:44 +02:00
6547d9d3e2 Fix T75649: Using "Auto IK" on FK controls with Rigify will crash Blender.
Fixed a coding mistake when adding temp IK chains with Auto-IK.
We need to use the data from the new temporary constraint.
2020-04-15 12:36:14 +02:00
Henrik Dick
c1edbe7917 Fix mistake from last commit to solidify.
While review the behaviour was changed accidentally.
Now Solidify just crashes everytime.

This is the fix for that.

Reviewed By: mont29

Differential Revision: https://developer.blender.org/D7434
2020-04-15 12:07:58 +02:00
Yevgeny Makarov
bdf260a1b8 UI: Avoid manual right-alignment of text in splash screen
Can use existing layout features for right-alignment instead.

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

Reviewed by: William Reynish, Julian Eisel
2020-04-15 11:49:25 +02:00
Yevgeny Makarov
04828b7d99 UI: Round splash image corners according to theme preferences
Round the corners of the splash screen image according to the theme's
User Interface > Menu Back > Roundness preference.

Previously the rounding was added to the image itself, which was fiddly
to do. The rounded corners of the popup background would not match
the one of the image if the preference was changed.

The current splash image will likely be updated to not include rounded
corners in a separate commit.

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

Reviewed by: Julian Eisel (with some changes)
2020-04-15 11:49:25 +02:00
69419b5f00 Resources: Remove small splash screen image variant
After the previous commit by Harley Acheson, scaling can be handled at
runtime so we don't need to have two splash screen image variants
anymore.
Also removes the `splash_scale.sh` script used to create the down-scaled
variant.
Always nice to get rid of some binary files from the repository :)
2020-04-15 11:49:25 +02:00
ad3bcee081 UI: Automatically scale splash screen image
Previously, there had to be two splash images to deal with different
DPI settings and hiDPI screens. The larger version was simply downscaled
in an external program for the small one. When up-scaled, the images
would look rather badly.
We now handle scaling completely at runtime. The results should look
pretty much identical for most cases. When up-scaled it should look
better though.
New bundled splash images should have a width of 1000px or more (used to
be 1002px).

More details with screenshots and comparisons in D6999.

Reviewed By: William Reynish, Julian Eisel

Differential Revision: https://developer.blender.org/D6999
2020-04-15 11:49:25 +02:00
Henrik Dick
51e73e9956 Fix crash whith Simple Solidify and Bevel Convex.
After recent changes, simple solidify modifier would crash with Fill Rim
turned off and Bevel Convex emabled.

Also fixes that simple solidify would not set the bevel weight flag so the
next modifier could use the bevel weights.

Simple cleanup with do_rim is also included.

Reviewed By: mont29

Differential Revision: https://developer.blender.org/D7428
2020-04-15 11:09:20 +02:00
530008df1d Fix incorrect UI_SEP_CHAR checks
- Menu drawing function used first instance instead of last.
- Menu hash function checked for the character without first
  checking UI_BUT_HAS_SEP_CHAR was enabled.
2020-04-15 17:36:34 +10:00
e17bee5b7f Cleanup: missing-prototypes warning 2020-04-15 17:36:30 +10:00
44b9f6a888 Fix T74881: Plane-track corner drag fails with LMB select
Fix from 8a5a306a83 caused tweaking to fail in the clip editor,
as it wasn't using same convention of other selection operators that
returned the pass-through flag to allow tweaking too.
2020-04-15 15:21:46 +10:00
5e05db3419 Fix shader error sRGB gizmo drawing workaround
Issue in 21c658b718 with function being defined twice.
2020-04-15 14:49:01 +10:00
0d4eefd231 Fix T75712: Sequencer text strip doesn't scale to render size 2020-04-15 14:20:14 +10:00
1bb241437c Fix menu search using exec instead of invoke by default
Caused edit preferences not to open.
2020-04-15 13:36:04 +10:00
92113e2da7 Fix menu search omitting the outliner context menu
Use a regular context menu as a fallback for the outliner.

If there are no specific actions for the item under the cursor,
fall through to opening a regular menu.

This lets menu search find the context menu items which were previously
unavailable as menu search wont run operators.
2020-04-15 13:04:13 +10:00
af91bbc221 UI: expand names of collection menu 2020-04-15 13:04:13 +10:00
e74535df08 Cleanup: shadow warning 2020-04-15 13:04:13 +10:00
04f006ea9e Fix T75733: Curve extrusion does not include endpoints
This error only occurs when the end points are part of
a sequence of selected points.
2020-04-14 17:14:16 -03:00
47f46637be Sculpt: New Layer Brush
The Layer brush was in Blender before 2.81, when the sculpt API was
introduced. It had a huge amount of bugs and glitches which made it
almost unusable for anything but the most trivial cases. Also, it needed
some hacks in the code just to support the persistent base.

The brush was completely rewritten using the Sculpt API. It fulfills the
same use case as the old one, but it has:
- All previous artifacts fixed
- Simpler code
- Persistent base now works with multires thanks to the sculpt API
- Small cursor widget to preview the layer height
- More controllable and smoother strength and deformation
- More correct masking support
- More predictable invert support. When using persistent base, the brush invert mode resets to layer height 0, instead of jumping from +1 to -1. The brush can still be inverted in the brush direction property.

Reviewed By: jbakker

Differential Revision: https://developer.blender.org/D7147
2020-04-14 21:07:29 +02:00
7dd8c889f1 Sculpt: Sharpen Mesh Filter
This mesh filter sharpens and smooths the mesh based on its curvature,
resulting in pinching hard edges and polishing flat surfaces. It fixes
most of the artifacts of the voxel remesher and those produced when
sculpting hard surfaces and stylized models with creasing and flattening
brushes.

It needs and accumulate_displacement step before each filter iteration which
can't be multithreaded in an easy way (it would need something to sync the
threads when modifying the data of neighbors in a different node), but this
does not affect performance in a significant way.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D7335
2020-04-14 21:00:14 +02:00
f881ff129f Fix Shift-Smooth mode using wrong parameters
When using the shift-smooth mode, sculpt_update_cache_invariants is
changing the brush datablock of the paint session if it finds a brush
named "Smooth" (which is a huge hack the brush management project should
try to solve). This is done after the PaintStroke data in the modal
operator is created, which holds a reference to the active brush in the
paint session that was active when the operator started. Because of
this, the StrokeCache was getting the correct smooth brush values but
the paint modal operator was applying the wrong ones from the previous
brush. This was causing the smooth brush behaves unpredictably depending
on the current active brush.

This patch updates the brush in PaintStroke on each modal callback, so
it always gets the values from the current active brush in the Paint
Session.

The way brush switching works and a way to make it more flexible needs
to be discussed in the future as part of the brush management project.

The default smooth brush parameters and curves will probably need to
be updated after this change, as previously they were set using an
incorrect behavior.

Reviewed By: jbakker

Differential Revision: https://developer.blender.org/D7354
2020-04-14 20:55:38 +02:00
f12589d335 Fix automasking using the wrong active face set
All tools should now use the API function to get the active face set
directly from the face under the cursor.

Reviewed By: jbakker

Differential Revision: https://developer.blender.org/D7362
2020-04-14 20:53:42 +02:00
bb9a282c7e Fix Randomize Face Sets Colors not working in Multires
The operator was disabled when it was added because Face Sets were not
supported in Multires.

Reviewed By: jbakker

Differential Revision: https://developer.blender.org/D7312
2020-04-14 20:52:10 +02:00
21c658b718 GPUShader: Implement workaround for gizmo drawing on sRGB framebuffer
This solution involves adding a uniform to each fragment shader that is
used by gizmo drawing and use the framebuffer state to set this uniform
accordingly.

This solution can also be carried to external shaders (addons).
A single line of code would then be enough to fix the issue.

The only trickery here is the dummy define:
`#define srgb_to_framebuffer_space(a)`
This is in order to avoid breaking other DRW shaders that use the same
fragment shader code but do not need the tranformation.

Related to T74139

Reviewed By: brecht, campbellbarton

Differential Revision: https://developer.blender.org/D7261
2020-04-14 20:44:56 +02:00
bf49bb354f Fix T75104: Update Face Sets visibility when entering Sculpt Mode
Geometry that was just added to sculpt mode has the SCULPT_FACE_SET_NONE
assigned, so it was hidden by default. By doing this when entering
sculpt mode a new visible face set is created for it, making it easier
to isolate it again if you want to do further tweaking with the sculpt
tools.

Also, this also fixes the issue that may happen when changing the mesh
visibility in edit mode. Now visibility changes done outside sculpt mode
are stored in the face sets when entering sculpt mode, so mesh
visibility should stay the same.

Reviewed By: jbakker

Maniphest Tasks: T75104

Differential Revision: https://developer.blender.org/D7249
2020-04-14 19:24:44 +02:00
7fbd9b67af Fix Windows build error introduced in Wintab commit revert 2020-04-14 17:14:56 +02:00
e90d8422d0 Revert "Windows: support high resolution tablet pen events for Wintab"
This reverts commit 1a3928f33c and 1a3928f3. This is not working stable
with some Wintab implementations, so reverting for now. This leaves only
the Windows Ink changes for 2.83.
2020-04-14 18:58:37 +02:00
65f674b570 Fix T75535: Compositor backdrop gizmo dragging interrupts with node
mouse over

Caused by rB5929dd7129f6.

Above commit would reset the gizmo highlight on node mouseover.
This would also assert in gizmo_rect_pivot_from_scale_part() and stop
the drag.

So now, only reset the gizmo when we are not in EVT_GIZMO_UPDATE,
allowing for starting the tweak outside a node and then travelling
'inside' while still preventing to use it over a node when starting a
tweak there.

Maniphest Tasks: T75535

Differential Revision: https://developer.blender.org/D7383
2020-04-14 18:32:30 +02:00
dc66fa5c9c Fix T75589: Image Sequences have no data on file load.
Issue was with setting of frame to load from an image sequence,
synchronization was not done properly at some point, leading to
generation of an invalid final filepath to be read.
2020-04-14 18:12:59 +02:00
d4ead6e639 Cleanup: Remove unused defines 2020-04-14 16:17:46 +02:00
00466e756e RNA: Fixed incorrect depsgraph tagging for Object.color and pass_index
These options do not influence the transform, but do (potentiall) influence
the shading.
2020-04-14 16:09:01 +02:00
7bfb7450a2 Fix showing check-boxes in menu-search 2020-04-14 23:50:00 +10:00
de47bf69da Cleanup: remove text editor 'select' option that did nothing 2020-04-14 23:33:57 +10:00
b800a05c55 Revert "Cleanup: remove unused text.selection_set select option"
This reverts commit 9af0cdcd93.

Removed this feature because of confusion
caused by incorrect description.
2020-04-14 23:33:57 +10:00
693b88f152 EEVEE: Motion Blur: Fix crash when motion blur is not enabled 2020-04-14 15:33:07 +02:00
Vincent Blankfield
50dd876fbf Fix T75629: Disallow dragging collection instance into itself
Differential Revision: https://developer.blender.org/D7408
2020-04-14 15:12:26 +02:00
2ed2dd7b13 GPencil: Add missing 2.82 Random Layer color removed in refactor
Use a single color by object in grease pencil is not practical because is necessary to see all layers.

To tint by layer, the layer tint parameter is used and not the material color as is done in other modes.

This function has been backported from 2.82 because was removed in the 2.83 refactor.
2020-04-14 12:48:11 +02:00
Henrik Dick
cc9bee9162 Add Complex Solidify option for thickness per face
Add an option to solidify complex which will make faces which have thickness
controlled by vertex weights flat/even, and parallel to their original face.

For each face it uses the minimal weight assigned to its vertices to control
the thickness.

This will help users for example in architecture or basic CAD design by finally
making solidify work there at all if altering thickness is needed.

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

Reviewed and minor cleanups by Batien Montagne (@mont29).
2020-04-14 12:36:21 +02:00
Henrik Dick
35b1cc806f Improve Solidify/Bevel Modifier cooperation
Adds a slider to solidify which allows the user to add bevel weight on the outside
or remove bevel weight from the inside.

Also includes a very small improvment for working with subsurface modifier where
the rim edge in complex solidify will now also have a chance to get a crease if
there is only two adjacent edges.

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

Reviewing and minor cleanups: Bastien Montagne (@mont29).
2020-04-14 12:18:22 +02:00
b07e8a24f5 Cleanup: remove unnecessary branch when lib linking constraints
Differential Revision: https://developer.blender.org/D7386

Reviewers: mont29
2020-04-14 11:50:36 +02:00
6e272b9ba4 BLI_math: add min/max utils for chars. 2020-04-14 11:29:46 +02:00
Brecht Van Lommel
47084bac9f Fix T75542: toggling modifier visibility not working correct with undo speedup
The problem was that in direct_link_id_restore_recalc, recalc_undo_accumulated
should contain the changes from the target state to the current state. However
it had already been cleared at that point, to start accumulating changes up to
the next undo push.

Delaying the clear of this flag seems like the obvious solution, but it's hard
to find the right place for that (if there is one). Instead this splits up the
flag into two separate variables.

Reviewed By: mont29

Differential Revision: https://developer.blender.org/D7402
2020-04-14 11:07:56 +02:00
e6d9d5dcc1 UI: improve menu search with dimmed menu prefix
- Show dimmed text for the menu entries leading up to the menu item.
- Show icons between the menu text and menu item.
- Use unicode right pointing triangle instead of arrow.
2020-04-14 18:50:28 +10:00
571646ebc1 Cleanup: pass font drawing x/y offset arguments as int's
Internally these values are ints.
2020-04-14 18:41:23 +10:00
3bef5d15d8 UI: add spin to extrude menu
This tool wasn't accessible anywhere in the interface
(besides the interactive tool).

Add to extrude since it's a kind of extrusion.
2020-04-14 18:34:07 +10:00
0fa7e1efbe UI: correct menu used for dope-sheet 2020-04-14 18:30:27 +10:00
b2c2d7b7f1 Sculpt: Implement undo of Apply Base during sculpt session
The idea is to push both base mesh geometry and PBVH coordinates
so it is possible to undo everything without loosing data which was
not flushed from sculpt session to base mesh.

It is possible do memory optimization to avoid push custom data
layers which are not touched by operator, but before doing that
better to ensure this is a correct and working approach.

Differential Revision: https://developer.blender.org/D7381
2020-04-14 09:46:17 +02:00
9e0b44aae9 Cleanup: ed_util_imbuf sections 2020-04-14 10:49:31 +10:00
5f059c8751 Cleanup: spelling 2020-04-14 10:49:31 +10:00
9ce83acba4 Cleanup: remove redundant include, clang-format 2020-04-14 10:49:23 +10:00
ad317a5ffd Fix T75676: Inconsistent "Only selected" GP layers in Dope Sheet
The selection was not checking all modes.
2020-04-13 19:13:04 +02:00
Henrik Dick
5cf7283342 Fix T75032: New complex solidify algorithm handles poorly merging threshold of small geometry details.
* Implemented the algortihm that would merge vertices to the weighted
  center between them.
* Exposed the merge threshold to the user.

The new default tolerance is 0.0001 (versionning code ensures that
previous default value remains in use to avoid any change in existing
files).

Review and minor changes/cleanups from Bastien Montagne (@mont29).
2020-04-13 17:15:16 +02:00
c19f37764d UI: Fix wrong icon used for Unified Color toggle 2020-04-13 15:47:41 +02:00
2e75172c45 Fix T75677: Annotation in compositor/shading tabs loose AA after drawing stroke
The drawing of annotations in 2D was using a very old code created in 2.6x versions. Now it's using a standard shader as it's done while drawing.
2020-04-13 15:15:47 +02:00
2ec6eca518 Cleanup: unused parameter... 2020-04-13 10:07:12 +02:00
e63d5f40ee Fix T75667: Use of incorrect terminology in the brush_colors_flip operator
- The word 'Flip' is incorrect. 'Swap' or 'Switch' is correct.
  - In Blender, we use 'primary' & 'secondary' color swatches, not 'foreground' and 'background'
2020-04-13 07:49:21 +02:00
71a333f56e Fix T75592: Correctly calculate length of curve verts
Previous commit to fix T75405 needed a small change to increase the
length of the front section of the curve when only the front is built.
2020-04-12 18:17:59 -05:00
68ba6378b5 VSE: Add sample tool
This tool is set as default tool, so default action on click doesn't have pernament effect.

Reviewed By: campbellbarton

Differential Revision: D7064
2020-04-13 00:28:27 +02:00
c456671b53 Refactor sample operator
Move sample operator functions to `ed_util_imbuf.c` and change common functions,
so they can be used in image editor and sequencer.

Reviewed By: campbellbarton

Differential Revision: https://developer.blender.org/D7315
2020-04-12 23:56:03 +02:00
0c9e47705d Fix T75421: Wipe clock and Iris transition not working.
Use enum items in RNA enum definition instead of hard-coded values.

Broken by 5dcb6fb22f Cleanup: unused enums

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D7342
2020-04-12 23:00:55 +02:00
bbf1c83370 Fix T74875: Preview shows previously cached frame after Hard Cut
Add method to invalidate strip cache in range of non-overlapping strip.
Invalidate original strip in range of new strip created by cutting.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D7313
2020-04-12 22:42:31 +02:00
5081556bb5 Fix T75415: Changing text strip "start" leads to flickering image
Cache must be invalidated before and after transformation,
so all frames are properly invalidated.

This also fixes wrong invalidated type, composite is enough here.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D7341
2020-04-12 22:27:28 +02:00
5cabf1301a Fix T75382: VSE Strip Adjustments Not Immediately Visible
Cache of effects wasn't invalidated on correct level.

Add invalidation "rule" for invalidating downstream effects.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D7343
2020-04-12 22:24:20 +02:00
Richard Antalik
77ca5ab6b0 Fix T74897: VSE animation doesn't work
`seq_free_animdata()` removes fcurve pointers belonging to strips from
`Scene` CoW datablock's `AnimData` during `BKE_scene_graph_update_for_newframe`.
This causes problems with updating animation.

This worked before rBbe2e41c397ba, because `AnimData` was freed by `BKE_animdata_free()`
before `seq_free_animdata()` was executed, so it had no data to operate on and returned
on precondition `if (scene->adt == NULL || scene->adt->action == NULL)`

Reviewed By: mont29, brecht

Maniphest Tasks: T74897

Differential Revision: https://developer.blender.org/D7264
2020-04-12 22:10:13 +02:00
5b79e0b80e Fix volume object not rendering correct frame right after loading 2020-04-12 15:44:28 +02:00
e2003d9212 UI: reorder adaptive sampling settings in order of importance 2020-04-12 15:44:28 +02:00
f16fcb5bd5 Fix volume object not loading frame sequences correct in some cases
Ensure we use the first frame as filepath so we can compute the number of
leading zeros. For file validation, always test the first frame rather than
the current scene frame.
2020-04-12 14:48:23 +02:00
3651ebb1db EEVEE: Motion Blur: Improve post processing
This improve the post process effect by implementing more accurate sampling
technique.

Details about the technique can be found here
https://casual-effects.com/research/McGuire2012Blur/McGuire12Blur.pdf
and here
http://www.iryoku.com/next-generation-post-processing-in-call-of-duty-advanced-warfare
2020-04-11 23:35:07 +02:00
0a747cd4e3 Cleanup: clang-format 2020-04-11 13:01:19 -06:00
aeb42cf8ab Cycles/Optix: Support building the optix kernels on demand.
CMake: `WITH_CYCLES_DEVICE_OPTIX` did not respect `WITH_CYCLES_CUDA_BINARIES` causing the optix kernel to be always build at build time.

Code: `device_optix.cpp` did not count on the optix kernel not existing in the default location.

For this to work, one should have before starting blender

1) working nvcc environment
2) Optix SDK installed and the OPTIX_ROOT_DIR environment variable pointing to it which is not set by default

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

Reviewed By: Brecht
2020-04-11 12:59:21 -06:00
ddfec08514 GPencil: Fix unreported missing update after removing stroke from python 2020-04-11 19:04:05 +02:00
85de07e64c Sanitize and cleanup a bit depsgraph relations building in some modifiers.
This commit mainly:
* Removes some uneeded dependencies to geometry of other objects (since
  we only use positions of those objects...).
* Ensures `DEG_add_modifier_to_transform_relation` is only called once
  per modifier (in one case at least it could be called twice).
* For modifiers using texture mask, only add dependencies to object used
  to generate texture coordinates when there is actually a texture set.

No behavior change expected from this commit...
2020-04-11 17:16:58 +02:00
5cc7036aa3 Factorize some common modifiers depsgraph relation update code.
Add a utility to deal with common 'object or posebone transform' case.
2020-04-11 17:16:58 +02:00
b0350d8310 Revert "GPUViewport: Use GPUBatch for viewport drawing"
This reverts commit 862ec82942. It causes crashes
on some systems, see T75584.
2020-04-11 16:42:01 +02:00
a8d139ca20 Fix for T75595: File Browser and Windows Unicode Paths
Fix for incorrect conversion to utf16 in BLI_file_attributes().

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

Reviewed by Brecht Van Lommel
2020-04-10 14:07:15 -07:00
Cody Winchester
4f9a56cbc4 Modifiers: Add Bone option for Texture Mask Object
This patch adds the option to use an armature bone in place of an object for texture mask coordinates.

This affects the 3 vertex weight modifiers, the displace modifier, the warp modifier, and the wave modifier.

With minor changes from Bastien Montagne (@mont29).

Differential Revision: https://developer.blender.org/D7348
2020-04-10 21:28:59 +02:00
d6cefef98f UI: Better support for linked data-blocks in search buttons
In RNA pointer search buttons (i.e. the ones with an eyedropper),
data-blocks were handled badly. It was not possible to select a linked
data-block that had the same name as a local one, which is especially
common with library overrides. Neither was there a hint to tell appart
linked data-blocks and which .blend file they come from.
These issues are addressed now, we show an "L" prefix and the .blend
file name in the search box (like in ID-templates).

Changes here are quite simple, since the heavy lifting was already done
through c20c203b82.

Addresses T73156.
2020-04-10 20:25:17 +02:00
d216a0b505 Fix T75489: Crash on deleting current workspace from the outliner
It should not be possible to delete the current workspace from the
outliner. Show an error message instead.
2020-04-10 17:30:43 +02:00
475d7d073a Fix T74800 Bevel modifier generates vertex group weight > 1.0.
Due to floating point approximations, the weights for interpolating
the mdeformvert layer could add up to a tiny bit more than 1.0.
This was not a problem in practice, but the mesh validation routine
used in regression tests was testing for this and therefore failing.
Just changed interpolation of mdeformverts to clamp max to 1.0f.
2020-04-10 11:03:27 -04:00
ab8e7ffc64 Fix T75378: Crash on clicking in the ghost icon of an appended proxy object 2020-04-10 11:21:55 -03:00
9a7f5f1bb4 Fix T67232: Multiples targetless IKs in a chain gives weird behaviour (known as FakeIK for FK posing)
The issue was that the deps graph relation builder assumed that all
bones that had a IK constraint on them would be evaluated.  However for
targetless IK bones, only the active bone would receive updates and the
others would be skipped (as those would be treated as if the IK
constraint was disabled).

I didn't see an easy way to solve this from the depsgraph side of
things.

Instead I came up with a solution that I feel is quite strait forward
and reflects what is actually supposed to happen under the hood.

Now all targetless IK constraints are treated as disabled and will not
be added to any relations in the depsgraph.

Instead, a temporary IK constraint will be created when the bone in
question is transformed.  This is basically activating "Auto IK" for the
bone while transforming.

Reviewed By: Sergey, Brecht

Differential Revision: http://developer.blender.org/D7378
2020-04-10 14:01:02 +02:00
9c5b054206 Fix T71546: VSE stereoscopic strips issues with mismatched dimensions
The issue is that the cachiing was adding the right view without the
proper pre-processed buffer.

D7389
2020-04-10 12:44:59 +02:00
0b86943641 Fix T74901: Smoke Simulation crashes on eevee and is not persistent on Cycles
Issue was introduced in 5260aaf3b1 (fix for T73921).
2020-04-10 12:10:23 +02:00
03dda57678 Fix T75141: Default template versioning error for grease pencil
The versioning was done only for template because the code was after a return and never was executed for default scene.
2020-04-10 10:54:46 +02:00
da48a8ef50 Fix T74815: Shapekeys animation is blocked after second append of the same object.
Logic to handle shepkeys datablocks in helper in 'make local' code that
checks which ID should be copied, and which can be directly made local,
was wrong.
2020-04-10 10:52:18 +02:00
d3cda49d14 Fix T74657: Grease Pencil Proportional Editing does not work for
'Individual Origins'

Note gpencil doesnt do anything fancy like meshes in
editmesh_islands_info_calc(), but it looks like there is actually no
harm in allowing proportional editing with individual origins & gpencil
editmode.

Maniphest Tasks: T74657

Differential Revision: https://developer.blender.org/D7351
2020-04-10 08:38:34 +02:00
337a7ed292 Pointclouds: fix point drawing
The radius component is only one float. This resulted in only a third of
intended points to draw and could lead to glitches.

Pointcloud drawing will still change a lot in the future, this is just
to be able to work on some simple tools.

Differential Revision: https://developer.blender.org/D7390
2020-04-10 08:34:07 +02:00
Nicholas Rishel
1a3928f33c Fix T75546: Solve possible endless loop in wintab initialisation
Some Wintab drivers report a zero length queue, this causes an unplanned never ending loop.

Differential Revision: https://developer.blender.org/D7392
Reviewed by: Ray Molenkamp
2020-04-09 16:43:09 -06:00
5ebbd8f672 Cleanup: comment bone cycling & simplify logic 2020-04-10 08:35:55 +10:00
d85e2beb67 Fix T75526: Color Management Look saved in 2.82a resets in 2.83
Missing versioning after `rB9f4b090eec39`.

Differential Revision: https://developer.blender.org/D7388
2020-04-09 17:56:36 -03:00
d7273f087d Fix T75405: Crash when increasing text object bevel depth
One fewer coordinate needs to be calculated when extrusion is zero to
avoid corrupting the end of the memory chunk.

Differential Revision: https://developer.blender.org/D7368
2020-04-09 15:29:49 -05:00
Bartosz Moniewski
054950def9 Shading: add Roughness input to Noise and Wave texture nodes
Currently in fractal_noise functions, each subsequent octave doubles the
frequency and reduces the amplitude by half. This patch introduces Roughness
input to Noise and Wave nodes. This multiplier determines how quickly the
amplitudes of the subsequent octaves decrease.

Value of 0.5 will be the default, generating identical noise we had before.
Values above 0.5 will increase influence of each octave resulting in more
"rough" noise, most interesting pattern changes happen there. Values below
0.5 will result in more "smooth" noise.

Differential Revision: https://developer.blender.org/D7065
2020-04-09 21:48:03 +02:00
Szymon Ulatowski
f3433fcd3b Collections: preserve exclude flag of child collections when unexcluding
Excluding a collection also changes the exclude setting on all child collections
so that it is possible to selectively enable some children without the parent
being enabled.

This change makes it so that if you unexclude the parent, the exclude setting
of children are restored again instead of being permanently lost.

Original patch by Szymon with modifications by Brecht.

Differential Revision: https://developer.blender.org/D7016
2020-04-09 21:46:22 +02:00
07bb7206c2 Cleanup: VSE rename i to view_id for stereo 3d code 2020-04-09 21:01:49 +02:00
78f56d5582 TaskScheduler: Minor Preparations for TBB
Tasks: move priority from task to task pool {rBf7c18df4f599fe39ffc914e645e504fcdbee8636}
Tasks: split task.c into task_pool.cc and task_iterator.c {rB4ada1d267749931ca934a74b14a82479bcaa92e0}

Differential Revision: https://developer.blender.org/D7385
2020-04-09 19:18:14 +02:00
Jeroen Bakker
862ec82942 GPUViewport: Use GPUBatch for viewport drawing
When drawing the viewport to the screen the draw calls were not batched.
This resulted in measurable slowdown on Windows Intel 10th gen
platforms.

This patch would cache the last draw calls per viewport. Our API does
support partial redrawing of the viewport, but that isn't used anywhere.

This patch does not include stereoscopy rendering. This still uses the
imm approach and would still be slow on certain hardware.

Reviewed By: Clément Foucault

Differential Revision: https://developer.blender.org/D7357
2020-04-09 19:12:51 +02:00
bf68e1a547 Cleanup: Remove unused var
This was not removed in previous fix.
2020-04-09 16:25:46 +02:00
464752876f Fix T75490: Child Of - difference between 2.82 and 2.83
rB10162d68e385 introduced a difference in computing the matrix, as well
as a better way to compute the inverse matrix. This commit reverts the
former, while keeping the latter and some other improvements.
2020-04-09 15:04:48 +02:00
a7df9d6cdd Fix menu search referencing image menu
In this case it was called mask which wasn't correct since it's
used for image & UV's, so rename the menu instead.
2020-04-09 22:55:47 +10:00
98abcfdb9d Cleanup: unused variable 2020-04-09 22:55:36 +10:00
a6d8f6c0f3 Fluid: Fix unused variables
Unsed variables for fluid caching.
2020-04-09 12:35:22 +02:00
a8bd385a5d Fix T75491: ctest: usd_test fails in a debug configuration
There was a bug in the `connect_loose_objects()` function, which caused
some objects to be exported twice (once for real, and once
transform-only). This is now resolved.
2020-04-09 12:18:45 +02:00
17da3b5d82 USD: ensure test does not depend on BLI_assert()
The test failure in T75491 only showed up in debug builds because
`BLI_assert()` is a no-op in release builds. This is now replaced by a
proper GTests call to `ADD_FAILURE()`, ensuring that the test fails
regardless of build mode.
2020-04-09 12:14:51 +02:00
80255e67e3 Silence assert on ID usercount for deprecated IPO.
We do not really care about those, so just avoid the noise when loading
very old files...

Re T75389.
2020-04-09 11:21:02 +02:00
36746474fd Tracking: Forward compatibility code for distortion models
Allows to open newer files in older Blender after new distortion model
has been added.

It will behave as if this is a polynomial model with all 0 coefficients
which are then being refined and assigned explicitly after solving the
motion.
2020-04-09 10:59:31 +02:00
b5e277ed05 Cleanup: Fix typo error 2020-04-09 10:58:42 +02:00
ee5cec4a50 Fix T75122: Annotations: Only visible scene annotations in dopesheet
The loop of datablocks was using the scene datablock (3D View) only, but all others datablocks were ignored.

Now the loop consider any annotation datablock.
2020-04-09 10:56:59 +02:00
bd59781c66 Fix T75425: Bone selection cycling not working
Edit-mode bone selection now cycles on successive clicks.
This now cycles through multiple edit-objects & bones.
2020-04-09 18:46:47 +10:00
7aef17d361 EEVEE: Motion Blur: Fix shutter delta 2020-04-09 03:59:13 +02:00
417f0d720b EEVEE: Motion Blur: Make motion blur closer to cycles by evaluating 3 step
For now we always center the delta around the frame time. We store 2 motion
steps, one before and one after the current frame. However, this also means
storing 2 motion vectors for each pixels, doubling the vram usage of the
motion vector buffer.

This patch also cleanup some uneeded complexity. We use the motion vectors
as is and don't use a multiplier.
2020-04-07 01:02:53 +02:00
ed58e3656a EEVEE: Motion Blur: Use orig_object->data instead of orig_data as key
This fix issue with some modifier setup
2020-04-07 00:58:35 +02:00
7b9a6f823b EEVEE: Implement deformation motion blur
This adds deformation motion blur by saving the vertex buffers of the
previous frame.

We modify the surface batch to pass the vert position as new attributes.
2020-04-06 17:55:49 +02:00
2f2fb4453f DRW: Batch Cache: Expose position vertex buffer to engine
This is in order to compute position deltas for motion blur. The engine
is responsible to handle the data. However it is not the owner of the data.
So a copy must be performed if the data needs to be kept accross frame.
2020-04-06 17:32:27 +02:00
f9f6042bcf GPUVertexFormat: Add Rename function
This is needed for motion blur.
2020-04-06 15:43:43 +02:00
16fd236e14 GPUVertBuf: Add duplication function 2020-04-06 15:06:40 +02:00
19352bca16 Cleanup: spelling 2020-04-05 22:22:21 +10:00
7df787b2c1 UI: English as Default Language
Set language setting for new profiles to English.

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

Reviewed by Brecht Van Lommel
2020-04-08 16:10:48 -07:00
1239cab11f Fix T75203: Crash when changing active keying set
When updating the active button, the search data wasn't updated, so it
kept using the old pointers. A check in `ui_rna_collection_search_cb()`
relied on this incorrect behavior so I had to fix that too. Note that
the previous commit was also needed for the second fix to work.

Caused by c46dcdf887.
2020-04-08 23:23:44 +02:00
74fa8787d8 Fix error in UI_butstore_ API
If the `uiButStore` data was freed after the buttons/blocks were updated
from previous instances (see `UI_block_update_from_old()`), e.g. by
delaying that to the "afterfuncs" (`ui_apply_but_funcs_after()`), the
data would get lost. As result, the button pointers that the API is
supposed to keep valid would point to freed memory.

This wasn't an issue so far since the API didn't happen to be used this
way. That changes with the next commit.
2020-04-08 23:22:33 +02:00
c13aa95eda Fix T75288: crash in Cycles image loading with multithreaded shader compilation 2020-04-08 22:01:04 +02:00
cc53c9e476 Fix T75290: Cycles crash with out of bounds memory access in volume mesh build 2020-04-08 21:58:17 +02:00
8360bfb75c Cleanup: clang-format 2020-04-08 21:58:17 +02:00
f405934fe3 Fix T75445: Filmic transform not working when using Turkish locale
This is a bug in OpenColorIO that we work around (see "Turkish I" problem),
a proper fix will be submitted upstream.
2020-04-08 20:50:50 +02:00
d41d4d0593 GPencil: Small changes to brush defaults 2020-04-08 19:03:17 +02:00
4a6f715421 Fix T73552: Mantaflow - liquid particles show up in organized unrealistic structure
Issue was being caused by a particle offset which was random but the same for every particle.
2020-04-08 18:29:26 +02:00
2328599e97 NewUndo: Fix (studio-reported) discrepency in proxies when undoing.
Took me an unreasonable amount of time to understand what was happening
here... Our beloved proxies, as usual, need some specific careful
handling.
2020-04-08 17:43:40 +02:00
b0f229dd27 Tracking: Fix missing distortion update on focal length change 2020-04-08 17:19:21 +02:00
020d1e23ae Fluid: Fix issue with mesh not being loaded
Fixed an issue that was likely introduced in a past cleanup.
2020-04-08 16:26:20 +02:00
34b28850bf Fix wrong material indicated in the error message when baking
The material displayed in the error message due to the lack of active
texture was that of the previous slot.
2020-04-08 09:44:43 -03:00
91d7f5d246 Fix T74572: adaptive sampling still not working correct with shader AOVs 2020-04-08 14:09:10 +02:00
fd487b1f4e Fix build error with WITH_X11_XINPUT=OFF after recent changes 2020-04-08 14:03:54 +02:00
ff2c67d7e8 Fluid: Disable subframes when using adaptive time-steps in the first frame
First frame should only produce inflow once and not compute the emission for the frame before the first frame. Problem became evident in T74062.
2020-04-08 13:42:40 +02:00
c2cb87f897 Fluid: Fix problem with inconsistent noise when using multiple adaptive time-steps
Problem was mentioned in T74062.
2020-04-08 13:27:12 +02:00
a1ddb63329 Fluid: Update Mantaflow source files
Update includes new grid helper functions and some cleanups.
2020-04-08 13:25:16 +02:00
7cafdc57e0 Fluid: Manta clang-format update
Do not use sort-includes in Manta source files for now when applying clang-format. Too many conflicts.
2020-04-08 13:20:18 +02:00
ea5a2efb57 Fix manual reference error after removal of use_international_fonts 2020-04-08 12:43:49 +02:00
Nicholas Rishel
ea3e0b3e8c Windows: support high resolution tablet pen events for Wintab
Together with Windows Ink support, this should fully resolve T70765.

Differential Revision: https://developer.blender.org/D6675
2020-04-08 12:25:40 +02:00
Nicholas Rishel
d571d615a5 Windows: support high resolution tablet pen events for Windows Ink
Rather than using the last state of the tablet, we now query the history of
pointer events so strokes can follow the pen even if Blender does not handle
events at the same rate.

Differential Revision: https://developer.blender.org/D6675
2020-04-08 12:25:40 +02:00
Nicholas Rishel
3d8c57f4da Cleanup: minor refactoring of pointer event handling
Ref D6675
2020-04-08 12:25:40 +02:00
Nicholas Rishel
4e4bf241c8 Cleanup: add utility functions for milliseconds conversion
Ref D6675
2020-04-08 12:25:40 +02:00
c43473e884 Cleanup: remove GHOST API to query tablet state from Window
It's not used by Blender anymore and it's unreliable since this state really
only makes sense associated with events in a particular order.

Ref D6675
2020-04-08 12:25:40 +02:00
Miguel Pozo
d478cc71dd Fix Windows Tablet API preference not being used
It was sometimes set before reading preferences, now it's passed to GHOST every
time preferences are read.

Differential Revision: https://developer.blender.org/D5641
2020-04-08 12:25:40 +02:00
a3c1605581 Cleanup: rename to BLI_path_cwd to BLI_path_abs_from_cwd
This is now more clearly a function that makes the path absolute
using the current working directory.
2020-04-08 16:46:16 +10:00
57468ae37e Cleanup: missed renaming BLI_cleanup_unc_16 in recent refactor
Missed from d14e768069
2020-04-08 16:29:46 +10:00
b0d565e5b6 Cleanup: reduce scope of variables in custom data copying 2020-04-08 16:27:59 +10:00
35861a49ee Fix T67098: Inset causes shape keys to reset exiting edit-mode
Edit-mesh interactive redo reset the meshes shape-key index.

Also copy the selection mode when copying meshes.
2020-04-08 16:26:54 +10:00
bd45ec0b06 Cleanup: disable clang-format for character table 2020-04-08 13:29:51 +10:00
1c58311440 Fix status bar message showing saved when saving failed
Resolves the following issues:

- For the first time you save a .blend file, there was no feedback.
- If the file fails to save (eg "No space left on device") the status
  bar message replaces the error with an invalid "Saved" message.

  While there is a popup, the user may cancel it with mouse motion
  and be left with the status bar message saying the file saved.

D7371 by @XDroid with edits.
2020-04-08 13:22:00 +10:00
056ebb56b1 Cleanup: clang-format 2020-04-08 10:34:39 +10:00
1ec2f8d1f2 Cleanup: spelling 2020-04-08 10:33:56 +10:00
161c13e12b Fix building without translations enabled 2020-04-08 10:24:33 +10:00
1ee3def5d3 UI: Splash Screen Language Selection
Quick Setup splash now includes language selection.

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

Reviewed by Brecht Van Lommel
2020-04-07 16:33:52 -07:00
9d0f452076 Fix missed depsgraph update after undo in some cases
Forgot to take into account legacy DEG_id_tag_update with zero flag.
2020-04-07 23:56:07 +02:00
a2243f1b51 Debugging: change Undo/Redo redraw timer to include dependency graph update
This is often the slowest part and was not counted before.
2020-04-07 23:43:55 +02:00
968619d036 UI: Language Selection Changes
Removal of 'Translation' checkbox. Enable translation options when selecting non-English languages.

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

Reviewed by Brecht Van Lommel
2020-04-07 13:25:49 -07:00
53981c7fb6 Cleanup: refactor adaptive sampling to more easily change some parameters
No functional changes yet, this is work towards making CPU and GPU results
match more closely.
2020-04-07 20:29:48 +02:00
7b4b07a7dd GPencil: Fix unreported problems with Chisel brush
With the new sampling, the arc points were not using the angle of the brush and the line was with the same thickness in all orientations.
2020-04-07 20:07:58 +02:00
6b58571813 UI: Don't collapse all panels for subpanels
The behavior for subpanels was incorrect, and the ideal behavior isn't even clear.

This disables the "collapse all" ctrl click feature for panels that have parents.

Differential Revision: https://developer.blender.org/D7355
2020-04-07 11:51:08 -05:00
c5ed2eb95e Undo: change depsgraph recalc flags handling to improve performance
These changes only have an effect when the experimental Undo Speedup preference
is enabled.

* For DEG_id_tag_update, accumulate recalc flags immediately before the undo
  push happens instead of afterwards. Otherwise the undo state does not
  contain enough flags, and the current state may contain too many flags.

  This also means we call DEG_id_tag_update after undo with the accumulated
  flags to ensure they are flushed to other datablocks.

* For undo, accumulate recalc flags in id->recalc and clear accumulated flags
  immediately. Not clearing would cause circular behavior where accumulated
  flags may never end up being cleared.

  This matches what happens after an undo push where these are also cleared,
  indicating that the undo state and current in-memory state match exactly.

* Don't change id->recalc of identical datablocks, it should not be needed.
  There is one exception for armatures where pointers across datablocks
  exist which otherwise would cause problems. There may be a better solution
  to this but it seems to work in agent 327 production files.

* This contains a change in undofile.c to avoid detecting all datablocks as
  changed for the first of the two undo steps, where we restore to the state
  of the last undo push before going to the one before.

  Without this the whole system is much less efficient. However this is unsafe
  in the sense that if an app handler or operators edits a datablock after an
  undo push, that change will not be undone.

  It can be argued that this is acceptable behavior, since a following undo push
  will include that change and this may already have unexpected side effects.

Ref T60695

Differential Revision: https://developer.blender.org/D7339
2020-04-07 17:14:19 +02:00
02598e629e Fix T73566: Mesh analysis, error showing intersecting faces 2020-04-08 00:43:47 +10:00
3a5c16f1c9 Fix T74720: bmesh.ops.delete default context argument does nothing 2020-04-07 23:23:17 +10:00
1de5cb6a31 Cleanup: use doxy sections 2020-04-07 23:23:17 +10:00
3a65397473 Fix T75471: Outliner: crash selecting modifier objects/targets that are in a excluded collection
There is no garuantee 'outliner_find_id()' can find those corresponding
TreeElements, safeguard against failure now.

note: not sure why this was no problem in Release builds? (could only
reproduce crashes in Debug builds...)

Maniphest Tasks: T75471

Differential Revision: https://developer.blender.org/D7365
2020-04-07 15:08:50 +02:00
5e0465e4ec Fix T75343: Wireframe overylay is not working properly with multiple modifiers
Since rBcf258b02f449, only wires and edges that are mapped to the
original mesh were drawn if the mesh was modified by modifiers.
Above commit was only meant for showing orig wires for paint mask
overlays [where final wireframe is not desired], so now only use
MR_EXTRACT_MAPPED when we are in a paint mode.

Maniphest Tasks: T75343

Differential Revision: https://developer.blender.org/D7333
2020-04-07 14:47:06 +02:00
4a83832120 Fix T74828: Fluid: Crash with Fire/Smoke Noise
Issue was that the noise simulation was trying to bake with a minimized domain size (adaptive domain initializes domain with size (1,1,1)). Similarly to the base resolution bake, there should be no noise baking happening at those domain sizes - a domain at this size is considered empty.
2020-04-07 14:31:33 +02:00
ea78f9922e Fluid: Fixed assertion error
Fix for new assertion statements that were introduced in bfdc42d990.
2020-04-07 14:31:33 +02:00
5892622d68 Revert "Fix memory leak in recent panel drag widget cache"
This reverts commit 58e20b432a.

Was calling discard twice, tsk.
Although for some reason it did quiet the leak.

Reverting because this is causing a crash.
2020-04-07 22:09:37 +10:00
ee43cf5722 Fix T66751: Symmetrizing armature does not symmetrize constraints.
The symmetrize operator now tries to make sure that the armature
constraints are correctly mirrored.

Before it would only mirror the subtargets for the constraints (and that
failed too in some cases).

Reviewed By: Sybren

Differential Revision: http://developer.blender.org/D6009
2020-04-07 13:54:22 +02:00
6feeede47f Fix Blender not rebuilding when changing linker script 2020-04-07 13:44:18 +02:00
58e20b432a Fix memory leak in recent panel drag widget cache
Memory leak from 60d873bd22.
2020-04-07 21:34:25 +10:00
aaaa0a43af Build: use -no-pie for portable builds on Linux
Otherwise file browsers do not recognize the Blender executable. This is
already done for official releases.

We leave it off for non-portable builds, since that's how Linux distribution
packages will typically build Blender and we can continue to follow the OS
default there. Using a file browser to launch executables from e.g. /usr/bin
would be rare as wel.

Differential Revision: https://developer.blender.org/D7363
2020-04-07 13:32:42 +02:00
e953ada0bb Cleanup: avoid memory allocation for unchanged datablocks in undo
Differential Revision: https://developer.blender.org/D7336
2020-04-07 13:19:52 +02:00
c786f95871 Cleanup: split partial undo code off into functions, tweak debug prints
Differential Revision: https://developer.blender.org/D7331
2020-04-07 13:19:52 +02:00
7bc99fdb32 Cleanup: simplify logic for partial undo in ID read
Differential Revision: https://developer.blender.org/D7330
2020-04-07 13:19:52 +02:00
826e4ba99c Cleanup: skip reading UI datablocks entirely for undo
Other types of datablocks pointing to UI datablocks is unsupported, so
there is no need to store them in fd->libmap. With the experimental undo
speedup enabled preserving such pointers was done. But it didn't work in
2.82 and such pointers are easily lost in cases other than undo.

Differential Revision: https://developer.blender.org/D7329
2020-04-07 13:19:52 +02:00
d2a07c7b78 Cleanup: delay creating datamap until it's actually needed
Differential Revision: https://developer.blender.org/D7328
2020-04-07 13:19:52 +02:00
44e5f7a8cf Cleanup: don't use global variable for test if IDs are identical
Differential Revision: https://developer.blender.org/D7327
2020-04-07 13:19:52 +02:00
c75aaf5329 Cleanup: split off library and linked datablock undo restore
Differential Revision: https://developer.blender.org/D7326
2020-04-07 13:19:52 +02:00
624b231ec4 Cleanup: early out on invalid ID data to simplify control flow
Differential Revision: https://developer.blender.org/D7325
2020-04-07 13:19:52 +02:00
0aac74f18f Cleanup: split off direct_link_id() function
Differential Revision: https://developer.blender.org/D7324
2020-04-07 13:19:52 +02:00
c4def7992b Fix T73598: Pose options - Auto IK. Bones move on release
The issue was that the code tried to use the bones transformation matrix
as a rotation matrix. This works fine as long as the scale is 1.

Now we simply make sure that we only get a pure rotation matrix when
extracting it for the bone's transformation matrix.
2020-04-07 13:15:43 +02:00
9fca9b9953 Fix crash using object.to_mesh() when in edit mode
The root of the issue was caused by mesh which was a result of to_mesh()
had the same edit_mesh pointer as the input object, causing double-free
error.

This fix makes it so result mesh does not have edit mesh pointer.
Motivation part behind this is to make the result of to_mesh() to be
somewhat independent from the input.

Differential Revision: https://developer.blender.org/D7361
2020-04-07 12:50:45 +02:00
49deda4ca2 GPUBatch: Correctly Free Panel Widget Batch
The GPU Batch for the panel drag widget wasn't freed anywhere. This
patch will free the GPUBatch.
2020-04-07 10:46:44 +02:00
cdbb61704d Fix T75128: Select Linked fails when the selection is a delimiter
Starting select linked failed when the selected vertex or edge
was it's self delimiting.

Support using these elements for linked select
as long as they're part of an isolated selection.
2020-04-07 17:43:27 +10:00
ffe599b4bd Fix T68159: Normals point target crashes when exiting edit-mode
When the modal operator passes events, free the internal state of
the operator as we can't be sure those events don't cause the mesh data
to be re-allocated or removed.

Longer term it might be best to make this into a tool since
the main purpose of this operator is to run other actions.
2020-04-07 16:28:29 +10:00
284d28acbc Cleanup: remove unused BM_total_loop_select function 2020-04-07 15:32:09 +10:00
17193f6c76 UI: rename 'smoothen' to 'smooth'
Other smooth operators use term 'smooth'.
2020-04-07 15:12:18 +10:00
a1eb5ec81c Cleanup: doxy sections, move utility function to editmesh_utils.c 2020-04-07 14:46:13 +10:00
7c4391e6aa Fix T60069: repeated extrusion uses wrong axis 2020-04-07 13:42:50 +10:00
d14e768069 Cleanup: BLI_path.h function renaming
Use BLI_path_ prefix, more consistent names:

  BLI_parent_dir              -> BLI_path_parent_dir
  BLI_parent_dir_until_exists -> BLI_path_parent_dir_until_exists
  BLI_ensure_filename         -> BLI_path_filename_ensure
  BLI_first_slash             -> BLI_path_slash_find
  BLI_last_slash              -> BLI_path_slash_rfind
  BLI_add_slash               -> BLI_path_slash_ensure
  BLI_del_slash               -> BLI_path_slash_rstrip
  BLI_path_native_slash       -> BLI_path_slash_native

Rename 'cleanup' to 'normalize', similar to Python's `os.path.normpath`.

  BLI_cleanup_path  -> BLI_path_normalize
  BLI_cleanup_dir   -> BLI_path_normalize_dir
  BLI_cleanup_unc   -> BLI_path_normalize_unc
  BLI_cleanup_unc16 -> BLI_path_normalize_unc16

Clarify naming for extracting, creating numbered paths:

  BLI_stringenc -> BLI_path_sequence_encode
  BLI_stringdec -> BLI_path_sequence_decode

Part of T74506 proposal.
2020-04-07 12:10:36 +10:00
d54757e389 Cleanup: clang-format 2020-04-07 11:57:36 +10:00
4e7c65035b UI: Use Consitent Menu Layout for Bone Names 2020-04-06 21:45:41 -04:00
e9b4d2ca68 UI: Use Consistent Operator Name
Was called "Subdivide Multi" in Bone Edit and "Subdivide" in Mesh Edit
2020-04-06 21:05:53 -04:00
10f0e003a9 Fix T74572: adaptive sampling not scaling AOVs correctly 2020-04-06 23:23:48 +02:00
e05552f7c4 Revert "Fix T74572: adaptive sampling not scaling render passes correctly"
This reverts commit 82a8da0ec3. It was completely
wrong. Fixes T75388.
2020-04-06 23:23:48 +02:00
29b87b5615 Fix T75357: USD export broken on windows
Path to the jsons was wrong so they were not copied
2020-04-06 14:38:52 -06:00
71a52bbe2a Fluid: Ensure correct velocities for noise bake
Make sure that noise uses the unaltered velocity grid. This is particularly important once external velocities get added to the velocity grid.
2020-04-06 17:48:32 +02:00
60d873bd22 GPU: Panel Drag Widget Drawing Performance
The 10g Intel/Win driver doesn't work well with our emulated
intermediate mode. This patch alters the drawing of the drag widget of
the panels to reduce unneeded drawing.

The previous method would draw 16 boxes per widget. This new way would
cache this drawing in a GPU batch and just move the matrix around.

Reviewed By: Clément Foucault

Differential Revision: https://developer.blender.org/D7345
2020-04-06 16:51:48 +02:00
71b1ee940b Don't take into account time remapping when scrubbing with AV sync.
It would cause the playhead to be remapped to an other frame than the
one you clicked on.
2020-04-06 16:34:15 +02:00
Maxim Vasiliev
c544df997e Fix user counting when ungrouping a node group.
Existing code for ungrouping did not correctly handle user counters:

- counter for the group was not decremented
- counters for containing nodes were not incremented

The latter resulted in losing some nodes after orphan cleaning or several save/reload cycles.

The bug did not have destructive consequences until recently,
because it was compensated by another bug (fixed in rBe993667a46c2).

Maniphest Tasks: T74665, T74682

Differential Revision: https://developer.blender.org/D7332
2020-04-06 16:27:52 +02:00
Roman Kornev
95f51bb01d Keymap: sort exported key-maps
This makes the resulting key-maps easier to compare.
2020-04-06 23:37:54 +10:00
3d439aa29b Cleanup: keep parameter docs above the function body 2020-04-06 23:22:11 +10:00
5dde5dd44e Libmv: Use static scheduler for threading
For a real-world distortion the payload is quite uniformly
distributed across scanlines. Surely, in the corners more
iterations of minimizer is needed, but that happens in threads
without scheduling overhead.
2020-04-06 15:18:32 +02:00
7e93d4eea3 Tracking: Fix (un)distortion happen in single thread
Need to communicate available number of threads to the camera
intrinsics implementation, otherwise default value of 1 is used.

Must have been single-threaded for a very long time.
2020-04-06 15:18:32 +02:00
2903fb6929 Fix T75444: typo in tooltip 2020-04-06 15:13:16 +02:00
9ddbb03861 Fix T74111: Animation Playback Delayed With Time Remapping And AV-Sync
When setting the current playback time in BKE_sound_play_scene we didn't
account for the frame length. So the current frame/time would be wrong
when we asked the audio playback what time it was.

This would lead to playback being offset when using time remapping and
AV sync.

Reviewed By: Richard Antalik and Sybren A. Stüvel

Differential Revision: http://developer.blender.org/D7248
2020-04-06 13:57:03 +02:00
ded7af53b4 Fix T74889 Baking to current action doesn't work properly
Before this commit, baking an action would only insert keys that are
necessary (i.e. using `INSERTKEY_NEEDED`). When baking to the current
Action, if there are no constraints that influence the final animation,
there are no additional keys necessary. This makes it appear as if
nothing happened. However, when baking to a new Action every additional
frame is necessary and thus a key is added for every frame.

@mont29 and I agreed that this behaviour is confusing, so this commit
changes the behaviour such that baking to the current action and to a
new action result in the same baked animation (that is, keyed on every
frame).
2020-04-06 13:39:46 +02:00
c03e5e7830 Fix T75418: Outliner Blender File view has UNKNOWN category for armatures
Typo in rB57daecc2cf88.

Maniphest Tasks: T75418

Differential Revision: https://developer.blender.org/D7346
2020-04-06 13:27:23 +02:00
cc0819aee1 Fix (unreported) wrong hair vertex colors
This was already fixed in rB985f33719ce9 once.
But resurfaced after rB7070e4c15e6c [which just reverted a bit too much
;)].

Spotted while looking into T75263.

Differential Revision: https://developer.blender.org/D7308
2020-04-06 12:19:02 +02:00
ccaf6c7404 Tracking: Fix slow undistored display
TH distortion model was not cached properly, making it so frame is
undistorted on every redraw.
2020-04-06 12:16:28 +02:00
5d3c7d1218 usual PY API doc gen fix after adding a new member to Context... 2020-04-06 12:16:07 +02:00
f9c05f3fc0 Fix f-curve sequencer versioning logic
Screen loop was inside an existing screen loop,
in the body of a function used to initialize the toolbar region.
2020-04-06 20:07:05 +10:00
2fc30978bc Fix T75297: Apply base inflates meshes with Simple subdivision 2020-04-06 11:47:17 +02:00
2a2d0d463a i18n: Disable es_ES locale.
We already have generic `es` one, having more only makes sense if poeple
actually maintain them and they have different contents...
2020-04-06 11:23:29 +02:00
480ff89bf7 Fix T75311, T75310: Edit Weight Paint Overlay Render Artifacts
During recent refactoring of the edit weight overlay we moved a
assignment before it was valid. Making everything one frame off what
resulted in a flashing frame during TAA, not drawing the overlay until a
second action happened, making overlays too bright.

The reason whas that the painting overlay wasn't initialized in the
first sample, but the draw passes and groups were filled. Resulting in
rendering the overlay twice or not at all.

This change moves the assignment to where it is valid.
2020-04-06 10:28:31 +02:00
999134b7ca Cleanup: Add some comments removed in rB0d0036cb53f8 2020-04-06 09:58:57 +02:00
f1bf7bfa1b Cleanup: spelling 2020-04-06 16:02:29 +10:00
6526c3ced8 Fix displaying edit-mesh measurements with deform modifiers
Resolves regression from 2.7x
2020-04-06 15:26:27 +10:00
0ca5b7b69b Fix T74602: Sequencer slip operator ignores offset constraints
Limit offsets, so each strip contains at least 1 frame of content.

Reviewed By: campbellbarton

Differential Revision: https://developer.blender.org/D7288
2020-04-06 02:09:20 +02:00
d0d20de183 VSE: Draw f-curves for opacity and volume values on the strips
Feature can be enabled or disabled in timeline view menu item "Show F-Curves".

Author a.monti

Reviewed By: ISS

Differential Revision: https://developer.blender.org/D7205
2020-04-06 00:52:29 +02:00
0e7599bc15 VSE: don't allow strip preview when clicking on the scrubbing region
Don't set 'special preview' or Solo mode if scrubbing in scrubbing region.

Author: a.monti

Reviewed By: Severin

Differential Revision: https://developer.blender.org/D7234
2020-04-06 00:11:55 +02:00
0d0036cb53 Cleanup: Fix comment style and check if they are valid or make sense. 2020-04-05 23:55:51 +02:00
43cc2f3195 Cleanup: Use _fn as a suffix for callbacks in VSE code 2020-04-05 23:39:20 +02:00
9d4300b0c6 Volumes: add volume.grids.frame_filepath to get the current frame filepath
This can be used by external renderers that can load OpenVDB files.
2020-04-05 21:27:30 +02:00
bae1c243ce Build: hide USD symbols, make Blender symbols visible again
Following up to b555b8d.

Building Blender with hidden symbols but using libraries with visible symbols
was giving linker warnings, specifically for USD. So revert that for now, as
it was not needed for the bugfix.

Hide USD symbols (some of which are not in the USD namespace) to avoid potential
conflicts. May potentially help with AMD OpenCL issues in T74262.
2020-04-05 21:04:10 +02:00
f1573731bc UI: Support split property layout for pointer search buttons
Pointer search buttons created with `uiItemPointerR()` (which allows
also passing a collection property to search in) did not work with the
split property layout (i.e. `uiLayout.use_property_split`).
For example vertex group search buttons typically use this.

Note that decorators (`uiLayout.use_property_decorate`) are not
supported yet. Although if they are enabled, the decorator column is
still created to keep the layout alignment visually intact. Also re-uses
the existing hack to allow placing multiple items in the row before the
decorator column.

Needed for some in-progress changes to the modifier stack UI.
2020-04-05 14:49:28 +02:00
3e8a818419 Cleanup: use const for 'clnors' argument where possible 2020-04-05 17:12:10 +10:00
9fe0505db0 Cleanup: macro hygiene, parenthesize arguments 2020-04-05 13:53:32 +10:00
93806ba82b Cleanup: differentiate the evaluation mesh 2020-04-05 12:48:38 +10:00
505a19ed75 Cleanup: Split up Window-Manager VR file (and related changes)
Splits up wm_xr.c into multiple files in their own folder:
source/blender/windowmanager/xr. So this matches how the message bus and
gizmo code have their own folder and files.

This allows better structuring and should make the code scale better.
I rather do this early on than to wait until we end up with a single,
huge file.

Also improves a bit how data is prepared and updated for drawing.
2020-04-04 18:55:24 +02:00
e455536943 UI: 3D Viewport text edit menus
- Adds select menu
- Removes undo/redo controls
- Adds delete menu
- Refactor
- Combines font and text menu

The goal is to match other edit menus better and match the text editor.
2020-04-04 12:41:58 -04:00
a702b095a1 UI: Remove 'Simulation' from 'Fluid Simulation' modifier
This is conistent with other modifiers and is reduntent
with the 'Simulate' menu header.
2020-04-04 12:32:28 -04:00
fe98d8c0ea Cleanup: remove unused method 2020-04-04 14:13:53 +02:00
6fa904765a Cleanup: Rename Panel * variables from pa to panel 2020-04-03 22:20:25 -05:00
8cd42410c5 EEVEE: Motion Blur: Rework object motion vector rendering
Object matrices are now stored in a GHash per object, similar to cycles.
The objects surfaces are not split per material anymore.

This approach is not supported for viewport.

This approach is much cleaner and will be able to easily support deforming
motion blur.

This approach also supports instances
2020-04-04 00:45:55 +02:00
7c0e285948 Cleanup: Move Detail Operators and Dyntopo to their own files 2020-04-03 23:41:54 +02:00
17931f3b51 Cleanup: Move Mask Filter and Mask Expand to their own files 2020-04-03 21:46:08 +02:00
f2f30db98d Cleanup: Move Mesh Filter, Smooth and Automasking to their own files 2020-04-03 21:05:54 +02:00
d38023f2f3 fix (unreported): Weld Modifier: possible use of uninitialized variable 2020-04-03 15:09:05 -03:00
82774a9d24 Cleanup: Move all sculpt transform functionality to its own file 2020-04-03 19:42:55 +02:00
d138cbfb47 Code Quality: Replace for loops with LISTBASE_FOREACH
Note this only changes cases where the variable was declared inside
the for loop. To handle it outside as well is a different challenge.

Differential Revision: https://developer.blender.org/D7320
2020-04-03 19:27:46 +02:00
b0c1184875 Cleanup: Including "BLI_listbase.h" for LISTBASE_FOREACH macro
These headers are not needed right away, but will be in the upcoming
commit.
2020-04-03 19:27:42 +02:00
200cc531bd Cleanup: Missing clang format in previous commit 2020-04-03 19:23:05 +02:00
cfc8d73546 Cleanup: Move all Face Set functionality to its own file 2020-04-03 19:17:28 +02:00
63922c5056 Cleanup: Rename ExtensionRNA variables from ext to rna_ext
Makes it more clear that code using this is related to the RNA
integration of a type.
Part of T74432.

Also ran clang-format on affected files.
2020-04-03 18:25:52 +02:00
70b061b4fd Fluid: Refactored caching in main Mantaflow class
This refactor cleans up code for the Manta file IO. It also improves the cache 'Replay' option.
2020-04-03 17:37:37 +02:00
bfdc42d990 Fluid: Refactored MANTA class
Refactored the caching system so that return values are no longer ignored. The aim of this refactor was to make the caching more robust.
2020-04-03 17:37:25 +02:00
d1011c9e64 Cleanup: clarification of 'name' in BKE_idtype functions
The 'name' parameter of `BKE_idtype_idcode_from_name()`, and the `str`
parameter of `idtype_get_info_from_name()`, are expected to be the
'user visible name' of an `IDTypeInfo` struct. This is made clearer in
the code by renaming those parameters to `idtype_name` and mentioning
it in the documentation of the `BKE_idtype_idcode_from_name()`
function.

Differential Revision: https://developer.blender.org/D7317
2020-04-03 16:54:31 +02:00
3208454aa8 Cleanup: Animation, move AnimData API to anim_data.c/BKE_anim_data.h
The `BKE_animsys.h` and `anim_sys.c` files already had a an "AnimData
API" section. The code in that section has now been split off, and
placed into `BKE_anim_data.h` and `anim_data.c`.

All files that used to include `BKE_animsys.h` have been adjusted to
only include the animation headers they need (sometimes none).

No functional changes.
2020-04-03 16:46:48 +02:00
33ab613655 Cleanup: Fix build warning with MSVC
SubdivCCG was unknown when compiling gpuinit_exit.c
2020-04-03 08:29:09 -06:00
49289f31ff Fix T74495: Shrink/Fatten gives strange results with Individual Origins
The island `axismtx` is only necessary in some transform modes.

In the case of `Shrink/Fatten`, the calculated `axismtx` brings an
undesirable result.

This commit rearrange the struct `TransIslandData` in order to
calculate and reference only the arrays that will be used for each
transform mode.

Differential Revision: https://developer.blender.org/D7305
2020-04-03 11:13:42 -03:00
d8b0b8d3db New Undo: Fix crash in some complex production files.
There is no guarantee that depsgraph is ran between two undo steps, so
when re-using an existing data-block we should never wipe completly its
recalc flags, but instead complement them with new ones from accumulated
'storage' as needed.
2020-04-03 16:07:27 +02:00
ad85989a3f Cleanup: Rename bScreen variables from sc/scr to screen
Part of T74432.

Mostly a careful batch rename but had to do few smaller fixes.

Also ran clang-format on affected files.
2020-04-03 14:42:24 +02:00
cff49e625f Cleanup: add missing #includes to some headers
It should be possible to `#include` any header without having to worry
about its dependencies.

I didn't go and check all include files for this, just the ones that caused
me errors while I was refactoring the `anim_sys.c` file.

No functional changes.
2020-04-03 14:28:22 +02:00
905c0269f3 Cleanup: Rename ScrArea variables from sa to area
Follow up of b2ee1770d4 and 10c2254d41, part of T74432.
Now the area and region naming conventions should be less confusing.

Mostly a careful batch rename but had to do few smaller fixes.

Also ran clang-format on affected files.
2020-04-03 13:34:50 +02:00
Asad-ullah Khan
1a69384e76 Fix T74205: crash cancelling transfrom operation in sculpt mode
Differential Revision: https://developer.blender.org/D7018
2020-04-03 13:13:26 +02:00
80513d8574 Fix T75287: other Cycles render passes wrong when using Cryptomatte 2020-04-03 13:13:26 +02:00
82a8da0ec3 Fix T74572: adaptive sampling not scaling render passes correctly 2020-04-03 13:13:26 +02:00
10c2254d41 Cleanup: Continue renaming ARegion variables from ar to region
Continuation of b2ee1770d4, now non-single word variables are also
renamed.
Part of T74432.

Also ran clang-format on affected files.
2020-04-03 12:54:28 +02:00
7ec59cc7b7 Cleanup: split ED_mesh_mirror_*_table into multiple functions
Spatial & topology mirror table each used a single function
taking a char as an identifier.

Split these into begin/end/lookup functions.
2020-04-03 21:52:13 +11:00
b5253159b6 Cleanup: split BKE_anim.h and anim.c into smaller pieces
The files are now split up into the following sections:
- `BKE_anim_path.h` and `anim_path.c` for path/curve functions.
- `BKE_anim_visualization.h` and `anim_visualizationanim_path.c` for
  animation visualization (mostly motion paths).
- `BKE_duplilist.h` for DupliList function declarations. These were
  already implemented in `object_dupli.c`, so they were rather out of
  place being declared in `BKE_anim.h` in the first place.

No functional changes.
2020-04-03 12:13:51 +02:00
736f9f5a69 Fix accidentally reverted changes in VR merge due to merge error
dc2df8307f unintentionally reverted part of 07bdbeda84.
2020-04-03 11:42:27 +02:00
cecb25273e Cleanup: Font, added initialisation for two variables
My compiler (GCC 7.5.0) was warning about these variables potentially not
being initialised. Since the function is highly complex, instead of
analysing it I just trust my compiler and added initial values.

This should be no functional change.
2020-04-03 11:34:25 +02:00
fe7ea8a24c Fix T75250: setting greasepencil active layer not refreshing the dopesheet
This was only reported for the 'Change Active Layer' operator [which was
not setting the channel as selected in the dopesheet], but this is also
the case elsewhere [where BKE_gpencil_layer_active_set is used], namely:
- gp_layer_remove_exec
- gp_layer_copy_exec
- gp_merge_layer_exec
- gp_layer_change_exec
- gp_layer_active_exec
- gp_stroke_separate_exec

We could set GP_LAYER_SELECT "by hand" in
BKE_gpencil_layer_active_set(), but there is already
animchan_sync_gplayer() that does that. For this, we need the
NA_SELECTED notifier though.

Maniphest Tasks: T75250

Differential Revision: https://developer.blender.org/D7311
2020-04-03 10:37:21 +02:00
a2a70cfc41 Cleanup: typo in comment 2020-04-03 10:34:18 +02:00
9aad06db88 Fix T75315: typo in automasking UI text 2020-04-03 10:19:45 +02:00
973e1f9d9a Cleanup: use term 'attr' instead of 'attrib'
This was already the case in most parts of the GPU API.
Use full name for descriptive-comments.
2020-04-03 17:25:58 +11:00
05dcb007e1 Cleanup: use tern 'sync' instead of 'synchronization' for function names
This is a common, unambiguous abbreviation
already used throughout the code-base.
2020-04-03 16:46:34 +11:00
600a627f6e Cleanup: use abbreviated names for unsigned types in editors 2020-04-03 16:21:24 +11:00
04fe37f931 Cleanup: quiet shadow warnings with ghost & mantaflow 2020-04-03 16:15:57 +11:00
71e543c68b Cleanup: replace static list with argument for curve merging 2020-04-03 16:04:02 +11:00
b18608f3e9 Cleanup: bone cursor picking API
There was one function to access both pose/edit bones,
which returned a void pointer type.

Split these into 3 functions which return EditBone, bPoseChannel or Bone
types.

Internally the logic is still shared, this just makes it clearer to
callers which type is expected.

Also use more conventional prefix for picking API:

  - ED_armature_pick_(ebone/pchan/bone)
  - ED_armature_pick_(ebone/pchan/bone)_from_selectbuffer
2020-04-03 15:52:26 +11:00
09071e2799 Fix T75330: Select linked crashes without a bone near the cursor
Own error with recent improvements to select link.
2020-04-03 13:43:03 +11:00
eae40c6c76 Cleanup: improve & use doxy sections for armature_naming.c 2020-04-03 13:16:38 +11:00
d52326bab3 Cleanup: spelling 2020-04-03 12:38:04 +11:00
c154f265de Cleanup: move curve picking functions into 'editcurve_query.c' 2020-04-03 12:32:04 +11:00
6f4dbb661f Revert "Writefile: Cleanup Scene runtime data."
This reverts commit ee0d91df5d. This is
modifying scene data on write, which causes crashes. It can only do that
on a copy of the data.
2020-04-03 02:24:33 +02:00
c4ba0d1508 Fix Linux link error with pcre after recent changes, must use absolute path 2020-04-02 22:05:03 +02:00
75f6e6b39e Fix link error on Linux buildbot with libxml2
On macOS this is part of the collada folder, but for Linux xml2 is in its own
folder for precompiled libraries.
2020-04-02 18:54:58 +02:00
6eb409bb9c Fix warnings caused by own earlier commit
Caused by 34465a7fb0.
2020-04-02 18:46:12 +02:00
12628e0794 Fix Cycles AVX unit test still failing to build with old GCC 2020-04-02 18:19:49 +02: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
34465a7fb0 VR: Refactor DirectX context management
All DirectX management happens on Ghost level now, higher level code can
just assume everything is OpenGL (except of the upside-down drawing that
still needs to be done for DirectX). This is similar to how the
metal-layer is hidden outside of Ghost.

The Ghost-XR graphics binding for DirectX is responsible for managing
the DirectX compatibility now.
2020-04-02 17:43:45 +02:00
868d4526a8 Fix more build errors/warnings after recent AVX changes
Thanks to Sergey and Ray for the help identifying the problem.
2020-04-02 17:30:56 +02:00
343a874831 add memory address to undo steps print.
Helps identifying who is what in debugger...
2020-04-02 17:22:44 +02:00
9672605938 Fix build error on Windows/Linux after recent AVX changes 2020-04-02 17:09:01 +02:00
5159ba6b33 Fix (harmless) PCRE not found warning when configuring CMake on Linux
Differential Revision: https://developer.blender.org/D7309
2020-04-02 17:09:01 +02:00
2aa938b0ae Cleanup: simplify Linux buildbot config, where default values already match
Ref D7309
2020-04-02 17:09:01 +02:00
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
e276558a50 Fix T74983: Material preview icons don't refresh
The root cause of the issue reported in T74983 is that an `IDNode` would
not be marked as user-modified. This marking happened while looping over
outgoing relations of one of its operation nodes. Since rBff60dd8b18ed
unused relations are removed, and as a result the `IDNode` would not be
marked.

The solution was to move the responsible code outside the loop; this is
probably a good idea anyway, as the code did not actually use the
looped-over relations at all, and was thus repeated unnecessarily.
2020-04-02 16:54:17 +02:00
b75a7c2f8f Fix T75302: GPencil fill does not work on python generated strokes 2020-04-02 16:48:00 +02:00
e6c732e0cb GPencil: Cleanup typo error for hardness
The variable cannot be names because it was already renamed.
2020-04-02 16:48:00 +02:00
7c88968c89 Scultp: Face Set boundary automasking
With this brush option it is possible to mask the boundary vertices of
all face sets. This is especially useful in the cloth brush, where face
sets can be used to simulate seams between different patches of cloth
and produce different patterns and effects.

Reviewed By: jbakker

Differential Revision: https://developer.blender.org/D7230
2020-04-02 16:42:20 +02:00
3dad6294da Sculpt: Store explicit value for multires sculpt level
Allows to know what level sculpting has been done after the value has
been changed in the MultiresModifierData.

No functional changes, just preparing code to have everything needed
for propagation undo.

Differential Revision: https://developer.blender.org/D7307
2020-04-02 16:32:33 +02:00
f868d51bdd Sculpt Undo: Allow Geometry undo step to be non-exclusive
Before this change it was not possible to have base geometry
and grid coordinates to be stored in the same undo step.

Differential Revision: https://developer.blender.org/D7298
2020-04-02 16:29:51 +02:00
009dde69cd Fix Face Sets painting and selection precision
This fixes the following issues:
- Previously, the face set from the active vertex was used directly. Vertices always return the most recently created face set, so in some cases there may be some face sets that were not possible to select as active. Now the active face set is set in the ray intersection, so it always matches the face under the cursor.
- When drawing face sets they were set per vertex, so it was not possible to paint one face at a time. Now face sets are painted per poly when using the brush on meshes, testing the distance to the center of each poly.
- The code for the active vertex on PBVH_GRIDS was not correct, so I also fixed that to test if everything was working correctly.
{F8441699}

Reviewed By: jbakker

Differential Revision: https://developer.blender.org/D7303
2020-04-02 15:43:37 +02:00
6cc4c68dad Fix T75121: Memory leak in Surface Smooth
The brush was allocating new memory for storing the displacemnets at the
beginning of each stroke step and not freeing them.

Reviewed By: jbakker

Maniphest Tasks: T75121

Differential Revision: https://developer.blender.org/D7254
2020-04-02 15:36:10 +02:00
43f748a32f Fix mesh boundary automask curve falloff
As the main use case of this feature is to work with cloth, using this
curve makes more sense than a smoothstep to simulate cloth tension near
the edges.

Reviewed By: jbakker

Differential Revision: https://developer.blender.org/D7262
2020-04-02 15:35:12 +02:00
b26bebd59f Missed file in previous commit 2020-04-02 15:32:17 +02:00
88362565f6 Fix T72688: Vertex Group Weights in Edit Mode Occludes In Front Armatures
Due to legacy this overlay was implemented twice (Edit Mesh and Weight
Painting) with different results. This patch consolidates both drawing
and uses only the Weight Painting drawing.
2020-04-02 15:12:32 +02:00
f5e4f20dc1 Fix: Build error when building with python off 2020-04-02 07:08:51 -06:00
fa8a3c8f26 Revert "Fix T72688: Vertex Group Weights in Edit Mode Occludes In Front Armatures"
This reverts commit 782e6ea4ed.

Said fix introduced a crash the moment one goes to edit mode.
2020-04-02 15:07:56 +02:00
7bffdab93c CMake: Add alembic boost dependency
When building lite + alembic + boost cmake would turn
boost off because it deemed it not needed leading to
build errors.
2020-04-02 07:03:36 -06:00
53d029d6da Cleanup: Avoid complex template type for XR-Swapchain
I rather avoid types like
`std::vector<std::unique_ptr<GHOST_XrSwapchain>>`, which is easy to do
in this case.
2020-04-02 13:50:27 +02:00
782e6ea4ed Fix T72688: Vertex Group Weights in Edit Mode Occludes In Front Armatures
Due to legacy this overlay was implemented twice (Edit Mesh and Weight
Painting) with different results. This patch consolidates both drawing
and uses only the Weight Painting drawing.

Reviewed By: Clément Foucault

Differential Revision: https://developer.blender.org/D7289
2020-04-02 11:49:39 +02:00
1c3ded12f4 Fluids: improve subframe handling
Reviewers: sebbas

Differential Revision: https://developer.blender.org/D7256
2020-04-02 10:34:05 +02:00
06cb321f33 Sculpt: Give a brief explanation of undo stack
Should make it a bit more clear overview of what is going on in this
module. While some of the details might still be missing, having some
sort of top-level overview is better than nothing.

Differential Revision: https://developer.blender.org/D7300
2020-04-02 09:39:38 +02:00
3ebebe62d7 Sculpt Undo: Fix multires undo for interleaved nodes
Made it so grids array is properly allocated when first node in the
undo list does not contain grid data.

Differential Revision: https://developer.blender.org/D7299
2020-04-02 09:38:26 +02:00
a9963669f9 Fix T75283: GPencil Stroke created by Merge points can't have fill material 2020-04-01 19:35:35 +02:00
c4374bc919 Fix T75271: GPencil Segment select mode doesn't work
The selection was workring with the evaluated data, but need work with the original data.
2020-04-01 18:00:49 +02:00
25b2b6724d Fix T74224: Add missing depsgraph relations for boid particles
Reviewers: brecht

Differential Revision: https://developer.blender.org/D7302
2020-04-01 16:21:34 +02:00
f047d47e24 Cycles: AVX implantation of Perlin noise.
This patch adds an AVX implementation of Perlin noise in Cycles.
An avxi type was also added as a utility based on the respective
type in Intel Embree.

Only 3D and 4D noise were implemented, there is no benefit for
utilizing AVX in 1D and 2D noise. The SSE trilinear interpolation
function was used in the AVX implementation because there is no
benefit from using AVX in interpolating the last three dimensions.

Differential Revision: https://developer.blender.org/D6680
2020-04-01 14:48:01 +02:00
5e176d67e1 Writefile: Cleanup Volume runtime data. 2020-04-01 12:39:06 +02:00
d66519f197 Writefile: Cleanup CacheFile runtime data. 2020-04-01 12:39:06 +02:00
d31f79a9bc Writefile: Cleanup MovieClip runtime data. 2020-04-01 12:39:06 +02:00
1f065df03e Writefile: Cleanup GPencil data.
Note: Not clearing the whole runtime data here, as this is not done in
matching read code, not sure why, needs further investigation...
2020-04-01 12:39:06 +02:00
ec351c7a65 Writefile: Cleanup Nodetree runtime data.
Note: As with collections, this does not affect embedded nodetrees from
material etc. We prpbably need to tackle those as well at some point...
2020-04-01 12:39:06 +02:00
e0dc4130fd Writefile: Cleanup Armature runtime data. 2020-04-01 12:39:06 +02:00
358f8b484f Writefile: Cleanup Collection runtime data. 2020-04-01 12:39:06 +02:00
e24553ca0f Writefile: Cleanup Soung runtime data. 2020-04-01 12:39:06 +02:00
8d63135da3 Writefile: Cleanup World runtime data. 2020-04-01 12:39:06 +02:00
254748c3e7 Writefile: Cleanup Lattice runtime data. 2020-04-01 12:39:06 +02:00
4f509db181 Writefile: Cleanup Text runtime data. 2020-04-01 12:39:06 +02:00
33a622cbf4 Writefile: Cleanup VFont runtime data. 2020-04-01 12:39:06 +02:00
e790aa1f19 Writefile: Cleanup material runtime data. 2020-04-01 12:39:06 +02:00
27b9f1f626 Writefile: Cleanup MBall runtime data. 2020-04-01 12:39:06 +02:00
ee0d91df5d Writefile: Cleanup Scene runtime data. 2020-04-01 12:39:06 +02:00
9532ce4605 Writefile: Cleanup Object runtime data. 2020-04-01 12:39:06 +02:00
80280acc93 Writefile: Cleanup Curve runtime data. 2020-04-01 12:39:06 +02:00
ca0dcd830c Fix T75222: Crash activating menu search 2020-04-01 20:59:50 +11:00
186ac84210 Cleanup: clang-format 2020-04-01 20:47:02 +11:00
60ff3a7daf Fix T66494: Alt+ clicking (assign to all selected) does not work for NLA
strips

This uses the new "selected_nla_strips" context member in
UI_context_copy_to_selected_list().

bonus: this also makes the "Copy To Selected" button operator [in the
button context menu] work for anything NLA Strip related.

Maniphest Tasks: T66494

Differential Revision: https://developer.blender.org/D7281
2020-04-01 10:24:16 +02:00
f8c4f5e308 Add a "selected_nla_strips" context member
Needed for upcomming fix for T66494.

ref T66494 / D7281
2020-04-01 10:22:34 +02:00
029a714fc7 Fix T75234: Saving UDIM tiled texture as OpenEXR saves only the first
tile

This happened when the UDIM tiled image needed to be colormanaged, so
- when you set up the image as sRGB, then save as EXR/HDR/...
- other way around as well: when you set up the images as Linear then
save as PNG/JPG/...

Reason being that for UDIM tiled images, `image_save_single` is called
multiple times [once for each tile] and everytime `image_save_post` will
fire the `IMA_SIGNAL_COLORMANAGE` signal which clears the cache if any of
the above two is the case. Without the cache, the next tiles cannot be
saved.

Now determine if the colorspace changed from
`image_save_single`/'image_save_post' and only fire
IMA_SIGNAL_COLORMANAGE once from BKE_image_save in the end.
(thx @brecht for suggesting this alternative to the original fix)

Maniphest Tasks: T75234

Differential Revision: https://developer.blender.org/D7296
2020-04-01 10:11:54 +02:00
59e001cbf6 GPencil: Cleanup typo error 2020-04-01 10:02:04 +02:00
Bastien Montagne
2ad0ae8dad Tweak write code to allow cleaning up runtime data before write.
This basically generalizes what was being done in `write_mesh`,
since we need to clean up ID tags anyway, it's easier to do it for all IDs.

Then ID write funcs themsleves can do whatever they want on the passed
struct, without risking interferring with regular Blender operations.

Note that Text write function is doing a suspicious change on one of its
flags, but this seems to be by-passed anyway by read code currently, so
think it's OK to not do that on orig data-block.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D7294
2020-04-01 09:43:21 +02:00
7952274cf0 Sculpt Undo: Refactor Geometry undo nodes
Made it so there is a single UNDO node in the list which has
both original and modified mesh state.

Makes it easier to achieve "interleaved" undo nodes stored in
the undo step (as opposite of either storing geometry or other
data).

Should be no functional changes, just preparing for an upcoming
work to support undo of operation like Apply Base.

Differential Revision: https://developer.blender.org/D7290
2020-04-01 09:39:58 +02:00
60d3a801db Subdiv: Split evaluation begin+refine into separate steps
Actually, begin will do the entire initialization.

Refine will only refine if there is a topology refiner associated
with the Subdiv descriptor.

Allows to refine Subdiv to new coarse positions without touching
displacement evaluation. Will be needed to update SubdivCCG during
sculpt undo.
2020-04-01 09:32:46 +02:00
29eb891658 Fix curve shortest path picking with right-click select 2020-04-01 17:33:24 +11:00
9bcc83a5d6 Fix problem extruding curve segments with selected handles
Issue introduced in 38685b5a39
2020-04-01 17:08:41 +11:00
8d116e9956 Cleanup: use doxy sections 2020-04-01 16:19:32 +11:00
b157abebe5 UI: avoid term 'Region', use 'Edges & Faces' instead
Change to recent renaming of "Edge Collapse" as it has multiple uses,
as it collapses edge-rings, but isn't limited to collapsing single edges,
it can be used to collapse faces with arbitrary topology.

The name "Collapse Regions" is too vague, users might not think to use
this to collapse edge-rings.

Use a more verbose name "Collapse Edges & Faces", referencing edge-rings
in the tool-tip.
2020-04-01 14:18:21 +11:00
b7868c0b89 Grease Pencil: Fix typo in labels and comments.
Hardeness -> Hardness

Only changed the labels/tooltips, will leave the internal change to @antoniov.
2020-04-01 03:52:58 +02:00
6a1f0c1eaa Cleanup: use doxy sections for 'idprop' API 2020-04-01 11:30:08 +11:00
2d39e46f84 Cleanup: use doxy sections for wm_draw.c 2020-04-01 11:30:08 +11:00
9b0d72aa3d Cleanup: use sections for object_remesh.c
Add missing sections.
2020-04-01 11:29:45 +11:00
18fc4155fd Fix customdata interpolation being done multiple times in Weld Modifier 2020-03-31 20:57:33 -03:00
0213d9f865 EEVEE: Object Motion Blur: Initial Implementation
This adds object motion blur vectors for EEVEE as well as better noise reduction for it.

For TAA reprojection we just compute the motion vector on the fly based on camera motion and depth buffer.
This makes possible to store another motion vector only for the blurring which is not useful for TAA history
fetching.

The changes are quite simple. We just do an extra pass to write the motion vectors for opaque objects and
use the motion vector to do the motion blur sampling.

This does not improve the postprocess motion blur itself.

Viewport support is kind of a hack, relying on cached previously drawn objects states, and is to be enabled
through experimental support panel in userpref.

Differential Revision: https://developer.blender.org/D7297
2020-04-01 01:52:09 +02:00
bcd3c3cb57 UI: rename "Edge Collapse" to "Collapse Regions"
This is useful for collapsing regions of faces & edges,
similar to a 'Merge -> Collapse' which can operate on multiple regions,
merging UV's so they don't need to be manually corrected.

The name & description didn't mention this.
2020-04-01 10:50:21 +11:00
91604279c9 Fix missing break statement in recent face-set support 2020-04-01 10:50:21 +11:00
f9f0f44be8 Cleanup: quiet discarded-qualifiers, unused warnings 2020-04-01 10:50:21 +11:00
e819f67500 Cleanup: Organize Weld Modifier in alphabetical order 2020-03-31 20:39:37 -03:00
bd6abacc04 EEVEE: Motion Blur: Fix camera motion blur in render 2020-04-01 01:31:13 +02:00
74b5e5f6e1 Fix T74588: Weld Modifier: Vertex colors and UVs get incorrect values 2020-03-31 20:27:54 -03:00
da3cb514e5 Multires: Initial Face Sets support
This implements the Sculpt Mode API functions needed for Face Sets and
visibility management for PBVH_GRIDS. No major changes were needed in
the operators and the sculpt mode code. This implementation stores the
face sets in the base mesh, so faces created in higher subdivision
levels can't be modified individually. Also, we are not checking for
multiple face sets per vertex (that can be added in the future), so
relax tools don't work yet. The rest of the features (paint, undo,
visibility operators..) work as expected.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D7168
2020-04-01 01:07:47 +02:00
c42e68c484 EEVEE: Motion Blur: Fix rendering and center sample on current frame 2020-04-01 00:52:32 +02:00
a83ad13c49 EEVEE: Motion Blur: Make Temporal accumulation clear up the noise 2020-04-01 00:52:32 +02:00
7ebb1f2ff3 EEVEE: Motion Blur: Fix missing motion vectors after first TAA sample 2020-04-01 00:52:32 +02:00
5de40f4838 EEVEE: Motion Blur: Fix TAA reprojection
We compute the motion vector on the fly based on camera motion.
2020-04-01 00:52:32 +02:00
52f8ba66cb EEVEE: Motion Blur: Fix motion blur in render 2020-04-01 00:50:52 +02:00
536142e12f EEVEE: Object Motion Blur: Initial Implementation 2020-04-01 00:50:52 +02:00
0062813c73 make.bat: Improve messaging when not detecting MSVC
Inspired by @mrwhite in D7295
2020-03-31 13:14:16 -06:00
5b88ab25bd Fix T75219: Move to New Layer not working
This was an old design problem.
2020-03-31 18:54:50 +02:00
6c036a65c9 Add Voxel Mode to the Remesh modifier
This adds the Voxel Mode to the current remesh modifier. It works
exactly the same way as the voxel remesh operator and uses the same
properties to control the remeshing. We can exand this with more options
in the future (fix poles, reprojection...)

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D7292
2020-03-31 18:27:37 +02:00
38685b5a39 Edit Curve: Improve Curve extrude
The original code has two logics, extrude the end points or duplicate points (making new splines).
Now all the logic has been redone by extruding contiguous selected segments.

Fix T47169

Reviewed By: campbellbarton

Differential Revision: https://developer.blender.org/D6982
2020-03-31 12:39:53 -03:00
1c1a14dcdf Voxel Remesh: Edit Voxel Size operator
This operator lets the user control the voxel/detail size of the voxel remesher directly from the 3D view in a similar way the Brush radius and strength are controlled.  The shorcut from sculpt mode is Shift + R (similar to Shift + F for brush strength).
It shows a grid that represents the real voxel size of the object. The grid and the text are automatically aligned to the view to avoid rendering all voxels with thousands of lines.

It also has a slow mode when pressing shift that works like the slow mode of the brush radius control.

This operator controls the value changes sensitivity automatically to avoid jumping to extremelly high resolutions and run out of memory.
This way, adjusments done in lower voxel sizes are more precise. Pressing Ctrl disables this functionality and allows changing the voxel size directly in a linear way.

Reviewed By: jbakker, #user_interface, billreynish

Differential Revision: https://developer.blender.org/D6449
2020-03-31 17:31:13 +02:00
f149d5e4b2 Fix VR session toggle not changing reliably on session start/end
The text and icon were supposed to change but didn't reliably, which was
a race condition I think. It depended on how fast the OpenXR runtime
would transition the session state.
This also makes sure the correct notifier is sent on session exit.
2020-03-31 16:49:38 +02:00
afe707cc3a Fix missing XR space destruction
I think destructing the XrSession would destruct this anyway, but rather
have this done explicitly, consistently and in a controlled manner.
2020-03-31 16:49:38 +02:00
b0bd9b4c70 Fix T75244: Screw Modifier Crash
Draw batch extraction wrongly assumed that when mapped extraction
happened that all original data could be found. This is not the case as
mapped extraction is also enabled when part of the data is present.

This fix does additional nullptr checks.
2020-03-31 16:05:19 +02:00
39684e4554 Cleanup: remove duplicate function 2020-03-31 22:37:25 +11:00
17a409e223 Cleanup: use '_recursive' suffix instead of '_rec'
This convention isn't very clear and wasn't used much.
Use the more verbose term instead.
2020-03-31 22:23:33 +11:00
b74e388617 Fix T75210: Frame range does not go down to 0 in the physics tab for mantaflow when clicking the left arrow
Added nore flexibility to cache frame range and ensured validity of frame range.
2020-03-31 12:18:15 +02:00
155f917403 Fix T73513: Facing Overlay Intervene With Selection
Do not draw the facing overlay during selection.
2020-03-31 11:47:09 +02:00
d8217ec6d0 UI: improve names for mesh split operations 2020-03-31 19:45:26 +11:00
039d619c76 Fix T74898: Multiresolution Ghost After Orbiting
EEVEE and Workbench both had the same issue that they continue with the
last sample when leaving navigating. This is ok for regular meshes as
they are all the same. For multiresolution it ain't as a low res version
of the mesh is used during navigation.

This patch also resets the AA samples when the user leaves navigation.
2020-03-31 10:29:34 +02:00
24f8c8491d UI: group edit-mesh Separate with Split & Merge
This was already the case for curve & armature.
2020-03-31 18:21:21 +11:00
c1722a3a8c Keymap: 'M' for edit-mesh merge menu, 'Alt-M' for split menu
As the 'M' key is free, it's convenient to use for the merge menu,
especially since this contains "Merge by Distance",
a frequently used action.

Use 'Alt-M' for a new split menu, following our convention of Alt being
used for opposite functionality.

Also move merge/split menu's into the "Mesh" menu as neither operate
solely on a single mesh element type.
2020-03-31 18:21:21 +11:00
61f9bbbdea Edit Mesh: support splitting vertices
The edge split operator can now split faces & edges
from selected vertices.

This has the same functionality as manually ripping all
faces and edges away from a vertex.
2020-03-31 18:20:06 +11:00
07add4b485 Cleanup: use sections for armature-select 2020-03-31 15:24:06 +11:00
0f5c94bbd1 Armature: add Select Linked (Ctrl-L)
This matches select linked for other modes (curve, mesh)
2020-03-31 15:11:11 +11:00
b555b8dedc Build: hide most symbols on macOS on Linux to avoid conflicts
This means symbols from Blender itself and most external libraries. We can't
just hide all because that breaks some libraries. The better solution would
be to rebuild all library dependencies with hidden visibility.

Fixes T75223: Luxrender add-on failing to load on macOS
2020-03-31 00:07:55 +02:00
899bfdc412 Audaspace: Update From Upstream (For API Docs)
No functional changes:

- Cleanup Spelling, Line Length
- Use proper class method styling for py docs
- Fix Broken Links

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

Fixes T75191
2020-03-30 17:47:40 -04:00
22677d8e1d Fix undo incorrectly detecting mesh as always changed after edits
Mesh writes a modified copy, which meant recalc_undo_accumulated was never
cleared on the actual datablock. Also clear mesh->runtime on write to avoid
detecting changes, since it's cleared on read anyway.

Differential Revision: https://developer.blender.org/D7274
2020-03-30 20:09:15 +02:00
f4982b555c Fix undo misdetecting identical future chunk in some cases
Clear is_identical_future before adding a next undo step, to avoid wrong
values for cases where we undo and then add a step with different changes
than what was previously the next step.

Ref D7274
2020-03-30 20:09:20 +02:00
2e60226f23 Fix undo debug logging not printing all types of undo pushes
Ref D7274
2020-03-30 20:09:15 +02:00
91b334b2f2 Fix T74547 EEVEE: Image texture crash with use after free
Same fix than for the other mapping types.
2020-03-30 19:57:24 +02:00
248873603f GPencil: Remove is_edit_mode from cache data
This value is not used by new engine.
2020-03-30 18:56:46 +02:00
4c40468856 GPencil: Remove GP_DATA_PYTHON_UPDATED used by old engine 2020-03-30 18:54:41 +02:00
2c9e27f209 Fix T75144 Grease Pencil: Python generated strokes flicker and crash
This was caused by a flag not being reset in time, causing discard of
batches already queued to be drawn.
2020-03-30 18:38:15 +02:00
100896e080 GPencil: Rename Overlay blend mode to Hard Light
Differential Revision: https://developer.blender.org/D7280
2020-03-30 18:23:36 +02:00
6428da84ed Fix T74663 GPencil: Fills are Flickering on Nvidia
This was caused by an unitialized variable.
2020-03-30 17:57:31 +02:00
af1e3b0270 GPencil: Fix overlay blend mode creating inverted colors 2020-03-30 17:57:31 +02:00
9371c051b1 EEVEE: Bloom: Fix inverted source and base buffer
This does not change the ouput much.
2020-03-30 17:57:31 +02:00
6f15bc3b52 Fluid: Removed Empty Space option for liquid domains
The option only makes sense for gas domains where there is some density.
2020-03-30 17:34:16 +02:00
1280f3c0ae Fluid: Optimization for mesh file loading
Improved loading times for mesh files by reading bigger chunks of data from the disk at once.
2020-03-30 17:32:38 +02:00
a2d19c1f78 NormalOverlay: Center Dot Normal Drawing With Modifiers
When using generative modifiers too many center dots were rendered in
the normal overlay. This patch only renders the normals of original
center dots.

Known issue: decoding the `norAndFlag` has issues on Intel GPU.
2020-03-30 14:39:16 +02:00
57d8bde088 Normal Overlay: Hide Normals Of Generated Loops
The loop normals were always drawn. We used to only draw the normals if
it was mapped to an original loop of the mesh. Due to recent changes we
can not find the correct loop and decide if we need to draw them.

Note still need to check the face dots normals. This is more complicated
as facedot normals needs to be encoded in a different way
2020-03-30 14:06:54 +02:00
a6a9a12e8f Fix T75142: No autokeying with pose mode X-Mirror
This was caused by the removal of some `BONE_TRANSFORM_MIRROR` flag
handling in rBde530a95dc7b482dc22c933b9b8b2a98c79b5663. I simply
restored those lines that caused this issue.
2020-03-30 13:26:26 +02:00
ef7229d69a Cleanup: reduce code indentation in autokeyframe_pose()
This makes the code a bit simpler to follow, by replacing
`if (x) { all the code here }` with `if (!x) { continue; }` and un-indenting
the remaining code, and by returning early.

No functional changes.
2020-03-30 13:26:26 +02:00
cf258b02f4 Fix T75053: Paint Overlay Show Modified Wires and Edges
The paint mask overlay showed the wires and edges of the final mesh.
This change will only draw wires and edges that are mapped to the
original mesh.

This change enables mapping data in regular Mesh extraction. This
can also be used for better drawing of the normal overlay.

Reviewed By: Clément Foucault

Differential Revision: https://developer.blender.org/D7277
2020-03-30 13:13:42 +02:00
d6e0d27816 Fix help message misc argument grouping
Correct reference to non-existent argument.
2020-03-30 21:47:07 +11:00
3351a2655d Subdiv: Extend some comments 2020-03-30 12:26:45 +02:00
513885a991 Fix armature edit-mode selected linked
Selecting linked would only select a single arbitrary chain.

Now select linked follows all child-chains of the bone.

Also add support for following all links, similar to how this would work
if it were a mesh with connected edges instead of only child chains.

Leave this off by default to match pose mode.
2020-03-30 19:18:28 +11:00
15cb567c8e Armature: remove merge function, use dissolve instead
This was crashing, when looking into a fix I noticed that it gave
hap-hazard results dissolving past forks in the parent/child hierarchy
arbitrarily following one chain.

This functionality is almost identical to "dissolve" which delimits
forks in the chain predictably.

So remove this in favor of dissolve (available from the delete menu).
2020-03-30 19:18:09 +11:00
6462ea2a8d UI: center align icon-only pull-down menus
Resolve issue noted in D5482, texture slots '+' icon for example
was noticeably off-center.
2020-03-30 14:45:05 +11:00
7b347b225a Cleanup: remove print left in recent fix for T66655 2020-03-30 14:34:32 +11:00
ec3da20896 UI: use operator name for extrude repeat
Match names between the redo popup and the menu item.
2020-03-30 11:41:44 +11:00
9ccaf9899e Extrude Repeat: support storing the offset vector
Without this, adjusting properties always re-initialized
from the view-vector.
2020-03-30 11:41:35 +11:00
e252d2c990 Fix extrude repeat leaving selection history unselected 2020-03-30 10:39:10 +11:00
6b24f7d87c UI: move extrude repeat out of the vertex menu
This works for all selection modes,
include last below a separator since it's a specialized function.

Note that the previous commit was raising an exception as operator
properties don't support 'or'.
2020-03-30 10:29:32 +11:00
086bfffe74 Theme: adjust lamp alpha to visually match 2.82 2020-03-30 10:12:08 +11:00
6c48a36962 DRW: match edge opacity to 2.82
Edges were hard to see in some cases in edit-mesh vertex/face modes.

Since 804e90b42d alpha is handled differently,
update edge alpha to visually match 2.82.
2020-03-30 10:12:08 +11:00
a103d09df4 UI: Move Array Extrude Below Verticies 2020-03-29 17:36:34 -04:00
7d59f84708 Fluid: Optimization for liquid / secondary particle file loading
Improved loading times for particles files by reading bigger chunks of data from the disk at once.
2020-03-29 21:31:20 +02:00
b023c91118 Fluid: Use dynamic mode whenever active rigid bodies are in the scene
Required for collisions with moving rigid bodies. Otherwise the static optimization mode will be kept and the obstacles would be calculated only once at the beginning.
2020-03-29 21:31:20 +02:00
bf3b0db785 Overlay: Edit Mesh: Add offset for thicker edges
Edges with sharpness, seam and bevel are thicker and thus needs more offset
to not appear aliased.

Based on D5448 by @oficsu
2020-03-29 20:49:07 +02:00
0b57ecc665 Overlay: Edit Mesh: Make offset depth dependent (w.r.t depth precision)
The previous offset was done in view space. It is now done in NDC space
to avoid differences when adjusting the near/far plane distances.
2020-03-29 20:46:42 +02:00
a022cb8f62 UI: Add missing operators to menus in the 3D Viewport Mesh Edit mode
Differential Revision: https://developer.blender.org/D7263
2020-03-29 14:09:39 -04:00
bd74f5f7ab Fix T73945: Don't grey out "Calculate to Frames" in some cases
The button seems to behave more as I'd expect without these
additional checks. Previously, the button was often grayed out when
it was actually working.

Reviewers: ISS

Differential Revision: https://developer.blender.org/D7252
2020-03-29 15:09:42 +02:00
Wayde Moss
5b8b6b4c1e RNA: expose the pin flag for AnimData and ActionGroup 2020-03-29 23:05:30 +11:00
Henrik Dick
d8e2cc9f4d Fix missing Surface Deform strength versioning 2020-03-29 22:52:06 +11:00
Yevgeny Makarov
a3d5b949d2 UI: Fix text padding for labels without an icon 2020-03-29 22:47:59 +11:00
c6143da27c Cleanup: remove DNA_view2d_types.h from DNA_sound_types.h 2020-03-29 20:32:45 +11:00
Henrik Dick
fc37318fe7 Screw Modifier: support 1-2 steps
The Screw Modifier had a lower limit for the steps value, which not only
was inconsistent between render and viewport steps, but also was capped
to 2 in UI and also in the code internally.
2020-03-29 20:25:14 +11:00
Cody Winchester
e8dd6128b5 Fix warp modifier using pose matrix without object matrix applied
Error in recent patch D6820
2020-03-29 18:58:37 +11:00
b9faf53182 Fix T72075: Incorrect Grid Fill error message 2020-03-29 18:36:00 +11:00
424fed3cc7 Cleanup: remove unicode character printing
Was added when utf8 was originally introduced - for testing,
but is no longer needed.
2020-03-29 17:11:46 +11:00
aec9e0e1b6 Cleanup: spelling, comments 2020-03-29 17:11:41 +11:00
d5163e06c3 Cleanup: strict-prototypes warning 2020-03-29 16:37:57 +11:00
ac02c702e5 Fix T75156: Cast modifier crash in edit-mode
Add NULL checks to other deform modifiers too.
2020-03-29 16:09:09 +11:00
a24f52c51c Fix T75088: Add tooltips for custom properties 2020-03-28 16:40:49 -04:00
a882debee0 Fix T75161: Random UV doesn´t work with fats drawing
Also fixed T75162
2020-03-28 15:08:13 +01:00
7dbf7255c2 GPencil: Fix error when stroke has 0 points
It's possible create a stroke with 0 points using python
2020-03-28 12:33:32 +01:00
bdec24b40d Cleanup: Removing unused parameter. 2020-03-28 09:14:07 +01:00
10bd3fb4cb Fix T74604: A.N.T Landscape Erode function reports error
Although indicated, the `rna_Object_active_vertex_group_set`
function was missing.
2020-03-27 22:14:47 -03:00
79b391f3a0 Fix missing NULL terminator for new brush option 2020-03-28 02:08:06 +01:00
Asher
e0030d53bc Fix key detection issues introduced by D7229
Removing the GHOST_kKeyUnknown check from processKeyEvent() produces
epeated unknown key events whenever a modifier key is held down, due
to the way ghost uses GHOST_kKeyUnknown as a filter value for modifier
key events.

Differential Revision: https://developer.blender.org/D7257
2020-03-27 20:59:20 -03:00
1f949121cd Fix T74969: Crash in gpencil edit mode
Result of poor shader pre-processing on Intel HD 4000 drivers
2020-03-27 20:12:05 -03:00
90aa771b30 Cleanup: compiler warnings 2020-03-27 23:21:16 +01:00
d85026db15 Overlay: Outline: Fix unreported feedback loop when smooth wire is disabled 2020-03-27 20:11:43 +01:00
a7110618ff Cleanup: GPUShader: Remove unused shaders 2020-03-27 20:00:27 +01:00
Ankit
0c0170f77a Fix error in macOS system file detection in recent changes
Differential Revision: https://developer.blender.org/D7250
2020-03-27 18:56:58 +01:00
9120191fe2 Sculpt: Pose Brush Face Sets origin mode
This commit introduces a new mode for calculating the positions and
weights of the IK segments in the Pose Brush based on the Face Sets.

The first segment of the chain will always include all face sets inside
the brush radius and it will propagate until the boundary of the last
face sets added in the flood fill. Then consecutive connected face sets
are added to the chain until the chain length limit is reached or all
face sets of the mesh are already part of the chain.

This feature enables complete control over the pose brush origins in
case that is needed. Also, with this mode, the user can have a library
of base meshes with face sets already configured to get to the initial
pose as fast as possible.

Reviewed By: jbakker

Differential Revision: https://developer.blender.org/D7235
2020-03-27 18:15:42 +01:00
4c0cca78eb Rename Edge Automasking to Mesh Boundary Automasking
This makes more clear what this automasking operation does and helps to differenciate it from the future face sets boundary automasking.

Reviewed By: jbakker

Differential Revision: https://developer.blender.org/D7185
2020-03-27 18:05:10 +01:00
015c084bda Sculpt: Weight normal and area sampling towards the brush center
Previously, all vertices inside the brush radius were taken into account
equally when calculating the sculpt normal and area. This was causing
artifacts and unpredictable results with large brushes or meshes with
curvatures, as the strongest deformation point of all brushes is usually
in the center. By weighting the vertex normal and position towards the
center when sampling, all brushes should now behave in a more
predictable way in non-uniform surfaces.

Reviewed By: jbakker

Differential Revision: https://developer.blender.org/D6989
2020-03-27 17:55:00 +01:00
7eacda5a2b Fix T74637: Reset face set data when disabling dyntopo
Last time I checked Face Sets were preserved in a more or less
predictable way when modifying the mesh with dyntopo. As it looks that
in some problems this may cause bugs and you can't see or use face sets
when modifying the topology of the mesh whith dyntopo active, it is
probably better to reset them when going from dyntopo to mesh. This way
you know that you are always going to get a predictable face sets state.

Reviewed By: jbakker

Maniphest Tasks: T74637

Differential Revision: https://developer.blender.org/D7099
2020-03-27 17:52:00 +01:00
0db055338a GPencil: Small tweaks to Fill material panel 2020-03-27 16:38:22 +01:00
671d811323 Install_deps: Do not wipe out WITH_PYTHON CMake options.
This is annoying when one want to use system python and hence disables
the `WITH_PYTHON_INSTALL` options...
2020-03-27 15:46:47 +01:00
Mateusz Grzeliński
0a02c288aa install_deps: Enable PIC in Python static library.
Update for D3078, I think it should be fixed

Benefits:
- after installing python 3.7 with `./build_files/build_environment/install_deps.sh`, user will be able to run `make bpy` without linking error:
  - https://blender.stackexchange.com/questions/102933/a-working-guidance-for-building-blender-as-bpy-python-module
  - https://stackoverflow.com/questions/36779834/compiling-blender-bpy-recompile-with-fpic

To prevent errors like `/opt/lib/python-3.7.4/bin/python3.7: error while loading shared libraries: libpython3.7m.so.1.0: cannot open shared object file: No such file or directory`, add python .so lib to ldconfig

Reviewed By: mont29

Differential Revision: https://developer.blender.org/D7177
2020-03-27 15:23:58 +01:00
Daniel Santana
2632ba6703 Fix Optix build error after recent changes
Differential Revision: https://developer.blender.org/D7253
2020-03-27 14:26:26 +01:00
31bd8e6bf3 Fix T74642: Take gravity field weight into account
Reviewers: sebbas

Differential Revision: https://developer.blender.org/D7227
2020-03-27 12:41:14 +01:00
7fd71c1694 GPencil: More cleanups missing in previous commit 2020-03-27 12:39:18 +01:00
70f56167d0 UI: Add missing Annotation tool to Paint modes 2020-03-27 12:36:24 +01:00
8a62fa9855 GPencil: Cleanup of unused code a arguments 2020-03-27 12:36:24 +01:00
25e8550739 CPencil: Cleanup unused fill code
This is now replaced by draw engine and annotations don't use fill.
2020-03-27 12:36:24 +01:00
5ce41e6f57 Fix T75111: Crash when using subframes for animated fluid collider
This is not dependent on having an armature as mentioned in T75111.
The collider simply has to be animated.

Reviewers: sebbas

Differential Revision: https://developer.blender.org/D7251
2020-03-27 12:33:33 +01:00
Cody Winchester
6e505a45a1 Surface Deform modifier: add vertex group and strength control.
This commit aims to add functionality to the surface deform modifier that
gives more control and allows it to work better with the modifier stack.
* Maintains compatibility with older files. The default settings keep it
  so that the whole object is bound and vertex coordinates get overwritten
  as the modifier currently does.
* Turns the deformations from an absolute vertex coordinate overwrite into
  an additive offset from the vertex location before the modifier to the
  resulting bound deformation. This gives the ability to control the
  strength of the deformation and mix the deformation of the modifier
  with the modifier stack that comes before it.
* Also adds in a vertex group with the invert option. This is applied after
  the bind deformation is added. So the whole object is still bound to target,
  and the vertex group filters afterwards what parts get affected.
  I experimented with a version to only binds the geometry weighted to the
  vertex group, but that would break compatibility with old files.
  I may bring it in later as a separate option/mode for the surface deform.

With several fixes from @mont29.

Reviewed By: mont29

Differencial Revision: https://developer.blender.org/D6894
2020-03-27 12:25:37 +01:00
1bb7d42cf6 Cleanup: Silence uninitialized variable warning 2020-03-27 11:12:27 +00:00
da91329291 GPencil: Cleanup unused parameter 2020-03-27 11:43:36 +01:00
b498edb189 Fix T75118: Remove Texture Opacity parameter for Fill materials
This parameter was used in previous version and must be removed from UI panel.
2020-03-27 11:33:09 +01:00
e7af825ded Multires: Fix unwanted assignment of sculpt session pointers
Might have happened when Apply Base is used in sculpt mode.

In practice this probably was fine, since the operator tags object
for update, so the pointers will be restored back to what they should
be.
2020-03-27 11:29:41 +01:00
Cody Winchester
bd86edf116 Solidify modifier: add option to assign shell & rim geometry to selected vertex groups.
This commit gives the solidify modifier the ability to assign the newly created shell
and rim geometries to selected vertex groups. This expands the procedural control over
the modifier stack by letting users apply modifiers to the shell geometry without affecting
the original geometry.

This will be especially helpful for NPR users that use solidify to create backface
culling lines on their characters giving them the ability to add displace noise
and other effects.

Differential Revision: https://developer.blender.org/D6903
2020-03-27 11:12:57 +01:00
Cody Winchester
ba1f7acc3f Warp modifier: add bone from and bone to options when using armature objects
This commit adds the option to use armature bones for the From and To targets
when using armature objects.

The changes are based on the UV Warp modifier.

Reviewed By: mont29

Differential Revision: https://developer.blender.org/D6820
2020-03-27 10:42:40 +01:00
3441862c96 Cleanup: Silence warnings 2020-03-27 10:29:33 +01:00
96b3463e25 Cleanup: Remove debug print
Leftover from rB3b59c111821b.
2020-03-27 10:23:34 +01:00
ff62481f65 Fix T69060: File Output Node does not work with Time Remapping
Problem is that the RenderEngines will change the RenderData cfra when
rendering (when time remapping is used -- at least workbench/eevee/
gpencil do a combination of BKE_scene_frame_get() plus
RE_GetCameraWindow() which alters the RenderData cfra).

Later on in the pipeline, the Compositor will use this RenderData cfra
to determine the output file name for the FileOutput node. (In contrast
to this, the 'regular' Output will use the Scene's RenderData -- not the
Render's -- cfra [which hasnt been altered])

It is not entirely clear why RE_GetCameraWindow was setting the cfra on
the Render, but it appears to be legacy OGL rendering related and is not
needed anymore.
Removing this will keep the cfra as needed for the Compositor FileOutput
node.
2020-03-27 10:10:54 +01:00
d0b0a0a894 Fix T74927: Slow playback using Auto Normalization
Caused by rBedb3b7a323a1.

Using evaluate_fcurve_only_curve actually causes quite a bit of slowdown
[6x] compared to bezier forward differencing [which was used prior to
rBedb3b7a323a1]. But full fcurve evaluation is desired with Dynamic
Interpolation Effects [Back/Elastic] since their min/max will not be
captured with forward differencing.

So now gain back speed [using bezier forward differencing] and only do
the full fcurve evaluation for dynamic interpolation effects.

Maniphest Tasks: T74927

Differential Revision: https://developer.blender.org/D7196
2020-03-27 09:58:21 +01:00
6eb1004d50 Fix T58439: Info Editor does not show operator reports immediately when
operator cancelled.

Lots of operators return OPERATOR_CANCELLED when no data really changed.
Reports from those operators do not show immediately in the Info Editor
[they only do if the operator returns OPERATOR_FINISHED].

Now also notify the Info Editor in case of OPERATOR_CANCELLED.

Maniphest Tasks: T58439

Differential Revision: https://developer.blender.org/D7238
2020-03-27 09:41:33 +01:00
3b59c11182 Fix T66655: Add-on tool keymap not working after restart
- Use addon keyconfig for registered tools so reloading the keymap
  doesn't clear them.

- Ensure there is a default keymap, needed for addon keymaps
  to be available in the user keyconfig.
2020-03-27 17:38:13 +11:00
95247b4b14 UI: Use Title Case 2020-03-26 21:34:27 -04:00
03ac301102 UI: Spelling Inconsistencies 2020-03-26 21:20:31 -04:00
e1ee4dff8d Cleanup: redundant mask includes 2020-03-27 11:47:04 +11:00
c8b85d32c5 Cleanup: quiet unused function warning 2020-03-27 11:28:46 +11:00
ed86f3edb6 Cleanup: rename WM_modalkeymap API names, matching WM_keymap
Rename:
- WM_modalkeymap_add to WM_modalkeymap_ensure
- WM_modalkeymap_get to WM_modalkeymap_find
2020-03-27 11:28:46 +11:00
5c74b0964b Cleanup: add iterator macros to clang-format
Also rename START to BEGIN (matching BEGIN/END for most iterator macros).
2020-03-27 11:28:20 +11:00
2f149ebbe9 Cleanup: uppercase macros for sculpt iterators, add to clang-format
Also use sculpt prefix for SCULPT_CLAY_STABILIZER_LEN.
2020-03-27 11:27:10 +11:00
Adrian Newton
f1fb3eb975 UI: use pixel unit for generated image dimensions
Differential Revision: https://developer.blender.org/D7171
2020-03-27 00:49:15 +01:00
Adrian Newton
d663c9d8da UI: fix inconsistent modifier menu order for fluid and multiple strokes
Differential Revision: https://developer.blender.org/D7172
2020-03-27 00:45:49 +01:00
Robert Guetzkow
fcd6fac0a7 Fix T74996: material custom properties not displayed for Cycles
Differential Revision: https://developer.blender.org/D7223
2020-03-27 00:44:18 +01:00
Stephan Seitz
02518be634 Cleanup: suppress warning about float-to-int conversion
Differential Revision: https://developer.blender.org/D7212
2020-03-27 00:43:17 +01:00
5cf6689019 Fluid: Removed obstacle levelset optimization
Currently results in unstable particle behavior and incorrect meshing.
2020-03-27 00:16:34 +01:00
b7666f27d3 UI: Address Issues with recent fluid ui changes
See rB337e86148688aa608d007381ee9ca78879050754
2020-03-26 18:49:54 -04: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
56e0249489 GPU: Add workaround for faulty default attrib values on some drivers
On some drivers, the default values is not respected correctly.

To workaround this we create a small VBO that contains only 1 vec4 worth of
data and just bind it using glBindVertexBuffer to ensure 0 stride.

This fixes T75069 Instances not rendered correctly by workbench.
2020-03-26 21:10:44 +01:00
afb1a64ccb Fix T60682: adds macOS alias redirection for directories
This adds support for macOS aliases in addition to symlinks. It also adds
support for hidden, readonly and system file attributes.

Contributed by Ankit (ankitm) with modifications by me.

Differential Revision: https://developer.blender.org/D6679
2020-03-26 19:57:30 +01:00
Chris Clyne
d1972e50cb Add option to Copy the active view layer, and add an empty view layer
Modify the view layer add operator (and underlying `BKE_view_layer_add`)
to allow for copying the current view layer, as well as adding a new one
but with all LayerCollections disabled by default (this is important for
heavy scenes where currently adding view layers can take a long time due
to enabling every collection by default).

Reviewed By: mont29

Differential Revision: https://developer.blender.org/D6862
2020-03-26 19:36:51 +01:00
839f0cfa41 Overlay: Fix crash caused by NULL passes 2020-03-26 19:16:57 +01:00
86c61ce64f Cycles: Restore cycles_cubin_cc to working order
Reviewed by: brecht pmoursnv
Differential Revision: https://developer.blender.org/D7136
2020-03-26 11:41:44 -06:00
58ea0d93f1 Cycles/Optix: Add CYCLES_OPTIX_TEST override
This works similarly to the CYCLES_OPENCL_TEST
environment variable to allow testing on unsupported
hardware.

Note: like the OPENCL test override, this is
for *testing* only and bug reports on unsupported
hardware will *not* be accepted at this point in
time.
2020-03-26 11:30:17 -06:00
48ea173a7d Sculpt: Create Face Set by Edit Mode Selection
This implements a new mode in the Face Sets Create operator to create a
new face sets from the faces selection in edit mode. This can be used
when the user considers that the edit mode tools are more convenient for
a more precise control or a certain type of selection, like creating a
face set from a face loop.

Reviewed By: jbakker

Differential Revision: https://developer.blender.org/D7211
2020-03-26 16:24:21 +01:00
99530ef4ed Sculpt: Face Sets Init operator
This operator initializes all face sets in the sculpt at once using
different mesh properties. It can create face sets by mesh connectivity,
material slots, face normals, UV seams, creases, sharp edges, bevel
weights and face maps.

For properties that are already in the faces, this is implemented as a
loop. Properties that depend on edge attributes use a similar operation
to sculpt flood fill, but using face adjacency instead of edge vertex
connectivity.

As Multires also stores the face sets in the base mesh, this should work
in the face sets Multires implementation without any changes.

This is implemented as a separate operator as this resets the visibility
and creates all face sets at once, while the create face set operator
creates a single face sets, leaving the rest of the face sets in the
mesh as they are.

Reviewed By: jbakker

Differential Revision: https://developer.blender.org/D7209
2020-03-26 16:20:24 +01:00
Pablo Dobarro
a218be3080 Sculpt: Surface Smooth Brush and Mesh Filter
This implements the Surface Smooth Brush as a mode inside the Smooth tool,
which uses the HC algorithm from "Improved Laplacian Smoothing of Noisy Surface Meshes".
Comparted to the regular smooth brush with laplacian smooth, this brush removes
the surface while preserving the volume of the object.
The smooth result can be controlled by tweaing the original shape preservation,
displacement and iteration count.
The same surface smooth operation is also available as a mesh filter.

Reviewed By: jbakker

Differential Revision: https://developer.blender.org/D7057
2020-03-26 16:13:47 +01:00
a0437c3f73 Fix T75087 Workbench: DoF: Divide By Zero when antialiasing is disabled 2020-03-26 16:03:48 +01:00
f5ac118fb3 Sculpt: Use uchar to store the sculpt mask in the GPU
Using a float to store and render the mask seems like a waste of memory
without any noticeable difference in the viewport for its use case.
After this commit, the mask and the face sets combined should take the
same amount of GPU memory than only the mask in previous versions.

Reviewed By: jbakker

Differential Revision: https://developer.blender.org/D7148
2020-03-26 16:02:30 +01:00
e000dcb849 Overlay: Wireframe: New method to avoid zfighting with geometry
This new method is only enabled if Overlay Smooth Wire is enabled.

This method gives really nice results but has some downside:
- Require a depth copy or loose the ability to write wire depth to the
  depth buffer and have correct depth ordering of wires. This patch use the former, with its associated cost.
- Require some depth sampling and prevent early depth test (i.e: has
  some performance impact).
- Has some relatively minor instability with geometry that are perpendicular
  to the view and intersecting with other geometry.

Pros:
- Compared to a fullpass approach this is surely going to have less
  performance impact and much higher quality.
- Removes the additional vertex offset. (see T74961)
- Fixes all half edges z-fighting.

{F8428014}

{F8428015}

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D7233
2020-03-26 15:55:16 +01:00
458f50ba73 Fix T74780: Face sets operators not aware of SCULPT_FACE_SET_NONE
SCULPT_FACE_SET_NONE default value is 0 and it is rendered hidden, so
the invert sign operation to show it was not working. Now the show all
function sets this face set to ID 1 before setting its sign.

I also refactored this check in gpu_buffers.

Not related to the reported issue, but the mesh in attached contains non
manifold geometry with hidden loose vertices, so the visibility state
was not syncing correctly to those vertices. Now the toggle operators
checks the current visibility only on the face sets, so no manifold
vertices are ignored (as they are in the rest of operations in sculpt
mode).

Reviewed By: jbakker

Maniphest Tasks: T74780

Differential Revision: https://developer.blender.org/D7188
2020-03-26 15:50:25 +01:00
83947ea253 Fix T74761: Reimplement vertex to face sets visibility sync
This fixes multiple issues:
- Adds tag to update shading when changing vertex visibiliyt. This makes the mesh visibility update when the operator ends.
- Sync vertex to face sets no longer requires the pmap, so it does not crash. (Maybe we can initialize the pmap on undo to avoid these problems in the future).
- Sync vertex to face sets now works in a coherent way with the rest of visibility operations. Hide Box and Hide mask now sync the visibility changes to the face sets, so the all the operations are now getting a correct visibility state.

Reviewed By: brecht

Maniphest Tasks: T74761

Differential Revision: https://developer.blender.org/D7187
2020-03-26 15:44:50 +01:00
c286fa309e Fix T74899: Add Draw Face Sets brush to versioning defaults
Brushes are created automatically when the tools is enabled, but this
way it gets correct defaults and it is accesible from scripts.

Reviewed By: jbakker

Maniphest Tasks: T74899

Differential Revision: https://developer.blender.org/D7199
2020-03-26 15:41:10 +01:00
32bb848838 Fix T74692: Do not draw nodes with the default face set
The default face set color is white, so we can skip drawing the default
face set. This allows to enable again the optimization of not drawing
overlays in nodes where the mask is empty.

This will still slow down the viewport when a new face set is created
for the whole mesh or when inverting the mask, like in previous
versions.

I also renamed the function to make more clear that now it is checking
for both mask and face sets.

Reviewed By: brecht

Maniphest Tasks: T74692

Differential Revision: https://developer.blender.org/D7207
2020-03-26 15:39:41 +01:00
c32cf06e42 Fix T74808: Division by 0 in Cloth brush solver with overlapping vertices
This checks that the distance of the current positions of two connected
vertices is not 0 before calculating the correction vectors for those
vertices.

Reviewed By: jbakker

Maniphest Tasks: T74808

Differential Revision: https://developer.blender.org/D7184
2020-03-26 15:38:17 +01:00
4ff3d5aded Fix T75089: Missing pmap when using Face Sets in the mesh filter
When using Face Sets to mask the mesh filter the pmap needs to be
initialized to check the face sets of each vertex, otherwise it will
crash because it is null.

Probably now we should just initalize the pmap when building the PBVH as
almost all tools need it, so we can avoid these crashes in the future.

Reviewed By: jbakker

Maniphest Tasks: T75089

Differential Revision: https://developer.blender.org/D7236
2020-03-26 15:36:35 +01:00
Jeroen Bakker
7ed3ebbc6e Fix T67888: Incorrect Wireframe After Applying SubSurf/MultiRes
Show control edges stores the control edges in the mesh which is
picked up by the draw manager. When applyng a subsurf (or multires) we
don't want that data present in the base mesh. Any rebuilding of the mesh
would overwrite the data anyway.

This patch introduces a new flag for applying modifiers
that can be checked to ignore storing display specific data in
the base mesh.

Reviewed By: Brecht van Lommel

Differential Revision: https://developer.blender.org/D7163
2020-03-26 15:34:53 +01:00
Jeroen Bakker
2e8fb95e7c SubDiv: Incorrect normals loose edges
The normals of loose edges can be non uniform as they aren't normalized.
Checked with what happens with edit loose edges and synchronized the
implementation.

Reviewed By: Brecht van Lommel

Differential Revision: https://developer.blender.org/D7127
2020-03-26 14:35:27 +01:00
0545a84729 Fix Crash In Paint Overlay
The previous implementation tested the normal behavior and ignored some
edge cases. This patch will also test for NULL in all cases
2020-03-26 14:16:17 +01:00
Jeroen Bakker
1ca1744c29 Fix T70807: Weight Paint Overlay XRay
Weight paint overlay was not working when XRay was turned on.

The Weight Paint overlay is rendered directly into the default
framebuffer with a depth equal test. This test fails as the depth won't match.
This patch will update the depth buffer in these cases.

Reviewed By: fclem

Differential Revision: https://developer.blender.org/D7176
2020-03-26 13:35:06 +01:00
1b1c683f74 Fix missing text input on Windows with certain keyboard layouts
Events for keys specific to certain keyboard layouts unknown to Blender
were ignored. Now pass them along as unknown key events for which we
can still handle text input, like we already do for Linux and macOS.

Differential Revision: https://developer.blender.org/D7229
2020-03-26 09:22:47 -03:00
622e1591da GPencil: Fix unreported fade object when no Gpencil object is selected
Only must fade if the active object is a GPencil.
2020-03-26 13:17:22 +01:00
a093112696 CMake: Fix compilation with Xcode generation on Xcode 11.4
Need to give correct SDKROOT.
2020-03-26 13:07:52 +01:00
bd2b1a67a7 Fix T74939: Random Walk subsurface appearance in OptiX does not match other engines
Random Walk subsurface scattering did look different with OptiX because transmittance is
calculated based on the hit distance, but the OptiX implementation of `scene_intersect_local`
would return the distance in world space, while the Cycles BVH version returns it in object
space. This fixes the problem by simply skipping the object->world transforms in all the
places using the result of `scene_intersect_local` with OptiX.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D7232
2020-03-26 13:00:09 +01:00
08b9b95147 Fix T75047: Number input advanced mode is not working in JP keyboard
Check for special ascii values for number input first so that we can
quickly decide if we should go into advanced mode.

Reviewed By: Bastien
2020-03-26 12:45:09 +01:00
90e8f94558 Fix T75094: Gpencil Selection mode crash in Vertex Paint when build modifier is used 2020-03-26 12:34:02 +01:00
671b6d41c4 CMake: Fix Blender.app creation/modification time
It was failing on first run of CMake since the Blender.app is not yet
created.
2020-03-26 11:35:51 +01:00
ef2bde11d2 CMake: Fix spelling for OpenImageDenoise package
The spelling should match exactly between how package is called in
find_package and in FIND_PACKAGE_HANDLE_STANDARD_ARGS.
2020-03-26 11:35:51 +01:00
a22471f1d1 CMake: Fix macOS SDK detection with latest Xcode and macOS
Happens on macOS 10.15.4 and Xcode 11.4.

The reason of failure is caused by following factors:

- xcodebuild reports full semantic macOS SDK version 10.15.4
- The actual SDK file path will only include major and minor part
  of the version (10.15, MacOSX10.15.sdk)
- Previous CMake code of ours expected direct match between SDK
  version and file path.

The solution is to make our detection code a bit more flexible and
additionally check for major.minor macOS SDK version in the path.
2020-03-26 11:35:51 +01:00
f9590c8eaa CMake: Remove support of Xcode prior to 8.2
The specific goal of this change is to get rid of separate code paths
for older and newer Xcode versions.

The version 8.2 is picked since it's the latest version which runs on
macOS 10.11 (which is our current deployment target). If that turns
out too new for some reason the alternative would be to require Xcode
version 5.
2020-03-26 11:35:51 +01:00
c547d431eb Fix T75093: GPencil eraser selection in draw mode erase previous selected points
The selection in Draw mode works as a quick eraser and must erase only the points selected in that operation and not any previous selected point.

Now, before erase, unselect any previous selected point.

Note: It's planned to split select & erase operators for Draw mode.
2020-03-26 10:19:16 +01:00
e8dd96516c Keymap: disallow modal key-maps in add-ons keyconfig
Disable functionality reported in T60766 & only partially worked.

This could be used if the key-map was added after Blender started
as a way to customize modal key-maps, however it didn't work with
the add-on enabled on startup.

Add-on key-maps are intended to extend existing key-maps
so they can call the add-on, not as a way to change modal key-maps
for Blender's built-in functionality.

Disable this since it's not needed as add-ons
can't yet define modal key-maps.
2020-03-26 19:11:50 +11:00
03b2fc1a61 CMake: Cleanup, remove unneeded version requirement
The main CMakeLists already requires CMake 3.5, so there is no point of
requiring "newer" CMake on macOS.

This was a code from a while back where CMake 3 was not required on all
platforms.
2020-03-26 09:02:10 +01:00
fd262d3196 CMake: Fix detection of Xcode version
Legacy code did not take into account the fact that major version can
be two digits. This was causing "Xcode 11.4" to be detected as "11.".
2020-03-26 08:59:08 +01:00
09b8cdb25e Subsurf: Enable Optimal Display by default
Affects both Subdivision Surface and Multires modifiers.
2020-03-26 08:42:29 +01:00
b2f04fce2d Fix T75062: Frame Flashes During 3D Viewport Animation Playback
This issue became visible after fixing other TAA issues recently.
The sample count of the first frame wasn't reset resulting that the
incorrect resolve took place. This issue was already there beforehand,
it is just much clearer during the recent changes.

Now the `taa_sample will be reset when performing an animation playback
in the 3d viewport.
2020-03-26 08:22:52 +01:00
bae9553848 Test: update bl_run_operators blacklist, add volume object 2020-03-26 15:42:52 +11:00
Matt Rossman
eca52402bc Fix T75081: RNA path For FFMPEGSettings missing 2020-03-26 15:38:46 +11:00
b2b6099666 Cleanup: redundant cast, unused arguments 2020-03-26 15:37:33 +11:00
e990e55eba Fix crash with missing NULL check accessing grease pencil paint 2020-03-26 15:32:40 +11:00
a9394aa48e Fix crashes accessing inactive screen properties 2020-03-26 15:32:40 +11:00
38b211b581 Fix crash accessing length unit settings 2020-03-26 15:32:40 +11:00
0a34e5b300 Fix crash accessing the tool with no active space 2020-03-26 15:32:40 +11:00
33da997193 Fix crashes from various missing checks in operator poll functions
Issues exposed by 'bl_run_operators.py' utility.
2020-03-26 15:32:40 +11:00
52cff88f72 Fix crash when make proxy failed to assign a proxy 2020-03-26 15:32:40 +11:00
a8e749f624 Fix crash setting the brush with the current brush was unset 2020-03-26 15:32:40 +11:00
ffd26b420c Fix crash closing a window in background mode 2020-03-26 15:32:40 +11:00
7354f07ead Cleanup: use doxy sections & add missing sections 2020-03-26 15:32:40 +11:00
ba8d819c9b Fix T74417: Freestyle render removes image texture users
This simplifies freestyle render pipeline integration so we don't have to do
much manual ID user management at all. The complexity here was legacy from
Blender Internal.

Based on fix provided by Sybren A. Stüvl.
2020-03-26 01:29:20 +01:00
366cb3a059 Fix T74711: tiling brush option in image editor not working anymore
This makes it work again at least for the non-UDIM case. For UDIM it's not
great still but I'll consider that a known limitation. A proper solution is
probably to find the closest tile at the start of the stroke and then only
paint in that one tile for the rest of the stroke.
2020-03-26 00:02:06 +01:00
99e693d126 UI: rename image source Tiled to UDIM Tiles for easier discovery 2020-03-25 23:29:46 +01:00
d554cf8dd9 Fix T75090: crash with old NVIDIA drivers after overlay refactor
Work around GLSL compiler bug with backslash in preprocessor macros.
2020-03-25 23:14:50 +01:00
6681a33a6f GPencil: Fix unreported Threshold parameter visible in wrong context
The threshold only must be vsisible in Segment mode.
2020-03-25 18:46:45 +01:00
acd84ab105 GPencil: Fix unreported missing parameter for Cutter tool 2020-03-25 18:46:45 +01:00
d751491489 Fix error after recent change when WITH_INTERNATIONAL=OFF
Always need to install font files now.
2020-03-25 18:44:35 +01:00
59aaba739d Cleanup: typo in print 2020-03-25 16:52:04 +01:00
68e341e9d5 UI: remove non-unicode font and simplify default font loading code
There is no need to have another font embedded in the Blender executable, we
can assume the bundled font exists. In the future we may provide a fallback
if the font specified by the user in the preferences is missing a character,
but that can use our bundled international font.

Differential Revision: https://developer.blender.org/D6854
2020-03-25 16:39:58 +01:00
9070999c21 UI: always use international font
This means Blender can display more text correctly without having to enable
user interface translation. Previously the quality of the font was lower,
but that has been fixed now.

The font files have now been ungzipped, which results in faster file loading
as Freetype can read only the parts of the file that it needs. Blender download
size should not increase since the release package is compressed.

This includes improvements for Cyrillic characters from the latest DejaVu
Sans fonts from D6960, contributed by Harley Acheson. Fixes T74097.

Differential Revision: https://developer.blender.org/D6854
2020-03-25 16:39:37 +01:00
f48d15a861 Cycles: limit number of processes compiling OpenCL kernel based on memory
The numbers here can probably be tweaked to be better, but it's hard to
predict and this should at least avoid excessive memory swapping.

Fixes T57064.
2020-03-25 16:39:37 +01:00
e5f7b31dd4 Fix VR viewer offset on session start with no positional tracking
The current viewer pose position as determined by the OpenXR runtime
would be applied as offset. This offset should however only be set when
toggling the positional tracking while the session already runs.
2020-03-25 16:09:39 +01:00
04ab677761 Fluid: Small fix for secondary particles
Small tweak to ensure index will not run out of bounds during secondary particle computation.
2020-03-25 16:08:05 +01:00
035a3760af Alpha hash support for hair in EEvee
This patch adds support for alpha hash for hair rendering in EEvee.  Here's a comparison of with alpha hashing:

{F7588610}

And no alpha hashing:

{F7588615}

Note that this needs "soft shadows" enabled, otherwise shadows will be noisy; here's a render with soft shadows disabled:

{F7588621}

Reviewed By: fclem

Differential Revision: https://developer.blender.org/D5221
2020-03-25 15:45:24 +01:00
b4c05a9c89 Cleanup: use doxy sections 2020-03-25 21:24:59 +11:00
567212c343 Fix T74846: UV gizmo swaps X/Y 2020-03-25 19:42:41 +11:00
1587eb16d8 Cleanup: use const to for some mask arguments 2020-03-25 19:32:44 +11:00
4c57f07a0f Cleanup: move mask queries into own file
Similar functions to lookup nearest mask points were in mask_add.c
& mask_edit.c
2020-03-25 19:06:17 +11:00
2bc791437e Cleanup: use 'r_' prefix for output arguments
Also pass some args as 'const'.
2020-03-25 17:58:58 +11:00
c3764fe1e8 Cleanup: update doxy sections 2020-03-25 16:36:01 +11:00
188ccfb0dd Fix T74662: Prefetching causes random crashes
Caused by 18b693bdbd, due to lack of thread safety.
Beteween calling BKE_sequencer_cache_get_num_items and BKE_sequencer_cache_iterate
New items could be inserted in the cache.

BKE_sequencer_cache_iterate() now use 2 callbcack functions for initial setup
during which buffers with correct length can be initialized and finally iterating.

Additionally drawing of unselected items was fixed again introduced in 18b693bdbd.

T74662 is reporting quite different symptoms, than I get on my machine, so I am not
entirely sure this is complete fix.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D7220
2020-03-25 00:23:06 +01:00
e1c7549ac9 Fix T75019: Frame Offset does not apply to scopes
Don't check for `sseq->mainb == SEQ_DRAW_IMG_IMBUF`.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D7228
2020-03-25 00:09:14 +01:00
8e8fdf875d Windows/Cleanup: Remove VS2015 support from make.bat
VS2015 has not been supported for a while now but make.bat
still had some support for it.
2020-03-24 14:48:23 -06:00
Valentin
27f29cdfba Fix T74038 : Scrolling doesn't work in menu if there is no active item
Fix T74038, the logic didn't handle the case where there was not any button with focus.

Reviewed By: Julian Eisel

Maniphest Tasks: T74038

Differential Revision: https://developer.blender.org/D7208
2020-03-24 21:40:36 +01:00
394a1373a0 Cycles: use OpenCL C 2.0 if available, to improve performance for AMD
Tested with AMD Radeon Pro WX 9100, where it brings performance back to 2.80
level, and combined with recent changes is about 2-15% faster than 2.80 in
our benchmark scenes.

This somehow appears to specifically address the issue where adding more shader
nodes leads to slower runtime. I found no additional speedup by applying this
to change to 2.80 or removing the new shader node code.

Ref T71479

Patch by Jeroen Bakker.

Differential Revision: https://developer.blender.org/D6252
2020-03-24 20:09:36 +01:00
bb26c1359e Add invert mapping option to proximity weight edit modifier, and some cleanup. 2020-03-24 18:28:55 +01:00
Cody Winchester
26ef4fa85e Modifiers: Vertex Weight Edit add invert curve falloff option
This commit adds the option to invert the resulting weights of the
falloff curve.

There is a workflow used by some to convert a texture mask into
vertex weights by using a custom curve and inverting the points.
This allows the same effect with a single click, and gives the modifier
more procedural functionality.

With minor UI tweaks by @mont29.

Differential Revision: https://developer.blender.org/D6899
2020-03-24 18:28:55 +01:00
f3ea8cd608 Overlay: Wireframe: Make facing ratio offset depends on gl_Position.w
This makes the offset dependent of the actual near and far clip distances.
2020-03-24 17:54:30 +01:00
5801a016d4 Cycles: slightly improve OpenCL performance by reordering SVM enum values
Ref T71479
2020-03-24 16:49:46 +01:00
2bec6f1f06 Cycles: work around OpenCL performance regression after AOVs and vector rotate
We appear to be hitting some limit where adding any amount of code causes a
significant performance regression, no matter what it does. To work around
that a new node level was added.

Ref T71479
2020-03-24 16:49:46 +01:00
f8a4fb43fb Cleanup: remove unused Cycles kernel feature flags, replace by node levels 2020-03-24 16:49:46 +01:00
266d243d8d Cleanup: Silence warnings
```
...\gpu_texture.c(466,7): warning C4555: result of expression not used
...\gpu_texture.c(559,7): warning C4555: result of expression not used
...\gpu_texture.c:1205:72: warning: pointer targets in passing argument 4 of ‘glGetTexLevelParameteriv’ differ in signedness [-Wpointer-sign]
```
2020-03-24 12:33:31 -03:00
d5c177bc90 Cleanup: use switch statement instead of if/else on enum value... 2020-03-24 16:26:15 +01:00
a40f2c30ff GPencil: Cleanup previous commit 2020-03-24 16:19:11 +01:00
7ac5c5b08c GPencil: Add blank frame when add layer in Dopesheet
When use the dopesheet add layer operator a new blank frame is created. It's very strange to create a layer and don't see anything in dopesheet.

If the layer is added in properties, the frame is not created.

Reviewed by: @pepeland @mendio
2020-03-24 16:16:47 +01:00
d626ced6f1 GPU: Estimate a better value for the memory used
This commit adds a `mipmaps` member to the `GPUTexture` struct and also
computes to the memory used by these mipmaps and the memory used for
textures that are created from an external bindcode.

So it solves the following inconsistencies:
- The memory value for mipmaps was not being computed.
- As `GPU_texture_from_bindcode` didn't call
 `gpu_texture_memory_footprint_add`, it brought inconsistencies to the
 value of the used memory, especially when the texture is freed.

Differential Revision: https://developer.blender.org/D3554
2020-03-24 12:13:26 -03:00
28c3d952db Fix T74782: WorkBench TAA Artifacts During Painting/Drawing
When the TAA is finished the screen can still be redrawn by other
operations without the TAA resets.
If that happened the TAA did add a blank sample to the result as the
scene wasn't drawn, but the was processed.

Reviewed By: Clément Foucault

Differential Revision: https://developer.blender.org/D7226
2020-03-24 16:04:09 +01:00
b67b414a85 GPencil: Replace Tint mode "Both" to "Stroke and Fill" 2020-03-24 16:01:59 +01:00
b759857825 Revert "Fix T74782: WorkBench TAA Artifacts During Painting/Drawing"
This reverts commit 58ac113b76.
2020-03-24 14:02:16 +01:00
Michael Soluyanov
88adfc7e54 Fix missing grid theme option for Movie Clip Editor
The theme color is used in code, but not exposed in RNA and therefore
there's no button in the theme editor for it.

Reviewed by: Julian Eisel
Differential Revision: https://developer.blender.org/D7219
2020-03-24 13:49:22 +01:00
28827b62f7 Fix T64573: RNA_path_from_ID_to_property fails for pointcaches
Give pointcaches a proper path function which e.g. also resolves
ALT+click (assign to all selected) not working for anything relating to
pointcaches.

This also cleans up the usage of the 'eModifierTypeFlag_UsesPointCache'
flag (removed from the boolean modifier, added to the softbody modifier).

Maniphest Tasks: T64573

Differential Revision: https://developer.blender.org/D7115
2020-03-24 10:52:38 +01:00
02f7a6b2bd Fix T74744: Studio Lights editor not updating in realtime when tweaking
the settings

Caused by rBc476c36e4008.

This hooks into the existing FIXME (workaround for a missing update
tagging), reactivates the NS_VIEW3D_GPU notifier (introduced in
rB2ad3d8f158d2 -- but not going anywhere atm.) to check changes to rv3d
rflag which indicated UserStudioLight has changed. To not have updates
all the time, the rflag also needs to be cleared again (see original
rB2ad3d8f158d2).

Maniphest Tasks: T74744

Differential Revision: https://developer.blender.org/D7194
2020-03-24 09:58:25 +01:00
ed44bb902d Fix T74872: Clipping Region not updating
Caused by rBc476c36e4008.

This hooks into the existing FIXME (workaround for a missing update
tagging), needs to also check the clip_state (to detect
changes in DRW_STATE_CLIP_PLANES).

Maniphest Tasks: T74872

Differential Revision: https://developer.blender.org/D7193
2020-03-24 09:54:28 +01:00
a6dd22d431 Fix T74957: Matcap flip not updating
Caused by rBc476c36e4008.

This hooks into the existing FIXME (workaround for a missing update
tagging from operators), needs to also check the shading.flag (to detect
changes in V3D_SHADING_MATCAP_FLIP_X).

Differential Revision: https://developer.blender.org/D7192
2020-03-24 09:50:09 +01:00
579447bd89 Fix T74096: Paint Masking overlay can`t be hidden
Caused by rB9516921c05bd.

Dont really see a reason to draw overlays here if overlays are disabled.
Looks like this only affects Face/Vertex mask selection drawing [which
should indeed be hidden when overlays are disabled] next to two
exceptions:

- OVERLAY_paint_vertex_cache_populate draws weights as well [D7176 /
T70807 might be related here, but to me it looks like drawing weights
here is actually not needed at all]

- OVERLAY_paint_texture_cache_populate calls
DRW_cache_mesh_surface_texpaint_get [not sure about this one, this is
also called from workbench_cache_texpaint_populate, looks like this is
not needed when overlays are hidden]

Maniphest Tasks: T74096

Differential Revision: https://developer.blender.org/D7179
2020-03-24 09:44:42 +01:00
Habib Gahbiche
6e4eb2be28 RNA: expose comparison tolerance for Mesh.unit_test_compare 2020-03-24 19:41:46 +11:00
cd02495479 Fix T75036: Assert when copying pose bones 2020-03-24 17:54:06 +11:00
3d3a91103b Doc: remove MeshTessFace reference 2020-03-24 16:26:07 +11:00
Henrik Dick
bb19d96bc5 Fix solidify complex degenerate cases with duplicate faces
The removal of duplicate faces that are created during the handling of
degenerate cases was implemented already but didn't work.
This patch should fix some crashes with the solidify complex mode
related to that.

See D7221 for details.
2020-03-24 16:17:22 +11:00
15b0c76480 UI: add Blender -> System menu
Include technical operators here so they're available
when using menu-search.
2020-03-24 14:11:31 +11:00
c46dcdf887 UI: add menu search functionality to operator search menu
This has some advantages over operator search:

- Some operators need options set to be usefully accessed.
- Shows key bindings to access menus
  (for actions that don't have key bindings themselves).
- Non operator actions such as check-boxes are also shown.
- Menu items can control execution context, using invoke or execute
  where appropriate so we can control how the operator runs.

Part of the design task T74157.

This can be tested using the 'Experimental' preferences section
or selected in the key-map editor.
2020-03-24 13:41:18 +11:00
94b8166a8b Cleanup: clang-format 2020-03-24 10:42:29 +11:00
d0d251b53b Cleanup: spelling 2020-03-24 10:36:42 +11:00
9c280630c9 Fix invalid comma use 2020-03-24 10:17:52 +11:00
cda81d5a4d Fluid: Enforce minimum thickness to planar flow / effector objects
Planar object now have a thickness by default. This should make it more intuitive for users as there is no need to specify an object thickness.
2020-03-23 23:50:39 +01:00
e9629e3cfd Fluid: Use different phi for levelset generation
Phi that is used for mesh should be the one that matches particles best.
2020-03-23 23:50:39 +01:00
1b5b6a5da8 Fix T73505 EEVEE: Group output node sockets default value not working
This just cleanup the code and apply the expand to group output nodes.
2020-03-23 23:50:32 +01:00
765c82e92d Fix possible endless loop in Auto Merge & Split 2020-03-23 17:40:08 -03:00
b701af328a Revert "COW: Edit Mesh: Do not copy the looptris pointer"
The looptri is repeated in the linked Meshes but the pointer
is only referenced in the evaluated ones.

This reverts commit 64982e213f.
2020-03-23 14:18:36 -03:00
ed386507e1 Fix T74984: Crash opening specific production files
More detailed symptoms: there was no curve cache created for an object
which was used by draw manager.

A bit tricky situation, which involves collection instances and their
proxies.

The root of the problem in the dependency graph was that instanced
collections visibility was not updated when object is requested with
different visibility. So what was happening is that one of the objects
was pulled as an indirect dependency of something invisible, so it
built instanced collections as if the instancer is invisible. After
that the same object was built as visible. Before this fix this was
only update object flags, the instanced collections still believed they
are invisible. Since there is no path via relations which would connect
visible object with instanced objects the visibility flush which is
happening during graph finalization did not "fix" the visibility flags.

This change makes it so instanced collections are updating their
visibility when their instancer's visibility is changing to truth.
This is similar to how collections will accumulate their visibility
when same collection is used from multiple ones with different
visibility.

However, this alone wasn't enough to get crash fixed. This marked
collections as visible, but the geometry component of the curve object
was still considering self as invisible.

This is something tricky, since the code which is responsible for this
issue was added as an optimization in afb4da6650. This looks like like
an oversight in that commit since it's rather weird that ID node's
flag would depend on construction order (in "normal" object builder the
ID node's directly_visible flag is initialized to object's visibility).
So it seems logical to get this part of code in sync between "regular"
and "accumulative" object builder.

And last but not least the naming is_directly_visible is old and does
not really represent what it actually mans now: a more correct name
would be "will be used by the draw manager".

Differential Revision: https://developer.blender.org/D7217
2020-03-23 17:19:44 +01:00
58ac113b76 Fix T74782: WorkBench TAA Artifacts During Painting/Drawing
When the TAA is finished the screen can still be redrawn by other
operations without the TAA needs to be reset.
If that happened the TAA did add a blank sample to the result.

This patch will add an early exit in the case TAA was finished. Note
that there are still some cases still not working. The overlay engine
can in certain circumstances draw directly into the default_fb what can
lead to render artifacts.
2020-03-23 17:10:01 +01:00
24b27ea231 Bump subversion for previous theme additions 2020-03-23 16:43:54 +01:00
Michael Soluyanov
c95b522856 UI: Theme options for checkerboard pattern colors and size
This patch adds ability to set up colors and size of background
(transparency) checkerboard pattern in viewport and 2d editors. No new
backgrounds, only changing colors in existing ones.

This is not the background of the viewport, it is a transparency
checkerboard that is turned on only in render mode, when the
transparency mode is on. And also in 2D-editors, (image, sequencer,
etc).

Reviewed By: Pablo Vazquez, Julian Eisel

Differential Revision: https://developer.blender.org/D6791
2020-03-23 16:35:29 +01:00
88a86c025c Deps: TBB changed their repository URL
As a result the MD5sum of the downloaded package also changed.
2020-03-23 16:04:52 +01:00
Henrik Dick
241248223a Change solidify's material offset in complex mode to conform with simple mode
this patch will change the behaviour of the material offset in complex mode to fit simple mode output.
Previously in complex mode this would offset the material of the enire shell,
because when you read the tooltip it says material for new generated geometry.
In complex mode everything is new generated geometry though.
In simple mode on the other hand, this would give you a way to only change the inside faces
material. There may be cases in large modifier stacks where material offset like it is implemented
currently in complex mode may be useful, but it is much more useful in the way it is implemented
by simple mode.

Reviewed By: mont29

Differential Revision: https://developer.blender.org/D7215
2020-03-23 15:39:48 +01:00
Henrik Dick
ee4645207f Fix T74195: Solidify Complex Dissolve Crash.
I also added a few more comments to the code as I gone along.

Maniphest Tasks: T74195

Differential Revision: https://developer.blender.org/D7214
2020-03-23 15:22:31 +01:00
f9855800e0 Depsgraph: Driver Relations, skip finding possible relation with one driver
The `build_driver_relations()` function in the depsgraph relations builder
adds relations between drivers that potentially write to the same memory
location. This of course is only useful when there are two or more drivers.
2020-03-23 14:54:07 +01:00
7192a1bca3 Fix T73593: Drivers on hide_viewport and hide_render are unreliable
My previous fix (rB4c30dc343165) worked, except for an off-by-one error.
2020-03-23 14:54:07 +01:00
0b116a84c9 Fix T74923: Weight Painting Overlay Invisible for In Front Objects
For In Front Objects we need to use the in front depth buffer.

This patch will use the in front depth buffer and also makes sure that
it is filled with the center pixel depth.

Reviewed By: fclem

Differential Revision: https://developer.blender.org/D7216
2020-03-23 14:03:39 +01:00
6a5bd812b5 Fix T74586: Image Editor Uses Invalid Display Channels
When using the image editor the display channels attribute can become
invalid when selecting another image/buffer. This patch will check what
display channels are valid and when an invalid channel is selected it
will fall back to the color channel.

To de-duplicate the code it also introduces a
`ED_space_image_get_display_channel_mask` function that will determine
the valid bitflags for the display channel of a given `ImBuf`.
2020-03-23 13:56:42 +01:00
64982e213f COW: Edit Mesh: Do not copy the looptris pointer
No functional changes.

Differential Revision: https://developer.blender.org/D7173
2020-03-23 09:30:26 -03:00
bceb91ffd2 Sound: Fix asymmetrical mutex lock/unlock logic
Started to happen after recent fix for T72632.

Was caused by runtime fields backup doing an early exit in the case the
given ID was never expanded by the Copy-on-Write mechanism, but it was
not done int the backup restore function (since it was not possible to
know "locally").

Now both init() and restore() will do an early exit when the ID had
nothing to be backed up.
2020-03-23 09:55:15 +01:00
0710fb724b Fix T72632: Blender crashes using Jack with AV Sync enabled (repeatable) 2020-03-23 09:34:26 +01:00
46c0da6e69 Fix T74964: Stereo Viewport Rendering Not Working
On some platforms the stereo viewport rendering was not working. The
issue was that the fragment shader and vertex shaded didn't match. Some
platforms will remove the non-matching in/out parameters and blender
needs to provide only the optimal set of parameters. Other platform
still want to receive data for the parameters that aren't used.

This fix uses the correct vertex shader that matches the fragment shader
making both platforms render the same result.
2020-03-23 09:10:37 +01:00
0c571db4ad Fix T73988: Mantaflow fluid simulation - Particles for Spray, Foam and Bubbles are one frame ahead of Mesh
Fixes an issue with secondary particles being out of sync with the main simulation. Cleaned up the secondary particle code in general too (making sure that all solver attributes - timestep, framelength, etc. - are set correctly).
2020-03-22 21:46:43 +01:00
95b6090afc Fix T75018: Dirty vertex colours missing tooltip 2020-03-22 21:40:31 +01:00
ad7bb8e42c Cleanup: spelling, correct Mesh.mface docs 2020-03-22 12:17:25 +11:00
1e4f6b231c Cleanup: use static declaration 2020-03-22 11:51:15 +11:00
9e8afa8817 Fix OpenXR SDK failing to compile with no JsonCpp installed
Force the SDK to use its own, bundled JsonCpp sources.
2020-03-21 21:58:17 +01:00
1e8dfe79c6 GPencil: Fade to Viewport color
Actually, the fade objects always fade to Black color, but this is not a good solution.

This patch fade the object to the viewport color.

Differential Revision: https://developer.blender.org/D7206
2020-03-21 20:29:17 +01:00
c589fdc8db Fix install_deps.sh ignoring --skip-xr-openxr 2020-03-21 19:03:56 +01:00
44c6b6615b OpenCL: Bring back CYCLES_OPENCL_TEST override
Back in 2.79 you could either use the debug panel or an
environment variable to override using OpenCL for unsupported
hardware. Which was rather useful for developers when testing
on NVidia just to be sure the CL kernels at-least build properly.

This broke in rB949ab753bb2

This diff restores testing though the CYCLES_OPENCL_TEST
environment variable.

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

Reviewers: brecht
2020-03-21 11:55:45 -06:00
3033b2a044 Fix T73372: cryptomatte not filling last pass for odd number of levels
Make logic consistent with the render pass creation in Python.
2020-03-21 15:04:12 +01:00
ada28d3c65 Fix T67712: cryptomatte sockets created in wrong order in some cases
Simplify the logic and always create node outputs in the order specified
by the render engine, I can't see a reason why built-in passes must be
first.
2020-03-21 15:04:02 +01:00
c0544eedc6 Fix crash with empty volume object and points drawing 2020-03-21 14:43:47 +01:00
0dbbb2eabf Cleanup: compiler warnings 2020-03-21 14:40:51 +01:00
d924e31b42 GPencil: New Hardeness mode for Opacity modifier
Add  new option to change the stroke hardeness. This option works at stroke level, not at point level.

Also replaced the "Both" name mode by "Stroke and Fill".

Differential Revision: https://developer.blender.org/D7195
2020-03-21 09:48:18 +01:00
a22cd6b6a9 UI: Weight Paint: add a menu for locking and unlocking vertex groups.
This is a follow up on rBa1e50cfe6b4dbc360b6118c63a0dc7445023c37b
2020-03-20 20:07:42 -04:00
9607e54985 Fix T74959: Need to be explicit about UTF8 encoding in py.
Because some OSs are still using old 8bits specific encodings... Angry
eye @windows...
2020-03-20 20:52:52 +01:00
3d9d132ccd GPencil: Fix unreported slow transform with proportional edition
Now a hash is used to avoid double update of the same stroke. The old method was not correct with proportional edition.
2020-03-20 20:03:23 +01:00
a696053545 Python API: add bl_use_stereo_viewport for RenderEngine
To indicate if the render engine supports rendering a stereo 3D viewport.
This is not currently supported for Cycles.

Fixes T62582
2020-03-20 16:09:49 +01:00
6777956005 Fix T68370, T74973: Cycles cryptomatte not working when other passes are enabled
Solution found by Blazej Floch.
2020-03-20 15:59:24 +01:00
db65a6e0fb Fix T74345: missing albedo for Cycles principled hair BSDF 2020-03-20 15:23:39 +01:00
0127e8522a Fix Python error in Cycles baking panel 2020-03-20 14:25:16 +01:00
36b55bee42 Fix T74649: Outliner: Cannot set/clear parent with 'Keep Transforms'
Parenting in the outliner via drang and drop would always happen without
the 'Keep Transforms' option. Since this is often desired, this adds the
ability to hold Alt for doing this to the drop action.

Adding the hint to hold Alt to the operator name is not nice, but since
the operator name is used for the UI, there doesnt seem to be a nicer
way of doing this.

If modifier keys are needed back for other actions, spawning a menu
instead could be an alternative for the future.

Maniphest Tasks: T74649

Differential Revision: https://developer.blender.org/D7120
2020-03-20 13:24:05 +01:00
27553a2e4e Multires: Fix assert when removing modifier in edit mode
It is not guaranteed that with Multires modifier existing there
will be CD_MDISPS and CD_GRID_PAINT_MASK custom data layers.

Fixes assert in the following scenario:

- With default cube, go to edit mode
- Add Multires modifier
- Remove the Multires modifier
2020-03-20 12:28:29 +01:00
d931aacef6 Cleanup: Use IDTypeInfo data for id_swap functions.
Part of T74960.
2020-03-20 11:55:34 +01:00
6cbf342cbb Cleanup: Move BKE_libblock_get_alloc_info to using IDTypeInfo.
Part of T74960.
2020-03-20 11:21:02 +01:00
db4d264e70 fix API doc generation after new volume entry in context... 2020-03-20 10:48:30 +01:00
3bab9b4868 Fix T74154: Mantaflow crash: Baking data for domain type fluid on a plane.
Added sanity check to prevent bakes from being triggered when there is no fluid object present.
2020-03-20 10:42:54 +01:00
b8574c7e56 Fix T74885: Stamped lens metadata is wrong when camera lens is animated
The Lens metadata stamped on rendered images was wrong when the camera lens
is animated. This was caused by the render pipeline passing the original
camera to the metadata system, and not the evaluated camera.
2020-03-20 10:15:59 +01:00
86cc29d0cf Multires: Disallow changing mode and quality after subdivision
Avoids possible final object shape destruction since those options
defines how displacement is applied and propagated.
2020-03-20 09:50:00 +01:00
Jeroen Bakker
8ba9efb7d8 Fix T74811: GreasePencil Stereo Rendering
When using grease pencil in a stereo rendering the grease pencil objects are
only visible in the left eye. In the viewport it renders both.

Issue is related that `DRW_render_gpencil` only renders a single view. But
`DRW_render_to_image` renders all views. This patch puts this in a loop to
render both eyes.

Reviewed By: fclem

Differential Revision: https://developer.blender.org/D7154
2020-03-20 07:47:04 +01:00
4fc45c7a2b Fix T74643: Outline Overlay Shows Hidden Faces
When in editmode faces can be hidden, but in object mode these faces are
still visible. The flag if a face was hidden in edit mode is stored in
object mode, but should not be used.

The edge detection gpu batch did detect hidden faces and didn't add them
to the draw batch. The edge detection gpu batch is used for workbench
shadows, custom bone shapes and object outlines.

This patch adds all faces to the edge detection batch.

Reviewed By: fclem

Differential Revision: https://developer.blender.org/D7157
2020-03-20 07:43:31 +01:00
cb560c01b6 Cleanup: clang-format, comment indentation 2020-03-20 12:23:04 +11:00
85dc8d7477 Cleanup: sort file, struct lists 2020-03-20 12:19:44 +11:00
35e3abb912 Cleanup: remove old header conventions recently re-introduced 2020-03-20 12:19:09 +11:00
d2c3544c5c Cleanup: remove debug print accidentally included in own previous commit.
Thanks to @brecht for the heads up!
2020-03-19 22:12:36 +01:00
Adrian Newton
45dbe0be69 UI: use consistent names in theme preferences and editors menu
Differential Revision: https://developer.blender.org/D7087
2020-03-19 21:55:18 +01:00
Luya Tshimbalanga
f974bf2cba Fix invalid Linux appdata.xml syntax
Differential Revision: https://developer.blender.org/D7149
2020-03-19 21:55:17 +01:00
a1322d7c95 Cleanup: fix typos in comments
Contributed by luzpaz.

Differential Revision: https://developer.blender.org/D7133
2020-03-19 21:55:17 +01:00
Adrian Newton
83f171b626 UI: remove unnecessary Shadow from Shadow Samples label in Eevee volumetrics
Differential Revision: https://developer.blender.org/D7161
2020-03-19 21:55:17 +01:00
Yevgeny Makarov
c8b611b67f Fix UI alignment in generator f-curve modifier.
Differential Revision: https://developer.blender.org/D7167
2020-03-19 21:55:17 +01:00
Stephan
da019efde9 Cleanup: silence warnign in volume grid code
Differential Revision: https://developer.blender.org/D7175
2020-03-19 21:55:17 +01:00
817c38f715 PyAPI Docs: Update aud example
Fixes T74641
2020-03-19 16:21:17 -04:00
4b74b35322 Fix Cycles crash in Windows debug mode with volumes 2020-03-19 20:02:33 +01:00
12b621059a Cleanup/refactor: remove BKE_idcode, in favour of BKE_idtype.
Mpving utils from idcode to idtype proved to be somewhat painful for
some reasons, but now all looks good.

Had to add a fake/empty shell for the special snowflake too,
`ID_LINK_PLACEHOLDER/INDEX_ID_NULL`...
2020-03-19 19:39:23 +01:00
0b7854323d Fix typos in names fo new mesh and texture IDTypeInfo. 2020-03-19 19:39:23 +01:00
e1b2ded7b2 Fix build WITH_CXX_GUARDEDALLOC 2020-03-19 14:42:04 -03:00
3be7d74cba Fix T70126: Can't snap between objects with Rigid Body
`DEG_FOREACH_COMPONENT_IGNORE_TRANSFORM_SOLVERS` was `0`
2020-03-19 13:19:15 -03:00
689606887f Cleanup: add extern C 2020-03-19 16:54:09 +01:00
89b0465136 Fix T74908: volume object step size can not be set back to zero 2020-03-19 16:00:40 +01:00
2be14e0ec4 Fix typo in make.bat help for build directory 2020-03-19 15:31:21 +01:00
2982c9ba0a ColorManagement: Incorrect Memory Read for RGB images
When RGB images or BW images are converted to a GPU texture and color
space conversion was needed the images were read incorrectly.

This patch checks the correct amount of channels in the image and uses
that as the correct pixel stride.
2020-03-19 15:26:53 +01:00
9ace7e2439 Fix T74925: Texture Paint Stencil Mask crash
Use first texture if we dont have an ImageUser.

Maniphest Tasks: T74925

Differential Revision: https://developer.blender.org/D7181
2020-03-19 15:18:09 +01:00
42012493a8 Fix T74916: Industry compat keymap: GP Tweak tool acts like the Cursor tool 2020-03-19 14:43:50 +01:00
91c1759956 Fluid: Cleaned up some parts of the fluid modifier UI
Especially when expanding the UI panel horizontally, there were some problems with empty space.
2020-03-19 13:15:39 +01:00
cc516b82ef Fix T74915: Gpencil Tweak tool does not add point to selection holding Shift 2020-03-19 12:11:48 +01:00
885caa4535 Multires: Support "Subdivide" for Simple subdivision type
Is done by considering all base edges infinitely sharp.

In the future can become a different operator option to allow to mix
Catmull-Clark and simple subdivisions. For now just sticking to what
old good Blender versions were doing.

Fixes T74869: Simple subdivision type is not working as it should
2020-03-19 11:59:45 +01:00
e793a47efb Multires: Optimize memory usage further
Avoid storing any loose edges for the propagation process.
Also avoid any edge which crease is zero.
2020-03-19 11:59:45 +01:00
ccb731f2dd Multires: Reduce memory footprint after previous fix
The idea is following: only store information about edges which are

1. Communicated to the OpenSubdiv topology.

   This rules out all loose edges, as they are not needed for the
   propagation process.

2. Correspond to edge from the base mesh.

   This avoids storing edges which are generated between inner face.
   Those are not to have any sharpness to allow smooth propagation.

There is still possible to have memory peak in some obscure case when
mesh contains a lot of loose edges. It can be optimized further by
utilizing knowledge of the non-loose tags.
2020-03-19 11:59:45 +01:00
317a9cf835 Multires: Subdiv, properly support base edge crease
The title says it all actually. The test case is to get default cube,
set some edges to non-zero crease, add multires modifier and hit the
"Subdivide" button few times.

The memory footprint might be optimized by not storing information
about inner generated edges.
2020-03-19 11:59:45 +01:00
6e39445f80 GPencil: Cleanup - Split BKE_gpencil.h geometry functions into BKE_gpencil_geom.h
This split prepare the code for future geometry functions.
2020-03-19 11:38:22 +01:00
e839a25651 RNA: add MetaElem.select & use_scale_stiffness 2020-03-19 21:16:57 +11:00
7e9575f7a1 Fix T74701: Text on Curve Scaling Issue
Both scaling the text itself, as well as scaling the curve wasnt
updating, now added relations for this.

Maniphest Tasks: T74701

Differential Revision: https://developer.blender.org/D7140
2020-03-19 10:43:10 +01:00
b49dbb635a Subdiv: Make Blender crease to OSD sharpness reusable
Makes it so conversion is centralized in a single place.

We might consider removing any conversion, passing value as-is which
will be easier for I/O scripts to match crease. The downside of that
would be loose of control range in certain qualities and values of
crease.

There shouldn't be any functional changes in this commit.
2020-03-19 10:33:51 +01:00
53674fb255 Multires: Add missing context initialization
Might have caused access to uninitialized memory when foreach()
would have failed for some reason.
2020-03-19 10:08:48 +01:00
9dfc480ad1 Multires: Cleanup, typo in type name 2020-03-19 10:01:56 +01:00
ffb95baebe Multires: Store modifier pointer for subdivide
Allows to access its settings during the subdivision process.
2020-03-19 10:01:56 +01:00
2d1cce8331 Cleanup: make format after SortedIncludes change 2020-03-19 09:33:58 +01:00
008aaaa378 Code quality: Enable SortedIncludes
Code quality: Enable SortedIncludes in .clang-format

This patch does not include a `make format`, which will follow suit.

Differential Revision: D6811
2020-03-19 09:33:43 +01:00
Dalai Felinto
473316e246 Cleanup: make format (and adding . to end of comment) 2020-03-19 09:29:47 +01:00
Jeroen Bakker
fd48ff1296 Fix T73931: Stereo Viewport Color Management
Stereoscopic viewport didn't support Color Manangement due recent
changes in the color management pipeline. In order to solve the issue we
will migrate the strereo rendering into the GPUViewport. This will share
some textures and reduce required GPU memory.

Reviewed By: fclem, dfelinto

Differential Revision: https://developer.blender.org/D6922
2020-03-19 08:26:48 +01:00
Jeroen Bakker
fe045b2b77 WindowManager: Remove Stereo Offscreen
Stereo offscreen rendering has been replaced with stereo viewport
rendering. When an offscreen buffer is used it is only used for mono
rendering.

This patch will remove the second offscreen buffer.

Reviewed By: fclem

Differential Revision: https://developer.blender.org/D7153
2020-03-19 08:03:40 +01:00
d68d1da1f3 UI: scale sequence handle by pixelsize 2020-03-19 12:28:59 +11:00
f4a60fd85c Cleanup: rename variables which aren't specific to macOS 2020-03-19 12:28:50 +11:00
326ce2d625 Cleanup: declare & assign variables on the same line
Use less vertical space.
2020-03-19 12:28:50 +11:00
07c4c86049 Theme: update blender light theme
Also correct gizmo_view_align color.
2020-03-19 12:18:41 +11:00
b62e1146e1 UI: add view aligned gizmo color
Was hard coded to white making white backgrounds impractical.

D7162 by @billreynish with edits.
2020-03-19 12:09:53 +11:00
014e569258 Cleanup: use '\' for doxygen commands 2020-03-19 12:09:07 +11:00
ed4c47632f Cleanup: spelling 2020-03-19 12:09:07 +11:00
5bf09bbcdf Cleanup: shadow warning 2020-03-19 12:09:02 +11:00
f3e7c1e8c8 Fix building on Linux as '__time64_t' isn't portable 2020-03-19 11:56:02 +11:00
Robert Guetzkow
f70241deba Fix (unreported): Crash on accessing active sequence in select groupped operator
This patch moves the NULL check of `actseq` to the correct position, which should happen
before the `channel` is assigned. Otherwise an attempt to call the `sequencer_select_grouped_exec`,
when there is no active sequence and `use_active_channel` set to true, results in a crash.

Reviewed By: ISS

Differential Revision: https://developer.blender.org/D7170
2020-03-19 00:49:46 +01:00
271231f58e VSE: Strip drawing improvements
This patch include changes:
- Thicker and clearer selection indication
- Slimmer handles
- More transparent muted strips
- Trim frame number is drawn inside the strip
- Strip text is drawn in upper part of strip
- Color strips now have specific color, with chosen color drawn under strip text
- Transition strip will use color of input strips showing direction of transition
- Selecting effect strip will highlight input strips
- Selecting multicam strips will highlight target channel
- Missing media state is now indicated by a red line drawn on the top part of the strip
- A checkerboard pattern is now drawn on the outsides of the meta range
- Hold still regions are now always drawn if existent, with a darker shade of the strip’s background color

Author: Alessio Monti di Sopra <a.monti>

Reviewed By: ISS

Differential Revision: https://developer.blender.org/D6883
2020-03-19 00:24:09 +01:00
348d2fa09e VSE: Disk cache
This patch implements dumping images from cache to HDD.
The main goal of this system is to provide a means to achieve consistent playback speed mainly for strips that are not possible to preview in real time.

How to use:
Disk cache has own settings in user preferences for path to storage, size limit and compression level.
To use disk cache, you need to check `Use Disk Cache` box, set `Disk Cache Directory`, `Disk Cache Limit` and save or open existing .blend file.
By default sequencer output will be cached only. Manual setting is possible in cache panel.

Uses:
 - Replacement or alternative for proxies. Disk cache will work with any strip type, supports float images as well.
 - Storage for strip thumbnails.
 - Less RAM needs to be allocated for preview cache

How it works:
Disk cache is extension of RAM cache. Every image, that is stored or deleted in RAM will be stored or deleted on HDD as well. Images can be compressed to save space and for use on slower drives. Compressed images are slower to write and read though.
Images are stored in bulk of 100 rendered frames per one file. This is to overcome slow file access time for large amount of files. Drawback is, that if one frame needs to be redrawn, all 100 frames are deleted.

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D5524
2020-03-19 00:07:30 +01:00
c8b4b4c0fa Fluid: Fixed issue with intial velocities in liquid domains
The fix for T74762 (bf9c4af9bb) introduced this issue. Initial velocities were not applied to liquids anymore.
2020-03-19 00:04:13 +01:00
99be00fdb1 Cleanup: Prepare XR code for sorted headers 2020-03-18 20:53:02 +01:00
1935cd4027 Fix T74837: GPencil: Mirror over first selected marker crashes
'mirror_gpf_marker()' needs a NULL bGPDframe for initialization [but
still requires a scene to get the marker].

Maniphest Tasks: T74837

Differential Revision: https://developer.blender.org/D7166
2020-03-18 20:46:22 +01:00
a12ae67cf7 UI: Update the Clay Thumb Sculpt icon
The previous icon was identical with the Thumb icon.

New icon designed by Damian Winnichenko
2020-03-18 20:38:28 +01:00
c102dfd43d Cleanup: Prepare for sorted headers on windows
To prepare for D6811 small changes were needed.
we can no longer undefine near/far since the windows
headers use those extensively.

some of the imbuf files need to include the windows
headers explicitly to make sure it builds.
2020-03-18 13:26:38 -06:00
6bfe7c7a02 Fix (harmless) use of uninitialized variables in Cycles 2020-03-18 19:51:54 +01:00
9a116c7c2d Cleanup: 64 bit file IO on windows.
Unlike Linux where fseek/tell will be either 32 or 64 bit
depending on the target platform, it will always be 32 bit
on windows.

We had some macro magic in BLI_winstuff.h that substituted
them for 64 bit versions, but that is upsetting the system
headers if they get included after BLI_winstuff.h which
is problematic for D6811.

This diff adds proper functions in blenlib and updates
all calls that were using the BLI_winstuff.h header to
gain 64 bit file IO.

note: Anything that was using the 32 bit versions (ie not
including BLI_winstuff.h) will still be using the 32 bit
versions, which is perhaps a good code quality Friday project.

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

Reviewers: brecht dfelinto
2020-03-18 12:13:03 -06:00
ac74a843d2 Fix NULL-pointer dereference after error during VR session start 2020-03-18 18:24:11 +01:00
1a502097c7 Cleanup: Fix build warnings on windows.
Two headers define the _USE_MATH_DEFINES symbol now, if both
are included warnings are generated.

Added some guards, all good again.
2020-03-18 11:23:56 -06:00
c9c08dc7c8 Fix compilation error after recent change 2020-03-18 18:16:18 +01:00
805c4ab6bc UI: Make sure theme UI names are correctly capitalized
Also removed redundant use of 'color' in some instances.
2020-03-18 18:02:35 +01:00
efb53f5181 Fix T74524: tooltip for smoke dissolve time is backwards 2020-03-18 17:54:17 +01:00
b88ca3e6d1 Cleanup: Resolve HKEY conflict
Both the MS headers and blender headers define the HKEY
which gives all kind of inclusion order issues.

This diff renames all *KEY constants to EVT_*KEY to resolve
this conflict.

Reviewed By: brecht , dfelinto

Differential Revision: http://developer.blender.org/D7164
2020-03-18 10:38:37 -06:00
9e382dd2a3 Fix T74542, T74386: schulpt changes not saving (dyntopo or mutires)
Caused by rB2d423479bdea.
Correct check for stroke being painted.

thx also to brecht checking.
2020-03-18 16:41:41 +01:00
237ef0dcc7 Fix T74842: Remove Vertex Paint hotkeys
There were some conflicts with these keys.
2020-03-18 15:49:58 +01:00
7bde3f63dd GPencil: Fix typo error 2020-03-18 15:33:03 +01:00
19df67cd75 Fix build errors with WITH_HEADLESS or WITH_GHOST_SDL
Disable WITH_XR_OPENXR entirely for these cases. For headless XR
features don't make much sense, for SDL support is not implemented.
2020-03-18 15:19:41 +01:00
82fc81816e Fix openXR building with install_deps in some compilers. 2020-03-18 15:11:03 +01:00
efdc93fcc6 Fix T74876: Crash when snapping to faces
The crash occurs after operators change the amount of editmesh looptris.
The looptris of the evaluated object's editmesh are not updated.
2020-03-18 09:58:24 -03:00
52c0742560 GPencil: Remove Panel Grease Pencil and move Use Lights to Visibility
It was too much to have a panel for that.
2020-03-18 13:48:30 +01:00
d8897bed99 Fix headless and Python module build after recent alert icon changes 2020-03-18 13:31:49 +01:00
0af739ae8a GPencil: Remove duplicated Mode parameter from Color Subpanel in Vertex Paint
This parameter is now at Brush level, so it was duplicated in the Color panel.
2020-03-18 13:16:40 +01:00
e843d4e438 Cleanup: Rename variables 2020-03-18 09:10:39 -03:00
b81b127928 GPencil: Remove background to Dopesheet buttons
This was missing in previous commit.
2020-03-18 13:06:09 +01:00
dd416681fb Fix BPY enum property definiton failing if items contain spaces
Mistake in 03a4d3c33f, turns out this actually is called from BPY
(which I didn't think it was). So only error out during makesrna, not at
runtime.
2020-03-18 12:53:36 +01:00
406026abba Cleanup: spelling 2020-03-18 22:28:54 +11:00
c3651adf89 Tests: add OpenVDB volume tests 2020-03-18 11:23:05 +01:00
7537cad576 Volumes: add render settings for volume datablock
* Space: volume density and step size in object or world space
* Step Size: override automatic step size
* Clipping: values below this are ignored for tighter volume bounds

The last two are Cycles only currently.

Ref T73201
2020-03-18 11:23:05 +01:00
Brecht Van Lommel
1162ba206d Cycles: change volume step size controls, auto adjust based on voxel size
By default it will now set the step size to the voxel size for smoke and
volume objects, and 1/10th the bounding box for procedural volume shaders.

New settings are:
* Scene render/preview step rate: to globally adjust detail and performance
* Material step rate: multiplied with auto detected per-object step size
* World step size: distance to steo for world shader

Differential Revision: https://developer.blender.org/D1777
2020-03-18 11:23:05 +01:00
9d20f170c7 Cycles: support for rendering of new Hair object prototype
Ref T68981
2020-03-18 11:23:05 +01:00
994eb1ec17 Cycles: support rendering new Volume object type
Voxels are loaded directly from the OpenVDB grid. Rendering still only supports
dense grid, so memory usage is not great for sparse volumes, this is to be
addressed in the future.

Ref T73201
2020-03-18 11:23:05 +01:00
006025ead0 Cycles: support for different 3D transform per volume grid
This is not yet fully supported by automatic volume bounds but works fine in
most cases that will have mostly matching bounds.

Ref T73201
2020-03-18 11:23:05 +01:00
fd53b72871 Objects: Eevee and workbench rendering of new Volume, Hair, PointCloud
Only the volume drawing part is really finished and exposed to the user. Hair
plugs into the existing hair rendering code and is fairly straightforward. The
pointcloud drawing is a hack using overlays rather than Eevee and workbench.

The most tricky part for volume rendering is the case where each volume grid
has a different transform, which requires an additional matrix in the shader
and non-trivial logic in Eevee volume drawing. In the common case were all the
transforms match we don't use the additional per-grid matrix in the shader.

Ref T73201, T68981

Differential Revision: https://developer.blender.org/D6955
2020-03-18 11:23:05 +01:00
b0a1cf2c9a Objects: add Volume object type, and prototypes for Hair and PointCloud
Only the volume object is exposed in the user interface. It is based on OpenVDB
internally. Drawing and rendering code will follow in another commit.
https://wiki.blender.org/wiki/Source/Objects/Volume
https://wiki.blender.org/wiki/Reference/Release_Notes/2.83/Volumes

Hair and PointCloud object types are hidden behind a WITH_NEW_OBJECT_TYPES
build option. These are unfinished, and included only to make it easier to
cooperate on development in the future and avoid tricky merges.
https://wiki.blender.org/wiki/Source/Objects/New_Object_Types

Ref T73201, T68981

Differential Revision: https://developer.blender.org/D6945
2020-03-18 11:23:05 +01:00
8dcfd392e4 UI: add new icons for Volume, Hair and PointCloud 2020-03-18 11:23:05 +01:00
12720d8b9b GPencil: Cleanup int comparisons 2020-03-18 11:12:11 +01:00
35019443c0 GPencil: Invert Dopesheet icons to same order than properties panel 2020-03-18 10:19:54 +01:00
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
82c51d0edb Modifier: skip calling MOD_deform_mesh_eval_get
This is only needed in certain cases.

When testing performance improvements to the modifier stack
it's useful to bypass this function.
2020-03-18 14:21:40 +11:00
7ba403dc94 Fix typo causing compile error with WITH_XR_OPENXR disabled 2020-03-17 22:23:02 +01:00
dc2df8307f VR: Initial Virtual Reality support - Milestone 1, Scene Inspection
NOTE: While most of the milestone 1 goals are there, a few smaller features and
improvements are still to be done.

Big picture of this milestone: Initial, OpenXR-based virtual reality support
for users and foundation for advanced use cases.
Maniphest Task: https://developer.blender.org/T71347
The tasks contains more information about this milestone.

To be clear: This is not a feature rich VR implementation, it's focused on the
initial scene inspection use case. We intentionally focused on that, further
features like controller support are part of the next milestone.

- How to use?
Instructions on how to use this are here:
https://wiki.blender.org/wiki/User:Severin/GSoC-2019/How_to_Test
These will be updated and moved to a more official place (likely the manual) soon.

Currently Windows Mixed Reality and Oculus devices are usable. Valve/HTC
headsets don't support the OpenXR standard yet and hence, do not work with this
implementation.

---------------

This is the C-side implementation of the features added for initial VR
support as per milestone 1. A "VR Scene Inspection" Add-on will be
committed separately, to expose the VR functionality in the UI. It also
adds some further features for milestone 1, namely a landmarking system
(stored view locations in the VR space)

Main additions/features:
* Support for rendering viewports to an HMD, with good performance.
* Option to sync the VR view perspective with a fully interactive,
  regular 3D View (VR-Mirror).
* Option to disable positional tracking. Keeps the current position (calculated
  based on the VR eye center pose) when enabled while a VR session is running.
* Some regular viewport settings for the VR view
* RNA/Python-API to query and set VR session state information.
* WM-XR: Layer tying Ghost-XR to the Blender specific APIs/data
* wmSurface API: drawable, non-window container (manages Ghost-OpenGL and GPU
  context)
* DNA/RNA for management of VR session settings
* `--debug-xr` and `--debug-xr-time` commandline options
* Utility batch & config file for using the Oculus runtime on Windows.
* Most VR data is runtime only. The exception is user settings which are saved
  to files (`XrSessionSettings`).
* VR support can be disabled through the `WITH_XR_OPENXR` compiler flag.

For architecture and code documentation, see
https://wiki.blender.org/wiki/Source/Interface/XR.

---------------

A few thank you's:
* A huge shoutout to Ray Molenkamp for his help during the project - it would
  have not been that successful without him!
* Sebastian Koenig and Simeon Conzendorf for testing and feedback!
* The reviewers, especially Brecht Van Lommel!
* Dalai Felinto for pushing and managing me to get this done ;)
* The OpenXR working group for providing an open standard. I think we're the
  first bigger application to adopt OpenXR. Congratulations to them and
  ourselves :)

This project started as a Google Summer of Code 2019 project - "Core Support of
Virtual Reality Headsets through OpenXR" (see
https://wiki.blender.org/wiki/User:Severin/GSoC-2019/).
Some further information, including ideas for further improvements can be found
in the final GSoC report:
https://wiki.blender.org/wiki/User:Severin/GSoC-2019/Final_Report

Differential Revisions: D6193, D7098

Reviewed by: Brecht Van Lommel, Jeroen Bakker
2020-03-17 21:42:44 +01:00
406bfd4304 Ghost: Ghost-XR API to abstract away and access OpenXR functionality
Extends Ghost to include an abstraction for OpenXR, which I refer to as
Ghost-XR. Such an API is the base for the following commit, which introduces VR
support to Blender.

Main features:
* Simple and high-level interface for Blender specific code to call.
* Extensible for muliple graphics backends, currently OpenGL and a DirectX
  compatibility layer are supported.
* Carefully designed error handling strategy allowing Blender to handle errors
  gracefully and with useful error messages.
* OpenXR extension and API-layer management.
* OpenXR session management.
* Basic OpenXR event management.
* Debug utilities for Ghost-XR and OpenXR

For more information on this API, check
https://wiki.blender.org/wiki/Source/Interface/XR.

Reviewed by: Brecht Van Lommel

Differential Revision: https://developer.blender.org/D6188
2020-03-17 21:39:59 +01:00
c9a8de1d70 Fluid: Correct Tooltip 2020-03-17 16:32:56 -04:00
3af51cacbf Online Manual Reference: Update 2020-03-17 16:28:58 -04:00
a7c660fe61 Cleanup: Fix warnings about function signature of register pass
RE_engine_register_pass is sometimes in the headers with type
as an integer parameter, sometimes as eNodeSocketDatatype.

This caused warnings, the root cause was makesrna was not able
to generate the proper type for enums and defaulted to int.

makesrna has been extended with the RNA_def_property_enum_native_type
that allows telling makesrna the native type of an enum, if set it
will be used otherwise it will still fall back to int.

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

Reviewed By: brecht
2020-03-17 13:45:35 -06:00
e09f0caff3 GPencil: Fix crash joining objects
The weights array can be NULL.
2020-03-17 19:02:10 +01:00
blender
ba3d49225c make deps: Fixes to make OpenXR to work on CentOS Linux
- Harvest to a proper location.
- Disable STD's filesystem which is experimental and caused
  linking errors when OpenXR is usedi n Blender.
2020-03-17 18:35:29 +01:00
f1eb86c458 GPencil: Rename old color operators to material
The color was used in old version when palettes were used, but now all are materials
2020-03-17 18:29:34 +01:00
bf9c4af9bb Fix T74762: Mantaflow: Non emmiting flow source affects simulation 2020-03-17 18:21:01 +01:00
07d5b8b023 Fix T74322: Wrong object bundles with scaled camera
Camera scale was not handled correctly when drawing 3d bundles for
reconstructed objects (caused by normalization of the matrix).
2020-03-17 17:48:55 +01:00
6a0ddb4bb1 Cleanup: Remove unused function
Was introduced earlier today and did not turn out to be very useful
and clear.
2020-03-17 17:40:54 +01:00
f958560a99 Multires: Properly support virtual modifiers for Apply Base
The initial code from earlier from today didn't really work reliable
since it is not possible to apply virtual modifiers but not the real
multires one (in a situation like mesh with shapekeys and multires).

New code uses less memory and has better performance for the case
when there are actual modifiers leading the multires. The case when
there is only multires will not be as performant as possible at this
moment.
2020-03-17 17:40:54 +01:00
1504cb26b0 Cleanup: process colorspace conversion with a 1D pixel array
No need to assume it's 2D or 3D.
2020-03-17 17:33:08 +01:00
2518f60109 GPencil: Fix Parent layer not working
The parenting was using the old logic, but with new engine the draw is done using eval data.

Fixed the depsgraph relationship missing with bones to get an update when the bone is transformed.

Also fixed Snap cursor to Selected
2020-03-17 17:28:49 +01:00
964375e36a Cleanup: blenkernel proper header inclusion for BKE_ocean.h
BKE_ocean.h uses the bool type without including stdbool.h
counting on someone else including that before it.

With D6811 enabling automatic sorting of the includes
this can no longer be counted on. This changes includes
stdbool.h in BKE_ocean.h so it can build without being
depended on others including the right headers before it.
2020-03-17 10:12:47 -06:00
Robert Guetzkow
d374237d43 Fix T74838: fix dereferencing of NULL in sculpt_no_multires_poll when no active object exists
Fix crash when the operator search is used while no active object exists. The cause of the issue is an attempt to dereference `ob` when it is `NULL`. Therefore this patch checks the return value of `SCULPT_mode_poll()` first, to ensure that `ob` isn't `NULL`.

Reviewed By: pablodp606

Maniphest Tasks: T74838

Differential Revision: https://developer.blender.org/D7156
2020-03-17 16:46:55 +01:00
24e44143a1 Multires: Fix Apply Base when there are deform modifiers
Their effect was applied twice after hitting Apply Base since the
operator was also applying deformation caused by those modifiers.
2020-03-17 16:41:43 +01:00
628d799c85 Multires: Add utility to create deformed base mesh
The new function will use original object as a starting point
and apply all enabled deformation modifiers prior to the multires.
2020-03-17 16:41:43 +01:00
c76d390c92 Mesh: Fix applying deform modifier up to index
The code would have break the first (deform only) modifiers
once the index is reached, but it will not prevent second
loop (over remaining modifiers) from run.

This was applying deform modifier twice in some conditions:
having single deform modifier and calculating deformed mesh
up to the first modifier (index=0).
2020-03-17 16:41:43 +01:00
bf5151b2d2 Mesh: Add utility to calculate deform modifier up to index
Intention is to be used to create mesh at the state which is an input
to the multires modifier.
2020-03-17 16:41:43 +01:00
a45c34ae8e Multires: Cleanup, argument naming and order
Use full argument name.

Also order arguments in the generosity order: from depsgraph
(which has everything) to object (which contains multires)
specific multires modifier.
2020-03-17 16:41:43 +01:00
17abae45f1 Multires: Cleanup, remove redundant argument
Scene can be queried from the dependency graph.
2020-03-17 16:41:43 +01:00
20456b52b4 Fluid: Fixes for new abort bake faster feature
In addition to previous commit that made it possible to abort bakes faster.
2020-03-17 16:12:46 +01:00
b852db57ba Add experimental global undo speedup.
The feature is hidden behind an experimental option, you'll have to
enable it in the preferences to try it.

This feature is not yet considered fully stable, crashes may happen, as
well as .blend file corruptions (very unlikely, but still possible).

In a nutshell, the ideas behind this code are to:
* Detect unchanged IDs across an undo step.
* Reuse as much as possible existing IDs memory, even when its content
  did change.
* Re-use existing depsgraphs instead of building new ones from scratch.
* Store accumulated recalc flags, to avoid needless re-compute of things
  that did not change, when the ID itself is detected as modified.

See T60695 and D6580 for more technical details.
2020-03-17 15:02:05 +01:00
Mateusz Grzeliński
9ce3890950 Cleanup: rename function
This function was missed in rBec471a9b1c1.

Differential Revision: https://developer.blender.org/D7155
2020-03-17 14:46:50 +01:00
8cb463f4ff OverlayEngine: crash when using hidden faces
Unreported Crash. When hidden faces are active (retopology) the depth
test could fail as the default framebuffers aren't set. This patch will
check if we are rendering a depth only and skip the clearing of the
buffer.
2020-03-17 13:56:25 +01:00
3c1433b6f3 Revert "Cleanup: use doxy sections"
This reverts commit 626b2bd071.

Sergey prefers not to use doxy sections for this code.

Revert pending a decision on T74845
2020-03-17 23:53:36 +11:00
b2851dbe78 Fluid: Abort baking jobs faster
With this change baking jobs will be aborted faster. The user will not have to wait for the current frame to finish baking. The bake job will exit early and discard the incomplete frame.
2020-03-17 13:49:57 +01:00
54c8770692 Fix error using CUDA in plug-ins on Linux/macOS, hide our CUDA symbols
Better solution will be to hide all symbols by default, but this works for now.
2020-03-17 12:23:36 +01:00
0b7841679e Multires: Cleanup, naming, make it more consistent
The coarse mesh is an input to generic Subdiv, and exact meaning is
ambiguous.

The input to Multires is a base mesh, which owns CD_MDISPS.
2020-03-17 12:23:02 +01:00
b02a25b7e1 Add accumulated recalc flags to IDs.
Those accumulated flags get cleared every time an undo step is written
to memfile.

Preliminary work for undo-speedup.

Part of T60695/D6580.
2020-03-17 12:10:52 +01:00
055863d9c1 Cleanup: minor changes. 2020-03-17 12:10:52 +01:00
20d7c04305 Fluid: Re-dded Empty Space option in the UI
This option existed already and was just hidden in the UI. With the new fluids system though, it will only be used for rendering - and not to optimize the cache.
2020-03-17 11:57:04 +01:00
7f3e84deb5 Fluid: Updated manta pp files
Includes only a rename. The name PyInit_Main was a bit confusing as it just belongs to Manta.
2020-03-17 11:57:04 +01:00
2ba3e6a02e Depsgraph: Adds helpers to extract/restore despgraphs in a given Main.
Extract will steal all depsgraphs currently stored in given bmain, and
restore will put them back in place, using scene and viewlayers as keys.

Preliminary work for undo-speedup.

Part of T60695/D6580.
2020-03-17 11:24:37 +01:00
90ce708ef0 BKE_lib_id: Add helper to swap full ID content and use proper naming.
Preliminary work for undo-speedup.

Part of T60695/D6580.
2020-03-17 11:13:14 +01:00
b87997f59b Cleanup: rename 'centre' to 'center' in View3D 2020-03-17 11:34:11 +11:00
ab430cfdfe Cleanup: sort DNA renaming 2020-03-17 11:29:54 +11:00
67307e72ea Cleanup: use more descriptive variable name for the data-mask
Make it explicit this data mask is added to the default mask.
2020-03-17 11:04:50 +11:00
47af235ba9 Revert "UI: Add 7 new community themes"
This reverts commit d89e5fcaef.

This was meant to be committed to the add-ons repo.
2020-03-17 10:41:40 +11:00
120a38ccbe Nodes: Display bl_icon of custom nodes in node header
This is D1578 by Philipp Oeser with small modifications.
2020-03-16 18:25:23 +01:00
e42f61dda8 Fix incorrect Face Sets when using mask extract
Mask extract modifies the topology when adding the boundary loop, so
previous face sets may not be correct in the new mesh. Remove the face
sets datalayer and let sculpt mode rebuild it when entering sculpt mode
in the new object.

Reviewed By: jbakker

Differential Revision: https://developer.blender.org/D7129
2020-03-16 17:53:03 +01:00
bab0fd1308 Fix visual artifacts with partially hidden meshes and mask extract
The previous behaivour didn't make sense as sculpt mode was still active
when switching to the new object, so it was rendering inconrrectly.

Reviewed By: jbakker

Differential Revision: https://developer.blender.org/D7130
2020-03-16 17:45:22 +01:00
e4077ea69d Fix T74626: Wrong Face Sets overlay rendering in smooth shading
The face set color variable needs to be declared inside of the loop in
order to reset it per iteration.

Reviewed By: jbakker

Maniphest Tasks: T74626

Differential Revision: https://developer.blender.org/D7096
2020-03-16 17:43:54 +01:00
7941ea02f8 Update viewport rotation origin when changing Face Set visibility
Small UX fix. When hidding everything but the active face set with H,
the last stroke lotation center can be in a part of the model that is
hidden, so viewport navigation becomes confusing until you start a new
stroke on the visible face set. Now the viewport navigation rotation
center is updated to the active vertex when using a visibility operation
that uses it, so it always rotates using the visible face set as the
origin.

Reviewed By: jbakker

Differential Revision: https://developer.blender.org/D7137
2020-03-16 17:42:52 +01:00
ba26adee0c Fix T61234 Mirroring Grease Pencil keyframes in the Dopesheet fails
`ANIM_animdata_update()` did not sort grease pencil frames. A
pre-existing comment stated this wouldn't be necessary as
`posttrans_gpd_clean()` already does this. However, this is only
applicable when the change is performed via the transform system. The
mirror operator doesn't call `posttrans_gpd_clean()`, invalidating the
assumption in the comment.

I moved the sorting code into `BKE_gpencil_layer_frames_sort()`, which
is now called from both `ANIM_animdata_update()` and
`posttrans_gpd_clean()`.
2020-03-16 16:23:12 +01:00
f0856b1fda Cycles: Fix bad escape character used for dot 2020-03-16 16:17:13 +01:00
215e474a99 Fix T74776: Cycles crash with missing image texture after recent changes 2020-03-16 16:02:06 +01:00
20f6700c88 UI: Show decorators for lights when using Cycles
This matches Eevee, and also the rest of Blender.
2020-03-16 14:32:09 +01:00
d89e5fcaef UI: Add 7 new community themes
This commit adds 7 themes submitted by the community on Devtalk. These themes both serve specific purposes, provide a greater variety in look & feel, and serve as welcoming homes for users coming on board from other packages. This is the initial commit, but these themes can be continuously updated over time to fix issues and keep them up to date with changes.

Thanks to all contributors, and in particular the makes of the picked themes: Pierre Schiller, Edward Agwi, Vojtěch Lacina, Michail Soluyanov, Jason van Gumster, Mr Wax Police & Jonathan Lampel.

An overview is here: https://developer.blender.org/T74360
2020-03-16 14:25:47 +01:00
37e7e1e77c Cleanup: Typo in comment 2020-03-16 12:43:05 +01:00
a69c364746 UI: fix backdrop and alignment in anim channels
This patch fixes various problems of alignment and element backdrops for
the animation channels drawing, mainly in the Graph editor but also for
grease pencil and mask layers in the Dope Sheet.

Reviewed By: billreynish, sybren

Differential Revision: https://developer.blender.org/D5204
2020-03-16 12:18:33 +01:00
5a664c6e98 Fix another implicit cast of boot to int
Use proper comparison to nullptr.

It is important to use nullptr since NULL is actually an integer,
which leads to another type of warnings.
2020-03-16 12:15:16 +01:00
35a29befb3 Fluid: Updated Manta pp files
Includes additional minmax check for Windows
2020-03-16 11:52:18 +01:00
7df435325b Fix implicit cast from bool to int in path tests 2020-03-16 10:53:46 +01:00
01377fd229 Workbench: Crash When Rendering With Stereo 2020-03-16 10:42:03 +01:00
868573451f Cleanup: use unsigned char for UI_view2d_text_cache_add
Avoids casts when used with other UI code
where the color is often unsigned.
2020-03-16 11:53:08 +11:00
f06a6e92bc Cleanup: misleading memset use
This call to memset relied on PassList having a single,
zero sized struct member.

Pass the passes array instead for readability.
2020-03-16 09:43:07 +11:00
Yevgeny Makarov
ac1dcdbf06 UI: Add an Outline to the Popover Arrows
Reviewed By: billreynish, fclem

Differential Revision: https://developer.blender.org/D5873
2020-03-15 23:19:01 +01:00
7a19a99675 Workbench: Fix default view not reset after drawing
This fix jitter of overlay and GPencil. But I'm not sure this should
be the responsibility of the subsequent draw engines or the responsibility
of the current engine to reset the view.
2020-03-15 22:50:07 +01:00
cebff2ff30 Fix a syntax error in test spec for BLI_delaunay_2d_test.
Test specs are read from strings, and there was a comma instead
of a decimal point, and then an extra decimal point in the Quad0 test.
This test has been flaky on Windows buildbot. Perhaps this is why.
2020-03-15 17:14:04 -04:00
7a7b392b54 GPencil: Reduce factor to 5 in previous commit
10 decimals is too high
2020-03-15 19:40:21 +01:00
22925d0dd3 GPencil: Remove Keep parameter from Select Vertex Color
Also changed range of threshold from 0 to 10
2020-03-15 19:22:33 +01:00
8022fc3220 Fix Blender building after recent 'cleanup'.
Caused by rB4be4c0667155. Please ensure at least affected code does
still build...
2020-03-15 16:11:35 +01:00
e53e17b8d6 Fix outliner edit-mode check 2020-03-15 22:04:08 +11:00
b435bd2f31 Fix potential draw manager assignment to negative index
While there is an assert here, the run-time code would perform the assignment.
2020-03-15 22:03:59 +11:00
59f5194265 Fix potential NULL pointer de-reference creating liquid geometry 2020-03-15 22:03:49 +11:00
b8feef59c8 Cleanup: add parens for clarity 2020-03-15 21:53:57 +11:00
5029b97d02 Cleanup: add NULL check for RNA filename argument
Currently some of the code supports a NULL filename,
add the NULL check so RNAProcessItem's with a NULL filename
don't crash in the future.
2020-03-15 21:53:20 +11:00
ecfb89280e Cleanup: use 'r_' prefix for return args 2020-03-15 21:51:22 +11:00
37419bb3f6 Cleanup: avoid setting float values by bit-pattern
Replace memset with copy_vn_fl, note that the exact values are slightly
different in this case. The value being set was close to FLT_MAX.
2020-03-15 21:51:02 +11:00
4be4c06671 Cleanup: redundant checks
In some cases moved the checks into asserts,
to ensure changes in the future don't cause
the checks to become necessary again.
2020-03-15 21:48:35 +11:00
80edc0e972 Cleanup: redundant assignments 2020-03-15 21:46:18 +11:00
aa60b9338a Cleanup: use 'const' style argument 2020-03-15 21:42:06 +11:00
b037816980 Cleanup: shadow warning, clang-format 2020-03-15 21:42:06 +11:00
4031d8bcb7 UI: Fix capitalization in the macOS app menu 2020-03-15 11:16:08 +01:00
a210b8297f UI: Larger Alert Icons
Adding a set of larger icons for use in informational dialogs.

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

Reviewed by Campbell Barton
2020-03-14 11:05:09 -07:00
a816a067ed GPencil: Change Select Vertex Color to similar selection
Now, instead to use the Brush color as selection patron, now it uses any previous selected color.
2020-03-14 16:26:56 +01:00
b7160f2f0a IC keymap: Fixes for GP
- Remove Shift for drawing poly-lines, just as in the default keymap
  - Use consistent hotkeys for size and strength radial controls
  - Fix some bugs/missing items from the GP merge
2020-03-14 14:00:28 +01:00
94bad2f30d GPencil: Fix missing context wheel color in Tint tool 2020-03-14 11:58:22 +01:00
cc53900baf GPencil: Add option to keep selected in Select Vertex Color 2020-03-14 11:07:35 +01:00
428e65256e GPencil: Use Linear color instead of sRGB for Select Vertex Color
The brush color is sRGB but the Vertex Color is linear.
2020-03-14 10:46:28 +01:00
b8211a4d7c GPencil: Add Select Vertex Color to menu
This option was missing
2020-03-14 10:45:23 +01:00
466171d0ef GPencil: Rename operator select_color to select_vertex_color 2020-03-14 10:33:33 +01:00
d50d410a70 GPencil: Rename operator color_select to select_material
The old name was related to the old palettes.
2020-03-14 10:30:59 +01:00
bb89cc51ec Fix T67446: UV Editor: support island select mode for box/circle/lasso
selections

Previously this was only supported in single click selections, doing an
island selection with box/circle/lasso would just select individual
vertices instead. Now selects islands properly.

This also unifys some logic between box/circle/lasso:
- use early selection test from lasso [makes things faster] in box/
circle
- circle wasnt checking visible face
2020-03-14 08:16:08 +01:00
f0b0524c5f Cleanup: spelling 2020-03-14 15:43:21 +11:00
117ccb56ad Cleanup: remove unused ARegion from bGPdata_Runtime 2020-03-14 15:39:59 +11:00
4b38eac4da CMake: use spaces instead of tabs for icon updating script 2020-03-14 15:39:59 +11:00
60e3f690cb Cleanup: sort file lists & struct declatations 2020-03-14 15:39:59 +11:00
626b2bd071 Cleanup: use doxy sections 2020-03-14 15:39:53 +11:00
acab745078 UI: Toolbar icons
- Add icons for Sculpt Cloth, Clay Thumb and Draw Face Sets, as well as GP Tint, Replace and Transform Fill tools
  - Tweak icons for Sculpt Rotate, Pinch, Multiplane Scrape, Inflate, Blob, Draw Sharp, based on feedback on Devtalk
2020-03-14 01:31:28 +01:00
5260aaf3b1 Fix T73921: Eevee volume render test memory leak in Mantaflow
Fixed memory leak that showed up after the original issue (crash) had been fixed in 93ac4709eb. The fix ensures that light cache bakes free up GPU smoke textures and the smoke domain list correctly.

This commit also removes the workaround (f3a33a9298) that disabled light cache bakes for fluid objects.
2020-03-14 00:30:55 +01:00
7d56c425f8 GPencil: Don'r Replace color if vertex color is empty
The replace tools only must work over previously vertex painted.
2020-03-13 21:54:54 +01:00
dc99c3532a Cleanup: USD, move some common code to an abstract superclass
The `check_is_animated()` function will be used by the upcoming Alembic
exporter as well. There is nothing USD-specific in the function.

No functional changes.
2020-03-13 18:17:51 +01:00
ebf3c87912 Fix T74699: File browser closing while loading crash.
Owner of filelisting job was changed, without proper update of all
access/usages of that owner to reach the job, leading to failure of
timer removal from the WM, and attempt to double-free the job...

Caused by rB2c4dfbb00246ff.
2020-03-13 17:34:21 +01:00
5ad16e6a11 Cleanup: BKE_mesh_nomain_to_mesh: Add assert that source mesh is indeed not in Main. 2020-03-13 17:17:26 +01:00
4e26afe0ae Cleanup: Comments of wmJobs callbacks. 2020-03-13 17:17:26 +01:00
110a35ef5a Fix T74397: Crash after undoing quadriflow remesh on duplicate with armature deform
The issue was that we were creating temporary mesh copies and storing
them in bmain and then later using BKE_mesh_nomain_to_mesh which would
add them to bmain once more (duplicates).

This would lead to crashes later as the custom data of the mesh could be
trashed quite easily.
2020-03-13 16:29:30 +01:00
de30fda04e Fix T74686: Loading btx file in multires modifier is not working
Was happening when object does not have CD_MDISPS allocated yet.
Need to make sure totdisp and level is specified on CD_MDISPS data
prior to loading (as the load expects them to be properly set).
2020-03-13 16:15:31 +01:00
67704cb8aa Multires: Fix loosing sculpt data when using external BTX file 2020-03-13 16:15:31 +01:00
6bcb6a0ea6 Fix stereoscopy reference image drawing in the viewport
Note: Without D6922 stereo is too broken to even test this patch.
With D6922 + this patch the fullscreen modes work (anaglyph/interlace not yet).
2020-03-13 16:07:19 +01:00
be76a37c91 GPencil: Fix UI typo 2020-03-13 15:50:26 +01:00
5593efec01 Fix stereoscopy drawing for camera background
Part of the fix was to get gputexture to use an array to accomodate each
eye. This takes care of viewports showing individual Left or Right
views.

For the combined view the fix was in overlay_image.c:camera_background_images_stereo_setup.

Note 1: Referece images are still not supporting stereo.

Note 2: For painting, and getting image bindcode I'm hardcording a
single-view experience.

Note 3: Without D6922 stereo is too broken to even test this patch.
With D6922 + this patch the fullscreen modes work (anaglyph/interlace
not yet).

Differential Revision: D7143
2020-03-13 15:40:20 +01:00
93ac4709eb Fluid: Potential fix for Eevee tests crashing with Mantaflow
Belongs to T73921. This commit fixes the crashes with light baking (disabled in f3a33a9298). There is still a memory leak to be fixed though.
2020-03-13 15:34:07 +01:00
525bd62557 Potential fix for T74609: File Selector Crashes Showing Thumbnails.
Existing code was definitively giving possibility to access freed
memory, although probably not on a super-common basis...
2020-03-13 14:37:28 +01:00
bc0a0cdf17 Multires: Fix Subdivide, Reshape and Apply Base
This change fixes artifacts produced by these operations.

On a technical aspect this is done by porting all of the operations
to the new subdivision surface implementation which ensures that
tangent space used to evaluate modifier and those operations is
exactly the same (before modifier will use new code and the operations
will still use an old one).

The next step is to get sculpting on a non-top level to work, and
that actually requires fixes in the undo system.
2020-03-13 14:14:56 +01:00
b0a1af4eb1 Multires: Increase default quality to 4
Makes it work better "out of the box" for irregular topology like
Suzanne mesh.

There might be some performance impact on non-regular meshes, but
those are not very common usecase for multires and for those its
always possible to lower the quality if needed.
2020-03-13 14:13:37 +01:00
f36d98bb1d Subdiv: Fix loose geometry callbacks in certain conditions
Loose vertices and vertices of loose edges callback was not working
correct if some of other callbacks were set to NULL.

Was caused by missing bitmask set in the callbacks which were set
to NULL.
2020-03-13 14:07:44 +01:00
8622372256 OpenSubdiv: Make non-full geometry less strict for sharpness
Allow to mark individual vertices as infinitely sharp even if there is
no full topology and no access to edges: infinite sharp vertices do not
need connectivity information.
2020-03-13 14:07:44 +01:00
48e0af52e6 GPencil: Fix typo error 2020-03-13 13:08:45 +01:00
4326d162ba GPencil: Enable Lights ON to default object in 2D template 2020-03-13 13:06:02 +01:00
Bogdan Nagirniak
9075ec8269 Python: add foreach_get and foreach_set methods to pyrna_prop_array
This allows fast access to various arrays in the Python API.
Most notably, `image.pixels` can be accessed much more efficiently now.

**Benchmark**

Below are the results of a benchmark that compares different ways to
set/get all pixel values. I do the tests on 2048x2048 rgba images.
The benchmark tests the following dimensions:
- Byte vs. float per color channel
- Python list vs. numpy array containing floats
- `foreach_set` (new) vs. `image.pixels = ...` (old)

```
Pixel amount: 2048 * 2048 = 4.194.304
Byte buffer size:  16.8 mb
Float buffer size: 67.1 mb

Set pixel colors:
    byte  - new - list:    271 ms
    byte  - new - buffer:   29 ms
    byte  - old - list:    350 ms
    byte  - old - buffer: 2900 ms

    float - new - list:    249 ms
    float - new - buffer:    8 ms
    float - old - list:    330 ms
    float - old - buffer: 2880 ms

Get pixel colors:
    byte - list:   128 ms
    byte - buffer:   9 ms
    float - list:  125 ms
    float - buffer:  8 ms
```

**Observations**

The best set and get speed can be achieved with buffers and a float image,
at the cost of higher memory consumption. Furthermore, using buffers when
using `pixels = ...` is incredibly slow, because it is not optimized.
Optimizing this is possible, but might not be trivial (there were multiple
attempts afaik).

Float images are faster due to overhead introduced by the api for byte images.
If I profiled it correctly, a lot of time is spend in the `[0, 1] -> {0, ..., 255}`
conversion. The functions doing that conversion is `unit_float_to_uchar_clamp`.
While I have an idea on how it can be optimized, I do not know if it can be done
without changing its functionality slightly. Performance wise the best solution
would be to not do this conversion at all and accept byte input from the api
user directly, but that seems to be a more involved task as well.

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

Reviewers: JacquesLucke, mont29
2020-03-13 12:59:36 +01:00
db4298c6be GPencil: Avoid segment fault when use Simplify modifier
The number of points of the evaluated stroke can be less than original or the original can use less points that evaluated.
2020-03-13 12:57:59 +01:00
cb19bb7f57 Cleanup: USD, removed unused export job data
The code was copied from the Alembic exporter, and some of the options are
no longer used.

Not updating the Alembic exporter itself, as this will be done in a much
larger rewrite.
2020-03-13 12:34:03 +01:00
cf9b3310c0 GPencil: Fix Noise modifier versioning
The versioning was setting the factor for all modes without checking flags.

Also cleanup some unused code.
2020-03-13 12:24:49 +01:00
91ca3c3c0b Fix T74696: Segment fault in Noise modifier using Vertex Groups 2020-03-13 12:07:36 +01:00
1ca582c651 Fix IDTypeInfo not having enough bits for ID filter flag 2020-03-13 12:06:29 +01:00
3652870483 GPencil: Cleanup unneeded check 2020-03-13 11:16:02 +01:00
de9c7bae7b GPencil: Join Tint and Vertex Color modifier
Both are doing almost the same and can be merged. This reduce complexity for user and less code to maintain.

Reviewed By: mendio, pepeland, fclem

Differential Revision: https://developer.blender.org/D7134
2020-03-13 10:28:59 +01:00
df032580c1 Fix info showing multi-line reports reversed (upside-down)
Also, only show the icon once per report.
2020-03-13 20:14:33 +11:00
Jeroen Bakker
54743dbf09 DeformMod: Performance by reusing buffers
The Deform modifiers was reallocating buffers that only fit the vertices
of the inner loop. This patch first counts the maximum needed buffer and
allocates one.

When using the daily dweebs animation file the playback performance went
from 0.66 fps to 0.93 fps.

Reviewed By: sybren

Differential Revision: https://developer.blender.org/D7132
2020-03-13 09:28:58 +01:00
1f0b21e713 Cleanup: pass const args (mostly Scene & RenderData) 2020-03-13 17:27:11 +11:00
fa823f0af8 Fix boundary edges detection ignoring Face Set visibility
If one of the faces connected to a vertex is hidden in the face sets, we
can assume that the vertex is part of a boundary edge, so it should be
cosidered like that in all automasking and edge detection functions.

Reviewed By: jbakker

Differential Revision: https://developer.blender.org/D7126
2020-03-12 20:47:31 +01:00
69eaa19340 Fix flood fill operation not taking into account hidden vertices
The idea of the visibility system is that tools should behave like
hidden vertices do not exist, so the flood fill operation should ignore
hidden vertices for all operators.

Reviewed By: jbakker

Differential Revision: https://developer.blender.org/D7125
2020-03-12 20:45:06 +01:00
b0271c6e40 Use golden ratio conjugate for Face Sets hue generation
The face set ID is sequential, so implementing this was straightforward.
Suggested by Jeroen Bakker

Reviewed By: jbakker

Differential Revision: https://developer.blender.org/D7123
2020-03-12 20:43:38 +01:00
53c03d4679 Fix Face Set operators not modifying sigle poly Face Sets
The face_set_set function which sets a face sets given a vertex index
can ignore all modifications to hidden face sets, so we can skip all
vertex visibility checks outside that function. This makes the code
faster, simpler and fixes multiple bugs.

Reviewed By: jbakker

Differential Revision: https://developer.blender.org/D7122
2020-03-12 20:38:57 +01:00
9dcd6ba3eb Fix T74646: Pick a random face set to be rendered white when randomizing the colors
The previous solution was also working fine as the white face set has no
meaning, but now it is a little bit more random. Also, bigger face sets
have more chance of getting the white color.

Reviewed By: jbakker

Maniphest Tasks: T74646

Differential Revision: https://developer.blender.org/D7111
2020-03-12 20:37:49 +01:00
88fd2b1dd5 Fix T74648: Do not relax with 0 neighbors or no vertex normal
The mesh provided in the report has 0 area faces and overlapping
vertices, causing the relax code to fail when calculating the plane to
constraint the vertex movement. Now it works fine both in the brush and
in the mesh filter.

Reviewed By: jbakker

Maniphest Tasks: T74648

Differential Revision: https://developer.blender.org/D7109
2020-03-12 20:36:49 +01:00
088b92b92c Fix mesh shrinking when using the relax mesh filter.
If the relax mesh filter was used on a non manifold mesh with open
boundaries, all the vertices were relaxed and the mesh was shrinking.
This was an unintended behavior that was making the filter unusable with
these meshes.

The mesh filter is now initializing an automasking buffer using the same
boundary automasking function from the brush code. Now edges are
preserved and the relax filter works as it should.

Reviewed By: jbakker

Differential Revision: https://developer.blender.org/D7097
2020-03-12 20:35:52 +01:00
472534d16e Fix memory leak in recent Cycles image texture refactor 2020-03-12 20:30:49 +01:00
2050baa139 GPencil: Move Vertex Paint mode to topbar
It's more easy to find in the topbar
2020-03-12 20:29:04 +01:00
c1290a1d1f GPencil: Fix color management in Vertex Paint tools
The brush is using sRGB and need to be Linear
2020-03-12 19:39:10 +01:00
649fdc7938 Fix T73049: Drag & drop on overlapping panels behaves incorrectly
Reviewers: brecht, Severin

Differential Revision: https://developer.blender.org/D7024
2020-03-12 19:36:13 +01:00
11e4827738 Fix T74670: crash during copy paste of objects.
Embedded data should always be considered as outside of Main database
here.

Note that it's a bit of an edge case to decide whether those should
always have their `LIB_TAG_NOMAIN` set too, or not? For now, let's keep
things as they are here.
2020-03-12 18:08:11 +01:00
4669dfe2cc Expose 'is embedded data' ID flag to RNA.
Relevant currently for root node trees and master collections.
2020-03-12 18:08:11 +01:00
38ba022858 Fix T66505: Dope Sheet shows empty Grease Pencil/Annotation layers
The behaviour of GP layers is the same as annotation layers: they show
in the dope sheet regardless of whether they have frames or not. This is
easily resolved by adding some extra filtering.
2020-03-12 17:33:48 +01:00
741888ce08 Cleanup: simplified Grease Pencil animdata filter
Part of the function was following an "if-ok: do-this" pattern, and then
mid-function switched to a "if-bad: skip" pattern. The function now just
uses the latter.

No functional changes.
2020-03-12 17:33:48 +01:00
26bea849cf Cleanup: add device_texture for images, distinct from other global memory
There was too much image texture specific stuff in device_memory, and too
much code duplication between devices.
2020-03-12 17:28:55 +01:00
75be60a667 Fix build error with recent OpenImageIO versions 2020-03-12 17:19:57 +01:00
f130c5ddb6 EEVEE: Update Preview file with new lightcache 2020-03-12 17:03:58 +01:00
5c427f4b17 GPencil: Fix unreliable comparison 2020-03-12 16:34:05 +01:00
63ee3db961 Fix T73228: UI shows settings of wrong marker when movie clip is offset 2020-03-12 15:53:52 +01:00
5929dd7129 Fix T73212: Gizmo's are still interactive when behind nodes 2020-03-13 01:29:06 +11:00
85ea7dfc54 Cleanup: move gizmo handling into a function 2020-03-13 01:29:06 +11:00
fe5933a972 Fix T71961: Soft body behavior is incorrect when CTRL + F12 animation is rendered.
The softbody modifier was missing the transform depsgraph relation and
thus the object matrix would not get updated during animation render.
2020-03-12 15:29:50 +01:00
37a07f812b Cleanup: remove unused node tree user counting functions 2020-03-12 13:23:02 +01:00
16ed7aebf2 Bug report preset update (last worked version)
I updated the "Worked" field in the online form but forgot to do it for
the oeprator from within Blender.
2020-03-12 11:14:53 +01:00
6c707aad6a Fix T74605 Key Indicator for motion paths not updating for objects
This fixes a functional change in 4db2a08281,
which was marked as 'should have non-functional changes only'.
2020-03-12 11:08:45 +01:00
4ba6a00afc GPencil: Change Build modifier UI layout for Influence Filters
The layer filter was not following the standard layout
2020-03-12 10:39:41 +01:00
8363e10ccc Fix T74659: Seaching for operator crashes Blender
The poll function was not checking the paint pointer.
2020-03-12 10:17:48 +01:00
21f016f010 DrawManager: Pack Draw State Bits
Some draw state bits are mutual exclusive. This patch will free some
draw state bits by packing the mutual exclusive bits in a mask.

Reviewed By: fclem

Differential Revision: https://developer.blender.org/D7088
2020-03-12 09:35:27 +01:00
456595fd39 Fix T74392: HDRI preview spheres appear in render passes and reflections
Do not render HDRI Previews when a renderpass is active

Reviewed By: fclem

Differential Revision: https://developer.blender.org/D7005
2020-03-12 09:27:28 +01:00
0c0895e3e6 Fix move-3D gizmo in use 2D spaces
This fixes node corner-pin and sun-beam gizmo's cursor offsets.
2020-03-12 19:17:39 +11:00
d4d9ded09b Cleanup: text view API
- Use typed enum for line_data callback.
- Pass in 'const' arguments where possible.
- Use 'r_' prefix for return arguments.
- Remove unused return value from line_get callback.
- Remove redundant casts.
2020-03-12 16:18:38 +11:00
Phil Stopford
6ce709dceb Ocean: add new spectra modes to the ocean modifier
This extends the ocean modifier to add new spectra
(Pierson-Moskowitz, Jonswap, TMA).

These models are very different to the Phillips spectrum.
They are intended for more established,
large area, oceans and/or shallow water situations.
2020-03-12 15:48:20 +11:00
1aebcdbb3a Cleanup: spelling, clang-format 2020-03-12 12:34:54 +11:00
74855969e7 Cleanup: use term suppress instead of repress
Also check MSVC instead of WIN32, for setting MSVC flags.
2020-03-12 12:13:41 +11:00
8751af6d19 EEVEE: Bump minimum probe level to make rough reflection more precise 2020-03-12 01:33:56 +01:00
27e0998a8a EEVEE: Hair: Fix wrong color when using color attribute without actual data 2020-03-12 00:43:09 +01:00
72461c09b4 Windows: Clean-up warnings originating from bullet
Bullet currently generates the majority of the warnings
on windows all of them are silly. This patch disables
all warns from bullet for now.

We should revisit this if/when we update bullet
to a newer version.

Reviewed By: sergey brecht

Differential Revision: https://developer.blender.org/D7118
2020-03-11 14:11:19 -06:00
372dcacbe4 Windows: Cleanup warning about non returning dtor
`google::LogMessageFatal::~LogMessageFatal` calls `abort`
which MSVC correctly identifies as 'not returning'
and warns about a potential memory leak.

Given this is intended behaviour and glog is not overly
concerned with shutting down the process nicely, we
can safely ignore this warning.
2020-03-11 14:07:47 -06:00
e6d0a438ab Fix T73626: crash scrubbing timeline with Cycles viewport and smoke/fire 2020-03-11 20:45:39 +01:00
6cf4861c3a Cleanup: refactor image loading to use abstract ImageLoader base class
Rather than passing around void pointers, various Blender image sources now
subclass this. OIIO is also just another type of image loader.

Also fixes T67718: Cycles viewport render crash editing point density settings
2020-03-11 20:45:39 +01:00
d8aa613d94 Cleanup: add ImageHandle to centralize image ownership logic 2020-03-11 20:35:38 +01:00
ec3eeee46b Cycles: add internal default volume shader, to be used for new volume object
This is mostly straightforward, but required some refactoring to ensure that
the default volume material does not always turn on the volume feature for GPU
rendering.
2020-03-11 20:35:38 +01:00
5a169ae2f3 Cleanup: remove foreach include from header, conflicts with OpenVDB 2020-03-11 20:35:38 +01:00
21821601f2 Fix Optix build error on Linux with some compilers 2020-03-11 20:35:38 +01:00
cbb854a98f Cleanup: Fix build warning on windows.
printf is called for a size_t (64 bit on x64) type
but the formatter is `%lu` (32 bit) leading to a
warning with MSVC.

`%zu` is the appropriate formatter.
2020-03-11 13:26:09 -06:00
33c6b269d1 EEVEE: Fix test crashing
Probe counting now needs to have proper gl capabilities initialised to run
correctly.
2020-03-11 18:52:16 +01:00
12e64e5ec1 Cleanup: Fix unused debug var warning. 2020-03-11 18:50:48 +01:00
366d951b0c GPencil: Change default hardeness for Airbrush 2020-03-11 18:02:05 +01:00
e9220d5cd0 Depsgraph: Fix crash deleting Viewer image from Outliner
Was happening when having compositor open with Viewer node attached
directly to Render Layers output.

There were two things involved here:

1. The code which was storing CoW-ed versions of IDs was checking all
   IDs for whether they are expanded or not. This was causing access
   of freed memory for deleted IDs which do not need CoW (such as IM).

   Simple fix: store ID type as a scalar and use early check before
   doing more elaborate check based on accessing fields of id_cow.

2. The code which was ensuring view layer pointer is doing CoW for
   scene. This isn't an issue on its own, but scene might have an
   embedded ID such as compositor which was actually traversed by the
   ID remap routines. This was causing remapping procedure to go into
   non-updated copy of compositor, accessing freed Viewer image ID.

   Solved by not recursing into embedded IDs for datablocks as those
   are supposed to have own copy-on-write operations which takes care
   of re-mapping.

Reported my Bastien, and also pair-coded with him.
2020-03-11 17:38:42 +01:00
Giovanni Remigi
19b46b2fca Fix Cycles crash in BVH8 build due to out of bounds memory access
Differential Revision: https://developer.blender.org/D7114
2020-03-11 17:35:11 +01:00
200695dd89 Windows: Clean-up linker warnings regarding MSVCRT.lib
For debug builds we link the against the release mode libs
for C based libraries, which are technically linked against
a different CRT, which the linker will implicitly try to link.

Which results in a linker warning about mixing the debug/release CRT.

This patch prevents the implicit linking of the release
CRT in debug configurations for sub projects that had issues
with it.
2020-03-11 10:33:12 -06:00
a9c0ad53e2 Cleanup: Typo in comments. 2020-03-11 17:29:20 +01:00
a54e17e52d LibQuery: Add option to NOT process embedded IDs.
Request from depsgraph department, which does basically consider those
embedded IDs as any other data-block (unlike any BKE ID management code).
2020-03-11 17:26:58 +01:00
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
c476c36e40 Workbench Simplification Refactor
This patch is (almost) a complete rewrite of workbench engine.
The features remain unchanged but the code quality is greatly improved.
Hair shading is brighter but also more correct.

This also introduce the concept of `DRWShaderLibrary` to make a simple
include system inside the GLSL files.

Differential Revision: https://developer.blender.org/D7060
2020-03-11 17:12:16 +01:00
f01bc597a8 Cleanup: stop encoding image data type in slot index
This is legacy code from when we had a fixed number of textures.
2020-03-11 17:07:17 +01:00
9910803574 Fix Cycles link error with debug + asan after RTTI changes 2020-03-11 17:05:15 +01:00
9ef7759bf0 Fix (unreported) bad user refcounting of viewer image ID.
This is typical case where you do not want to use actual ID refcounting,
but only the shallow 'user real' (aka 'user one') system...
2020-03-11 16:51:53 +01:00
e1698e3750 Windows: Clean-up warning while building blendthumb
Casting a 64 bit pointer to a 32 bit DWORD gave 2 warnings.
Solved by storing the actual DWORD in the registry table.

Would have preferred to use a union, but C++ doesn't let you
initialize anything other than the first field, and C99 style
initializers are not supported until C++20, so this solution
will have to do until then.
2020-03-11 09:27:35 -06:00
6a632f11c8 GPencil: Add missing Layer buttons in Dopesheet header and remove unneeded options
Update Dopesheet header to include missing buttons, remove Scene Active only buttton and also removed duplicated search box.

The removed options come from old 2.7x version and they are not required now.

Reviewed By: mendio, pepeland

Differential Revision: https://developer.blender.org/D7107
2020-03-11 16:10:47 +01:00
b198cef89f Fix T74516: Armature Crash on Select Similar Group
Select Similar Group and Select Similar Shape had this issue since they
were added. Basically it assumes there is pose data which in some cases
it does not.
2020-03-11 15:32:21 +01:00
Brecht Van Lommel
b9f6d033be Eevee: internal support for arbitrary number of volume grids
This has no user visible impact yet since smoke volumes only support a fixed
set of attributes, but will become important with the new volume object.

For GPU shader compilation, volume grids are now handled separately from
image textures. They are somewhere between a vertex attribute and an image
texture, basically an attribute that is stored as a texture.

Differential Revision: https://developer.blender.org/D6952
2020-03-11 14:59:05 +01:00
e1e772a802 Cleanup: add comment explaining reason for volume texture swizzling 2020-03-11 14:52:55 +01:00
c4beb518de Cycles: disable RTTI only for OSL files, other libraries like OpenVDB need it
This is a bit weak since it's not entirely clear where the boundary is, but
tested to build and pass tests on all platforms.
2020-03-11 14:42:46 +01:00
Brecht Van Lommel
c8acb6dd6c Smoke: put density/color in separate textures, fixes for workbench shader
This is more in line with standard grids and means we don't have to make
many special exceptions in the upcoming change for arbitrary number of volume
grids support in Eevee.

The workbench shader was also changed to fix bugs where squared density was
used, and the smoke color would affect the density so that black smoke would
be invisible. This can change the look of smoke in workbench significantly.

When using the color grid when smoke has a constant color, the color grid
will no longer be premultiplied by the density. If the color is constant
we want to be able not to store a grid at all. This breaks one test for
Cycles and Eevee, but the setup in that test using a color without density
does not make sense. It suffers from artifacts since the unpremultiplied
color grid by itself will not have smooth boundaries.

Differential Revision: https://developer.blender.org/D6951
2020-03-11 14:42:46 +01:00
f3a33a9298 Fix/workaround Eevee tests crashing with Mantaflow
Skip light cache baking until T73921 is fixed. This should be fixed properly
but being able to run the tests at all is important now.
2020-03-11 14:42:46 +01:00
4bee1e1c8c Fix broken logic in lib_query that could lead to NULL id_owner pointer.
Issue revealed by own recent cleanup in rB8820ab4, and moticed by
@brecht, thanks.

Note that am not 100% sure whether we should allow call on lib_query
without a proper valid owner_id, for embedded data-blocks. But this can
be investifated later, so far things have been working like that.
2020-03-11 14:37:38 +01:00
836b99ce49 Fix T74296: Free depsgraph when view layer is removed
Reviewers: sergey

Differential Revision: https://developer.blender.org/D7110
2020-03-11 14:18:22 +01:00
6eeaecdd67 Cloth: Copy point cache settings when copying cloth modifier
This fixes the issue mentioned in the comment in T74515.

Reviewers: mont29

Differential Revision: https://developer.blender.org/D7104
2020-03-11 13:43:58 +01:00
5cb2861420 Fix Cycles incorrect result when compressing some 8 bit log colorspace images
Don't clamp and do premultiply after color space conversion.
2020-03-11 12:59:29 +01:00
68c0d77b0c Cleanup: rename 'private' to 'embedded' for sub-data IDs.
'Private' can be a rather confusing term, especially when considering
its meaning in programming languages.

So now root node trees and master collections are 'embedded' IDs
instead.
2020-03-11 12:53:10 +01:00
8820ab41bd Cleanup in ID remapping code re owner_id vs. self_id.
The former is always a real, in-Main data-block, while the later, when
different, should be one of those embedded 'private' IDs (like root node
ree or master collection).
2020-03-11 12:53:10 +01:00
8b2072868d Cleanup: spelling 2020-03-11 21:39:56 +11:00
796683db8e Cycles: add view layer setting to exclude volumes, like hair and surfaces 2020-03-11 11:25:57 +01:00
b70a13fb66 UI: show more digits for adaptive sampling noise threshold 2020-03-11 10:54:28 +01:00
476c0eab4a Fix T74315: Cloth brush breaks orbit around selection
Reviewers: pablodp606

Differential Revision: https://developer.blender.org/D7095
2020-03-11 10:30:52 +01:00
e1b70e9f9c Fix T74635: GPencil RMB-menu brush settings not working in Sculpt and Weight Paint modes 2020-03-11 10:14:42 +01:00
f2c64517b5 Fix T74607: Modifier key click events ignore mouse wheel
Alt-Wheel would sent Alt-Click event, prompting to switch tools.
2020-03-11 20:09:37 +11:00
d195deef5c Cleanup: clang-format 2020-03-11 19:23:52 +11:00
Greg Neumiller
d0618570eb UI: edit modifier messages to clarify where auto-smooth is set 2020-03-11 19:19:29 +11:00
1c9829f351 GHOST: tests now build again
GLX gears work as expected, multitest_c only creates windows
but misses font drawing still.
2020-03-11 15:17:27 +11:00
15983243a4 Cleanup: remove bitmap font drawing ifdef from MultiTest.c 2020-03-11 15:01:14 +11:00
4184f890fd GPU: minor changes to support standalone GHOST builds
- Move gpuPush/Pop from GPU_draw.h into GPU_state.h
  as this is for pushing/popping state.
- Add 'GPU_STANDALONE' define, to bypass use of user-preferences
  for theme colors and pixelsize, as well as pbvh init/free functions.

Needed to get GHOST tests working again.
2020-03-11 14:52:57 +11:00
f9cca12886 Fix T74596: Gpencil invert button was not working for Sculpt brushes
The button was not checked, only the pen position or the control key.
2020-03-10 20:12:11 +01:00
9c5a120ba2 GPencil: Use high precision float buffer for final rendering
This avoid color drifting due to R11G11B10 buffers.
2020-03-10 18:17:42 +01:00
fa09b900c2 Fix T74625 GPencil: Airbrush doesn't paint anything 2020-03-10 18:11:25 +01:00
0f1f751785 Fix T74525: Fluid caches overwrite each other by default
Reviewers: sebbas

Differential Revision: https://developer.blender.org/D7093
2020-03-10 17:33:05 +01:00
a6d7280b8e Fix T74200: Alembic import crashes Blender
I've added a very minimal mesh validation before the Alembic mesh is actually
converted to a Blender mesh. This prevents a specific crash with an example
file attached to T74200.
2020-03-10 17:16:12 +01:00
7c027f9480 Cycles: Fixed Shadow and Mist passes with adaptive sampling.
This also fixes a side-effect where turning on UV pass but leaving
Shadow pass turned off destroyed the Combined pass.
2020-03-10 16:50:51 +01:00
be20bf2fc0 Fix T74617: Gpencil Sculpt Strength brush gets wonky results
Changed how the strength is calculñated and reduce the factor to get a smoother result.
2020-03-10 16:45:51 +01:00
1619a5d8e9 Fix rendering artifacts when changing Face Sets visibility
All sculpt operators and brushes need to use ID_RECALC_SHADING even when
PBVH rendering is not used.
2020-03-10 16:32:09 +01:00
dc8bb3f3a0 Cleanup: Clarify places to look for subversion bump 2020-03-10 16:17:49 +01:00
b37482bc3d Fix T74613: Assign the default face set color in the versioning code
A default face set color was not being set in previously saved meshes,
so it will always render the default face set with a random color until
the colors were recalculated.

Bump subversion to 283.8

Reviewed By: dfelinto

Maniphest Tasks: T74613

Differential Revision: https://developer.blender.org/D7094
2020-03-10 15:55:50 +01:00
e06888cf89 Cleanup: Add comment explaining DPI influence on RNA pixel-properties
Good to be explicit about the fact that we may still use the pixel
property sub-type when DPI will be applied.
See comments in https://developer.blender.org/D7077.
2020-03-10 15:19:22 +01:00
d55231e5a1 UI: Clarify 3D View Grid Size Tooltip
The 3D view grid size property is a multiplier, not the size of the grid itself.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D7085
2020-03-10 08:44:30 -05:00
a52f6d7a31 Fix T66269: Menu for Extrapolation Mode is disabled in Graph Editor
The Extrapolation Mode menu in the graph editor channel list was
incorrectly using the operator for the Action/Dopesheet editor. The
operator was even missing in the generic dopesheet hotkeys, so
{key Shift E} was listed as hotkey but didn't work. This is now all
fixed.
2020-03-10 14:18:19 +01:00
a801487ef5 Fix T65076: Missing EasingType implementation on the Dopesheet
EasingType was implemented rBdaccaa713b6e for the GraphEditor (but never
made it to the Dopesheet). If you can select Easing Mode in the
DopeSheet, then you should also be able to select the associated Easing
Type.

Thanks @lichtwerk for the initial implementation.

Maniphest Tasks: T65076

Differential Revision: https://developer.blender.org/D6094
2020-03-10 14:02:40 +01:00
ca717f0489 Fix T74425: Cannot texture paint an images sequence anymore
Caused by the introduction of UDIM (rBc30d6571bb47).

We need to make sure the tiles ImageUser is set up correctly [especially
the framenr], otherwise BKE_image_acquire_ibuf() and friends will fail
to find the correct ImBuf.

Also instead of initializing a minimal BKE_imageuser_default, now use
an appropriate ImageUser if avaliable and pass this around (instead of
just the tile_number). 2D painting can reuse the Image Editor ImageUser,
for 3D painting we still rely on a default ImageUser in most places, but
at least set the framenr correctly].

This also fixes crashes when doing image operations such as inverting or
resizing on images in a sequence in the Image Editor.

This also fixes color sampling (S) from the 3DView going wrong for image
sequences (would fallback to OpenGL sampling because an ImBuf could not
be found).

Maniphest Tasks: T74425

Differential Revision: https://developer.blender.org/D7022
2020-03-10 13:47:33 +01:00
212660f467 Fix T73369: corner pin & sun-beam nodes gizmos are too big
Note that dragging isn't working well,
however this was an issue in previous releases.
2020-03-10 23:30:59 +11:00
85cdf9a1b9 Fix T74612: file browser thumbnails not showing and using CPU continuously
This started happening after changing filter ID to 64 bit in rB2841b2be3949,
however there was a pre-existing error here in the comparison to detect updates
to filter flags.
2020-03-10 13:11:32 +01:00
Lucas Veber
915998111b Modifiers: Corrective Smooth modifier, new Scale parameter
When scaling the root bone of a rig to apply a global scale, the
corrective smooth modifier results in wrong deformation due to incorrect
scaling. The delta calculations are not taking into account any scale
value.

To fix it, a scale property is added to the modifier, allowing to set
manually the scale value for the deltas by simply multiplying the
vectors by this value. There is a similar implementation in Maya's Delta
Mush deformer. This property can be for example driven by the scale of
the root bone of the rig, to dynamically update when the animator scale
this bone.

Reviewed By: brecht, sybren

Differential Revision: https://developer.blender.org/D6622
2020-03-10 12:49:08 +01:00
982b498c22 OVERLAY: Viewport Background Color visible in Material Preview Mode
When user used a custom background color, this color was also visible in
material preview mode, when the world opacity was less than 1. This
patch will draw the theme color as it was used to.
2020-03-10 11:36:39 +01:00
dc3ff1db3f Fix T74585: Crash when scrolling viewport shading pop-up
Was dereferencing NULL pointer. Mistake from d5572eacc5.
2020-03-10 11:21:00 +01:00
9f48852ba4 Buildbot: Enable version character for development builds
Allows to have 2.82a as a beta version on buildbot.
2020-03-10 10:23:28 +01:00
1aa7c4c28a GPencil: Cleanup float indicator 2020-03-10 08:58:25 +01:00
Stefan Werner
811569dc11 Cycles: Using OpenCL popcount() in PMJ sampler. 2020-03-10 08:53:30 +01:00
7b8ac04d86 Fix T74601: Cut Particles to Shape fails for transformed object 2020-03-10 16:55:41 +11:00
5aa54207e1 Fix sequencer Slip tool skipping offset=0 case
The slip tool wasn't being applied when the offset was zero.

This caused modal operation to skip applying this offset while dragging.
2020-03-10 16:09:57 +11:00
5184328991 Cleanup: replace term 'terrible' from sequence slip
Joke from branch name, makes comments unclear.
2020-03-10 15:53:18 +11:00
94a5b7a2e2 Fix vertex slide deselecting faces
Regression from 9a5df92c1b
2020-03-10 15:15:52 +11:00
163e6b348f Cleanup: GPencil: Remove uneeded cast 2020-03-10 05:01:13 +01:00
71712d828d GPencil: Fix RNA range for uv_rotation 2020-03-10 04:47:37 +01:00
c971e812d5 Fix T74536: Grease pencil immediately crashes on macOS
It seems like OSX drivers are using standard attributes for passing
gl_VertexID and gl_InstanceID to the vertex shader, and count them in the
limit of MAX_VERTEX_ATTRIBS.

This patch make sure to never use more than 13 attributes by packing some
attributes together.
2020-03-10 04:47:37 +01:00
bf1b323b15 DRW: Fix wrong test condition
Fixes the warning: address of array 'cmd->draw.batch->inst' will
always evaluate to 'true'
2020-03-10 04:47:37 +01:00
ec9b836d3b Fix T74579: Filename with '\' causes assert when browsing files 2020-03-10 12:29:37 +11:00
fbe81db29a Fix IC keymap after recent GP merge
Just a simple fix here for now to keep the keymap working. Will revisit these areas to make them fit in properly with the keymap.
2020-03-09 23:23:06 +01:00
9c5522f7c8 Cleanup: compiler warnings 2020-03-09 21:58:55 +01:00
0133d66ada Fix error in grease pencil vertex paint levels operator 2020-03-09 21:58:55 +01:00
Pablo Dobarro
4652f23fa3 Fix T74354: Avoid division by 0 when calculating hardness
I could not reproduce the issue, but it looks like it was produced by
this division by 0. In any case, the code here was wrong.

Reviewed By: jbakker

Maniphest Tasks: T74354

Differential Revision: https://developer.blender.org/D6987
2020-03-09 21:19:55 +01:00
84b94f9e7b Sculpt: Edge Automasking
This automasking option protects the open boundary edges of the mesh from the brush deformation. This is needed to sculpt cloths and it works nicely with the cloth brush.
It has a Propagation Steps property that controls the falloff of the mask from the edge.

Limitations:
- The automask is recalculated at the beginning of each stroke, creating a little bit of lag in high poly meshes, but it is not necessary. This can be fixed in the future by caching the edge distances, increasing a little bit the complexity of the code.
- The boundary vertex detection in meshes is not ideal and it fails with triangulated geometry, but it is the same as in the smooth brush. After fixing this, we should refactor the smooth brush to use the API and let the automasking option manually control the affected vertices.
- It does not work in Multires (it needs to be implemented in the API). The smooth brush in Multires is also not making boundary vertices.
- The falloff has a visible line artifact on grid patterns. We can smooth the final automasking factors several iterations, but it will make the initialization much slower. This can also be added in the future if we decided to cache the distances.

Reviewed By: jbakker

Differential Revision: https://developer.blender.org/D6705
2020-03-09 21:16:02 +01:00
Yevgeny Makarov
04e9ba7169 UI: add menus for preferences editor
This only applies to the case where preferences are opened as an editor in
a workspace, not with Edit > Preferences in a new window.

Differential Revision: https://developer.blender.org/D7001
2020-03-09 20:18:11 +01:00
Adrian Newton
2d8d30e17b UI: make workbench viewport samples label consistent with Cycles and Eevee
Differential Revision: https://developer.blender.org/D7082
2020-03-09 20:18:11 +01:00
Adrian Newton
848a4f002d UI: add "Samples" text to audio mixing buffer size preference for clarity
Differential Revision: https://developer.blender.org/D7076
2020-03-09 20:18:11 +01:00
18e3615a68 Face Sets: Use white color for a default Face Set to enable the overlay
This introduces a variable to store a face set ID which is going to be
rendered white. When initializing a mesh or randomizing the colors, this
variable gets updated to always render a white face set. This way the
face set overlay can be enabled without adding colors to the mesh if
face sets are not in use. After creating the first face set, new colors
are generated randomly like usual.

The face set stored as default does not have any special meaning for
tools or brushes, it just affects the rendering color.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D7035
2020-03-09 20:11:18 +01:00
0dfb4ac1ff Face Sets: Add relax support to Mesh Filter and Draw Face Sets
This enables a relax operation that works only on face sets boundaries,
which smooths the jagged edges that are produced when painting or
expanding face sets by sliding the topology without affecting the shape
of the mesh. This has many uses in hard surface sculpting for things
like sculpting panels or smoothing surfaces. It can also help when
working with remeshed topology as it makes the face sets looks better
and more organized if needed.

The operation is implemented as an Shift smooth in the Draw Face sets
tool, similar to the Slide/Relax tool.

The same operation is also available in the mesh filter to smooth all
the face sets boundaries uniformly or to smooth the face set under the
cursor with the Use Face Sets option.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D7034
2020-03-09 20:04:05 +01:00
e702c9a700 Fix Cloth Brush not working with automasking
The cloth brush was not using the automasking values when calculating
the mask value on each vertex.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D7083
2020-03-09 19:43:00 +01:00
0030e6a2fc Fix T74500: Rebuild the Face Sets datalayer after slicing the geometry
Was crashing SculptSession data will not longer be valid if the total
number of polys is modified when rendering the mesh again.
This deletes all face sets in the mesh when slicing the mask. I'll try
to add code to generate a new face set in with faces that are created
when filling the holes, but for now this avoids the crash.

Reviewed By: brecht

Maniphest Tasks: T74500

Differential Revision: https://developer.blender.org/D7049
2020-03-09 19:39:57 +01:00
503d5c0c65 Fix T74499: Add visibility checks to Face Sets creation operations
Create face sets by visibility needs to check if all face sets of a
vertex are visible to set the new face set. I renamed the functions to
make this more cleare in the API.

I also added a visibility check when creating by mask to avoid modifying
hidden areas.

Reviewed By: brecht

Maniphest Tasks: T74499

Differential Revision: https://developer.blender.org/D7048
2020-03-09 19:33:22 +01:00
c65b9fb825 Sculpt: Remove hardcoded hardness from Clay brush
Hardness is now a property implemented for all brushes, so this is no
longer needed.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D7078
2020-03-09 19:29:18 +01:00
6eb76f6430 Fix T74492: Reset Face Set data when cancelling the expand operator
The operator was resetting the mask data when cancelling instead of the
face set data, so it was crashing because mask data was not available
when starting the operator in expand face set mode.

Reviewed By: brecht

Maniphest Tasks: T74492

Differential Revision: https://developer.blender.org/D7043
2020-03-09 19:25:38 +01:00
a540d16ee8 Cleanup: Move Face Sets random color generation to its own function
This way we can change the color generation easily if we want to improve
it in the future. I also added more values to randomize a little bit the
saturation and value of the colors, as previously it was too easy to get
similar colors when creating new faces, forcing you to use the randomize
colors more than necessary.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D7042
2020-03-09 19:14:18 +01:00
1131e33026 Fix T74438: Vertex-only meshes disappear in wireframe mode
The problem happens because, in wireframe mode, `bool use_wire` is
always `true`, so the function that draws all edges is the called.

The solution is set `use_wire` as `false` when the mesh has no edges.

This matches the behavior of blender 2.79.

Reviewed By: fclem, brecht

Differential Revision: https://developer.blender.org/D7041
2020-03-09 15:09:26 -03:00
Adrian Newton
a468368540 UI: use pixel units for tile sizes and node auto-offset margin
Differential Revision: https://developer.blender.org/D7077
2020-03-09 18:49:42 +01:00
be2e41c397 Cleanup: Move BKE_animdata_free() call out of each IDType free data.
This has been long standing TODO...

Note that remaining usages of BKE_xxx_delete should all be carefully
checked for and utilmately nuked in favor of `BKE_id_delete()`, think we
still have quiet a few bugs hidden in those (code seems to usually
assume those functions do a full ID deletion, which is not the case).
2020-03-09 18:43:11 +01:00
6472a721f0 Cleanup: Remove unused switch/case from BKE_lib_id.
Only covers direct usages of new callbacks from IDTypeInfo.

We still have a lot of those switch/case, many can probably go away
with minimal refactor now, but that will be for later.
2020-03-09 18:43:11 +01:00
b080de79db Alembic: constraint for transform animation is using world matrix again
In rB7c5a44c71f13 I changed the way transform matrices are loaded from
Alembic. Instead of having the Alembic importer convert matrices from
local (in the Alembic file) to World (to pass to the constraint handling
the animation of transforms), I set the constraint space to
`CONSTRAINT_SPACE_LOCAL`.

This worked thanks to rB7728bfd4c45c. However, that commit was reverted,
which meant that for parentless objects `CONSTRAINT_SPACE_LOCAL` no
longer means "local space".

The situation is resolved by setting the constraint to world space
again, and computing the world matrix in the Alembic importer.
2020-03-09 18:27:18 +01:00
e672cf11c3 Cleanup: palette: Move to IDTypeInfo and remove unused BKE API. 2020-03-09 18:09:23 +01:00
3e9dbe7f62 Cleanup: GreasePencil: Move to IDTypeInfo and remove unused BKE API. 2020-03-09 18:09:23 +01:00
c010290e75 Cleanup: Ipo: Move to IDTypeInfo and remove unused BKE API. 2020-03-09 18:09:23 +01:00
214cc3c245 Fix failing assert because of invalid region coordinates
Steps to reproduce were:
* Disable tool settings region in 3D View (View > Tool Settings)
* Split the 3D View and drag all the way down

The removed code doesn't seem to be needed anymore. Tested this on hiDPI
too, seems fine.

These kind of fixes are always tricky, so I wouldn't be surprised if
there are any issues caused by this.
2020-03-09 18:02:08 +01:00
32fc22db56 Fix T72253: Mantaflow adaptive domain cuts off
The issue of T72253 was that the density threshold (RNA adapt_threshold) was considering cells as empty cells too early and thus also shrinking the domain too early. The fix for this is to use smaller threshold values for the adaptive domain. This fix gives more flexibility in the UI to do just that.
2020-03-09 17:42:38 +01:00
Yevgeny Makarov
07bdbeda84 UI: avoid blurring of view navigation widgets at some UI scales
Differential Revision: https://developer.blender.org/D6734
2020-03-09 17:11:24 +01:00
Ulysse Martin
aca222c3da Fix unnecessary grease pencil drawing when there are no grease pencil objects
Differential Revision: https://developer.blender.org/D6551
2020-03-09 17:11:24 +01:00
Yevgeny Makarov
bada2dcafd UI: improve layout of keymap preferences, more consistent with other areas
Differential Revision: https://developer.blender.org/D6592
2020-03-09 17:11:24 +01:00
Kai Jægersen
6f4612a7cc Python API: allow overriding context.workspace for workspace operators
Differential Revision: https://developer.blender.org/D6867
2020-03-09 17:11:24 +01:00
Yevgeny Makarov
da101eddef UI: input preferences layout tweaks for keymap search and zoom settings
Differential Revision: https://developer.blender.org/D6979
2020-03-09 17:11:24 +01:00
Johan Walles
8bc8713beb Cleanup: avoid (harmless) race condition reported by Helgrind
Differential Revision: https://developer.blender.org/D7058
2020-03-09 17:11:24 +01:00
Adrian Newton
58e6306b15 UI: reorder viewport/render toggle in particles for consistency with modifiers
Differential Revision: https://developer.blender.org/D7069
2020-03-09 17:11:24 +01:00
Adrian Newton
5543572cd2 Cleanup: remove unnecessary space at end of label
Differential Revision: https://developer.blender.org/D7070
2020-03-09 17:11:24 +01:00
Adrian Newton
1276380fd2 UI: add space before px unit in Eevee properties for consistency
Differential Revision: https://developer.blender.org/D7072
2020-03-09 17:11:24 +01:00
Eitan
3923738c8f UI: rename View Frame to Go to Current Frame in video sequencer
For consistency with other editors.

Differential Revision: https://developer.blender.org/D7025
2020-03-09 17:11:24 +01:00
324e24ee38 Fix layout.prop invert_checkbox not working combined with icons
Contributed by Valentin (Poulpator).

Differential Revision: https://developer.blender.org/D7027
2020-03-09 17:11:24 +01:00
81c18c2507 Fix part of T73921: hang with Eevee light baking and Mantaflow
Now it crashes instead.
2020-03-09 17:11:24 +01:00
29b405a327 Overlay: Add antialiasing to particle sprites 2020-03-09 17:09:32 +01:00
3912a2a227 Fix T74438: Overlay: Loose verts and particle not draw in some conditions
This was caused by a missing output variable for lineOutput.
This triggered some undefined behavior.
2020-03-09 17:09:32 +01:00
4d0d43ce8e Cleanup: FreestyleLineStyle: Move to IDTypeInfo and remove unused BKE API. 2020-03-09 16:56:53 +01:00
dab1d14a51 Cleanup: Mask: Move to IDTypeInfo and remove unused BKE API. 2020-03-09 16:56:53 +01:00
6965bcc0c9 Cleanup: MovieClip: Move to IDTypeInfo and remove unused BKE API. 2020-03-09 16:56:53 +01:00
d43fbbb307 Cleanup: Silence warnings 2020-03-09 16:34:55 +01:00
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
dcb9312687 Depsgraph: fix crash caused by removing too many NO-OP nodes
Unused no-op operation nodes are not bound to a callback function, and
have no outgoing relations. Incoming relations of such nodes are removed
since ff60dd8b18. However, this was done
too broadly, causing too many relations to be lost and indirectly linked
objects to be unevaluated.

This commit introduces a `DEPSOP_FLAG_FAKE_USER` flag for operation
nodes, which indicates they are not to be removed, even when they appear
to be unused.

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D7074
2020-03-09 16:05:33 +01:00
93f6369573 Fix T74533: Crash when entering sculpt mode
Apparently this happened when the object is in a flat view and has
customdata `CD_SCULPT_FACE_SETS`

Differential Revision: https://developer.blender.org/D7073
2020-03-09 12:00:11 -03:00
598ab525da Cleanup: Replace ABS/SQUARE/CUBE with function calls
While it might be handy to have type-less functionality which is
similar to how C++ math is implemented it can not be easily achieved
with just preprocessor in a way which does not have side-effects on
wrong usage.

There macros where often used on a non-trivial expression, and there
was at least one usage where it was causing an actual side effect/bug
on Windows (see change around square_f(sh[index++]) in studiolight.c).

For such cases it is handy to have a function which is guaranteed to
have zero side-effects. The motivation behind actually removing the
macros is that there is already a way to do similar calculation. Also,
not having such macros is a way to guarantee that its usage is not
changed in a way which have side-effects and that it's not used as an
inspiration for cases where it should not be used.

Differential Revision: https://developer.blender.org/D7051
2020-03-09 14:47:59 +01:00
ee5d7bc16b Cleanup: clang-format 2020-03-09 10:11:31 -03:00
a922a097ef Transform Snap Object: Remove depsgraph when creating context
Currently, this change does not bring functional changes.
But it is necessary to extend the use of the snap system for gizmos,
since, after a Undo, the `depsgraph` pointed by the `snap_context`
has its memory invalidated.

Reviewed By: campbellbarton

Differential Revision: https://developer.blender.org/D7013
2020-03-09 10:02:11 -03:00
3a10c61a7d Cleanup: ParticleSettings: Move to IDTypeInfo and remove unused BKE API. 2020-03-09 12:49:04 +01:00
b9d1026ce0 Cleanup: PaintCurve: Move to IDTypeInfo and remove unused BKE API. 2020-03-09 12:49:04 +01:00
b57d3afb76 Cleanup: CacheFile: Move to IDTypeInfo and remove unused BKE API. 2020-03-09 12:49:04 +01:00
613148ce5b Cleanup: WorkSpace: Move to IDTypeInfo and remove unused BKE API. 2020-03-09 12:49:04 +01:00
0de5156a24 Cleanup: WindowManager: Move to IDTypeInfo and remove unused WM API.
Getting rid of one static 'registered' callback in BKE, yeah!
2020-03-09 12:49:04 +01:00
f881162f81 Revert "Constraints: remove special meaning of Local Space for parentless Objects."
This reverts commit 7728bfd4c4.

Although this brings back an inconsistency in the behaviour of
constraints on objects and bones, people were relying on the old
behaviour, and the new behaviour broke their files.

It is still desired to remove this inconsistency, but it will happen
more gradually.
2020-03-09 10:44:55 +01:00
Stefan Werner
bc6bbe5fac Fix T74537: Fixed out of bounds memory access in Cycles' PMJ sampler. 2020-03-08 21:31:47 +01:00
668b64380a Cleanup: Sound: Move to IDTypeInfo and remove unused BKE API. 2020-03-08 20:45:00 +01:00
014f78b5b5 Cleanup: Speaker: Move to IDTypeInfo and remove unused BKE API. 2020-03-08 20:10:07 +01:00
0d05fd9b4c Install_deps: fix wrong XR_OPENXR_ROOT_DIR parameter for CMake.
Should be `XR_OPENXR_SDK_ROOT_DIR`.`
2020-03-08 17:14:58 +01:00
7f404f1c74 Fix T74395: Box interpolation does not support repeat extrapolation
Reviewers: fclem

Differential Revision: https://developer.blender.org/D7009
2020-03-08 14:43:06 +01:00
bc2343d5c3 Cleanup: comments in main()
Clarify references to functions.
2020-03-08 13:48:52 +11:00
52dc1ddaa0 Revert "Outliner: Allow deleting entire selection"
This reverts commit 62f238a65e.

This prevents undo steps from being stored.
2020-03-08 13:48:21 +11:00
62f238a65e Outliner: Allow deleting entire selection
This allows deleting both collections and objects in the outliner
selection at the same time. This only works using the keyboard shortcuts
(X or Delete).

While this works, a more robust solution should be implemented later to
allow deleting the whole selection from the context menu as well.
2020-03-07 14:46:22 -07:00
5539b68009 Fluid: Optimization for smoke simulation (multigrid)
The solver will now automatically detect static scenes (no moving obstacles) and use a slightly faster pressure solve in those cases.
2020-03-07 19:57:06 +01:00
9867a82072 Cleanup: Outliner: Remove unused parameter
Searching back in the outliner did not require the unused SpaceOutliner
parameter.
2020-03-07 11:26:02 -07:00
6b49a9db52 Fix T74513: Wrong naming in some Face Set comments and operators
Missing changes from one of the renamings of the initial face sets
patch.

Reviewed By: brecht

Maniphest Tasks: T74513

Differential Revision: https://developer.blender.org/D7054
2020-03-07 16:42:28 +01:00
db1d711458 Fix T74501: Wrong initial iteration when using mask expand
The initial iteration for all symmetry areas is always 0. We were using
1 for the main stroke, so it was 1 step behind.

This was broken for expanding masks and face sets, but with face sets it
is more noticeable.

Reviewed By: brecht

Maniphest Tasks: T74501

Differential Revision: https://developer.blender.org/D7050
2020-03-07 16:41:41 +01:00
7760cec5dc Fix T74498: Do not iterate over hidden vertices when using the transform tool
By using PBVH_ITER_UNIQUE hidden vertices are skipped, like in the rest of
the brushes and tools.

Reviewed By: brecht

Maniphest Tasks: T74498

Differential Revision: https://developer.blender.org/D7047
2020-03-07 16:40:19 +01:00
946d39f688 UI: move Cycles adaptive sampling settings to own subpanel 2020-03-07 12:40:06 +01:00
8a5a306a83 Fix key release event activating click-drag
A handled release event could still trigger a click-drag afterwards.
2020-03-07 18:21:01 +11:00
2534dffaa5 WM: include repeat value in WM_event_print 2020-03-07 16:26:22 +11:00
ef5c6361a5 Cleanup: replace BLI_make_file_string with BLI_join_dirfile for the file-selector
In these cases the file selectors directory is already expanded.
2020-03-07 13:52:41 +11:00
0964865568 Cleanup: replace BLI_make_file_string with BLI_join_dirfile where possible
Use 'BLI_join_dirfile' for joining paths that don't need to expand '//'.
2020-03-07 13:26:23 +11:00
8fb1ea857f Include file system encoding in 'System Info' operator
Help troubleshooting file system encoding issues.
2020-03-07 11:53:14 +11:00
dcdcc23488 Fix T74504: Cycles wrong progress bar with CPU adaptive sampling 2020-03-06 23:46:58 +01:00
b31b44c223 Fix error in Cycles Optix adaptive sampling after recent cleanup 2020-03-06 23:46:58 +01:00
afe6df1487 Cleanup: VFont: Move to IDTypeInfo and remove unused BKE API
This was particularly strange because we had a _free_data() function.
But still the one I replaced was of course the _free() one.

And we should rename the _free_data_ function later to avoid confusions.
2020-03-06 20:07:02 +01:00
558f449f8c Cleanup: Text: Move to IDTypeInfo and remove unused BKE API. 2020-03-06 20:07:02 +01:00
7177862313 API Docs: Point to manual for Operator Cheat Sheet 2020-03-06 12:50:19 -05:00
13595c912c UI: Remove Windows 3D Object Folder Reference
Remove Windows special folder FOLDERID_Objects3D. Requires newer SDK.

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

Reviewed by Brecht Van Lommel
2020-03-06 09:33:13 -08:00
85424397b1 Cleanup: tweak Freestyle #includes in preparation for clang-format sorting 2020-03-06 17:26:32 +01:00
96e2bd8493 Cleanup: Fix forward declaration of headers 2020-03-06 17:26:32 +01:00
b2ee1770d4 Cleanup: Rename ARegion variables from ar to region
The old convention was easy to confuse with ScrArea.
Part of https://developer.blender.org/T74432.

This is mostly a batch rename with some manual fixing. Only single word
variable names are changed, no prefixed/suffixed names.

Brecht van Lommel and Campbell Barton both gave me a green light for
this convention change.

Also ran clan clang format on affected files.
2020-03-06 17:19:23 +01:00
b825a95ec3 Cleanup: Image: Move to IDTypeInfo and remove unused BKE API. 2020-03-06 17:13:27 +01:00
f4936de918 Cleanup: Texture: Move to IDTypeInfo and remove unused BKE API. 2020-03-06 17:13:27 +01:00
a7fb567c18 Cleanup: Material: Move to IDTypeInfo and remove unused BKE API. 2020-03-06 17:13:27 +01:00
ae6a5629a5 Fix build error on windows
```
Error	C4013	'_VA_ELEM1' undefined; assuming extern returning int
```
2020-03-06 12:49:24 -03:00
68b6d0302a Cleanup: Action: Move to IDTypeInfo, and remove unused BKE API. 2020-03-06 16:43:09 +01:00
57daecc2cf Cleanup: Armature: Move to IDTypeInfo, and remove unused BKE API. 2020-03-06 16:43:09 +01:00
14d03af7ae Bring back code accidentally removed by previous commit
Probably got lost when resolving merge conflicts.
2020-03-06 16:41:57 +01:00
d5572eacc5 Cleanup: Reduce context usage in UI functions
Part of https://developer.blender.org/T74429.

There's a chance that this causes some issues becaue in some cases we
change from getting the window from context to getting it from somewhere
else.
2020-03-06 16:27:13 +01:00
b242cc6792 Cleanup: Lattice: Move to IDTypeInfo and remove unused BKE API. 2020-03-06 16:23:23 +01:00
da7fcd3e52 Cleanup: MetaBall: Move to IDTypeInfo and remove unused BKE API. 2020-03-06 16:23:23 +01:00
8c21668ee1 Cleanup: Curve: Move to IDTypeInfo and remove unused BKE API. 2020-03-06 16:23:23 +01:00
bf6cf49133 Cleanup: Mesh: Move to IDTypeInfo and remove unused BKE API. 2020-03-06 16:23:23 +01:00
eb522af4fe Cleanup: move Alembic, AVI, Collada, and USD to source/blender/io
This moves the `alembic`, `avi`, `collada`, and `usd` modules into a common
`io` directory.

This also cleans up some `#include "../../{somedir}/{somefile}.h"` by
adding `../../io/{somedir}` to `CMakeLists.txt` and then just using
`#include "{somefile}.h"`.

No functional changes.
2020-03-06 16:19:45 +01:00
ff60dd8b18 Depsgraph: remove unused no-op nodes after building
This is the companion of D7031. That patch adds a new DIMENSIONS node to
the depsgraph for each object that has geometry. However, this node is
only necessary when there are drivers using an object's dimensions as
variable. Since this is rare, it's easiest to remove these nodes after
they turn out to be unnecessary. This is what (almost) happens in this
patch.

Removing nodes from the depsgraph is hard, and there are no functions to
do this yet. Instead, this patch recursively removes all the incoming
relations from unused no-op nodes (i.e. no-op operation nodes without
outgoing connections). Actually removing the nodes will be left as a
future improvement.

I've tested this on a Spring file [1]. Here are there results of blender
--debug-depsgraph-time spring_02_055_A.eevee.blend and letting it run
for a while to stabilise the reported FPS:

    master: 11.7 FPS
    Just D7031: 11.7 FPS
    Just D7033: 11.8 FPS
    Both D7031 + D7033: 12.3 FPS

[1] https://cloud.blender.org/p/spring/5d30a1076249366fa1939cf1

Differential Revision: https://developer.blender.org/D7033
2020-03-06 16:19:45 +01:00
f2f8c5b2bd Cleanup: Move Multiplane Scrape brush to its own file 2020-03-06 16:00:33 +01:00
40ac8250b2 Fix narrowing from int to short when removing material slot 2020-03-06 15:56:09 +01:00
926f52edf0 Sculpt: Cleanup, remove macro re-definition 2020-03-06 15:52:36 +01:00
a16e4652e3 Fix integer overflow in BLI_mempool_as_arrayN()
`(size_t)(int * int)` will actually cast overflown integer to size_t,
which isn't what was intended here. Correct thing would be to cast
in the following manner `(size_t)int * int`.

In this particular case can as well use function which is designed to
allocate an array of memory without overflow.
2020-03-06 15:35:52 +01:00
c60366c01f Cycles: cleanup warning 2020-03-06 15:27:50 +01:00
17f08cff6a Cleanup: Collection: Move to IDTypeInfo, and remove unused BKE API.
Note: we still need BKE_collection_free since we call it from scene.c.
2020-03-06 15:27:50 +01:00
69d4aec55f Cleanup: Use the SCULPT_ prefix in all sculpt_intern functions 2020-03-06 15:24:15 +01:00
b201a67faa Cleanup: bScreen: Move to IDTypeInfo and remove unused BKE API. 2020-03-06 15:20:04 +01:00
a5bbdd6998 Cleanup: use ELEM macro for path slash checks 2020-03-07 01:02:37 +11:00
b4f1edd98b Fluid: Revert bc2ce31d79 (changes to open boundaries)
Changes from that commit turned out to be unstable.
2020-03-06 15:01:30 +01:00
a9ac87be36 Fix T73842: UI: add cloth collision settings to Hair Dynamics panel
Since hair collisions were integrated with the cloth solver
(rBd42a7bbd6ea5), there are a couple of relevant settings which were not
exposed to the User:
- Collision Quality
- Minimum Distance (this was reported in T73842, default of 0.015m was
still limiting in certain scenarios - this can now be made smaller)
- Impulse clamping
- Collision collection

This will add a 'Collisions' panel to Hair Dynamics with those settings

Note: in contrast to 'real' cloth, self-collisions are not supported for
hair

Maniphest Tasks: T73842

Differential Revision: https://developer.blender.org/D7032
2020-03-06 14:59:02 +01:00
f9c7442479 Cleanup: bNodeTree: Move to IDTypeInfo and remove unused BKE API. 2020-03-06 14:58:23 +01:00
165daee7cb Improve modifier error message with sculpt mode
Make it obvious that this relates to being in sculpt mode.

ref T74489

Maniphest Tasks: T74489

Differential Revision: https://developer.blender.org/D7044
2020-03-06 14:52:25 +01:00
c8ac760c59 Cleanup: tweak Cycles #includes in preparation for clang-format sorting 2020-03-06 14:44:42 +01:00
4102d67d32 Cleanup: avoid use of BLI_cleanup_dir
Some cases don't need to add the trailing slash.
Use BLI_cleanup_path in this case.
2020-03-07 00:39:28 +11:00
2d5773d11a Documentation: added bpy.msgbus description and examples
The `bpy.msgbus` namespace was not included in the documentation generation.
I've added it, and ported Campbell's examples from P563.
2020-03-06 14:29:03 +01:00
07c5ca7f2c Cleanup: Message bus, removed incorrect return type from docstring
The docstring was likely copy-pasted, and the return type was not adjusted.
Since the `bpy.msgbus.subscribe_rna()` returns nothing, I just removed the
return type documentation.
2020-03-06 14:29:03 +01:00
b839a5d076 Cleanup: remove BLI_cleanup_file
In practice, references to files rarely have trailing slashes
(by accident). Remove this function in favor of BLI_cleanup_path.
2020-03-07 00:19:01 +11:00
0b16b63d87 Cleanup: spelling 2020-03-07 00:19:01 +11:00
8bb0ac27dc Fix using wrong property name for preserve face sets when remeshing
Spotted by Roel Koster in the initial face set commit.
2020-03-06 14:17:30 +01:00
50d5050e9c Nodes: fix writing socket default values to file
Previously, `writedata` was used to store `bNodeSocket->default_value`.
There are a couple of issues with that:
* Breaks if someone tries to load the file on a big endian system (afaik).
* There is a `/* do not use for structs */` comment on `writedata`.
* Depends on `MEM_allocN_len` which should be avoided in my opinion.
* Now it is more apparent, that this should be handled by callbacks as well.

The part in `readfile.c` should work just fine still. I could also do a case
distinction there, but the code would be the same for every case for now.
Just `sock->default_value = newdataadr(fd, sock->default_value);`.

This might change, if we want to store more complex socket type specific data
that does not fit into a single struct.

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

Reviewers: brecht
2020-03-06 13:31:15 +01:00
63bb2007d8 CodeCleanup: Added View3DShading enums
Added the core enums that workbench draw engine uses.
2020-03-06 13:00:06 +01:00
f0808b53ab Cleanup: Brush: Move to IDTypeInfo, and remove unused BKE API. 2020-03-06 12:54:04 +01:00
15c834ebbf Cleanup: ShapeKey: Move to IDTypeInfo and remove unused BKE API. 2020-03-06 12:52:52 +01:00
c08151c6fa Nodes: Support storing socket link limits in bNodeSocketType
Currently the link limit of sockets is stored in bNodeSocket->limit.
This allows for a lot of flexibility, but is also very redundant.
In every case I've had to deal with so far, it would have "more correct"
to set the link limit per socket type and not per socket. I did not enforce
this constraint yet, because the link limit is exposed in the Python API,
which I did not want to break here.

In the future it might even make sense to only support only three kinds of link limits:
a) no links, b) at most one link, c) an arbitrary number links links. The other link
limits usually don't work well with tools (e.g. which link should be removed when a new
one is connected?) and is not used in practice. However, that is for another day.

Eventually, I would like to get rid of bNodeSocket->limit completely and replace it
either with fixed link limits or a callback in bNodeSocketType.

This patch consists of three parts:

**1. Support defining link limit in socket type**
This introduces a new `nodeSocketLinkLimit` function that serves as an indirection to
hide where the link limit of a socket is defined.

**2. Define link limits for builtin sockets on socket type**
Data sockets: one input, many outputs
Virtual sockets: one input, one output
Undefined sockets: many inputs, many outputs (to avoid that links are removed when the type of the socket is not known)

**3. Remove `bNodeSocketTemplate->limit`**
This wasn't used anymore after the second commit. Removing it simplifies socket definitions
in hundreds of places and removes a lot of redundancy.

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

Reviewers: brecht
2020-03-06 12:33:04 +01:00
98d562af52 CodeCleanup: move include statements before extern "C"
Mistake on recent changes that would fail when used in CPP.
2020-03-06 12:32:53 +01:00
24a37b3c03 Fix memory leak in the colorio fallback implementation.
We would previously not store the transforms that were added to the
group transform node. This would lead to pointer to allocated memory
being lost and not freed.
2020-03-06 12:29:12 +01:00
e65f5c07b0 Fluid: Added missing UI options for effector objects
UI was missing some of the new functionality introduced in a5c4a44df6.
2020-03-06 12:26:47 +01:00
79558a581d CodeCleanup: Use eDrawType
This patch will make use of the eDrawType where it was used as a
variable or parameter name. The eObjectDrawType was renamed to eDrawType
as it is also used by `View3DShading.type`.
2020-03-06 12:23:46 +01:00
e96b103536 Cleanup: move camera, lights, world to IDTypeInfo 2020-03-06 12:19:11 +01:00
297261eb90 CodeCleanup: Added enums to opengl render functions
Motivation the functions get 3 different kind of flag parameters (ImBuf,
DrawType, OffscreenRendering) the naming of the flags were not clear,
leading to mistakes and unnecessary time spend debugging.
2020-03-06 12:11:55 +01:00
9fa29fe765 Cleanup: remove MLOOPUV_EDGESEL
This was not set anywhere, code relies on MLOOPUV_VERTSEL everywhere.

BMLoopUV.select_edge was never returning True and wasnt updating uv
select state when set manually.

Afaict, there were no official Addons using this from python.

Resolves T65836

Maniphest Tasks: T65836

Differential Revision: https://developer.blender.org/D6772
2020-03-06 11:59:28 +01:00
Julian Eisel
c72317943b Attempt to fix build errors on macOS
Mistake in 5be0e3430d
2020-03-06 11:43:13 +01:00
7d61132807 Animation: improved error handling when adding/deleting keyframes
There are two ways in which adding/deleting keyframes can fail, but only
one of those was handled. The other would be shown as a successful
add/delete of -2 keyframes.
2020-03-06 11:36:59 +01:00
d8491cb7c6 Cleanup: Animation, renamed and clarified 'success' variable
The `ANIM_apply_keyingset()` returns a value that indicates the number of
changed channels (if nonnegative) or an error state (negative). In the
places where the return value was actually used, this value was stored in
a badly named variable.
2020-03-06 11:36:59 +01:00
17e1fef85a Cleanup: Library: Move to IDTypeInfo, and remove unused BKE API. 2020-03-06 11:27:54 +01:00
c25f6e998b Cleanup: Object: remove unused BKE API. 2020-03-06 11:27:54 +01:00
af5d2e38f7 Cleanup: Scene: New IDTypeInfo, and remove unused API from BKE. 2020-03-06 11:27:54 +01:00
7d9a5b7b10 Fix T73254: Drivers with the object.dimension variable are not updated
This fixes an issue where drivers using `object.dimension` only add a dependency on `GEOMETRY` to the depsgraph, whereas they should also depend on `TRANSFORM`.

This patch adds a new no-op operation that depends on the geometry and transform components to the Parameters component.

An alternative implementation would be to have `RNANodeQuery::construct_node_identifier` return multiple node identifiers. However, this would spread throughout the depsgraph code and unnecessarily force many other functions to either return or handle multiple nodes where in 99.999% of the time a single node would suffice.

The new `DIMENSIONS` node is added for each object. An upcoming patch will go over all no-op operation nodes and remove them from the depsgraph. Since this is a more dangerous operation, it'll be reviewed separately.

Differential Revision: https://developer.blender.org/D7031
2020-03-06 11:05:22 +01:00
abd33a3c0c Fluid: Cleanup naming for emmission bounding box
Since the bounding boxes are now also being used for effector objects, there needs to be a better name for them. Instead of calling them EmissionMap, which caters only to emission objects, they will now be called FluidObjectBB.
2020-03-06 11:04:26 +01:00
2e7cfb86fe Keymap: ignore repeat events for transform actions
Resolves T54297
2020-03-06 21:02:11 +11:00
e6aa349c68 CodeCleanup: eevee_materials Use Struct Assignments 2020-03-06 10:28:02 +01:00
0b9c1c2b86 Cleanup: typo in function name
contect -> context
2020-03-06 09:47:27 +01:00
5be0e3430d GHOST/Keymap: support for detecting repeat events
- Keymap items now have 'repeat' boolean which can be set
  to make keymap items respond to key repeat events or not.
- Support for X11 & WIN32 (not macOS currently).

This allows for the possibility to perform actions while a key is held
and finish the action upon release.

Thanks to @Severin for review and WIN32 support.
2020-03-06 17:31:28 +11:00
73ef27f156 Cleanup: keyframing return arguments
- Use 'int' for counters instead of short.
- Use 'bool' instead of a counter when only a change is being detected.
- Use typed enum for keying set flags.
- Include in comments when a negate error code may be returned.
2020-03-06 17:05:18 +11:00
e97aed1e73 Cleanup: remove unused 'eInsertKeyFlags' from delete API call
There is no need for an insertion flag in a delete function.
2020-03-06 15:07:57 +11:00
b15c658801 Cleanup: keyframe API naming, high level keyframe API
- Split 'verify_fcurve' into two functions:

  ED_action_fcurve_ensure which adds the f-curve if needed.
  ED_action_fcurve_find which returns NULL when not found.

  Callers of ED_action_fcurve_find had unused 'group'
  argument which has been removed.

- Rename verify_adt_action to ED_id_action_ensure

  It had an argument to add data which was always true,
  remove this instead of splitting in into a separate function.
2020-03-06 14:16:38 +11:00
07d13be678 Cleanup: rename 'verify' to 'ensure' for BKE_image_viewer functions 2020-03-06 13:06:21 +11:00
54ab8c6abd Cleanup: rename 'verify' to 'ensure' for argument name 2020-03-06 13:00:01 +11:00
bba4a09b2f Cleanup: use 'BKE_' prefix for BKE_deform API calls
- Use 'BKE_object_defgroup' prefix for object functions.

- Rename 'defvert_verify_index' to 'defvert_ensure_index'
  since this adds the group if it isn't found.
2020-03-06 12:56:44 +11:00
1af83aa2dd Cleanup: use 'r_' prefix for return arguments
Also avoid a redundant strlen call.
2020-03-06 12:49:21 +11:00
088636bc38 Cleanup: use BLI_strnlen instead of strlen 2020-03-06 12:43:58 +11:00
5229448c43 Cleanup: clang-format 2020-03-06 12:39:00 +11:00
c19d2f2507 Cleanup: use MEM_recallocN_id 2020-03-06 12:00:37 +11:00
8574d68aa0 Cleanup: spelling 2020-03-06 11:52:32 +11:00
6c623b0e8c Cleanup: add decimal values for event types, order by value 2020-03-06 11:52:31 +11:00
da30e9a104 Cleanup: quiet switch warnings 2020-03-06 11:52:31 +11:00
310285b0c2 Cleanup: redundant-decls warning 2020-03-06 11:14:21 +11:00
eed1beff88 UI: Using Consistent Font Icon in File Browser
Use only one font icon in File Browser for all platforms. Correct mistake to allow this icon to be used.

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

Reviewed by Brecht Van Lommel
2020-03-05 13:23:28 -08:00
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
e56471bcd3 UI: File Browser Favorites
Adding more Windows special folder locations, used when browsing or bookmarking.

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

Reviewed by Brecht Van Lommel
2020-03-05 11:49:56 -08:00
Yevgeny Makarov
84c9a99cca UI: Mac File Browser System List Changes
Nicer icons for File Browser System and Favorites lists on Mac.

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

Reviewed by Brecht Van Lommel
2020-03-05 10:40:02 -08:00
Julian Eisel
3b1ef223ba Ghost: Support drawing OpenGL framebuffers into a DirectX 11 buffer
Adds a minimal DirectX 11 Ghost context, plus some shared DirectX-OpenGL
resource interface using the NV_DX_interop2 WGL extension. From what I
know, this should be available on modern GPUs. If not, it should fail
gracefully.
There should be no user visible changes at this point.

Needed for DirectX-only OpenXR platforms (e.g. Windows Mixed Reality). I
heard there are other use-cases as well though.

It's known that this currently fails on some AMD systems, but that seems
to be fixable.

Most of this comes from the 2019 GSoC project, "Core Support of Virtual
Reality Headsets through OpenXR"
(https://wiki.blender.org/wiki/User:Severin/GSoC-2019/).

Reviewed by: Jeroen Bakker, Ray Molenkam, Brecht van Lommel

Differential Revision: https://developer.blender.org/D6190
2020-03-05 18:29:29 +01:00
4a3377fcf6 Fluid: Optimization in mesh generating loop
No need to have three separate loops for vertices, normals and speed vectors. Since all of them loop over the vertex count, a single loop can be used.
2020-03-05 17:51:21 +01:00
a874cfb858 Cleanup: Move std::deque to depsgraph_type.h
Since `std::deque` is used in a few areas of the Depsgraph, and an
upcoming patch adds one more, it's time it's considered as "commonly
used type".

No functional changes.
2020-03-05 17:32:01 +01:00
c43725e189 Add an session-wise uuid integer to IDs.
"session-wise" here mean while editing a same .blend file. So creating
or opening a new one will reset the uuid counter. This should avoid any
overflow in practice.

Only IDs added to Main database get an uuid, runtime-only ones are not
affected.

This is intended to provide undo with a way to find IDs across several
'memory realms' (undo speedup project).

No behavior change is expected from this commit itself.

Part of T60695.

Differential Revision: https://developer.blender.org/D7007
2020-03-05 16:30:12 +01:00
88db9a17ce Fix T74393: Cycles crashes when both OSL and Optix Denoising are enabled
Enabling viewport denoising causes Cycles to use a multi-device, which always returned NULL when
asked for OSL memory and would subsequently crash. This fixes that by returning the correct OSL
memory pointer from the CPU device in the special viewport denoising multi-device.
2020-03-05 16:28:31 +01:00
fe7528ee91 Fix T74332: selection sync replacing parent selection
Selecting certain child datablocks also selects the parent (e.g.
selecting a pose bone selects the armature). The base was selected, but
the outliner tree element was left unselected. The subsequent selection
sync would then deselect the parent base because it was not flagged as
selected in the outliner.

This led to issues like T74332 where selecting a pose bone in the
outliner did not show drivers in the driver editor unless the armature
was explicitly added to the selection afterwards.

The solution is to also flag the outliner elements as selected when
selecting parent bases.

Differential Revision: https://developer.blender.org/D7029
2020-03-05 07:40:29 -07:00
60c208e2d6 Fluid: Fix initial velocities for new static emission mode
For now, disabling static mode whenever initial velocities are being used.
2020-03-05 14:58:15 +01:00
950a35e353 Fluid: More optimizations in smoke / liquid scripts
Reduced extrapolation distances, no need to extrapolate that far.
2020-03-05 14:22:51 +01:00
cd0a6ff5c4 Fluid: Diffusion settings now optional
For optimization purposes these settings need to be enabled explicitly from now on.
2020-03-05 12:36:00 +01:00
4d3da4e1d0 EEVEE: Render Passes Blending
Changed the blending mode to full blending. I found the issue when
during development of a material pass containing alpha values.
2020-03-05 12:25:35 +01:00
Stefan Werner
51e898324d Adaptive Sampling for Cycles.
This feature takes some inspiration from
"RenderMan: An Advanced Path Tracing Architecture for Movie Rendering" and
"A Hierarchical Automatic Stopping Condition for Monte Carlo Global Illumination"

The basic principle is as follows:
While samples are being added to a pixel, the adaptive sampler writes half
of the samples to a separate buffer. This gives it two separate estimates
of the same pixel, and by comparing their difference it estimates convergence.
Once convergence drops below a given threshold, the pixel is considered done.

When a pixel has not converged yet and needs more samples than the minimum,
its immediate neighbors are also set to take more samples. This is done in order
to more reliably detect sharp features such as caustics. A 3x3 box filter that
is run periodically over the tile buffer is used for that purpose.

After a tile has finished rendering, the values of all passes are scaled as if
they were rendered with the full number of samples. This way, any code operating
on these buffers, for example the denoiser, does not need to be changed for
per-pixel sample counts.

Reviewed By: brecht, #cycles

Differential Revision: https://developer.blender.org/D4686
2020-03-05 12:21:38 +01:00
4ccbbd3080 Fix T74446: Liquid Inflow Does Not Work
Somehow this was forgotton in the optimization patch a5c4a44df6.
2020-03-05 11:41:09 +01:00
c328049535 Initial step for IDTypeInfo refactor 'cleanup' project.
Introduce new IDTypeInfo structure.

Each ID type will have its own, with some minimal basic common info,
and ID management callbacks.

This patch only does it for Object type, for demo/testing purpose.
Moving all existing IDs is a goal of next "cleanup Friday".

Note that BKE_idcode features should then be merged back into BKE_idtype -
but this will have to be done later, once all ID types have been properly
converted to the new system.

Another later TODO might be to try and add callbacks for file read/write,
and lib_query ID usages looper.

This is part of T73719.

Thanks to @brecht for initial idea, and reviewing the patch.

Differential Revision: https://developer.blender.org/D6966
2020-03-05 10:58:58 +01:00
6665ce8951 Cleanup: Clarified comment
No functional changes.
2020-03-05 10:46:52 +01:00
e5f98c79b0 Fix T74431: EEVEE AO Render Pass
Missing code-path in recent refactoring.
2020-03-05 08:58:00 +01:00
a0ea0153c2 Addons: Allow a user manual url prefix in doc_url
This was raised in T74017, the issue being that we point to `/dev` 
version of the manual for the addons when we want to point to a specific 
version instead.

Instead of manually updating the URL every release we can do this.

The `bl_info` for addons will need to be updated in the format of 
`'doc_url': 
{BLENDER_MANUAL_URL}/addons/import_export/scene_gltf2.html",`

Differential Revision: https://developer.blender.org/D6995
2020-03-04 23:24:13 -05:00
Aaron Carlisle
ae223ff52b Addons: deprecate 'wiki_url'
When running with debug enabled ('-d' argument),
warnings are printed for add-ons which are not yet updated.

Reminder to name things based on what they do,
not the technologies they use :)
2020-03-05 11:45:22 +11:00
3da2dc8213 Fix RNA runtime warning from recent commit 2020-03-04 17:43:17 -05:00
337e861486 UI: Fluid: Fix wrong uses of enabled 2020-03-04 17:41:42 -05:00
6ab14d971c UI: Fluid: Viewport Display
Cleanup the order of properties and hide sub setting as they were 
confusing before.
2020-03-04 17:41:42 -05:00
bd0f5fa71f UI: Fluid Group Liquid/Gas Panels
Part of T73617

Differential Revision: https://developer.blender.org/D6994
2020-03-04 17:41:42 -05:00
55b465f976 UI: Fluid: Use updated preset UI
Part of T73617
2020-03-04 17:41:41 -05:00
1d18a2a5ec Fix Unreported: Error adding fluid presets 2020-03-04 17:41:41 -05:00
1da8ed2a97 Cleanup: redundant casts 2020-03-05 08:38:41 +11:00
2fb4de1f8c Cleanup: material API naming
- Use 'BKE_object_material_*', 'BKE_id_material_*' prefix
  for functions that operate on Object and ID types.
- Use '_len' suffix for length (matching BLI naming).
- Use '_p' suffix for functions that return a pointer to values
  where the value would typically be returned.

Functions renamed:

- BKE_object_material_resize      was BKE_material_resize_object
- BKE_object_material_remap       was BKE_material_remap_object
- BKE_object_material_remap_calc  was BKE_material_remap_object_calc

- BKE_object_material_array_p     was BKE_object_material_array
- BKE_object_material_len_p       was BKE_object_material_num
- BKE_id_material_array_p         was BKE_id_material_array
- BKE_id_material_len_p           was BKE_id_material_num

- BKE_id_material_resize          was BKE_material_resize_id
- BKE_id_material_append          was BKE_material_append_id
- BKE_id_material_pop             was BKE_material_pop_id
- BKE_id_material_clear           was BKE_material_clear_id
2020-03-05 08:21:31 +11:00
5b0f1e7649 Cleanup: formatting, strip trailing space 2020-03-05 08:05:21 +11:00
a297a6c444 Cleanup: replace unnecessary MEM_callocN calls
Use MEM_mallocN when memory is immediately copied over.
2020-03-05 07:59:34 +11:00
a5c4a44df6 Fluid: Bounding boxes for effector objects
This commit adds bounding box support for emission objects - similarly to flow objects. Before, each effector object had to iterate over the entire domain. Bake times of scenes with multiple obstacles improved significantly with this optimization.

Other improvements that were implemented alongside the bbox feature:
- Option for subframe sampling for effector objects
- Option to enable / disable effectors (can be animated)
- Optimization for static objects. If a flow or effector object does not move and the adaptive domain is not in use, the bake time will be optimized further by reusing the flow / effector grids from the previous frame (no recalculation).
2020-03-04 18:46:48 +01:00
3c74d45c9e Fluid: Added sanity grid initializations in smoke / liquid scripts
Just a sanity check.
2020-03-04 18:46:48 +01:00
8f1876b4f0 Fluid: Fix issue with fire emission
Fixes weird behavior at inflow regions. Issue was introduced with d6d44ccc77.
2020-03-04 18:46:48 +01:00
bf8a73b4a7 Fluid: Naming cleanup for flags grid
Use flags instead of obstacle to avoid confusion with obstacle levelset grid.
2020-03-04 18:46:48 +01:00
6958ec3f7f Fluid: Added an option to delete fluid inside obstacles
Simple checkbox that - if enabled - will tell the solver to clear density or liquid particles in obstacle cells.
2020-03-04 18:46:48 +01:00
b32fd73b24 Fluid: Optimization for extrapolation functions in smoke / liquid scripts
Too much extrapolation can become expensive. Reducing it here since extrapolating levelsets into a couple of cells should be sufficient.
2020-03-04 18:46:48 +01:00
2a4f350940 Fix T74434: Video Sequencer: Alt+ clicking (assign to all selected) does
not work for unlocking

Special case for when we do this on "lock":
- locked sequences are not in "selected_editable_sequences"
- use "selected_sequences" in that case

Maniphest Tasks: T74434

Differential Revision: https://developer.blender.org/D7023
2020-03-04 17:35:39 +01:00
765f2a1bca Fix T71578: knife tool draws some points incorrectly
D6417 by @fbessou
2020-03-04 16:48:37 +01:00
Julian Eisel
a22573e243 Build System: Add OpenXR-SDK dependency and WITH_XR_OPENXR build option
The OpenXR-SDK contains utilities for using the OpenXR standard
(https://www.khronos.org/openxr/). Namely C-headers and a so called
"loader" to manage runtime linking to OpenXR platforms ("runtimes")
installed on the user's system.

The WITH_XR_OPENXR build option is disabled by default for now, as there
is no code using it yet. On macOS it will remain disabled for now, it's
untested and there's no OpenXR runtime in sight for it.

Some points on the OpenXR-SDK dependency:
* The repository is located at
  https://github.com/KhronosGroup/OpenXR-SDK (Apache 2).
* Notes on updating the dependency:
  https://wiki.blender.org/wiki/Source/OpenXR_SDK_Dependency
* It contains a bunch of generated files, for which the sources are in a
  separate repository
  (https://github.com/KhronosGroup/OpenXR-SDK-Source).
* We could use that other repo by default, but I'd rather go with the
  simpler solution and allow people to opt in if they want advanced dev
  features.
* We currently use the OpenXR loader lib from it and the headers.
* To use the injected OpenXR API-layers from the SDK (e.g. API
  validation layers), the SDK needs to be compiled from this other
  repository.

The extra "XR_" prefix in the build option is to avoid mix-ups of OpenXR
with OpenEXR.

Most of this comes from the 2019 GSoC project, "Core Support of Virtual
Reality Headsets through OpenXR"
(https://wiki.blender.org/wiki/User:Severin/GSoC-2019/).

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

Reviewed by: Campbell Barton, Sergey Sharybin, Bastien Montagne, Ray
Molenkamp
2020-03-04 16:45:07 +01:00
e7f1de5e11 Cleanup: use MEM_recallocN_id utility function 2020-03-04 23:51:32 +11:00
f4463cd865 RNA: ensure missing calls to RNA_enum_item_end crash in debug mode
Would have prevented T74227 from slipping through
since it didn't crash on some systems.
2020-03-04 23:48:45 +11:00
d83c0969f6 Fix T74426: Crash in the IK Pose Brush preview with null preview chain
After switching tools, the active vertex can be the same and the cursor
won't update the previews, so the pose_ik_chain_preview will be null.
This often happens in low poly meshes where chances of hovering the same
vertex are high.

Reviewed By: sergey

Maniphest Tasks: T74426

Differential Revision: https://developer.blender.org/D7021
2020-03-04 12:24:02 +01:00
6706ae5712 Cleanup: spelling 2020-03-04 21:46:16 +11:00
4bfa256ea4 Refactor ID make local to use a single flag parameter.
Instead of using anonymous booleans flags, also allows to keep the same
behavior in all cases, without needing special handling from calling
code for our beloved oddballs object proxies...
2020-03-04 11:43:31 +01:00
4e597a5cff Cleanup: ID make local: remove id_in_bmain argument.
This info is now stored in ID tags themselves, so no need to pass an
extra anonymous boolean parameter around, yay!
2020-03-04 11:43:30 +01:00
76d8e8693f Cleanup: Rename 'make local' functions to new scheme.
Also removed some only used locally from the header, `BKE_lib_id.h`
is already way too big, no need to overload it with unused things.
2020-03-04 11:43:30 +01:00
Asad-ullah Khan
e4eede8318 UI: rename View Selected" to "Frame Selected"
Addresses T74331
2020-03-04 21:38:23 +11:00
9c62a8c8e5 Fix T73797: Selection/Editing after Make Single User for Object Data
fails

Exposed by rB50d5c03e2d14.

This was only a problem when _only_ 'Object Data' was made local.
If also e.g. 'Object' or 'Materials' was checked, these were already
making sure realations were updated [DEG_relations_tag_update(bmain)].

Now also call DEG_relations_tag_update(bmain) for the 'Object Data'
case.

I assume the underlying issue is that there is some ID_NEW_REMAP
happening in 'single_obdata_users()' -- including that for 'me-
>texcomesh', which might be responsible for the glitches in selection/
editing? Also not entirely sure why this wasnt a problem prior to
rB50d5c03e2d14.(I assume this was somewhat hidden by the fact this was
always called with a default action being nothing, the user would always
need to access the redo panel. So this might have been hidden by an Undo
step involved?)

Maniphest Tasks: T73797

Differential Revision: https://developer.blender.org/D7020
2020-03-04 11:27:56 +01:00
a9dc1f6d00 Cleanup: avoid the term old when storing/restoring context variables 2020-03-04 21:13:32 +11:00
fb330dd110 Cleanup: remove unused BLI_strncat_utf8
Behaves differently to strncat,
BLI_strncpy_utf8_rlen can be used for a similar purpose.
2020-03-04 15:24:06 +11:00
8931c4b18d Fix possible buffer overflow from incorrect 'strncat' use
The size argument is the maximum number of bytes to copy,
not the destination buffer size.

Replace with utility function that joins strings.
2020-03-04 15:17:04 +11:00
0baae18375 BLI_string_utils: add BLI_string_join_array_by_sep_char
Utility to join strings into a fixed size buffer.
2020-03-04 15:14:02 +11:00
38ed95fe8d Cleanup: replace CLAMP macros with functions 2020-03-04 11:31:51 +11:00
89b10b8d42 BLI_math: inline clamp functions
These are used in some per-pixel operations such as image sampling and
color conversion, where replacing existing macro use could add overhead.
2020-03-04 11:23:00 +11:00
a37dceb139 Cleanup: replace commented code with define check
Avoids duplicated comments,
also quiet warning accessing non-existing variable.
2020-03-04 11:05:08 +11:00
a5c984a57d Cleanup: cmake indentation 2020-03-04 11:02:35 +11:00
d09c5bdc28 CMake: make OpenVDB depend on OpenEXR
OpenVDB uses 'half' type & fails to link without it.
2020-03-04 10:39:53 +11:00
Tiago Chaves
14c9f64def BLI_math: add clamp_v# and clamp_v#_v#v# utility functions 2020-03-04 10:25:44 +11:00
31aefdeec5 Fix T72028: Crash switching to vertex paint
This would happen when done from editmode, on a mesh with any modifier,
after adding/removing geometry in editmode.

Similar to rBba0870713b9b (which did this for weightpaint and sculpt
already), ensure an evaluated depsgraph, otherwise
'runtime.mesh_deform_eval' would not be up to date causing problems
later.

Maniphest Tasks: T72028

Differential Revision: https://developer.blender.org/D7011
2020-03-03 19:38:40 +01:00
059f3c1a7e Modifiers: Wave add invert vgroup option
Adds the invert vgroup option to the Wave modifier.

Differential Revision: https://developer.blender.org/D6893
2020-03-03 18:41:50 +01:00
Brecht Van Lommel
2841b2be39 IDs: change FILTER_ID_* to 64 bit to make space for new ID types
And change file browser to boolean from bitflag enum, which is only 32 bit.

Differential Revision: https://developer.blender.org/D7004
2020-03-03 17:34:21 +01:00
Brecht Van Lommel
19785b96c4 IDs: modify wm.previews_clear operator to make space for new ID types
Use a regular enum, to avoid running out of bits.

Differential Revision: https://developer.blender.org/D7003
2020-03-03 17:22:30 +01:00
Brecht Van Lommel
0c603cffd1 RNA: support 64 bit boolean bitflags in DNA
This does not affect the RNA access API, since how the boolean is read from
DNA abstracted away in the API.

Differential Revision: https://developer.blender.org/D7002
2020-03-03 17:21:47 +01:00
78383f7a9f Fix: USD Build error on windows
USD is being included before the blender headers.

USD includes TBB, which includes the windows headers
which define rad2 as a constant conflicting with a field
with that exact name in the MetaElem dna struct.

Added `-DWIN32_LEAN_AND_MEAN` to keep the windows headers
from defining rad2.
2020-03-03 09:04:31 -07:00
daca00f187 Fix Snake Hook rake on rotated objects
It was missing this local space conversion before calculating the rake
angle.

Reviewed By: jbakker

Differential Revision: https://developer.blender.org/D7008
2020-03-03 16:16:34 +01:00
b39273c071 Fix hardness not resetting when using reset brush
Just add it to the list or properties to reset from DNA_brush_defaults

Reviewed By: jbakker

Differential Revision: https://developer.blender.org/D6992
2020-03-03 16:12:25 +01:00
4b2b5fe4b8 USD: Added support for exporting metaballs
Metaballs are exported as evaluated polygonal mesh.

USDExporterContext::depsgraph was made non-const to allow calling
`BKE_mesh_new_from_object()`. The alternative was to make the depsgraph
parameter of that function const, but that would be too intrusive as
that would require even more functions to accept a const depsgraph
pointer.
2020-03-03 15:34:58 +01:00
453be9cc8a Cleanup: USD, marked overridden function with override
No functional changes.
2020-03-03 15:34:58 +01:00
c60e5211d7 Cleanup: USD, removed unused code
Removed an unused forward declaration.

No functional changes.
2020-03-03 15:34:58 +01:00
594945eb01 Fix T71871: Quadriflow remesh operator don't stack operations
Made an explicit call to the exec function be a blocking call and a call
from invoke (or otherwise) be nonblocking.

Reviewed By: Bastien

Differential Revision: http://developer.blender.org/D7006
2020-03-03 15:30:29 +01:00
1ba4aa37c9 Remove the "use mesh curvature" option from quadriflow
It sometimes caused the solver to get into an seemingly unrecoverable
state and crash. Therefore I will disable this feature for now.
2020-03-03 15:30:29 +01:00
ed29ff944a Fix delaunay triangulation, bad indices for output faces.
If there were merged vertices, sometimes the output faces
had wrong vertex indices. Added a test for this, and fixed.
2020-03-03 08:41:26 -05:00
40343a76c5 Revert "Fix T74110: EEVEE Shadow Pass"
This reverts commit 403bb357ae.
The old implementation matches cycles closer. See T74378
2020-03-03 12:35:50 +01:00
ce2dc6ef2b Cleanup: formatting, spelling 2020-03-03 22:23:10 +11:00
582205c134 Subdiv: Fix/Workaround for surface partial derivatives
Both partial derivatives were evaluated to 0 for a special vertex on
Suzanne model: this is happening on a vertex where two adjacent faces
with 2 common edges are connected (in the nose of Suzanne).

This was breaking multires in this point since tangent matrix is all
zeroes, and hence no displacement can be applied in that vertex.
2020-03-03 12:01:46 +01:00
b454a12233 Separate operators (mesh/curve/armature/gpencil): take user preferences
into account for duplicating actions

Previously actions remained linked after duplication, now this is based
on the User Preferences (PreferencesEdit.use_duplicate_action).

note: default is ON here, so this changes default behavior of separate
operators.

First intuition was to respect _all_ preferences here (e.g. also
duplicating materials if chosen in the User Preferences) but after
consideration this is probably not what the User would expect from such
'modeling' opertions (e.g. separate by loose parts resulting in possibly
many duplicate materials)

Fixes T71038

Maniphest Tasks: T71038

Differential Revision: https://developer.blender.org/D6120
2020-03-03 10:01:20 +01:00
ee7034949f Fix bone envelopes displaying wrong when armature is scaled
Object Scale was not taken into account.

This lead to reports like T74247 where the user scaled the envelope
distance and radii to the supposedly right values inthe viewport, but
these were actually 'wrong' under the hood. Assigning weights from bone
envelopes seemed like it would fail, but this code would actually take
the armature scaling into account when checking envelope distance and
weight.

ref T74247

Maniphest Tasks: T74247

Differential Revision: https://developer.blender.org/D6964
2020-03-03 09:48:04 +01:00
d6fd092495 Fix T74375: grid levels theme preference reset to default 2020-03-03 09:29:19 +01:00
73bd0ef12d Fix dope sheet (Mask mode) keyframe editing not image/clip views
Every key-frame edit was updating all grease pencil & mask data-blocks.

Change the logic to only update edited data-blocks.
2020-03-03 16:53:32 +11:00
8447f45f09 Fix T74292: Dope sheet (Mask mode) keyframe editing misses update 2020-03-03 15:50:11 +11:00
7a875922e7 Cleanup: Use a utility function to obtain the bvh_cache 2020-03-03 00:40:15 -03:00
29716abcd1 Missed in the last commit 2020-03-03 00:20:25 -03:00
3e1aa6cbf3 Transform Snap: Clear 'SnapObjectData' after changes in the geometry
Differential Revision: https://developer.blender.org/D6927
2020-03-03 00:08:16 -03:00
a976fe42ef Revert "Transform Snap: Clear 'SnapObjectData' after changes in the geometry"
This reverts commit fe7c4fb4a2.

It does not work because `mesh_eval_cage` and `mesh_eval_final` always is `NULL` in this case.
2020-03-02 22:12:46 -03:00
c549a9dd46 Fix error parsing XDG path values
Own error in recent changes to parsing.
2020-03-03 11:14:39 +11:00
fe7c4fb4a2 Transform Snap: Clear 'SnapObjectData' after changes in the geometry
Differential Revision: https://developer.blender.org/D6927
2020-03-02 20:59:11 -03:00
5a77748e47 Fix T74377: Weld Modifier destroys vertex groups
Differential Revision: https://developer.blender.org/D6997
2020-03-02 18:44:58 -03:00
98c74c6a6e Fix: Excessive (re)builds of subprojects
Recent refactor external dependencies handling (D6642)
improperly linked all library dependencies with public
linkage rather than interface linkage. Causing excessive
(re)builds of subprojects when not needed.

This patch restores the interface linkage.

Reviewed By: brecht sergey

Differential Revision: https://developer.blender.org/D6983
2020-03-02 12:42:01 -07:00
Stefan Werner
409074aae5 Cycles: add Progressive Multi-Jitter sampling pattern
This sampling pattern is particularly suited to adaptive sampling, and will
be used for that upcoming feature.

Based on "Progressive Multi-Jittered Sample Sequences" by Per Christensen,
Andrew Kensler and Charlie Kilpatrick.

Ref D4686
2020-03-02 16:35:52 +01:00
Valentin
7b8db971d4 Cleanup: Use generics properties for arrow keys navigation (walk-select)
This patch refactors arrow keys navigation to move properties and enum
to generic ED_select_utils.h and property to
WM_operator_properties_select_walk_direction()

No functional change

Reviewed By: Julian Eisel

Differential Revision: https://developer.blender.org/D4771
2020-03-02 16:07:34 +01:00
51bce18b6f Cleanup: make blf header work in C++ 2020-03-02 15:34:17 +01:00
f48b46860b Cleanup: make remaining gpu headers work in C++ 2020-03-02 15:29:09 +01:00
360443a483 Fix T74278: Light, Image Object, and Compositor Backdrop Viewer Node
gizmos are too big

Caused by rB9cac5fa681c5 which fixed the handles for the camera border
gizmo (being much too small)-- which in turn was broken by
rB98e4fbc7cc9e.

Camera border gizmo sets up its matrix_space a bit differently [this is
why we are getting very small values in gizmo_calc_rect_view_scale --
needs more investigation], but instead of breaking it for Light, Image
and Compositor Backdrop, lets just compensate by scaling the Camera
Border Gizmo for now.

Maniphest Tasks: T74278

Differential Revision: https://developer.blender.org/D6991
2020-03-02 15:21:07 +01:00
d8198b27df Cleanup: make remaining imbuf headers work in C++ 2020-03-02 15:20:13 +01:00
680b70f093 Cleanup: make remaining editor include headers work in C++ 2020-03-02 15:09:10 +01:00
5de56f9596 Cleanup: make remaining blenkernel headers work in C++ 2020-03-02 15:07:49 +01:00
cf93b65a65 Cleanup: make remaining blenlib headers work in C++
Differential Revision: https://developer.blender.org/D6988

Reviewers: brecht
2020-03-02 15:05:15 +01:00
Ish Bosamiya
5afa4b1dc8 Fix T65568: sewing and self collision issue
As explained in T65568 by @LucaRood, the self collision system should exclude triangles that are connected by sewing springs.

Differential Revision: https://developer.blender.org/D6911
2020-03-02 11:02:26 -03:00
1648a79036 Fix T74295: Cloth + Internal springs crashes on a non-polygonal geometry
Added check to see if the mesh has any polygons at all.
If there are no polygons, the bvh tree data will consist of null
pointers, so skip internal springs if this is the case.
2020-03-02 15:02:24 +01:00
9c4523b1fd Fix crash when compiling renderpass shader on some AMD drivers
Differential Revision: https://developer.blender.org/D6959
2020-03-02 10:33:45 -03:00
847c091ae8 Shading: Add invert option to Vector Rotate Node
Checkbox to invert rotation angle, suggested by @simonthommes

Differential Revision: https://developer.blender.org/D6932
2020-03-02 12:49:19 +00:00
493c99078a Fix T74362: Material Preview Assert
When using Material Previews not all uniform blocks were filled. This
patch will add the renderpass_block when drawing the background.

Note that I wasn't able to reproduce the issue on my system, but
according the the backtrace it most likely solves the issue. I let the
reporter test.
2020-03-02 13:47:52 +01:00
6fa4581d92 Fix T74334: VSE can't import multiple movie files
Add `directory` RNA property to add operators.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D6986
2020-03-02 13:16:01 +01:00
bd25df3d68 Fix T74335: Text.use_module "Online Manual" leads to TextCurve pages. 2020-03-02 12:05:07 +01:00
c930cd7450 Clay Thumb: Remove hardcoded hardness value
Clay Thumb was using a custom hardness implementation and value to make
it functional. Hardness is now a property of brushes and it is
implemented for all brushes, so this is no longer needed.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D6981
2020-03-02 11:54:54 +01:00
94937984b0 Cleanup: Correct forward declaration 2020-03-02 10:17:38 +01:00
e0ffb911a2 Fix T74299: PyGPUOffscreen Color Management
Color management currently happens after the python handlers. This means
that all common drawing operations needs to happen in SRS. The
PyGPUOffscreen requested that the color management was applied, that
resulted into applying colormanagement twice.

This patch makes sure that PyGPUOffscreen.draw_view3d renders in SRS.
There are more code paths that needs to be checked that the correct
space is being requested.
2020-03-02 09:24:06 +01:00
f78ca97cfc Bevel: Z-Up Custom Profile Orientation
When beveling architectural objects like baseboards or crown mouldings that
may consist of multiple	islands, it's useful if	the orientation	is at least
conistent.

This changes the arbitrary decision of how the orientation should start	at a
chain beginning to use the highest side of the profile in the Z direction.

Reviewed By: howardt

Differential Revision: https://developer.blender.org/D6946
2020-03-01 22:21:51 -06:00
e9e4f6af9e Fix T74320: Sound strip waveforms drawing allows negative volume values
While animating sound strips volume within the graph editor, it is possible to set keyframes to negative values.
The drawing code of waveforms wasn't clamping these values to zero and was instead drawing an "inverted" curve

Author: a.monti

Reviewed By: iss

Differential Revision: https://developer.blender.org/D6971
2020-03-02 02:49:35 +01:00
eaf0528749 Fix .arcconfig not working with latest arcanist version 2020-03-01 22:35:31 +01:00
3db948cffe Fix: Build error on windows.
Use of undefined GSQueue type was causing build errors.
2020-03-01 13:59:51 -07:00
Pablo Dobarro
ff0124418f Sculpt: Hardness brush property
The hardness property moves the brush falloff towards the edges, making
the brush sharper.

This should be the intended way to control the brush falloff instead of
tweaking the falloff curve manually, as it can be mapped to pressure to
make the falloff variable during the stroke.
It is also a good idea to show in the UI that the custom curves is an
advance features and it should almost never be modified when sculpting/
painting unless you want to create some advanced effects. By modifying
the curves freely it is really easy to break the brushes and make them
produce artifacts. This needs to be done in a later after merging the
pending projects to reorganize all the brush properties accordingly.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D6902
2020-03-01 20:05:58 +01:00
fc7fdc5c4e Cleanup: Move pose brush to its own file
Reviewed By: brecht

Differential Revision: https://developer.blender.org/D6973
2020-03-01 19:54:31 +01:00
Pablo Dobarro
233158b555 Fix T74307: Add missing brushes to versioning_defaults
At least a brush under each tool needs to exist by default in the blend
file to reset its properties. If it does not exist, the user needs to
reset it manually.

Reviewed By: brecht

Maniphest Tasks: T74307

Differential Revision: https://developer.blender.org/D6972
2020-03-01 19:37:49 +01:00
Pablo Dobarro
3c9956a3ac Fix T73707: Missing mesh normals update on sculpt undo
When sculpting on multi user data normals needs to be recalculated to
avoid artifacts. I refactored that line to make it more readable.

Reviewed By: brecht

Maniphest Tasks: T73707

Differential Revision: https://developer.blender.org/D6957
2020-03-01 19:35:50 +01:00
Pablo Dobarro
a489d77c5b Fix T74074: Strokes with timer events don't get pressure values
When processing a timer event WM_event_tablet_data returns 0 instead of
the last valid pressure value from the tablet. This always stores the
last pressure value and uses it in case a timer event is being
processed.

Reviewed By: brecht

Maniphest Tasks: T74074

Differential Revision: https://developer.blender.org/D6950
2020-03-01 19:32:01 +01:00
Pablo Dobarro
c04c5ac4f6 Fix T73947: Support radial symmetry in Multiplane Scrape
This includes the following changes:
- Use always the angle stored in the StrokeCache when deforming
- Interpolate between the previous and the new sampled angles
- Calculate the cursor matrix only on the 0 radial symmetry iteration

Reviewed By: brecht

Maniphest Tasks: T73947

Differential Revision: https://developer.blender.org/D6901
2020-03-01 19:29:10 +01:00
f2557d137a Fix problem with Delaunay triangulalation re output mapping.
The array giving original vertex indices should not contain
entries for newly created vertices. Added a test to check this.
2020-03-01 12:25:44 -05:00
Peter Fog
38058833f1 UI: harmonize strip colors in video sequencer
Now only the hue is different between different strip types, with the
saturation the same for all.

Differential Revision: https://developer.blender.org/D6775
2020-03-01 16:20:44 +01:00
Phillip Thomas
6a6ccb26ec Build: show draco library under extern folder in Visual Studio
And other code tweaks to make this library more consistent with others.

Differential Revision: https://developer.blender.org/D6864
2020-03-01 16:19:37 +01:00
24ef1cf07e Fix show large cursor preference not being fully removed and causing warnings 2020-03-01 16:15:25 +01:00
Yevgeny Makarov
821ecbe805 UI: make Save Custom Studio Light pop-ups less wide
Differential Revision: https://developer.blender.org/D6977
2020-03-01 16:09:57 +01:00
Yevgeny Makarov
0373e300ea UI: use dedicated icons for topbar and statusbar in theme preferences
Differential Revision: https://developer.blender.org/D6978
2020-03-01 16:09:26 +01:00
22a8a3b214 Apply patch D6620, Adde tests for Deform modifiers.
This test is authored by Himanshi Kalra (calra).
It requires a new modifers.blend in the svn tests.
2020-02-29 14:07:14 -05:00
cb8b424c6b Made BLI_delaunay_2d_cdt_calc better at tiny feature elimination.
The 'random' unit tests and some examples from the new boolean code
triggered asserts and crashes. This fixes those.
There is a new flag in the input that optionally disables a pass
over input to snap segment edges to other segments.
2020-02-29 13:26:27 -05:00
a52eb7489f Cleanup: Move transform_constraints declarations to its own header 2020-02-28 21:25:47 -03:00
85f980c517 UI: Remove Support for Large Cursors
Removing the 'Large Cursors' option as it is no longer applicable or useful on any platform.

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

Reviewed by Brecht Van Lommel
2020-02-28 08:45:17 -08:00
4a373afa5f Sculpt: Cloth brush
This brush has a simple physics solver that helps when sculpting cloth.

- The mass and the damping properties of the simulation are properties of the brush.
- It has two additional radius control to limit the influence and falloff of the simulation.
- Masked vertices are pinned in the simulation, and it applies the sculpt gravity directly in the solver.
- The Cloth Brush has 7 deformation modes with 2 falloff types (radial and plane).

The brush can create the constraints only on the required PBVH nodes, so the simulation is isolated on high poly meshes. As long
as the brush size is not too big it should be possible to keep it real time.

Known issues:
- The way constraints are created is extremely basic and it creates repeated constraints. Maybe there is another way to create fewer constraints while keeping the simulation quality decent. This part can also be multithreaded. (As it is it works ok, but it could be better)

Reviewed By: jbakker

Differential Revision: https://developer.blender.org/D6715
2020-02-28 17:03:20 +01:00
793135e190 Fix wrong coordinates being read when using the sculpt API
The coordinates should be read from the PBVH when using deform modifiers.
This is needed for the cloth brush to work with subdivisions, as it reads the
vertex coordinates using this function when building and updating the
constraints.

Reviewed By: jbakker

Differential Revision: https://developer.blender.org/D6967
2020-02-28 16:53:34 +01:00
bc2ce31d79 Fluid: Improved behavior at open boundaries
Use greater boundary width for smoke simulations
2020-02-28 16:20:13 +01:00
21bdeb5cc0 Fluid: Updated Manta pp files
Updates include:
- std::move() cleanup in rcmatrix.h
- Enabled parallelization for fluid guiding (fairly noticeable speed improvement).
- More flexible flags setter function with control over boundary width.
2020-02-28 16:20:13 +01:00
af54bbd61c Cycles: Rework tile scheduling for denoising
This fixes denoising being delayed until after all rendering has finished. Instead, tile-based
denoising is now part of the "RENDER" task again, so that it is all in one task and does not
cause issues with dedicated task pools where tasks are serialized.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D6940
2020-02-28 16:12:29 +01:00
03e04d4db7 Cleanup: clang-format 2020-02-28 16:04:15 +01:00
Yevgeny Makarov
fe3ce61528 Fix T65351: visual glitches when scrolling in popovers 2020-02-28 16:03:53 +01:00
0cea9353fd Fix CUDA out of memory error with OptiX viewport denoising on small GPUs
This makes the memory allocation for the denoiser state use the memory allocator in Cycles, which
will evict textures to host memory when there is not enough space on the device. This means the
allocation for the denoiser state won't just fail if there is no more space and instead more space is
made for it to work. Also simplifies code somewhat.
2020-02-28 15:58:17 +01:00
Yevgeny Makarov
27fa33c143 Fix T72404: particle brush size radial control mismatch on high DPI display 2020-02-28 15:55:51 +01:00
498397f7bd Fix (unreported) Separate bones creates empty armature
Fix for fix (rB8bf7ca9fe31c).
The fix was not actually working [neither for multi-armature-editing as
intended nor for single armatures] and it broke single-armature bone
separation completely.

More or less indentation issue, move relevant code out of bone loop, do
after all bones have been checked, guess this was intended anyways.

Differential Revision: https://developer.blender.org/D6949
2020-02-28 15:26:57 +01:00
4c83e6bac0 Fix T71611: Outliner - Show only Visible/Hidden Objects not working when hiding Collections
Use BASE_VISIBLE_VIEWLAYER (rather than BASE_VISIBLE_DEPSGRAPH -- which
is not including the 'Hide in Viewport')

Note: the is one case where this still 'fails':
- 'Show only Hidden' plus excluding the parent collection (would be nice
to show those -- but contents of excluded excluded collections dont get
show in any case... this would be more work and for another report...)

Maniphest Tasks: T71611

Differential Revision: https://developer.blender.org/D6953
2020-02-28 15:20:59 +01:00
94dcfe7a77 Preview Render: Disable Unneeded Render Passes 2020-02-28 14:46:40 +01:00
e8ab0137f8 File Browser: Add Ctrl+F shortcut to activate filter textbox
Reviewers: Severin, brecht

Differential Revision: https://developer.blender.org/D6941
2020-02-28 14:34:56 +01:00
e0f41d32c9 Code Cleanup: UNDEF not existing define 2020-02-28 14:31:46 +01:00
bcac081ad5 OpenSubdiv: Allow less topology callbacks assigned
Useful for cases when topology does not need to have any
crease or UV layers. Now instead of assigning callbacks
which returns zero data is possible to simply assign the
callback itself to NULL.
2020-02-28 14:30:49 +01:00
95d0e04ed1 BLI: fix utf8 character counting when there is an incomplete utf8 char
D6923 by Kim Geonwoo
2020-02-28 14:26:07 +01:00
Pawel Franitza
2269759fdf UI: add theme option for grid levels to display in node editor background
Differential Revision: https://developer.blender.org/D6916
2020-02-28 14:11:48 +01:00
Yevgeny Makarov
e287122af6 UI: improve label text colors in save and security popups
This adds a utility functions to draw a label highlighted or in red.

Differential Revision: https://developer.blender.org/D6934
2020-02-28 13:57:32 +01:00
Brecht Van Lommel
318112379d Objects: make evaluated data runtime storage usable for types other than mesh
This is in preparation of new object types. This only changes mesh_eval, we
may do the same for mesh_deform_eval and other areas in the future if there is
a need for it.

This previously caused a bug in T74283, that should be fixed now.

Differential Revision: https://developer.blender.org/D6695
2020-02-28 13:49:35 +01:00
c60be37f3e Nodes: Use destructor callbacks for bNodeSocketType and bNodeType
Reviewers: brecht

Differential Revision: https://developer.blender.org/D6963
2020-02-28 13:28:16 +01:00
da1140f75e Revert "Objects: make evaluated data runtime storage usable for types other than mesh"
This reverts commit f2b95b9eae.

Fix T74283: modifier display lost when moving object in edit mode.

The cause is not immediately obvious so better to revert and look at this
carefully.
2020-02-28 13:01:02 +01:00
7a8a074a30 Multires: Move current reshaping/propagation logic to legacy file
It will eventually rewritten.
This commit prepares some clean space to start this process.

So far no functional changes.
2020-02-28 12:42:27 +01:00
Tobias Langen
8e8b4ec3a3 Fix T73587: Wrong sub-panel animation on double-click
Under the special circumstance of double clicking and then opening a
panel with sub-panels again, the parent panel's offset in y-direction
was added twice to the child panels: once inside "get_panel_real_ofsy"
and once within "align_sub_panels".
This introduced a visible glitch.

Reviewed by: Julian Eisel

Differential Revision: https://developer.blender.org/D6942
2020-02-28 12:39:11 +01:00
1eb73d1596 Multires: Fix CCG->MDISPS conversion happens twice
Was happening when leaving sculpt mode, introducing unnecessary lag
to the operation.
2020-02-28 12:24:26 +01:00
944da82eaf Multires: Cleanup, use early return 2020-02-28 12:24:26 +01:00
feead324fd Multires: Cleanup, naming 2020-02-28 12:24:26 +01:00
Julian Eisel
d9c25f0192 UI: Move menu shadow theme options next to each other
For some reason they were separated, even though they are closely
related.
2020-02-28 11:36:25 +01:00
9a855f94fc Cleanup: Spelling 2020-02-28 10:12:08 +01:00
4c4d36c25e Subdiv: Correct corner passed to foreach_loop callback
Was affecting quad faces. where 0 was always passed for inner
loops and a wrong one for boundary ones.

In the current code this change shouldn't cause any difference
since the corner index is ignored in the actual callback, but
it is required to have his fixed for an upcoming changes.
2020-02-28 10:12:08 +01:00
3686 changed files with 224491 additions and 145854 deletions

View File

@@ -1,6 +1,7 @@
{
"project_id" : "Blender",
"conduit_uri" : "https://developer.blender.org/",
"phabricator.uri" : "https://developer.blender.org/",
"git.default-relative-commit" : "origin/master",
"arc.land.update.default" : "rebase",
"arc.land.onto.default" : "master"

View File

@@ -132,9 +132,7 @@ PenaltyBreakAssignment: 100
AllowShortFunctionsOnASingleLine: None
# Disable for now since it complicates initial migration tests,
# TODO: look into enabling this in the future.
SortIncludes: false
SortIncludes: true
# Don't right align escaped newlines to the right because we have a wide default
AlignEscapedNewlines: DontAlign
@@ -193,6 +191,7 @@ ForEachMacros:
- FOREACH_MAIN_ID_BEGIN
- FOREACH_MAIN_LISTBASE_BEGIN
- FOREACH_MAIN_LISTBASE_ID_BEGIN
- FOREACH_MESH_BUFFER_CACHE
- FOREACH_NODETREE_BEGIN
- FOREACH_OBJECT_BEGIN
- FOREACH_OBJECT_FLAG_BEGIN
@@ -215,6 +214,7 @@ ForEachMacros:
- GHASH_ITER_INDEX
- GPU_SELECT_LOAD_IF_PICKSEL_LIST
- GP_EDITABLE_STROKES_BEGIN
- GP_EVALUATED_STROKES_BEGIN
- GSET_FOREACH_BEGIN
- GSET_ITER
- GSET_ITER_INDEX
@@ -238,7 +238,6 @@ ForEachMacros:
- LISTBASE_FOREACH_BACKWARD
- LISTBASE_FOREACH_MUTABLE
- LISTBASE_FOREACH_BACKWARD_MUTABLE
- MAN2D_ITER_AXES_BEGIN
- MAN_ITER_AXES_BEGIN
- NODE_INSTANCE_HASH_ITER
- NODE_SOCKET_TYPES_BEGIN
@@ -246,13 +245,22 @@ ForEachMacros:
- NODE_TYPES_BEGIN
- PIXEL_LOOPER_BEGIN
- PIXEL_LOOPER_BEGIN_CHANNELS
- RENDER_PASS_ITER_BEGIN
- RNA_BEGIN
- RNA_PROP_BEGIN
- RNA_STRUCT_BEGIN
- RNA_STRUCT_BEGIN_SKIP_RNA_TYPE
- SCULPT_VERTEX_DUPLICATES_AND_NEIGHBORS_ITER_BEGIN
- SCULPT_VERTEX_NEIGHBORS_ITER_BEGIN
- SEQP_BEGIN
- SEQ_BEGIN
- SURFACE_QUAD_ITER_BEGIN
- foreach
- ED_screen_areas_iter
- SLOT_PROBING_BEGIN
- SET_SLOT_PROBING_BEGIN
- MAP_SLOT_PROBING_BEGIN
- VECTOR_SET_SLOT_PROBING_BEGIN
# Use once we bump the minimum version to version 8.
# # Without this string literals that in-line 'STRINGIFY' behave strangely (a bug?).

View File

@@ -138,11 +138,6 @@ get_blender_version()
#-----------------------------------------------------------------------------
# Options
# First platform specific non-cached vars
if(UNIX AND NOT (APPLE OR HAIKU))
set(WITH_X11 ON)
endif()
# Blender internal features
option(WITH_BLENDER "Build blender (disable to build only the blender player)" ON)
mark_as_advanced(WITH_BLENDER)
@@ -180,6 +175,14 @@ option(WITH_BULLET "Enable Bullet (Physics Engine)" ON)
option(WITH_SYSTEM_BULLET "Use the systems bullet library (currently unsupported due to missing features in upstream!)" )
mark_as_advanced(WITH_SYSTEM_BULLET)
option(WITH_OPENCOLORIO "Enable OpenColorIO color management" ON)
if(APPLE)
# There's no OpenXR runtime in sight for macOS, neither is code well
# tested there -> disable it by default.
option(WITH_XR_OPENXR "Enable VR features through the OpenXR specification" OFF)
mark_as_advanced(WITH_XR_OPENXR)
else()
option(WITH_XR_OPENXR "Enable VR features through the OpenXR specification" ON)
endif()
# Compositor
option(WITH_COMPOSITOR "Enable the tile based nodal compositor" ON)
@@ -199,7 +202,15 @@ mark_as_advanced(WITH_GHOST_DEBUG)
option(WITH_GHOST_SDL "Enable building Blender against SDL for windowing rather than the native APIs" OFF)
mark_as_advanced(WITH_GHOST_SDL)
if(WITH_X11)
if(UNIX AND NOT (APPLE OR HAIKU))
option(WITH_GHOST_X11 "Enable building Blender against X11 for windowing" ON)
mark_as_advanced(WITH_GHOST_X11)
option(WITH_GHOST_WAYLAND "Enable building Blender against Wayland for windowing (under development)" OFF)
mark_as_advanced(WITH_GHOST_WAYLAND)
endif()
if(WITH_GHOST_X11)
option(WITH_GHOST_XDND "Enable drag'n'drop support on X11 using XDND protocol" ON)
endif()
@@ -224,7 +235,7 @@ if(UNIX AND NOT APPLE)
mark_as_advanced(WITH_OPENMP_STATIC)
endif()
if(WITH_X11)
if(WITH_GHOST_X11)
option(WITH_X11_XINPUT "Enable X11 Xinput (tablet support and unicode input)" ON)
option(WITH_X11_XF86VMODE "Enable X11 video mode switching" ON)
option(WITH_X11_XFIXES "Enable X11 XWayland cursor warping workaround" ON)
@@ -270,7 +281,7 @@ option(WITH_ALEMBIC "Enable Alembic Support" ON)
option(WITH_ALEMBIC_HDF5 "Enable Legacy Alembic Support (not officially supported)" OFF)
# Universal Scene Description support
option(WITH_USD "Enable Universal Scene Description (USD) Support" OFF)
option(WITH_USD "Enable Universal Scene Description (USD) Support" ON)
# 3D format support
# Disable opencollada when we don't have precompiled libs
@@ -311,6 +322,14 @@ mark_as_advanced(WITH_SYSTEM_GLOG)
# Freestyle
option(WITH_FREESTYLE "Enable Freestyle (advanced edges rendering)" ON)
# New object types
option(WITH_NEW_OBJECT_TYPES "Enable new hair and pointcloud objects (use for development only, don't save in files)" OFF)
mark_as_advanced(WITH_NEW_OBJECT_TYPES)
# New simulation data block
option(WITH_NEW_SIMULATION_TYPE "Enable simulation data block (use for development only, don't save in files)" OFF)
mark_as_advanced(WITH_NEW_SIMULATION_TYPE)
# Misc
if(WIN32)
option(WITH_INPUT_IME "Enable Input Method Editor (IME) for complex Asian character input" ON)
@@ -417,6 +436,8 @@ endif()
option(WITH_GTESTS "Enable GTest unit testing" OFF)
option(WITH_OPENGL_RENDER_TESTS "Enable OpenGL render related unit testing (Experimental)" OFF)
option(WITH_OPENGL_DRAW_TESTS "Enable OpenGL UI drawing related unit testing (Experimental)" OFF)
set(TEST_PYTHON_EXE "" CACHE PATH "Python executable to run unit tests")
mark_as_advanced(TEST_PYTHON_EXE)
# Documentation
if(UNIX AND NOT APPLE)
@@ -457,6 +478,8 @@ endif()
if(CMAKE_COMPILER_IS_GNUCC)
option(WITH_LINKER_GOLD "Use ld.gold linker which is usually faster than ld.bfd" ON)
mark_as_advanced(WITH_LINKER_GOLD)
option(WITH_LINKER_LLD "Use ld.lld linker which is usually faster than ld.gold" OFF)
mark_as_advanced(WITH_LINKER_LLD)
endif()
if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_C_COMPILER_ID MATCHES "Clang")
@@ -520,6 +543,15 @@ if(WIN32)
option(WITH_WINDOWS_BUNDLE_CRT "Bundle the C runtime for install free distribution." ON)
mark_as_advanced(WITH_WINDOWS_BUNDLE_CRT)
option(WITH_WINDOWS_SCCACHE "Use sccache to speed up builds (Ninja builder only)" OFF)
mark_as_advanced(WITH_WINDOWS_SCCACHE)
option(WITH_WINDOWS_PDB "Generate a pdb file for client side stacktraces" ON)
mark_as_advanced(WITH_WINDOWS_PDB)
option(WITH_WINDOWS_STRIPPED_PDB "Use a stripped PDB file" On)
mark_as_advanced(WITH_WINDOWS_STRIPPED_PDB)
endif()
# The following only works with the Ninja generator in CMake >= 3.0.
@@ -596,12 +628,6 @@ if(WITH_PYTHON_MODULE AND WITH_PYTHON_INSTALL)
message(FATAL_ERROR "WITH_PYTHON_MODULE requires WITH_PYTHON_INSTALL to be OFF")
endif()
# may as well build python module without a UI
if(WITH_PYTHON_MODULE)
set(WITH_HEADLESS ON)
endif()
if(NOT WITH_PYTHON)
set(WITH_CYCLES OFF)
set(WITH_DRACO OFF)
@@ -621,9 +647,10 @@ set_and_warn_dependency(WITH_BOOST WITH_OPENVDB OFF)
set_and_warn_dependency(WITH_BOOST WITH_OPENCOLORIO OFF)
set_and_warn_dependency(WITH_BOOST WITH_QUADRIFLOW OFF)
set_and_warn_dependency(WITH_BOOST WITH_USD OFF)
set_and_warn_dependency(WITH_BOOST WITH_ALEMBIC OFF)
if(WITH_BOOST AND NOT (WITH_CYCLES OR WITH_OPENIMAGEIO OR WITH_INTERNATIONAL OR
WITH_OPENVDB OR WITH_OPENCOLORIO OR WITH_USD))
WITH_OPENVDB OR WITH_OPENCOLORIO OR WITH_USD OR WITH_ALEMBIC))
message(STATUS "No dependencies need 'WITH_BOOST' forcing WITH_BOOST=OFF")
set(WITH_BOOST OFF)
endif()
@@ -633,6 +660,9 @@ set_and_warn_dependency(WITH_TBB WITH_OPENIMAGEDENOISE OFF)
set_and_warn_dependency(WITH_TBB WITH_OPENVDB OFF)
set_and_warn_dependency(WITH_TBB WITH_MOD_FLUID OFF)
# OpenVDB uses 'half' type from OpenEXR & fails to link without OpenEXR enabled.
set_and_warn_dependency(WITH_IMAGE_OPENEXR WITH_OPENVDB OFF)
# auto enable openimageio for cycles
if(WITH_CYCLES)
set(WITH_OPENIMAGEIO ON)
@@ -662,13 +692,15 @@ if(WITH_INSTALL_PORTABLE)
endif()
if(WITH_GHOST_SDL OR WITH_HEADLESS)
set(WITH_X11 OFF)
set(WITH_GHOST_WAYLAND OFF)
set(WITH_GHOST_X11 OFF)
set(WITH_X11_XINPUT OFF)
set(WITH_X11_XF86VMODE OFF)
set(WITH_X11_XFIXES OFF)
set(WITH_X11_ALPHA OFF)
set(WITH_GHOST_XDND OFF)
set(WITH_INPUT_IME OFF)
set(WITH_XR_OPENXR OFF)
endif()
if(WITH_CPU_SSE)
@@ -1695,11 +1727,13 @@ if(FIRST_RUN)
info_cfg_option(WITH_CYCLES)
info_cfg_option(WITH_FREESTYLE)
info_cfg_option(WITH_OPENCOLORIO)
info_cfg_option(WITH_XR_OPENXR)
info_cfg_option(WITH_OPENIMAGEDENOISE)
info_cfg_option(WITH_OPENVDB)
info_cfg_option(WITH_ALEMBIC)
info_cfg_option(WITH_QUADRIFLOW)
info_cfg_option(WITH_USD)
info_cfg_option(WITH_TBB)
info_cfg_text("Compiler Options:")
info_cfg_option(WITH_BUILDINFO)

View File

@@ -32,6 +32,7 @@ Convenience Targets
* debug: Build a debug binary.
* full: Enable all supported dependencies & options.
* lite: Disable non essential features for a smaller binary and faster build.
* release Complete build with all options enabled including CUDA and Optix, matching the releases on blender.org
* headless: Build without an interface (renderfarm or server automation).
* cycles: Build Cycles standalone only, without Blender.
* bpy: Build as a python module which can be loaded from python directly.
@@ -71,17 +72,6 @@ Testing Targets
which are tagged to use the stricter formatting
* test_deprecated:
Checks for deprecation tags in our code which may need to be removed
* test_style_c:
Checks C/C++ conforms with blenders style guide:
https://wiki.blender.org/wiki/Source/Code_Style
* test_style_c_qtc:
Same as test_style but outputs QtCreator tasks format
* test_style_osl:
Checks OpenShadingLanguage conforms with blenders style guide:
https://wiki.blender.org/wiki/Source/Code_Style
* test_style_osl_qtc:
Checks OpenShadingLanguage conforms with blenders style guide:
https://wiki.blender.org/wiki/Source/Code_Style
Static Source Code Checking
Not associated with building Blender.
@@ -218,6 +208,10 @@ ifneq "$(findstring lite, $(MAKECMDGOALS))" ""
BUILD_DIR:=$(BUILD_DIR)_lite
CMAKE_CONFIG_ARGS:=-C"$(BLENDER_DIR)/build_files/cmake/config/blender_lite.cmake" $(CMAKE_CONFIG_ARGS)
endif
ifneq "$(findstring release, $(MAKECMDGOALS))" ""
BUILD_DIR:=$(BUILD_DIR)_release
CMAKE_CONFIG_ARGS:=-C"$(BLENDER_DIR)/build_files/cmake/config/blender_release.cmake" $(CMAKE_CONFIG_ARGS)
endif
ifneq "$(findstring cycles, $(MAKECMDGOALS))" ""
BUILD_DIR:=$(BUILD_DIR)_cycles
CMAKE_CONFIG_ARGS:=-C"$(BLENDER_DIR)/build_files/cmake/config/cycles_standalone.cmake" $(CMAKE_CONFIG_ARGS)
@@ -328,6 +322,7 @@ all: .FORCE
debug: all
full: all
lite: all
release: all
cycles: all
headless: all
bpy: all
@@ -402,45 +397,6 @@ test_cmake: .FORCE
test_deprecated: .FORCE
$(PYTHON) tests/check_deprecated.py
test_style_c: .FORCE
# run our own checks on C/C++ style
PYTHONIOENCODING=utf_8 $(PYTHON) \
"$(BLENDER_DIR)/source/tools/check_source/check_style_c.py" \
"$(BLENDER_DIR)/source/blender" \
"$(BLENDER_DIR)/source/creator" \
--no-length-check
test_style_c_qtc: .FORCE
# run our own checks on C/C++ style
USE_QTC_TASK=1 \
PYTHONIOENCODING=utf_8 $(PYTHON) \
"$(BLENDER_DIR)/source/tools/check_source/check_style_c.py" \
"$(BLENDER_DIR)/source/blender" \
"$(BLENDER_DIR)/source/creator" \
--no-length-check \
> \
"$(BLENDER_DIR)/test_style.tasks"
@echo "written: test_style.tasks"
test_style_osl: .FORCE
# run our own checks on C/C++ style
PYTHONIOENCODING=utf_8 $(PYTHON) \
"$(BLENDER_DIR)/source/tools/check_source/check_style_c.py" \
"$(BLENDER_DIR)/intern/cycles/kernel/shaders" \
"$(BLENDER_DIR)/release/scripts/templates_osl"
test_style_osl_qtc: .FORCE
# run our own checks on C/C++ style
USE_QTC_TASK=1 \
PYTHONIOENCODING=utf_8 $(PYTHON) \
"$(BLENDER_DIR)/source/tools/check_source/check_style_c.py" \
"$(BLENDER_DIR)/intern/cycles/kernel/shaders" \
"$(BLENDER_DIR)/release/scripts/templates_osl" \
> \
"$(BLENDER_DIR)/test_style.tasks"
@echo "written: test_style.tasks"
# -----------------------------------------------------------------------------
# Project Files

View File

@@ -99,6 +99,7 @@ else()
endif()
include(cmake/openimagedenoise.cmake)
include(cmake/embree.cmake)
include(cmake/xr_openxr.cmake)
if(WITH_WEBP)
include(cmake/webp.cmake)
@@ -129,7 +130,6 @@ if(NOT WIN32 OR ENABLE_MINGW64)
include(cmake/vpx.cmake)
include(cmake/x264.cmake)
include(cmake/xvidcore.cmake)
include(cmake/faad.cmake)
include(cmake/ffmpeg.cmake)
include(cmake/fftw.cmake)
include(cmake/sndfile.cmake)

View File

@@ -38,6 +38,7 @@ set(ALEMBIC_EXTRA_ARGS
-DBoost_DEBUG=ON
-DBOOST_ROOT=${LIBDIR}/boost
-DBoost_NO_SYSTEM_PATHS=ON
-DBoost_NO_BOOST_CMAKE=ON
-DILMBASE_ROOT=${LIBDIR}/openexr
-DALEMBIC_ILMBASE_INCLUDE_DIRECTORY=${LIBDIR}/openexr/include/OpenEXR
-DALEMBIC_ILMBASE_HALF_LIB=${LIBDIR}/openexr/lib/${LIBPREFIX}Half${OPENEXR_VERSION_POSTFIX}${LIBEXT}

View File

@@ -25,6 +25,8 @@ if(UNIX AND NOT APPLE)
set(BZIP2_CFLAGS "-fPIC -Wall -Winline -O2 -g -D_FILE_OFFSET_BITS=64")
set(BZIP2_CONFIGURE_ENV ${BZIP2_CONFIGURE_ENV} && export LDFLAGS=${BZIP2_LDFLAGS} && export CFLAGS=${BZIP2_CFLAGS}
&& export PREFIX=${BZIP2_PREFIX})
else()
set(BZIP2_CONFIGURE_ENV ${CONFIGURE_ENV})
endif()
ExternalProject_Add(external_bzip2

View File

@@ -26,10 +26,20 @@ set(EMBREE_EXTRA_ARGS
-DEMBREE_RAY_MASK=ON
-DEMBREE_FILTER_FUNCTION=ON
-DEMBREE_BACKFACE_CULLING=OFF
-DEMBREE_TASKING_SYSTEM=INTERNAL
-DEMBREE_MAX_ISA=AVX2
-DEMBREE_TASKING_SYSTEM=TBB
-DEMBREE_TBB_ROOT=${LIBDIR}/tbb
-DTBB_STATIC_LIB=${TBB_STATIC_LIBRARY}
)
if(TBB_STATIC_LIBRARY)
set(EMBREE_EXTRA_ARGS
${EMBREE_EXTRA_ARGS}
-DEMBREE_TBB_LIBRARY_NAME=tbb_static
-DEMBREE_TBBMALLOC_LIBRARY_NAME=tbbmalloc_static
)
endif()
if(WIN32)
set(EMBREE_BUILD_DIR ${BUILD_MODE}/)
else()
@@ -44,6 +54,12 @@ ExternalProject_Add(external_embree
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/embree ${DEFAULT_CMAKE_FLAGS} ${EMBREE_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/embree
)
add_dependencies(
external_embree
external_tbb
)
if(WIN32)
if(BUILD_MODE STREQUAL Release)

View File

@@ -127,7 +127,6 @@ endif()
add_dependencies(
external_ffmpeg
external_zlib
external_faad
external_openjpeg
external_xvidcore
external_x264

View File

@@ -19,8 +19,12 @@
set(FFTW_EXTRA_ARGS)
if(WIN32)
set(FFTW3_ENV set CFLAGS=-fno-stack-check -fno-stack-protector -mno-stack-arg-probe -fno-lto &&)
set(FFTW3_PATCH_COMMAND ${PATCH_CMD} --verbose -p 0 -N -d ${BUILD_DIR}/fftw3/src/external_fftw3 < ${PATCH_DIR}/fftw3.diff)
set(FFTW_EXTRA_ARGS --disable-static --enable-shared)
set(FFTW_INSTALL install-strip)
else()
set(FFTW_EXTRA_ARGS --enable-static)
set(FFTW_INSTALL install)
endif()
ExternalProject_Add(external_fftw3
@@ -28,10 +32,10 @@ ExternalProject_Add(external_fftw3
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${FFTW_HASH}
PREFIX ${BUILD_DIR}/fftw3
CONFIGURE_COMMAND ${CONFIGURE_ENV} && ${FFTW3_ENV} cd ${BUILD_DIR}/fftw3/src/external_fftw3/ && ${CONFIGURE_COMMAND} --enable-static --prefix=${mingw_LIBDIR}/fftw3
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/fftw3/src/external_fftw3/ && ${CONFIGURE_COMMAND} ${FFTW_EXTRA_ARGS} --prefix=${mingw_LIBDIR}/fftw3
PATCH_COMMAND ${FFTW3_PATCH_COMMAND}
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/fftw3/src/external_fftw3/ && make -j${MAKE_THREADS}
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/fftw3/src/external_fftw3/ && make install
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/fftw3/src/external_fftw3/ && make ${FFTW_INSTALL}
INSTALL_DIR ${LIBDIR}/fftw3
)
@@ -39,7 +43,8 @@ if(MSVC)
set_target_properties(external_fftw3 PROPERTIES FOLDER Mingw)
if(BUILD_MODE STREQUAL Release)
ExternalProject_Add_Step(external_fftw3 after_install
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/fftw3/lib/libfftw3.a ${HARVEST_TARGET}/fftw3/lib/libfftw.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/fftw3/lib/libfftw3.dll.a ${HARVEST_TARGET}/fftw3/lib/libfftw.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/fftw3/bin/libfftw3-3.dll ${HARVEST_TARGET}/fftw3/lib/libfftw3-3.dll
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/fftw3/include/fftw3.h ${HARVEST_TARGET}/fftw3/include/fftw3.h
DEPENDEES install
)

View File

@@ -31,10 +31,6 @@ if(BUILD_MODE STREQUAL Release)
COMMAND # jpeg rename libfile + copy include
${CMAKE_COMMAND} -E copy ${LIBDIR}/jpg/lib/jpeg-static.lib ${HARVEST_TARGET}/jpeg/lib/libjpeg.lib &&
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/jpg/include/ ${HARVEST_TARGET}/jpeg/include/ &&
# OpenImageIO
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/OpenImageIO/include ${HARVEST_TARGET}/OpenImageIO/include &&
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/OpenImageIO/lib ${HARVEST_TARGET}/OpenImageIO/lib &&
${CMAKE_COMMAND} -E copy ${LIBDIR}/OpenImageIO/bin/idiff.exe ${HARVEST_TARGET}/OpenImageIO/bin/idiff.exe &&
# png
${CMAKE_COMMAND} -E copy ${LIBDIR}/png/lib/libpng16_static.lib ${HARVEST_TARGET}/png/lib/libpng.lib &&
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/png/include/ ${HARVEST_TARGET}/png/include/ &&
@@ -44,10 +40,6 @@ if(BUILD_MODE STREQUAL Release)
# glew-> opengl
${CMAKE_COMMAND} -E copy ${LIBDIR}/glew/lib/libglew32.lib ${HARVEST_TARGET}/opengl/lib/glew.lib &&
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/glew/include/ ${HARVEST_TARGET}/opengl/include/ &&
# sndfile
${CMAKE_COMMAND} -E copy ${LIBDIR}/sndfile/lib/libsndfile.dll.a ${HARVEST_TARGET}/sndfile/lib/libsndfile-1.lib &&
${CMAKE_COMMAND} -E copy ${LIBDIR}/sndfile/bin/libsndfile-1.dll ${HARVEST_TARGET}/sndfile/lib/libsndfile-1.dll &&
${CMAKE_COMMAND} -E copy ${LIBDIR}/sndfile/include/sndfile.h ${HARVEST_TARGET}/sndfile/include/sndfile.h &&
# tiff
${CMAKE_COMMAND} -E copy ${LIBDIR}/tiff/lib/tiff.lib ${HARVEST_TARGET}/tiff/lib/libtiff.lib &&
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/tiff/include/ ${HARVEST_TARGET}/tiff/include/ &&
@@ -59,9 +51,7 @@ endif()
if(BUILD_MODE STREQUAL Debug)
add_custom_target(Harvest_Debug_Results
# OpenImageIO
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/openimageio/lib/OpenImageIO.lib ${HARVEST_TARGET}/openimageio/lib/OpenImageIO_d.lib &&
${CMAKE_COMMAND} -E copy ${LIBDIR}/openimageio/lib/OpenImageIO_Util.lib ${HARVEST_TARGET}/openimageio/lib/OpenImageIO_Util_d.lib &&
COMMAND
# hdf5
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/hdf5/lib ${HARVEST_TARGET}/hdf5/lib &&
DEPENDS Package_Python
@@ -161,6 +151,8 @@ harvest(opensubdiv/include opensubdiv/include "*.h")
harvest(opensubdiv/lib opensubdiv/lib "*.a")
harvest(openvdb/include/openvdb openvdb/include/openvdb "*.h")
harvest(openvdb/lib openvdb/lib "*.a")
harvest(xr_openxr_sdk/include/openxr xr_openxr_sdk/include/openxr "*.h")
harvest(xr_openxr_sdk/lib xr_openxr_sdk/lib "*.a")
harvest(osl/bin osl/bin "oslc")
harvest(osl/include osl/include "*.h")
harvest(osl/lib osl/lib "*.a")

View File

@@ -18,7 +18,7 @@
if(WIN32)
# cmake for windows
set(JPEG_EXTRA_ARGS -DNASM=${NASM_PATH} -DWITH_JPEG8=ON -DCMAKE_DEBUG_POSTFIX=d)
set(JPEG_EXTRA_ARGS -DNASM=${NASM_PATH} -DWITH_JPEG8=ON -DCMAKE_DEBUG_POSTFIX=d -DWITH_CRT_DLL=On)
ExternalProject_Add(external_jpeg
URL ${JPEG_URI}
@@ -42,20 +42,17 @@ if(WIN32)
set(JPEG_LIBRARY jpeg-staticd${LIBEXT})
endif()
else(WIN32)
# autoconf for unix
if(APPLE)
set(JPEG_EXTRA_ARGS --host x86_64-apple-darwin --with-jpeg8)
else()
set(JPEG_EXTRA_ARGS --with-jpeg8)
endif()
# cmake for unix
set(JPEG_EXTRA_ARGS
-DWITH_JPEG8=ON
-DENABLE_STATIC=ON
-DENABLE_SHARED=OFF
-DCMAKE_INSTALL_LIBDIR=${LIBDIR}/jpg/lib)
ExternalProject_Add(external_jpeg
URL ${JPEG_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${JPEG_HASH}
CONFIGURE_COMMAND ${CONFIGURE_ENV} && autoreconf -fiv && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/jpg NASM=yasm ${JPEG_EXTRA_ARGS}
BUILD_IN_SOURCE 1
BUILD_COMMAND ${CONFIGURE_ENV} && make install
PREFIX ${BUILD_DIR}/jpg
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/jpg ${DEFAULT_CMAKE_FLAGS} ${JPEG_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/jpg

View File

@@ -52,7 +52,6 @@ if(BUILD_MODE STREQUAL Release)
PREFIX ${BUILD_DIR}/openal
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/openal ${DEFAULT_CMAKE_FLAGS} ${OPENAL_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/openal
PATCH_COMMAND ${PATCH_CMD} -p 1 -d ${BUILD_DIR}/openal/src/external_openal < ${PATCH_DIR}/openal.diff
)
if(WIN32)

View File

@@ -21,7 +21,7 @@ set(OIDN_EXTRA_ARGS
-DWITH_EXAMPLE=OFF
-DWITH_TEST=OFF
-DTBB_ROOT=${LIBDIR}/tbb
-DTBB_STATIC_LIB=ON
-DTBB_STATIC_LIB=${TBB_STATIC_LIBRARY}
-DOIDN_STATIC_LIB=ON
)

View File

@@ -32,7 +32,7 @@ endif()
if(WIN32)
set(PNG_LIBNAME libpng16_static${LIBEXT})
set(OIIO_SIMD_FLAGS -DUSE_SIMD=sse2 -DOPJ_STATIC=1)
set(OIIO_SIMD_FLAGS -DUSE_SIMD=sse2)
set(OPENJPEG_POSTFIX _msvc)
else()
set(PNG_LIBNAME libpng${LIBEXT})
@@ -49,23 +49,17 @@ endif()
if(MSVC)
set(OPENJPEG_FLAGS
-DOPENJPEG_HOME=${LIBDIR}/openjpeg_msvc
-DOPENJPEG_INCLUDE_DIR=${LIBDIR}/openjpeg_msvc/include/openjpeg-${OPENJPEG_SHORT_VERSION}
-DOPENJPEG_LIBRARY=${LIBDIR}/openjpeg_msvc/lib/openjp2${LIBEXT}
-DOPENJPEG_LIBRARY_DEBUG=${LIBDIR}/openjpeg_msvc/lib/openjp2${LIBEXT}
-DOpenJpeg_ROOT=${LIBDIR}/openjpeg_msvc
)
else()
set(OPENJPEG_FLAGS
-DOPENJPEG_INCLUDE_DIR=${LIBDIR}/openjpeg/include/openjpeg-${OPENJPEG_SHORT_VERSION}
-DOPENJPEG_LIBRARY=${LIBDIR}/openjpeg/lib/${OPENJPEG_LIBRARY}
-DOpenJpeg_ROOT=${LIBDIR}/openjpeg
)
endif()
set(OPENIMAGEIO_EXTRA_ARGS
-DBUILDSTATIC=ON
-DBUILD_SHARED_LIBS=OFF
${OPENIMAGEIO_LINKSTATIC}
-DOPENEXR_INCLUDE_DIR=${LIBDIR}/openexr/include/openexr/
-DOPENEXR_ILMIMF_LIBRARIES=${LIBDIR}/openexr/lib/IlmImf${OPENEXR_VERSION_POSTFIX}${LIBEXT}
-DBoost_COMPILER:STRING=${BOOST_COMPILER_STRING}
-DBoost_USE_MULTITHREADED=ON
-DBoost_USE_STATIC_LIBS=ON
@@ -73,7 +67,16 @@ set(OPENIMAGEIO_EXTRA_ARGS
-DBOOST_ROOT=${LIBDIR}/boost
-DBOOST_LIBRARYDIR=${LIBDIR}/boost/lib/
-DBoost_NO_SYSTEM_PATHS=ON
-DBoost_NO_BOOST_CMAKE=ON
-OIIO_BUILD_CPP11=ON
-DUSE_LIBSQUISH=OFF
-DUSE_QT5=OFF
-DUSE_NUKE=OFF
-DUSE_OPENVDB=OFF
-DUSE_BZIP2=OFF
-DUSE_FREETYPE=OFF
-DUSE_DCMTK=OFF
-DUSE_LIBHEIF=OFF
-DUSE_OPENGL=OFF
-DUSE_TBB=OFF
-DUSE_FIELD3D=OFF
@@ -81,15 +84,12 @@ set(OPENIMAGEIO_EXTRA_ARGS
-DUSE_PYTHON=OFF
-DUSE_GIF=OFF
-DUSE_OPENCV=OFF
-DUSE_OPENSSL=OFF
-DUSE_OPENJPEG=ON
-DUSE_FFMPEG=OFF
-DUSE_PTEX=OFF
-DUSE_FREETYPE=OFF
-DUSE_LIBRAW=OFF
-DUSE_PYTHON=OFF
-DUSE_PYTHON3=OFF
-DUSE_OCIO=OFF
-DUSE_OPENCOLORIO=OFF
-DUSE_WEBP=${WITH_WEBP}
-DOIIO_BUILD_TOOLS=${OIIO_TOOLS}
-DOIIO_BUILD_TESTS=OFF
@@ -103,17 +103,13 @@ set(OPENIMAGEIO_EXTRA_ARGS
-DJPEG_LIBRARY=${LIBDIR}/jpg/lib/${JPEG_LIBRARY}
-DJPEG_INCLUDE_DIR=${LIBDIR}/jpg/include
${OPENJPEG_FLAGS}
-DOCIO_PATH=${LIBDIR}/opencolorio/
-DOpenEXR_USE_STATIC_LIBS=On
-DOPENEXR_HOME=${LIBDIR}/openexr/
-DILMBASE_INCLUDE_PATH=${LIBDIR}/openexr/
-DILMBASE_PACKAGE_PREFIX=${LIBDIR}/openexr/
-DILMBASE_INCLUDE_DIR=${LIBDIR}/openexr/include/
-DOPENEXR_INCLUDE_DIR=${LIBDIR}/openexr/include/
-DOPENEXR_HALF_LIBRARY=${LIBDIR}/openexr/lib/${LIBPREFIX}Half${OPENEXR_VERSION_POSTFIX}${LIBEXT}
-DOPENEXR_IMATH_LIBRARY=${LIBDIR}/openexr/lib/${LIBPREFIX}Imath${OPENEXR_VERSION_POSTFIX}${LIBEXT}
-DOPENEXR_ILMTHREAD_LIBRARY=${LIBDIR}/openexr/lib/${LIBPREFIX}IlmThread${OPENEXR_VERSION_POSTFIX}${LIBEXT}
-DOPENEXR_IEX_LIBRARY=${LIBDIR}/openexr/lib/${LIBPREFIX}Iex${OPENEXR_VERSION_POSTFIX}${LIBEXT}
-DOPENEXR_INCLUDE_DIR=${LIBDIR}/openexr/include/
-DOPENEXR_ILMIMF_LIBRARY=${LIBDIR}/openexr/lib/${LIBPREFIX}IlmImf${OPENEXR_VERSION_POSTFIX}${LIBEXT}
-DSTOP_ON_WARNING=OFF
${WEBP_FLAGS}
@@ -125,27 +121,38 @@ ExternalProject_Add(external_openimageio
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${OPENIMAGEIO_HASH}
PREFIX ${BUILD_DIR}/openimageio
PATCH_COMMAND
${PATCH_CMD} -p 0 -N -d ${BUILD_DIR}/openimageio/src/external_openimageio/src/include < ${PATCH_DIR}/openimageio_gdi.diff &&
${PATCH_CMD} -p 1 -N -d ${BUILD_DIR}/openimageio/src/external_openimageio/ < ${PATCH_DIR}/openimageio_static_libs.diff
PATCH_COMMAND ${PATCH_CMD} -p 1 -N -d ${BUILD_DIR}/openimageio/src/external_openimageio/ < ${PATCH_DIR}/openimageio.diff
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/openimageio ${DEFAULT_CMAKE_FLAGS} ${OPENIMAGEIO_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/openimageio
)
add_dependencies(
external_openimageio
external_png external_zlib
external_png
external_zlib
external_openexr
external_jpeg
external_boost
external_tiff
external_opencolorio
external_openjpeg${OPENJPEG_POSTFIX}
${WEBP_DEP}
)
if(NOT WIN32)
add_dependencies(
external_openimageio
external_opencolorio_extra
)
if(WIN32)
if(BUILD_MODE STREQUAL Release)
ExternalProject_Add_Step(external_openimageio after_install
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/OpenImageIO/include ${HARVEST_TARGET}/OpenImageIO/include
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/OpenImageIO/lib ${HARVEST_TARGET}/OpenImageIO/lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/OpenImageIO/bin/idiff.exe ${HARVEST_TARGET}/OpenImageIO/bin/idiff.exe
DEPENDEES install
)
endif()
if(BUILD_MODE STREQUAL Debug)
ExternalProject_Add_Step(external_openimageio after_install
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/openimageio/lib/OpenImageIO.lib ${HARVEST_TARGET}/openimageio/lib/OpenImageIO_d.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/openimageio/lib/OpenImageIO_Util.lib ${HARVEST_TARGET}/openimageio/lib/OpenImageIO_Util_d.lib
DEPENDEES install
)
endif()
endif()

View File

@@ -36,7 +36,7 @@ if(WIN32)
set(OPENSUBDIV_EXTRA_ARGS
${OPENSUBDIV_EXTRA_ARGS}
-DTBB_INCLUDE_DIR=${LIBDIR}/tbb/include
-DTBB_LIBRARIES=${LIBDIR}/tbb/lib/tbb_static.lib
-DTBB_LIBRARIES=${LIBDIR}/tbb/lib/tbb.lib
-DCLEW_INCLUDE_DIR=${LIBDIR}/clew/include/CL
-DCLEW_LIBRARY=${LIBDIR}/clew/lib/clew${LIBEXT}
-DCUEW_INCLUDE_DIR=${LIBDIR}/cuew/include
@@ -67,7 +67,7 @@ endif()
ExternalProject_Add(external_opensubdiv
URL ${OPENSUBDIV_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${OPENSUBDIV_Hash}
URL_HASH MD5=${OPENSUBDIV_HASH}
PREFIX ${BUILD_DIR}/opensubdiv
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/opensubdiv -Wno-dev ${DEFAULT_CMAKE_FLAGS} ${OPENSUBDIV_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/opensubdiv

View File

@@ -27,6 +27,7 @@ set(OPENVDB_EXTRA_ARGS
-DBoost_USE_STATIC_RUNTIME=OFF
-DBOOST_ROOT=${LIBDIR}/boost
-DBoost_NO_SYSTEM_PATHS=ON
-DBoost_NO_BOOST_CMAKE=ON
-DZLIB_LIBRARY=${LIBDIR}/zlib/lib/${ZLIB_LIBRARY}
-DZLIB_INCLUDE_DIR=${LIBDIR}/zlib/include/
-DBlosc_INCLUDE_DIR=${LIBDIR}/blosc/include/

View File

@@ -44,6 +44,7 @@ set(OSL_EXTRA_ARGS
-DBOOST_ROOT=${LIBDIR}/boost
-DBOOST_LIBRARYDIR=${LIBDIR}/boost/lib/
-DBoost_NO_SYSTEM_PATHS=ON
-DBoost_NO_BOOST_CMAKE=ON
-DLLVM_DIRECTORY=${LIBDIR}/llvm
-DLLVM_INCLUDES=${LIBDIR}/llvm/include
-DLLVM_LIB_DIR=${LIBDIR}/llvm/lib

View File

@@ -25,7 +25,7 @@ set(PNG_EXTRA_ARGS
ExternalProject_Add(external_png
URL ${PNG_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${PNG_HASH}
URL_HASH SHA256=${PNG_HASH}
PREFIX ${BUILD_DIR}/png
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/png ${DEFAULT_CMAKE_FLAGS} ${PNG_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/png

View File

@@ -24,7 +24,7 @@ if(WIN32)
set(PTHREAD_CPPFLAGS "/I. /DHAVE_CONFIG_H ")
endif()
set(PTHREADS_BUILD cd ${BUILD_DIR}/pthreads/src/external_pthreads/ && cd && nmake VC-static /e CPPFLAGS=${PTHREAD_CPPFLAGS} /e XLIBS=/NODEFAULTLIB:msvcr)
set(PTHREADS_BUILD cd ${BUILD_DIR}/pthreads/src/external_pthreads/ && cd && nmake VC-static /e CPPFLAGS=${PTHREAD_CPPFLAGS})
ExternalProject_Add(external_pthreads
URL ${PTHREADS_URI}
@@ -32,6 +32,7 @@ if(WIN32)
URL_HASH MD5=${PTHREADS_HASH}
PREFIX ${BUILD_DIR}/pthreads
CONFIGURE_COMMAND echo .
PATCH_COMMAND COMMAND ${PATCH_CMD} -p 1 -d ${BUILD_DIR}/pthreads/src/external_pthreads < ${PATCH_DIR}/pthreads.diff
BUILD_COMMAND ${PTHREADS_BUILD}
INSTALL_COMMAND COMMAND
${CMAKE_COMMAND} -E copy ${BUILD_DIR}/pthreads/src/external_pthreads/libpthreadVC3${LIBEXT} ${LIBDIR}/pthreads/lib/pthreadVC3${LIBEXT} &&

View File

@@ -60,3 +60,14 @@ if(UNIX)
external_flac
)
endif()
if(BUILD_MODE STREQUAL Release AND WIN32)
ExternalProject_Add_Step(external_sndfile after_install
COMMAND lib /def:${BUILD_DIR}/sndfile/src/external_sndfile/src/libsndfile-1.def /machine:x64 /out:${BUILD_DIR}/sndfile/src/external_sndfile/src/libsndfile-1.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/sndfile/bin/libsndfile-1.dll ${HARVEST_TARGET}/sndfile/lib/libsndfile-1.dll
COMMAND ${CMAKE_COMMAND} -E copy ${BUILD_DIR}/sndfile/src/external_sndfile/src/libsndfile-1.lib ${HARVEST_TARGET}/sndfile/lib/libsndfile-1.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/sndfile/include/sndfile.h ${HARVEST_TARGET}/sndfile/include/sndfile.h
DEPENDEES install
)
endif()

View File

@@ -20,8 +20,10 @@ if(WIN32)
-DTBB_BUILD_SHARED=On
-DTBB_BUILD_TBBMALLOC=On
-DTBB_BUILD_TBBMALLOC_PROXY=On
-DTBB_BUILD_STATIC=On
)
-DTBB_BUILD_STATIC=Off
)
set(TBB_LIBRARY tbb)
set(TBB_STATIC_LIBRARY Off)
else()
set(TBB_EXTRA_ARGS
-DTBB_BUILD_SHARED=Off
@@ -29,6 +31,8 @@ else()
-DTBB_BUILD_TBBMALLOC_PROXY=Off
-DTBB_BUILD_STATIC=On
)
set(TBB_LIBRARY tbb_static)
set(TBB_STATIC_LIBRARY On)
endif()
# CMake script for TBB from https://github.com/wjakob/tbb/blob/master/CMakeLists.txt
@@ -46,7 +50,8 @@ ExternalProject_Add(external_tbb
if(WIN32)
if(BUILD_MODE STREQUAL Release)
ExternalProject_Add_Step(external_tbb after_install
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/tbb/lib/tbb_static.lib ${HARVEST_TARGET}/tbb/lib/tbb.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/tbb/lib/tbb.lib ${HARVEST_TARGET}/tbb/lib/tbb.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/tbb/lib/tbb.dll ${HARVEST_TARGET}/tbb/lib/tbb.dll
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/tbb/lib/tbbmalloc.lib ${HARVEST_TARGET}/tbb/lib/tbbmalloc.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/tbb/lib/tbbmalloc.dll ${HARVEST_TARGET}/tbb/lib/tbbmalloc.dll
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/tbb/lib/tbbmalloc_proxy.lib ${HARVEST_TARGET}/tbb/lib/tbbmalloc_proxy.lib
@@ -57,7 +62,12 @@ if(WIN32)
endif()
if(BUILD_MODE STREQUAL Debug)
ExternalProject_Add_Step(external_tbb after_install
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/tbb/lib/tbb_static.lib ${HARVEST_TARGET}/tbb/lib/tbb_debug.lib
# findtbb.cmake in some deps *NEEDS* to find tbb.lib even if they are not going to use it
# to make that test pass, we place a copy with the right name in the lib folder.
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/tbb/lib/tbb_debug.lib ${LIBDIR}/tbb/lib/tbb.lib
# Normal collection of build artifacts
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/tbb/lib/tbb_debug.lib ${HARVEST_TARGET}/tbb/lib/debug/tbb_debug.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/tbb/lib/tbb_debug.dll ${HARVEST_TARGET}/tbb/lib/debug/tbb_debug.dll
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/tbb/lib/tbbmalloc_proxy.lib ${HARVEST_TARGET}/tbb/lib/tbbmalloc_proxy_debug.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/tbb/lib/tbbmalloc.dll ${HARVEST_TARGET}/tbb/lib/debug/tbbmalloc.dll
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/tbb/lib/tbbmalloc_proxy.dll ${HARVEST_TARGET}/tbb/lib/debug/tbbmalloc_proxy.dll

View File

@@ -22,9 +22,11 @@ set(USD_EXTRA_ARGS
-DBoost_USE_STATIC_LIBS=ON
-DBoost_USE_STATIC_RUNTIME=OFF
-DBOOST_ROOT=${LIBDIR}/boost
-DBoost_NO_SYSTEM_PATHS=ON
-DBoost_NO_BOOST_CMAKE=ON
-DTBB_INCLUDE_DIRS=${LIBDIR}/tbb/include
-DTBB_LIBRARIES=${LIBDIR}/tbb/lib/${LIBPREFIX}tbb_static${LIBEXT}
-DTbb_TBB_LIBRARY=${LIBDIR}/tbb/lib/${LIBPREFIX}tbb_static${LIBEXT}
-DTBB_LIBRARIES=${LIBDIR}/tbb/lib/${LIBPREFIX}${TBB_LIBRARY}${LIBEXT}
-DTbb_TBB_LIBRARY=${LIBDIR}/tbb/lib/${LIBPREFIX}${TBB_LIBRARY}${LIBEXT}
# This is a preventative measure that avoids possible conflicts when add-ons
# try to load another USD library into the same process space.

View File

@@ -20,17 +20,17 @@ set(ZLIB_VERSION 1.2.11)
set(ZLIB_URI https://zlib.net/zlib-${ZLIB_VERSION}.tar.gz)
set(ZLIB_HASH 1c9f62f0778697a09d36121ead88e08e)
set(OPENAL_VERSION 1.18.2)
set(OPENAL_VERSION 1.20.1)
set(OPENAL_URI http://openal-soft.org/openal-releases/openal-soft-${OPENAL_VERSION}.tar.bz2)
set(OPENAL_HASH d4eeb0889812e2fdeaa1843523d76190)
set(OPENAL_HASH 556695068ce8375b89986083d810fd35)
set(PNG_VERSION 1.6.35)
set(PNG_VERSION 1.6.37)
set(PNG_URI http://prdownloads.sourceforge.net/libpng/libpng-${PNG_VERSION}.tar.xz)
set(PNG_HASH 678b7e696a62a193ed3503b04bf449d6)
set(PNG_HASH 505e70834d35383537b6491e7ae8641f1a4bed1876dbfe361201fc80868d88ca)
set(JPEG_VERSION 1.5.3)
set(JPEG_VERSION 2.0.4)
set(JPEG_URI https://github.com/libjpeg-turbo/libjpeg-turbo/archive/${JPEG_VERSION}.tar.gz)
set(JPEG_HASH 5b7549d440b86c98a517355c102d155e)
set(JPEG_HASH 44c43e4a9fb352f47090804529317c88)
set(BOOST_VERSION 1.70.0)
set(BOOST_VERSION_NODOTS 1_70_0)
@@ -66,9 +66,9 @@ else()
set(OPENEXR_VERSION_POSTFIX)
endif()
set(FREETYPE_VERSION 2.10.1)
set(FREETYPE_VERSION 2.10.2)
set(FREETYPE_URI http://prdownloads.sourceforge.net/freetype/freetype-${FREETYPE_VERSION}.tar.gz)
set(FREETYPE_HASH c50a3c9e5e62bdc938a6e1598a782947)
set(FREETYPE_HASH b1cb620e4c875cd4d1bfa04945400945)
set(GLEW_VERSION 1.13.0)
set(GLEW_URI http://prdownloads.sourceforge.net/glew/glew/${GLEW_VERSION}/glew-${GLEW_VERSION}.tgz)
@@ -101,21 +101,21 @@ set(CUEW_GIT_UID 1744972026de9cf27c8a7dc39cf39cd83d5f922f)
set(CUEW_URI https://github.com/CudaWrangler/cuew/archive/${CUEW_GIT_UID}.zip)
set(CUEW_HASH 86760d62978ebfd96cd93f5aa1abaf4a)
set(OPENSUBDIV_VERSION v3_4_0_RC2)
set(OPENSUBDIV_Hash f6a10ba9efaa82fde86fe65aad346319)
set(OPENSUBDIV_VERSION v3_4_3)
set(OPENSUBDIV_URI https://github.com/PixarAnimationStudios/OpenSubdiv/archive/${OPENSUBDIV_VERSION}.tar.gz)
set(OPENSUBDIV_HASH 7bbfa275d021fb829e521df749160edb)
set(SDL_VERSION 2.0.8)
set(SDL_VERSION 2.0.12)
set(SDL_URI https://www.libsdl.org/release/SDL2-${SDL_VERSION}.tar.gz)
set(SDL_HASH 3800d705cef742c6a634f202c37f263f)
set(SDL_HASH 783b6f2df8ff02b19bb5ce492b99c8ff)
set(OPENCOLLADA_VERSION v1.6.68)
set(OPENCOLLADA_URI https://github.com/KhronosGroup/OpenCOLLADA/archive/${OPENCOLLADA_VERSION}.tar.gz)
set(OPENCOLLADA_HASH ee7dae874019fea7be11613d07567493)
set(OPENCOLORIO_VERSION 1.1.0)
set(OPENCOLORIO_URI https://github.com/imageworks/OpenColorIO/archive/v${OPENCOLORIO_VERSION}.tar.gz)
set(OPENCOLORIO_HASH 802d8f5b1d1fe316ec5f76511aa611b8)
set(OPENCOLORIO_VERSION 1.1.1)
set(OPENCOLORIO_URI https://github.com/AcademySoftwareFoundation/OpenColorIO/archive/v${OPENCOLORIO_VERSION}.tar.gz)
set(OPENCOLORIO_HASH 23d8b9ac81599305539a5a8674b94a3d)
set(LLVM_VERSION 9.0.1)
set(LLVM_URI https://github.com/llvm/llvm-project/releases/download/llvmorg-${LLVM_VERSION}/llvm-${LLVM_VERSION}.src.tar.xz)
@@ -127,17 +127,17 @@ set(CLANG_HASH 13468e4a44940efef1b75e8641752f90)
set(OPENMP_URI https://github.com/llvm/llvm-project/releases/download/llvmorg-${LLVM_VERSION}/openmp-${LLVM_VERSION}.src.tar.xz)
set(OPENMP_HASH 6eade16057edbdecb3c4eef9daa2bfcf)
set(OPENIMAGEIO_VERSION 1.8.13)
set(OPENIMAGEIO_VERSION 2.1.15.0)
set(OPENIMAGEIO_URI https://github.com/OpenImageIO/oiio/archive/Release-${OPENIMAGEIO_VERSION}.tar.gz)
set(OPENIMAGEIO_HASH f5526c3c9878029ee900d84856683f93)
set(OPENIMAGEIO_HASH f03aa5e3ac4795af04771ee4146e9832)
set(TIFF_VERSION 4.0.9)
set(TIFF_VERSION 4.1.0)
set(TIFF_URI http://download.osgeo.org/libtiff/tiff-${TIFF_VERSION}.tar.gz)
set(TIFF_HASH 54bad211279cc93eb4fca31ba9bfdc79)
set(TIFF_HASH 2165e7aba557463acc0664e71a3ed424)
set(OSL_VERSION 1.10.9)
set(OSL_VERSION 1.10.10)
set(OSL_URI https://github.com/imageworks/OpenShadingLanguage/archive/Release-${OSL_VERSION}.tar.gz)
set(OSL_HASH a94f1e8506f7e8f5e993653de5c5fa00)
set(OSL_HASH 00dec08a93c8084e53848b9ad047889f)
set(PYTHON_VERSION 3.7.4)
set(PYTHON_SHORT_VERSION 3.7)
@@ -146,8 +146,8 @@ set(PYTHON_URI https://www.python.org/ftp/python/${PYTHON_VERSION}/Python-${PYTH
set(PYTHON_HASH d33e4aae66097051c2eca45ee3604803)
set(TBB_VERSION 2019_U9)
set(TBB_URI https://github.com/01org/tbb/archive/${TBB_VERSION}.tar.gz)
set(TBB_HASH 584edbec127c508f2cd5b6e79ad200fc)
set(TBB_URI https://github.com/oneapi-src/oneTBB/archive/${TBB_VERSION}.tar.gz)
set(TBB_HASH 26263622e9187212ec240dcf01b66207)
set(OPENVDB_VERSION 7.0.0)
set(OPENVDB_URI https://github.com/dreamworksanimation/openvdb/archive/v${OPENVDB_VERSION}.tar.gz)
@@ -168,9 +168,9 @@ set(LAME_VERSION 3.100)
set(LAME_URI http://downloads.sourceforge.net/project/lame/lame/3.100/lame-${LAME_VERSION}.tar.gz)
set(LAME_HASH 83e260acbe4389b54fe08e0bdbf7cddb)
set(OGG_VERSION 1.3.3)
set(OGG_VERSION 1.3.4)
set(OGG_URI http://downloads.xiph.org/releases/ogg/libogg-${OGG_VERSION}.tar.gz)
set(OGG_HASH c2e8a485110b97550f453226ec644ebac6cb29d1caef2902c007edab4308d985)
set(OGG_HASH fe5670640bd49e828d64d2879c31cb4dde9758681bb664f9bdbf159a01b0c76e)
set(VORBIS_VERSION 1.3.6)
set(VORBIS_URI http://downloads.xiph.org/releases/vorbis/libvorbis-${VORBIS_VERSION}.tar.gz)
@@ -180,47 +180,41 @@ set(THEORA_VERSION 1.1.1)
set(THEORA_URI http://downloads.xiph.org/releases/theora/libtheora-${THEORA_VERSION}.tar.bz2)
set(THEORA_HASH b6ae1ee2fa3d42ac489287d3ec34c5885730b1296f0801ae577a35193d3affbc)
set(FLAC_VERSION 1.3.2)
set(FLAC_VERSION 1.3.3)
set(FLAC_URI http://downloads.xiph.org/releases/flac/flac-${FLAC_VERSION}.tar.xz)
set(FLAC_HASH 91cfc3ed61dc40f47f050a109b08610667d73477af6ef36dcad31c31a4a8d53f)
set(FLAC_HASH 213e82bd716c9de6db2f98bcadbc4c24c7e2efe8c75939a1a84e28539c4e1748)
set(VPX_VERSION 1.7.0)
set(VPX_VERSION 1.8.2)
set(VPX_URI https://github.com/webmproject/libvpx/archive/v${VPX_VERSION}/libvpx-v${VPX_VERSION}.tar.gz)
set(VPX_HASH 1fec931eb5c94279ad219a5b6e0202358e94a93a90cfb1603578c326abfc1238)
set(VPX_HASH 8735d9fcd1a781ae6917f28f239a8aa358ce4864ba113ea18af4bb2dc8b474ac)
set(OPUS_VERSION 1.3.1)
set(OPUS_URI https://archive.mozilla.org/pub/opus/opus-${OPUS_VERSION}.tar.gz)
set(OPUS_HASH 65b58e1e25b2a114157014736a3d9dfeaad8d41be1c8179866f144a2fb44ff9d)
set(X264_URI http://download.videolan.org/pub/videolan/x264/snapshots/x264-snapshot-20180811-2245-stable.tar.bz2)
set(X264_HASH ae8a868a0e236a348b35d79f3ee80294b169d1195408b689f9851383661ed7aa)
set(X264_URI https://code.videolan.org/videolan/x264/-/archive/master/x264-33f9e1474613f59392be5ab6a7e7abf60fa63622.tar.gz)
set(X264_HASH 300dfb5b6c35722516f168868ce9419252a9e9eb77a05d82c9cede925b691bd6)
set(XVIDCORE_VERSION 1.3.5)
set(XVIDCORE_URI http://downloads.xvid.org/downloads/xvidcore-${XVIDCORE_VERSION}.tar.gz)
set(XVIDCORE_HASH 165ba6a2a447a8375f7b06db5a3c91810181f2898166e7c8137401d7fc894cf0)
set(XVIDCORE_VERSION 1.3.7)
set(XVIDCORE_URI https://downloads.xvid.com/downloads/xvidcore-${XVIDCORE_VERSION}.tar.gz)
set(XVIDCORE_HASH abbdcbd39555691dd1c9b4d08f0a031376a3b211652c0d8b3b8aa9be1303ce2d)
# This has to be in sync with the version in blenders /extern folder.
set(OPENJPEG_VERSION 2.3.0)
set(OPENJPEG_VERSION 2.3.1)
set(OPENJPEG_SHORT_VERSION 2.3)
# Use slightly newer commit after release which includes a cmake fix
set(OPENJPEG_URI https://github.com/uclouvain/openjpeg/archive/66297f07a43.zip)
set(OPENJPEG_HASH 8242b18d908c7c42174e4231a741cfa7ce7c26b6ed5c9644feb9df7b3054310b)
set(OPENJPEG_URI https://github.com/uclouvain/openjpeg/archive/v${OPENJPEG_VERSION}.tar.gz)
set(OPENJPEG_HASH 63f5a4713ecafc86de51bfad89cc07bb788e9bba24ebbf0c4ca637621aadb6a9)
set(FAAD_VERSION 2-2.8.8)
set(FAAD_URI http://downloads.sourceforge.net/faac/faad${FAAD_VERSION}.tar.gz)
set(FAAD_HASH 28f6116efdbe9378269f8a6221767d1f)
set(FFMPEG_VERSION 4.0.2)
set(FFMPEG_VERSION 4.2.3)
set(FFMPEG_URI http://ffmpeg.org/releases/ffmpeg-${FFMPEG_VERSION}.tar.bz2)
set(FFMPEG_HASH 5576e8a22f80b6a336db39808f427cfb)
set(FFMPEG_HASH 695fad11f3baf27784e24cb0e977b65a)
set(FFTW_VERSION 3.3.8)
set(FFTW_URI http://www.fftw.org/fftw-${FFTW_VERSION}.tar.gz)
set(FFTW_HASH 8aac833c943d8e90d51b697b27d4384d)
set(ICONV_VERSION 1.15)
set(ICONV_VERSION 1.16)
set(ICONV_URI http://ftp.gnu.org/pub/gnu/libiconv/libiconv-${ICONV_VERSION}.tar.gz)
set(ICONV_HASH ace8b5f2db42f7b3b3057585e80d9808)
set(ICONV_HASH 7d2a800b952942bb2880efb00cfd524c)
set(LAPACK_VERSION 3.6.0)
set(LAPACK_URI http://www.netlib.org/lapack/lapack-${LAPACK_VERSION}.tgz)
@@ -267,9 +261,9 @@ set(LCMS_VERSION 2.9)
set(LCMS_URI https://nchc.dl.sourceforge.net/project/lcms/lcms/${LCMS_VERSION}/lcms2-${LCMS_VERSION}.tar.gz)
set(LCMS_HASH 8de1b7724f578d2995c8fdfa35c3ad0e)
set(PUGIXML_VERSION 1.9)
set(PUGIXML_URI https://github.com/zeux/pugixml/archive/v1.9.tar.gz)
set(PUGIXML_HASH 9346ca1dce2c48f1748c12fdac41a714)
set(PUGIXML_VERSION 1.10)
set(PUGIXML_URI https://github.com/zeux/pugixml/archive/v${PUGIXML_VERSION}.tar.gz)
set(PUGIXML_HASH 0c208b0664c7fb822bf1b49ad035e8fd)
set(FLEXBISON_VERSION 2.5.5)
set(FLEXBISON_URI http://prdownloads.sourceforge.net/winflexbison//win_flex_bison-2.5.5.zip)
@@ -299,9 +293,9 @@ set(SQLITE_VERSION 3.24.0)
set(SQLITE_URI https://www.sqlite.org/2018/sqlite-src-3240000.zip)
set(SQLITE_HASH fb558c49ee21a837713c4f1e7e413309aabdd9c7)
set(EMBREE_VERSION 3.8.0)
set(EMBREE_VERSION 3.10.0)
set(EMBREE_URI https://github.com/embree/embree/archive/v${EMBREE_VERSION}.zip)
set(EMBREE_HASH ac504d5426945fe25dec1267e0c39d52)
set(EMBREE_HASH 4bbe29e7eaa46417efc75fc5f1e8eb87)
set(USD_VERSION 19.11)
set(USD_URI https://github.com/PixarAnimationStudios/USD/archive/v${USD_VERSION}.tar.gz)
@@ -318,3 +312,7 @@ set(LIBGLU_HASH 151aef599b8259efe9acd599c96ea2a3)
set(MESA_VERSION 18.3.1)
set(MESA_URI ftp://ftp.freedesktop.org/pub/mesa//mesa-${MESA_VERSION}.tar.xz)
set(MESA_HASH d60828056d77bfdbae0970f9b15fb1be)
set(XR_OPENXR_SDK_VERSION 1.0.8)
set(XR_OPENXR_SDK_URI https://github.com/KhronosGroup/OpenXR-SDK/archive/release-${XR_OPENXR_SDK_VERSION}.tar.gz)
set(XR_OPENXR_SDK_HASH c6de63d2e0f9029aa58dfa97cad8ce07)

View File

@@ -18,9 +18,6 @@
if(WIN32)
set(X264_EXTRA_ARGS --enable-win32thread --cross-prefix=${MINGW_HOST}- --host=${MINGW_HOST})
set(X264_PATCH_CMD ${PATCH_CMD} --verbose -p 1 -N -d ${BUILD_DIR}/x264/src/external_x264 < ${PATCH_DIR}/x264.diff)
else()
set(X264_PATCH_CMD echo .)
endif()
@@ -29,7 +26,6 @@ ExternalProject_Add(external_x264
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH SHA256=${X264_HASH}
PREFIX ${BUILD_DIR}/x264
PATCH_COMMAND ${X264_PATCH_CMD}
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/x264/src/external_x264/ && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/x264
--enable-static
--enable-pic

View File

@@ -0,0 +1,60 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
# Keep flags in sync with install_deps.sh ones in compile_XR_OpenXR_SDK()
set(XR_OPENXR_SDK_EXTRA_ARGS
-DBUILD_FORCE_GENERATION=OFF
-DBUILD_LOADER=ON
-DDYNAMIC_LOADER=OFF
)
if(UNIX AND NOT APPLE)
list(APPEND XR_OPENXR_SDK_EXTRA_ARGS
-DBUILD_WITH_WAYLAND_HEADERS=OFF
-DBUILD_WITH_XCB_HEADERS=OFF
-DBUILD_WITH_XLIB_HEADERS=ON
-DBUILD_WITH_SYSTEM_JSONCPP=OFF
-DCMAKE_CXX_FLAGS=-DDISABLE_STD_FILESYSTEM=1
)
endif()
ExternalProject_Add(external_xr_openxr_sdk
URL ${XR_OPENXR_SDK_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${XR_OPENXR_SDK_HASH}
PREFIX ${BUILD_DIR}/xr_openxr_sdk
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/xr_openxr_sdk ${DEFAULT_CMAKE_FLAGS} ${XR_OPENXR_SDK_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/xr_openxr_sdk
)
if(WIN32)
if(BUILD_MODE STREQUAL Release)
ExternalProject_Add_Step(external_xr_openxr_sdk after_install
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/xr_openxr_sdk/include/openxr ${HARVEST_TARGET}/xr_openxr_sdk/include/openxr
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/xr_openxr_sdk/lib ${HARVEST_TARGET}/xr_openxr_sdk/lib
DEPENDEES install
)
endif()
if(BUILD_MODE STREQUAL Debug)
ExternalProject_Add_Step(external_xr_openxr_sdk after_install
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/xr_openxr_sdk/lib/openxr_loader.lib ${HARVEST_TARGET}/xr_openxr_sdk/lib/openxr_loader_d.lib
DEPENDEES install
)
endif()
endif()

File diff suppressed because it is too large Load Diff

View File

@@ -109,6 +109,9 @@ if (WIN32)
MAIN_DEPENDENCY ${CMAKE_CURRENT_SOURCE_DIR}/src/tbbmalloc/${ARCH_PREFIX}-tbbmalloc-export.def
COMMENT "Preprocessing tbbmalloc.def"
)
list(APPEND tbb_src ${CMAKE_CURRENT_SOURCE_DIR}/src/tbb/tbb_resource.rc)
list(APPEND tbbmalloc_src ${CMAKE_CURRENT_SOURCE_DIR}/src/tbbmalloc/tbbmalloc.rc)
list(APPEND tbbmalloc_proxy_src ${CMAKE_CURRENT_SOURCE_DIR}/src/tbbmalloc/tbbmalloc.rc)
else()
add_custom_command(OUTPUT tbb.def
COMMAND ${CMAKE_CXX_COMPILER} -xc++ -E ${CMAKE_CURRENT_SOURCE_DIR}/src/tbb/${ARCH_PREFIX}-tbb-export.def -I ${CMAKE_CURRENT_SOURCE_DIR}/include -o tbb.def
@@ -145,8 +148,12 @@ if (TBB_BUILD_SHARED)
set_property(TARGET tbb APPEND PROPERTY LINK_FLAGS "-Wl,-version-script,${CMAKE_CURRENT_BINARY_DIR}/tbb.def")
elseif(WIN32)
set_property(TARGET tbb APPEND PROPERTY LINK_FLAGS "/DEF:${CMAKE_CURRENT_BINARY_DIR}/tbb.def")
endif()
install(TARGETS tbb DESTINATION lib)
if(WIN32)
set_target_properties(tbb PROPERTIES OUTPUT_NAME "tbb$<$<CONFIG:Debug>:_debug>")
endif()
endif()
if(CMAKE_COMPILER_IS_GNUCC)
@@ -196,7 +203,7 @@ if(TBB_BUILD_TBBMALLOC_PROXY)
add_library(tbbmalloc_proxy SHARED ${tbbmalloc_proxy_src})
set_property(TARGET tbbmalloc_proxy APPEND PROPERTY COMPILE_DEFINITIONS "__TBBMALLOC_BUILD=1")
set_property(TARGET tbbmalloc_proxy APPEND_STRING PROPERTY COMPILE_FLAGS ${DISABLE_RTTI})
link_libraries(tbbmalloc_proxy tbbmalloc)
target_link_libraries(tbbmalloc_proxy tbbmalloc)
install(TARGETS tbbmalloc_proxy DESTINATION lib)
endif()
endif()

View File

@@ -1,13 +0,0 @@
diff -Naur external_openal_original/CMakeLists.txt external_openal/CMakeLists.txt
--- external_openal_original/CMakeLists.txt 2016-01-24 20:12:39 -0700
+++ external_openal/CMakeLists.txt 2018-06-02 12:16:52 -0600
@@ -885,7 +885,8 @@
OPTION(ALSOFT_REQUIRE_MMDEVAPI "Require MMDevApi backend" OFF)
IF(HAVE_WINDOWS_H)
# Check MMSystem backend
- CHECK_INCLUDE_FILES("windows.h;mmsystem.h" HAVE_MMSYSTEM_H -D_WIN32_WINNT=0x0502)
+ set(CMAKE_REQUIRED_FLAGS "-D_WIN32_WINNT=0x0502")
+ CHECK_INCLUDE_FILES("windows.h;mmsystem.h" HAVE_MMSYSTEM_H)
IF(HAVE_MMSYSTEM_H)
CHECK_SHARED_FUNCTION_EXISTS(waveOutOpen "windows.h;mmsystem.h" winmm "" HAVE_LIBWINMM)
IF(HAVE_LIBWINMM)

View File

@@ -18,17 +18,6 @@ diff --git a/mkl-dnn/cmake/TBB.cmake b/mkl-dnn/cmake/TBB.cmake
index 0711e699..c14210b6 100644
--- a/mkl-dnn/cmake/TBB.cmake
+++ b/mkl-dnn/cmake/TBB.cmake
@@ -90,8 +90,8 @@ if(WIN32)
NO_DEFAULT_PATH
)
set(TBB_LIB_DIR ${TBB_ROOT}/lib/${TBB_ARCH}/${TBB_VCVER})
- find_library(TBB_LIBRARY tbb PATHS ${TBB_LIB_DIR} ${TBB_ROOT}/lib NO_DEFAULT_PATH)
- find_library(TBB_LIBRARY_MALLOC tbbmalloc PATHS ${TBB_LIB_DIR} ${TBB_ROOT}/lib NO_DEFAULT_PATH)
+ find_library(TBB_LIBRARY tbb_static PATHS ${TBB_LIB_DIR} ${TBB_ROOT}/lib NO_DEFAULT_PATH)
+ find_library(TBB_LIBRARY_MALLOC tbbmalloc_static PATHS ${TBB_LIB_DIR} ${TBB_ROOT}/lib NO_DEFAULT_PATH)
endif()
else()
@@ -138,13 +138,13 @@ else()
set(TBB_LIBRARY_MALLOC TBB_LIBRARY_MALLOC-NOTFOUND)
if(APPLE)

View File

@@ -0,0 +1,36 @@
diff -Naur orig/CMakeLists.txt external_openimageio/CMakeLists.txt
--- orig/CMakeLists.txt 2020-05-10 21:43:52 -0600
+++ external_openimageio/CMakeLists.txt 2020-05-13 17:03:35 -0600
@@ -170,7 +170,7 @@
add_subdirectory (src/iinfo)
add_subdirectory (src/maketx)
add_subdirectory (src/oiiotool)
- add_subdirectory (src/testtex)
+ #add_subdirectory (src/testtex)
add_subdirectory (src/iv)
endif ()
diff -Naur orig/src/cmake/compiler.cmake external_openimageio/src/cmake/compiler.cmake
--- orig/src/cmake/compiler.cmake 2020-05-10 21:43:52 -0600
+++ external_openimageio/src/cmake/compiler.cmake 2020-05-13 17:02:54 -0600
@@ -172,6 +172,7 @@
add_definitions (-D_CRT_NONSTDC_NO_WARNINGS)
add_definitions (-D_SCL_SECURE_NO_WARNINGS)
add_definitions (-DJAS_WIN_MSVC_BUILD)
+ add_definitions (-DOPJ_STATIC)
endif (MSVC)
if (${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD"
diff -Naur orig/src/include/OpenImageIO/platform.h external_openimageio/src/include/OpenImageIO/platform.h
--- orig/src/include/OpenImageIO/platform.h 2020-05-10 21:43:52 -0600
+++ external_openimageio/src/include/OpenImageIO/platform.h 2020-05-13 17:04:36 -0600
@@ -41,6 +41,9 @@
# ifndef NOMINMAX
# define NOMINMAX
# endif
+# ifndef NOGDI
+# define NOGDI
+# endif
# include <windows.h>
#endif

View File

@@ -1,26 +0,0 @@
Index: OpenImageIO/osdep.h
===================================================================
--- OpenImageIO/osdep.h (revision 61595)
+++ OpenImageIO/osdep.h (working copy)
@@ -34,6 +34,7 @@
# define WIN32_LEAN_AND_MEAN
# define VC_EXTRALEAN
# define NOMINMAX
+# define NOGDI
# include <windows.h>
#endif
Index: OpenImageIO/platform.h
===================================================================
--- OpenImageIO/platform.h (revision 61595)
+++ OpenImageIO/platform.h (working copy)
@@ -77,6 +77,9 @@
# ifndef NOMINMAX
# define NOMINMAX
# endif
+# ifndef NOGDI
+# define NOGDI
+# endif
# include <windows.h>
#endif

View File

@@ -1,22 +0,0 @@
diff -Naur external_openimageio.orig/src/cmake/compiler.cmake external_openimageio/src/cmake/compiler.cmake
--- external_openimageio.orig/src/cmake/compiler.cmake 2018-07-31 23:45:19 -0600
+++ external_openimageio/src/cmake/compiler.cmake 2018-08-16 12:50:12 -0600
@@ -152,6 +152,7 @@
add_definitions (-D_CRT_NONSTDC_NO_WARNINGS)
add_definitions (-D_SCL_SECURE_NO_WARNINGS)
add_definitions (-DJAS_WIN_MSVC_BUILD)
+ add_definitions (-DOPJ_STATIC)
endif (MSVC)
# Use ccache if found
--- external_openimageio.orig/CMakeLists.txt 2018-07-31 23:45:19 -0600
+++ external_openimageio/CMakeLists.txt 2018-08-17 15:22:56 -0600
@@ -169,7 +169,7 @@
add_subdirectory (src/iinfo)
add_subdirectory (src/maketx)
add_subdirectory (src/oiiotool)
- add_subdirectory (src/testtex)
+# add_subdirectory (src/testtex)
add_subdirectory (src/iv)
endif ()

View File

@@ -48,3 +48,22 @@ diff -Naur OpenShadingLanguage-Release-1.9.9/src/liboslexec/llvm_util.cpp extern
size_t
LLVM_Util::total_jit_memory_held ()
diff -Naur OpenShadingLanguage-Release-1.9.9/CMakeLists.txt external_osl/CMakeLists.txt
--- orig/CMakeLists.txt 2020-01-27 16:22:31 -0700
+++ external_osl/CMakeLists.txt 2020-05-13 18:04:52 -0600
@@ -102,10 +102,11 @@
set (OPTIX_EXTRA_LIBS CACHE STRING "Extra lib targets needed for OptiX")
set (CUDA_TARGET_ARCH "sm_35" CACHE STRING "CUDA GPU architecture (e.g. sm_35)")
-# set (USE_OIIO_STATIC ON CACHE BOOL "If OIIO is built static")
-# if (USE_OIIO_STATIC)
-# add_definitions ("-DOIIO_STATIC_BUILD=1")
-# endif ()
+set (USE_OIIO_STATIC ON CACHE BOOL "If OIIO is built static")
+if (USE_OIIO_STATIC)
+ add_definitions ("-DOIIO_STATIC_BUILD=1")
+ add_definitions ("-DOIIO_STATIC_DEFINE=1")
+endif ()
set (OSL_NO_DEFAULT_TEXTURESYSTEM OFF CACHE BOOL "Do not use create a raw OIIO::TextureSystem")
if (OSL_NO_DEFAULT_TEXTURESYSTEM)

View File

@@ -1,13 +1,12 @@
--- pthread.h.orig 2012-05-26 22:16:45 -0600
+++ pthread.h 2016-04-01 09:20:36 -0600
@@ -109,6 +109,10 @@
/* Include everything */
#endif
diff -Naur orig/Makefile external_pthreads/Makefile
--- orig/Makefile 2018-08-08 04:47:40 -0600
+++ external_pthreads/Makefile 2020-05-09 11:20:28 -0600
@@ -185,7 +185,7 @@
@ $(MAKE) /E /nologo XCFLAGS="/MTd" EHFLAGS="$(VSEFLAGSD) /D__PTW32_STATIC_LIB /D__PTW32_BUILD_INLINED" CLEANUP=__PTW32_CLEANUP_SEH pthreadVSE$(PTW32_VER_DEBUG).inlined_static_stamp
+#if _MSC_VER >= 1900
+# define HAVE_STRUCT_TIMESPEC 1
+#endif
+
#if defined(_UWIN)
# define HAVE_STRUCT_TIMESPEC 1
# define HAVE_SIGNAL_H 1
VC-static:
- @ $(MAKE) /E /nologo XCFLAGS="/MT" EHFLAGS="$(VCFLAGS) /D__PTW32_STATIC_LIB /D__PTW32_BUILD_INLINED" CLEANUP=__PTW32_CLEANUP_C pthreadVC$(PTW32_VER).inlined_static_stamp
+ @ $(MAKE) /E /nologo XCFLAGS="/MD" EHFLAGS="$(VCFLAGS) /D__PTW32_STATIC_LIB /D__PTW32_BUILD_INLINED" CLEANUP=__PTW32_CLEANUP_C pthreadVC$(PTW32_VER).inlined_static_stamp
VC-static-debug:
@ $(MAKE) /E /nologo XCFLAGS="/MTd" EHFLAGS="$(VCFLAGSD) /D__PTW32_STATIC_LIB /D__PTW32_BUILD_INLINED" CLEANUP=__PTW32_CLEANUP_C pthreadVC$(PTW32_VER_DEBUG).inlined_static_stamp

View File

@@ -1,22 +0,0 @@
--- x264-snapshot-20180811-2245-stable\configure 2018-08-11 14:45:05 -0600
+++ external_x264\configure 2018-08-11 23:51:35 -0600
@@ -396,7 +396,7 @@
# list of all preprocessor HAVE values we can define
CONFIG_HAVE="MALLOC_H ALTIVEC ALTIVEC_H MMX ARMV6 ARMV6T2 NEON BEOSTHREAD POSIXTHREAD WIN32THREAD THREAD LOG2F SWSCALE \
LAVF FFMS GPAC AVS GPL VECTOREXT INTERLACED CPU_COUNT OPENCL THP LSMASH X86_INLINE_ASM AS_FUNC INTEL_DISPATCHER \
- MSA MMAP WINRT VSX ARM_INLINE_ASM STRTOK_R BITDEPTH8 BITDEPTH10"
+ MSA MMAP WINRT VSX ARM_INLINE_ASM BITDEPTH8 BITDEPTH10"
# parse options
@@ -1071,10 +1071,6 @@
define HAVE_LOG2F
fi
-if cc_check 'string.h' '' 'strtok_r(0, 0, 0);' ; then
- define HAVE_STRTOK_R
-fi
-
if [ "$SYS" != "WINDOWS" ] && cpp_check "sys/mman.h unistd.h" "" "defined(MAP_PRIVATE)"; then
define HAVE_MMAP
fi

View File

@@ -78,23 +78,22 @@ class VersionInfo:
blender_h = os.path.join(builder.blender_dir, "source", "blender", "blenkernel", "BKE_blender_version.h")
version_number = int(self._parse_header_file(blender_h, 'BLENDER_VERSION'))
self.version = "%d.%d" % (version_number // 100, version_number % 100)
self.version_char = self._parse_header_file(blender_h, 'BLENDER_VERSION_CHAR')
version_number_patch = int(self._parse_header_file(blender_h, 'BLENDER_VERSION_PATCH'))
version_numbers = (version_number // 100, version_number % 100, version_number_patch)
self.short_version = "%d.%02d" % (version_numbers[0], version_numbers[1])
self.version = "%d.%02d.%d" % version_numbers
self.version_cycle = self._parse_header_file(blender_h, 'BLENDER_VERSION_CYCLE')
self.version_cycle_number = self._parse_header_file(blender_h, 'BLENDER_VERSION_CYCLE_NUMBER')
self.hash = self._parse_header_file(buildinfo_h, 'BUILD_HASH')[1:-1]
if self.version_cycle == "release":
# Final release
self.full_version = self.version + self.version_char
self.full_version = self.version
self.is_development_build = False
elif self.version_cycle == "rc":
# Release candidate
version_cycle = self.version_cycle + self.version_cycle_number
if len(self.version_char) == 0:
self.full_version = self.version + version_cycle
else:
self.full_version = self.version + self.version_char + '-' + version_cycle
self.full_version = self.version + version_cycle
self.is_development_build = False
else:
# Development build

View File

@@ -7,9 +7,6 @@ message(STATUS "Building in CentOS 7 64bit environment")
set(LIBDIR_NAME "linux_centos7_x86_64")
set(WITH_CXX11_ABI OFF CACHE BOOL "" FORCE)
# Default to only build Blender
set(WITH_BLENDER ON CACHE BOOL "" FORCE)
# ######## Linux-specific build options ########
# Options which are specific to Linux-only platforms
@@ -20,12 +17,6 @@ set(WITH_DOC_MANPAGE OFF CACHE BOOL "" FORCE)
set(WITH_JACK_DYNLOAD ON CACHE BOOL "" FORCE)
set(WITH_SDL_DYNLOAD ON CACHE BOOL "" FORCE)
set(WITH_SYSTEM_GLEW OFF CACHE BOOL "" FORCE)
set(WITH_OPENMP_STATIC ON CACHE BOOL "" FORCE)
set(WITH_PYTHON_INSTALL_NUMPY ON CACHE BOOL "" FORCE)
set(WITH_PYTHON_INSTALL_REQUESTS ON CACHE BOOL "" FORCE)
# ######## Release environment specific settings ########
@@ -33,13 +24,5 @@ set(LIBDIR "${CMAKE_CURRENT_LIST_DIR}/../../../../lib/${LIBDIR_NAME}" CACHE STRI
# Platform specific configuration, to ensure static linking against everything.
set(Boost_USE_STATIC_LIBS ON CACHE BOOL "" FORCE)
# We need to link OpenCOLLADA against PCRE library. Even though it is not installed
# on /usr, we do not really care -- all we care is PCRE_FOUND be TRUE and its
# library pointing to a valid one.
set(PCRE_INCLUDE_DIR "/usr/include" CACHE STRING "" FORCE)
set(PCRE_LIBRARY "${LIBDIR}/opencollada/lib/libpcre.a" CACHE STRING "" FORCE)
# Additional linking libraries
set(CMAKE_EXE_LINKER_FLAGS "-lrt -static-libstdc++ -no-pie" CACHE STRING "" FORCE)

View File

@@ -167,7 +167,7 @@ def pack_linux(builder):
buildbot_utils.call(builder.command_prefix + ['strip', '--strip-all', blender_executable])
print("Stripping python...")
py_target = os.path.join(builder.install_dir, info.version)
py_target = os.path.join(builder.install_dir, info.short_version)
buildbot_utils.call(builder.command_prefix + ['find', py_target, '-iname', '*.so', '-exec', 'strip', '-s', '{}', ';'])
# Construct package name

View File

@@ -104,6 +104,7 @@ FOREACH(COMPONENT ${_openexr_FIND_COMPONENTS})
FIND_LIBRARY(OPENEXR_${UPPERCOMPONENT}_LIBRARY
NAMES
${COMPONENT}-${_openexr_libs_ver} ${COMPONENT}
NAMES_PER_DIR
HINTS
${_openexr_SEARCH_DIRS}
PATH_SUFFIXES

View File

@@ -95,7 +95,7 @@ FIND_LIBRARY(OPENIMAGEDENOISE_LIBRARY
# handle the QUIETLY and REQUIRED arguments and set OPENIMAGEDENOISE_FOUND to TRUE if
# all listed variables are TRUE
INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(OPENIMAGEDENOISE DEFAULT_MSG
FIND_PACKAGE_HANDLE_STANDARD_ARGS(OpenImageDenoise DEFAULT_MSG
OPENIMAGEDENOISE_LIBRARY OPENIMAGEDENOISE_INCLUDE_DIR)
IF(OPENIMAGEDENOISE_FOUND)

View File

@@ -43,6 +43,7 @@ FIND_PATH(USD_INCLUDE_DIR
FIND_LIBRARY(USD_LIBRARY
NAMES
usd_m usd_ms
NAMES_PER_DIR
HINTS
${_usd_SEARCH_DIRS}
PATH_SUFFIXES

View File

@@ -0,0 +1,73 @@
# - Find OpenXR-SDK libraries
# Find the native OpenXR-SDK includes and libraries
#
# Note that there is a distinction between the OpenXR standard and the SDK. The
# latter provides utilities to use the standard but is not part of it. Most
# importantly, it contains C headers and a loader library, which manages
# dynamic linking to OpenXR runtimes like Monado, Windows Mixed Reality or
# Oculus. See the repository for more details:
# https://github.com/KhronosGroup/OpenXR-SDK
#
# This module defines
# XR_OPENXR_SDK_INCLUDE_DIRS, where to find OpenXR-SDK headers, Set when
# XR_OPENXR_SDK_INCLUDE_DIR is found.
# XR_OPENXR_SDK_LIBRARIES, libraries to link against to use OpenXR.
# XR_OPENXR_SDK_ROOT_DIR, the base directory to search for OpenXR-SDK.
# This can also be an environment variable.
# XR_OPENXR_SDK_FOUND, if false, do not try to use OpenXR-SDK.
#
# also defined, but not for general use are
# XR_OPENXR_SDK_LOADER_LIBRARY, where to find the OpenXR-SDK loader library.
#=============================================================================
# Distributed under the OSI-approved BSD License (the "License");
# see accompanying file Copyright.txt for details.
#
# This software is distributed WITHOUT ANY WARRANTY; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the License for more information.
#=============================================================================
# If XR_OPENXR_SDK_ROOT_DIR was defined in the environment, use it.
IF(NOT XR_OPENXR_SDK_ROOT_DIR AND NOT $ENV{XR_OPENXR_SDK_ROOT_DIR} STREQUAL "")
SET(XR_OPENXR_SDK_ROOT_DIR $ENV{XR_OPENXR_SDK_ROOT_DIR})
ENDIF()
SET(_xr_openxr_sdk_SEARCH_DIRS
${XR_OPENXR_SDK_ROOT_DIR}
/opt/lib/xr-openxr-sdk
)
FIND_PATH(XR_OPENXR_SDK_INCLUDE_DIR
NAMES
openxr/openxr.h
HINTS
${_xr_openxr_sdk_SEARCH_DIRS}
PATH_SUFFIXES
include
)
FIND_LIBRARY(XR_OPENXR_SDK_LOADER_LIBRARY
NAMES
openxr_loader
HINTS
${_xr_openxr_sdk_SEARCH_DIRS}
PATH_SUFFIXES
lib64 lib
)
# handle the QUIETLY and REQUIRED arguments and set XR_OPENXR_SDK_FOUND to TRUE if
# all listed variables are TRUE
INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(XR_OPENXR_SDK DEFAULT_MSG
XR_OPENXR_SDK_LOADER_LIBRARY XR_OPENXR_SDK_INCLUDE_DIR)
IF(XR_OPENXR_SDK_FOUND)
SET(XR_OPENXR_SDK_LIBRARIES ${XR_OPENXR_SDK_LOADER_LIBRARY})
SET(XR_OPENXR_SDK_INCLUDE_DIRS ${XR_OPENXR_SDK_INCLUDE_DIR})
ENDIF(XR_OPENXR_SDK_FOUND)
MARK_AS_ADVANCED(
XR_OPENXR_SDK_INCLUDE_DIR
XR_OPENXR_SDK_LOADER_LIBRARY
)

View File

@@ -66,6 +66,9 @@ macro(BLENDER_SRC_GTEST_EX)
if(UNIX AND NOT APPLE)
target_link_libraries(${TARGET_NAME} bf_intern_libc_compat)
endif()
if(WITH_TBB)
target_link_libraries(${TARGET_NAME} ${TBB_LIBRARIES})
endif()
get_property(GENERATOR_IS_MULTI_CONFIG GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG)
if(GENERATOR_IS_MULTI_CONFIG)

View File

@@ -61,3 +61,6 @@ if(UNIX AND NOT APPLE)
set(WITH_X11_XINPUT ON CACHE BOOL "" FORCE)
set(WITH_X11_XF86VMODE ON CACHE BOOL "" FORCE)
endif()
if(NOT APPLE)
set(WITH_XR_OPENXR ON CACHE BOOL "" FORCE)
endif()

View File

@@ -44,6 +44,7 @@ set(WITH_OPENAL OFF CACHE BOOL "" FORCE)
set(WITH_OPENCOLLADA OFF CACHE BOOL "" FORCE)
set(WITH_OPENCOLORIO OFF CACHE BOOL "" FORCE)
set(WITH_OPENIMAGEDENOISE OFF CACHE BOOL "" FORCE)
set(WITH_XR_OPENXR OFF CACHE BOOL "" FORCE)
set(WITH_OPENIMAGEIO OFF CACHE BOOL "" FORCE)
set(WITH_OPENMP OFF CACHE BOOL "" FORCE)
set(WITH_OPENSUBDIV OFF CACHE BOOL "" FORCE)
@@ -51,6 +52,7 @@ set(WITH_OPENVDB OFF CACHE BOOL "" FORCE)
set(WITH_QUADRIFLOW OFF CACHE BOOL "" FORCE)
set(WITH_SDL OFF CACHE BOOL "" FORCE)
set(WITH_TBB OFF CACHE BOOL "" FORCE)
set(WITH_USD OFF CACHE BOOL "" FORCE)
if(UNIX AND NOT APPLE)
set(WITH_GHOST_XDND OFF CACHE BOOL "" FORCE)

View File

@@ -65,3 +65,6 @@ if(UNIX AND NOT APPLE)
set(WITH_X11_XINPUT ON CACHE BOOL "" FORCE)
set(WITH_X11_XF86VMODE ON CACHE BOOL "" FORCE)
endif()
if(NOT APPLE)
set(WITH_XR_OPENXR ON CACHE BOOL "" FORCE)
endif()

View File

@@ -122,7 +122,7 @@ function(target_link_libraries_optimized
)
foreach(_LIB ${LIBS})
target_link_libraries(${TARGET} optimized "${_LIB}")
target_link_libraries(${TARGET} INTERFACE optimized "${_LIB}")
endforeach()
endfunction()
@@ -132,7 +132,7 @@ function(target_link_libraries_debug
)
foreach(_LIB ${LIBS})
target_link_libraries(${TARGET} debug "${_LIB}")
target_link_libraries(${TARGET} INTERFACE debug "${_LIB}")
endforeach()
endfunction()
@@ -170,6 +170,7 @@ function(blender_include_dirs_sys
endfunction()
function(blender_source_group
name
sources
)
@@ -205,6 +206,13 @@ function(blender_source_group
source_group("${GROUP_ID}" FILES ${_SRC})
endforeach()
endif()
# if enabled, set the FOLDER property for visual studio projects
if(WINDOWS_USE_VISUAL_STUDIO_PROJECT_FOLDERS)
get_filename_component(FolderDir ${CMAKE_CURRENT_SOURCE_DIR} DIRECTORY)
string(REPLACE ${CMAKE_SOURCE_DIR} "" FolderDir ${FolderDir})
set_target_properties(${name} PROPERTIES FOLDER ${FolderDir})
endif()
endfunction()
@@ -295,11 +303,11 @@ function(blender_add_lib__impl
set(next_library_mode "${library_lower}")
else()
if("${next_library_mode}" STREQUAL "optimized")
target_link_libraries(${name} optimized ${library})
target_link_libraries(${name} INTERFACE optimized ${library})
elseif("${next_library_mode}" STREQUAL "debug")
target_link_libraries(${name} debug ${library})
target_link_libraries(${name} INTERFACE debug ${library})
else()
target_link_libraries(${name} ${library})
target_link_libraries(${name} INTERFACE ${library})
endif()
set(next_library_mode "")
endif()
@@ -308,14 +316,7 @@ function(blender_add_lib__impl
# works fine without having the includes
# listed is helpful for IDE's (QtCreator/MSVC)
blender_source_group("${sources}")
# if enabled, set the FOLDER property for visual studio projects
if(WINDOWS_USE_VISUAL_STUDIO_PROJECT_FOLDERS)
get_filename_component(FolderDir ${CMAKE_CURRENT_SOURCE_DIR} DIRECTORY)
string(REPLACE ${CMAKE_SOURCE_DIR} "" FolderDir ${FolderDir})
set_target_properties(${name} PROPERTIES FOLDER ${FolderDir})
endif()
blender_source_group("${name}" "${sources}")
list_assert_duplicates("${sources}")
list_assert_duplicates("${includes}")
@@ -439,6 +440,14 @@ function(SETUP_LIBDIRS)
link_directories(${HDF5_LIBPATH})
endif()
if(WITH_GHOST_WAYLAND)
link_directories(
${wayland-client_LIBRARY_DIRS}
${wayland-egl_LIBRARY_DIRS}
${xkbcommon_LIBRARY_DIRS}
${wayland-cursor_LIBRARY_DIRS})
endif()
if(WIN32 AND NOT UNIX)
link_directories(${PTHREADS_LIBPATH})
endif()
@@ -747,8 +756,7 @@ function(get_blender_version)
# - BLENDER_VERSION (major.minor)
# - BLENDER_VERSION_MAJOR
# - BLENDER_VERSION_MINOR
# - BLENDER_SUBVERSION (used for internal versioning mainly)
# - BLENDER_VERSION_CHAR (a, b, c, ...or empty string)
# - BLENDER_VERSION_PATCH
# - BLENDER_VERSION_CYCLE (alpha, beta, rc, release)
# So cmake depends on BKE_blender.h, beware of inf-loops!
@@ -758,25 +766,15 @@ function(get_blender_version)
file(STRINGS ${CMAKE_SOURCE_DIR}/source/blender/blenkernel/BKE_blender_version.h _contents REGEX "^#define[ \t]+BLENDER_.*$")
string(REGEX REPLACE ".*#define[ \t]+BLENDER_VERSION[ \t]+([0-9]+).*" "\\1" _out_version "${_contents}")
string(REGEX REPLACE ".*#define[ \t]+BLENDER_SUBVERSION[ \t]+([0-9]+).*" "\\1" _out_subversion "${_contents}")
string(REGEX REPLACE ".*#define[ \t]+BLENDER_VERSION_CHAR[ \t]+([a-z]+).*" "\\1" _out_version_char "${_contents}")
string(REGEX REPLACE ".*#define[ \t]+BLENDER_VERSION_PATCH[ \t]+([0-9]+).*" "\\1" _out_version_patch "${_contents}")
string(REGEX REPLACE ".*#define[ \t]+BLENDER_VERSION_CYCLE[ \t]+([a-z]+).*" "\\1" _out_version_cycle "${_contents}")
if(NOT ${_out_version} MATCHES "[0-9]+")
message(FATAL_ERROR "Version parsing failed for BLENDER_VERSION")
endif()
if(NOT ${_out_subversion} MATCHES "[0-9]+")
message(FATAL_ERROR "Version parsing failed for BLENDER_SUBVERSION")
endif()
# clumsy regex, only single char are ok but it could be unset
string(LENGTH "${_out_version_char}" _out_version_char_len)
if(NOT _out_version_char_len EQUAL 1)
set(_out_version_char "")
elseif(NOT ${_out_version_char} MATCHES "[a-z]+")
message(FATAL_ERROR "Version parsing failed for BLENDER_VERSION_CHAR")
if(NOT ${_out_version_patch} MATCHES "[0-9]+")
message(FATAL_ERROR "Version parsing failed for BLENDER_VERSION_PATCH")
endif()
if(NOT ${_out_version_cycle} MATCHES "[a-z]+")
@@ -786,23 +784,11 @@ function(get_blender_version)
math(EXPR _out_version_major "${_out_version} / 100")
math(EXPR _out_version_minor "${_out_version} % 100")
# for packaging, alpha to numbers
string(COMPARE EQUAL "${_out_version_char}" "" _out_version_char_empty)
if(${_out_version_char_empty})
set(_out_version_char_index "0")
else()
set(_char_ls a b c d e f g h i j k l m n o p q r s t u v w x y z)
list(FIND _char_ls ${_out_version_char} _out_version_char_index)
math(EXPR _out_version_char_index "${_out_version_char_index} + 1")
endif()
# output vars
set(BLENDER_VERSION "${_out_version_major}.${_out_version_minor}" PARENT_SCOPE)
set(BLENDER_VERSION_MAJOR "${_out_version_major}" PARENT_SCOPE)
set(BLENDER_VERSION_MINOR "${_out_version_minor}" PARENT_SCOPE)
set(BLENDER_SUBVERSION "${_out_subversion}" PARENT_SCOPE)
set(BLENDER_VERSION_CHAR "${_out_version_char}" PARENT_SCOPE)
set(BLENDER_VERSION_CHAR_INDEX "${_out_version_char_index}" PARENT_SCOPE)
set(BLENDER_VERSION_PATCH "${_out_version_patch}" PARENT_SCOPE)
set(BLENDER_VERSION_CYCLE "${_out_version_cycle}" PARENT_SCOPE)
endfunction()
@@ -946,7 +932,7 @@ function(data_to_c_simple
set_source_files_properties(${_file_to} PROPERTIES GENERATED TRUE)
endfunction()
# macro for converting pixmap directory to a png and then a c file
# Function for converting pixmap directory to a '.png' and then a '.c' file.
function(data_to_c_simple_icons
path_from icon_prefix icon_names
list_to_add
@@ -1159,12 +1145,12 @@ macro(blender_precompile_headers target cpp header)
endmacro()
macro(set_and_warn_dependency
_dependency _setting _val)
# when $_dependency is disabled, forces $_setting = $_val
if(NOT ${${_dependency}} AND ${${_setting}})
message(STATUS "'${_dependency}' is disabled: forcing 'set(${_setting} ${_val})'")
set(${_setting} ${_val})
endif()
_dependency _setting _val)
# when $_dependency is disabled, forces $_setting = $_val
if(NOT ${${_dependency}} AND ${${_setting}})
message(STATUS "'${_dependency}' is disabled: forcing 'set(${_setting} ${_val})'")
set(${_setting} ${_val})
endif()
endmacro()
macro(without_system_libs_begin)

View File

@@ -7,7 +7,7 @@ set(PROJECT_VENDOR "Blender Foundation")
set(MAJOR_VERSION ${BLENDER_VERSION_MAJOR})
set(MINOR_VERSION ${BLENDER_VERSION_MINOR})
set(PATCH_VERSION ${BLENDER_VERSION_CHAR_INDEX})
set(PATCH_VERSION ${BLENDER_VERSION_PATCH})
set(CPACK_SYSTEM_NAME ${CMAKE_SYSTEM_NAME})
set(CPACK_PACKAGE_DESCRIPTION ${PROJECT_DESCRIPTION})

View File

@@ -222,12 +222,10 @@ if(WITH_OPENCOLLADA)
-lMathMLSolver
-lGeneratedSaxParser
-lbuffer -lftoa -lUTF
${OPENCOLLADA_LIBPATH}/libxml2.a
)
# PCRE is bundled with openCollada
# set(PCRE ${LIBDIR}/pcre)
# set(PCRE_LIBPATH ${PCRE}/lib)
# PCRE and XML2 are bundled with OpenCollada.
set(PCRE_LIBRARIES pcre)
set(XML2_LIBRARIES xml2)
endif()
if(WITH_SDL)
@@ -411,11 +409,21 @@ if(WITH_OPENMP)
# Copy libomp.dylib to allow executables like datatoc and tests to work.
execute_process(
COMMAND mkdir -p ${CMAKE_BINARY_DIR}/Resources/lib
COMMAND cp -p ${LIBDIR}/openmp/lib/libomp.dylib ${CMAKE_BINARY_DIR}/Resources/lib/libomp.dylib)
COMMAND mkdir -p ${CMAKE_BINARY_DIR}/Resources/lib
COMMAND cp -p ${LIBDIR}/openmp/lib/libomp.dylib ${CMAKE_BINARY_DIR}/Resources/lib/libomp.dylib
)
execute_process(
COMMAND mkdir -p ${CMAKE_BINARY_DIR}/bin/Resources/lib
COMMAND cp -p ${LIBDIR}/openmp/lib/libomp.dylib ${CMAKE_BINARY_DIR}/bin/Resources/lib/libomp.dylib)
COMMAND mkdir -p ${CMAKE_BINARY_DIR}/bin/Resources/lib
COMMAND cp -p ${LIBDIR}/openmp/lib/libomp.dylib ${CMAKE_BINARY_DIR}/bin/Resources/lib/libomp.dylib
)
endif()
endif()
if(WITH_XR_OPENXR)
find_package(OpenXR-SDK)
if(NOT OPENXR_SDK_FOUND)
message(WARNING "OpenXR-SDK was not found, disabling WITH_XR_OPENXR")
set(WITH_XR_OPENXR OFF)
endif()
endif()
@@ -439,7 +447,9 @@ if(${XCODE_VERSION} VERSION_EQUAL 5 OR ${XCODE_VERSION} VERSION_GREATER 5)
# Xcode 5 is always using CLANG, which has too low template depth of 128 for libmv
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -ftemplate-depth=1024")
endif()
# Get rid of eventually clashes, we export some symbols explicitly as local
# Avoid conflicts with Luxrender, and other plug-ins that may use the same
# libraries as Blender with a different version or build options.
set(PLATFORM_LINKFLAGS
"${PLATFORM_LINKFLAGS} -Xlinker -unexported_symbols_list -Xlinker '${CMAKE_SOURCE_DIR}/source/creator/osx_locals.map'"
)

View File

@@ -20,10 +20,6 @@
# Xcode and system configuration for Apple.
# require newer cmake on osx because of version handling,
# older cmake cannot handle 2 digit subversion!
cmake_minimum_required(VERSION 3.0.0)
if(NOT CMAKE_OSX_ARCHITECTURES)
set(CMAKE_OSX_ARCHITECTURES x86_64 CACHE STRING
"Choose the architecture you want to build Blender for: i386, x86_64 or ppc"
@@ -45,54 +41,98 @@ execute_process(
OUTPUT_VARIABLE XCODE_CHECK OUTPUT_STRIP_TRAILING_WHITESPACE)
string(REPLACE "/Contents/Developer" "" XCODE_BUNDLE ${XCODE_CHECK}) # truncate to bundlepath in any case
if(${CMAKE_GENERATOR} MATCHES "Xcode")
if(NOT ${CMAKE_GENERATOR} MATCHES "Xcode")
# Unix makefile generator does not fill XCODE_VERSION var, so we get it with a command.
# Note that `xcodebuild -version` gives output in two lines: first line will include
# Xcode version, second one will include build number. We are only interested in the
# former one. Here is an example of the output:
# Xcode 11.4
# Build version 11E146
# The expected XCODE_VERSION in this case is 11.4.
# earlier xcode has no bundled developer dir, no sense in getting xcode path from
if(${XCODE_VERSION} VERSION_GREATER 4.2)
# reduce to XCode name without dp extension
string(SUBSTRING "${XCODE_CHECK}" 14 6 DP_NAME)
if(${DP_NAME} MATCHES Xcode5)
set(XCODE_VERSION 5)
endif()
endif()
##### cmake incompatibility with xcode 4.3 and higher #####
if(${XCODE_VERSION} MATCHES '') # cmake fails due looking for xcode in the wrong path, thus will be empty var
message(FATAL_ERROR "Xcode 4.3 and higher must be used with cmake 2.8-8 or higher")
endif()
### end cmake incompatibility with xcode 4.3 and higher ###
if(${XCODE_VERSION} VERSION_EQUAL 4 OR ${XCODE_VERSION} VERSION_GREATER 4 AND ${XCODE_VERSION} VERSION_LESS 4.3)
# Xcode 4 defaults to the Apple LLVM Compiler.
# Override the default compiler selection because Blender only compiles with gcc up to xcode 4.2
set(CMAKE_XCODE_ATTRIBUTE_GCC_VERSION "com.apple.compilers.llvmgcc42")
message(STATUS "Setting compiler to: " ${CMAKE_XCODE_ATTRIBUTE_GCC_VERSION})
endif()
else() # unix makefile generator does not fill XCODE_VERSION var, so we get it with a command
execute_process(COMMAND xcodebuild -version OUTPUT_VARIABLE XCODE_VERS_BUILD_NR)
string(SUBSTRING "${XCODE_VERS_BUILD_NR}" 6 3 XCODE_VERSION) # truncate away build-nr
# Convert output to a single line by replacling newlines with spaces.
# This is needed because regex replace can not operate through the newline character
# and applies substitutions for each individual lines.
string(REPLACE "\n" " " XCODE_VERS_BUILD_NR_SINGLE_LINE "${XCODE_VERS_BUILD_NR}")
string(REGEX REPLACE "(.*)Xcode ([0-9\\.]+).*" "\\2" XCODE_VERSION "${XCODE_VERS_BUILD_NR_SINGLE_LINE}")
unset(XCODE_VERS_BUILD_NR)
unset(XCODE_VERS_BUILD_NR_SINGLE_LINE)
endif()
message(STATUS "Detected OS X ${OSX_SYSTEM} and Xcode ${XCODE_VERSION} at ${XCODE_BUNDLE}")
if(${XCODE_VERSION} VERSION_LESS 4.3)
# use guaranteed existing sdk
set(CMAKE_OSX_SYSROOT /Developer/SDKs/MacOSX${OSX_SYSTEM}.sdk CACHE PATH "" FORCE)
else()
# note: xcode-select path could be ambiguous,
# cause /Applications/Xcode.app/Contents/Developer or /Applications/Xcode.app would be allowed
# so i use a selfcomposed bundlepath here
set(OSX_SYSROOT_PREFIX ${XCODE_BUNDLE}/Contents/Developer/Platforms/MacOSX.platform)
message(STATUS "OSX_SYSROOT_PREFIX: " ${OSX_SYSROOT_PREFIX})
set(OSX_DEVELOPER_PREFIX /Developer/SDKs/MacOSX${OSX_SYSTEM}.sdk) # use guaranteed existing sdk
set(CMAKE_OSX_SYSROOT ${OSX_SYSROOT_PREFIX}/${OSX_DEVELOPER_PREFIX} CACHE PATH "" FORCE)
if(${CMAKE_GENERATOR} MATCHES "Xcode")
# to silence sdk not found warning, just overrides CMAKE_OSX_SYSROOT
set(CMAKE_XCODE_ATTRIBUTE_SDKROOT macosx${OSX_SYSTEM})
endif()
# Older Xcode versions had different approach to the directory hiearchy.
# Require newer Xcode which is also have better chances of being able to compile with the
# required deployment target.
#
# NOTE: Xcode version 8.2 is the latest one which runs on macOS 10.11.
if(${XCODE_VERSION} VERSION_LESS 8.2)
message(FATAL_ERROR "Only Xcode version 8.2 and newer is supported")
endif()
# note: xcode-select path could be ambiguous,
# cause /Applications/Xcode.app/Contents/Developer or /Applications/Xcode.app would be allowed
# so i use a selfcomposed bundlepath here
set(OSX_SYSROOT_PREFIX ${XCODE_BUNDLE}/Contents/Developer/Platforms/MacOSX.platform)
message(STATUS "OSX_SYSROOT_PREFIX: " ${OSX_SYSROOT_PREFIX})
# Collect list of OSX system versions which will be used to detect path to corresponding SDK.
# Start with macOS SDK version reported by xcodebuild and include possible extra ones.
#
# The reason for need of extra ones is because it's possible that xcodebuild will report
# SDK version in the full manner (aka major.minor.patch), but the actual path will only
# include major.minor.
#
# This happens, for example, on macOS Catalina 10.15.4 and Xcode 11.4: xcodebuild on this
# system outputs "10.15.4", but the actual SDK path is MacOSX10.15.sdk.
#
# This should be safe from picking wrong SDK version because (a) xcodebuild reports full semantic
# SDK version, so such SDK does exist on the system. And if it doesn't exist with full version
# in the path, what SDK is in the major.minor folder then.
set(OSX_SDK_TEST_VERSIONS ${OSX_SYSTEM})
if(OSX_SYSTEM MATCHES "([0-9]+)\\.([0-9]+)\\.([0-9]+)")
string(REGEX REPLACE "([0-9]+)\\.([0-9]+)\\.([0-9]+)" "\\1.\\2" OSX_SYSTEM_NO_PATCH "${OSX_SYSTEM}")
list(APPEND OSX_SDK_TEST_VERSIONS ${OSX_SYSTEM_NO_PATCH})
unset(OSX_SYSTEM_NO_PATCH)
endif()
# Loop through all possible versions and pick the first one which resolves to a valid SDK path.
set(OSX_SDK_PATH)
set(OSX_SDK_FOUND FALSE)
set(OSX_SDK_PREFIX ${OSX_SYSROOT_PREFIX}/Developer/SDKs)
set(OSX_SDKROOT)
foreach(OSX_SDK_VERSION ${OSX_SDK_TEST_VERSIONS})
set(CURRENT_OSX_SDK_PATH "${OSX_SDK_PREFIX}/MacOSX${OSX_SDK_VERSION}.sdk")
if(EXISTS ${CURRENT_OSX_SDK_PATH})
set(OSX_SDK_PATH "${CURRENT_OSX_SDK_PATH}")
set(OSX_SDKROOT macosx${OSX_SDK_VERSION})
set(OSX_SDK_FOUND TRUE)
break()
endif()
endforeach()
unset(OSX_SDK_PREFIX)
unset(OSX_SDK_TEST_VERSIONS)
if(NOT OSX_SDK_FOUND)
message(FATAL_ERROR "Unable to find SDK for macOS version ${OSX_SYSTEM}")
endif()
message(STATUS "Detected OSX_SYSROOT: ${OSX_SDK_PATH}")
set(CMAKE_OSX_SYSROOT ${OSX_SDK_PATH} CACHE PATH "" FORCE)
unset(OSX_SDK_PATH)
unset(OSX_SDK_FOUND)
if(${CMAKE_GENERATOR} MATCHES "Xcode")
# to silence sdk not found warning, just overrides CMAKE_OSX_SYSROOT
set(CMAKE_XCODE_ATTRIBUTE_SDKROOT ${OSX_SDKROOT})
endif()
unset(OSX_SDKROOT)
# 10.11 is our min. target, if you use higher sdk, weak linking happens
if(CMAKE_OSX_DEPLOYMENT_TARGET)
if(${CMAKE_OSX_DEPLOYMENT_TARGET} VERSION_LESS 10.11)

View File

@@ -57,6 +57,7 @@ if(EXISTS ${LIBDIR})
set(BOOST_ROOT ${LIBDIR}/boost)
set(BOOST_LIBRARYDIR ${LIBDIR}/boost/lib)
set(Boost_NO_SYSTEM_PATHS ON)
set(OPENEXR_ROOT_DIR ${LIBDIR}/openexr)
endif()
if(WITH_STATIC_LIBS)
@@ -195,8 +196,14 @@ endif()
if(WITH_OPENCOLLADA)
find_package_wrapper(OpenCOLLADA)
if(OPENCOLLADA_FOUND)
if(WITH_STATIC_LIBS)
# PCRE is bundled with OpenCollada without headers, so can't use
# find_package reliably to detect it.
set(PCRE_LIBRARIES ${LIBDIR}/opencollada/lib/libpcre.a)
else()
find_package_wrapper(PCRE)
endif()
find_package_wrapper(XML2)
find_package_wrapper(PCRE)
else()
set(WITH_OPENCOLLADA OFF)
endif()
@@ -405,13 +412,6 @@ if(WITH_LLVM)
endif()
endif()
if(WITH_LLVM OR WITH_SDL_DYNLOAD)
# Fix for conflict with Mesa llvmpipe
set(PLATFORM_LINKFLAGS
"${PLATFORM_LINKFLAGS} -Wl,--version-script='${CMAKE_SOURCE_DIR}/source/creator/blender.map'"
)
endif()
if(WITH_OPENSUBDIV)
find_package_wrapper(OpenSubdiv)
@@ -428,6 +428,14 @@ if(WITH_TBB)
find_package_wrapper(TBB)
endif()
if(WITH_XR_OPENXR)
find_package(XR-OpenXR-SDK)
if(NOT XR_OPENXR_SDK_FOUND)
message(WARNING "OpenXR-SDK not found, disabling WITH_XR_OPENXR")
set(WITH_XR_OPENXR OFF)
endif()
endif()
if(EXISTS ${LIBDIR})
without_system_libs_end()
endif()
@@ -497,7 +505,27 @@ if(WITH_SYSTEM_AUDASPACE)
endif()
endif()
if(WITH_X11)
if(WITH_GHOST_WAYLAND)
find_package(PkgConfig)
pkg_check_modules(wayland-client REQUIRED wayland-client>=1.12)
pkg_check_modules(wayland-egl REQUIRED wayland-egl)
pkg_check_modules(wayland-scanner REQUIRED wayland-scanner)
pkg_check_modules(xkbcommon REQUIRED xkbcommon)
pkg_check_modules(wayland-cursor REQUIRED wayland-cursor)
set(WITH_GL_EGL ON)
if(WITH_GHOST_WAYLAND)
list(APPEND PLATFORM_LINKLIBS
${wayland-client_LIBRARIES}
${wayland-egl_LIBRARIES}
${xkbcommon_LIBRARIES}
${wayland-cursor_LIBRARIES}
)
endif()
endif()
if(WITH_GHOST_X11)
find_package(X11 REQUIRED)
find_path(X11_XF86keysym_INCLUDE_PATH X11/XF86keysym.h ${X11_INC_SEARCH_PATH})
@@ -568,6 +596,19 @@ if(CMAKE_COMPILER_IS_GNUCC)
unset(LD_VERSION)
endif()
if(WITH_LINKER_LLD)
execute_process(
COMMAND ${CMAKE_C_COMPILER} -fuse-ld=lld -Wl,--version
ERROR_QUIET OUTPUT_VARIABLE LD_VERSION)
if("${LD_VERSION}" MATCHES "LLD")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fuse-ld=lld")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fuse-ld=lld")
else()
message(STATUS "LLD linker isn't available, using the default system linker.")
endif()
unset(LD_VERSION)
endif()
# CLang is the same as GCC for now.
elseif(CMAKE_C_COMPILER_ID MATCHES "Clang")
set(PLATFORM_CFLAGS "-pipe -fPIC -funsigned-char -fno-strict-aliasing")
@@ -593,3 +634,16 @@ elseif(CMAKE_C_COMPILER_ID MATCHES "Intel")
set(PLATFORM_CFLAGS "-pipe -fPIC -funsigned-char -fno-strict-aliasing")
set(PLATFORM_LINKFLAGS "${PLATFORM_LINKFLAGS} -static-intel")
endif()
# Avoid conflicts with Mesa llvmpipe, Luxrender, and other plug-ins that may
# use the same libraries as Blender with a different version or build options.
set(PLATFORM_LINKFLAGS
"${PLATFORM_LINKFLAGS} -Wl,--version-script='${CMAKE_SOURCE_DIR}/source/creator/blender.map'"
)
# Don't use position independent executable for portable install since file
# browsers can't properly detect blender as an executable then. Still enabled
# for non-portable installs as typically used by Linux distributions.
if(WITH_INSTALL_PORTABLE)
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -no-pie")
endif()

View File

@@ -51,6 +51,10 @@ if(CMAKE_C_COMPILER_ID MATCHES "Clang")
endif()
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} \"${CLANG_OPENMP_LIB}\"")
endif()
if(WITH_WINDOWS_STRIPPED_PDB)
message(WARNING "stripped pdb not supported with clang, disabling..")
set(WITH_WINDOWS_STRIPPED_PDB Off)
endif()
endif()
set_property(GLOBAL PROPERTY USE_FOLDERS ${WINDOWS_USE_VISUAL_STUDIO_PROJECT_FOLDERS})
@@ -107,12 +111,13 @@ endif()
unset(_min_ver)
# needed for some MSVC installations
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /SAFESEH:NO")
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /SAFESEH:NO")
set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} /SAFESEH:NO")
# 4099 : PDB 'filename' was not found with 'object/library'
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /SAFESEH:NO /ignore:4099")
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /SAFESEH:NO /ignore:4099")
set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} /SAFESEH:NO /ignore:4099")
list(APPEND PLATFORM_LINKLIBS
ws2_32 vfw32 winmm kernel32 user32 gdi32 comdlg32 Comctl32
ws2_32 vfw32 winmm kernel32 user32 gdi32 comdlg32 Comctl32 version
advapi32 shfolder shell32 ole32 oleaut32 uuid psapi Dbghelp Shlwapi
)
@@ -134,7 +139,12 @@ add_definitions(-D_ALLOW_KEYWORD_MACROS)
# We want to support Windows 7 level ABI
add_definitions(-D_WIN32_WINNT=0x601)
include(build_files/cmake/platform/platform_win32_bundle_crt.cmake)
remove_cc_flag("/MDd" "/MD")
remove_cc_flag("/MDd" "/MD" "/Zi")
if(WITH_WINDOWS_PDB)
set(PDB_INFO_OVERRIDE_FLAGS "/Z7")
set(PDB_INFO_OVERRIDE_LINKER_FLAGS "/DEBUG /OPT:REF /OPT:ICF /INCREMENTAL:NO")
endif()
if(MSVC_CLANG) # Clangs version of cl doesn't support all flags
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CXX_WARN_FLAGS} /nologo /J /Gd /EHsc -Wno-unused-command-line-argument -Wno-microsoft-enum-forward-reference ")
@@ -151,27 +161,42 @@ if(MSVC_VERSION GREATER 1911 AND NOT MSVC_CLANG)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /Zc:twoPhase-")
endif()
if(WITH_WINDOWS_SCCACHE AND CMAKE_VS_MSBUILD_COMMAND)
message(WARNING "Disabling sccache, sccache is not supported with msbuild")
set(WITH_WINDOWS_SCCACHE Off)
endif()
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /MDd /ZI")
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} /MDd /ZI")
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /MD")
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} /MD")
set(CMAKE_CXX_FLAGS_MINSIZEREL "${CMAKE_CXX_FLAGS_MINSIZEREL} /MD")
set(CMAKE_C_FLAGS_MINSIZEREL "${CMAKE_C_FLAGS_MINSIZEREL} /MD")
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} /MD")
set(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO} /MD")
if(WITH_WINDOWS_SCCACHE)
set(CMAKE_C_COMPILER_LAUNCHER sccache)
set(CMAKE_CXX_COMPILER_LAUNCHER sccache)
set(SYMBOL_FORMAT /Z7)
else()
unset(CMAKE_C_COMPILER_LAUNCHER)
unset(CMAKE_CXX_COMPILER_LAUNCHER)
set(SYMBOL_FORMAT /ZI)
endif()
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /MDd ${SYMBOL_FORMAT}")
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} /MDd ${SYMBOL_FORMAT}")
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /MD ${PDB_INFO_OVERRIDE_FLAGS}")
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} /MD ${PDB_INFO_OVERRIDE_FLAGS}")
set(CMAKE_CXX_FLAGS_MINSIZEREL "${CMAKE_CXX_FLAGS_MINSIZEREL} /MD ${PDB_INFO_OVERRIDE_FLAGS}")
set(CMAKE_C_FLAGS_MINSIZEREL "${CMAKE_C_FLAGS_MINSIZEREL} /MD ${PDB_INFO_OVERRIDE_FLAGS}")
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} /MD ${SYMBOL_FORMAT}")
set(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO} /MD ${SYMBOL_FORMAT}")
unset(SYMBOL_FORMAT)
# JMC is available on msvc 15.8 (1915) and up
if(MSVC_VERSION GREATER 1914 AND NOT MSVC_CLANG)
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /JMC")
endif()
set(PLATFORM_LINKFLAGS "${PLATFORM_LINKFLAGS} /SUBSYSTEM:CONSOLE /STACK:2097152 /INCREMENTAL:NO ")
set(PLATFORM_LINKFLAGS "${PLATFORM_LINKFLAGS} /SUBSYSTEM:CONSOLE /STACK:2097152")
set(PLATFORM_LINKFLAGS_RELEASE "/NODEFAULTLIB:libcmt.lib /NODEFAULTLIB:libcmtd.lib /NODEFAULTLIB:msvcrtd.lib")
set(PLATFORM_LINKFLAGS_DEBUG "${PLATFORM_LINKFLAGS_DEBUG} /IGNORE:4099 /NODEFAULTLIB:libcmt.lib /NODEFAULTLIB:msvcrt.lib /NODEFAULTLIB:libcmtd.lib")
# Ignore meaningless for us linker warnings.
set(PLATFORM_LINKFLAGS "${PLATFORM_LINKFLAGS} /ignore:4049 /ignore:4217 /ignore:4221")
set(PLATFORM_LINKFLAGS_RELEASE "${PLATFORM_LINKFLAGS} ${PDB_INFO_OVERRIDE_LINKER_FLAGS}")
set(CMAKE_STATIC_LINKER_FLAGS "${CMAKE_STATIC_LINKER_FLAGS} /ignore:4221")
if(CMAKE_CL_64)
@@ -209,7 +234,7 @@ endif()
# Mark libdir as system headers with a lower warn level, to resolve some warnings
# that we have very little control over
if(MSVC_VERSION GREATER_EQUAL 1914 AND NOT MSVC_CLANG)
if(MSVC_VERSION GREATER_EQUAL 1914 AND NOT MSVC_CLANG AND NOT WITH_WINDOWS_SCCACHE)
add_compile_options(/experimental:external /external:templates- /external:I "${LIBDIR}" /external:W0)
endif()
@@ -453,7 +478,7 @@ if(WITH_OPENIMAGEIO)
set(OPENIMAGEIO_DEFINITIONS "-DUSE_TBB=0")
set(OPENCOLORIO_DEFINITIONS "-DOCIO_STATIC_BUILD")
set(OPENIMAGEIO_IDIFF "${OPENIMAGEIO}/bin/idiff.exe")
add_definitions(-DOIIO_STATIC_BUILD)
add_definitions(-DOIIO_STATIC_DEFINE)
add_definitions(-DOIIO_NO_SSE=1)
endif()
@@ -572,7 +597,7 @@ if(WITH_SYSTEM_AUDASPACE)
endif()
if(WITH_TBB)
set(TBB_LIBRARIES optimized ${LIBDIR}/tbb/lib/tbb.lib debug ${LIBDIR}/tbb/lib/tbb_debug.lib)
set(TBB_LIBRARIES optimized ${LIBDIR}/tbb/lib/tbb.lib debug ${LIBDIR}/tbb/lib/debug/tbb_debug.lib)
set(TBB_INCLUDE_DIR ${LIBDIR}/tbb/include)
set(TBB_INCLUDE_DIRS ${TBB_INCLUDE_DIR})
if(WITH_TBB_MALLOC_PROXY)
@@ -669,10 +694,10 @@ if(WITH_USD)
set(USD_INCLUDE_DIRS ${LIBDIR}/usd/include)
set(USD_RELEASE_LIB ${LIBDIR}/usd/lib/libusd_m.lib)
set(USD_DEBUG_LIB ${LIBDIR}/usd/lib/libusd_m_d.lib)
set(USD_LIBRARY_DIR ${LIBDIR}/usd/lib/usd)
set(USD_LIBRARY_DIR ${LIBDIR}/usd/lib)
set(USD_LIBRARIES
debug ${USD_DEBUG_LIB}
optimized ${USD_RELEASE_LIB}
debug ${USD_DEBUG_LIB}
optimized ${USD_RELEASE_LIB}
)
endif()
endif()
@@ -713,3 +738,15 @@ if(WINDOWS_PYTHON_DEBUG)
</Project>")
endif()
endif()
if(WITH_XR_OPENXR)
if(EXISTS ${LIBDIR}/xr_openxr_sdk)
set(XR_OPENXR_SDK ${LIBDIR}/xr_openxr_sdk)
set(XR_OPENXR_SDK_LIBPATH ${LIBDIR}/xr_openxr_sdk/lib)
set(XR_OPENXR_SDK_INCLUDE_DIR ${XR_OPENXR_SDK}/include)
set(XR_OPENXR_SDK_LIBRARIES optimized ${XR_OPENXR_SDK_LIBPATH}/openxr_loader.lib debug ${XR_OPENXR_SDK_LIBPATH}/openxr_loader_d.lib)
else()
message(WARNING "OpenXR-SDK was not found, disabling WITH_XR_OPENXR")
set(WITH_XR_OPENXR OFF)
endif()
endif()

View File

@@ -7,15 +7,14 @@ BASE_DIR="$PWD"
blender_srcdir=$(dirname -- $0)/../..
blender_version=$(grep "BLENDER_VERSION\s" "$blender_srcdir/source/blender/blenkernel/BKE_blender_version.h" | awk '{print $3}')
blender_version_char=$(grep "BLENDER_VERSION_CHAR\s" "$blender_srcdir/source/blender/blenkernel/BKE_blender_version.h" | awk '{print $3}')
blender_version_patch=$(grep "BLENDER_VERSION_PATCH\s" "$blender_srcdir/source/blender/blenkernel/BKE_blender_version.h" | awk '{print $3}')
blender_version_cycle=$(grep "BLENDER_VERSION_CYCLE\s" "$blender_srcdir/source/blender/blenkernel/BKE_blender_version.h" | awk '{print $3}')
blender_subversion=$(grep "BLENDER_SUBVERSION\s" "$blender_srcdir/source/blender/blenkernel/BKE_blender_version.h" | awk '{print $3}')
VERSION=$(expr $blender_version / 100).$(expr $blender_version % 100).$blender_version_patch
if [ "$blender_version_cycle" = "release" ] ; then
VERSION=$(expr $blender_version / 100).$(expr $blender_version % 100)$blender_version_char
SUBMODULE_EXCLUDE="^\(release/scripts/addons_contrib\)$"
else
VERSION=$(expr $blender_version / 100).$(expr $blender_version % 100)_$blender_subversion
VERSION=$VERSION-$blender_version_cycle
SUBMODULE_EXCLUDE="^$" # dummy regex
fi

View File

@@ -6,9 +6,6 @@ if %ERRORLEVEL% EQU 0 goto DetectionComplete
call "%~dp0\detect_msvc2019.cmd"
if %ERRORLEVEL% EQU 0 goto DetectionComplete
call "%~dp0\detect_msvc2015.cmd"
if %ERRORLEVEL% EQU 0 goto DetectionComplete
echo Compiler Detection failed. Use verbose switch for more information.
exit /b 1

View File

@@ -2,6 +2,11 @@ set BUILD_GENERATOR_POST=
set BUILD_PLATFORM_SELECT=
set MSBUILD_PLATFORM=x64
if "%BUILD_WITH_SCCACHE%"=="1" (
echo sccache is only supported with ninja as the build system.
exit /b 1
)
if "%WITH_CLANG%"=="1" (
set CLANG_CMAKE_ARGS=-T"llvm"
if "%WITH_ASAN%"=="1" (

View File

@@ -6,6 +6,13 @@ if %ERRORLEVEL% NEQ 0 (
set BUILD_CMAKE_ARGS=%BUILD_CMAKE_ARGS% -G "Ninja" %TESTS_CMAKE_ARGS% -DCMAKE_BUILD_TYPE=%BUILD_TYPE%
if "%BUILD_WITH_SCCACHE%"=="1" (
set BUILD_CMAKE_ARGS=%BUILD_CMAKE_ARGS% -DWITH_WINDOWS_SCCACHE=On
if NOT "%verbose%" == "" (
echo Enabling sccache
)
)
if "%WITH_CLANG%" == "1" (
set LLVM_DIR=
for /F "usebackq skip=2 tokens=1-2*" %%A IN (`REG QUERY "HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\LLVM\LLVM" /ve 2^>nul`) DO set LLVM_DIR=%%C

View File

@@ -1,3 +0,0 @@
set BUILD_VS_VER=14
set BUILD_VS_YEAR=2015
call "%~dp0\detect_msvc_classic.cmd"

View File

@@ -1,69 +0,0 @@
if NOT "%verbose%" == "" (
echo Detecting msvc %BUILD_VS_YEAR%
)
set KEY_NAME="HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\%BUILD_VS_VER%.0\Setup\VC"
for /F "usebackq skip=2 tokens=1-2*" %%A IN (`REG QUERY %KEY_NAME% /v ProductDir 2^>nul`) DO set MSVC_VC_DIR=%%C
if DEFINED MSVC_VC_DIR (
if NOT "%verbose%" == "" (
echo Visual Studio %BUILD_VS_YEAR% on Win64 detected at "%MSVC_VC_DIR%"
)
goto msvc_detect_finally
)
REM Check 32 bits
set KEY_NAME="HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\%BUILD_VS_VER%.0\Setup\VC"
for /F "usebackq skip=2 tokens=1-2*" %%A IN (`REG QUERY %KEY_NAME% /v ProductDir 2^>nul`) DO set MSVC_VC_DIR=%%C
if DEFINED MSVC_VC_DIR (
if NOT "%verbose%" == "" (
echo Visual Studio %BUILD_VS_YEAR% on Win32 detected at "%MSVC_VC_DIR%"
)
goto msvc_detect_finally
)
if NOT "%verbose%" == "" (
echo Visual Studio %BUILD_VS_YEAR% not found.
)
goto FAIL
:msvc_detect_finally
set VCVARS=%MSVC_VC_DIR%\vcvarsall.bat
if not exist "%VCVARS%" (
echo "%VCVARS%" not found.
goto FAIL
)
call "%vcvars%" %BUILD_ARCH%
rem try msbuild
msbuild /version > NUL
if errorlevel 1 (
if NOT "%verbose%" == "" (
echo Visual Studio %BUILD_VS_YEAR% msbuild not found
)
goto FAIL
)
if NOT "%verbose%" == "" (
echo Visual Studio %BUILD_VS_YEAR% msbuild found
)
REM try the c++ compiler
cl 2> NUL 1>&2
if errorlevel 1 (
if NOT "%verbose%" == "" (
echo Visual Studio %BUILD_VS_YEAR% C/C++ Compiler not found
)
goto FAIL
)
if NOT "%verbose%" == "" (
echo Visual Studio %BUILD_VS_YEAR% C/C++ Compiler found
)
goto DetectionComplete
:FAIL
exit /b 1
:DetectionComplete
if NOT "%verbose%" == "" (
echo Visual Studio %BUILD_VS_YEAR% Detected successfully
)
exit /b 0

View File

@@ -27,7 +27,13 @@ if NOT "%verbose%" == "" (
if "%VS_InstallDir%"=="" (
if NOT "%verbose%" == "" (
echo Visual Studio is detected but the "Desktop development with C++" workload has not been instlled
echo.
echo Visual Studio is detected but no suitable installation was found.
echo.
echo Check the "Desktop development with C++" workload has been installed.
echo.
echo If you are attempting to use either Visual Studio Preview version or the Visual C++ Build tools, Please see 'make help' on how to opt in to those toolsets.
echo.
goto FAIL
)
)

View File

@@ -66,8 +66,6 @@ if NOT "%1" == "" (
) else if "%1" == "2019b" (
set BUILD_VS_YEAR=2019
set VSWHERE_ARGS=-products Microsoft.VisualStudio.Product.BuildTools
) else if "%1" == "2015" (
set BUILD_VS_YEAR=2015
) else if "%1" == "packagename" (
set BUILD_CMAKE_ARGS=%BUILD_CMAKE_ARGS% -DCPACK_OVERRIDE_PACKAGENAME="%2"
shift /1
@@ -88,6 +86,8 @@ if NOT "%1" == "" (
set BUILD_UPDATE_ARGS="--no-libraries"
) else if "%1" == "ninja" (
SET BUILD_WITH_NINJA=1
) else if "%1" == "sccache" (
SET BUILD_WITH_SCCACHE=1
) else if "%1" == "clean" (
set MUST_CLEAN=1
) else if "%1" == "verbose" (

View File

@@ -30,3 +30,4 @@ set WITH_PYDEBUG=
set PYDEBUG_CMAKE_ARGS=
set FORMAT=
set TEST=
set BUILD_WITH_SCCACHE=

View File

@@ -23,15 +23,17 @@ echo - with_tests ^(enable building unit tests^)
echo - nobuildinfo ^(disable buildinfo^)
echo - debug ^(Build an unoptimized debuggable build^)
echo - packagename [newname] ^(override default cpack package name^)
echo - buildir [newdir] ^(override default build folder^)
echo - builddir [newdir] ^(override default build folder^)
echo - 2017 ^(build with visual studio 2017^)
echo - 2017pre ^(build with visual studio 2017 pre-release^)
echo - 2017b ^(build with visual studio 2017 Build Tools^)
echo - 2019 ^(build with visual studio 2019^)
echo - 2019pre ^(build with visual studio 2019 pre-release^)
echo - 2019b ^(build with visual studio 2019 Build Tools^)
echo.
echo Experimental options
echo - with_opengl_tests ^(enable both the render and draw opengl test suites^)
echo - 2015 ^(build with visual studio 2015^)
echo - clang ^(enable building with clang^)
echo - asan ^(enable asan when building with clang^)
echo - ninja ^(enable building with ninja instead of msbuild^)

View File

@@ -38,7 +38,7 @@ PROJECT_NAME = Blender
# could be handy for archiving the generated documentation or if some version
# control system is used.
PROJECT_NUMBER = "V2.83"
PROJECT_NUMBER = "V2.90"
# Using the PROJECT_BRIEF tag one can provide an optional one line description
# for a project that appears at the top of each page and should give viewer a
@@ -51,7 +51,7 @@ PROJECT_BRIEF =
# pixels and the maximum width should not exceed 200 pixels. Doxygen will copy
# the logo to the output directory.
PROJECT_LOGO = ../../release/freedesktop/icons/48x48/apps/blender.png
PROJECT_LOGO = ../../release/freedesktop/icons/scalable/apps/blender.svg
# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) path
# into which the generated documentation will be written. If a relative path is
@@ -1720,7 +1720,7 @@ COMPACT_LATEX = NO
# The default value is: a4.
# This tag requires that the tag GENERATE_LATEX is set to YES.
PAPER_TYPE = a4wide
PAPER_TYPE = a4
# The EXTRA_PACKAGES tag can be used to specify one or more LaTeX package names
# that should be included in the LaTeX output. The package can be specified just

View File

@@ -2,20 +2,20 @@
Basic Sound Playback
++++++++++++++++++++
This script shows how to use the classes: :class:`Device`, :class:`Factory` and
This script shows how to use the classes: :class:`Device`, :class:`Sound` and
:class:`Handle`.
"""
import aud
device = aud.device()
device = aud.Device()
# load sound file (it can be a video file with audio)
factory = aud.Factory('music.ogg')
sound = aud.Sound('music.ogg')
# play the audio, this return a handle to control play/pause
handle = device.play(factory)
handle = device.play(sound)
# if the audio is not too big and will be used often you can buffer it
factory_buffered = aud.Factory.buffer(factory)
handle_buffered = device.play(factory_buffered)
sound_buffered = aud.Sound.buffer(sound)
handle_buffered = device.play(sound_buffered)
# stop the sounds (otherwise they play until their ends)
handle.stop()

View File

@@ -0,0 +1,44 @@
"""
The message bus system can be used to receive notifications when properties of
Blender datablocks are changed via the data API.
Limitations
-----------
The message bus system is triggered by updates via the RNA system. This means
that the following updates will result in a notification on the message bus:
- Changes via the Python API, for example ``some_object.location.x += 3``.
- Changes via the sliders, fields, and buttons in the user interface.
The following updates do **not** trigger message bus notifications:
- Moving objects in the 3D Viewport.
- Changes performed by the animation system.
Example Use
-----------
Below is an example of subscription to changes in the active object's location.
"""
import bpy
# Any Python object can act as the subscription's owner.
owner = object()
subscribe_to = bpy.context.object.location
def msgbus_callback(*args):
# This will print:
# Something changed! (1, 2, 3)
print("Something changed!", args)
bpy.msgbus.subscribe_rna(
key=subscribe_to,
owner=owner,
args=(1, 2, 3),
notify=msgbus_callback,
)

View File

@@ -0,0 +1,6 @@
"""
Some properties are converted to Python objects when you retrieve them. This
needs to be avoided in order to create the subscription, by using
``datablock.path_resolve("property_name", False)``:
"""
subscribe_to = bpy.context.object.path_resolve("name", False)

View File

@@ -0,0 +1,5 @@
"""
It is also possible to create subscriptions on a property of all instances of a
certain type:
"""
subscribe_to = (bpy.types.Object, "location")

View File

@@ -6,7 +6,7 @@ bl_info = {
"location": "SpaceBar Search -> Add-on Preferences Example",
"description": "Example Add-on",
"warning": "",
"wiki_url": "",
"doc_url": "",
"tracker_url": "",
"category": "Object",
}

View File

@@ -119,4 +119,24 @@ Examples
To try these examples, just copy them into Blenders text editor and execute them.
To keep the examples relatively small, they just register a draw function that can't easily be removed anymore.
Blender has to be restarted in order to delete the draw handlers.
3D Lines with Single Color
--------------------------
"""
import bpy
import gpu
from gpu_extras.batch import batch_for_shader
coords = [(1, 1, 1), (-2, 0, 0), (-2, -1, 3), (0, 1, 1)]
shader = gpu.shader.from_builtin('3D_UNIFORM_COLOR')
batch = batch_for_shader(shader, 'LINES', {"pos": coords})
def draw():
shader.bind()
shader.uniform_float("color", (1, 1, 0, 1))
batch.draw(shader)
bpy.types.SpaceView3D.draw_handler_add(draw, (), 'WINDOW', 'POST_VIEW')

View File

@@ -1,41 +1,65 @@
"""
Rendering the 3D View into a Texture
------------------------------------
Custom Shader for dotted 3D Line
--------------------------------
The scene has to have a camera for this example to work.
You could also make this independent of a specific camera,
but Blender does not expose good functions to create view and projection matrices yet.
In this example the arc length (distance to the first point on the line) is calculated in every vertex.
Between the vertex and fragment shader that value is automatically interpolated
for all points that will be visible on the screen.
In the fragment shader the ``sin`` of the arc length is calculated.
Based on the result a decision is made on whether the fragment should be drawn or not.
"""
import bpy
import bgl
import gpu
from gpu_extras.presets import draw_texture_2d
from random import random
from mathutils import Vector
from gpu_extras.batch import batch_for_shader
WIDTH = 512
HEIGHT = 256
vertex_shader = '''
uniform mat4 u_ViewProjectionMatrix;
offscreen = gpu.types.GPUOffScreen(WIDTH, HEIGHT)
in vec3 position;
in float arcLength;
out float v_ArcLength;
void main()
{
v_ArcLength = arcLength;
gl_Position = u_ViewProjectionMatrix * vec4(position, 1.0f);
}
'''
fragment_shader = '''
uniform float u_Scale;
in float v_ArcLength;
void main()
{
if (step(sin(v_ArcLength * u_Scale), 0.5) == 1) discard;
gl_FragColor = vec4(1.0);
}
'''
coords = [Vector((random(), random(), random())) * 5 for _ in range(5)]
arc_lengths = [0]
for a, b in zip(coords[:-1], coords[1:]):
arc_lengths.append(arc_lengths[-1] + (a - b).length)
shader = gpu.types.GPUShader(vertex_shader, fragment_shader)
batch = batch_for_shader(
shader, 'LINE_STRIP',
{"position": coords, "arcLength": arc_lengths},
)
def draw():
context = bpy.context
scene = context.scene
view_matrix = scene.camera.matrix_world.inverted()
projection_matrix = scene.camera.calc_matrix_camera(
context.evaluated_depsgraph_get(), x=WIDTH, y=HEIGHT)
offscreen.draw_view3d(
scene,
context.view_layer,
context.space_data,
context.region,
view_matrix,
projection_matrix)
bgl.glDisable(bgl.GL_DEPTH_TEST)
draw_texture_2d(offscreen.color_texture, (10, 10), WIDTH, HEIGHT)
shader.bind()
matrix = bpy.context.region_data.perspective_matrix
shader.uniform_float("u_ViewProjectionMatrix", matrix)
shader.uniform_float("u_Scale", 10)
batch.draw(shader)
bpy.types.SpaceView3D.draw_handler_add(draw, (), 'WINDOW', 'POST_PIXEL')
bpy.types.SpaceView3D.draw_handler_add(draw, (), 'WINDOW', 'POST_VIEW')

View File

@@ -1,65 +0,0 @@
"""
Custom Shader for dotted 3D Line
--------------------------------
In this example the arc length (distance to the first point on the line) is calculated in every vertex.
Between the vertex and fragment shader that value is automatically interpolated
for all points that will be visible on the screen.
In the fragment shader the ``sin`` of the arc length is calculated.
Based on the result a decision is made on whether the fragment should be drawn or not.
"""
import bpy
import gpu
from random import random
from mathutils import Vector
from gpu_extras.batch import batch_for_shader
vertex_shader = '''
uniform mat4 u_ViewProjectionMatrix;
in vec3 position;
in float arcLength;
out float v_ArcLength;
void main()
{
v_ArcLength = arcLength;
gl_Position = u_ViewProjectionMatrix * vec4(position, 1.0f);
}
'''
fragment_shader = '''
uniform float u_Scale;
in float v_ArcLength;
void main()
{
if (step(sin(v_ArcLength * u_Scale), 0.5) == 1) discard;
gl_FragColor = vec4(1.0);
}
'''
coords = [Vector((random(), random(), random())) * 5 for _ in range(5)]
arc_lengths = [0]
for a, b in zip(coords[:-1], coords[1:]):
arc_lengths.append(arc_lengths[-1] + (a - b).length)
shader = gpu.types.GPUShader(vertex_shader, fragment_shader)
batch = batch_for_shader(
shader, 'LINE_STRIP',
{"position": coords, "arcLength": arc_lengths},
)
def draw():
shader.bind()
matrix = bpy.context.region_data.perspective_matrix
shader.uniform_float("u_ViewProjectionMatrix", matrix)
shader.uniform_float("u_Scale", 10)
batch.draw(shader)
bpy.types.SpaceView3D.draw_handler_add(draw, (), 'WINDOW', 'POST_VIEW')

View File

@@ -1,19 +1,45 @@
"""
3D Lines with Single Color
--------------------------
Triangle with Custom Shader
---------------------------
"""
import bpy
import gpu
from gpu_extras.batch import batch_for_shader
coords = [(1, 1, 1), (-2, 0, 0), (-2, -1, 3), (0, 1, 1)]
shader = gpu.shader.from_builtin('3D_UNIFORM_COLOR')
batch = batch_for_shader(shader, 'LINES', {"pos": coords})
vertex_shader = '''
uniform mat4 viewProjectionMatrix;
in vec3 position;
out vec3 pos;
void main()
{
pos = position;
gl_Position = viewProjectionMatrix * vec4(position, 1.0f);
}
'''
fragment_shader = '''
uniform float brightness;
in vec3 pos;
void main()
{
gl_FragColor = vec4(pos * brightness, 1.0);
}
'''
coords = [(1, 1, 1), (2, 0, 0), (-2, -1, 3)]
shader = gpu.types.GPUShader(vertex_shader, fragment_shader)
batch = batch_for_shader(shader, 'TRIS', {"position": coords})
def draw():
shader.bind()
shader.uniform_float("color", (1, 1, 0, 1))
matrix = bpy.context.region_data.perspective_matrix
shader.uniform_float("viewProjectionMatrix", matrix)
shader.uniform_float("brightness", 0.5)
batch.draw(shader)

View File

@@ -1,45 +1,29 @@
"""
Triangle with Custom Shader
---------------------------
Wireframe Cube using Index Buffer
---------------------------------
"""
import bpy
import gpu
from gpu_extras.batch import batch_for_shader
vertex_shader = '''
uniform mat4 viewProjectionMatrix;
coords = (
(-1, -1, -1), (+1, -1, -1),
(-1, +1, -1), (+1, +1, -1),
(-1, -1, +1), (+1, -1, +1),
(-1, +1, +1), (+1, +1, +1))
in vec3 position;
out vec3 pos;
indices = (
(0, 1), (0, 2), (1, 3), (2, 3),
(4, 5), (4, 6), (5, 7), (6, 7),
(0, 4), (1, 5), (2, 6), (3, 7))
void main()
{
pos = position;
gl_Position = viewProjectionMatrix * vec4(position, 1.0f);
}
'''
fragment_shader = '''
uniform float brightness;
in vec3 pos;
void main()
{
gl_FragColor = vec4(pos * brightness, 1.0);
}
'''
coords = [(1, 1, 1), (2, 0, 0), (-2, -1, 3)]
shader = gpu.types.GPUShader(vertex_shader, fragment_shader)
batch = batch_for_shader(shader, 'TRIS', {"position": coords})
shader = gpu.shader.from_builtin('3D_UNIFORM_COLOR')
batch = batch_for_shader(shader, 'LINES', {"pos": coords}, indices=indices)
def draw():
shader.bind()
matrix = bpy.context.region_data.perspective_matrix
shader.uniform_float("viewProjectionMatrix", matrix)
shader.uniform_float("brightness", 0.5)
shader.uniform_float("color", (1, 0, 0, 1))
batch.draw(shader)

View File

@@ -1,30 +1,39 @@
"""
Wireframe Cube using Index Buffer
---------------------------------
Mesh with Random Vertex Colors
------------------------------
"""
import bpy
import gpu
import bgl
import numpy as np
from random import random
from gpu_extras.batch import batch_for_shader
coords = (
(-1, -1, -1), (+1, -1, -1),
(-1, +1, -1), (+1, +1, -1),
(-1, -1, +1), (+1, -1, +1),
(-1, +1, +1), (+1, +1, +1))
mesh = bpy.context.active_object.data
mesh.calc_loop_triangles()
indices = (
(0, 1), (0, 2), (1, 3), (2, 3),
(4, 5), (4, 6), (5, 7), (6, 7),
(0, 4), (1, 5), (2, 6), (3, 7))
vertices = np.empty((len(mesh.vertices), 3), 'f')
indices = np.empty((len(mesh.loop_triangles), 3), 'i')
shader = gpu.shader.from_builtin('3D_UNIFORM_COLOR')
batch = batch_for_shader(shader, 'LINES', {"pos": coords}, indices=indices)
mesh.vertices.foreach_get(
"co", np.reshape(vertices, len(mesh.vertices) * 3))
mesh.loop_triangles.foreach_get(
"vertices", np.reshape(indices, len(mesh.loop_triangles) * 3))
vertex_colors = [(random(), random(), random(), 1) for _ in range(len(mesh.vertices))]
shader = gpu.shader.from_builtin('3D_SMOOTH_COLOR')
batch = batch_for_shader(
shader, 'TRIS',
{"pos": vertices, "color": vertex_colors},
indices=indices,
)
def draw():
shader.bind()
shader.uniform_float("color", (1, 0, 0, 1))
bgl.glEnable(bgl.GL_DEPTH_TEST)
batch.draw(shader)
bgl.glDisable(bgl.GL_DEPTH_TEST)
bpy.types.SpaceView3D.draw_handler_add(draw, (), 'WINDOW', 'POST_VIEW')

View File

@@ -1,39 +1,26 @@
"""
Mesh with Random Vertex Colors
------------------------------
2D Rectangle
------------
"""
import bpy
import gpu
import bgl
import numpy as np
from random import random
from gpu_extras.batch import batch_for_shader
mesh = bpy.context.active_object.data
mesh.calc_loop_triangles()
vertices = (
(100, 100), (300, 100),
(100, 200), (300, 200))
vertices = np.empty((len(mesh.vertices), 3), 'f')
indices = np.empty((len(mesh.loop_triangles), 3), 'i')
indices = (
(0, 1, 2), (2, 1, 3))
mesh.vertices.foreach_get(
"co", np.reshape(vertices, len(mesh.vertices) * 3))
mesh.loop_triangles.foreach_get(
"vertices", np.reshape(indices, len(mesh.loop_triangles) * 3))
vertex_colors = [(random(), random(), random(), 1) for _ in range(len(mesh.vertices))]
shader = gpu.shader.from_builtin('3D_SMOOTH_COLOR')
batch = batch_for_shader(
shader, 'TRIS',
{"pos": vertices, "color": vertex_colors},
indices=indices,
)
shader = gpu.shader.from_builtin('2D_UNIFORM_COLOR')
batch = batch_for_shader(shader, 'TRIS', {"pos": vertices}, indices=indices)
def draw():
bgl.glEnable(bgl.GL_DEPTH_TEST)
shader.bind()
shader.uniform_float("color", (0, 0.5, 0.5, 1.0))
batch.draw(shader)
bgl.glDisable(bgl.GL_DEPTH_TEST)
bpy.types.SpaceView3D.draw_handler_add(draw, (), 'WINDOW', 'POST_VIEW')
bpy.types.SpaceView3D.draw_handler_add(draw, (), 'WINDOW', 'POST_PIXEL')

View File

@@ -1,25 +1,36 @@
"""
2D Rectangle
------------
2D Image
--------
To use this example you have to provide an image that should be displayed.
"""
import bpy
import gpu
import bgl
from gpu_extras.batch import batch_for_shader
vertices = (
(100, 100), (300, 100),
(100, 200), (300, 200))
IMAGE_NAME = "Untitled"
image = bpy.data.images[IMAGE_NAME]
indices = (
(0, 1, 2), (2, 1, 3))
shader = gpu.shader.from_builtin('2D_IMAGE')
batch = batch_for_shader(
shader, 'TRI_FAN',
{
"pos": ((100, 100), (200, 100), (200, 200), (100, 200)),
"texCoord": ((0, 0), (1, 0), (1, 1), (0, 1)),
},
)
shader = gpu.shader.from_builtin('2D_UNIFORM_COLOR')
batch = batch_for_shader(shader, 'TRIS', {"pos": vertices}, indices=indices)
if image.gl_load():
raise Exception()
def draw():
bgl.glActiveTexture(bgl.GL_TEXTURE0)
bgl.glBindTexture(bgl.GL_TEXTURE_2D, image.bindcode)
shader.bind()
shader.uniform_float("color", (0, 0.5, 0.5, 1.0))
shader.uniform_int("image", 0)
batch.draw(shader)

View File

@@ -1,37 +1,86 @@
"""
2D Image
--------
Generate a texture using Offscreen Rendering
--------------------------------------------
To use this example you have to provide an image that should be displayed.
#. Create an :class:`gpu.types.GPUOffScreen` object.
#. Draw some circles into it.
#. Make a new shader for drawing a planar texture in 3D.
#. Draw the generated texture using the new shader.
"""
import bpy
import gpu
import bgl
from mathutils import Matrix
from gpu_extras.batch import batch_for_shader
from gpu_extras.presets import draw_circle_2d
IMAGE_NAME = "Untitled"
image = bpy.data.images[IMAGE_NAME]
# Create and fill offscreen
##########################################
shader = gpu.shader.from_builtin('2D_IMAGE')
offscreen = gpu.types.GPUOffScreen(512, 512)
with offscreen.bind():
bgl.glClear(bgl.GL_COLOR_BUFFER_BIT)
with gpu.matrix.push_pop():
# reset matrices -> use normalized device coordinates [-1, 1]
gpu.matrix.load_matrix(Matrix.Identity(4))
gpu.matrix.load_projection_matrix(Matrix.Identity(4))
amount = 10
for i in range(-amount, amount + 1):
x_pos = i / amount
draw_circle_2d((x_pos, 0.0), (1, 1, 1, 1), 0.5, 200)
# Drawing the generated texture in 3D space
#############################################
vertex_shader = '''
uniform mat4 modelMatrix;
uniform mat4 viewProjectionMatrix;
in vec2 position;
in vec2 uv;
out vec2 uvInterp;
void main()
{
uvInterp = uv;
gl_Position = viewProjectionMatrix * modelMatrix * vec4(position, 0.0, 1.0);
}
'''
fragment_shader = '''
uniform sampler2D image;
in vec2 uvInterp;
void main()
{
gl_FragColor = texture(image, uvInterp);
}
'''
shader = gpu.types.GPUShader(vertex_shader, fragment_shader)
batch = batch_for_shader(
shader, 'TRI_FAN',
{
"pos": ((100, 100), (200, 100), (200, 200), (100, 200)),
"texCoord": ((0, 0), (1, 0), (1, 1), (0, 1)),
"position": ((-1, -1), (1, -1), (1, 1), (-1, 1)),
"uv": ((0, 0), (1, 0), (1, 1), (0, 1)),
},
)
if image.gl_load():
raise Exception()
def draw():
bgl.glActiveTexture(bgl.GL_TEXTURE0)
bgl.glBindTexture(bgl.GL_TEXTURE_2D, image.bindcode)
bgl.glBindTexture(bgl.GL_TEXTURE_2D, offscreen.color_texture)
shader.bind()
shader.uniform_int("image", 0)
shader.uniform_float("modelMatrix", Matrix.Translation((1, 2, 3)) @ Matrix.Scale(3, 4))
shader.uniform_float("viewProjectionMatrix", bpy.context.region_data.perspective_matrix)
shader.uniform_float("image", 0)
batch.draw(shader)
bpy.types.SpaceView3D.draw_handler_add(draw, (), 'WINDOW', 'POST_PIXEL')
bpy.types.SpaceView3D.draw_handler_add(draw, (), 'WINDOW', 'POST_VIEW')

View File

@@ -1,23 +1,28 @@
"""
Generate a texture using Offscreen Rendering
--------------------------------------------
Copy Offscreen Rendering result back to RAM
-------------------------------------------
#. Create an :class:`gpu.types.GPUOffScreen` object.
#. Draw some circles into it.
#. Make a new shader for drawing a planar texture in 3D.
#. Draw the generated texture using the new shader.
This will create a new image with the given name.
If it already exists, it will override the existing one.
Currently almost all of the execution time is spent in the last line.
In the future this will hopefully be solved by implementing the Python buffer protocol
for :class:`bgl.Buffer` and :class:`bpy.types.Image.pixels` (aka ``bpy_prop_array``).
"""
import bpy
import gpu
import bgl
import random
from mathutils import Matrix
from gpu_extras.batch import batch_for_shader
from gpu_extras.presets import draw_circle_2d
# Create and fill offscreen
##########################################
IMAGE_NAME = "Generated Image"
WIDTH = 512
HEIGHT = 512
RING_AMOUNT = 10
offscreen = gpu.types.GPUOffScreen(512, 512)
offscreen = gpu.types.GPUOffScreen(WIDTH, HEIGHT)
with offscreen.bind():
bgl.glClear(bgl.GL_COLOR_BUFFER_BIT)
@@ -26,61 +31,20 @@ with offscreen.bind():
gpu.matrix.load_matrix(Matrix.Identity(4))
gpu.matrix.load_projection_matrix(Matrix.Identity(4))
amount = 10
for i in range(-amount, amount + 1):
x_pos = i / amount
draw_circle_2d((x_pos, 0.0), (1, 1, 1, 1), 0.5, 200)
for i in range(RING_AMOUNT):
draw_circle_2d(
(random.uniform(-1, 1), random.uniform(-1, 1)),
(1, 1, 1, 1), random.uniform(0.1, 1), 20)
buffer = bgl.Buffer(bgl.GL_BYTE, WIDTH * HEIGHT * 4)
bgl.glReadBuffer(bgl.GL_BACK)
bgl.glReadPixels(0, 0, WIDTH, HEIGHT, bgl.GL_RGBA, bgl.GL_UNSIGNED_BYTE, buffer)
offscreen.free()
# Drawing the generated texture in 3D space
#############################################
vertex_shader = '''
uniform mat4 modelMatrix;
uniform mat4 viewProjectionMatrix;
in vec2 position;
in vec2 uv;
out vec2 uvInterp;
void main()
{
uvInterp = uv;
gl_Position = viewProjectionMatrix * modelMatrix * vec4(position, 0.0, 1.0);
}
'''
fragment_shader = '''
uniform sampler2D image;
in vec2 uvInterp;
void main()
{
gl_FragColor = texture(image, uvInterp);
}
'''
shader = gpu.types.GPUShader(vertex_shader, fragment_shader)
batch = batch_for_shader(
shader, 'TRI_FAN',
{
"position": ((-1, -1), (1, -1), (1, 1), (-1, 1)),
"uv": ((0, 0), (1, 0), (1, 1), (0, 1)),
},
)
def draw():
bgl.glActiveTexture(bgl.GL_TEXTURE0)
bgl.glBindTexture(bgl.GL_TEXTURE_2D, offscreen.color_texture)
shader.bind()
shader.uniform_float("modelMatrix", Matrix.Translation((1, 2, 3)) @ Matrix.Scale(3, 4))
shader.uniform_float("viewProjectionMatrix", bpy.context.region_data.perspective_matrix)
shader.uniform_float("image", 0)
batch.draw(shader)
bpy.types.SpaceView3D.draw_handler_add(draw, (), 'WINDOW', 'POST_VIEW')
if not IMAGE_NAME in bpy.data.images:
bpy.data.images.new(IMAGE_NAME, WIDTH, HEIGHT)
image = bpy.data.images[IMAGE_NAME]
image.scale(WIDTH, HEIGHT)
image.pixels = [v / 255 for v in buffer]

View File

@@ -1,50 +1,41 @@
"""
Copy Offscreen Rendering result back to RAM
-------------------------------------------
Rendering the 3D View into a Texture
------------------------------------
This will create a new image with the given name.
If it already exists, it will override the existing one.
Currently almost all of the execution time is spent in the last line.
In the future this will hopefully be solved by implementing the Python buffer protocol
for :class:`bgl.Buffer` and :class:`bpy.types.Image.pixels` (aka ``bpy_prop_array``).
The scene has to have a camera for this example to work.
You could also make this independent of a specific camera,
but Blender does not expose good functions to create view and projection matrices yet.
"""
import bpy
import gpu
import bgl
import random
from mathutils import Matrix
from gpu_extras.presets import draw_circle_2d
import gpu
from gpu_extras.presets import draw_texture_2d
IMAGE_NAME = "Generated Image"
WIDTH = 512
HEIGHT = 512
RING_AMOUNT = 10
HEIGHT = 256
offscreen = gpu.types.GPUOffScreen(WIDTH, HEIGHT)
with offscreen.bind():
bgl.glClear(bgl.GL_COLOR_BUFFER_BIT)
with gpu.matrix.push_pop():
# reset matrices -> use normalized device coordinates [-1, 1]
gpu.matrix.load_matrix(Matrix.Identity(4))
gpu.matrix.load_projection_matrix(Matrix.Identity(4))
for i in range(RING_AMOUNT):
draw_circle_2d(
(random.uniform(-1, 1), random.uniform(-1, 1)),
(1, 1, 1, 1), random.uniform(0.1, 1), 20)
def draw():
context = bpy.context
scene = context.scene
buffer = bgl.Buffer(bgl.GL_BYTE, WIDTH * HEIGHT * 4)
bgl.glReadBuffer(bgl.GL_BACK)
bgl.glReadPixels(0, 0, WIDTH, HEIGHT, bgl.GL_RGBA, bgl.GL_UNSIGNED_BYTE, buffer)
view_matrix = scene.camera.matrix_world.inverted()
offscreen.free()
projection_matrix = scene.camera.calc_matrix_camera(
context.evaluated_depsgraph_get(), x=WIDTH, y=HEIGHT)
offscreen.draw_view3d(
scene,
context.view_layer,
context.space_data,
context.region,
view_matrix,
projection_matrix)
bgl.glDisable(bgl.GL_DEPTH_TEST)
draw_texture_2d(offscreen.color_texture, (10, 10), WIDTH, HEIGHT)
if not IMAGE_NAME in bpy.data.images:
bpy.data.images.new(IMAGE_NAME, WIDTH, HEIGHT)
image = bpy.data.images[IMAGE_NAME]
image.scale(WIDTH, HEIGHT)
image.pixels = [v / 255 for v in buffer]
bpy.types.SpaceView3D.draw_handler_add(draw, (), 'WINDOW', 'POST_PIXEL')

View File

@@ -1,2 +1,2 @@
Sphinx==1.8.5
sphinx_rtd_theme==0.4.3
Sphinx==3.0.3
sphinx_rtd_theme==0.5.0rc1

View File

@@ -205,15 +205,15 @@ Support Overview
* - Usage
- :class:`bpy.types.MeshPolygon`
- :class:`bpy.types.MeshTessFace`
- :class:`bpy.types.MeshLoopTriangle`
- :class:`bmesh.types.BMFace`
* - Import/Create
- Poor *(inflexible)*
- Good *(supported as upgrade path)*
- Unusable *(read-only)*.
- Best
* - Manipulate
- Poor *(inflexible)*
- Poor *(loses ngons)*
- Unusable *(read-only)*.
- Best
* - Export/Output
- Good *(ngon support)*

View File

@@ -253,7 +253,13 @@ Registering a class with Blender results in the class definition being loaded in
where it becomes available alongside existing functionality.
Once this class is loaded you can access it from :mod:`bpy.types`,
using the bl_idname rather than the classes original name.
using the ``bl_idname`` rather than the classes original name.
.. note::
There are some exceptions to this for class names which aren't guarantee to be unique.
In this case use: :func:`bpy.types.Struct.bl_rna_get_subclass`.
When loading a class, Blender performs sanity checks making sure all required properties and functions are found,
that properties have the correct type, and that functions have the right number of arguments.

View File

@@ -255,9 +255,9 @@ Examples:
>>> bpy.ops.object.scale_apply()
{'FINISHED'}
.. note::
.. tip::
The menu item: :menuselection:`Help --> Operator Cheat Sheet`
The :ref:`Operator Cheat Sheet <blender_manual:bpy.ops.wm.operator_cheat_sheet>`.
gives a list of all operators and their default values in Python syntax, along with the generated docs.
This is a good way to get an overview of all Blender's operators.

View File

@@ -403,32 +403,21 @@ MODULE_GROUPING = {
# -------------------------------BLENDER----------------------------------------
blender_version_strings = [str(v) for v in bpy.app.version]
is_release = bpy.app.version_cycle in {"rc", "release"}
# converting bytes to strings, due to T30154
BLENDER_REVISION = str(bpy.app.build_hash, 'utf_8')
if is_release:
# '2.62a'
BLENDER_VERSION_DOTS = ".".join(blender_version_strings[:2]) + bpy.app.version_char
else:
# '2.62.1'
BLENDER_VERSION_DOTS = ".".join(blender_version_strings)
# '2.83.0 Beta' or '2.83.0' or '2.83.1'
BLENDER_VERSION_DOTS = bpy.app.version_string
if BLENDER_REVISION != "Unknown":
# '2.62a SHA1' (release) or '2.62.1 SHA1' (non-release)
# SHA1 Git hash
BLENDER_VERSION_HASH = BLENDER_REVISION
else:
# Fallback: Should not be used
BLENDER_VERSION_HASH = "Hash Unknown"
if is_release:
# '2_62a_release'
BLENDER_VERSION_PATH = "%s%s_release" % ("_".join(blender_version_strings[:2]), bpy.app.version_char)
else:
# '2_62_1'
BLENDER_VERSION_PATH = "_".join(blender_version_strings)
# '2_83'
BLENDER_VERSION_PATH = "%d_%d" % (bpy.app.version[0], bpy.app.version[1])
# --------------------------DOWNLOADABLE FILES----------------------------------
@@ -492,6 +481,11 @@ if _BPY_PROP_COLLECTION_FAKE:
else:
_BPY_PROP_COLLECTION_ID = "collection"
if _BPY_STRUCT_FAKE:
bpy_struct = bpy.types.bpy_struct
else:
bpy_struct = None
def escape_rst(text):
""" Escape plain text which may contain characters used by RST.
@@ -512,7 +506,7 @@ def is_struct_seq(value):
def undocumented_message(module_name, type_name, identifier):
return "Undocumented `contribute <https://developer.blender.org/T51061>`"
return "Undocumented, consider `contributing <https://developer.blender.org/T51061>`__."
def range_str(val):
@@ -694,11 +688,13 @@ def py_descr2sphinx(ident, fw, descr, module_name, type_name, identifier):
doc = undocumented_message(module_name, type_name, identifier)
if type(descr) == GetSetDescriptorType:
fw(ident + ".. attribute:: %s\n\n" % identifier)
fw(ident + ".. attribute:: %s\n" % identifier)
fw(ident + " :noindex:\n\n")
write_indented_lines(ident + " ", fw, doc, False)
fw("\n")
elif type(descr) == MemberDescriptorType: # same as above but use 'data'
fw(ident + ".. data:: %s\n\n" % identifier)
fw(ident + ".. data:: %s\n" % identifier)
fw(ident + " :noindex:\n\n")
write_indented_lines(ident + " ", fw, doc, False)
fw("\n")
elif type(descr) in {MethodDescriptorType, ClassMethodDescriptorType}:
@@ -738,11 +734,14 @@ def pyprop2sphinx(ident, fw, identifier, py_prop):
'''
# readonly properties use "data" directive, variables use "attribute" directive
if py_prop.fset is None:
fw(ident + ".. data:: %s\n\n" % identifier)
fw(ident + ".. data:: %s\n" % identifier)
fw(ident + " :noindex:\n\n")
else:
fw(ident + ".. attribute:: %s\n\n" % identifier)
fw(ident + ".. attribute:: %s\n" % identifier)
fw(ident + " :noindex:\n\n")
write_indented_lines(ident + " ", fw, py_prop.__doc__)
if py_prop.fset is None:
fw("\n")
fw(ident + " (readonly)\n\n")
else:
fw("\n")
@@ -908,7 +907,8 @@ def pymodule2sphinx(basepath, module_name, module, title):
elif issubclass(value_type, (bool, int, float, str, tuple)):
# constant, not much fun we can do here except to list it.
# TODO, figure out some way to document these!
fw(".. data:: %s\n\n" % attribute)
fw(".. data:: %s\n" % attribute)
fw(" :noindex:\n\n")
write_indented_lines(" ", fw, "constant value %s" % repr(value), False)
fw("\n")
else:
@@ -1052,6 +1052,7 @@ context_type_map = {
"selected_editable_fcurves": ("FCurve", True),
"selected_editable_objects": ("Object", True),
"selected_editable_sequences": ("Sequence", True),
"selected_nla_strips": ("NlaStrip", True),
"selected_nodes": ("Node", True),
"selected_objects": ("Object", True),
"selected_pose_bones": ("PoseBone", True),
@@ -1073,6 +1074,7 @@ context_type_map = {
"visible_pose_bones": ("PoseBone", True),
"visible_fcurves": ("FCurve", True),
"weight_paint_object": ("Object", False),
"volume": ("Volume", False),
"world": ("World", False),
}
@@ -1114,7 +1116,8 @@ def pycontext2sphinx(basepath):
type_descr = prop.get_type_description(
class_fmt=":class:`bpy.types.%s`", collection_id=_BPY_PROP_COLLECTION_ID)
fw(".. data:: %s\n\n" % prop.identifier)
fw(".. data:: %s\n" % prop.identifier)
fw(" :noindex:\n\n")
if prop.description:
fw(" %s\n\n" % prop.description)
@@ -1159,7 +1162,8 @@ def pycontext2sphinx(basepath):
i = 0
while char_array[i] is not None:
member = ctypes.string_at(char_array[i]).decode(encoding="ascii")
fw(".. data:: %s\n\n" % member)
fw(".. data:: %s\n" % member)
fw(" :noindex:\n\n")
member_type, is_seq = context_type_map[member]
fw(" :type: %s :class:`bpy.types.%s`\n\n" % ("sequence of " if is_seq else "", member_type))
unique.add(member)
@@ -1303,7 +1307,7 @@ def pyrna2sphinx(basepath):
fw(title_string(title, "="))
fw(".. module:: %s\n\n" % struct_module_name)
fw(".. module:: %s.%s\n\n" % (struct_module_name, struct_id))
# docs first?, ok
write_example_ref("", fw, "%s.%s" % (struct_module_name, struct_id))
@@ -1362,9 +1366,11 @@ def pyrna2sphinx(basepath):
type_descr = prop.get_type_description(class_fmt=":class:`%s`", collection_id=_BPY_PROP_COLLECTION_ID)
# readonly properties use "data" directive, variables properties use "attribute" directive
if 'readonly' in type_descr:
fw(" .. data:: %s\n\n" % prop.identifier)
fw(" .. data:: %s\n" % prop.identifier)
fw(" :noindex:\n\n")
else:
fw(" .. attribute:: %s\n\n" % prop.identifier)
fw(" .. attribute:: %s\n" % prop.identifier)
fw(" :noindex:\n\n")
if prop.description:
fw(" %s\n\n" % prop.description)
@@ -1441,7 +1447,7 @@ def pyrna2sphinx(basepath):
if _BPY_STRUCT_FAKE:
descr_items = [
(key, descr) for key, descr in sorted(bpy.types.Struct.__bases__[0].__dict__.items())
(key, descr) for key, descr in sorted(bpy_struct.__dict__.items())
if not key.startswith("__")
]
@@ -1457,9 +1463,6 @@ def pyrna2sphinx(basepath):
for identifier, py_prop in base.get_py_properties():
lines.append(" * :class:`%s.%s`\n" % (base.identifier, identifier))
for identifier, py_prop in base.get_py_properties():
lines.append(" * :class:`%s.%s`\n" % (base.identifier, identifier))
if lines:
fw(".. rubric:: Inherited Properties\n\n")
@@ -1483,6 +1486,8 @@ def pyrna2sphinx(basepath):
lines.append(" * :class:`%s.%s`\n" % (base.identifier, func.identifier))
for identifier, py_func in base.get_py_functions():
lines.append(" * :class:`%s.%s`\n" % (base.identifier, identifier))
for identifier, py_func in base.get_py_c_functions():
lines.append(" * :class:`%s.%s`\n" % (base.identifier, identifier))
if lines:
fw(".. rubric:: Inherited Functions\n\n")
@@ -1535,7 +1540,7 @@ def pyrna2sphinx(basepath):
fw(title_string(class_name, "="))
fw(".. module:: %s\n" % class_module_name)
fw(".. module:: %s.%s\n" % (class_module_name, class_name))
fw("\n")
if use_subclasses:
@@ -1570,7 +1575,7 @@ def pyrna2sphinx(basepath):
# write fake classes
if _BPY_STRUCT_FAKE:
class_value = bpy.types.Struct.__bases__[0]
class_value = bpy_struct
fake_bpy_type(
"bpy.types", class_value, _BPY_STRUCT_FAKE,
"built-in base class for all classes in bpy.types.", use_subclasses=True,
@@ -1710,7 +1715,7 @@ class PatchedPythonDomain(PythonDomain):
fw("def setup(app):\n")
fw(" app.add_stylesheet('css/theme_overrides.css')\n")
fw(" app.override_domain(PatchedPythonDomain)\n\n")
fw(" app.add_domain(PatchedPythonDomain, override=True)\n\n")
file.close()
@@ -1756,6 +1761,7 @@ def write_rst_contents(basepath):
app_modules = (
"bpy.context", # note: not actually a module
"bpy.data", # note: not actually a module
"bpy.msgbus", # note: not actually a module
"bpy.ops",
"bpy.types",
@@ -1846,6 +1852,29 @@ def write_rst_ops_index(basepath):
file.close()
def write_rst_msgbus(basepath):
"""
Write the rst files of bpy.msgbus module
"""
if 'bpy.msgbus' in EXCLUDE_MODULES:
return
# Write the index.
filepath = os.path.join(basepath, "bpy.msgbus.rst")
file = open(filepath, "w", encoding="utf-8")
fw = file.write
fw(title_string("Message Bus (bpy.msgbus)", "="))
write_example_ref("", fw, "bpy.msgbus")
fw(".. toctree::\n")
fw(" :glob:\n\n")
fw(" bpy.msgbus.*\n\n")
file.close()
# Write the contents.
pymodule2sphinx(basepath, 'bpy.msgbus', bpy.msgbus, 'Message Bus')
EXAMPLE_SET_USED.add("bpy.msgbus")
def write_rst_data(basepath):
'''
Write the rst file of bpy.data module
@@ -2000,6 +2029,7 @@ def rna2sphinx(basepath):
write_rst_bpy(basepath) # bpy, disabled by default
write_rst_types_index(basepath) # bpy.types
write_rst_ops_index(basepath) # bpy.ops
write_rst_msgbus(basepath) # bpy.msgbus
pyrna2sphinx(basepath) # bpy.types.* and bpy.ops.*
write_rst_data(basepath) # bpy.data
write_rst_importable_modules(basepath)

View File

@@ -36,16 +36,10 @@ fi
blender_srcdir=$(dirname -- $0)/../..
blender_version_header="$blender_srcdir/source/blender/blenkernel/BKE_blender_version.h"
blender_version=$(grep "BLENDER_VERSION\s" "$blender_version_header" | awk '{print $3}')
blender_version_char=$(grep "BLENDER_VERSION_CHAR\s" "$blender_version_header" | awk '{print $3}')
blender_version_cycle=$(grep "BLENDER_VERSION_CYCLE\s" "$blender_version_header" | awk '{print $3}')
blender_subversion=$(grep "BLENDER_SUBVERSION\s" "$blender_version_header" | awk '{print $3}')
unset blender_version_header
if [ "$blender_version_cycle" = "release" ] ; then
BLENDER_VERSION=$(expr $blender_version / 100)_$(expr $blender_version % 100)$blender_version_char"_release"
else
BLENDER_VERSION=$(expr $blender_version / 100)_$(expr $blender_version % 100)_$blender_subversion
fi
BLENDER_VERSION=$(expr $blender_version / 100)_$(expr $blender_version % 100)
SSH_UPLOAD_FULL=$SSH_UPLOAD/"blender_python_api_"$BLENDER_VERSION

View File

@@ -127,11 +127,10 @@ def main():
" f.write('%d\\n' % is_release)\n"
" f.write('%d\\n' % is_beta)\n"
" f.write('%s\\n' % branch)\n"
" f.write('%d.%d%s\\n' % (bpy.app.version[0], bpy.app.version[1], bpy.app.version_char))\n"
" f.write('%d.%d%s\\n' % (bpy.app.version[0], bpy.app.version[1], bpy.app.version_char)\n"
" f.write('%d.%d\\n' % (bpy.app.version[0], bpy.app.version[1]))\n"
" f.write('%d.%d\\n' % (bpy.app.version[0], bpy.app.version[1])\n"
" if (is_release or is_beta) else '%s\\n' % branch)\n"
" f.write('%d_%d%s_release' % (bpy.app.version[0], bpy.app.version[1], bpy.app.version_char)\n"
" if is_release else '%d_%d_%d' % bpy.app.version)\n"
" f.write('%d_%d' % (bpy.app.version[0], bpy.app.version[1]))\n"
)
get_ver_cmd = (args.blender, "--background", "-noaudio", "--factory-startup", "--python-exit-code", "1",
"--python-expr", getver_script, "--", getver_file)

View File

@@ -72,7 +72,7 @@ if(WITH_CYCLES OR WITH_COMPOSITOR OR WITH_OPENSUBDIV)
endif()
endif()
if(WITH_X11 AND WITH_GHOST_XDND)
if(WITH_GHOST_X11 AND WITH_GHOST_XDND)
add_subdirectory(xdnd)
endif()

View File

@@ -290,14 +290,14 @@ AUD_API AUD_Device* AUD_Device_getCurrent()
return new AUD_Device(device);
}
AUD_API void AUD_seekSynchronizer(AUD_Handle* handle, float time)
AUD_API void AUD_seekSynchronizer(AUD_Handle* handle, double time)
{
auto synchronizer = DeviceManager::getDevice()->getSynchronizer();
if(synchronizer)
synchronizer->seek(*reinterpret_cast<std::shared_ptr<IHandle>*>(handle), time);
}
AUD_API float AUD_getSynchronizerPosition(AUD_Handle* handle)
AUD_API double AUD_getSynchronizerPosition(AUD_Handle* handle)
{
auto synchronizer = DeviceManager::getDevice()->getSynchronizer();
if(synchronizer)

View File

@@ -221,14 +221,14 @@ extern AUD_API AUD_Device* AUD_Device_getCurrent();
* \param handle Playback handle.
* \param time Time in seconds to seek to.
*/
extern AUD_API void AUD_seekSynchronizer(AUD_Handle* handle, float time);
extern AUD_API void AUD_seekSynchronizer(AUD_Handle* handle, double time);
/**
* Returns the current sound scene playback time.
* \param handle Playback handle.
* \return The playback time in seconds.
*/
extern AUD_API float AUD_getSynchronizerPosition(AUD_Handle* handle);
extern AUD_API double AUD_getSynchronizerPosition(AUD_Handle* handle);
/**
* Starts the playback of jack transport if possible.

View File

@@ -101,14 +101,14 @@ AUD_API int AUD_DynamicMusic_pause(AUD_DynamicMusic* player)
return (*player)->pause();
}
AUD_API int AUD_DynamicMusic_seek(AUD_DynamicMusic* player, float position)
AUD_API int AUD_DynamicMusic_seek(AUD_DynamicMusic* player, double position)
{
assert(player);
return (*player)->seek(position);
}
AUD_API float AUD_DynamicMusic_getPosition(AUD_DynamicMusic* player)
AUD_API double AUD_DynamicMusic_getPosition(AUD_DynamicMusic* player)
{
assert(player);
@@ -141,4 +141,4 @@ AUD_API int AUD_DynamicMusic_stop(AUD_DynamicMusic* player)
assert(player);
return (*player)->stop();
}
}

View File

@@ -103,14 +103,14 @@ extern AUD_API int AUD_DynamicMusic_pause(AUD_DynamicMusic* player);
* \param position The new position from which to play back, in seconds.
* \return 0 if the seeking wasn't possible.
*/
extern AUD_API int AUD_DynamicMusic_seek(AUD_DynamicMusic* player, float position);
extern AUD_API int AUD_DynamicMusic_seek(AUD_DynamicMusic* player, double position);
/**
* Retrieves the position of the current scene of a dynamic music player.
* \param player The DynamicMusic object.
* \return The position of the current playing scene.
*/
extern AUD_API float AUD_DynamicMusic_getPosition(AUD_DynamicMusic* player);
extern AUD_API double AUD_DynamicMusic_getPosition(AUD_DynamicMusic* player);
/**
* Retrieves the volume of the current scene of a dynamic music player.
@@ -142,4 +142,4 @@ extern AUD_API int AUD_DynamicMusic_stop(AUD_DynamicMusic* player);
#ifdef __cplusplus
}
#endif
#endif

View File

@@ -259,13 +259,13 @@ AUD_API int AUD_Handle_setPitch(AUD_Handle* handle, float value)
return (*handle)->setPitch(value);
}
AUD_API float AUD_Handle_getPosition(AUD_Handle* handle)
AUD_API double AUD_Handle_getPosition(AUD_Handle* handle)
{
assert(handle);
return (*handle)->getPosition();
}
AUD_API int AUD_Handle_setPosition(AUD_Handle* handle, float value)
AUD_API int AUD_Handle_setPosition(AUD_Handle* handle, double value)
{
assert(handle);
return (*handle)->seek(value);

View File

@@ -211,14 +211,14 @@ extern AUD_API int AUD_Handle_setPitch(AUD_Handle* handle, float value);
* param handle The handle to get the position from.
* return The position of the handle.
*/
extern AUD_API float AUD_Handle_getPosition(AUD_Handle* handle);
extern AUD_API double AUD_Handle_getPosition(AUD_Handle* handle);
/**
* Sets the position of a handle.
* param handle The handle to set the position from.
* param value The new position to set.
*/
extern AUD_API int AUD_Handle_setPosition(AUD_Handle* handle, float value);
extern AUD_API int AUD_Handle_setPosition(AUD_Handle* handle, double value);
/**
* Retrieves the relative of a handle.

View File

@@ -41,7 +41,7 @@ AUD_API void AUD_Sequence_free(AUD_Sound* sequence)
delete sequence;
}
AUD_API AUD_SequenceEntry* AUD_Sequence_add(AUD_Sound* sequence, AUD_Sound* sound, float begin, float end, float skip)
AUD_API AUD_SequenceEntry* AUD_Sequence_add(AUD_Sound* sequence, AUD_Sound* sound, double begin, double end, double skip)
{
if(!sound)
return new AUD_SequenceEntry(((Sequence *)sequence->get())->add(AUD_Sound(), begin, end, skip));
@@ -160,7 +160,7 @@ AUD_API void AUD_Sequence_setSpeedOfSound(AUD_Sound* sequence, float value)
AUD_API void AUD_SequenceEntry_move(AUD_SequenceEntry* entry, float begin, float end, float skip)
AUD_API void AUD_SequenceEntry_move(AUD_SequenceEntry* entry, double begin, double end, double skip)
{
(*entry)->move(begin, end, skip);
}

View File

@@ -55,7 +55,7 @@ extern AUD_API void AUD_Sequence_free(AUD_Sound* sequence);
* \param skip How much seconds should be skipped at the beginning.
* \return The entry added.
*/
extern AUD_API AUD_SequenceEntry* AUD_Sequence_add(AUD_Sound* sequence, AUD_Sound* sound, float begin, float end, float skip);
extern AUD_API AUD_SequenceEntry* AUD_Sequence_add(AUD_Sound* sequence, AUD_Sound* sound, double begin, double end, double skip);
/**
* Removes an entry from the scene.
@@ -167,7 +167,7 @@ extern AUD_API void AUD_Sequence_setSpeedOfSound(AUD_Sound* sequence, float valu
* \param end The new end time or a negative value if unknown.
* \param skip How many seconds to skip at the beginning.
*/
extern AUD_API void AUD_SequenceEntry_move(AUD_SequenceEntry* entry, float begin, float end, float skip);
extern AUD_API void AUD_SequenceEntry_move(AUD_SequenceEntry* entry, double begin, double end, double skip);
/**
* Writes animation data to a sequenced entry.

View File

@@ -175,7 +175,7 @@ static void pauseSound(AUD_Handle* handle)
(*handle)->pause();
}
AUD_API AUD_Handle* AUD_pauseAfter(AUD_Handle* handle, float seconds)
AUD_API AUD_Handle* AUD_pauseAfter(AUD_Handle* handle, double seconds)
{
auto device = DeviceManager::getDevice();
@@ -336,7 +336,7 @@ AUD_API const char* AUD_mixdown_per_channel(AUD_Sound* sound, unsigned int start
}
}
AUD_API AUD_Device* AUD_openMixdownDevice(AUD_DeviceSpecs specs, AUD_Sound* sequencer, float volume, float start)
AUD_API AUD_Device* AUD_openMixdownDevice(AUD_DeviceSpecs specs, AUD_Sound* sequencer, float volume, double start)
{
try
{

View File

@@ -45,7 +45,7 @@ extern AUD_API float* AUD_readSoundBuffer(const char* filename, float low, float
* \param seconds The time in seconds.
* \return The silence handle.
*/
extern AUD_API AUD_Handle* AUD_pauseAfter(AUD_Handle* handle, float seconds);
extern AUD_API AUD_Handle* AUD_pauseAfter(AUD_Handle* handle, double seconds);
/**
* Reads a sound into a buffer for drawing at a specific sampling rate.
@@ -101,7 +101,7 @@ extern AUD_API const char* AUD_mixdown_per_channel(AUD_Sound* sound, unsigned in
* \param start The start time of the mixdown in the sound scene.
* \return The read device for the mixdown.
*/
extern AUD_API AUD_Device* AUD_openMixdownDevice(AUD_DeviceSpecs specs, AUD_Sound* sequencer, float volume, float start);
extern AUD_API AUD_Device* AUD_openMixdownDevice(AUD_DeviceSpecs specs, AUD_Sound* sequencer, float volume, double start);
/**
* Initializes audio routines (FFMPEG/JACK if it is enabled).

View File

@@ -4,4 +4,5 @@ Device
.. currentmodule:: aud
.. autoclass:: Device
:members:
:noindex:

View File

@@ -4,4 +4,5 @@ Handle
.. currentmodule:: aud
.. autoclass:: Handle
:members:
:noindex:

Some files were not shown because too many files have changed in this diff Show More