Commit: 0a4da1baa2a470b371c3f650e3d09f145046418c
Author: Jacques Lucke
Date:   Thu Feb 20 13:13:00 2020 +0100
Branches: simulation-tree
https://developer.blender.org/rB0a4da1baa2a470b371c3f650e3d09f145046418c

show float property in socket

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

M       source/blender/simulations/nodes/my_test_node.cc

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

diff --git a/source/blender/simulations/nodes/my_test_node.cc 
b/source/blender/simulations/nodes/my_test_node.cc
index 66884d65907..dd68208f147 100644
--- a/source/blender/simulations/nodes/my_test_node.cc
+++ b/source/blender/simulations/nodes/my_test_node.cc
@@ -769,7 +769,20 @@ void init_socket_data_types()
                          const char *UNUSED(text)) {
       bNodeSocket *socket = (bNodeSocket *)ptr->data;
       bNodeSocketValueFloat *storage = 
get_socket_storage<bNodeSocketValueFloat>(socket);
-      uiItemL(layout, std::to_string(storage->value).c_str(), 0);
+      uiDefButF(uiLayoutGetBlock(layout),
+                UI_BTYPE_NUM,
+                0,
+                "My Value",
+                0,
+                0,
+                150,
+                30,
+                &storage->value,
+                -1000,
+                1000,
+                3,
+                20,
+                "my x value");
     });
     stype.register_type();
   }

_______________________________________________
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to