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:
authorJulian Eisel <eiseljulian@gmail.com>2016-09-23 02:40:19 +0300
committerJulian Eisel <eiseljulian@gmail.com>2016-09-23 02:40:19 +0300
commit1dfb89d229304c302b8849756aa0ddd7e8d96488 (patch)
treedb7a2ed403101788b2cb308538d73a99c95621d6 /source/blender/editors/animation
parent4a1feaa5558ed60388fd3be41db74fbc54f2ab08 (diff)
parent1b2b7cfa2007172e07d78324bb941d0160b59c42 (diff)
Merge branch 'master' into blender2.8
Conflicts: intern/ghost/intern/GHOST_ContextCGL.mm intern/ghost/intern/GHOST_WindowCocoa.mm source/blender/makesrna/intern/rna_main.c
Diffstat (limited to 'source/blender/editors/animation')
-rw-r--r--source/blender/editors/animation/anim_channels_defines.c2
-rw-r--r--source/blender/editors/animation/anim_channels_edit.c2
-rw-r--r--source/blender/editors/animation/anim_draw.c11
-rw-r--r--source/blender/editors/animation/keyframing.c16
-rw-r--r--source/blender/editors/animation/keyingsets.c18
5 files changed, 32 insertions, 17 deletions
diff --git a/source/blender/editors/animation/anim_channels_defines.c b/source/blender/editors/animation/anim_channels_defines.c
index 40dfa01ced8..4ad593b7059 100644
--- a/source/blender/editors/animation/anim_channels_defines.c
+++ b/source/blender/editors/animation/anim_channels_defines.c
@@ -4076,7 +4076,7 @@ static void draw_setting_widget(bAnimContext *ac, bAnimListElem *ale, const bAni
case ACHANNEL_SETTING_SOLO: /* NLA Tracks only */
//icon = ((enabled) ? ICON_SOLO_OFF : ICON_SOLO_ON);
icon = ICON_SOLO_OFF;
- tooltip = TIP_("NLA Track is the only one evaluated in this Animation Data block, with all others muted");
+ tooltip = TIP_("NLA Track is the only one evaluated in this animation data-block, with all others muted");
break;
/* --- */
diff --git a/source/blender/editors/animation/anim_channels_edit.c b/source/blender/editors/animation/anim_channels_edit.c
index 0a6ecd7f026..96dd80777f2 100644
--- a/source/blender/editors/animation/anim_channels_edit.c
+++ b/source/blender/editors/animation/anim_channels_edit.c
@@ -2141,7 +2141,7 @@ static void ANIM_OT_channels_clean_empty(wmOperatorType *ot)
/* identifiers */
ot->name = "Remove Empty Animation Data";
ot->idname = "ANIM_OT_channels_clean_empty";
- ot->description = "Delete all empty animation data containers from visible datablocks";
+ ot->description = "Delete all empty animation data containers from visible data-blocks";
/* api callbacks */
ot->exec = animchannels_clean_empty_exec;
diff --git a/source/blender/editors/animation/anim_draw.c b/source/blender/editors/animation/anim_draw.c
index dbc9c8b4f23..f8b98ebb8b7 100644
--- a/source/blender/editors/animation/anim_draw.c
+++ b/source/blender/editors/animation/anim_draw.c
@@ -343,12 +343,13 @@ static float normalization_factor_get(Scene *scene, FCurve *fcu, short flag, flo
}
}
- range = max_coord - min_coord;
-
- if (range > FLT_EPSILON) {
- factor = 2.0f / range;
+ if (max_coord > min_coord) {
+ range = max_coord - min_coord;
+ if (range > FLT_EPSILON) {
+ factor = 2.0f / range;
+ }
+ offset = -min_coord - range / 2.0f;
}
- offset = -min_coord - range / 2.0f;
}
BLI_assert(factor != 0.0f);
if (r_offset) {
diff --git a/source/blender/editors/animation/keyframing.c b/source/blender/editors/animation/keyframing.c
index 98be77b491f..f2a35bb1553 100644
--- a/source/blender/editors/animation/keyframing.c
+++ b/source/blender/editors/animation/keyframing.c
@@ -1771,8 +1771,10 @@ static int insert_key_button_exec(bContext *C, wmOperator *op)
flag = ANIM_get_keyframing_flags(scene, 1);
/* try to insert keyframe using property retrieved from UI */
- but = UI_context_active_but_get(C);
- UI_context_active_but_prop_get(C, &ptr, &prop, &index);
+ if (!(but = UI_context_active_but_prop_get(C, &ptr, &prop, &index))) {
+ /* pass event on if no active button found */
+ return (OPERATOR_CANCELLED | OPERATOR_PASS_THROUGH);
+ }
if ((ptr.id.data && ptr.data && prop) && RNA_property_animateable(&ptr, prop)) {
if (ptr.type == &RNA_NlaStrip) {
@@ -1873,7 +1875,10 @@ static int delete_key_button_exec(bContext *C, wmOperator *op)
const bool all = RNA_boolean_get(op->ptr, "all");
/* try to insert keyframe using property retrieved from UI */
- UI_context_active_but_prop_get(C, &ptr, &prop, &index);
+ if (!UI_context_active_but_prop_get(C, &ptr, &prop, &index)) {
+ /* pass event on if no active button found */
+ return (OPERATOR_CANCELLED | OPERATOR_PASS_THROUGH);
+ }
if (ptr.id.data && ptr.data && prop) {
if (ptr.type == &RNA_NlaStrip) {
@@ -1973,7 +1978,10 @@ static int clear_key_button_exec(bContext *C, wmOperator *op)
const bool all = RNA_boolean_get(op->ptr, "all");
/* try to insert keyframe using property retrieved from UI */
- UI_context_active_but_prop_get(C, &ptr, &prop, &index);
+ if (!UI_context_active_but_prop_get(C, &ptr, &prop, &index)) {
+ /* pass event on if no active button found */
+ return (OPERATOR_CANCELLED | OPERATOR_PASS_THROUGH);
+ }
if (ptr.id.data && ptr.data && prop) {
path = RNA_path_from_ID_to_property(&ptr, prop);
diff --git a/source/blender/editors/animation/keyingsets.c b/source/blender/editors/animation/keyingsets.c
index b907ad150aa..4408ec26b3f 100644
--- a/source/blender/editors/animation/keyingsets.c
+++ b/source/blender/editors/animation/keyingsets.c
@@ -296,6 +296,12 @@ static int add_keyingset_button_exec(bContext *C, wmOperator *op)
int index = 0, pflag = 0;
const bool all = RNA_boolean_get(op->ptr, "all");
+ /* try to add to keyingset using property retrieved from UI */
+ if (!UI_context_active_but_prop_get(C, &ptr, &prop, &index)) {
+ /* pass event on if no active button found */
+ return (OPERATOR_CANCELLED | OPERATOR_PASS_THROUGH);
+ }
+
/* verify the Keying Set to use:
* - use the active one for now (more control over this can be added later)
* - add a new one if it doesn't exist
@@ -326,9 +332,6 @@ static int add_keyingset_button_exec(bContext *C, wmOperator *op)
ks = BLI_findlink(&scene->keyingsets, scene->active_keyingset - 1);
}
- /* try to add to keyingset using property retrieved from UI */
- UI_context_active_but_prop_get(C, &ptr, &prop, &index);
-
/* check if property is able to be added */
if (ptr.id.data && ptr.data && prop && RNA_property_animateable(&ptr, prop)) {
path = RNA_path_from_ID_to_property(&ptr, prop);
@@ -396,6 +399,12 @@ static int remove_keyingset_button_exec(bContext *C, wmOperator *op)
short success = 0;
int index = 0;
+ /* try to add to keyingset using property retrieved from UI */
+ if (UI_context_active_but_prop_get(C, &ptr, &prop, &index)) {
+ /* pass event on if no active button found */
+ return (OPERATOR_CANCELLED | OPERATOR_PASS_THROUGH);
+ }
+
/* verify the Keying Set to use:
* - use the active one for now (more control over this can be added later)
* - return error if it doesn't exist
@@ -412,9 +421,6 @@ static int remove_keyingset_button_exec(bContext *C, wmOperator *op)
ks = BLI_findlink(&scene->keyingsets, scene->active_keyingset - 1);
}
- /* try to add to keyingset using property retrieved from UI */
- UI_context_active_but_prop_get(C, &ptr, &prop, &index);
-
if (ptr.id.data && ptr.data && prop) {
path = RNA_path_from_ID_to_property(&ptr, prop);