Commit Graph

65363 Commits

Author SHA1 Message Date
8730984c70 Fix (unreported) datatransfer code could still modify source mesh in some cases.
Source (i.e. other) mesh should not be modified in any case in modifier
evaluation case (this is forbidden by design and can lead to all kind of
threaded locks and crashes), and doing so even in operator case was
never a good idea either.

Now that we can specifically request needed data (poly and/or loop
normals) from evaluation code, we can finally get rid of those
computations inside data transfer/mesh remapping area.

This is hopefully the last remaining bit of this 'bad crashing code' in
datatransfer area.
2019-03-08 17:53:31 +01:00
cdba2bc0fc BKE mesh remap: add utils to add needed cddata mask for source mesh.
In some cases (currently, only when using avanced mapping of loops),
code needs access to some cddata of the source mesh (CD_NORMAL...).

We need a way to inform calling code about that (actual issue requiring
this change is fixed in next commit).
2019-03-08 17:53:31 +01:00
2a40c6ee2b Modifier eval: add support for request poly normals layer.
Ensure we do get poly normals if they are requested in given cddata mask.
2019-03-08 17:53:31 +01:00
a8acf31181 Fix potential bad behavior, and cleanup/refactor a bit BKE_mesh_ensure_normals_for_display().
This is merely making behaviors of this function a bit more explicit,
and avoid re-adding another CD_NORMAL layer to polys in the (unlikely)
case it would already have one.

It also handles CD_MASK_NORMAL in cd_dirty_poly, but this is more like
future-proof thing, this is not used anywhere currently afaik.
2019-03-08 17:53:31 +01:00
bfebb494f6 Fix T61961; Smooth brush distorts multires
The issue was caused by lack of proper accumulation for
averaging. Doing it incrementally introduced a bias.
2019-03-08 17:02:22 +01:00
aac7d53d58 GPencil: Add basic edit support for Hook and Array modifier
These modifiers were not included in previous commit.
2019-03-08 16:36:11 +01:00
e64f6e0e4c Cleanup: Spelling in comment 2019-03-08 16:21:04 +01:00
7d3979884c GPencil: Make visible Armature modifier in edit mode
This change displays the stroke in the deformed position, but the edition is done in rest position.

This is no the final solution, but at least we have some visual feedback in edit mode.

The real solution is to create a full system to manage derived strokes in Edit mode, but this needs a lot of work and we haven't resources now to do it.
2019-03-08 16:09:20 +01:00
50a8a95ce3 Fix T60086: missing update when removing fcurves from Python API. 2019-03-08 15:41:03 +01:00
Pablo Vazquez
4831dd5f38 UI: Naming and tooltip for the new high-resolution smoke simplify setting.
* Rename "Use Smoke Highres" to "Use High-resolution Smoke"
* Use 'Display' instead of 'Draw', following the naming conventions in 2.8
* Drop the 'Use' prefix in the UI, a "High-resolution Smoke' checkbox sufficiently communicates what it does.
2019-03-08 15:30:51 +01:00
35e33b7451 Cleanup: remove debug prints. 2019-03-08 15:16:08 +01:00
89fa6a7a06 Fix T60900, T61111, T61963: node values stuck after clearing keyframes.
This removes special dependency graph code that was intended to avoid GPU
shader recompiles by preserving the node tree and GPU material in specific
cases. This is no longer needed now that we have a general shader pass
cache that compares the generated shader code. The GPU material is already
being freed in material and world eval as well, so there's no point.

Note also that GPU materials are now safe to free from threads, actual
OpenGL buffer freeing happens delayed.
2019-03-08 15:16:08 +01:00
6752022310 Fix T62327: Multires with Particles: Undo not working
Modifier stack was forced to be re-evaluated when it was not
supposed to. Should also improve sculpt performance.
2019-03-08 14:38:28 +01:00
a749d7d8fa Fix T59304: boolean modifier does not preserve UV textures.
In the old derivedmesh function it was merging customdata layers, added
that back for mesh conversion too.
2019-03-08 14:19:45 +01:00
da73f56917 Fix T62355: Running blender 2.80 headless broken in recent builds 2019-03-08 14:32:04 +01:00
a3ae53b99e Bevel: revert idea of always starting in offset mode.
Commit 208fafb to fix bevel tool units included a change to always
start modal in offset mode. This was may or may not be right but
broke a way in which users could set percent mode and then subsequently
start a modal that bevels in that mode. So going back to old way.
2019-03-08 07:47:25 -05:00
af53c3b135 Fix crash reloading images used in compositor node
Similar to what Brecht committed in
38f0d5f75a.
2019-03-08 13:43:12 +01:00
f4d2144960 Icons: Add GPencil Extrude and Radius icons (take 2)
Also, revision of icons for paint modes, based on suggestions by Aslam Cader.

Previous commit accidentally included an extra file.
2019-03-08 13:11:23 +01:00
1b31859243 Revert "Icons: Add GPencil Extrude and Radius icons"
This reverts commit a44d75a964.
2019-03-08 13:07:20 +01:00
a44d75a964 Icons: Add GPencil Extrude and Radius icons
Also, revision of icons for paint modes, based on suggestions by Aslam Cader.
2019-03-08 13:02:46 +01:00
49b9b159e4 Fix T62317: missing Cycles viewport update when changing active camera. 2019-03-08 12:11:42 +01:00
cf09a2443c Fix T60978: crash toggling window fullscreen on macOS.
GHOST event handling does not need a window in the context, and restoring
it to the previous value is problematic if the window was deleted in the
meantime.
2019-03-08 10:24:59 +01:00
1caa5b14bf Cleanup: remove unused test break code for handling cancels. 2019-03-08 10:24:59 +01:00
252e0d35ee GPencil: Fix field type error in initialization 2019-03-08 08:49:25 +01:00
eb8e656b2b Cleanup: spelling 2019-03-08 17:48:49 +11:00
4185b3e36d Cleanup: style 2019-03-08 17:16:30 +11:00
a9f0f48f7b Cleanup: use doxy sections for node select API 2019-03-08 17:03:49 +11:00
87b3ea1cbc Cleanup: use doxy sections for mask select API 2019-03-08 16:22:38 +11:00
2a1e3db3c9 Cleanup: use doxy sections for object select API 2019-03-08 15:56:55 +11:00
6db49261cc Cleanup: make modal event double click handling more straightforward 2019-03-08 14:19:27 +11:00
96af595f63 WM: fix double click handling in modal keymaps
Model keymaps wasn't matching double-click events with press
as is done in regular keymap handling.
2019-03-08 13:35:48 +11:00
0ba143a1d6 Fix T62095: OpenGL render camera image alignment 2019-03-08 12:37:22 +11:00
a3906edcaf Fix: Info window select all toggle broken
D4477 by @Poulpator
2019-03-08 11:55:52 +11:00
e9373495a9 Cleanup: use macro for listbase collection begin functions 2019-03-08 11:40:37 +11:00
5af85d904e RNA: rename bpy.data.grease_pencil to grease_pencils
All other sequences are plural here.
2019-03-08 09:55:40 +11:00
8f817de0cb Cleanup: use plural names for Main lists
Convention was not to but after discussion on 918941483f we agree its
best to change the convention.

Names now mostly follow RNA.

Some exceptions:

- Use 'nodetrees' instead of 'nodegroups'
  since the struct is called NodeTree.
- Use 'gpencils' instead of 'grease_pencil'
  since 'gpencil' is a common abbreviation in the C code.

Other exceptions:

- Leave 'wm' as it's a list of one.
- Leave 'ipo' as is for versioning.
2019-03-08 09:50:00 +11:00
e68ac2827d fix D4476 collada exporter: in Blender 2.80 we no longer have a specular color.
Specularity is not a color but a factor.
I have replaced the original export code with
a correct export of the Specularity factor.
2019-03-07 23:26:10 +01:00
Dalai Felinto
92d185faeb Properties Editor: Grease Pencil and pinning fixes
The UI was trying to use screen_context.c for its poll and draw
functions. So the active object and active object data and active layer
was used in the UI, instead of the context one.

Besides, for the material, the wrong context path was used altogether
when the active object was a greasepencil.

This would lead to all sort of pinning problems:

* A Mesh panel is pinned, but the active object is a grease pencil, the
grease pencil panels would show.

* If a Grease Pencil (data) panel is pinned, but the active object is not
the one pinned, nothing would show.

* Material panels and pinning were totally broken, showing the material
context for pinned mesh data panels even.

I also sanitized the name of the panels, their inheritance and poll
functions.

Reviewers: antoniov, brecht

Subscribers: billrey

Differential Revision: https://developer.blender.org/D4470
2019-03-07 20:28:25 +00:00
81a09628c2 GPencil: Update stroke when UV factor is changed
The stroke was updated only after doing a refresh operation.
2019-03-07 20:04:14 +01:00
8ef460ddab Fix T62319: changing keyframe properties does not trigger update
Reviewers: brecht

Differential Revision: https://developer.blender.org/D4473
2019-03-07 19:57:08 +01:00
a261d6f2d3 Fix T62328, T62209: revert recent fix for texture slots updates (T60366).
This causes other issues, revert for now until a better fix is found.
Reverts commit da1323d1c9.
2019-03-07 19:41:05 +01:00
8ca43a0c7b Cleanup: remove unused parameter. 2019-03-07 19:41:02 +01:00
99ac2dea35 Cleanup: fix compiler warnings. 2019-03-07 19:41:02 +01:00
b38b0cdb0d Fix T62305: Unconnected group vector inputs are mapped incorrectly
The issue was that `bNodeSocketValueVector` and `bNodeSocketValueRGBA`
don't store the value at the same location in the struct.

I kept the cases for `SOCK_VECTOR` and `SOCK_RGBA` completely separate
for now, because they only share code by coincidence and not because
they are actually the same. Eventually there could be a "Vector Input"
node similar to the "RGB" node.

Reviewers: fclem

Differential Revision: https://developer.blender.org/D4472
2019-03-07 18:03:58 +01:00
1eea4b2634 Fix T62316: Grease Pencil objects display in front of the grid lines
The fix was move the grease pencil engine before overlays

This also fix the origin not visible bug T62100

There is a limitation of this fix, but we cannot fix both problems. If you have object behind a transparent graese pencil objects, this objects will not be visible.

Thanks @fclem for his advices to fix this bug.
2019-03-07 17:53:25 +01:00
cf38b08f52 Fix gizmos not responding to theme color updates
Re-create gizmos when changing theme colors, since
theme colors don't change often this allows gizmos to setup their
colors on initialization.
2019-03-08 02:39:40 +11:00
605749ffaa Modifiers Evaluation: generate loop normals when requested.
This also fixes T62228.

However, datatransfer code is still doing bad things with its source,
still working on proper changes here.
2019-03-07 16:25:25 +01:00
75dad2a04b Multires: Fix crash on exit when sculpting with modifiers
The SubdivCCG structure was re-allocated, but the cached one in
the sculpt session was still pointing to an original one.

This is rather a workaround, but is least evil from what i can
currently think. Remember something similar was also required in
2.7 as well.

Definitely need to revision this change.
2019-03-07 16:09:15 +01:00
9e1d113570 Sculpt; Fix memory leak on redraw normals update 2019-03-07 16:09:15 +01:00
967d82d9b9 Fix T62271: Particles with multires crash on sculpt
In fact, any modifier on top of multires would lead to crash.
Was missing pointer update.

Basically, bring the control flow closer to 2.7.
2019-03-07 16:09:15 +01:00