[Bf-blender-cvs] [ff44429421a] master: Fix warning printed when duplicating marker

Julian Eisel noreply at git.blender.org
Fri Sep 18 18:05:36 CEST 2020


Commit: ff44429421a183b4749dc777df76dde168090a3f
Author: Julian Eisel
Date:   Fri Sep 18 18:03:47 2020 +0200
Branches: master
https://developer.blender.org/rBff44429421a183b4749dc777df76dde168090a3f

Fix warning printed when duplicating marker

Steps to reproduce were:
* Create a marker in the timeline
* With the mouse over the marker region, press Shift+D

The function for moving markers was reused and had handling specific to
tweak events. This is not relevant in case of duplicating markers.

===================================================================

M	source/blender/editors/animation/anim_markers.c

===================================================================

diff --git a/source/blender/editors/animation/anim_markers.c b/source/blender/editors/animation/anim_markers.c
index 3bfa3b9d5be..6298ae16d8b 100644
--- a/source/blender/editors/animation/anim_markers.c
+++ b/source/blender/editors/animation/anim_markers.c
@@ -863,7 +863,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;



More information about the Bf-blender-cvs mailing list