一、通过插件创建自定义类型的节点
在类Plugindemo 中添加一行
static kanzi::PropertyTypeEditorInfoSharedPtr makeEditorInfo();
之后,整体代码如下
class PLUGINDEMO_API Plugindemo : public kanzi::Node3D
{
public:
KZ_METACLASS_BEGIN(Plugindemo, Node3D, "qweasdzxc")
KZ_METACLASS_END()
static kanzi::PropertyTypeEditorInfoSharedPtr makeEditorInfo();
// Creates a Plugindemo.
static PlugindemoSharedPtr create(kanzi::Domain* domain, kanzi::string_view name);
protected:
// Constructor.
explicit Plugindemo(kanzi::Domain* domain, kanzi::string_view name):
kanzi::Node3D(domain, name)
{
}
// Initializes the created Kanzi Engine plugin.
// Kanzi node classes typically have a static create() member function, which creates the instance of a node,
// initializes it, and returns a shared pointer to the instance. T

本文介绍如何在KanziStudio中通过插件创建自定义类型的节点,并详细解释了实现过程中的关键技术点,包括宏定义、元对象创建及属性设置。
最低0.47元/天 解锁文章
825

被折叠的 条评论
为什么被折叠?



