19 b.add_input<
decl::Bool>(
N_(
"Selection")).default_value(
true).hide_value().supports_field();
79 if (domain_size == 0) {
85 evaluator.add(position_field);
86 evaluator.add(offset_field);
88 const IndexMask selection = evaluator.get_evaluated_selection_as_mask();
99 curves.handle_types_right_for_write();
101 curves.handle_types_left_for_write();
103 curves.handle_positions_right_for_write();
105 curves.handle_positions_right_for_write() :
106 curves.handle_positions_left_for_write();
109 for (const int i : selection.slice(range)) {
110 update_handle_types_for_movement(handle_types[i], handle_types_other[i]);
115 for (const int i : selection.slice(range)) {
116 bke::curves::bezier::set_handle_position(positions[i],
117 HandleType(handle_types[i]),
118 HandleType(handle_types_other[i]),
119 new_positions[i] + new_offsets[i],
121 handle_positions_other[i]);
125 curves.calculate_bezier_auto_handles();
127 curves.tag_positions_changed();
140 std::atomic<bool> has_curves =
false;
141 std::atomic<bool> has_bezier =
false;
143 geometry_set.modify_geometry_sets([&](
GeometrySet &geometry_set) {
150 if (!attributes.contains(
"handle_left") || !attributes.contains(
"handle_right")) {
162 if (has_curves && !has_bezier) {
166 params.set_output(
"Curve", std::move(geometry_set));
184 "NodeGeometrySetCurveHandlePositions",
Low-level operations for curves.
@ GEO_COMPONENT_TYPE_CURVE
#define GEO_NODE_SET_CURVE_HANDLES
#define NODE_STORAGE_FUNCS(StorageT)
void node_type_init(struct bNodeType *ntype, void(*initfunc)(struct bNodeTree *ntree, struct bNode *node))
#define NODE_CLASS_GEOMETRY
void node_type_storage(struct bNodeType *ntype, const char *storagename, void(*freefunc)(struct bNode *node), void(*copyfunc)(struct bNodeTree *dest_ntree, struct bNode *dest_node, const struct bNode *src_node))
void nodeRegisterType(struct bNodeType *ntype)
static uint8 component(Color32 c, uint i)
GeometryNodeCurveHandleMode
@ GEO_NODE_CURVE_HANDLE_LEFT
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum type
in reality light always falls off quadratically Particle Info
Group Output data from inside of a node group A color picker Mix two input colors RGB to Convert a color s luminance to a grayscale value Generate a normal vector and a dot product Bright Control the brightness and contrast of the input color Vector Map an input vectors to curves
void uiItemR(uiLayout *layout, struct PointerRNA *ptr, const char *propname, int flag, const char *name, int icon)
IndexRange index_range() const
static CurvesGeometry & wrap(::CurvesGeometry &dna_struct)
void set_selection(Field< bool > selection)
static void node_declare(NodeDeclarationBuilder &b)
static void node_geo_exec(GeoNodeExecParams params)
static void update_handle_types_for_movement(int8_t &type, int8_t &other)
static void set_position_in_component(CurveComponent &component, const GeometryNodeCurveHandleMode mode, const Field< bool > &selection_field, const Field< float3 > &position_field, const Field< float3 > &offset_field)
static void node_init(bNodeTree *UNUSED(tree), bNode *node)
static void node_layout(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
void parallel_for(IndexRange range, int64_t grain_size, const Function &function)
vec_base< float, 3 > float3
static const pxr::TfToken b("b", pxr::TfToken::Immortal)
static void node_init(const struct bContext *C, bNodeTree *ntree, bNode *node)
MutableSpan< float3 > positions
void register_node_type_geo_set_curve_handles()
void geo_node_type_base(bNodeType *ntype, int type, const char *name, short nclass)
void node_copy_standard_storage(bNodeTree *UNUSED(dest_ntree), bNode *dest_node, const bNode *src_node)
void node_free_standard_storage(bNode *node)
GeometryComponent & get_component_for_write(GeometryComponentType component_type)
const GeometryComponent * get_component_for_read(GeometryComponentType component_type) const
NodeGeometryExecFunction geometry_node_execute
void(* draw_buttons)(struct uiLayout *, struct bContext *C, struct PointerRNA *ptr)
NodeDeclareFunction declare