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/animation/anim_markers.c')
-rw-r--r--source/blender/editors/animation/anim_markers.c19
1 files changed, 15 insertions, 4 deletions
diff --git a/source/blender/editors/animation/anim_markers.c b/source/blender/editors/animation/anim_markers.c
index 3bfa3b9d5be..8e1f03295f4 100644
--- a/source/blender/editors/animation/anim_markers.c
+++ b/source/blender/editors/animation/anim_markers.c
@@ -36,6 +36,7 @@
#include "BKE_context.h"
#include "BKE_fcurve.h"
+#include "BKE_idprop.h"
#include "BKE_layer.h"
#include "BKE_main.h"
#include "BKE_report.h"
@@ -686,7 +687,7 @@ static int ed_marker_add_exec(bContext *C, wmOperator *UNUSED(op))
marker = MEM_callocN(sizeof(TimeMarker), "TimeMarker");
marker->flag = SELECT;
marker->frame = frame;
- BLI_snprintf(marker->name, sizeof(marker->name), "F_%02d", frame); // XXX - temp code only
+ BLI_snprintf(marker->name, sizeof(marker->name), "F_%02d", frame); /* XXX - temp code only */
BLI_addtail(markers, marker);
WM_event_add_notifier(C, NC_SCENE | ND_MARKERS, NULL);
@@ -863,7 +864,9 @@ static void ed_marker_move_exit(bContext *C, wmOperator *op)
static int ed_marker_move_invoke(bContext *C, wmOperator *op, const wmEvent *event)
{
- bool tweak = RNA_boolean_get(op->ptr, "tweak");
+ const bool tweak = RNA_struct_find_property(op->ptr, "tweak") &&
+ RNA_boolean_get(op->ptr, "tweak");
+
if (tweak) {
ARegion *region = CTX_wm_region(C);
View2D *v2d = &region->v2d;
@@ -1102,8 +1105,12 @@ static void ed_marker_duplicate_apply(bContext *C)
newmarker->camera = marker->camera;
#endif
+ if (marker->prop != NULL) {
+ newmarker->prop = IDP_CopyProperty(marker->prop);
+ }
+
/* new marker is added to the beginning of list */
- // FIXME: bad ordering!
+ /* FIXME: bad ordering! */
BLI_addhead(markers, newmarker);
}
}
@@ -1263,7 +1270,7 @@ static int ed_marker_select(
WM_event_add_notifier(C, NC_SCENE | ND_MARKERS, NULL);
WM_event_add_notifier(C, NC_ANIMATION | ND_MARKERS, NULL);
- /* allowing tweaks, but needs OPERATOR_FINISHED, otherwise renaming fails... [#25987] */
+ /* allowing tweaks, but needs OPERATOR_FINISHED, otherwise renaming fails, see T25987. */
return ret_val | OPERATOR_PASS_THROUGH;
}
@@ -1456,6 +1463,10 @@ static int ed_marker_delete_exec(bContext *C, wmOperator *UNUSED(op))
for (marker = markers->first; marker; marker = nmarker) {
nmarker = marker->next;
if (marker->flag & SELECT) {
+ if (marker->prop != NULL) {
+ IDP_FreePropertyContent(marker->prop);
+ MEM_freeN(marker->prop);
+ }
BLI_freelinkN(markers, marker);
changed = true;
}