[Bf-blender-cvs] [258a9b5] master: Fix T39867: Hotkey is not displayed in the node editor's menu.
Bastien Montagne
noreply at git.blender.org
Thu Apr 24 16:49:57 CEST 2014
Commit: 258a9b5fc1f024a371bd43cefeb94a5b2d1f3ce5
Author: Bastien Montagne
Date: Thu Apr 24 16:46:54 2014 +0200
https://developer.blender.org/rB258a9b5fc1f024a371bd43cefeb94a5b2d1f3ce5
Fix T39867: Hotkey is not displayed in the node editor's menu.
Making both keymap and menu values the same, and adding a (debug only) check in
IDP_EqualsProperties_ex() warning when comparing two floats with nearly the same value.
===================================================================
M release/scripts/startup/bl_ui/space_node.py
M source/blender/blenkernel/intern/idprop.c
===================================================================
diff --git a/release/scripts/startup/bl_ui/space_node.py b/release/scripts/startup/bl_ui/space_node.py
index 830bdf9..c183c33 100644
--- a/release/scripts/startup/bl_ui/space_node.py
+++ b/release/scripts/startup/bl_ui/space_node.py
@@ -164,7 +164,7 @@ class NODE_MT_view(Menu):
layout.operator("node.backimage_move", text="Backdrop move")
layout.operator("node.backimage_zoom", text="Backdrop zoom in").factor = 1.2
- layout.operator("node.backimage_zoom", text="Backdrop zoom out").factor = 0.833
+ layout.operator("node.backimage_zoom", text="Backdrop zoom out").factor = 0.83333
layout.operator("node.backimage_fit", text="Fit backdrop to available space")
layout.separator()
diff --git a/source/blender/blenkernel/intern/idprop.c b/source/blender/blenkernel/intern/idprop.c
index 23d55ad..8b92312 100644
--- a/source/blender/blenkernel/intern/idprop.c
+++ b/source/blender/blenkernel/intern/idprop.c
@@ -35,6 +35,7 @@
#include "BLI_utildefines.h"
#include "BLI_string.h"
#include "BLI_listbase.h"
+#include "BLI_math.h"
#include "BKE_idprop.h"
#include "BKE_library.h"
@@ -820,6 +821,19 @@ bool IDP_EqualsProperties_ex(IDProperty *prop1, IDProperty *prop2, const bool is
case IDP_INT:
return (IDP_Int(prop1) == IDP_Int(prop2));
case IDP_FLOAT:
+#ifdef DEBUG
+ {
+ float p1 = IDP_Float(prop1);
+ float p2 = IDP_Float(prop2);
+ if ((p1 != p2) && ((fabs(p1 - p2) / max_ff(p1, p2)) < 0.001)) {
+ printf("WARNING: Comparing two float properties that have nearly the same value (%f vs. %f)\n", p1, p2);
+ printf(" p1: ");
+ IDP_spit(prop1);
+ printf(" p2: ");
+ IDP_spit(prop2);
+ }
+ }
+#endif
return (IDP_Float(prop1) == IDP_Float(prop2));
case IDP_DOUBLE:
return (IDP_Double(prop1) == IDP_Double(prop2));
More information about the Bf-blender-cvs
mailing list