Commit Graph

1084 Commits

Author SHA1 Message Date
Campbell Barton
dbdf653f8e Fix bad origindex layers for editmode modifiers
Reverts workaround from last commit.
2018-10-23 13:53:42 +11:00
Campbell Barton
e3013fdc3b DRW: workaround for editmode crash w/ constructive modifiers
Actual cause is bad orig-index layer,
commit this to avoid crash for now.
2018-10-23 12:34:34 +11:00
Campbell Barton
5891f81f25 Cleanup: style, warning 2018-10-23 11:01:25 +11:00
Campbell Barton
6add652c38 Fix T57294: Modifiers cage ignore face visibility 2018-10-19 13:57:00 +11:00
Clément Foucault
c9faaa6ea7 DRW: Fix DRW_shgroup_create_sub returning source shgroup
instead of the actual sub group...
2018-10-17 19:01:56 +02:00
Campbell Barton
96dc1ad308 Fix T56735: Autosmooth option corrupts UVs 2018-10-17 13:26:27 +11:00
Dalai Felinto
540f37003c Fix armature bones spline ik lines offset 2018-10-16 18:28:35 -03:00
Dalai Felinto
f280f83f83 Fix armature bones ik lines offset 2018-10-16 18:22:17 -03:00
Campbell Barton
c1b8ce3170 Fix crash in loose edge check 2018-10-16 15:02:30 +11:00
Campbell Barton
8a94425e96 Cleanup: redundant check for hidden edge 2018-10-16 09:01:52 +11:00
Clément Foucault
478899dee7 Edit Mesh: Fix missing loop normal display 2018-10-15 16:04:50 +02:00
Clément Foucault
03d0219d7a Edit Mesh: Refactor edit mesh drawing
This decouple the vertex display from the face+edges.

This is to reduce the number of triangles required to fix the edges
artifacts (aliasing) and increase viewport reactivity when not actively
navigating (ie. mouse scroll).

Also it makes all vertices visible (not cut-off) even when navigating.

However it makes the navigation drawing a bit slower because it has to
render twice.

Also add a depth bias to the wires to avoid depth fighting when previewing
final mesh (modifiers applied).
2018-10-12 16:43:40 +02:00
Clément Foucault
01745051de DRW: Add DRW_shgroup_create_sub to create children shgroup
This makes is easy to create nested drawcalls that will inherit all the
parents properties. This is usefull if only a few uniforms changes for that
drawcall.
2018-10-12 16:38:55 +02:00
Campbell Barton
5400d6a8fa DRW: correct loose edge hidden face check 2018-10-12 17:00:10 +11:00
Campbell Barton
db91414d7b Cleanup: minor mesh allocation changes 2018-10-12 16:47:43 +11:00
Campbell Barton
eef365a126 Cleanup: use const pointers 2018-10-12 16:42:11 +11:00
Campbell Barton
33e2cf2aab Cleanup: fill vertex buffer in order 2018-10-12 16:25:16 +11:00
Campbell Barton
8ef8b64fc6 DRW: edit-mesh cage loose edge/vert support 2018-10-12 16:05:31 +11:00
Campbell Barton
f4b0684a3f DRW: edit-mesh cage selection support 2018-10-12 13:05:18 +11:00
Campbell Barton
c901ebcd21 DRW: add mapped edit-mode face-dot drawing 2018-10-11 17:23:29 +11:00
Campbell Barton
641190adff DRW: Initial edit-mode cage support
Modifiers such as sub-surf and mirror now work with show-on-cage.

Selection and loose geometry still needs to be supported.
2018-10-11 16:53:25 +11:00
Campbell Barton
d74b89aed0 DRW: add ability to skip drawing vertices 2018-10-11 16:43:38 +11:00
Campbell Barton
bf455c2ca9 DRW: avoid edit-mode layer lookups for freestyle 2018-10-11 15:24:26 +11:00
Campbell Barton
fb79357b3e Cleanup: assign a var to check an edge is real
Makes code slightly more readable.
2018-10-11 15:15:30 +11:00
Campbell Barton
92a494ed51 DRW: remove redundant editmode mesh tessellation
Also re-order logic so loop indices are ensured to be valid.
2018-10-11 11:41:24 +11:00
Campbell Barton
59e4935266 Fix draw manager out of bounds assignment 2018-10-11 09:29:23 +11:00
Campbell Barton
66738d4aa0 Merge branch 'master' into blender2.8 2018-10-11 09:08:30 +11:00
Campbell Barton
95f2604ea7 Cleanup: indentation 2018-10-11 08:20:35 +11:00
Dalai Felinto
1b1702abb0 Fix runtime error: shift of uint
The warning was: runtime error: left shift of 1 by 31 places cannot be
represented in type 'int'

Patch by Clément Foucault.
2018-10-10 13:35:34 -03:00
Campbell Barton
84cf670d1d Modifier: Fix cage option for deform modifiers
Show-on-cage and show-in-editmode options now work as it did in 2.7x
(but only for deformation).
2018-10-10 15:53:52 +11:00
Clément Foucault
c630ce3f6d Fix T57097: Crash when adding a Texture Slot in Texture Paint mode
Was caused by the use of a batch that was using a discarded index buffer.
2018-10-09 17:55:19 +02:00
Clément Foucault
e234ce9b22 Eevee: Add support/Fix Object Info node
Caveat: Random output does not yet work with instance (dupli) objects.
2018-10-09 17:34:04 +02:00
Clément Foucault
0749808d51 DRW: Fix volume visibility when object draw type is wire or bbox 2018-10-09 12:12:38 +02:00
Campbell Barton
1b910082a0 Edit Mesh: replace DerivedMesh w/ Mesh
DerivedMesh is now removed from edit-mesh modifier evaluation.
2018-10-09 17:48:28 +11:00
Campbell Barton
e7218e7049 Cleanup: naming
- immAttrib*    -> immAttr*
- immSkipAttrib -> immAttrSkip

Term 'attr' is a convention for GPU module.
2018-10-09 11:01:50 +11:00
Campbell Barton
772c4d6313 Edit Mesh: basic show in edit mode support
Note this is just using the derived-mesh data at the moment,
to support this properly we'll need to remove derived-mesh.
2018-10-08 17:31:32 +11:00
Campbell Barton
215c23590a Edit Mesh: use deformed mesh w/ face-dot & normals 2018-10-08 12:18:45 +11:00
Campbell Barton
04064fb186 Cleanup: use DRW_object_is_* for object checks
Also use const qualifier for object's.
2018-10-08 10:43:34 +11:00
Alexander Gavrilov
25bd9feadb Add a new B-Bone Custom Handle type that uses the handle bone direction.
Both original handle types are based on location, and Absolute uses it
in a weird way: the Start handle uses the head, while End uses the tail.

This makes controlling the shape of the B-Bone via control bone rotation
really non-intuitive, especially if trying to add a single control for
the tangent in the middle of a B-Bone chain.

To remedy this, add a new custom handle type that uses the orientation
of the control bone, while completely ignoring location. It is even
possible to control both ends of one B-Bone with the same handle bone,
resulting in an S shape.

Reviewers: brecht

Differential Revision: https://developer.blender.org/D3769
2018-10-05 20:19:58 +03:00
Alexander Gavrilov
3c0736bc4b Redefine the Relative custom B-Bone handle type to be more reasonable.
Specifically, it should always use the position of the custom handle
bone head, even when affecting the handle at the tail of the main bone,
and shouldn't apply the special handling for joining two B-Bones.

This handle type was unusably broken before a bug fix included in
recent changes, so it should be safe to break backward compatibility.
2018-10-05 13:29:05 +03:00
Campbell Barton
f36f029321 Cleanup: style 2018-10-05 15:01:58 +10:00
Alexander Gavrilov
65f77ccea1 Fix T56268: display the correct rest shape for B-Bones in Edit Mode.
The rest shape of B-Bones is actually affected by custom handles or
the default connected parent/child mechanism. Ignoring these effects
thus leads to the edit mode shape being different from the actual
rest pose.

This splits the b_bone_spline_setup function that is used to compute
the correct rest and pose shape from pose channels into two parts,
and applies the data structure independent half to edit mode.

In order to access the custom handle settings in Edit Mode, they are
moved to Bone and EditBone, while the bPoseChannel fields are downgraded
in status to a cache for performance. Also, instead of flags, introduce
an enum to specify the handle operation modes, so that new ones could
be added later.

Reviewers: aligorith, brecht

Differential Revision: https://developer.blender.org/D3588
2018-10-04 19:55:44 +03:00
Clément Foucault
d2f913a37a Fix T57040 Mesh Disappearing after exiting edit mode in sculpt 2018-10-04 14:57:23 +02:00
Campbell Barton
d0b47ddd7d Fix UV select tools not refreshing
Add BKE_mesh_batch_cache_dirty_tag option for resetting UV's.
2018-10-04 16:03:51 +10:00
Campbell Barton
55f62b94f8 DRW: minor tweaks to mode checking
Avoid accessing object mode via the view layer active object
when drawing since it's done everywhere we store the active object mode
in the draw-context.
2018-10-04 09:37:18 +10:00
Antonioya
ab8a64a5b9 GP: Show 3D cursor in draw mode
The cursor is used as location to draw new stroke
2018-10-03 22:59:52 +02:00
Antonioya
204ad852a6 GP: Hide different UI elements depending of mode
The 3D Cursor, origin and dummy are hidden depending of the mode to get a cleaner drawing space.
2018-10-03 22:56:23 +02:00
Antonioya
5f4d2be735 GP: Hide dummy and cursor in drawing mode 2018-10-03 20:25:14 +02:00
Clément Foucault
89c30ff746 Pose Mode: Add back IK Degrees of freedom display 2018-10-03 15:44:12 +02:00
Campbell Barton
4c22807e69 Cleanup: style 2018-10-03 08:10:48 +10:00