[Bf-blender-cvs] [0103cb20519] geometry-nodes: Geometry Nodes: initial support for bool group inputs
Jacques Lucke
noreply at git.blender.org
Tue Oct 27 14:59:38 CET 2020
Commit: 0103cb20519eb80426f077181fb19df0e2a900dc
Author: Jacques Lucke
Date: Tue Oct 27 14:59:26 2020 +0100
Branches: geometry-nodes
https://developer.blender.org/rB0103cb20519eb80426f077181fb19df0e2a900dc
Geometry Nodes: initial support for bool group inputs
Still need to work on the uilayout inside the modifier.
===================================================================
M source/blender/modifiers/intern/MOD_nodes.cc
===================================================================
diff --git a/source/blender/modifiers/intern/MOD_nodes.cc b/source/blender/modifiers/intern/MOD_nodes.cc
index b49b26b67ac..549f80ce841 100644
--- a/source/blender/modifiers/intern/MOD_nodes.cc
+++ b/source/blender/modifiers/intern/MOD_nodes.cc
@@ -380,6 +380,20 @@ static const SocketPropertyType *get_socket_property_type(const bNodeSocket &bso
};
return &vector_type;
}
+ case SOCK_BOOLEAN: {
+ static const SocketPropertyType boolean_type = {
+ [](const bNodeSocket &socket, const char *name) {
+ IDPropertyTemplate value = {0};
+ value.i = ((bNodeSocketValueBoolean *)socket.default_value)->value != 0;
+ return IDP_New(IDP_INT, &value, name);
+ },
+ [](const IDProperty &property) { return property.type == IDP_INT; },
+ [](const IDProperty &property, void *r_value) {
+ *(bool *)r_value = IDP_Int(&property) != 0;
+ },
+ };
+ return &boolean_type;
+ }
default: {
return nullptr;
}
More information about the Bf-blender-cvs
mailing list