25#include "RNA_prototypes.hh"
40 bool has_rigidbody =
false;
41 bool has_parent =
false;
57 has_parent = (ob->
parent !=
nullptr);
62 else if (
ptr->
type == &RNA_PoseBone) {
73 has_parent = (pchan->
parent !=
nullptr);
77 "visualkey_can_use called for data-block that is not an Object or PoseBone.");
82 if (has_parent || has_rigidbody) {
88 if (identifier ==
nullptr) {
89 printf(
"%s failed: nullptr identifier\n", __func__);
94 if (strstr(identifier,
"location")) {
97 else if (strstr(identifier,
"rotation")) {
100 else if (strstr(identifier,
"scale")) {
104 printf(
"%s failed: identifier - '%s'\n", __func__, identifier);
109 for (; con; con = con->
next) {
211 if (
ptr->
type == &RNA_Object) {
214 if (strstr(identifier,
"location")) {
215 values.extend({ob->object_to_world().location(), 3});
219 copy_m4_m4(tmat, ob->object_to_world().ptr());
222 else if (
ptr->
type == &RNA_PoseBone) {
229 if (strstr(identifier,
"location")) {
232 values.extend({tmat[3], 3});
242 if (strstr(identifier,
"rotation_euler")) {
248 if (strstr(identifier,
"rotation_quaternion")) {
254 if (strstr(identifier,
"rotation_axis_angle")) {
261 if (strstr(identifier,
"scale")) {
Helper functions for animation to interact with the RNA system.
Functions to work with the visual keying system.
void BKE_armature_mat_pose_to_bone(bPoseChannel *pchan, const float inmat[4][4], float outmat[4][4])
#define BLI_assert_msg(a, msg)
void copy_m4_m4(float m1[4][4], const float m2[4][4])
void mat4_to_size(float size[3], const float M[4][4])
void mat4_to_axis_angle(float axis[3], float *angle, const float mat[4][4])
void mat4_to_eulO(float eul[3], short order, const float m[4][4])
void mat4_to_quat(float q[4], const float mat[4][4])
@ CONSTRAINT_TYPE_TRACKTO
@ CONSTRAINT_TYPE_CHILDOF
@ CONSTRAINT_TYPE_TRANSFORM
@ CONSTRAINT_TYPE_ARMATURE
@ CONSTRAINT_TYPE_LOCLIKE
@ CONSTRAINT_TYPE_ROTLIMIT
@ CONSTRAINT_TYPE_ROTLIKE
@ CONSTRAINT_TYPE_KINEMATIC
@ CONSTRAINT_TYPE_DISTLIMIT
@ CONSTRAINT_TYPE_TRANSLIKE
@ CONSTRAINT_TYPE_LOCLIMIT
@ CONSTRAINT_TYPE_LOCKTRACK
@ CONSTRAINT_TYPE_SIZELIMIT
@ CONSTRAINT_TYPE_FOLLOWPATH
@ CONSTRAINT_TYPE_SIZELIKE
@ CONSTRAINT_TYPE_DAMPTRACK
Object is a sort of wrapper for general info.
Types and defines for representing Rigid Body entities.
Vector< float > visualkey_get_values(PointerRNA *ptr, PropertyRNA *prop)
bool visualkey_can_use(PointerRNA *ptr, PropertyRNA *prop)
Vector< float > get_rna_values(PointerRNA *ptr, PropertyRNA *prop)
const char * RNA_property_identifier(const PropertyRNA *prop)
struct RigidBodyOb * rigidbody_object
struct bConstraint * next
struct bPoseChannel * parent