Commit Graph

66144 Commits

Author SHA1 Message Date
46eb5a0b8a Tweak behavior of object.to_mesh()
- Passing original object with apply_modifiers=false will give a
  non-modified non-deformed mesh.
  The result mesh will point to datablocks from the original "domain". For
  example, materials will be original.

- Passing original object with apply_modifiers=true will give a mesh which
  has all modifiers applied.
  The result mesh will point to datablocks from the original "domain". For
  example, materials will be original.

- Passing evaluated object will ignore apply_modifiers argument, and the
  result always contains all modifiers applied.
  The result mesh will point to an evaluated datablocks. For example,
  materials will be an evaluated IDs from the dependency graph.

Fixes T62916: Applying boolean modifier does not set material properly

Differential Revision: https://developer.blender.org/D4604
2019-04-01 14:49:23 +02:00
4370d00b0b Modifiers: Proper fix for the Apply Modifier
It is up to the operator to pass valid object to the modifiers
evaluation.

Fixes T62916: Applying boolean modifier does not set materials properly
2019-04-01 14:43:45 +02:00
64c8d72ef1 Modifiers: Use object passed to evaluation
This was wrong and violating design to force modifiers to query
evaluated objects and IDs. It is up to the caller to make sure
the object is properly evaluatable.

Effectively, reverting changes from de491abf99 (and possibly
other related changes).
2019-04-01 14:43:45 +02:00
a2a571987c Fix T62960: Expanding/Closing Constraints/Modifiers causes re-render
Mark specific properties as no-dependency-graph tag.

This is needed to avoid a centralized Copy-on-Write tag from RNA
pointer update.
2019-04-01 14:30:42 +02:00
90638d850d Remove evaluated RNA pointer lookup in interface
Since there is a flush of evaluated values back to the original
for an active dependency graph we don't need this lookup anymore.

Not only it slows interface drawing down, but also is becoming
in a way of the upcoming fix.
2019-04-01 14:30:42 +02:00
61fa6165df Fix T63071: Bevel inconsistent results toggling harden_normals.
Some iterations in bevel were over a hash table, which leads
to possibly different results run-to-run, especially when
loop_slide is enabled. Changed those iters to go over all verts
of BMesh, which leads to consistent order run-to-run.
2019-04-01 07:58:34 -04:00
dd4108545a Fix T63169: 'Duplicate Current' entry in new workspace menu is not translated. 2019-04-01 11:31:34 +02:00
d3367f3ca2 GPencil: Redesign soft eraser logic
The old logic was working if the eraser was moved towards the end of the stroke, but got ugly results when the eraser was done towards the start of the stroke.
2019-04-01 11:24:17 +02:00
48b1ba02e5 GPencil: Remove low limit for soft eraser
The low limit was not needed in the loop.
2019-04-01 11:24:17 +02:00
b936d7b16c Fix T62996
Reviewers
    Brecht Van Lommel (brecht)
    Clément Foucault (fclem)

Differential revision: https://developer.blender.org/D4618
2019-03-31 14:52:47 -07:00
a41008964c Fix: Buffer overflow in StudioLight
sl->light_ambient is a float[3], copy_v4_fl4 overwrites sl->free_function with a bogus
pointer on 32 bit.
2019-03-31 13:45:26 -06:00
54943e319a Fix/Cleanup bad usage of RNA_def_parameter_clear_flags() on RNA properties. 2019-03-31 16:52:23 +02:00
700346d377 Fix T63137: crash pressing enter to confirm menu, after recent changes. 2019-03-30 20:37:45 +01:00
2c5a919212 Cleanup: remove unused modifier methods. 2019-03-30 19:17:05 +01:00
03bd024c07 GPencil: Uses same random seed for render in Noise modifier
As the random seed was calculated in the copy data, the render could be a little different. Now, the data is saved in the original data.
2019-03-30 17:06:49 +01:00
Author Name
4b6a4b5bc2 GPencil: Fix segment fault when use F3 search menu.
Author of the patch: Robert Guetzkow (@rjg)
2019-03-30 16:06:45 +01:00
127ad4fa4a GPencil: Improve soft eraser for low pressure strokes
For very thin strokes with low pressure, the low limit value was too high.
2019-03-30 10:43:52 +01:00
de0dab66ff Fix T63086: Navigation problem with Background/Reference Images
The issue was the manipulated depth for images would be used when doing distance depth checks.
Now we will use the actual depth of the image object when doing such tests.

Reviewed By: Clément Foucault

Differential Revision: http://developer.blender.org/D4616
2019-03-30 08:22:43 +01:00
024d02256e Fix T63115 crash upon switching to textured/rendered mode 2019-03-30 04:20:35 +01:00
98f00a3eb5 UI: Icons update
New icons from Andrzej Ambroż / jendrzych:
-Adds separate icons for 3D Cursor orientation and pivot
Also, many dozens of tweaks and updates - too many to mention here.
Full list is on Devtalk
2019-03-30 01:02:15 +01:00
25ec4b437f Cleanup: style, use braces for the Python API 2019-03-30 07:14:28 +11:00
18d06e8d21 Cleanup: style 2019-03-30 07:14:28 +11:00
d6747f310f Eevee: Material: Decouple transparent shadows from blend mode
This makes it easier to exclude a surface from casting shadows and can be
used to manipulate the shadows even for opaque surfaces.

Versionning ensure that old behavior is transfered to new rendering logic.
2019-03-29 19:18:19 +01:00
f0a20ae1c9 Fix T61129 Eevee: alpha texture shadow bug
This was due to some shading resources not being bound for the shadow
shader. This commit completely remove the shading part when in a shadow
shader. Thus making it a bit more lightweight and removing the needed
sources.
2019-03-29 19:18:19 +01:00
5aca73e774 Fix header text for muted collapsed nodes not being greyed out. 2019-03-29 17:56:42 +01:00
dec9c7d87e Eevee: Implement Texture coordinate from object
First try to implement T57489. But unfortunately, there is a missing
dependency in the depsgraph that does not trigger the shader update.
2019-03-29 17:41:06 +01:00
c14e6ee9a4 Cleanup: Line wrapping 2019-03-29 15:41:13 +01:00
fb86d09195 GPencil: Improve soft eraser for last stroke points
Now, the last point is managed separately in order to get smoother transition.
2019-03-29 15:39:47 +01:00
a942d8859c Cleanup: Spelling in comment 2019-03-29 15:33:44 +01:00
d66ed7d540 Fix T63042: Grease pencil and armature will sometimes copy successfully because of the put in Collection order, sometimes fail.
Remove remapping to new IDs from `BKE_object_duplicate()` itself, doing
it here will break later remapping done after all desired objects have
been duplicated, preventing complete remap of ID pointers used in obdata
and other sub-data of duplicated objects.

Checked, the only two usages of this function were already doing
separated later step for this anyway.
2019-03-29 14:57:32 +01:00
d9829efb0a Cleanup: BKE_object_duplicate.
Comments, code consistency, remove disabled code...
2019-03-29 14:57:32 +01:00
2182ae5c0f Cleanup: Fix comment. 2019-03-29 14:57:32 +01:00
0cd36ccfaf Fix T63075: edit mode crash with deforming modifiers, after recent changes. 2019-03-29 14:53:56 +01:00
800aeaba72 GPencil: Cleanup code
Reduce double function calling.
2019-03-29 12:51:46 +01:00
7fc7e325ef Fix T63082: Outliner allows assign grease pencil materials to mesh
The grease pencil materials only can be assigned to objects of grease pencil type.
2019-03-29 11:58:28 +01:00
1def03d797 Fix T62938: Rigid body crash with surface effector
Missing dependency graph relation from geometry to simulation,
which made simulation to use evaluated mesh while it is being
evaluated.
2019-03-29 10:27:57 +01:00
9f55beb971 Cleanup: Make it obvious which relations are used
Relation in dependency graph is something else. So make it clear
that those are the effector ones.
2019-03-29 10:21:36 +01:00
d724363a39 Fix T62908: Missing update when inserting keyframe from dopesheet 2019-03-29 10:01:55 +01:00
99d4321fef Fix T63063: solidify modifier crash after recent changes.
It should not assume there to be an origindex layer. Checked other modifiers
and they all seem to explicitly create it or verify if it's NULl.
2019-03-29 01:43:30 +01:00
7cbd1b0c98 Eevee: Render: Reduce debug print amount to not decrease perf
This is to fix the slowdown issue experienced on windows when rendering
from command line.

Fix T59649 Eevee in command-line batch mode is slow with particles/duplis
2019-03-28 23:24:25 +01:00
4d71b655ec GPU: Fix color difference when rendering to gpu_py_offscreen
Now we do the color management inside the Draw manager and output CM byte
buffer.
2019-03-28 22:38:55 +01:00
42dd888b98 Fix T62178 Eevee: Texture Box mapping not matching Cycles if object is scaled
The wrong transformation was used. Add a new matrix specially for this case.

This also fix the Node texture coordinate that was suffering the same issue.
2019-03-28 22:08:54 +01:00
d027df3add Fix T58387 Voronoi(Cells) does not work on eevee (amd + windows)
Thanks to Gabor Fekete for helping finding the issue.

Was caused by uninitialized variable. Also took the oportunity to use comp
swizzling instead of multiple assignment.
2019-03-28 22:08:54 +01:00
a89780abb5 DRW: Fix Memory leak introduced by previous commit 2019-03-28 22:08:54 +01:00
ec0eeb918b DRW/Eevee: Add correct support for Orco
Until now, Orcos were computed by the gpu (GLSL) and were not taking into
account the modifier stack (breaking orco for deformed mesh).

Now Orco is now computed on CPU but only if a modifier stack is present.

Tagging that an ORCO layer is present is done via a 4th component, which is
a waste of memory/bandwidth. Best would be to do the same as auto attrib
color space and save a bool uniform somewhere but for now it's too
disruptive.
2019-03-28 22:08:54 +01:00
Nathan Craddock
1ef59026e4 UI: tweak display of report messages in the status bar.
Remove fading away the color, share theme colors with info editor.

Differential Revision: https://developer.blender.org/D4197
2019-03-28 20:02:59 +01:00
Robert Guetzkow
56428a46b9 Fix T60719: muted nodes are not clearly visible.
Now the entire node gets greyed out, instead of using a red header that is
hard to distinguish from other nodes with similar header colors.

Differential Revision: https://developer.blender.org/D4597
2019-03-28 20:02:59 +01:00
a016ad2ea8 Fix part of T60735: invalid CD_ORIGINDEX data in some modifier stack evaluations.
BKE_mesh_new_nomain automatically added a CD_ORIGINDEX layer initialized to 0,
which was never filled in correctly. In 2.7 the equivalent function used to
modify the source derivedmesh and add valid original indices to it, but this
is no longer possible in the new design and was quite unpredictable anyway.

Now instead rely on mesh_calc_modifiers and the depsgraph to determine when
CD_ORIGINDEX should be added.
2019-03-28 20:02:59 +01:00
0680525147 Fix T60735: Cycles render hangs with vertex instancing.
This should not use the original index as a unique instance index, with for
example an array modifier the same original index may be used multiple times.
2019-03-28 20:02:59 +01:00
7b95d64d2f Cleanup: better naming, comments, variable scoping in mesh_calc_modifiers. 2019-03-28 20:02:59 +01:00