Files
test2/source/blender/editors/include/ED_geometry.h
Hans Goudey e4cc91a611 Geometry Nodes: Node group operators initial phase
This PR adds a new operator to run a node group on object geometry.
Only curves sculpt mode is supported for now, to simplify the design.

A new geometry node editor context to edit operator groups is also
added. This allows changing any node group, rather than only node
groups that are part of the active modifier context.

3D viewport menus are added with any geometry node group
asset in a catalog that contains the `Operator` tag. Currently Blender
must be restarted to refresh the list of available operators.

This is only the first phase of the node group operator feature.
Many more features will be added in next steps.

See #101778

Pull Request: https://projects.blender.org/blender/blender/pulls/108947
2023-06-29 13:57:54 +02:00

58 lines
1.3 KiB
C++

/* SPDX-FileCopyrightText: 2020 Blender Foundation
*
* SPDX-License-Identifier: GPL-2.0-or-later */
/** \file
* \ingroup editors
*/
#pragma once
#include "DNA_customdata_types.h"
#include "BKE_attribute.h"
#include "BKE_screen.h"
#ifdef __cplusplus
# include "BLI_string_ref.hh"
#endif
#ifdef __cplusplus
extern "C" {
#endif
struct Mesh;
struct ReportList;
void ED_operatortypes_geometry(void);
/**
* Convert an attribute with the given name to a new type and domain.
* The attribute must already exist.
*
* \note Does not support meshes in edit mode.
*/
bool ED_geometry_attribute_convert(struct Mesh *mesh,
const char *name,
eCustomDataType dst_type,
eAttrDomain dst_domain,
ReportList *reports);
#ifdef __cplusplus
}
#endif
#ifdef __cplusplus
namespace blender::ed::geometry {
MenuType node_group_operator_assets_menu();
void ui_template_node_operator_asset_menu_items(uiLayout &layout,
bContext &C,
StringRef catalog_path);
void ui_template_node_operator_asset_root_items(uiLayout &layout, bContext &C);
} // namespace blender::ed::geometry
#endif