Exemple #1
0
    def draw(self, context):
        layout = self.layout
        scn = context.scene
        if not utils.drawConfirm(layout, scn):
            return
        settings.drawDirectories(layout, scn)

        layout.label("Base Character")
        character.drawItems(layout, scn)
        layout.operator("mh.create_base_character")

        layout.separator()
        layout.label("Mask")
        layout.operator("mh.generate_mask")
        #layout.operator("mh.make_mask")    
        #layout.operator("mh.shapekey_mask")    
        layout.separator()

        if not utils.checkForNumpy(layout, "MakeFace"):
            return

        layout.label("Face")
        layout.operator("mh.generate_face")
        #layout.prop(scn, "MhStiffness")
        #layout.prop(scn, "MhLambda")
        #layout.prop(scn, "MhIterations")

        ob = context.object
        if ob and ob.MhMaskFilePath:
            layout.operator("mh.save_face")
        layout.operator("mh.save_face_as")
Exemple #2
0
    def draw(self, context):
        layout = self.layout
        scn = context.scene
        if not utils.drawConfirm(layout, scn):
            return
        settings.drawDirectories(layout, scn)

        layout.label("Base Character")
        character.drawItems(layout, scn)
        layout.operator("mh.create_base_character")

        layout.separator()
        layout.label("Mask")
        layout.operator("mh.generate_mask")
        #layout.operator("mh.make_mask")
        #layout.operator("mh.shapekey_mask")
        layout.separator()

        if not utils.checkForNumpy(layout, "MakeFace"):
            return

        layout.label("Face")
        layout.operator("mh.generate_face")
        #layout.prop(scn, "MhStiffness")
        #layout.prop(scn, "MhLambda")
        #layout.prop(scn, "MhIterations")

        ob = context.object
        if ob and ob.MhMaskFilePath:
            layout.operator("mh.save_face")
        layout.operator("mh.save_face_as")
Exemple #3
0
    def draw(self, context):
        layout = self.layout
        scn = context.scene
        if not utils.drawConfirm(layout, scn):
            return
        settings.drawDirectories(layout, scn)

        if not utils.checkForNumpy(layout, "WarpTarget"):
            return

        layout.label("Source Character")
        srcChar = warptarget.theSourceCharacter.character
        srcChar.drawFiles(layout, scn)
        if srcChar.files:
            layout.operator("mh.load_source_character")

        layout.label("Source Morph")
        layout.operator("mh.set_source_morph")
        layout.prop(scn, "MhSourceMorphTopDir")
        layout.prop(scn, "MhSourceMorphDir")
        layout.prop(scn, "MhSourceMorphFile")

        layout.separator()
        layout.label("Target Character")
        trgChar = warptarget.theTargetCharacter.character
        character.drawItems(layout, scn)
        layout.operator("mh.update_target_character")
        trgChar.drawFiles(layout, scn)
        if trgChar.files:
            layout.operator("mh.load_target_character")

        layout.label("Target Morph")
        layout.prop(scn, "MhNeutral", expand=True)
        layout.prop(scn, "MhUseSubdirs")
        layout.prop(scn, "MhTargetMorphTopDir")
        layout.prop(scn, "MhTargetMorphDir")
        layout.prop(scn, "MhTargetMorphFile")

        layout.separator()
        layout.label("Warp method")
        layout.prop(scn, "MhWarpPart", expand=True)
        layout.prop(scn, "MhKeepActive")

        layout.separator()
        layout.operator("mh.warp_morph")

        layout.separator()
        split = layout.split(0.8)
        split.prop(scn, "MhLandmarks")
        split.operator("mh.update_landmarks")
        layout.prop(scn, "MhWarpAllMorphsInDir")
Exemple #4
0
    def draw(self, context):
        layout = self.layout
        scn = context.scene        
        if not utils.drawConfirm(layout, scn):
            return
        settings.drawDirectories(layout, scn)

        if not utils.checkForNumpy(layout, "WarpTarget"):
            return

        layout.label("Source Character")
        srcChar = the.SourceCharacter.character
        srcChar.drawFiles(layout, scn)
        if srcChar.files:            
            layout.operator("mh.load_source_character")

        layout.label("Source Morph")
        layout.operator("mh.set_source_morph")
        layout.prop(scn, "MhSourceMorphTopDir")
        layout.prop(scn, "MhSourceMorphDir")
        layout.prop(scn, "MhSourceMorphFile")

        layout.separator()
        layout.label("Target Character")
        trgChar = the.TargetCharacter.character
        character.drawItems(layout, scn)
        layout.operator("mh.update_target_character")
        trgChar.drawFiles(layout, scn)
        if trgChar.files:            
            layout.operator("mh.load_target_character")
        
        layout.label("Target Morph")
        layout.prop(scn, "MhNeutral", expand=True)
        layout.prop(scn, "MhUseSubdirs")
        layout.prop(scn, "MhTargetMorphTopDir")
        layout.prop(scn, "MhTargetMorphDir")
        layout.prop(scn, "MhTargetMorphFile")

        layout.separator()
        layout.label("Warp method")
        layout.prop(scn, "MhWarpPart", expand=True)
        layout.prop(scn, "MhKeepActive")

        layout.separator()
        layout.operator("mh.warp_morph")

        layout.separator()
        split = layout.split(0.8)
        split.prop(scn, "MhLandmarks")
        split.operator("mh.update_landmarks")
        layout.prop(scn, "MhWarpAllMorphsInDir")
Exemple #5
0
    def draw(self, context):
        layout = self.layout
        ob = context.object
        scn = context.scene
        if not utils.drawConfirm(layout, scn):
            return
        settings.drawDirectories(layout, scn)

        if utils.isBaseOrTarget(ob):
            for (label, names) in mhm.MhmDisplay:
                layout.label(label)
                for name in names:
                    prop = mhm.MhmNameProps[name]
                    split = layout.split(0.8)
                    split.prop(ob.data, prop)
                    split.operator("mh.update_all_sliders")
            layout.separator()                
            layout.operator("mh.update_all_sliders")        
            layout.operator("mh.reset_all_sliders")        
            layout.operator("mh.load_mhm_file")                        
            layout.operator("mh.discard_all_targets")
Exemple #6
0
    def draw(self, context):
        layout = self.layout
        ob = context.object
        scn = context.scene
        if not utils.drawConfirm(layout, scn):
            return
        settings.drawDirectories(layout, scn)

        if utils.isBaseOrTarget(ob):
            for (label, names) in mhm.MhmDisplay:
                layout.label(label)
                for name in names:
                    prop = mhm.MhmNameProps[name]
                    split = layout.split(0.8)
                    split.prop(ob.data, prop)
                    split.operator("mh.update_all_sliders")
            layout.separator()
            layout.operator("mh.update_all_sliders")
            layout.operator("mh.reset_all_sliders")
            layout.operator("mh.load_mhm_file")
            layout.operator("mh.discard_all_targets")
Exemple #7
0
    def draw(self, context):
        layout = self.layout
        ob = context.object
        if ob:
            rig = ob.parent
        else:
            rig = None
        scn = context.scene
        if not utils.drawConfirm(layout, scn):
            return

        if Thomas:
            layout.label("Pruning")
            row = layout.row()
            row.prop(ob, "MhPruneEnabled")
            row.prop(ob, "MhPruneWholeDir")
            row.prop(ob, "MhPruneRecursively")
            layout.operator("mh.prune_target_file")

        if not utils.isBaseOrTarget(ob):
            layout.operator("mh.import_base_obj")
            layout.operator("mh.import_base_mhclo")
            layout.operator("mh.make_base_obj")

        elif utils.isBase(ob):
            layout.label("Load Target")
            layout.operator("mh.new_target")
            layout.operator("mh.load_target")            
            layout.operator("mh.load_target_from_mesh")                        

        elif utils.isTarget(ob):
            if not ob.data.shape_keys:
                layout.label("Warning: Internal inconsistency")
                layout.operator("mh.fix_inconsistency")
                return
            layout.separator()
            box = layout.box()
            n = 0
            for skey in ob.data.shape_keys.key_blocks:
                if n == 0:
                    n += 1
                    continue
                row = box.row()
                if n == ob.active_shape_key_index:
                    icon='LAMP'
                else:
                    icon='X'
                row.label("", icon=icon)
                row.prop(skey, "value", text=skey.name)
                n += 1

            layout.label("Load Target")
            layout.operator("mh.new_target", text="New Secondary Target")
            layout.operator("mh.load_target", text="Load Secondary From File")            
            layout.operator("mh.load_target_from_mesh", text="Load Secondary From Mesh")    
            ext = os.path.splitext(ob.MhFilePath)[1]
            if ext == ".mhclo":
                layout.operator("mh.fit_target")

            layout.label("Discard And Apply Target")
            layout.operator("mh.discard_target")
            layout.operator("mh.discard_all_targets")
            layout.operator("mh.apply_targets")

            layout.label("Symmetry")
            row = layout.row()            
            row.operator("mh.symmetrize_target", text="Left->Right").action = "Left"
            row.operator("mh.symmetrize_target", text="Right->Left").action = "Right"
            if Thomas:
                row.operator("mh.symmetrize_target", text="Mirror").action = "Mirror"

            layout.label("Save Target")            
            layout.prop(ob, "SelectedOnly")
            layout.prop(ob, "MhZeroOtherTargets")
            if ob["FilePath"]:
                layout.operator("mh.save_target")           
            layout.operator("mh.saveas_target")       

            if not ob.MhDeleteHelpers:
                layout.label("Skirt Editing")
                layout.operator("mh.snap_waist")
                layout.operator("mh.straighten_skirt")            
                if ob.MhIrrelevantDeleted:
                    layout.separator()
                    layout.label("Only %s Affected" % ob.MhAffectOnly)
                else:
                    layout.label("Affect Only:")
                    layout.prop(ob, "MhAffectOnly", expand=True)
                    #layout.operator("mh.delete_irrelevant")  
                

        if rig and rig.type == 'ARMATURE':
            layout.separator()
            layout.label("Export/Import MHP")
            layout.operator("mh.saveas_mhp")
            layout.operator("mh.load_mhp")

            layout.separator()
            layout.label("Export/Import BVH")
            layout.prop(scn, "MhExportRotateMode")
            layout.operator("mh.saveas_bvh")
            layout.operator("mh.load_bvh")

            layout.separator()
            layout.label("Convert between rig weights")
            layout.prop(scn, "MhSourceRig")
            layout.prop(scn, "MhTargetRig")
            layout.prop(scn, "MhPoseTargetDir")            
            layout.operator("mh.convert_rig")
Exemple #8
0
    def draw(self, context):
        layout = self.layout
        ob = context.object
        if ob:
            rig = ob.parent
        else:
            rig = None
        scn = context.scene
        if not utils.drawConfirm(layout, scn):
            return
            
        settings.drawDirectories(layout, scn)

        if False:
            layout.label("Pruning")
            row = layout.row()
            row.prop(ob, "MhPruneEnabled")
            row.prop(ob, "MhPruneWholeDir")
            row.prop(ob, "MhPruneRecursively")
            layout.operator("mh.prune_target_file")

        layout.label("Load materials from")
        layout.prop(scn, "MhLoadMaterial", expand=True)
        layout.separator()
        if utils.isBaseOrTarget(ob):
            layout.operator("mh.import_base_mhclo", text="Reimport Base Mhclo").delete = True
            layout.operator("mh.import_base_obj", text="Reimport Base Obj").delete = True
            #layout.operator("mh.delete_clothes")
            #layout.operator("mh.tights_only")
            layout.separator()
        else:
            layout.operator("mh.import_base_mhclo", text="Import Base Mhclo").delete = False
            layout.operator("mh.import_base_obj", text="Import Base Obj").delete = False
            if rig and rig.type == 'ARMATURE':
                layout.operator("mh.make_base_obj")

        if utils.isBase(ob):
            layout.operator("mh.new_target")
            layout.operator("mh.load_target")            
            layout.operator("mh.load_target_from_mesh")                        

        elif utils.isTarget(ob):
            if not ob.data.shape_keys:
                layout.label("Warning: Internal inconsistency")
                layout.operator("mh.fix_inconsistency")
                return
            layout.separator()
            layout.prop(ob, "show_only_shape_key")
            box = layout.box()
            n = 0
            for skey in ob.data.shape_keys.key_blocks:
                if n == 0:
                    n += 1
                    continue
                row = box.row()
                if n == ob.active_shape_key_index:
                    icon='LAMP'
                else:
                    icon='X'
                row.label("", icon=icon)
                row.prop(skey, "value", text=skey.name)
                n += 1

            layout.separator()
            layout.operator("mh.new_target", text="New Secondary Target")
            layout.operator("mh.load_target", text="Load Secondary From File")            
            layout.operator("mh.load_target_from_mesh", text="Load Secondary From Mesh")                        
            layout.operator("mh.fit_target")
            layout.separator()
            layout.operator("mh.discard_target")
            layout.operator("mh.discard_all_targets")
            layout.operator("mh.apply_targets")

            layout.separator()
            if ob.MhIrrelevantDeleted:
                layout.label("Only %s Affected" % ob.MhAffectOnly)
            else:
                layout.label("Affect Only:")
                layout.prop(ob, "MhAffectOnly", expand=True)
                layout.operator("mh.delete_irrelevant")  
            row = layout.row()
            row.prop(ob, "SelectedOnly")
            row.prop(ob, "MhZeroOtherTargets")
            if ob["FilePath"]:
                layout.operator("mh.save_target")           
            layout.operator("mh.saveas_target")       
            
            layout.separator()
            layout.label("Editing")
            layout.operator("mh.symmetrize_target", text="Symm Left->Right").action = "Left"
            layout.operator("mh.symmetrize_target", text="Symm Right->Left").action = "Right"
            layout.operator("mh.symmetrize_target", text="Mirror Target").action = "Mirror"
            if ob.MhAffectOnly == 'Skirt':
                layout.operator("mh.snap_waist")
                layout.operator("mh.straighten_skirt")
                
            layout.operator("mh.relax_selected")
            if ob.MhRelaxing:
                layout.prop(ob, "MhRelaxAmount")
                row = layout.row()
                row.prop(ob, "MhRelaxX")
                row.prop(ob, "MhRelaxY")
                row.prop(ob, "MhRelaxZ")
                layout.operator("mh.test_relax")
                layout.operator("mh.discard_relax")
                layout.operator("mh.commit_relax")
                layout.operator("mh.commit_and_relax_more")
                return

        if rig and rig.type == 'ARMATURE':
            layout.separator()
            layout.label("Export/Import MHP")
            layout.operator("mh.saveas_mhp")
            layout.operator("mh.load_mhp")

            layout.separator()
            layout.label("Export/Import BVH")
            layout.prop(scn, "MhExportRotateMode")
            layout.operator("mh.saveas_bvh")
            layout.operator("mh.load_bvh")

            layout.separator()
            layout.label("Convert between rig weights")
            layout.prop(scn, "MhSourceRig")
            layout.prop(scn, "MhTargetRig")
            layout.prop(scn, "MhPoseTargetDir")            
            layout.operator("mh.convert_rig")
Exemple #9
0
    def draw(self, context):
        layout = self.layout
        ob = context.object
        if ob:
            rig = ob.parent
        else:
            rig = None
        scn = context.scene
        if not utils.drawConfirm(layout, scn):
            return

        settings.drawDirectories(layout, scn)

        if False:
            layout.label("Pruning")
            row = layout.row()
            row.prop(ob, "MhPruneEnabled")
            row.prop(ob, "MhPruneWholeDir")
            row.prop(ob, "MhPruneRecursively")
            layout.operator("mh.prune_target_file")

        layout.label("Load materials from")
        layout.prop(scn, "MhLoadMaterial", expand=True)
        layout.separator()
        if utils.isBaseOrTarget(ob):
            layout.operator("mh.import_base_mhclo",
                            text="Reimport Base Mhclo").delete = True
            layout.operator("mh.import_base_obj",
                            text="Reimport Base Obj").delete = True
            #layout.operator("mh.delete_clothes")
            #layout.operator("mh.tights_only")
            layout.separator()
        else:
            layout.operator("mh.import_base_mhclo",
                            text="Import Base Mhclo").delete = False
            layout.operator("mh.import_base_obj",
                            text="Import Base Obj").delete = False
            if rig and rig.type == 'ARMATURE':
                layout.operator("mh.make_base_obj")

        if utils.isBase(ob):
            layout.operator("mh.new_target")
            layout.operator("mh.load_target")
            layout.operator("mh.load_target_from_mesh")

        elif utils.isTarget(ob):
            if not ob.data.shape_keys:
                layout.label("Warning: Internal inconsistency")
                layout.operator("mh.fix_inconsistency")
                return
            layout.separator()
            layout.prop(ob, "show_only_shape_key")
            box = layout.box()
            n = 0
            for skey in ob.data.shape_keys.key_blocks:
                if n == 0:
                    n += 1
                    continue
                row = box.row()
                if n == ob.active_shape_key_index:
                    icon = 'LAMP'
                else:
                    icon = 'X'
                row.label("", icon=icon)
                row.prop(skey, "value", text=skey.name)
                n += 1

            layout.separator()
            layout.operator("mh.new_target", text="New Secondary Target")
            layout.operator("mh.load_target", text="Load Secondary From File")
            layout.operator("mh.load_target_from_mesh",
                            text="Load Secondary From Mesh")
            layout.operator("mh.fit_target")
            layout.separator()
            layout.operator("mh.discard_target")
            layout.operator("mh.discard_all_targets")
            layout.operator("mh.apply_targets")

            layout.separator()
            if ob.MhIrrelevantDeleted:
                layout.label("Only %s Affected" % ob.MhAffectOnly)
            else:
                layout.label("Affect Only:")
                layout.prop(ob, "MhAffectOnly", expand=True)
                layout.operator("mh.delete_irrelevant")
            row = layout.row()
            row.prop(ob, "SelectedOnly")
            row.prop(ob, "MhZeroOtherTargets")
            if ob["FilePath"]:
                layout.operator("mh.save_target")
            layout.operator("mh.saveas_target")

            layout.separator()
            layout.label("Editing")
            layout.operator("mh.symmetrize_target",
                            text="Symm Left->Right").action = "Left"
            layout.operator("mh.symmetrize_target",
                            text="Symm Right->Left").action = "Right"
            layout.operator("mh.symmetrize_target",
                            text="Mirror Target").action = "Mirror"
            if ob.MhAffectOnly == 'Skirt':
                layout.operator("mh.snap_waist")
                layout.operator("mh.straighten_skirt")

            layout.operator("mh.relax_selected")
            if ob.MhRelaxing:
                layout.prop(ob, "MhRelaxAmount")
                row = layout.row()
                row.prop(ob, "MhRelaxX")
                row.prop(ob, "MhRelaxY")
                row.prop(ob, "MhRelaxZ")
                layout.operator("mh.test_relax")
                layout.operator("mh.discard_relax")
                layout.operator("mh.commit_relax")
                layout.operator("mh.commit_and_relax_more")
                return

        if rig and rig.type == 'ARMATURE':
            layout.separator()
            layout.label("Export/Import MHP")
            layout.operator("mh.saveas_mhp")
            layout.operator("mh.load_mhp")

            layout.separator()
            layout.label("Export/Import BVH")
            layout.prop(scn, "MhExportRotateMode")
            layout.operator("mh.saveas_bvh")
            layout.operator("mh.load_bvh")

            layout.separator()
            layout.label("Convert between rig weights")
            layout.prop(scn, "MhSourceRig")
            layout.prop(scn, "MhTargetRig")
            layout.prop(scn, "MhPoseTargetDir")
            layout.operator("mh.convert_rig")
Exemple #10
0
    def draw(self, context):
        layout = self.layout
        ob = context.object
        if ob:
            rig = ob.parent
        else:
            rig = None
        scn = context.scene
        if not utils.drawConfirm(layout, scn):
            return

        if Thomas:
            layout.label("Pruning")
            row = layout.row()
            row.prop(ob, "MhPruneEnabled")
            row.prop(ob, "MhPruneWholeDir")
            row.prop(ob, "MhPruneRecursively")
            layout.operator("mh.prune_target_file")

        if not utils.isBaseOrTarget(ob):
            layout.operator("mh.import_base_obj")
            layout.operator("mh.import_base_mhclo")
            layout.operator("mh.make_base_obj")

        elif utils.isBase(ob):
            layout.label("Load Target")
            layout.operator("mh.new_target")
            layout.operator("mh.load_target")
            layout.operator("mh.load_target_from_mesh")

        elif utils.isTarget(ob):
            if not ob.data.shape_keys:
                layout.label("Warning: Internal inconsistency")
                layout.operator("mh.fix_inconsistency")
                return
            layout.separator()
            box = layout.box()
            n = 0
            for skey in ob.data.shape_keys.key_blocks:
                if n == 0:
                    n += 1
                    continue
                row = box.row()
                if n == ob.active_shape_key_index:
                    icon = 'LAMP'
                else:
                    icon = 'X'
                row.label("", icon=icon)
                row.prop(skey, "value", text=skey.name)
                n += 1

            layout.label("Load Target")
            layout.operator("mh.new_target", text="New Secondary Target")
            layout.operator("mh.load_target", text="Load Secondary From File")
            layout.operator("mh.load_target_from_mesh",
                            text="Load Secondary From Mesh")
            ext = os.path.splitext(ob.MhFilePath)[1]
            if ext == ".mhclo":
                layout.operator("mh.fit_target")

            layout.label("Discard And Apply Target")
            layout.operator("mh.discard_target")
            layout.operator("mh.discard_all_targets")
            layout.operator("mh.apply_targets")

            layout.label("Symmetry")
            row = layout.row()
            row.operator("mh.symmetrize_target",
                         text="Left->Right").action = "Left"
            row.operator("mh.symmetrize_target",
                         text="Right->Left").action = "Right"
            if Thomas:
                row.operator("mh.symmetrize_target",
                             text="Mirror").action = "Mirror"

            layout.label("Save Target")
            layout.prop(ob, "SelectedOnly")
            layout.prop(ob, "MhZeroOtherTargets")
            if ob["FilePath"]:
                layout.operator("mh.save_target")
            layout.operator("mh.saveas_target")

            if not ob.MhDeleteHelpers:
                layout.label("Skirt Editing")
                layout.operator("mh.snap_waist")
                layout.operator("mh.straighten_skirt")
                if ob.MhIrrelevantDeleted:
                    layout.separator()
                    layout.label("Only %s Affected" % ob.MhAffectOnly)
                else:
                    layout.label("Affect Only:")
                    layout.prop(ob, "MhAffectOnly", expand=True)
                    #layout.operator("mh.delete_irrelevant")

        if rig and rig.type == 'ARMATURE':
            layout.separator()
            layout.label("Export/Import MHP")
            layout.operator("mh.saveas_mhp")
            layout.operator("mh.load_mhp")

            layout.separator()
            layout.label("Export/Import BVH")
            layout.prop(scn, "MhExportRotateMode")
            layout.operator("mh.saveas_bvh")
            layout.operator("mh.load_bvh")

            layout.separator()
            layout.label("Convert between rig weights")
            layout.prop(scn, "MhSourceRig")
            layout.prop(scn, "MhTargetRig")
            layout.prop(scn, "MhPoseTargetDir")
            layout.operator("mh.convert_rig")
    def draw(self, context):
        layout = self.layout
        ob = context.object
        if ob:
            rig = ob.parent
        else:
            rig = None
        scn = context.scene
        if not utils.drawConfirm(layout, scn):
            return
        settings.drawDirectories(layout, scn)

        layout.label("Load materials from")
        layout.prop(scn, "MhLoadMaterial", expand=True)
        layout.separator()
        if utils.isBaseOrTarget(ob):
            layout.operator("mh.import_base_mhclo", text="Reimport Base Mhclo").delete = True
            layout.operator("mh.import_base_obj", text="Reimport Base Obj").delete = True
            layout.operator("mh.delete_clothes")
            layout.separator()
        else:
            layout.operator("mh.import_base_mhclo", text="Import Base Mhclo").delete = False
            layout.operator("mh.import_base_obj", text="Import Base Obj").delete = False
            if rig and rig.type == "ARMATURE":
                layout.operator("mh.make_base_obj")
        if utils.isBase(ob):
            layout.operator("mh.new_target")
            layout.operator("mh.load_target")
            layout.operator("mh.load_target_from_mesh")
        elif utils.isTarget(ob):
            if not ob.data.shape_keys:
                layout.label("Warning: Internal inconsistency")
                layout.operator("mh.fix_inconsistency")
                return
            layout.separator()
            layout.prop(ob, "show_only_shape_key")
            box = layout.box()
            n = 0
            for skey in ob.data.shape_keys.key_blocks:
                if n == 0:
                    n += 1
                    continue
                row = box.row()
                if n == ob.active_shape_key_index:
                    icon = "LAMP"
                else:
                    icon = "X"
                row.label("", icon=icon)
                row.prop(skey, "value", text=skey.name)
                n += 1
            layout.separator()
            layout.operator("mh.new_target", text="New Secondary Target")
            layout.operator("mh.load_target", text="Load Secondary From File")
            layout.operator("mh.load_target_from_mesh", text="Load Secondary From Mesh")
            layout.operator("mh.fit_target")
            layout.operator("mh.symmetrize_target", text="Symm Left->Right").left2right = False
            layout.operator("mh.symmetrize_target", text="Symm Right->Left").left2right = True
            # layout.separator()
            # layout.prop(scn, '["Relax"]')
            # layout.operator("mh.relax_target")
            layout.separator()
            layout.operator("mh.discard_target")
            layout.operator("mh.discard_all_targets")
            layout.separator()
            layout.operator("mh.apply_targets")
            layout.separator()
            layout.prop(ob, '["SelectedOnly"]')
            if ob["FilePath"]:
                layout.operator("mh.save_target")
            layout.operator("mh.saveas_target")

        if rig and rig.type == "ARMATURE":
            layout.separator()
            layout.operator("mh.saveas_bvh")
            layout.operator("mh.load_bvh")