Fix: Missing GeometryNodeCustomGroup
This is a minor change to add some plumbing code to support custom geo nodes. This is working the same way as the custom cycles and compositor nodes. An example add-in is attached to D10784 Reviewed By: JacquesLucke Differential Revision: http://developer.blender.org/D10784
This commit is contained in:
@@ -20,11 +20,14 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "BKE_node.h"
|
||||
|
||||
extern struct bNodeTreeType *ntreeType_Geometry;
|
||||
|
||||
void register_node_tree_type_geo(void);
|
||||
|
||||
void register_node_type_geo_group(void);
|
||||
void register_node_type_geo_custom_group(bNodeType *ntype);
|
||||
|
||||
void register_node_type_geo_align_rotation_to_vector(void);
|
||||
void register_node_type_geo_attribute_clamp(void);
|
||||
|
@@ -528,7 +528,7 @@ inline bool NodeRef::is_reroute_node() const
|
||||
|
||||
inline bool NodeRef::is_group_node() const
|
||||
{
|
||||
return bnode_->type == NODE_GROUP;
|
||||
return bnode_->type == NODE_GROUP || bnode_->type == NODE_CUSTOM_GROUP;
|
||||
}
|
||||
|
||||
inline bool NodeRef::is_group_input_node() const
|
||||
|
@@ -43,3 +43,17 @@ void register_node_type_geo_group(void)
|
||||
|
||||
nodeRegisterType(&ntype);
|
||||
}
|
||||
|
||||
void register_node_type_geo_custom_group(bNodeType *ntype)
|
||||
{
|
||||
/* These methods can be overridden but need a default implementation otherwise. */
|
||||
if (ntype->poll == nullptr) {
|
||||
ntype->poll = geo_node_poll_default;
|
||||
}
|
||||
if (ntype->insert_link == nullptr) {
|
||||
ntype->insert_link = node_insert_link_default;
|
||||
}
|
||||
if (ntype->update_internal_links == nullptr) {
|
||||
ntype->update_internal_links = node_update_internal_links_default;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user