Commit Graph

73082 Commits

Author SHA1 Message Date
Bastien Montagne 00e0034b13 Merge branch 'blender-v2.83-release' 2020-04-29 21:38:18 +02:00
Bastien Montagne 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
Bastien Montagne a54c1f1e77 Fix T76155: 'Object lost data' on copy-pasting with new undo code. 2020-04-29 18:11:33 +02:00
Germano Cavalcante 080732ae5c Fix crash with Orbit Around Selection
Missing check of `NULL` `op` introduced in rBc57e4418bb85.
2020-04-29 12:12:28 -03:00
Sergey Sharybin 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
Brecht Van Lommel 6c4ef6159c Fix T71334: top part of render window disappears on repeated renders 2020-04-29 14:56:17 +02:00
Julian Eisel 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
Germano Cavalcante 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
Philipp Oeser 980cebc459 Merge branch 'blender-v2.83-release' 2020-04-29 11:44:56 +02:00
Jacques Lucke 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
Philipp Oeser 2845b232a7 Fix T75522: Math node truncate operator tooltip provides no explanation 2020-04-29 11:36:20 +02:00
Philipp Oeser 657188c1a2 Merge branch 'blender-v2.83-release' 2020-04-29 11:25:08 +02:00
Philipp Oeser 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
Philipp Oeser fed5e0ca04 Merge branch 'blender-v2.83-release' 2020-04-29 11:10:24 +02:00
Philipp Oeser 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
Bastien Montagne cedf9f5cb7 Fix/cleanup: lib_query: missing case handling of new ID_SIM type.
Also update comments.
2020-04-29 11:05:45 +02:00
Bastien Montagne 9a9ecad65f Merge branch 'blender-v2.83-release'
Conflicts:
	source/blender/blenkernel/intern/lib_query.c
2020-04-29 10:57:47 +02:00
Bastien Montagne 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
Jens Verwiebe 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
Antonio Vazquez 770605312f Merge branch 'blender-v2.83-release' 2020-04-29 10:14:55 +02:00
Antonio Vazquez 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
Campbell Barton 21ef8c4d44 Cleanup: use const args for depsgraph functions 2020-04-29 12:36:33 +10:00
Campbell Barton af835ee6f8 Cleanup: use doxy sections for multires & subdiv sources 2020-04-29 12:21:12 +10:00
Jens Verwiebe 3ea67e08fe Fix crash after 475bd6b occuring on each render end, we need another nullcheck here 2020-04-28 23:49:52 +02:00
Germano Cavalcante 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
Hans Goudey b443e1b7d4 UI: Improve DataTransfer Modifier Error Message
Differential Revision: https://developer.blender.org/D7546
2020-04-28 15:15:36 -05:00
Jacques Lucke 4d06c1c25b BLI: add VectorSet.is_empty method 2020-04-28 19:18:12 +02:00
Antonio Vazquez 44ac789a3a GPencil: Remove redundant UVs text
It's clear you change the UVs
2020-04-28 18:42:26 +02:00
Antonio Vazquez cdd980cd56 GPencil: Rename modifier Texture to Texture Mapping 2020-04-28 18:40:18 +02:00
Jacques Lucke c1e6865ee3 Cleanup: remove unnecessary includes 2020-04-28 18:08:00 +02:00
Jacques Lucke 67bd6bbcdd Depsgraph: use BLI::Vector for Relations
Reviewers: sergey

Differential Revision: https://developer.blender.org/D7556
2020-04-28 17:53:09 +02:00
Jacques Lucke 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
Jacques Lucke 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
Philipp Oeser 7bc4a436a0 Merge branch 'blender-v2.83-release' 2020-04-28 17:18:01 +02:00
Philipp Oeser 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
Jacques Lucke a72eed7dd5 BLI: rename Vector.empty to Vector.is_empty 2020-04-28 17:04:07 +02:00
Jacques Lucke c05ef1459c BLI: add Set.clear method 2020-04-28 16:41:37 +02:00
Jacques Lucke d575b72c16 BLI: add Set.is_empty method 2020-04-28 16:35:49 +02:00
Jacques Lucke 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
Bastien Montagne 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
Bastien Montagne 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
Bastien Montagne 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
Jacques Lucke 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
Jacques Lucke 9c65ac7311 BLI: add Map.lookup_or_add_default method 2020-04-28 13:55:36 +02:00
Sergey Sharybin 7d1bb2edfd Cleanup: Strict compiler warning in release mode 2020-04-28 13:31:01 +02:00
Jacques Lucke 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
Jacques Lucke 9c2715ffda BLI: add Map.is_empty() method 2020-04-28 11:44:10 +02:00
Jacques Lucke 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
Pablo Vazquez 0372121e17 UI: Title case for 'Prefetch Frames' in VSE 2020-04-28 11:27:05 +02:00
Campbell Barton 3afa2e94ba Merge branch 'blender-v2.83-release' 2020-04-28 18:38:15 +10:00
Campbell Barton 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
Campbell Barton c7144d780d Merge branch 'blender-v2.83-release' 2020-04-28 16:17:12 +10:00
Campbell Barton 64e242244d Fix T75993: Mark Seam from UV editor operates on unselected faces 2020-04-28 16:14:09 +10:00
Campbell Barton 4f639b893b Merge branch 'blender-v2.83-release' 2020-04-28 15:48:44 +10:00
Campbell Barton 612757b524 Fix T76098: Dragging text selection with offset resets select start 2020-04-28 15:47:09 +10:00
Campbell Barton a8d684d87f Merge branch 'blender-v2.83-release' 2020-04-28 13:49:25 +10:00
Campbell Barton 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
Campbell Barton e78470d954 BLF: add utility function to loop over glyph bounds 2020-04-28 13:34:56 +10:00
Campbell Barton 33017e9529 Cleanup: unused variable 2020-04-28 13:05:18 +10:00
Clément Foucault fd0cb58122 Merge branch 'blender-v2.83-release' 2020-04-27 21:15:11 +02:00
Clément Foucault 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
Clément Foucault 84e40ee846 Fix T75910 Overlay: Face Orientation not working for "In Front" objects 2020-04-27 21:14:10 +02:00
Ray Molenkamp 6830307b94 Merge remote-tracking branch 'origin/blender-v2.83-release' 2020-04-27 13:05:22 -06:00
Ray Molenkamp ad01bab6c3 cleanup: Remove unused variable 2020-04-27 13:04:44 -06:00
Clément Foucault ea75701529 Merge branch 'blender-v2.83-release' 2020-04-27 20:06:10 +02:00
Clément Foucault 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
Philipp Oeser 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
Philipp Oeser 5f3990d69a Merge branch 'blender-v2.83-release' 2020-04-27 18:15:47 +02:00
Philipp Oeser 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
Germano Cavalcante 0a7dd1ec49 Merge branch 'blender-v2.83-release' 2020-04-27 12:09:17 -03:00
Germano Cavalcante 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
Germano Cavalcante 61f0941321 Cleanup: Use common utility to get direction for TIME_EXTEND 2020-04-27 12:07:29 -03:00
Julian Eisel 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
Philipp Oeser 5559edf3c7 Merge branch 'blender-v2.83-release' 2020-04-27 16:57:58 +02:00
Philipp Oeser 995611640e Cleanup: clang format
missed in rB4fd005fefb01.
2020-04-27 16:55:59 +02:00
Philipp Oeser 4119e9c60b Merge branch 'blender-v2.83-release' 2020-04-27 16:46:17 +02:00
Philipp Oeser 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
Julian Eisel 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
Philipp Oeser b6592c83b5 Merge branch 'blender-v2.83-release' 2020-04-27 16:26:59 +02:00
Philipp Oeser 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
Campbell Barton 3d7ac7feba Merge branch 'blender-v2.83-release' 2020-04-27 23:24:49 +10:00
Campbell Barton b1037aa88f Fix T76148: Grid fill crashes with multiple connected loops 2020-04-27 23:22:58 +10:00
Julian Eisel 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
Antonio Vazquez f346fd3212 Merge branch 'blender-v2.83-release' 2020-04-27 10:49:56 +02:00
Antonio Vazquez 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
Campbell Barton 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
Richard Antalik 13abd3784a Merge branch 'blender-v2.83-release' 2020-04-27 00:57:17 +02:00
Richard Antalik 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
Richard Antalik 0edf3f5680 Merge branch 'blender-v2.83-release' 2020-04-27 00:06:00 +02:00
Richard Antalik 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
Richard Antalik 576ecbd694 Merge branch 'blender-v2.83-release' 2020-04-26 23:44:12 +02:00
Richard Antalik 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
Julian Eisel 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
Clément Foucault 066b0248df Merge branch 'blender-v2.83-release' 2020-04-26 12:26:26 +02:00
Clément Foucault 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
Antonio Vazquez 8d8414cd21 Merge branch 'blender-v2.83-release' 2020-04-25 19:42:52 +02:00
Antonio Vazquez 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
Antonio Vazquez 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
Antonio Vazquez 78887318e2 Merge branch 'blender-v2.83-release' 2020-04-25 10:41:44 +02:00
Antonio Vazquez 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
Nathan Craddock 2b95f2439e Merge branch 'blender-v2.83-release' 2020-04-24 20:53:34 -06:00
Nathan Craddock 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
Nathan Craddock 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
Jacques Lucke 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
Jacques Lucke 1f2b1d520f BLI: improve StringRef.copy 2020-04-24 23:35:17 +02:00
Jacques Lucke ebe0d7ca5e BLI: add DefaultHash specializations for StringRef and StringRefNull 2020-04-24 23:14:33 +02:00
Jacques Lucke 62f6255b47 BLI: Implement StringMap.add and StringMap.add_or_modify 2020-04-24 22:33:48 +02:00
Harley Acheson 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
Sybren A. Stüvel 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
Julian Eisel 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
Julian Eisel 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
Jacques Lucke 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
Jacques Lucke 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
Sergey Sharybin ed32afd962 Merge branch 'blender-v2.83-release' 2020-04-24 10:40:42 +02:00
Sergey Sharybin 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
Campbell Barton 0de591ac39 Merge branch 'blender-v2.83-release' 2020-04-24 18:14:18 +10:00
Campbell Barton 1625b7c37c Fix T75749: UI button text selecting is broken by text offset 2020-04-24 18:13:43 +10:00
Campbell Barton c2bf0c1d54 Merge branch 'blender-v2.83-release' 2020-04-24 17:41:34 +10:00
Campbell Barton e8d3996e67 Fix edit-mesh selection mode switching causing two undo pushes 2020-04-24 17:39:11 +10:00
Campbell Barton 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
Campbell Barton d4ffd1d91f Cleanup: declare values for enum types
Avoids accidents when adding/removing items from an enum.
2020-04-24 15:52:01 +10:00
Campbell Barton c1e4b369b0 Merge branch 'blender-v2.83-release' 2020-04-24 13:28:11 +10:00
Campbell Barton 001629a362 Fix T75946: Intersect (knife) doesn't cut all intersections 2020-04-24 13:26:17 +10:00
Campbell Barton d2aa4ada50 Merge branch 'blender-v2.83-release' 2020-04-24 12:27:12 +10:00
Campbell Barton d428cca124 Fix T63787: Knife intersect crashes 2020-04-24 12:18:29 +10:00
Campbell Barton 9667f89e82 Cleanup: correct printf warnings for bmesh interesect debugging 2020-04-24 11:47:41 +10:00
Campbell Barton af0a042da7 Cleanup: remove unused arg, clang-format 2020-04-24 11:43:30 +10:00
Clément Foucault 826f6dd9ee Merge branch 'blender-v2.83-release' 2020-04-23 23:08:20 +02:00
Clément Foucault 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
Clément Foucault 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
Clément Foucault 54e1b63567 Fix T74173 Assert when scaling camera in viewport to zero 2020-04-23 21:50:32 +02:00
Jacques Lucke ed4f33a7bd Cleanup: silence unused parameter warning 2020-04-23 20:49:42 +02:00
Jacques Lucke 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
Philipp Oeser 7d98dfd6bb Merge branch 'blender-v2.83-release' 2020-04-23 18:26:22 +02:00
Philipp Oeser 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
Brecht Van Lommel c03b6f6f0b Fix T73195: stereo camera view does not show background image 2020-04-23 18:01:33 +02:00
Clément Foucault 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
Brecht Van Lommel 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
Jacques Lucke 53de2c3e4f Cleanup: Add assert to crash earlier
This makes T75096 crash earlier.
2020-04-23 15:47:38 +02:00
Brecht Van Lommel 5e04548500 Merge branch 'blender-v2.83-release' 2020-04-23 15:45:46 +02:00
Brecht Van Lommel 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
Brecht Van Lommel 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
Jacques Lucke 1fce2ea743 Merge branch 'blender-v2.83-release' 2020-04-23 15:15:04 +02:00
Jacques Lucke 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
Jacques Lucke 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
Brecht Van Lommel 5afba30c69 Fix T75987: crash entering edit mode with keyed particles 2020-04-23 14:51:41 +02:00
Bastien Montagne 1c84cd8198 Merge branch 'blender-v2.83-release' 2020-04-23 14:49:38 +02:00
Bastien Montagne 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
Sebastian Parborg 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
Jacques Lucke 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
Campbell Barton 68cfce1519 Merge branch 'blender-v2.83-release' 2020-04-23 18:38:41 +10:00
Campbell Barton 8dedbb1747 Fix T75836: Light target misses updates while dragging 2020-04-23 18:25:29 +10:00
Campbell Barton 6c0ddf1110 Merge branch 'blender-v2.83-release' 2020-04-23 16:15:55 +10:00
Campbell Barton b900a5e452 Fix T74172: Mirror with bisect results in holes
Enable snap-to-center when bisecting.
2020-04-23 16:14:07 +10:00
Campbell Barton 6489f5a8ec Merge branch 'blender-v2.83-release' 2020-04-23 15:09:54 +10:00
Campbell Barton 83d9ba341e Fix T75965: Scale to Fit Text Box fails with a single word 2020-04-23 15:03:47 +10:00
Campbell Barton b785feb3d7 Merge branch 'blender-v2.83-release' 2020-04-23 12:12:34 +10:00
Campbell Barton e812512e1d Cleanup: clang-format, unused warning 2020-04-23 12:10:41 +10:00
Campbell Barton 5491c045af Cleanup: add explicit enum values in DNA_rigidbody_types.h 2020-04-23 12:06:35 +10:00
Campbell Barton 101ec2f3b8 Merge branch 'blender-v2.83-release' 2020-04-23 12:02:25 +10:00
Campbell Barton 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
Campbell Barton 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
Clément Foucault f6f4ab3ebf Merge branch 'blender-v2.83-release' 2020-04-22 21:42:09 +02:00
Clément Foucault 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
Clément Foucault 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
Harley Acheson 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
Harley Acheson 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
Robert Guetzkow 22cf2572d9 Merge branch 'blender-v2.83-release' 2020-04-22 19:20:11 +02:00
Robert Guetzkow 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
Germano Cavalcante 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
Germano Cavalcante 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
Bastien Montagne de168b4115 Merge branch 'blender-v2.83-release' 2020-04-22 17:13:21 +02:00
Bastien Montagne 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
Sebastián Barschkis cdc399a055 Merge branch 'blender-v2.83-release' 2020-04-22 17:05:04 +02:00
Sergey Sharybin 45f8d1783b Cleanup: Fix strict compiler warning 2020-04-22 16:56:43 +02:00
Sergey Sharybin 0fe3e38b57 Cleanup: Spelling in function name
Should be no functional changes.
2020-04-22 16:32:45 +02:00
Sebastián Barschkis 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
Sebastián Barschkis 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
Sebastián Barschkis 6485d8b78a Fluid: Fix for caches being released when file is loaded 2020-04-22 16:18:13 +02:00
Sebastián Barschkis 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
Sebastián Barschkis 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
Bastien Montagne 912ac457a6 Merge branch 'blender-v2.83-release' 2020-04-22 16:01:17 +02:00
Bastien Montagne 9000ec3013 Cleanup: clarify and update some flags descriptions in libquery code. 2020-04-22 15:58:55 +02:00
Bastien Montagne 6a1056c6a8 Merge branch 'blender-v2.83-release' 2020-04-22 15:54:04 +02:00
Bastien Montagne 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
Sebastián Barschkis 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
Sebastián Barschkis 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
Philipp Oeser a47a975a55 Merge branch 'blender-v2.83-release' 2020-04-22 14:38:59 +02:00
Philipp Oeser 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
Philipp Oeser 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
Jacques Lucke dfe22c2900 Cleanup: comment and semicolons 2020-04-22 14:17:19 +02:00
Philipp Oeser 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
Brecht Van Lommel 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
Brecht Van Lommel 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
Brecht Van Lommel 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
Campbell Barton 8eeae02cb0 Merge branch 'blender-v2.83-release' 2020-04-22 21:41:28 +10:00
Jacques Lucke 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
Campbell Barton 3542c5eb72 Fix T75971: 3D Text invisible when fill set to None 2020-04-22 19:46:53 +10:00
Bastien Montagne 21f811cb6d Merge branch 'blender-v2.83-release' 2020-04-22 11:37:36 +02:00
Bastien Montagne 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
Bastien Montagne 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
Brecht Van Lommel f7374737ef Fix T75909: icons memory leak in headless build 2020-04-21 21:44:44 +02:00
Brecht Van Lommel 13e3a1c532 Fix T75969: view layer add with Copy Settings does not copy all data 2020-04-21 19:59:35 +02:00
Bastien Montagne 8845b27dce Merge branch 'blender-v2.83-release' 2020-04-21 18:29:25 +02:00
Bastien Montagne 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
Sybren A. Stüvel 38f4b95635 Cleanup: added missing header to BKE_armature.h
No functional changes.
2020-04-21 17:58:27 +02:00
Jacques Lucke 29e9506a7f BLI: simplify naming of listbase wrapper 2020-04-21 17:38:19 +02:00
Jacques Lucke 3059353b38 BLI: Use .hh extension for C++ headers in blenlib 2020-04-21 17:31:56 +02:00
Jacques Lucke 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
Jeroen Bakker b08e18ff36 CleanUp: Remove thread_id from `TaskFreeFunction`
It isn't used; cleanup related to {D7475}
2020-04-21 15:57:51 +02:00
Jeroen Bakker 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
Luc Revardel 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
Brecht Van Lommel ec14bee20d Cleanup: remove unused includes 2020-04-21 14:57:19 +02:00
Jacques Lucke 2de0cc5adc Merge branch 'blender-v2.83-release' 2020-04-21 14:34:22 +02:00
Brecht Van Lommel f4ee9643ad Fix Linux/GCC build error after recent changes 2020-04-21 14:28:26 +02:00
Sybren A. Stüvel 9528fa2c46 Merge remote-tracking branch 'origin/blender-v2.83-release' 2020-04-21 13:24:47 +02:00
Sybren A. Stüvel 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
Brecht Van Lommel 81d29a9f61 Merge branch 'blender-v2.83-release' 2020-04-21 13:17:39 +02:00
Brecht Van Lommel 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
Brecht Van Lommel 1c86912068 Cleanup: clang-format 2020-04-21 13:16:34 +02:00
Bastien Montagne 06a2ae281b Merge branch 'blender-v2.83-release' 2020-04-21 12:55:40 +02:00
Bastien Montagne 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
Sergey Sharybin 49a29c9c76 Cleanup: Fix strict compiler warning 2020-04-21 12:49:12 +02:00
Philipp Oeser 9618bd9202 Merge branch 'blender-v2.83-release' 2020-04-20 18:55:08 +02:00
Philipp Oeser 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
Sergey Sharybin 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
Jacques Lucke 665bf41f3c Cleanup: rename "nested" to "embedded"
Reviewers: mont29

Differential Revision: https://developer.blender.org/D7476
2020-04-20 16:14:45 +02:00
Jacques Lucke d1da2f0b9e Fix: Add extern "C" to RNA_enum_types.h 2020-04-20 15:58:59 +02:00
Jacques Lucke 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
Bastien Montagne dcb45992bf Merge branch 'blender-v2.83-release' 2020-04-20 15:27:27 +02:00
Bastien Montagne aa2544793d Various typos fixes in UI messages. 2020-04-20 15:27:01 +02:00
Jacques Lucke 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
Jeroen Bakker 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
Jacques Lucke 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
Jacques Lucke 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
Jacques Lucke 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
Jacques Lucke 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
Jacques Lucke 8d53e59e32 Cleanup: Remove unnecessary callbacks where default behavior is fine
See comments in D7225.
2020-04-20 11:22:55 +02:00
Jacques Lucke 1b01d10998 Cleanup: typo 2020-04-20 11:22:55 +02:00
Bastien Montagne 67593a41dd Merge branch 'blender-v2.83-release' 2020-04-20 11:20:38 +02:00
Bastien Montagne 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
Campbell Barton bc71074d0a Fix T75922: Removing custom orientation doesn't update gizmo 2020-04-20 19:12:46 +10:00
Jacques Lucke 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
Jacques Lucke 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
Campbell Barton 2a96e8be39 Cleanup: redundant parenthesis, NULL checks 2020-04-20 12:15:49 +10:00