0

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

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") 
4

0 回答 0