Commit Graph

60799 Commits

Author SHA1 Message Date
Brecht Van Lommel
e684e0ec95 Cleanup: fix warnings, removed unused code. 2018-05-03 16:33:12 +02:00
Sergey Sharybin
bb92edd1c8 Depsgraph: Keep edit bones around, fixes missing edit mode with copy on write 2018-05-03 16:23:16 +02:00
Dalai Felinto
14f2a1c8e8 Fix T54805: Bones are white in edit mode 2018-05-03 16:19:55 +02:00
Sergey Sharybin
d8b43a8066 Depsgraph: Make sure evaluated pose channels are pointing to evaluated bones 2018-05-03 16:11:07 +02:00
Clément Foucault
a06b0d29aa Eevee: Shadows: Perf: Do not update shadows that are not inside the view. 2018-05-03 16:08:14 +02:00
Clément Foucault
ffca77814e DRW: Add plane culling test.
Usefull to see if the view frustum is totally behind a plane.
2018-05-03 16:08:14 +02:00
Clément Foucault
4d0b6652cf DRW: Silence unused function warning in release. 2018-05-03 16:08:14 +02:00
Bastien Montagne
b2b9efbe6d Merge branch 'master' into blender2.8 2018-05-03 16:01:43 +02:00
Bastien Montagne
a5d0597b92 Fix tooltip for constraints' subtarget.
Thanks @aligorith for the head-up.
2018-05-03 16:00:34 +02:00
Jeroen Bakker
0b1c673e14 Workbench: selection method for studio lighting 2018-05-03 15:33:13 +02:00
Jeroen Bakker
2bf333b35d Workbench: studiolight 2018-05-03 15:31:03 +02:00
Joshua Leung
8a2d2f1bb4 Fix: Tag armature for copy on write when selecting bones, so active bone gets updated
Note: This still needs some copy-on-write magic to get the bone pointers
to get remapped properly (e.g. evaluated pose still refers to original
arm->bones, and arm->act_bone isn't getting remapped).
2018-05-03 15:18:39 +02:00
Bastien Montagne
a086f61df7 Merge branch 'master' into blender2.8 2018-05-03 15:02:05 +02:00
Bastien Montagne
53c43259ad Cleanup: factorize RNA constraint targets definition.
No expected changes in behavior from that commit!
2018-05-03 15:00:12 +02:00
Campbell Barton
dced0518d9 Fix crash selecting envelope bone joint 2018-05-03 14:51:29 +02:00
Sergey Sharybin
057e00e649 Render preview: Assign proper depsgraph for icon preview
Wondering why it only was visible when running without copy on write.
2018-05-03 14:25:29 +02:00
Sergey Sharybin
95b388c3df Depsgraph: Fix missing action re-map with node tree update
After copying animation data we need to re-map action, otherwise
our original DNA values will go out of symc, causing flickering
when tweaking values on animated node tree.
2018-05-03 14:16:12 +02:00
Sergey Sharybin
e013d2eb4b Render preview: Make it to preserve unkeyed animation
The idea is to re-use evaluated datablock from within current context.

This relies on the following factors:

- It expects scene to be fully evaluated before preview jobs starts.
- It expects datablocks to be localized.
2018-05-03 14:16:12 +02:00
Sybren A. Stüvel
181356edba Restored HQ normals in Solidify modifier 2018-05-03 14:11:22 +02:00
Germano
1677ea89c7 Metaball: Move handles shader to draw/modes/shader and reference them in draw_common.c 2018-05-03 09:11:02 -03:00
Dalai Felinto
9c78d9ba9f Fix pose transformation helper lines
This was broken since 33bb8b785a (triple-buffer changes).
This also helps help lines as a whole.
2018-05-03 13:05:38 +02:00
Sergey Sharybin
ecb143fe5d Render preview: Remove dedicated depsgraph
It is not needed since render pipeline will create its own depsgraph.
2018-05-03 12:57:54 +02:00
Sergey Sharybin
5975d6581c Depsgraph: Tag IDs for animation update on visible update
Without this it's quite unpredictable what state of unkeyed changes
datablock will end up with.
2018-05-03 12:55:01 +02:00
Sergey Sharybin
ef94415060 Depsgraph: Fix threading conflict between node animation and shading update 2018-05-03 12:55:01 +02:00
Sergey Sharybin
98ac0188ed Depsgraph: Fix wrong debug message 2018-05-03 12:55:00 +02:00
Dalai Felinto
c4bf936d53 Fix sculpt grab cursor
This was broken since 33bb8b785a (triple-buffer changes).
We need to account to the area limits when drawing the cursor.
2018-05-03 11:48:35 +02:00
Sergey Sharybin
1833e8d7b0 Fix for material/node tree localization
The workaround removal was wrong, the whole id->adt of a local
copy is to be NULL.

But now instead of modifying original datablock, we tell library
manager to not copy animation data.
2018-05-03 11:25:47 +02:00
Clément Foucault
8431e0aab5 UI: Fix region_draw_azone_tab_plus missing/broken background.
This was due to the background being drawn by a batch that had its VAO
generated in the windows "UI" context.

Since we use the DRW ogl context to draw the entire area, we have to
regenerate the VAO for thoses UI batches to be drawn correctly.
2018-05-03 11:20:20 +02:00
Jeroen Bakker
026792ffed Workbench: Show 3D Cursor Overlay 2018-05-03 10:55:28 +02:00
Dalai Felinto
d64f12248a Initialize alpha discard for uiWidgetBaseParameters
No functional change, just playing safe and documenting how to
initialize the parameter in most of the cases.
2018-05-03 09:59:48 +02:00
Campbell Barton
31f8d05432 Merge branch 'master' into blender2.8 2018-05-03 08:31:38 +02:00
Campbell Barton
0d6ddd0a1d Cleanup: split out extrude spin/screw
Since these will have their own manipulators,
its more convenient to keep them separate.
2018-05-03 08:20:29 +02:00
Campbell Barton
e954082dda WM: warn when tool widget not found
This happens when testing adding tools, assert isn't useful.
2018-05-03 07:33:44 +02:00
Campbell Barton
d9f4ce617b Cleanup: trailing space 2018-05-03 07:22:04 +02:00
Campbell Barton
7840c593b8 Cleanup: remove axis bounds ifdef
This was added for scale-cage manipulator, but seems generally useful.
2018-05-03 07:21:06 +02:00
Campbell Barton
51aba69b89 Transform: expose 3D center/axis calculation
This is needed for other manipulator placement.
2018-05-03 07:19:33 +02:00
Campbell Barton
f5cb96704b WM: add function to access last_properties 2018-05-03 07:09:22 +02:00
Germano
e4774c0b2d Metaball: pointers used in DRW_shgroup_call_dynamic_add don't need to hold the reference. 2018-05-02 21:26:43 -03:00
Clément Foucault
36bbf80929 Armature: Envelope: Small cleanup + don't smooth the distance display.
The actual weighting calculation is not smooth as the bone display.

The bone itself can be smooth for esthetic purpose but the distance display
should match the underlying weighting formula.
2018-05-02 20:49:38 +02:00
Clément Foucault
46662a289b Armature: Envelope: Optimize outline shader. 2018-05-02 20:49:38 +02:00
Clément Foucault
0ea329d32d Armature: Envelope: Revisit envelope drawing again.
Past shader was too slow and had bad artifacts. This method is much simpler
and eficient and only exhibit some popping when the raidus of the head/tail
is changed.
2018-05-02 20:49:38 +02:00
Clément Foucault
73cb83d48f GPUShader: Remove unused envelope shaders. 2018-05-02 20:49:38 +02:00
Clément Foucault
e764d2b6ba Armature: More work and cleanup on envelope bones drawing.
- Draw tail & head sphere with point shader (no needs for another way).
- Use the same function for issuing the calls for wire and solid envelope.
2018-05-02 20:49:38 +02:00
Clément Foucault
a76d27f694 Armature: Add envelope outline shader. 2018-05-02 20:49:38 +02:00
Clément Foucault
01cec3e0c5 Armature: Envelope Bones: Change drawing method.
We now use a more pleasant and efficient way to display enveloppe bones
and their radius.

For this we use a capsule geometry that is displaced (in the vertex shader)
to a signed distance field that represents the bone shape.

The bone distance radius are now drawn in 3D using a "pseudo-fresnel" effect.
This gives a better understanding of what is inside the radius of influence.

When capsules are not needed, we switch to default raytraced points.
The capsules are not distorded by the bone's matrix (same as their actual
influence radius) and are correctly displayed even with complex scaled
parents hierarchy.
2018-05-02 20:49:38 +02:00
Clément Foucault
18071f4e0e Armature: Draw envelope on non MSAA buffer.
Appart from the performance issue, the MSAA resolve pass is not compatible
with additive passes.
2018-05-02 20:49:38 +02:00
Clément Foucault
d0d282bf2f Armature: Add multisampling to posemode. 2018-05-02 20:49:38 +02:00
Clément Foucault
6f5bf23c98 DRW: Convert DRW_cache_circle_get to use GWN_PRIM_LINE_LOOP 2018-05-02 20:49:38 +02:00
Clément Foucault
8c2a6f957a Armature: "Raytrace" bones endpoint spheres.
Here is how it works:
We render a high poly disc that we orient & scale towards the camera so that
it covers the same pixel of the sphere it's supposed to represent.

Then the pixel shader raytrace the sphere (effectively starting from
the poly disc depth) and outputs the depth to gl_FragDepth.

This approach has many benefit:
- high quality obviously: per pixel accurate depth!
- compatible with MSAA: since the sphere horizon is delimited by polygons,
  we get the coverage computed by the rasterizer. However we still gets
  aliasing if the sphere intersect directly other meshes.
- virtually no overdraw: there is no backface to shade but we still get
  overdraw because by little triangle [gpus rasterize pixel by groups of 4].
- allows early depth test: since the poly disc is set at the nearest depth
  we can output, we can use GL_ARB_conservative_depth to enable early depth
  test and discard pixels that are already behind geometry.
- can draw outline pretty easily without geometry shader.
2018-05-02 20:49:38 +02:00
Clément Foucault
a56561dcd2 DRW: Make use of new multisample resolve pass. 2018-05-02 20:49:38 +02:00