我正在为 Blender 2.80 插件设计一个简单的 GUI。我创建了一个对话框来输入一些数据:
我想用带有自定义标签的按钮替换文本行(“Lorem ipsum ...”)(例如“单击此处访问我们的网站”)。
下面是我正在使用的代码:
class ExportFDSCloudHPC(Operator):
bl_idname = "..."
bl_label = "Title"
bl_description = "..."
data1 = bpy.props.StringProperty(
name = "Text 1",
default = "..."
)
data2 = bpy.props.StringProperty(
name = "Text 2",
default = "..."
)
data3 = bpy.props.StringProperty(
name = "Text 3",
default = "..."
)
def draw(self, context):
col = self.layout.column(align = True)
col.prop(self, "data1")
self.layout.label(text="Lorem ipsum dolor sit amet, consectetur adipisci elit...")
col = self.layout.column(align = True)
col.prop(self, "data2")
col = self.layout.column(align = True)
col.prop(self, "data3")
def execute(self, context):
...