Commit Graph

123 Commits

Author SHA1 Message Date
eb9237eb20 Cleanup: style 2019-04-09 08:44:06 +02:00
22bc9fb4a9 Cleanup: style 2019-04-04 08:13:13 +11:00
f916b43256 Fix T60421: Bone heads are hidden when non-connected parent is hidden
The root point of a bone is now always drawn unless it is connected to an other bone.

Reviewed By: Clément Foucault

Differential Revision: http://developer.blender.org/D4194
2019-03-28 13:09:16 +01:00
73b55a5508 Cleanup: style, use braces for draw 2019-03-28 01:14:03 +11:00
37af7ce779 DRW: support clipping for armature bone axes
Also minor changes to make empty axis match armature axis.
2019-03-16 18:43:36 +11:00
c55fb58e8a DRW: support clipping for envelope armature draw type 2019-03-16 18:26:16 +11:00
6aebb5a4d5 DRW: support clipping for relationship lines 2019-03-16 17:37:08 +11:00
6fd0d810b4 DRW: support clipping for bone verts 2019-03-06 01:26:30 +11:00
3d4d7b97c2 Cleanup: style 2019-02-28 12:30:56 +11:00
fe5d26807b Armature: Force Transparent bone in wireframe display type/mode
This makes the bones transparent when the object or the viewport display
type is Wireframe. This is in order to make things consistent.

In object mode all bones are fully transparent to not create more visual
noise if the scene is complex.

Another small addition is that the Bounding Box draw mode now works as
expected on armatures.
2019-02-27 17:46:17 +01:00
53b484d081 DNA: rename select_color -> select_id
The term color is misleading, it's an integer id that happens to be
written to a color in some cases, then converted back to an integer.
2019-02-19 09:45:48 +11:00
de13d0a80c doxygen: add newline after \file
While \file doesn't need an argument, it can't have another doxy
command after it.
2019-02-18 08:22:12 +11:00
16d7967c2b Cleanup: use shorter name for shader config
The struct name is descriptive,
this isn't going to be confused with other variables.
2019-02-10 11:02:06 +11:00
813800f143 DRW: support clipping for stick & wire bones 2019-02-08 23:21:22 +11:00
7325035e60 DRW: support clipping for octahedral & box bones 2019-02-07 08:03:56 +11:00
eef4077f18 Cleanup: remove redundant doxygen \file argument
Move \ingroup onto same line to be more compact and
make it clear the file is in the group.
2019-02-06 15:45:22 +11:00
65ec7ec524 Cleanup: remove redundant, invalid info from headers
BF-admins agree to remove header information that isn't useful,
to reduce noise.

- BEGIN/END license blocks

  Developers should add non license comments as separate comment blocks.
  No need for separator text.

- Contributors

  This is often invalid, outdated or misleading
  especially when splitting files.

  It's more useful to git-blame to find out who has developed the code.

See P901 for script to perform these edits.
2019-02-02 01:36:28 +11:00
f20dbc293f Cleanup: blank lines over doxy headers 2019-01-26 21:43:24 +11:00
19b5f5493c Cleanup: draw manager headers 2019-01-26 20:08:52 +11:00
a4fe338dd8 Cleanup: add missing braces to draw manager 2019-01-25 07:12:13 +11:00
dc3b5024be Cleanup: add BEGIN/END to GPL headers 2019-01-23 11:32:43 +11:00
2d98dce7ee Cleanup: rename BASE_FROMDUPLI -> BASE_FROM_DUPLI
Matches `BASE_FROM_SET`.
2019-01-15 23:30:31 +11:00
dde4375d5c Fix T60504: Armature wire draw type hidden when unselected 2019-01-15 14:02:13 +11:00
99fb654ffd DRW: Cleanup / Renaming of mesh batch cache functions
THis is in order to avoid the jungle of names being different at each
step of the API.

Also removes some unused functions.
2018-12-18 20:51:52 +01:00
d4dcad0ad6 Fix crash with armature custom bone in wireframe mode 2018-12-18 14:51:05 +01:00
77d9ddc5ea Armature: temp workaround for crash caused by custom bone drawing 2018-12-18 13:08:17 +01:00
55b31dd98c Merge branch 'master' into blender2.8 2018-12-02 14:37:04 +11:00
1e820898ff Depsgraph: add a new operation node for computing B-Bone segments.
Computing the shape of a B-Bone is a quite expensive operation, and
there are multiple constraints that can access this information in
a variety of useful ways. This means computing the shape once per
bone and saving it is good for performance.

Since the shape may depend on the position of up to two other bones,
often in a "cyclic" manner, this computation has to be a separate
node with its own dependencies.

Reviewers: sergey

Differential Revision: https://developer.blender.org/D3975
2018-11-23 23:19:23 +03:00
25a9816c30 Cleanup: use bool 2018-11-05 13:22:49 +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
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
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
f36f029321 Cleanup: style 2018-10-05 15:01:58 +10:00
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
89c30ff746 Pose Mode: Add back IK Degrees of freedom display 2018-10-03 15:44:12 +02:00
7cc9998809 Edit Mesh: Center text when Edge length & Edge Angle is activated
This is more readable as the informations will never overlap and be off the
center of the edge.
2018-09-25 22:51:54 +02:00
6b433f4eb3 Merge branch 'master' into blender2.8 2018-09-19 18:20:50 +02:00
31fcd40efd Cleanup: use static variables 2018-07-31 20:45:43 +10:00
6c6ecdd230 Armature: Fix bone always transparent when enabling MSAA 2018-07-30 14:18:55 +02:00
2de283615f Make draw_armature() abort in case pose is not up-to-date.
Previously it was calling `BKE_pose_rebuild()`, such thing shall never
be called from drawing code! Hopefully this now works as expected and
that horrible hack is not needed anymore.
2018-07-20 10:22:06 +02:00
c205de0203 Fix T55973: [2.8] Crash when 'apply pose as rest pose' when bone scale is 0,0,0.
`BKE_pose_rebuild()` should (ideally) always trigger a rebuild of the
depsgraph, since it can add or remove posechannels.

This function now takes a Main parameter to ensure that related
depsgraphes are tagged as dirty (kept it optional, for some corner cases).

We should also probably double-check calls to that function, think in
theory it should only be called from depsgraph itself? But for now...
2018-07-20 10:22:06 +02:00
8cd7828792 GWN: Port to GPU module: Replace GWN prefix by GPU 2018-07-18 11:49:15 +02:00
9d43ed521c Cleanup: abbreviate unsigned types (draw manager) 2018-07-08 12:49:03 +02:00
39678442e1 Cleanup: typos 2018-07-03 09:22:02 +02:00
ca16c74e87 Viewport: "Show Relationship Lines" overlay toggle is now respected by Object Mode & Armatures (Edit/Pose) 2018-06-11 02:49:38 +12:00
4e014727f6 Armature: Fix missing loose edges on custom bone shapes. 2018-06-07 12:58:23 +02:00
975828e23a Armature: Fix warning. 2018-05-26 23:24:11 +02:00
0c9974c8cd Workbench: Shadow: Use depth fail method for manifold objects.
Since this method have no failure case for manifold objects, use it.
2018-05-26 23:01:30 +02:00
44935fdfa3 Armature: Make Custom bone have the same appearance as other bones.
I had to correct some errors in the winding order of the normal bones.
2018-05-26 22:28:52 +02:00