problem with cutcopypaste.mel

problem with cutcopypaste.mel

Federico552
Participant Participant
2,539 Views
4 Replies
Message 1 of 5

problem with cutcopypaste.mel

Federico552
Participant
Participant

Hi, i'm using maya 2018. When i try to copy and paste an object, I obtain this errors:

// pSphere1 polySphere1 //
// Error: file: F:/fle vari/programmi/Maya2018/scripts/startup/cutCopyPaste.mel line 75: No translator could be found to read the file ''. //
// File read in  0.00061 seconds.
// File read in  0.00061 seconds.
// Error: file: F:/fle vari/programmi/Maya2018/scripts/startup/cutCopyPaste.mel line 75: Error reading file. //

and it doesn't paste the object. What should I do?

0 Likes
2,540 Views
4 Replies
Replies (4)
Message 2 of 5

chaneyx
Advocate
Advocate

Are you cut and pasting an object within the same scene? 

 

Alternatively you can use cmd-D for Duplicate. 

0 Likes
Message 3 of 5

Federico552
Participant
Participant

I've tried either to cut and paste an object in the same scene and in a new one, but, when I've tried to paste I obtained the error reported above. I need to copy and paste object from one scene to another, using ctrl+d I cannot do it.

0 Likes
Message 4 of 5

chaneyx
Advocate
Advocate

When you cut and paste Maya is exporting to a temp folder, saves the temp folder/file name, and re-imports it. 

 

Depending on your OS, this will be handled differently. This sort of thing can be messed up if they do not support spaces in directory names, or the programmer assumes a certain drive always exists, etc. 

 

You can find out where they are trying to save it by entering the following MEL 

getenv TMPDIR

 

But I personally would only use "Duplicate" when copying within the scene and File->export/File->import when doing it between scenes. 

 

If you use the File->export/import idea, you may get some things that you do not expect at first such as the object name being changed by namespaces. But if you fiddle with the options you should be able to reproduce the Copy/Paste functionality. 

0 Likes
Message 5 of 5

chaneyx
Advocate
Advocate

With a quick read of the script cutCopyPaste.mel, I believe these are the options. There should be equivalent checkboxes in the UI file->import/export options  

 

// export selected nodes
file -force
-exportSelected
-constructionHistory true
-channels true
-expressions true
-constraints true
-shader true
-type $fileType
$filePath;

 

// import scene
string $newTransforms[] = `file -force
-import
-renameAll true
-renamingPrefix "pasted_"
-groupReference
-returnNewNodes
$filePath`;

0 Likes