headus 3D tools headus 3D tools / 3D scans
Support Forums
 
 FAQFAQ   SearchSearch    UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
headus 3D scans

Working with multiple UV sets in Maya

 
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
SEVEZ



Posts: 1
Joined: 11 Apr 2015

PostPosted: Sat Apr 11, 2015 3:59 am    Post subject: Working with multiple UV sets in Maya Reply with quote

Maya plugin currently doesn't support multiple uv sets, which is obviously not good. Although plugin takes care of construction history (via polyTransfer node), it simply kills all other uv sets on the mesh. So I tried to workaround this limitation - at least for myself and share my solution here. It is not perfect, because the history has to be deleted in order to keep multiple uv sets.

So, in file uvlayout_open.mel comment the line 708:

Code:
// polyTransfer -uv 1 -ao $uvlayout_imported[ $uvlayout_imported_num] $object;


and paste below the following code block:
Code:

select -r $uvlayout_imported[ $uvlayout_imported_num];
string $suv[] = `polyUVSet -q -cuv`;

select -r $object;
string $tuv[] = `polyUVSet -q -cuv`;

select -r $uvlayout_imported[ $uvlayout_imported_num];
select -add $object;

transferAttributes -pos 0 -nml 0 -uvs 1 -suv $suv[0] -tuv $tuv[0] -col 0 -spa 5 -sus $suv[0] -tus $tuv[0] -sm 3 -fuv 0 -clb 1 ;

select -r $object;
DeleteHistory;


The idea is to copy edited uvs only to current uv set using transferAttributes, instead of polyTransfer. This code can be improved by duplicating the target object, transferring attributes to it (to preserve uv sets) and then using polyTransfer node to copy uvs to the original target model (to keep history). But unfortunately I couldn't find a proper way to copy target object without its child nodes. If someone has ideas on how to do it - then would be great to know it ))

Hope it will help someone with similar problems.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group