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
path: root/source
diff options
context:
space:
mode:
Diffstat (limited to 'source')
-rw-r--r--source/blender/include/BIF_editarmature.h1
-rw-r--r--source/blender/makesdna/DNA_armature_types.h6
-rw-r--r--source/blender/src/buttons_editing.c6
-rw-r--r--source/blender/src/editarmature.c12
-rw-r--r--source/blender/src/editobject.c8
5 files changed, 27 insertions, 6 deletions
diff --git a/source/blender/include/BIF_editarmature.h b/source/blender/include/BIF_editarmature.h
index c0c8c726906..9cc281c94d8 100644
--- a/source/blender/include/BIF_editarmature.h
+++ b/source/blender/include/BIF_editarmature.h
@@ -110,6 +110,7 @@ void unique_editbone_name (char* name);
struct Bone *get_first_selected_bone (void);
void auto_align_armature(void);
void create_vgroups_from_armature(Object *ob, Object *par);
+int is_delay_deform(void);
#define BONESEL_TIP 0x08000000
#define BONESEL_ROOT 0x04000000
diff --git a/source/blender/makesdna/DNA_armature_types.h b/source/blender/makesdna/DNA_armature_types.h
index 867f62ff039..b808249ace0 100644
--- a/source/blender/makesdna/DNA_armature_types.h
+++ b/source/blender/makesdna/DNA_armature_types.h
@@ -83,7 +83,8 @@ enum {
ARM_DRAWAXESBIT,
ARM_DRAWNAMESBIT,
ARM_POSEBIT,
- ARM_EDITBIT
+ ARM_EDITBIT,
+ ARM_DELAYBIT
};
enum {
@@ -92,7 +93,8 @@ enum {
ARM_DRAWAXES = 0x00000004,
ARM_DRAWNAMES = 0x00000008,
ARM_POSEMODE = 0x00000010,
- ARM_EDITMODE = 0x00000020
+ ARM_EDITMODE = 0x00000020,
+ ARM_DELAYDEFORM = 0x00000040
};
enum {
diff --git a/source/blender/src/buttons_editing.c b/source/blender/src/buttons_editing.c
index 882df02e787..22d17f43c19 100644
--- a/source/blender/src/buttons_editing.c
+++ b/source/blender/src/buttons_editing.c
@@ -1332,9 +1332,9 @@ static void editing_panel_armature_type(Object *ob, bArmature *arm)
uiDefButI(block, TOG|BIT|ARM_DRAWAXESBIT,REDRAWVIEW3D, "Draw Axes", bx,by-46,97,20, &arm->flag, 0, 0, 0, 0, "Draw bone axes");
uiDefButI(block, TOG|BIT|ARM_DRAWNAMESBIT,REDRAWVIEW3D, "Draw Names", bx,by-69,97,20, &arm->flag, 0, 0, 0, 0, "Draw bone names");
uiDefButI(block, TOG|BIT|ARM_DRAWXRAYBIT,REDRAWVIEW3D, "X-Ray", bx,by-92,97,20, &arm->flag, 0, 0, 0, 0, "Draw armature in front of shaded objects");
-
-
-
+ uiDefButI(block, TOG|BIT|ARM_DELAYBIT,REDRAWVIEW3D,
+ "Delay Deform", bx,by-115,97,20, &arm->flag, 0, 0, 0, 0,
+ "Don't deform children when manipulating bones in pose mode");
}
static void editing_panel_armature_bones(Object *ob, bArmature *arm)
diff --git a/source/blender/src/editarmature.c b/source/blender/src/editarmature.c
index 37f5c4a56d7..6b0d0b72d55 100644
--- a/source/blender/src/editarmature.c
+++ b/source/blender/src/editarmature.c
@@ -2707,3 +2707,15 @@ void create_vgroups_from_armature(Object *ob, Object *par)
}
}
+
+int is_delay_deform(void)
+{
+ bArmature *arm;
+
+ arm=get_armature (G.obpose);
+
+ if (!arm)
+ return 0;
+
+ return (arm->flag & ARM_DELAYDEFORM);
+}
diff --git a/source/blender/src/editobject.c b/source/blender/src/editobject.c
index 4f002f94670..64359091ef5 100644
--- a/source/blender/src/editobject.c
+++ b/source/blender/src/editobject.c
@@ -3393,7 +3393,8 @@ void special_trans_update(int keyflags)
#if 1
if (G.obpose && G.obpose->type == OB_ARMATURE)
clear_pose_constraint_status(G.obpose);
- make_displists_by_armature(G.obpose);
+
+ if (!is_delay_deform()) make_displists_by_armature(G.obpose);
#endif
if(G.vd->drawtype == OB_SHADED) reshadeall_displist();
@@ -3466,6 +3467,11 @@ void special_aftertrans_update(char mode, int flip, short canceled, int keyflags
allqueue(REDRAWIPO, 0);
allqueue(REDRAWNLA, 0);
}
+ if (!canceled && is_delay_deform()){
+ clear_pose_constraint_status(G.obpose);
+ make_displists_by_armature(G.obpose);
+ }
+
}
else {
base= FIRSTBASE;