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