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:
authorSeverin <eiseljulian@gmail.com>2018-07-02 15:50:45 +0300
committerSeverin <eiseljulian@gmail.com>2018-07-02 15:50:45 +0300
commit5a17c9bcbca737525fa535ceb45f9769a34a4df7 (patch)
treec7867d25494d053d11837d04b1ab8b86526a189d /source/blender/editors/armature
parent9887b38692e3bcf7ba613ca947fd76e299c58cbd (diff)
parent20046defd735684a42750c4cb68d20d78ad5180c (diff)
Merge branch 'blender2.8' into temp-tab_drag_droptemp-tab_drag_drop
Diffstat (limited to 'source/blender/editors/armature')
-rw-r--r--source/blender/editors/armature/armature_ops.c8
-rw-r--r--source/blender/editors/armature/armature_select.c2
-rw-r--r--source/blender/editors/armature/pose_edit.c20
-rw-r--r--source/blender/editors/armature/pose_lib.c6
-rw-r--r--source/blender/editors/armature/pose_select.c2
5 files changed, 20 insertions, 18 deletions
diff --git a/source/blender/editors/armature/armature_ops.c b/source/blender/editors/armature/armature_ops.c
index e54769221f5..067b9fd76a8 100644
--- a/source/blender/editors/armature/armature_ops.c
+++ b/source/blender/editors/armature/armature_ops.c
@@ -249,12 +249,14 @@ void ED_keymap_armature(wmKeyConfig *keyconf)
WM_keymap_add_item(keymap, "ARMATURE_OT_shortest_path_pick", SELECTMOUSE, KM_PRESS, KM_CTRL, 0);
-#ifdef USE_WM_KEYMAP_27X
WM_keymap_add_menu(keymap, "VIEW3D_MT_edit_armature_delete", XKEY, KM_PRESS, 0, 0);
-#endif
WM_keymap_add_menu(keymap, "VIEW3D_MT_edit_armature_delete", DELKEY, KM_PRESS, 0, 0);
- WM_keymap_add_item(keymap, "ARMATURE_OT_dissolve", XKEY, KM_PRESS, KM_CTRL, 0);
+
WM_keymap_add_item(keymap, "ARMATURE_OT_duplicate_move", DKEY, KM_PRESS, KM_SHIFT, 0);
+
+ WM_keymap_add_item(keymap, "ARMATURE_OT_dissolve", XKEY, KM_PRESS, KM_CTRL, 0);
+ WM_keymap_add_item(keymap, "ARMATURE_OT_dissolve", DELKEY, KM_PRESS, KM_CTRL, 0);
+
WM_keymap_add_item(keymap, "ARMATURE_OT_extrude_move", EKEY, KM_PRESS, 0, 0);
WM_keymap_add_item(keymap, "ARMATURE_OT_extrude_forked", EKEY, KM_PRESS, KM_SHIFT, 0);
WM_keymap_add_item(keymap, "ARMATURE_OT_click_extrude", ACTIONMOUSE, KM_CLICK, KM_CTRL, 0);
diff --git a/source/blender/editors/armature/armature_select.c b/source/blender/editors/armature/armature_select.c
index e295e1fd35a..ae2e7339c66 100644
--- a/source/blender/editors/armature/armature_select.c
+++ b/source/blender/editors/armature/armature_select.c
@@ -349,7 +349,7 @@ static int armature_select_linked_invoke(bContext *C, wmOperator *op, const wmEv
return OPERATOR_FINISHED;
}
-static int armature_select_linked_poll(bContext *C)
+static bool armature_select_linked_poll(bContext *C)
{
return (ED_operator_view3d_active(C) && ED_operator_editarmature(C));
}
diff --git a/source/blender/editors/armature/pose_edit.c b/source/blender/editors/armature/pose_edit.c
index ffe64cc24b0..661492ba056 100644
--- a/source/blender/editors/armature/pose_edit.c
+++ b/source/blender/editors/armature/pose_edit.c
@@ -294,7 +294,7 @@ void POSE_OT_paths_calculate(wmOperatorType *ot)
/* --------- */
-static int pose_update_paths_poll(bContext *C)
+static bool pose_update_paths_poll(bContext *C)
{
if (ED_operator_posemode_exclusive(C)) {
Object *ob = CTX_data_active_object(C);
@@ -773,7 +773,7 @@ void POSE_OT_rotation_mode_set(wmOperatorType *ot)
/* ********************************************** */
-static int armature_layers_poll(bContext *C)
+static bool armature_layers_poll(bContext *C)
{
/* Armature layers operators can be used in posemode OR editmode for armatures */
return ED_operator_posemode(C) || ED_operator_editarmature(C);
@@ -806,7 +806,7 @@ static int pose_armature_layers_showall_exec(bContext *C, wmOperator *op)
bArmature *arm = armature_layers_get_data(&ob);
PointerRNA ptr;
int maxLayers = (RNA_boolean_get(op->ptr, "all")) ? 32 : 16;
- int layers[32] = {0}; /* hardcoded for now - we can only have 32 armature layers, so this should be fine... */
+ bool layers[32] = {false}; /* hardcoded for now - we can only have 32 armature layers, so this should be fine... */
int i;
/* sanity checking */
@@ -858,7 +858,7 @@ static int armature_layers_invoke(bContext *C, wmOperator *op, const wmEvent *ev
Object *ob = CTX_data_active_object(C);
bArmature *arm = armature_layers_get_data(&ob);
PointerRNA ptr;
- int layers[32]; /* hardcoded for now - we can only have 32 armature layers, so this should be fine... */
+ bool layers[32]; /* hardcoded for now - we can only have 32 armature layers, so this should be fine... */
/* sanity checking */
if (arm == NULL)
@@ -879,7 +879,7 @@ static int armature_layers_exec(bContext *C, wmOperator *op)
Object *ob = CTX_data_active_object(C);
bArmature *arm = armature_layers_get_data(&ob);
PointerRNA ptr;
- int layers[32]; /* hardcoded for now - we can only have 32 armature layers, so this should be fine... */
+ bool layers[32]; /* hardcoded for now - we can only have 32 armature layers, so this should be fine... */
if (arm == NULL) {
return OPERATOR_CANCELLED;
@@ -923,7 +923,7 @@ void ARMATURE_OT_armature_layers(wmOperatorType *ot)
/* Present a popup to get the layers that should be used */
static int pose_bone_layers_invoke(bContext *C, wmOperator *op, const wmEvent *event)
{
- int layers[32] = {0}; /* hardcoded for now - we can only have 32 armature layers, so this should be fine... */
+ bool layers[32] = {0}; /* hardcoded for now - we can only have 32 armature layers, so this should be fine... */
/* get layers that are active already */
CTX_DATA_BEGIN (C, bPoseChannel *, pchan, selected_pose_bones)
@@ -949,7 +949,7 @@ static int pose_bone_layers_exec(bContext *C, wmOperator *op)
{
Object *ob = BKE_object_pose_armature_get(CTX_data_active_object(C));
PointerRNA ptr;
- int layers[32]; /* hardcoded for now - we can only have 32 armature layers, so this should be fine... */
+ bool layers[32]; /* hardcoded for now - we can only have 32 armature layers, so this should be fine... */
if (ob == NULL || ob->data == NULL) {
return OPERATOR_CANCELLED;
@@ -998,7 +998,7 @@ void POSE_OT_bone_layers(wmOperatorType *ot)
/* Present a popup to get the layers that should be used */
static int armature_bone_layers_invoke(bContext *C, wmOperator *op, const wmEvent *event)
{
- int layers[32] = {0}; /* hardcoded for now - we can only have 32 armature layers, so this should be fine... */
+ bool layers[32] = {0}; /* hardcoded for now - we can only have 32 armature layers, so this should be fine... */
/* get layers that are active already */
CTX_DATA_BEGIN (C, EditBone *, ebone, selected_editable_bones)
@@ -1026,7 +1026,7 @@ static int armature_bone_layers_exec(bContext *C, wmOperator *op)
{
Object *ob = CTX_data_edit_object(C);
PointerRNA ptr;
- int layers[32]; /* hardcoded for now - we can only have 32 armature layers, so this should be fine... */
+ bool layers[32]; /* hardcoded for now - we can only have 32 armature layers, so this should be fine... */
/* get the values set in the operator properties */
RNA_boolean_get_array(op->ptr, "layers", layers);
@@ -1262,7 +1262,7 @@ static int toggle_bone_selection_exec(bContext *C, wmOperator *UNUSED(op))
return OPERATOR_FINISHED;
}
-static int pose_select_linked_poll(bContext *C)
+static bool pose_select_linked_poll(bContext *C)
{
return (ED_operator_view3d_active(C) && ED_operator_posemode(C));
}
diff --git a/source/blender/editors/armature/pose_lib.c b/source/blender/editors/armature/pose_lib.c
index 46663d7a771..2227bf33908 100644
--- a/source/blender/editors/armature/pose_lib.c
+++ b/source/blender/editors/armature/pose_lib.c
@@ -174,7 +174,7 @@ static Object *get_poselib_object(bContext *C)
}
/* Poll callback for operators that require existing PoseLib data (with poses) to work */
-static int has_poselib_pose_data_poll(bContext *C)
+static bool has_poselib_pose_data_poll(bContext *C)
{
Object *ob = get_poselib_object(C);
return (ob && ob->poselib);
@@ -183,7 +183,7 @@ static int has_poselib_pose_data_poll(bContext *C)
/* Poll callback for operators that require existing PoseLib data (with poses)
* as they need to do some editing work on those poses (i.e. not on lib-linked actions)
*/
-static int has_poselib_pose_data_for_editing_poll(bContext *C)
+static bool has_poselib_pose_data_for_editing_poll(bContext *C)
{
Object *ob = get_poselib_object(C);
return (ob && ob->poselib && !ID_IS_LINKED(ob->poselib));
@@ -379,7 +379,7 @@ void POSELIB_OT_action_sanitize(wmOperatorType *ot)
/* ------------------------------------------ */
/* Poll callback for adding poses to a PoseLib */
-static int poselib_add_poll(bContext *C)
+static bool poselib_add_poll(bContext *C)
{
/* There are 2 cases we need to be careful with:
* 1) When this operator is invoked from a hotkey, there may be no PoseLib yet
diff --git a/source/blender/editors/armature/pose_select.c b/source/blender/editors/armature/pose_select.c
index cafebb6ae95..72f0c68f660 100644
--- a/source/blender/editors/armature/pose_select.c
+++ b/source/blender/editors/armature/pose_select.c
@@ -390,7 +390,7 @@ static int pose_select_connected_invoke(bContext *C, wmOperator *op, const wmEve
return OPERATOR_FINISHED;
}
-static int pose_select_linked_poll(bContext *C)
+static bool pose_select_linked_poll(bContext *C)
{
return (ED_operator_view3d_active(C) && ED_operator_posemode(C));
}