A new version of Cineversity has been launched. This legacy site and its tutorials will remain accessible for a limited transition period

Visit the New Cineversity
   
 
Splitting Selections maintaining Point Order
Posted: 15 May 2019 02:29 AM   [ Ignore ]  
Avatar
Total Posts:  80
Joined  2012-05-01

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 03:42 AM   [ Ignore ]   [ # 1 ]  
Administrator
Avatar
Total Posts:  12043
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.
Cinema 4D Mentor since 2004
Maxon Master Trainer, VES, DCS

Photography For C4D Artists: 200 Free Tutorials.
https://www.youtube.com/user/DrSassiLA/playlists

NEW:

NEW: Cineversity [CV4]

Profile
 
 
Posted: 15 May 2019 04:24 AM   [ Ignore ]   [ # 2 ]  
Avatar
Total Posts:  80
Joined  2012-05-01
Dr. Sassi - 15 May 2019 03: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 04:31 AM   [ Ignore ]   [ # 3 ]  
Administrator
Avatar
Total Posts:  12043
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.
Cinema 4D Mentor since 2004
Maxon Master Trainer, VES, DCS

Photography For C4D Artists: 200 Free Tutorials.
https://www.youtube.com/user/DrSassiLA/playlists

NEW:

NEW: Cineversity [CV4]

Profile
 
 
Posted: 15 May 2019 04:41 AM   [ Ignore ]   [ # 4 ]  
Avatar
Total Posts:  80
Joined  2012-05-01

Thank you for your help, Dr. Sassi!

Profile
 
 
Posted: 15 May 2019 05:04 AM   [ Ignore ]   [ # 5 ]  
Administrator
Avatar
Total Posts:  12043
Joined  2011-03-04

Thanks for the feedback, blastframe.

 Signature 

Dr. Sassi V. Sassmannshausen Ph.D.
Cinema 4D Mentor since 2004
Maxon Master Trainer, VES, DCS

Photography For C4D Artists: 200 Free Tutorials.
https://www.youtube.com/user/DrSassiLA/playlists

NEW:

NEW: Cineversity [CV4]

Profile