psd>><mental>>images


#1

a simple set of scripts for photoshop to export your current document directly to the mentalimages imf_copy utility. it support also .psd to be translated on the fly, copy to all the host involved into the net for instant tests on DR, and a mass converter to get a whole folder out to .map pictures.
I added the maya imf_copy path, the chance to append any format to the imf_copy, alpha support and a more robust file checking for hosts failures.


**

ciao
francesca


#2

Obrigado=Thank you Francesca:)


#3

Great! Thanks!

:thumbsup:


#4

Anybody got this working?

I always get =

Script: C:\Program Files\Adobe\Photoshop CS\Presets\Scripts opmap\wshRun-imf_copy.vbs
Line: 200
Char: 4
Error: the system cannot find the file specified.
Code: 80070002

I just cant figure it out:)
Thanx


#5

Anybody got this working?

indeed… me !! and every time I run it !! :slight_smile:

just cant figure it out:)

it is simply that it cannot find the imf_copy executable.
did you read first the instruction and so ran first the
ExportMemoryMapSettings ?

ciao
francesca


#6

is their any chance this script would work with ps 7 ?
i didn’t find preset -> scritps…


#7

as long it has a script folder it will work by
pointing to that folder the .js script. I’m
assuming that psd7 is using the same object
model of CS, but I’m not sure about this.

francesca


#8

thx francesce.
it don’t have script folder…i have CS 1 but it needs more ram to open the same file that ps 7 do…when it comes to about 60 mb files it don’t open them…ps 7 do:shrug: i think i’ll go back to CS…


#9

Yeb I ran it and I can run the imf_copy from anywhere through commandline.
The imf_copy path is = c:\program files\alias\maya6.5
just the normal one and it gives me that the path is ok

thanx for the reply


#10

This is just amazing, exactly what I was looking for. I hate cmd and things like that. Thanks a lot!

But of course I’m failing and I get the same result as “Shine77”.

Script: C:\Program Files\Adobe\Photoshop CS\Presets\Scripts opmap\wshRun-imf_copy.vbs
Line: 200
Char: 4
Error: the system cannot find the file specified.
Code: 80070002

All the paths seems to be ok (at least it says so) so I can’t understand whats wrong.

But it does write a file, a .tif file (even though I choose .map and I get an error massage)

I have tried to force convert the .tif file simply by changing the extension to .map and It seems to work. At least I can render the image, but I don’t know if the file benefits from the .map features.

Anyhow, if someone knows how to fix this I would be very grateful.


#11

well check manually the path the script is using.

open your winexplorer and rightclick on MyComputer
selecting Properties, then goto the Advanced tab and
click EnvironmentVariables. on the UserVariablesFor..
find the IMF_DIR and look if it has a slash \  at the end.
if not add it.

dunno why it is not working for you directly from the
MemoryMapSetting script as it checks automatically
for the slash at the end, I recently installed CS2 and
did the usual procedure for myself too and no problems
at all nor I can replicate your problem actually. btw 
try the above  solution it should fix it.


ciao
francesca

#12

I hunted that problem down: it’s the spaces in your folder names. If there is any in your maya installation directory (like C:\Program Files\Alias\Maya6.5), it wont find the file.

Temporary solution: put the imf_ tools into any directory that has no blank spaces, like ‘C: emp\imf_disp\bin’. The ‘bin’ is important because the script searches for a subfolder called bin.

Trust me, it works! Thanks Francesca! :slight_smile:

edit: When using the ‘Export Memory Map Settings’ from within photoshop, simply point it to, for example ‘C: emp\imf_disp’ - not to ‘C: emp\imf_disp\bin’


#13

great as awlayes francesca :thumbsup:
I wounder if ther is a command that you can do to run the conversion to an entire folder


#14

thx floze for the bug fixing. I will fix it in a near future.

I wonder if ther is a command that you can do to run the conversion to an entire folder
ashaiad, did you try to look just down the ExportMemoryMapImage script ?
if I understand what you mean the ExportMemoryMapMass should do the trick…
converting a whole folder of valid images to .map files.

ciao
francesca


#15

thanks for the reply

Iwas looking ofr a way to do it in Dos

I found it
imf_copy -v -p %q c:\files%q.map map

thaks aywas, great tool


#16

take a look at the mass_converter.vbs, it uses windows script host to
get a folder and a collection of images to get passed to the imf_disp.

'get folder object and files collection
    	Set oFolder = filesys.GetFolder(nFolder)  
    	Set fColl = oFolder.Files 
    	
    
    'the collection
    	i = 0
    	t1 = Timer
    	For Each f in fColl	
    		fullName = f.name 		
 		fExt = chkExt(fullName)			
    		If Not fExt = "mmh" Then 
 		 realName = Left (fullName, InStrRev(fullName,".")-1) 		
    			   
    			inFile = ckSlash(nFolder) & fullName
 			outFile = ckSlash(outFolder) & realName & ".map"
    
    			'invoke the imf_copy for each image
  		return = oShell.run (pImfCopy & "imf_copy " & strFlags & " " _ 
 			& """" & inFile & """" & " " & """" & outFile & """", 0 , true)
    				
 			If Not return = 0 Then	'imf_copy closed with errors
 			MsgBox "Errors occurred for " & inFile, 32, "Info"	
    			Else		 
 			i = i+1 		 		
    			End If
    			
    		End If 
    	Next
    	t2 = Timer	
    	t1 = t2-t1
    	MsgBox "Converted " & i & " files over " & e &", in " & ForMAtnUMBER(t1) & _ 
    		" secs", 32, "Info"
you then need just a javascript file that will be engaged from psd to launch the vbs
back script... that means you can also double click the vbs file and use it as a .bat file,

the .vbs is not related to psd in this case. the conclusion is… don’t use .bat files with dos
cmds where wsh is more clear and effective.

ciao
francesca

#17

No doubt that it’s way more flexible and effective, but this little .bat did a very good job for me so far:

:convertfile
@IF %1 == "" GOTO end
imf_copy -p %1 "%~d1%~p1%~n1.map"
@SHIFT
@GOTO convertfile
:end
@ECHO.
@ECHO Done!
@pause

Original by Daniel Rind.

Copy and paste the above code into a blank textfile and rename the extension to .bat - then drag and drop any texture onto the .bat file’s icon. The converted files will be in the same folder as the original textures.


#18

it is great tip to know…

Thanks for sharing.


#19

again thanks francesca.


#20

unfortunatly i get the same problem as the others, tryed placing imf_copy in the main maya 7 folder, didn’t help, tryed putting it in folder with no spaces, tryed renaming it from imf_copy to Imf_copy just in case it was case sensitive. No luck. v.strange using cs2 if that helps