Splitting Selections maintaining Point Order
Posted: 15 May 2019 10:29 AM   [ Ignore ]  
Avatar
Total Posts:  54
Joined  2012-05-02

Hello,
I’m trying to combine UVW tags so I can use one texture for several objects. I have found a method that is successful:

1. Run the Connect command on the objects
2. Run the UVCommand “Realign”
3. Separate the objects
4. Copy the UVW tag of the separated object to the original object

I’m trying to write a script that does this. The trouble comes with step 3: Separate the objects. When I use the “Polygon Groups to Objects” command, this method works.
Polygon Groups to Objects

Often, though, I don’t want to explode the object into smaller objects; I just want to realign the existing UV islands and keep the polygon groups as one object. So I tried a different method: connecting them with polygon Selection Tags for each object, selecting each object with a Selection Tag, then running the Split modeling command.

For some reason, Split seems to rearrange the points, because when I drag the split object’s UVW tag to the original geometry, many of the points jump to the same UV position [0,0].
Splitting Polygon Selections

Can you please help me separate objects using Selection Tags (or another method) without separating all the polygon groups while maintaining the point order so I can copy the UVW tag to the original object? My scene file is attached.

Thank you!

File Attachments
Connect.zip  (File Size: 446KB - Downloads: 18)
Profile
 
 
Posted: 15 May 2019 11:42 AM   [ Ignore ]   [ # 1 ]  
Moderator
Avatar
Total Posts:  6859
Joined  2011-03-04

Hi blastframe,

Isn’t that in a nutshell what you do with the Paint Setup Wizard in BodyPaint3D: Single Material Mode?

https://help.maxon.net/us/#11569

Example (screen-capture)
https://www.amazon.com/clouddrive/share/InFrHjtYqS8yBRSDMKoRB0TRDm0lfjcapqzdTVIxtKI

All the best

 Signature 

Dr. Sassi V. Sassmannshausen Ph.D.

Photography For C4D Artists: 200 Free Tutorials: Texture, Panorama, HDRI, Camera Projection, etc.
https://www.youtube.com/user/DrSassiLA/playlists

Profile
 
 
Posted: 15 May 2019 12:24 PM   [ Ignore ]   [ # 2 ]  
Avatar
Total Posts:  54
Joined  2012-05-02
Dr. Sassi - 15 May 2019 11:42 AM

Hi blastframe,

Isn’t that in a nutshell what you do with the Paint Setup Wizard in BodyPaint3D: Single Material Mode?

https://help.maxon.net/us/#11569

All the best

Thank you, Dr. Sassi.

Yes, you’re right! This is a good solution, however, it does create an unwanted material (I’ll be using Octane) and takes a few clicks to setup. I was hoping for a method I could script for a one-click solution.

Thank you for getting this functional! It may end up being the way forward.

Profile
 
 
Posted: 15 May 2019 12:31 PM   [ Ignore ]   [ # 3 ]  
Moderator
Avatar
Total Posts:  6859
Joined  2011-03-04

You’re welcome, blastframe.

It has by itself the functionally to select the objects in question.

Here is the only script line I could retrieve from it.

Cheers

#

import c4d
#Welcome to the world of Python

def main():
  c4d.CallCommand(170625) # Paint Setup Wizard


if __name__==‘__main__’:
  main()
  c4d.EventAdd()

 Signature 

Dr. Sassi V. Sassmannshausen Ph.D.

Photography For C4D Artists: 200 Free Tutorials: Texture, Panorama, HDRI, Camera Projection, etc.
https://www.youtube.com/user/DrSassiLA/playlists

Profile
 
 
Posted: 15 May 2019 12:41 PM   [ Ignore ]   [ # 4 ]  
Avatar
Total Posts:  54
Joined  2012-05-02

Thank you for your help, Dr. Sassi!

Profile
 
 
Posted: 15 May 2019 01:04 PM   [ Ignore ]   [ # 5 ]  
Moderator
Avatar
Total Posts:  6859
Joined  2011-03-04

Thanks for the feedback, blastframe.

 Signature 

Dr. Sassi V. Sassmannshausen Ph.D.

Photography For C4D Artists: 200 Free Tutorials: Texture, Panorama, HDRI, Camera Projection, etc.
https://www.youtube.com/user/DrSassiLA/playlists

Profile