Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Little tool to list textures from .DAE
Daemian Offline
Posting Freak

Posts: 1,129
Threads: 42
Joined: Dec 2012
Reputation: 49
#1
Bug  Little tool to list textures from .DAE

[Image: attachment.php?aid=4600]

Download (Mediafire)

As you see it makes a little list of all the textures that a .dae wants to work properly.
You can use it to know which files you need to include along with the model. E.g when you're importing assets from AMFP.
You can double-click a material from the list to copy the name to your clipboard so you can do a search ctrl+f in windows or whatever.


Attached Files
.jpg   53e6wav.jpg (Size: 16.86 KB / Downloads: 407)

08-06-2014, 03:24 PM
Find
DnALANGE Offline
Banned

Posts: 1,549
Threads: 73
Joined: Jan 2012
#2
RE: Little tool to list textures from .DAE

Smart little smartass!
Nice job man!
08-06-2014, 11:20 PM
Find
Daemian Offline
Posting Freak

Posts: 1,129
Threads: 42
Joined: Dec 2012
Reputation: 49
#3
RE: Little tool to list textures from .DAE

Big hug my bro xD
Make more mods plz.

08-07-2014, 12:17 AM
Find
Mudbill Offline
Muderator

Posts: 3,881
Threads: 59
Joined: Apr 2013
Reputation: 179
#4
RE: Little tool to list textures from .DAE

How does it list the .mat files? They aren't directly associated with each other. Did you just replace the extension with .mat?

Could you maybe add an input box so it'd be easy to also change the texture within it? I find that I edit the texture names a lot, especially when duplicating models or exporting several copies.

08-07-2014, 12:34 AM
Find
Daemian Offline
Posting Freak

Posts: 1,129
Threads: 42
Joined: Dec 2012
Reputation: 49
#5
RE: Little tool to list textures from .DAE

(08-07-2014, 12:34 AM)Mudbill Wrote: How does it list the .mat files? They aren't directly associated with each other. Did you just replace the extension with .mat?

Could you maybe add an input box so it'd be easy to also change the texture within it? I find that I edit the texture names a lot, especially when duplicating models or exporting several copies.
Hey Mud. Yes, that's what it does. It filters the string to return what Amnesia wants, texture name+.mat. From there, you can locate that .mat and its textures and do whatever you were doing with that model.
If you were importing a chair from AMFP, you can check inside the .dae which materials you need.

An input box -and other stuff- would be great, but I don't know if I saved the vb project, I gotta check. I thought you had mac, did it work there? Or you had to do something?

08-08-2014, 02:52 AM
Find
Mudbill Offline
Muderator

Posts: 3,881
Threads: 59
Joined: Apr 2013
Reputation: 179
#6
RE: Little tool to list textures from .DAE

I frequently jump between Windows and Mac via Boot Camp. This last month I've mostly been using Windows when making the Java app.

Since this is an .exe file, it won't run on a Mac, no. What did you make this in? Visual Basic?

08-08-2014, 01:01 PM
Find
Daemian Offline
Posting Freak

Posts: 1,129
Threads: 42
Joined: Dec 2012
Reputation: 49
#7
RE: Little tool to list textures from .DAE

I see. Yes, vb6.

Spoiler below!
PHP Code: (Select All)
Private Sub GetFileListFromFile(sFile As String)


Dim sContent As String
Dim sExt 
As String
Dim sMatchStart 
As Long
Dim sMatchEnd 
As Long
Dim lContentStart 
As Long

 Open sFile 
For Input As #1
 
sContent Input$(LOF(1), 1)

Do 
Until Len(sContent) = 0
                
                    
'looks for file tags
                    sMatchStart = InStr(1, sContent, "<init_from>")
                    sMatchEnd = InStr(1, sContent, "</init_from>")
                    
                    '
saves where match was foundto remove later
                    lContentStart 
sMatchEnd Len("</init_from>")
                    
                    
'if tags were found
                    If sMatchStart > 0 And sMatchEnd > 0 Then
                        
                        '
get the file path
                        sMatchStart 
sMatchStart Len("<init_from>")
                        
sFileName Mid(sContentsMatchStartsMatchEnd sMatchStart)
                    
                        
'determines which slash is used
                        sMatchStart = InStrRev(sFileName, "/", -1)
                        sMatchEnd = InStrRev(sFileName, "\", -1)
                        
                        sMatchStart = IIf(sMatchStart > sMatchEnd, sMatchStart, sMatchEnd)
                        
                        '
slashes found in the path
                        
If sMatchStart 0 Then
                            
'takes only the file name, starting from the first slash+1
                            sFileName = Mid(sFileName, sMatchStart + 1, Len(sFileName))
                        Else
                        End If
                            
                        '
locates a char for extension
                        sMatchStart 
InStrRev(sFileName".", -1)
                        
                        
'. found, remove extension
                        If sMatchStart > 0 Then
                            sFileName = Mid(sFileName, 1, sMatchStart - 1)
                            
                            '
adds .mat
                            sFileName 
sFileName ".mat"
                            
                            'adds it to the list
                            List1.AddItem sFileName
                        Else
                            '
no point foundfile may not have extensionadd to list anyways
                            List1
.AddItem sFileName
                        End 
If
                        

                    Else
                        
'no more tags were found
                        '
stops reading file
                        sContent 
""
                    
                    
End If
                    
                    
'remove from content var all previous content before the match
                    sContent = Mid(sContent, lContentStart, Len(sContent))
                       
Loop

Close #1
                
End Sub 


(This post was last modified: 08-08-2014, 04:07 PM by Daemian.)
08-08-2014, 04:03 PM
Find
Mudbill Offline
Muderator

Posts: 3,881
Threads: 59
Joined: Apr 2013
Reputation: 179
#8
RE: Little tool to list textures from .DAE

I really don't know anything about Visual Basic. Looks strange to me xD

Well, VB is a Microsoft language, so that's that.

08-08-2014, 04:58 PM
Find




Users browsing this thread: 1 Guest(s)