13、Kanzi插件——通过Kanzi Engine插件创建自定义节点+代码解析

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

一、通过插件创建自定义类型的节点

在类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
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值