Commit Graph

85589 Commits

Author SHA1 Message Date
Campbell Barton c80415627e Fix T62223: Particle brushes disable select tools 2019-03-06 21:48:22 +11:00
Campbell Barton 37fa8b0cf9 Fix T62223: Particle select tools also show brush settings 2019-03-06 21:28:41 +11:00
Antonioya ce8d6afb63 Fix T62230: Annotations corrupts GPencil brushes
Use annotations inside grease pencil drawing mode is something incompatible by design. Actually, the annotations are disabled in overlay panel for 2D template and the tool icon is not in the toolbar.

The unique way to get annotations was using D key, but this is wrong.

If you are inside drawing mode, all the events are captured by paint operator and to capture annotations, the operator must be canceled and the mode changed, but this change breaks several things.

It's not logic add annotation inside darwing mode, because you can simply add a new layer and write the text you want.

This change checks the mode and cancel the annotations if the mode is not thje right one.
2019-03-06 10:54:38 +01:00
Campbell Barton 3b1e2a4f56 Fix T62241: Repeat last translate, wrong direction
Only use orientation value when the operator uses orientation axis.

Own error in 03da3b6593
2019-03-06 18:11:26 +11:00
Campbell Barton 0294e1d27f Fix T62236: Crash texture painting
Caused by 10d9a2494f which removed 5x length clamping.
2019-03-06 16:54:07 +11:00
Campbell Barton dd61787b25 Cleanup: unused function warning 2019-03-06 16:21:24 +11:00
Campbell Barton ecd086ac32 Fix T62210: endless loop in kd tree lookup
Reset nodes after the first balance call.
2019-03-06 14:53:06 +11:00
Campbell Barton f79930989d Revert "Fix T62210: endless loop in kd tree lookup"
This reverts commit 301bcf771d.

Caused crash entering particle edit mode.
2019-03-06 14:52:38 +11:00
Campbell Barton b2889c7cf1 Fix T61917: Metaball family inherits wrong resolution by deleted object
Synchronizing values between object data is error prone (not updated on
creation or renaming), add an update to have them working as they did
in 2.79.
2019-03-06 13:40:44 +11:00
Clément Foucault af72fc7555 DRW: Fix State tracking being off when calling GPU_framebuffer_clear
State tracking works in pretty much all cases but calling the clear command
does change the write mask outside the draw manager. For now we just reset
the write mask before each pass.

Fix T62203 The selected bone is not highlighted inside the other bone.
2019-03-06 03:38:56 +01:00
Campbell Barton 18e5540a48 Cleanup: remove redundant file argument 2019-03-06 11:18:17 +11:00
Campbell Barton a111204ca9 WM: match select all behavior for the info space
Adds select invert to the operator.

D4454 by @Poulpator
2019-03-06 11:12:27 +11:00
Campbell Barton 85b667716a Cleanup: style 2019-03-06 10:51:11 +11:00
Clément Foucault 104d9b475d Cleanup: Use GPU_depth_test instead of glEnable/glDisable 2019-03-05 22:02:50 +01:00
Clément Foucault 6867821c4a DRW: Fix GL state issues due to state not being reset after drawing
Callbacks were drawing with the wrong blend equation and that made some
tools drawing fail.
2019-03-05 22:02:50 +01:00
Bastien Montagne dbdd79fabe UV/VCol layers creation: add option to not init those new data.
`ED_mesh_uv_texture_add()`/`ED_mesh_color_add()` would always either
copy data from current active one, or (for UVs), generate default
'valid' UVs for every face.

This commit adds an option to not do that, just keeping default values
from raw CDLayer creation. It is only used/exposed from RNA API
currently.

This is especially useful for importer add-ons, since some formats
support multiple layers of those kind, as well as 'partial' dataset not
explicitely defining values for all mesh items.

Preliminary step to fix T62224.
2019-03-05 21:34:48 +01:00
Bastien Montagne 4326f8af08 File Editor: Refactor 'new dir' / renaming code.
We really do not need two 256 chars variables to hanlde renaming, a mere
pair of flags can handle the situation just as well.

Also, scroll to newly renamed item, will help when one want to find
again the directory they just added and rename.

At some point we'll probably want to refactor scrolling further (to make
it fully out of rename code/context e.g.), but for now think this will do.
2019-03-05 21:05:02 +01:00
Bastien Montagne 8858311463 Fix T58715: File Browser: Creating "New Folder" issues with too many existing folders in display.
Smotthscroll to edited entry was broken since filelisting was
rewritten to become async...
2019-03-05 21:05:02 +01:00
Brecht Van Lommel d31b2f8549 Fix T61063, T62195: Python scripts should run before depsgraph evaluation.
This was changed (accidentally?) in d192d72312, now go back to behavior more
similar to 2.7. Python scripts should be able to set up drivers or do other
changes that will then be taken into account when evaluating the scene for the
first time.

The more tricky thing is that Python scripts now run before ED_editors_init,
but given what happens in there it seems safe.
2019-03-05 19:20:08 +01:00
Brecht Van Lommel 3428ec5984 Merge branch 'blender2.7' 2019-03-05 19:14:00 +01:00
Jacques Lucke 5e8e3c00f2 Fix T62112: wrong curve face count
Reviewers: brecht

Differential Revision: https://developer.blender.org/D4452
2019-03-05 19:06:59 +01:00
Brecht Van Lommel e290a0b056 Cleanup: add asserts to catch cases where wrong attribute type is used. 2019-03-05 19:05:24 +01:00
Clément Foucault c94db5d1c7 Fix T61778: Crash when adding material slot to object
For some reason the mat_nr can be superior to the number of material slots
present on an object. Just cap this number to the max available slot.
2019-03-05 18:58:22 +01:00
Brecht Van Lommel 25c935e65f Fix Cycles bug rendering with multiple UV maps after recent changes. 2019-03-05 18:39:55 +01:00
Clément Foucault d1a744173e GPUMaterial: Make Shader Output nodes inside nodegroups work
Works as expected and mimics Cycles behavior.

The patch is a bit hacky: In order to not touch the lower level function,
we search for the active output inside groups (recursively) and the first
valid one is then copied (or extracted if you want) in the previous parent
nodetree. So we recursively extract the output node back to the main
nodetree while preserving the links through the nodegroups interfaces.

This way everything works as expected in gpu tree evaluation and bsdf
tagging.

Fix T61869 Material Output Node Inside Node Group Renders Pink in Eevee
2019-03-05 17:24:39 +01:00
Clément Foucault 81283b1c81 DRW: Fix rasterizer discard messing with clear commands
Fixes T62179 Viewport Ghosting on rigs
2019-03-05 17:24:39 +01:00
Campbell Barton 4bc97db121 BLI_memiter: use ASAN memory poison
Detects invalid memory use when WITH_COMPILER_ASAN is enabled.
2019-03-06 03:17:51 +11:00
Pablo Vazquez b05d3c2797 UI: Nicer report when trying to edit external libraries
Rename 'libdata' to 'library data'.
2019-03-05 17:06:11 +01:00
Campbell Barton b8bb2bb960 Cleanup: warning in release builds 2019-03-06 02:49:30 +11:00
Jacques Lucke 55cd481bf2 Fix T62208: constant detail picker not taking object scale into account 2019-03-05 16:44:47 +01:00
Campbell Barton a4540116ba DRW: use memiter for on screen text allocation
Avoid allocation for each string,
improves redraw speed for text heavy views.

A contrived test showed FPS ~18.5% speedup but this doesn't represent
typical usage.
2019-03-06 02:42:53 +11:00
Jacques Lucke 301bcf771d Fix T62210: endless loop in kd tree lookup
The problem was that `balance` expected that all node children
are set to `KD_NODE_UNSET` by default.
However, this might not be the case when `balance` is called
more than once.

The balance function might change the order of nodes even
when no new point has been inserted.
2019-03-05 16:23:58 +01:00
Campbell Barton 8887988b15 RNA: remove Screen.layout_name
This is no longer used.
2019-03-06 01:48:43 +11:00
Stefan Werner 304a89eccf Cycles: Changed standalone XML parser to read UV as float2 2019-03-05 15:29:50 +01:00
Campbell Barton 6fd0d810b4 DRW: support clipping for bone verts 2019-03-06 01:26:30 +11:00
Campbell Barton 68a0d35036 Tool System: add select tools to particle edit 2019-03-06 01:26:30 +11:00
Jacques Lucke 7a6b46aac5 Fix T62163: Duplicating particle system results in crash
There were two problems:
1. `mesh_get_eval_final` has to be called with the evaluated object.
2. Particle systems have to have unique names within an object.
The depsgraph seems to use the particle system name as identifier.
This issue is actually independent of duplication.
The old code used a small hack to create unique names.

Reviewers: brecht

Differential Revision: https://developer.blender.org/D4451
2019-03-05 15:24:54 +01:00
Antonioya 302bba1665 GPencil: Disable proportional for Duplicate
When duplicates a stroke using Shift+D, the proportional must be disabled.
2019-03-05 15:12:18 +01:00
Stefan Werner c891fb2fbe Merge branch 'blender2.7' 2019-03-05 15:06:09 +01:00
Brecht Van Lommel db7f9a70b0 Cycles: Added Float2 attribute type.
Float2 are now a new type for attributes in Cycles. Before, the choices
for attribute storage were float and float3, the latter padded to
float4. This meant that UV maps were inflated to twice the size
necessary.

Reviewers: brecht, sergey

Reviewed By: brecht

Subscribers: #cycles

Tags: #cycles

Differential Revision: https://developer.blender.org/D4409
2019-03-05 14:55:21 +01:00
Brecht Van Lommel cb7e66737d Fix T62216: order of items flipped in some menus like object mode. 2019-03-05 14:51:48 +01:00
Bastien Montagne 683e64247f Fix T61796: Linking a collection with instances inside will place the instanced object in the scene.
Do not force to link indirectly linked collections into current scene,
that is usually not desired. Note that user can always add this link
manually if they want.

All this 'implicit instantiation' post-linking process is rather hairy
to get it correct, hope this time it's not breaking something else...
2019-03-05 14:41:46 +01:00
Jeroen Bakker 6d110a03b7 Merge branch 'blender2.7' 2019-03-05 14:26:28 +01:00
Jeroen Bakker a325bc6bf3 Fix T58953: Lamp data not always set
The Lamp data was not always set. When using CUDA or CPU it was, but when using OpenCL
without `OBJECT_MOTION` `sd->lamp` not updated to the actual lamp. This made the
TextureCoordinate output the wrong normal when used in a light shader.

As the normal was incorrect it made the IES node render incorrectly.
(what is the default for the IES node).

By setting the lamp data when no `__OBJECT_MOTION__` compile directive is present makes
sure that the normal is correctly calculated.

Fix D4450

Reviewed By: Brecht van Lommel
2019-03-05 14:22:54 +01:00
Bastien Montagne 8b10e1b457 Fix T61780: Crash when trying to access screen areas through the outliner.
ScreenArea->type is NULL-ified on read, and need to be initialized
(usually by `ED_area_initialize()`), but RNA can also access it before
it happens, so need to do it itself...
2019-03-05 14:09:18 +01:00
Campbell Barton 6e95d8484c Fix upside down tool menus
Regression from 4dd575e5ab
2019-03-05 23:51:57 +11:00
Campbell Barton 2a811e6955 Tool System: add node circle select tool 2019-03-05 23:29:49 +11:00
Jacques Lucke 5e999c249c Fix T62202: circle select does not work on hair points 2019-03-05 23:16:30 +11:00
Philipp Oeser 2894e75121 Fix parenting objects to bones/vertices causes offset
This reverts part of rBbc5482337669.
Problem with above commit is that the evaluated object seems to not have
partype, par1, par2, par3 copied from the original (yet). Using original
object instead now.
Second issue (when parenting to 'Bone Relative') is that the bones
BONE_RELATIVE_PARENTING flag is set on the original, but not the
evaluated bone (yet), setting this on both now.

Fixes T60623 (and part of T59352)

Reviewers: brecht, sergey

Maniphest Tasks: T60623

Differential Revision: https://developer.blender.org/D4309
2019-03-05 13:10:10 +01:00
Brecht Van Lommel 76608f5ec5 Fix T60585: threadripper CPU only using 16 threads for e.g. sculpting.
This reverts the changes from ce927e1 to put the main and job threads on
node 0. The problem is that all threads created as children from these
threads will inherit the NUMA node and so will end up on the same node.
This can be fixed case-by-case by assigning the NUMA node for every child
thread, however this is difficult for external libraries and OpenMP, and
out of our control for plugins like external renderers.
2019-03-05 12:46:05 +01:00