~ubuntu-branches/ubuntu/trusty/blender/trusty

« back to all changes in this revision

Viewing changes to source/blender/editors/include/ED_armature.h

  • Committer: Package Import Robot
  • Author(s): Jeremy Bicha
  • Date: 2013-03-06 12:08:47 UTC
  • mfrom: (1.5.1) (14.1.8 experimental)
  • Revision ID: package-import@ubuntu.com-20130306120847-frjfaryb2zrotwcg
Tags: 2.66a-1ubuntu1
* Resynchronize with Debian (LP: #1076930, #1089256, #1052743, #999024,
  #1122888, #1147084)
* debian/control:
  - Lower build-depends on libavcodec-dev since we're not
    doing the libav9 transition in Ubuntu yet

Show diffs side-by-side

added added

removed removed

Lines of Context:
53
53
struct wmKeyConfig;
54
54
struct wmOperator;
55
55
 
56
 
typedef struct EditBone
57
 
{
 
56
typedef struct EditBone {
58
57
        struct EditBone *next, *prev;
59
 
        struct IDProperty *prop;/* User-Defined Properties on this Bone */
60
 
        struct EditBone *parent;/* Editbones have a one-way link  (i.e. children refer
61
 
                                 * to parents.  This is converted to a two-way link for
62
 
                                 * normal bones when leaving editmode. */
 
58
        struct IDProperty *prop; /* User-Defined Properties on this Bone */
 
59
        struct EditBone *parent; /* Editbones have a one-way link  (i.e. children refer
 
60
                                  * to parents.  This is converted to a two-way link for
 
61
                                  * normal bones when leaving editmode. */
63
62
        void    *temp;          /* Used to store temporary data */
64
63
 
65
64
        char    name[64];       /* MAX_NAME */
68
67
                                 * is tail-head while roll provides the angle. Refer to Graphics
69
68
                                 * Gems 1 p. 466 (section IX.6) if it's not already in here somewhere*/
70
69
 
71
 
        float   head[3];        /* Orientation and length is implicit during editing */
72
 
        float   tail[3];
73
 
                                /* All joints are considered to have zero rotation with respect to
74
 
                                 * their parents.       Therefore any rotations specified during the
75
 
                                 * animation are automatically relative to the bones' rest positions*/
76
 
        int             flag;
77
 
        int             layer;
 
70
        float head[3];          /* Orientation and length is implicit during editing */
 
71
        float tail[3];
 
72
        /* All joints are considered to have zero rotation with respect to
 
73
         * their parents.       Therefore any rotations specified during the
 
74
         * animation are automatically relative to the bones' rest positions*/
 
75
        int flag;
 
76
        int layer;
78
77
        
79
78
        float dist, weight;
80
79
        float xwidth, length, zwidth;  /* put them in order! transform uses this as scale */
86
85
        short segments;
87
86
} EditBone;
88
87
 
89
 
#define BONESEL_ROOT    (1<<28)
90
 
#define BONESEL_TIP             (1<<29)
91
 
#define BONESEL_BONE    (1<<30)
92
 
#define BONESEL_ANY             (BONESEL_TIP|BONESEL_ROOT|BONESEL_BONE)
 
88
#define BONESEL_ROOT    (1 << 28)
 
89
#define BONESEL_TIP     (1 << 29)
 
90
#define BONESEL_BONE    (1 << 30)
 
91
#define BONESEL_ANY     (BONESEL_TIP | BONESEL_ROOT | BONESEL_BONE)
93
92
 
94
 
#define BONESEL_NOSEL   (1<<31) /* Indicates a negative number */
 
93
#define BONESEL_NOSEL   (1 << 31) /* Indicates a negative number */
95
94
 
96
95
/* useful macros */
97
 
#define EBONE_VISIBLE(arm, ebone) (((arm)->layer & (ebone)->layer) && !((ebone)->flag & BONE_HIDDEN_A))
98
 
#define EBONE_EDITABLE(ebone) (((ebone)->flag & BONE_SELECTED) && !((ebone)->flag & BONE_EDITMODE_LOCKED)) 
 
96
#define EBONE_VISIBLE(arm, ebone) ( \
 
97
        CHECK_TYPE_INLINE(arm, bArmature), \
 
98
        CHECK_TYPE_INLINE(ebone, EditBone), \
 
99
        (((arm)->layer & (ebone)->layer) && !((ebone)->flag & BONE_HIDDEN_A)) \
 
100
        )
 
101
 
 
102
#define EBONE_SELECTABLE(arm, ebone) (EBONE_VISIBLE(arm, ebone) && !(ebone->flag & BONE_UNSELECTABLE))
 
103
 
 
104
#define EBONE_EDITABLE(ebone) ( \
 
105
        CHECK_TYPE_INLINE(ebone, EditBone), \
 
106
        (((ebone)->flag & BONE_SELECTED) && !((ebone)->flag & BONE_EDITMODE_LOCKED)) \
 
107
        )
99
108
 
100
109
/* used in bone_select_hierachy() */
101
 
#define BONE_SELECT_PARENT      0
102
 
#define BONE_SELECT_CHILD       1
 
110
#define BONE_SELECT_PARENT  0
 
111
#define BONE_SELECT_CHILD   1
103
112
 
104
113
/* armature_ops.c */
105
114
void ED_operatortypes_armature(void);
114
123
void ED_armature_deselect_all_visible(struct Object *obedit);
115
124
 
116
125
int ED_do_pose_selectbuffer(struct Scene *scene, struct Base *base, unsigned int *buffer, 
117
 
                                                        short hits, short extend);
118
 
int mouse_armature(struct bContext *C, const int mval[2], int extend);
 
126
                            short hits, short extend, short deselect, short toggle);
 
127
int mouse_armature(struct bContext *C, const int mval[2], int extend, int deselect, int toggle);
119
128
int join_armature_exec(struct bContext *C, struct wmOperator *op);
120
 
struct Bone *get_indexed_bone (struct Object *ob, int index);
 
129
struct Bone *get_indexed_bone(struct Object *ob, int index);
121
130
float ED_rollBoneToVector(EditBone *bone, const float new_up_axis[3], const short axis_only);
122
131
EditBone *ED_armature_bone_get_mirrored(struct ListBase *edbo, EditBone *ebo); // XXX this is needed for populating the context iterators
123
132
void ED_armature_sync_selection(struct ListBase *edbo);
128
137
void ED_armature_edit_bone_remove(struct bArmature *arm, EditBone *exBone);
129
138
 
130
139
void transform_armature_mirror_update(struct Object *obedit);
131
 
void docenter_armature (struct Scene *scene, struct Object *ob, float cursor[3], int centermode, int around);
 
140
void docenter_armature(struct Scene *scene, struct Object *ob, float cursor[3], int centermode, int around);
132
141
 
133
142
void ED_armature_apply_transform(struct Object *ob, float mat[4][4]);
134
143
 
135
 
#define ARM_GROUPS_NAME         1
136
 
#define ARM_GROUPS_ENVELOPE     2
137
 
#define ARM_GROUPS_AUTO         3
 
144
#define ARM_GROUPS_NAME     1
 
145
#define ARM_GROUPS_ENVELOPE 2
 
146
#define ARM_GROUPS_AUTO     3
138
147
 
139
148
void create_vgroups_from_armature(struct ReportList *reports, struct Scene *scene, struct Object *ob, struct Object *par, int mode, int mirror);
140
149
 
149
158
int ED_pose_channel_in_IK_chain(struct Object *ob, struct bPoseChannel *pchan);
150
159
void ED_pose_deselectall(struct Object *ob, int test);
151
160
void ED_pose_recalculate_paths(struct Scene *scene, struct Object *ob);
 
161
struct Object *ED_pose_object_from_context(struct bContext *C);
152
162
 
153
163
/* sketch */
154
164
 
166
176
void  BIF_freeTemplates(struct bContext *C);
167
177
void  BIF_setTemplate(struct bContext *C, int index);
168
178
int   BIF_nbJointsTemplate(const struct bContext *C);
169
 
const char * BIF_nameBoneTemplate(const struct bContext *C);
 
179
const char *BIF_nameBoneTemplate(const struct bContext *C);
170
180
 
171
181
void BDR_drawSketch(const struct bContext *vc);
172
182
int BDR_drawSketchNames(struct ViewContext *vc);
173
183
 
174
184
/* meshlaplacian.c */
175
185
void mesh_deform_bind(struct Scene *scene,
176
 
        struct MeshDeformModifierData *mmd,
177
 
        float *vertexcos, int totvert, float cagemat[][4]);
 
186
                      struct MeshDeformModifierData *mmd,
 
187
                      float *vertexcos, int totvert, float cagemat[4][4]);
178
188
        
179
189
#ifdef __cplusplus
180
190
}
181
191
#endif
182
192
 
183
193
#endif /* __ED_ARMATURE_H__ */
184
 
 
185
 
 
186