BPY - 如何创建一个布尔标志来检查按钮是否被点击?

问题描述

我想弄清楚如何正确检查布尔标志以查看按钮是否已被单击,但它似乎不起作用。 也许我没有正确地做到这一点,任何帮助表示赞赏。

import bpy

global rigged


class UnityRigPanel(bpy.types.Panel):
    """Creates a Panel in the Object properties window"""
    bl_label = "Unity Rigger"
    bl_idname = "OBJECT_PT_layout"
    bl_space_type = 'PROPERTIES'
    bl_region_type = 'WINDOW'
    bl_context = "scene"
    
    def draw(self,context):
        layout = self.layout
        scene = context.scene
        
        #layout.prop(scene,"rigged",text="Bool Property")
        
        layout.label(text="Unity Humanoid Rigger")
        row = layout.row()
        row.scale_y = 2.0
        row.operator("create.rig")
        if rigged: 
            row = layout.row()
            row.scale_y = 2.0
            row.operator("create.ik") 

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)