雪千渔Blog

  • 首页
  • Coding
    • dotNet
    • C++
    • Lua
    • Visual Basic
    • Java
    • Android
    • Web
  • DCC
    • Maya
    • Maya-Plug
    • AfterEffect
    • AfterEffect-Plug
    • PhotoShop-Plug
  • GameDev
    • Unity3D
    • UnrealEngine
    • 经验杂谈
    • 游戏设计
    • 自研引擎
    • 效果实现
  • Graphics
    • OpenGL
    • Vulkan
    • 计算机图形学
  • 其他
    • 乱七八糟
    • 软件工具
    • 留言板
    • 自制素材
    • 关于我
雪千渔blog
唯有热爱,能抵漫长岁月
  1. 首页
  2. DCC
  3. Maya-Plug
  4. 正文

Maya崩溃文件查看器实用小工具发布

2019年6月26日 5680点热度 3人点赞 0条评论

新版本的Maya不光修复了很多Bug也带来了很多新Bug,甚至没有Bug的旧功能都可能产生新问题。

大家都说布尔运算是不稳定的,但其实在实际使用觉得布尔运算还是挺稳的,我遇到过设置骨骼初始姿势(尤其2015版),倒角,合并点,拆UV(2017以上版本内置了Unfold3d,所以可能会有很多问题)等各个版本的各种问题层出不穷,其实用09和13版也没什么,但是新版本更新的一部分功能确实是值得尝试的。

此工具可以以最快速度找到崩溃的maya文件并提供一些文档信息,软件界面如图:

把它固定到任务栏上更方便

下载地址

链接:https://pan.baidu.com/s/1W092y-EhEFeLgaK9hTc-2g
提取码:fzr3

源码

Mainfrm.frm

VERSION 5.00
Begin VB.Form Mainfrm 
   AutoRedraw      =   -1  'True
   BorderStyle     =   1  'Fixed Single
   Caption         =   "Maya崩溃文件查看器"
   ClientHeight    =   4890
   ClientLeft      =   45
   ClientTop       =   390
   ClientWidth     =   5805
   BeginProperty Font 
      Name            =   "微软雅黑"
      Size            =   9
      Charset         =   134
      Weight          =   400
      Underline       =   0   'False
      Italic          =   0   'False
      Strikethrough   =   0   'False
   EndProperty
   Icon            =   "Mainfrm.frx":0000
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   4890
   ScaleWidth      =   5805
   StartUpPosition =   2  '屏幕中心
   Begin VB.CommandButton OpenLastCrashBtn 
      Caption         =   "打开最后崩溃文件"
      Height          =   495
      Left            =   3720
      TabIndex        =   11
      Top             =   2880
      Width           =   1935
   End
   Begin VB.CommandButton OpenSelectBtn 
      Caption         =   "打开选中(默认版本)"
      Height          =   495
      Left            =   3720
      TabIndex        =   10
      Top             =   3480
      Width           =   1935
   End
   Begin VB.CommandButton CopyBtn 
      Caption         =   "复制选中到指定目录"
      Height          =   495
      Left            =   3720
      TabIndex        =   2
      Top             =   4080
      Width           =   1935
   End
   Begin VB.CommandButton RefreshBtn 
      Caption         =   "刷新"
      Height          =   375
      Left            =   3720
      TabIndex        =   1
      Top             =   120
      Width           =   1215
   End
   Begin VB.FileListBox File1 
      Height          =   4425
      Left            =   120
      Pattern         =   "*.ma"
      TabIndex        =   0
      Top             =   120
      Width           =   3375
   End
   Begin VB.Label Label1 
      AutoSize        =   -1  'True
      Caption         =   "@千渔软件"
      ForeColor       =   &H00808080&
      Height          =   255
      Left            =   120
      TabIndex        =   9
      Top             =   4560
      Width           =   900
   End
   Begin VB.Label MayaVersion 
      AutoSize        =   -1  'True
      Caption         =   "--"
      Height          =   255
      Left            =   3840
      TabIndex        =   8
      Top             =   2400
      Width           =   150
   End
   Begin VB.Label FileSize 
      AutoSize        =   -1  'True
      Caption         =   "--"
      Height          =   255
      Left            =   3840
      TabIndex        =   7
      Top             =   1680
      Width           =   150
   End
   Begin VB.Label CrashTime 
      AutoSize        =   -1  'True
      Caption         =   "--"
      Height          =   255
      Left            =   3840
      TabIndex        =   6
      Top             =   960
      Width           =   150
   End
   Begin VB.Label Label4 
      AutoSize        =   -1  'True
      Caption         =   "Maya版本"
      Height          =   255
      Left            =   3720
      TabIndex        =   5
      Top             =   2040
      Width           =   840
   End
   Begin VB.Label Label3 
      AutoSize        =   -1  'True
      Caption         =   "文档大小"
      Height          =   255
      Left            =   3720
      TabIndex        =   4
      Top             =   1320
      Width           =   720
   End
   Begin VB.Label Label2 
      AutoSize        =   -1  'True
      Caption         =   "崩溃时间"
      Height          =   255
      Left            =   3720
      TabIndex        =   3
      Top             =   600
      Width           =   720
   End
End
Attribute VB_Name = "Mainfrm"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long
Dim SelectPath As String
Dim SelectName As String

Private Sub CopyBtn_Click()
    If Dir(SelectPath) <> "" Then
        Dim filepath As String
        filepath = GetDialog("Save", "选择Maya文件", SelectName, "Maya文档", ".ma")
        If filepath <> "" Then
            FileCopy SelectPath, filepath
            MsgBox "复制完成"
        End If
    End If
End Sub

Private Sub File1_Click()
    Dim fileNames() As String
    Dim filename As String
    filename = File1.filename
    SelectName = filename
    On Error Resume Next
    SelectPath = Environ("TMP") & "\" & filename
    If Dir(SelectPath) = "" Then Exit Sub
    'CrashTime
    fileNames = Split(filename, ".")
    Dim Tcrashtime As String
    Tcrashtime = Left(fileNames(1), 4) & "/" & Mid(fileNames(1), 3, 2) _
    & "/" & Right(fileNames(1), 2) _
    & "  " & Left(fileNames(2), 2) & ":" & Right(fileNames(2), 2)
    CrashTime.Caption = Tcrashtime
    'DocumentSize
    FileSize.Caption = Int(FileLen(SelectPath) / 1024) & "kb"
    'MayaVersion
    Open SelectPath For Input As #1
    Dim Textline As String
    Dim position As Integer
    Do While Not EOF(1)
        Input #1, Textline
        position = InStr(1, Textline, "requires maya ")
        If position <> 0 Then
            Dim tString As String
            tString = Mid(Textline, position, 20)
            MayaVersion.Caption = Mid(tString, InStr(1, tString, Chr(34)) + 1, 4)
            Exit Do
        End If
    Loop
    Close #1
End Sub

Private Sub Form_Load()
    File1.Path = Environ("TMP")
End Sub

Private Sub Label1_Click()
    ShellExecute 0, "OPEN", "http://www.imxqy.com", 0, 0, 0
End Sub

Private Sub OpenLastCrashBtn_Click()
    If Dir(SelectPath) <> "" Then Shell "cmd /c start " & File1.List(File1.ListCount - 1), 0
End Sub

Private Sub OpenSelectBtn_Click()
    If Dir(SelectPath) <> "" Then Shell "cmd /c start " & SelectPath, 0
End Sub

FileDialog.bas
Attribute VB_Name = "FileDialog"
Private Declare Function GetPrivateProfileString Lib "kernel32" Alias "GetPrivateProfileStringA" (ByVal lpApplicationName As String, lpKeyName As Any, ByVal lpDefault As String, ByVal lpRetunedString As String, ByVal nSize As Long, ByVal lpFileName As String) As Long
Private Declare Function SaveINI Lib "kernel32" Alias "WritePrivateProfileStringA" (ByVal lpApplicationName As String, ByVal lpKeyName As Any, ByVal lpString As Any, ByVal lplFileName As String) As Long

Private Declare Function GetOpenFileName Lib "comdlg32.dll" Alias "GetOpenFileNameA" (pOPENFILENAME As OPENFILENAME) As Long
Private Declare Function GetSaveFileName Lib "comdlg32.dll" Alias "GetSaveFileNameA" (pOPENFILENAME As OPENFILENAME) As Long
Private Type OPENFILENAME
    lStructSize As Long
    hwndOwner As Long
    hInstance As Long
    lpstrFilter As String
    lpstrCustomFilter As String
    nMaxCustFilter As Long
    nFilterIndex As Long
    lpstrFile As String
    nMaxFile As Long
    lpstrFileTitle As String
    nMaxFileTitle As Long
    lpstrInitialDir As String
    lpstrTitle As String
    flags As Long
    nFileOffset As Integer
    nFileExtension As Integer
    lpstrDefExt As String
    lCustData As Long
    lpfnHook As Long
    lpTemplateName As String
End Type
Private Const OFN_OVERWRITEPROMPT = &H2
Private Const OFN_HIDEREADONLY = &H4
Private Const OFN_PATHMUSTEXIST = &H800
Private Const OFN_FILEMUSTEXIST = &H1000
Public Function GetDialog(ByVal sMethod As String, ByVal sTitle As String, ByVal sFileName As String, ByVal jieshao As String, ByVal houzhui As String) As String
    On Error GoTo myError
    Dim rtn As Long, pos As Integer
    Dim file As OPENFILENAME
    file.lStructSize = Len(file)
    file.hInstance = App.hInstance
    file.lpstrFile = sFileName & String$(255 - Len(sFileName), 0)
    file.nMaxFile = 255
    file.lpstrFileTitle = String$(255, 0)
    file.nMaxFileTitle = 255
    file.lpstrInitialDir = ""
    file.lpstrFilter = jieshao
    file.lpstrTitle = sTitle
    If UCase(sMethod) = "OPEN" Then
        file.flags = OFN_HIDEREADONLY + OFN_PATHMUSTEXIST + OFN_FILEMUSTEXIST
        rtn = GetOpenFileName(file)
    Else
        file.lpstrDefExt = houzhui
        file.flags = OFN_HIDEREADONLY + OFN_PATHMUSTEXIST + OFN_OVERWRITEPROMPT
        rtn = GetSaveFileName(file)
    End If
    If rtn > 0 Then
        pos = InStr(file.lpstrFile, Chr$(0))
        If pos > 0 Then
            GetDialog = Left$(file.lpstrFile, pos - 1)
        End If
    End If
    Exit Function
myError:
    MsgBox "操作失败!", vbCritical + vbOKOnly, APP_NAME
End Function

 

 

本作品采用 知识共享署名 4.0 国际许可协议 进行许可
标签: MAYA Maya插件 崩溃
最后更新:2021年4月18日

JomiXedYu

独游开发者 & 技术美术

点赞
下一篇 >

文章评论

razz evil exclaim smile redface biggrin eek confused idea lol mad twisted rolleyes wink cool arrow neutral cry mrgreen drooling persevering
取消回复

JomiXedYu

独游开发者 & 技术美术

最新 热点 随机
最新 热点 随机
HLSL对Vulkan的适应性以及伪语义绑定 GPU呈现模式与垂直空白 自研引擎PulsarEngine的Shader编译流程 UE材质Custom节点与HLSL的HACK操作 UE5出现D3D12崩溃报错解决方案 游戏引擎脚本绑定的三种写法与利弊
HLSL对Vulkan的适应性以及伪语义绑定
VB.NET外部程序的编译 Unity资源打包经验概述 关于vb6使用socket发送通信类型和编码 C++中的事件分发器与委托 [程序开发文档]ColorUpdate自动更新组件 AE多开多线程渲染工具单机版MultiAERender发布
友情链接
  • DorinXL
  • 小博博客
  • 秋橘斋

COPYRIGHT © 2014-2023 雪千渔Blog. ALL RIGHTS RESERVED.

Theme Kratos Made By Seaton Jiang

辽ICP备20006894号-1