Like in asset browser: Missing, Network, OK, Found etc
Forum topic · General Scripting
DETECT THE STATUS OF THE TEXTURES
By artrender · 2013-02-25
Forum topic · General Scripting
By artrender · 2013-02-25
Like in asset browser: Missing, Network, OK, Found etc
Comments (16)
Comment policy
SOLVED
Thx all who participated!
THE ONLY DIFFERENCE BETWEEN THESE 2 FUNCTIONS
the only difference, there is doesFileExist function which will skip textures that can actually return #Found (such as the ones that have no path and those where the path is wrong but the file itself is in the (sub)folder of the folder the maxfile is inside)
but the problem is with
IN THIS FUNCTION
it was array with the textures
ERROR
I get this error
Attachments
Yep. I don't know what's bitmaps_for_selection.
Array variable or something else?
I edited last fn
EVEN TONS OF IFs don't help
anyway UNKNOWN
THANKS A LOT
BUT ANYWAY I get
#(#UNKNOWN)
#(#UNKNOWN)
#(#UNKNOWN)
In asset tracking I don't have UNKNOWN at all
BUT THIS FUNCTION IS WORKING
I don't know what's the problem!
I clean up code a bit
fn getmapsfromselection bmpForSel:&bitmaps_for_selection = if selection.count != 0 do
(
for s in selection where s.material != null do
(
newbitmaps = getclassinstances Bitmaptexture target:s.material
if newbitmaps.count != 0 do
(
for b in newbitmaps where (finditem bmpForSel b == 0) do append bmpForSel b
--or u can use this : for b in newbitmaps do appendIfUnique bmpForSel b
)
if bmpForSel.count != 0 do
(
for m in bmpForSel where doesFileExist m.filename do
(
mystatus = ATSOps.GetFileSystemStatus (m.filename)
format "%\n" mystatus
)
)
)
)
also UNKNOWN
gives unknown as well
I get UNKNOWN STATUS, and don't know why
I'm not in front of my PC.
When you check bitmap path is better to use
if doesFileExist m.filename do ...
hmm
you mean instead of
????
In this thread maybe you can find how to use ATSOps.GetFileSystemStatus
http://forums.cgsociety.org/archive/index.php/t-986134.html
error
ATSOps.GetFileSystemStatus m.filename
Attachments