[Bf-blender-cvs] [0a4da1baa2a] simulation-tree: show float property in socket
Jacques Lucke
noreply at git.blender.org
Thu Feb 20 13:20:17 CET 2020
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();
}
More information about the Bf-blender-cvs
mailing list