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:
Diffstat (limited to 'source/blender/editors/armature')
-rw-r--r--source/blender/editors/armature/armature_intern.h6
-rw-r--r--source/blender/editors/armature/editarmature.c6
-rw-r--r--source/blender/editors/armature/editarmature_retarget.c54
-rw-r--r--source/blender/editors/armature/editarmature_sketch.c38
-rw-r--r--source/blender/editors/armature/meshlaplacian.c4
-rw-r--r--source/blender/editors/armature/poseUtils.c2
6 files changed, 55 insertions, 55 deletions
diff --git a/source/blender/editors/armature/armature_intern.h b/source/blender/editors/armature/armature_intern.h
index 47123b7fb4d..87254c20c0f 100644
--- a/source/blender/editors/armature/armature_intern.h
+++ b/source/blender/editors/armature/armature_intern.h
@@ -173,7 +173,7 @@ void poseAnim_mapping_refresh(struct bContext *C, struct Scene *scene, struct Ob
void poseAnim_mapping_reset(ListBase *pfLinks);
void poseAnim_mapping_autoKeyframe(struct bContext *C, struct Scene *scene, struct Object *ob, ListBase *pfLinks, float cframe);
-LinkData *poseAnim_mapping_getNextFCurve(ListBase *fcuLinks, LinkData *prev, char *path);
+LinkData *poseAnim_mapping_getNextFCurve(ListBase *fcuLinks, LinkData *prev, const char *path);
/* ******************************************************* */
/* PoseLib */
@@ -209,13 +209,13 @@ void BIF_sk_selectStroke(struct bContext *C, const int mval[2], short extend);
/* duplicate method */
void preEditBoneDuplicate(struct ListBase *editbones);
-struct EditBone *duplicateEditBone(struct EditBone *curBone, char *name, struct ListBase *editbones, struct Object *ob);
+struct EditBone *duplicateEditBone(struct EditBone *curBone, const char *name, struct ListBase *editbones, struct Object *ob);
void updateDuplicateSubtarget(struct EditBone *dupBone, struct ListBase *editbones, struct Object *ob);
/* duplicate method (cross objects */
/* editbones is the target list */
-struct EditBone *duplicateEditBoneObjects(struct EditBone *curBone, char *name, struct ListBase *editbones, struct Object *src_ob, struct Object *dst_ob);
+struct EditBone *duplicateEditBoneObjects(struct EditBone *curBone, const char *name, struct ListBase *editbones, struct Object *src_ob, struct Object *dst_ob);
/* editbones is the source list */
void updateDuplicateSubtargetObjects(struct EditBone *dupBone, struct ListBase *editbones, struct Object *src_ob, struct Object *dst_ob);
diff --git a/source/blender/editors/armature/editarmature.c b/source/blender/editors/armature/editarmature.c
index 15c8868f9b9..7376b2e804c 100644
--- a/source/blender/editors/armature/editarmature.c
+++ b/source/blender/editors/armature/editarmature.c
@@ -2523,7 +2523,7 @@ void updateDuplicateSubtarget(EditBone *dupBone, ListBase *editbones, Object *ob
}
-EditBone *duplicateEditBoneObjects(EditBone *curBone, char *name, ListBase *editbones, Object *src_ob, Object *dst_ob)
+EditBone *duplicateEditBoneObjects(EditBone *curBone, const char *name, ListBase *editbones, Object *src_ob, Object *dst_ob)
{
EditBone *eBone = MEM_mallocN(sizeof(EditBone), "addup_editbone");
@@ -2567,7 +2567,7 @@ EditBone *duplicateEditBoneObjects(EditBone *curBone, char *name, ListBase *edit
return eBone;
}
-EditBone *duplicateEditBone(EditBone *curBone, char *name, ListBase *editbones, Object *ob)
+EditBone *duplicateEditBone(EditBone *curBone, const char *name, ListBase *editbones, Object *ob)
{
return duplicateEditBoneObjects(curBone, name, editbones, ob, ob);
}
@@ -5319,7 +5319,7 @@ static void constraint_bone_name_fix(Object *ob, ListBase *conlist, char *oldnam
/* called by UI for renaming a bone */
/* warning: make sure the original bone was not renamed yet! */
/* seems messy, but thats what you get with not using pointers but channel names :) */
-void ED_armature_bone_rename(bArmature *arm, char *oldnamep, char *newnamep)
+void ED_armature_bone_rename(bArmature *arm, const char *oldnamep, const char *newnamep)
{
Object *ob;
char newname[MAXBONENAME];
diff --git a/source/blender/editors/armature/editarmature_retarget.c b/source/blender/editors/armature/editarmature_retarget.c
index 6f1da5757c6..b1651886620 100644
--- a/source/blender/editors/armature/editarmature_retarget.c
+++ b/source/blender/editors/armature/editarmature_retarget.c
@@ -157,14 +157,14 @@ static void getEditBoneRollUpAxis(EditBone *bone, float roll, float up_axis[3])
sub_v3_v3v3(nor, bone->tail, bone->head);
vec_roll_to_mat3(nor, roll, mat);
- VECCOPY(up_axis, mat[2]);
+ copy_v3_v3(up_axis, mat[2]);
}
static float rollBoneByQuatAligned(EditBone *bone, float old_up_axis[3], float qrot[4], float qroll[4], float aligned_axis[3])
{
float nor[3], new_up_axis[3], x_axis[3], z_axis[3];
- VECCOPY(new_up_axis, old_up_axis);
+ copy_v3_v3(new_up_axis, old_up_axis);
mul_qt_v3(qrot, new_up_axis);
sub_v3_v3v3(nor, bone->tail, bone->head);
@@ -236,7 +236,7 @@ static float rollBoneByQuatJoint(RigEdge *edge, RigEdge *previous, float qrot[4]
mul_qt_v3(qroll, normal);
- VECCOPY(new_up_axis, edge->up_axis);
+ copy_v3_v3(new_up_axis, edge->up_axis);
mul_qt_v3(qrot, new_up_axis);
normalize_v3(new_up_axis);
@@ -252,7 +252,7 @@ float rollBoneByQuat(EditBone *bone, float old_up_axis[3], float qrot[4])
{
float new_up_axis[3];
- VECCOPY(new_up_axis, old_up_axis);
+ copy_v3_v3(new_up_axis, old_up_axis);
mul_qt_v3(qrot, new_up_axis);
return ED_rollBoneToVector(bone, new_up_axis, FALSE);
@@ -367,7 +367,7 @@ static RigNode *newRigNodeHead(RigGraph *rg, RigArc *arc, float p[3])
node = MEM_callocN(sizeof(RigNode), "rig node");
BLI_addtail(&rg->nodes, node);
- VECCOPY(node->p, p);
+ copy_v3_v3(node->p, p);
node->degree = 1;
node->arcs = NULL;
@@ -389,7 +389,7 @@ static RigNode *newRigNode(RigGraph *rg, float p[3])
node = MEM_callocN(sizeof(RigNode), "rig node");
BLI_addtail(&rg->nodes, node);
- VECCOPY(node->p, p);
+ copy_v3_v3(node->p, p);
node->degree = 0;
node->arcs = NULL;
@@ -412,12 +412,12 @@ static void RIG_appendEdgeToArc(RigArc *arc, RigEdge *edge)
if (edge->prev == NULL)
{
- VECCOPY(edge->head, arc->head->p);
+ copy_v3_v3(edge->head, arc->head->p);
}
else
{
RigEdge *last_edge = edge->prev;
- VECCOPY(edge->head, last_edge->tail);
+ copy_v3_v3(edge->head, last_edge->tail);
RIG_calculateEdgeAngles(last_edge, edge);
}
@@ -434,7 +434,7 @@ static void RIG_addEdgeToArc(RigArc *arc, float tail[3], EditBone *bone)
edge = MEM_callocN(sizeof(RigEdge), "rig edge");
- VECCOPY(edge->tail, tail);
+ copy_v3_v3(edge->tail, tail);
edge->bone = bone;
if (bone)
@@ -489,10 +489,10 @@ static RigControl *cloneControl(RigGraph *rg, RigGraph *src_rg, RigControl *src_
ctrl = newRigControl(rg);
- VECCOPY(ctrl->head, src_ctrl->head);
- VECCOPY(ctrl->tail, src_ctrl->tail);
- VECCOPY(ctrl->up_axis, src_ctrl->up_axis);
- VECCOPY(ctrl->offset, src_ctrl->offset);
+ copy_v3_v3(ctrl->head, src_ctrl->head);
+ copy_v3_v3(ctrl->tail, src_ctrl->tail);
+ copy_v3_v3(ctrl->up_axis, src_ctrl->up_axis);
+ copy_v3_v3(ctrl->offset, src_ctrl->offset);
ctrl->tail_mode = src_ctrl->tail_mode;
ctrl->flag = src_ctrl->flag;
@@ -531,9 +531,9 @@ static RigArc *cloneArc(RigGraph *rg, RigGraph *src_rg, RigArc *src_arc, GHash *
edge = MEM_callocN(sizeof(RigEdge), "rig edge");
- VECCOPY(edge->head, src_edge->head);
- VECCOPY(edge->tail, src_edge->tail);
- VECCOPY(edge->up_axis, src_edge->up_axis);
+ copy_v3_v3(edge->head, src_edge->head);
+ copy_v3_v3(edge->tail, src_edge->tail);
+ copy_v3_v3(edge->up_axis, src_edge->up_axis);
edge->length = src_edge->length;
edge->angle = src_edge->angle;
@@ -690,8 +690,8 @@ static void RIG_addControlBone(RigGraph *rg, EditBone *bone)
{
RigControl *ctrl = newRigControl(rg);
ctrl->bone = bone;
- VECCOPY(ctrl->head, bone->head);
- VECCOPY(ctrl->tail, bone->tail);
+ copy_v3_v3(ctrl->head, bone->head);
+ copy_v3_v3(ctrl->tail, bone->tail);
getEditBoneRollUpAxis(bone, bone->roll, ctrl->up_axis);
ctrl->tail_mode = TL_NONE;
@@ -765,7 +765,7 @@ static int RIG_parentControl(RigControl *ctrl, EditBone *link)
ctrl->link = link;
ctrl->flag = flag;
- VECCOPY(ctrl->offset, offset);
+ copy_v3_v3(ctrl->offset, offset);
return 1;
}
@@ -1146,7 +1146,7 @@ static void RIG_removeUneededOffsets(RigGraph *rg)
BLI_remlink(&arc->edges, first_edge);
MEM_freeN(first_edge);
- VECCOPY(arc->head->p, next_edge->head);
+ copy_v3_v3(arc->head->p, next_edge->head);
}
}
}
@@ -1222,7 +1222,7 @@ static void RIG_removeUneededOffsets(RigGraph *rg)
BLI_remlink(&arc->edges, first_edge);
MEM_freeN(first_edge);
- VECCOPY(arc->head->p, next_edge->head);
+ copy_v3_v3(arc->head->p, next_edge->head);
/* remove null edge in other arcs too */
for (other_arc = rg->arcs.first; other_arc; other_arc = other_arc->next)
@@ -1284,7 +1284,7 @@ static void RIG_removeUneededOffsets(RigGraph *rg)
BLI_remlink(&arc->edges, last_edge);
MEM_freeN(last_edge);
- VECCOPY(arc->tail->p, previous_edge->tail);
+ copy_v3_v3(arc->tail->p, previous_edge->tail);
previous_edge->angle = 0;
}
}
@@ -1755,7 +1755,7 @@ static void finalizeControl(RigGraph *rigg, RigControl *ctrl, float resize)
sub_v3_v3v3(v1, ctrl->bone->tail, ctrl->bone->head);
sub_v3_v3v3(v2, tail_vec, ctrl->bone->head);
- VECCOPY(ctrl->bone->tail, tail_vec);
+ copy_v3_v3(ctrl->bone->tail, tail_vec);
rotation_between_vecs_to_quat(qtail, v1, v2);
mul_qt_qtqt(ctrl->qrot, qtail, ctrl->qrot);
@@ -1791,7 +1791,7 @@ static void repositionControl(RigGraph *rigg, RigControl *ctrl, float head[3], f
{
float parent_offset[3], tail_offset[3];
- VECCOPY(parent_offset, ctrl->offset);
+ copy_v3_v3(parent_offset, ctrl->offset);
mul_v3_fl(parent_offset, resize);
mul_qt_v3(qrot, parent_offset);
@@ -1799,7 +1799,7 @@ static void repositionControl(RigGraph *rigg, RigControl *ctrl, float head[3], f
ctrl->flag |= RIG_CTRL_HEAD_DONE;
- QUATCOPY(ctrl->qrot, qrot);
+ copy_qt_qt(ctrl->qrot, qrot);
if (ctrl->tail_mode == TL_NONE)
{
@@ -1836,8 +1836,8 @@ static void repositionBone(bContext *C, RigGraph *rigg, RigEdge *edge, float vec
rotation_between_vecs_to_quat(qrot, v1, v2);
- VECCOPY(bone->head, vec0);
- VECCOPY(bone->tail, vec1);
+ copy_v3_v3(bone->head, vec0);
+ copy_v3_v3(bone->tail, vec1);
if (!is_zero_v3(up_axis))
{
diff --git a/source/blender/editors/armature/editarmature_sketch.c b/source/blender/editors/armature/editarmature_sketch.c
index 31be1efdc1f..b97e843529a 100644
--- a/source/blender/editors/armature/editarmature_sketch.c
+++ b/source/blender/editors/armature/editarmature_sketch.c
@@ -187,7 +187,7 @@ void BIF_makeListTemplates(const bContext *C)
}
}
-char *BIF_listTemplates(const bContext *UNUSED(C))
+const char *BIF_listTemplates(const bContext *UNUSED(C))
{
GHashIterator ghi;
char menu_header[] = "Template%t|None%x0|";
@@ -624,7 +624,7 @@ static void drawSubdividedStrokeBy(ToolSettings *toolsettings, BArcIterator *ite
gluQuadricNormals(quad, GLU_SMOOTH);
iter->head(iter);
- VECCOPY(head, iter->p);
+ copy_v3_v3(head, iter->p);
index = next_subdividion(toolsettings, iter, bone_start, end, head, tail);
while (index != -1)
@@ -640,7 +640,7 @@ static void drawSubdividedStrokeBy(ToolSettings *toolsettings, BArcIterator *ite
glPopMatrix();
- VECCOPY(head, tail);
+ copy_v3_v3(head, tail);
bone_start = index; // start next bone from current index
index = next_subdividion(toolsettings, iter, bone_start, end, head, tail);
@@ -748,7 +748,7 @@ static SK_Point *sk_snapPointArmature(bContext *C, Object *ob, ListBase *ebones,
if ((bone->flag & BONE_CONNECTED) == 0)
{
- VECCOPY(vec, bone->head);
+ copy_v3_v3(vec, bone->head);
mul_m4_v3(ob->obmat, vec);
project_short_noclip(ar, vec, pval);
@@ -758,13 +758,13 @@ static SK_Point *sk_snapPointArmature(bContext *C, Object *ob, ListBase *ebones,
{
*dist = pdist;
pt = &boneSnap;
- VECCOPY(pt->p, vec);
+ copy_v3_v3(pt->p, vec);
pt->type = PT_EXACT;
}
}
- VECCOPY(vec, bone->tail);
+ copy_v3_v3(vec, bone->tail);
mul_m4_v3(ob->obmat, vec);
project_short_noclip(ar, vec, pval);
@@ -774,7 +774,7 @@ static SK_Point *sk_snapPointArmature(bContext *C, Object *ob, ListBase *ebones,
{
*dist = pdist;
pt = &boneSnap;
- VECCOPY(pt->p, vec);
+ copy_v3_v3(pt->p, vec);
pt->type = PT_EXACT;
}
}
@@ -1024,7 +1024,7 @@ static void sk_projectDrawPoint(bContext *C, float vec[3], SK_Stroke *stk, SK_Dr
if (last != NULL)
{
- VECCOPY(fp, last->p);
+ copy_v3_v3(fp, last->p);
}
initgrabz(ar->regiondata, fp[0], fp[1], fp[2]);
@@ -1134,12 +1134,12 @@ static int sk_getStrokeSnapPoint(bContext *C, SK_Point *pt, SK_Sketch *sketch, S
}
else
{
- VECCOPY(vec, p1->p);
+ copy_v3_v3(vec, p1->p);
}
if (last_p == NULL)
{
- VECCOPY(p, vec);
+ copy_v3_v3(p, vec);
size = new_size;
dist = 0;
break;
@@ -1149,7 +1149,7 @@ static int sk_getStrokeSnapPoint(bContext *C, SK_Point *pt, SK_Sketch *sketch, S
if (new_dist < dist)
{
- VECCOPY(p, vec);
+ copy_v3_v3(p, vec);
dist = new_dist;
size = new_size;
}
@@ -1161,7 +1161,7 @@ static int sk_getStrokeSnapPoint(bContext *C, SK_Point *pt, SK_Sketch *sketch, S
pt->type = dd->type;
pt->mode = PT_SNAP;
pt->size = size / 2;
- VECCOPY(pt->p, p);
+ copy_v3_v3(pt->p, p);
point_added = 1;
}
@@ -1193,7 +1193,7 @@ static int sk_getStrokeSnapPoint(bContext *C, SK_Point *pt, SK_Sketch *sketch, S
if (spt != NULL)
{
- VECCOPY(pt->p, spt->p);
+ copy_v3_v3(pt->p, spt->p);
point_added = 1;
}
}
@@ -1207,7 +1207,7 @@ static int sk_getStrokeSnapPoint(bContext *C, SK_Point *pt, SK_Sketch *sketch, S
{
pt->type = dd->type;
pt->mode = PT_SNAP;
- VECCOPY(pt->p, vec);
+ copy_v3_v3(pt->p, vec);
point_added = 1;
}
@@ -1234,7 +1234,7 @@ static int sk_addStrokeSnapPoint(bContext *C, SK_Sketch *sketch, SK_Stroke *stk,
int total;
int i;
- VECCOPY(final_p, pt.p);
+ copy_v3_v3(final_p, pt.p);
sk_projectDrawPoint(C, pt.p, stk, dd);
sk_appendStrokePoint(stk, &pt);
@@ -1259,7 +1259,7 @@ static int sk_addStrokeSnapPoint(bContext *C, SK_Sketch *sketch, SK_Stroke *stk,
sk_interpolateDepth(C, stk, i + 1, stk->nb_points - 2, length, distance);
}
- VECCOPY(stk->points[stk->nb_points - 1].p, final_p);
+ copy_v3_v3(stk->points[stk->nb_points - 1].p, final_p);
point_added = 1;
}
@@ -1296,7 +1296,7 @@ static void sk_getStrokePoint(bContext *C, SK_Point *pt, SK_Sketch *sketch, SK_S
{
point_added = sk_getStrokeSnapPoint(C, pt, sketch, stk, dd);
LAST_SNAP_POINT_VALID = 1;
- VECCOPY(LAST_SNAP_POINT, pt->p);
+ copy_v3_v3(LAST_SNAP_POINT, pt->p);
}
else
{
@@ -1536,8 +1536,8 @@ static void sk_convertStroke(bContext *C, SK_Stroke *stk)
{
bone = ED_armature_edit_bone_add(arm, "Bone");
- VECCOPY(bone->head, head->p);
- VECCOPY(bone->tail, pt->p);
+ copy_v3_v3(bone->head, head->p);
+ copy_v3_v3(bone->tail, pt->p);
mul_m4_v3(invmat, bone->head);
mul_m4_v3(invmat, bone->tail);
diff --git a/source/blender/editors/armature/meshlaplacian.c b/source/blender/editors/armature/meshlaplacian.c
index 53d0141f44d..40d2d80f2b7 100644
--- a/source/blender/editors/armature/meshlaplacian.c
+++ b/source/blender/editors/armature/meshlaplacian.c
@@ -1241,8 +1241,8 @@ static MDefBoundIsect *meshdeform_ray_tree_intersect(MeshDeformBind *mdb, float
memset(&isec, 0, sizeof(isec));
isec.labda= 1e10f;
- VECADD(isec.start, co1, epsilon);
- VECADD(end, co2, epsilon);
+ add_v3_v3v3(isec.start, co1, epsilon);
+ add_v3_v3v3(end, co2, epsilon);
sub_v3_v3v3(isec.vec, end, isec.start);
if(meshdeform_intersect(mdb, &isec)) {
diff --git a/source/blender/editors/armature/poseUtils.c b/source/blender/editors/armature/poseUtils.c
index 71cdda7fe15..1a9ff73e5dc 100644
--- a/source/blender/editors/armature/poseUtils.c
+++ b/source/blender/editors/armature/poseUtils.c
@@ -262,7 +262,7 @@ void poseAnim_mapping_autoKeyframe (bContext *C, Scene *scene, Object *ob, ListB
/* find the next F-Curve for a PoseChannel with matching path...
* - path is not just the pfl rna_path, since that path doesn't have property info yet
*/
-LinkData *poseAnim_mapping_getNextFCurve (ListBase *fcuLinks, LinkData *prev, char *path)
+LinkData *poseAnim_mapping_getNextFCurve (ListBase *fcuLinks, LinkData *prev, const char *path)
{
LinkData *first= (prev)? prev->next : (fcuLinks)? fcuLinks->first : NULL;
LinkData *ld;