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_add.c16
-rw-r--r--source/blender/editors/armature/armature_edit.c2
-rw-r--r--source/blender/editors/armature/armature_naming.c2
-rw-r--r--source/blender/editors/armature/armature_relations.c2
-rw-r--r--source/blender/editors/armature/armature_select.c2
-rw-r--r--source/blender/editors/armature/armature_skinning.c4
-rw-r--r--source/blender/editors/armature/meshlaplacian.c2
-rw-r--r--source/blender/editors/armature/meshlaplacian.h3
-rw-r--r--source/blender/editors/armature/pose_edit.c2
-rw-r--r--source/blender/editors/armature/pose_group.c2
10 files changed, 25 insertions, 12 deletions
diff --git a/source/blender/editors/armature/armature_add.c b/source/blender/editors/armature/armature_add.c
index 4a327904ddd..e1d4b5fec73 100644
--- a/source/blender/editors/armature/armature_add.c
+++ b/source/blender/editors/armature/armature_add.c
@@ -15,11 +15,11 @@
*
* The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
* All rights reserved.
- * Operators and API's for creating bones
*/
/** \file
* \ingroup edarmature
+ * Operators and API's for creating bones.
*/
#include "DNA_anim_types.h"
@@ -859,14 +859,28 @@ static void updateDuplicateCustomBoneShapes(bContext *C, EditBone *dup_bone, Obj
Main *bmain = CTX_data_main(C);
char name_flip[MAX_ID_NAME - 2];
+ /* Invert the X location */
+ pchan->custom_translation[0] *= -1;
+ /* Invert the Y rotation */
+ pchan->custom_rotation_euler[1] *= -1;
+ /* Invert the Z rotation */
+ pchan->custom_rotation_euler[2] *= -1;
+
/* Skip the first two chars in the object name as those are used to store object type */
BLI_string_flip_side_name(name_flip, pchan->custom->id.name + 2, false, sizeof(name_flip));
Object *shape_ob = (Object *)BKE_libblock_find_name(bmain, ID_OB, name_flip);
+ /* If name_flip doesn't exist, BKE_libblock_find_name() returns pchan->custom (best match) */
+ shape_ob = shape_ob == pchan->custom ? NULL : shape_ob;
+
if (shape_ob != NULL) {
/* A flipped shape object exists, use it! */
pchan->custom = shape_ob;
}
+ else {
+ /* Flip shape */
+ pchan->custom_scale_xyz[0] *= -1;
+ }
}
}
diff --git a/source/blender/editors/armature/armature_edit.c b/source/blender/editors/armature/armature_edit.c
index b709980cabe..0094783e50f 100644
--- a/source/blender/editors/armature/armature_edit.c
+++ b/source/blender/editors/armature/armature_edit.c
@@ -15,11 +15,11 @@
*
* The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
* All rights reserved.
- * Armature EditMode tools - transforms, chain based editing, and other settings
*/
/** \file
* \ingroup edarmature
+ * Armature EditMode tools - transforms, chain based editing, and other settings.
*/
#include "DNA_armature_types.h"
diff --git a/source/blender/editors/armature/armature_naming.c b/source/blender/editors/armature/armature_naming.c
index 750c64d74a7..c45c6297d86 100644
--- a/source/blender/editors/armature/armature_naming.c
+++ b/source/blender/editors/armature/armature_naming.c
@@ -15,11 +15,11 @@
*
* The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
* All rights reserved.
- * Operators and API's for renaming bones both in and out of Edit Mode
*/
/** \file
* \ingroup edarmature
+ * Operators and API's for renaming bones both in and out of Edit Mode.
*
* This file contains functions/API's for renaming bones and/or working with them.
*/
diff --git a/source/blender/editors/armature/armature_relations.c b/source/blender/editors/armature/armature_relations.c
index eebe8a447f7..17d25aec198 100644
--- a/source/blender/editors/armature/armature_relations.c
+++ b/source/blender/editors/armature/armature_relations.c
@@ -15,11 +15,11 @@
*
* The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
* All rights reserved.
- * Operators for relations between bones and for transferring bones between armature objects
*/
/** \file
* \ingroup edarmature
+ * Operators for relations between bones and for transferring bones between armature objects.
*/
#include "MEM_guardedalloc.h"
diff --git a/source/blender/editors/armature/armature_select.c b/source/blender/editors/armature/armature_select.c
index f9b52eb53ed..111989f1d86 100644
--- a/source/blender/editors/armature/armature_select.c
+++ b/source/blender/editors/armature/armature_select.c
@@ -15,11 +15,11 @@
*
* The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
* All rights reserved.
- * API's and Operators for selecting armature bones in EditMode
*/
/** \file
* \ingroup edarmature
+ * API's and Operators for selecting armature bones in EditMode.
*/
#include "MEM_guardedalloc.h"
diff --git a/source/blender/editors/armature/armature_skinning.c b/source/blender/editors/armature/armature_skinning.c
index ec5c665402b..9ef198f442c 100644
--- a/source/blender/editors/armature/armature_skinning.c
+++ b/source/blender/editors/armature/armature_skinning.c
@@ -15,12 +15,12 @@
*
* The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
* All rights reserved.
- * API's for creating vertex groups from bones
- * - Interfaces with heat weighting in meshlaplacian
*/
/** \file
* \ingroup edarmature
+ * API's for creating vertex groups from bones
+ * - Interfaces with heat weighting in meshlaplacian.
*/
#include "DNA_armature_types.h"
diff --git a/source/blender/editors/armature/meshlaplacian.c b/source/blender/editors/armature/meshlaplacian.c
index 14f47a84286..b3b6c37cf61 100644
--- a/source/blender/editors/armature/meshlaplacian.c
+++ b/source/blender/editors/armature/meshlaplacian.c
@@ -12,11 +12,11 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- * meshlaplacian.c: Algorithms using the mesh laplacian.
*/
/** \file
* \ingroup edarmature
+ * Algorithms using the mesh laplacian.
*/
#include "MEM_guardedalloc.h"
diff --git a/source/blender/editors/armature/meshlaplacian.h b/source/blender/editors/armature/meshlaplacian.h
index 7e7b64c7510..f024b17f1cc 100644
--- a/source/blender/editors/armature/meshlaplacian.h
+++ b/source/blender/editors/armature/meshlaplacian.h
@@ -12,12 +12,11 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * BIF_meshlaplacian.h: Algorithms using the mesh laplacian.
*/
/** \file
* \ingroup edarmature
+ * BIF_meshlaplacian.h: Algorithms using the mesh laplacian.
*/
#pragma once
diff --git a/source/blender/editors/armature/pose_edit.c b/source/blender/editors/armature/pose_edit.c
index cc99027c470..5db4a4b6eaa 100644
--- a/source/blender/editors/armature/pose_edit.c
+++ b/source/blender/editors/armature/pose_edit.c
@@ -15,11 +15,11 @@
*
* The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
* All rights reserved.
- * Pose Mode API's and Operators for Pose Mode armatures
*/
/** \file
* \ingroup edarmature
+ * Pose Mode API's and Operators for Pose Mode armatures.
*/
#include "MEM_guardedalloc.h"
diff --git a/source/blender/editors/armature/pose_group.c b/source/blender/editors/armature/pose_group.c
index 466c423c27c..10ffa3fcae2 100644
--- a/source/blender/editors/armature/pose_group.c
+++ b/source/blender/editors/armature/pose_group.c
@@ -15,11 +15,11 @@
*
* The Original Code is Copyright (C) 2008 Blender Foundation
* All rights reserved.
- * Implementation of Bone Groups operators and editing API's
*/
/** \file
* \ingroup edarmature
+ * Implementation of Bone Groups operators and editing API's.
*/
#include <string.h>