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:
authorTamito Kajiyama <rd6t-kjym@asahi-net.or.jp>2012-11-26 06:32:34 +0400
committerTamito Kajiyama <rd6t-kjym@asahi-net.or.jp>2012-11-26 06:32:34 +0400
commit53840c7db5114da8b35fb12c1cfa49427802b0d7 (patch)
treee1676e61881c903baff02bd69290ef0393a13465 /source/blender/editors/animation
parentb7cd9ec3ada529bf1d57cf08cc96851ceb67a47d (diff)
parent97b8a1f752fbe729c20c8398dfa9fdbc2e2e4ff3 (diff)
Merged changes in the trunk up to revision 52546.
Conflicts resolved: release/datafiles/startup.blend release/scripts/startup/bl_ui/space_view3d.py source/blender/blenkernel/intern/idcode.c
Diffstat (limited to 'source/blender/editors/animation')
-rw-r--r--source/blender/editors/animation/anim_channels_edit.c20
-rw-r--r--source/blender/editors/animation/anim_markers.c36
2 files changed, 39 insertions, 17 deletions
diff --git a/source/blender/editors/animation/anim_channels_edit.c b/source/blender/editors/animation/anim_channels_edit.c
index f6459bfc542..bb324337ffb 100644
--- a/source/blender/editors/animation/anim_channels_edit.c
+++ b/source/blender/editors/animation/anim_channels_edit.c
@@ -1564,6 +1564,8 @@ static int animchannels_setflag_exec(bContext *C, wmOperator *op)
/* duplicate of 'ANIM_OT_channels_setting_toggle' for menu title only, weak! */
static void ANIM_OT_channels_setting_enable(wmOperatorType *ot)
{
+ PropertyRNA *prop;
+
/* identifiers */
ot->name = "Enable Channel Setting";
ot->idname = "ANIM_OT_channels_setting_enable";
@@ -1579,13 +1581,16 @@ static void ANIM_OT_channels_setting_enable(wmOperatorType *ot)
/* props */
/* flag-setting mode */
- RNA_def_enum(ot->srna, "mode", prop_animchannel_setflag_types, ACHANNEL_SETFLAG_ADD, "Mode", "");
+ prop = RNA_def_enum(ot->srna, "mode", prop_animchannel_setflag_types, ACHANNEL_SETFLAG_ADD, "Mode", "");
+ RNA_def_property_flag(prop, PROP_HIDDEN);
/* setting to set */
ot->prop = RNA_def_enum(ot->srna, "type", prop_animchannel_settings_types, 0, "Type", "");
}
/* duplicate of 'ANIM_OT_channels_setting_toggle' for menu title only, weak! */
static void ANIM_OT_channels_setting_disable(wmOperatorType *ot)
{
+ PropertyRNA *prop;
+
/* identifiers */
ot->name = "Disable Channel Setting";
ot->idname = "ANIM_OT_channels_setting_disable";
@@ -1601,13 +1606,16 @@ static void ANIM_OT_channels_setting_disable(wmOperatorType *ot)
/* props */
/* flag-setting mode */
- RNA_def_enum(ot->srna, "mode", prop_animchannel_setflag_types, ACHANNEL_SETFLAG_CLEAR, "Mode", "");
+ prop = RNA_def_enum(ot->srna, "mode", prop_animchannel_setflag_types, ACHANNEL_SETFLAG_CLEAR, "Mode", "");
+ RNA_def_property_flag(prop, PROP_HIDDEN); /* internal hack - don't expose */
/* setting to set */
ot->prop = RNA_def_enum(ot->srna, "type", prop_animchannel_settings_types, 0, "Type", "");
}
static void ANIM_OT_channels_setting_toggle(wmOperatorType *ot)
{
+ PropertyRNA *prop;
+
/* identifiers */
ot->name = "Toggle Channel Setting";
ot->idname = "ANIM_OT_channels_setting_toggle";
@@ -1623,13 +1631,16 @@ static void ANIM_OT_channels_setting_toggle(wmOperatorType *ot)
/* props */
/* flag-setting mode */
- RNA_def_enum(ot->srna, "mode", prop_animchannel_setflag_types, ACHANNEL_SETFLAG_TOGGLE, "Mode", "");
+ prop = RNA_def_enum(ot->srna, "mode", prop_animchannel_setflag_types, ACHANNEL_SETFLAG_TOGGLE, "Mode", "");
+ RNA_def_property_flag(prop, PROP_HIDDEN); /* internal hack - don't expose */
/* setting to set */
ot->prop = RNA_def_enum(ot->srna, "type", prop_animchannel_settings_types, 0, "Type", "");
}
static void ANIM_OT_channels_editable_toggle(wmOperatorType *ot)
{
+ PropertyRNA *prop;
+
/* identifiers */
ot->name = "Toggle Channel Editability";
ot->idname = "ANIM_OT_channels_editable_toggle";
@@ -1646,7 +1657,8 @@ static void ANIM_OT_channels_editable_toggle(wmOperatorType *ot)
/* flag-setting mode */
RNA_def_enum(ot->srna, "mode", prop_animchannel_setflag_types, ACHANNEL_SETFLAG_TOGGLE, "Mode", "");
/* setting to set */
- RNA_def_enum(ot->srna, "type", prop_animchannel_settings_types, ACHANNEL_SETTING_PROTECT, "Type", "");
+ prop = RNA_def_enum(ot->srna, "type", prop_animchannel_settings_types, ACHANNEL_SETTING_PROTECT, "Type", "");
+ RNA_def_property_flag(prop, PROP_HIDDEN); /* internal hack - don't expose */
}
/* ********************** Expand Channels Operator *********************** */
diff --git a/source/blender/editors/animation/anim_markers.c b/source/blender/editors/animation/anim_markers.c
index 852f3fa5469..4ac7b61fccb 100644
--- a/source/blender/editors/animation/anim_markers.c
+++ b/source/blender/editors/animation/anim_markers.c
@@ -706,8 +706,13 @@ static int ed_marker_move_invoke_wrapper(bContext *C, wmOperator *op, wmEvent *e
}
/* note, init has to be called succesfully */
-static void ed_marker_move_apply(wmOperator *op)
+static void ed_marker_move_apply(bContext *C, wmOperator *op)
{
+#ifdef DURIAN_CAMERA_SWITCH
+ bScreen *sc = CTX_wm_screen(C);
+ Scene *scene = CTX_data_scene(C);
+ Object *camera = scene->camera;
+#endif
MarkerMove *mm = op->customdata;
TimeMarker *marker;
int a, offs;
@@ -719,17 +724,27 @@ static void ed_marker_move_apply(wmOperator *op)
a++;
}
}
+
+ WM_event_add_notifier(C, NC_SCENE | ND_MARKERS, NULL);
+ WM_event_add_notifier(C, NC_ANIMATION | ND_MARKERS, NULL);
+
+#ifdef DURIAN_CAMERA_SWITCH
+ /* so we get view3d redraws */
+ BKE_scene_camera_switch_update(scene);
+
+ if(camera != scene->camera) {
+ BKE_screen_view3d_scene_sync(sc);
+ WM_event_add_notifier(C, NC_SCENE | NA_EDITED, scene);
+ }
+#endif
}
/* only for modal */
static int ed_marker_move_cancel(bContext *C, wmOperator *op)
{
RNA_int_set(op->ptr, "frames", 0);
- ed_marker_move_apply(op);
+ ed_marker_move_apply(C, op);
ed_marker_move_exit(C, op);
-
- WM_event_add_notifier(C, NC_SCENE | ND_MARKERS, NULL);
- WM_event_add_notifier(C, NC_ANIMATION | ND_MARKERS, NULL);
return OPERATOR_CANCELLED;
}
@@ -789,7 +804,7 @@ static int ed_marker_move_modal(bContext *C, wmOperator *op, wmEvent *evt)
offs = (int)fac;
RNA_int_set(op->ptr, "frames", offs);
- ed_marker_move_apply(op);
+ ed_marker_move_apply(C, op);
/* cruft below is for header print */
for (a = 0, marker = mm->markers->first; marker; marker = marker->next) {
@@ -840,8 +855,6 @@ static int ed_marker_move_modal(bContext *C, wmOperator *op, wmEvent *evt)
}
}
- WM_event_add_notifier(C, NC_SCENE | ND_MARKERS, NULL);
- WM_event_add_notifier(C, NC_ANIMATION | ND_MARKERS, NULL);
ED_area_headerprint(CTX_wm_area(C), str);
}
}
@@ -855,14 +868,11 @@ static int ed_marker_move_modal(bContext *C, wmOperator *op, wmEvent *evt)
outputNumInput(&mm->num, str_tx);
RNA_int_set(op->ptr, "frames", vec);
- ed_marker_move_apply(op);
+ ed_marker_move_apply(C, op);
// ed_marker_header_update(C, op, str, (int)vec[0]);
// strcat(str, str_tx);
BLI_snprintf(str, sizeof(str), "Marker offset %s", str_tx);
ED_area_headerprint(CTX_wm_area(C), str);
-
- WM_event_add_notifier(C, NC_SCENE | ND_MARKERS, NULL);
- WM_event_add_notifier(C, NC_ANIMATION | ND_MARKERS, NULL);
}
}
@@ -872,7 +882,7 @@ static int ed_marker_move_modal(bContext *C, wmOperator *op, wmEvent *evt)
static int ed_marker_move_exec(bContext *C, wmOperator *op)
{
if (ed_marker_move_init(C, op)) {
- ed_marker_move_apply(op);
+ ed_marker_move_apply(C, op);
ed_marker_move_exit(C, op);
return OPERATOR_FINISHED;
}