Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Gavrilov <angavrilov@gmail.com>2019-04-18 23:17:04 +0300
committerAlexander Gavrilov <angavrilov@gmail.com>2019-04-18 23:19:44 +0300
commit638938e5a8c30c405c3b4e96ab4f78095003958b (patch)
treef6a3e274c4a555ee48a5e284a8e150ef57307f87 /source/blender/makesdna
parente8c9e85401ef6162656cf3b10c5aec509ae8a850 (diff)
Armature: remove remains of the object-level deformation data cache.
Now that B-Bone shape data is kept in bPoseChannel_Runtime, the armature level cache only holds one quaternion value per bone. It can also be moved to runtime, and the structure removed. This has an additional effect that, as far as I can tell, now the Armature modifier can run as soon as all of the bones it actually needs are done, thus making T59848 a purely depsgraph level problem.
Diffstat (limited to 'source/blender/makesdna')
-rw-r--r--source/blender/makesdna/DNA_action_types.h6
-rw-r--r--source/blender/makesdna/DNA_object_types.h9
-rw-r--r--source/blender/makesdna/DNA_vec_types.h9
3 files changed, 14 insertions, 10 deletions
diff --git a/source/blender/makesdna/DNA_action_types.h b/source/blender/makesdna/DNA_action_types.h
index fd3409b266c..01f1dc42c44 100644
--- a/source/blender/makesdna/DNA_action_types.h
+++ b/source/blender/makesdna/DNA_action_types.h
@@ -31,6 +31,7 @@
#include "DNA_listBase.h"
#include "DNA_ID.h"
#include "DNA_view2d_types.h"
+#include "DNA_vec_types.h"
#include "DNA_userdef_types.h" /* ThemeWireColor */
struct Collection;
@@ -183,8 +184,11 @@ struct DualQuat;
struct Mat4;
typedef struct bPoseChannel_Runtime {
+ /* Cached dual quaternion for deformation. */
+ struct DualQuat deform_dual_quat;
+
+ /* B-Bone shape data: copy of the segment count for validation. */
int bbone_segments;
- char _pad[4];
/* Rest and posed matrices for segments. */
struct Mat4 *bbone_rest_mats;
diff --git a/source/blender/makesdna/DNA_object_types.h b/source/blender/makesdna/DNA_object_types.h
index dc23a6a1ee2..781a2216029 100644
--- a/source/blender/makesdna/DNA_object_types.h
+++ b/source/blender/makesdna/DNA_object_types.h
@@ -118,11 +118,6 @@ typedef struct LodLevel {
int obhysteresis;
} LodLevel;
-/* Forward declaration for cache bbone deformation information.
- *
- * TODO(sergey): Consider moving it to more appropriate place. */
-struct ObjectBBoneDeform;
-
struct CustomData_MeshMasks;
/* Not saved in file! */
@@ -166,10 +161,6 @@ typedef struct Object_Runtime {
/** Runtime grease pencil drawing data */
struct GpencilBatchCache *gpencil_cache;
-
- struct ObjectBBoneDeform *cached_bbone_deformation;
-
- void *_pad1;
} Object_Runtime;
typedef struct Object {
diff --git a/source/blender/makesdna/DNA_vec_types.h b/source/blender/makesdna/DNA_vec_types.h
index 06e6d881d0e..72a6056e239 100644
--- a/source/blender/makesdna/DNA_vec_types.h
+++ b/source/blender/makesdna/DNA_vec_types.h
@@ -83,4 +83,13 @@ typedef struct rctf {
float ymin, ymax;
} rctf;
+/** dual quaternion. */
+typedef struct DualQuat {
+ float quat[4];
+ float trans[4];
+
+ float scale[4][4];
+ float scale_weight;
+} DualQuat;
+
#endif