Jump to content
3D Coat Forums
ajz3d

[SCRIPT] ajz_copyToSculptRoom

Recommended Posts

ajz_copyToSculptRoom

WHAT IT DOES?: The script will copy mesh from Paint Room to Sculpt Room.

HOW DO I USE IT?: If you have a mesh in the Paint Room that you want to import to Sculpt Room, select ScriptsCopy Object to Sculpt Room. This will automatically switch rooms to Paint Room and open Export Model dialog window, where you can choose which mesh resolution you want to export. You may want not to export textures as they will not be imported to Sculpt Room anyway. After clicking OK, you'll be taken to Sculpt Room with a dialog of an Import Tool opened and the model loaded up. Choose your import options and Apply or press 'Enter'.

 

There are some customisable options that you can edit. See the ajz_copyToSculptRoom.txt file for more info. I don't recommend changing them, unless it is necessary.

 



INSTALLATION:
1. Unpack both files to %USERPROFILE%/Documents/Scripts/ExtraMenuItems/.

2. Start 3D Coat.
3. You will find the script in Scripts→Copy Object to Sculpt Room.

KNOWN PROBLEMS: The first time you start the script, it might happen that it won't load the mesh into Import Tool. If this happens, launch the script again. After this, you shouldn't have any more problems with it. FIXED

The script was tested under Windows operating system only. Linux and Mac users should probably change path delimiter character inside TEMP_PATH string (See the ajz_copyToSculptRoom.txt file for more info)

 

The script might not work properly on some earlier 3D Coat versions. If you notice that it doesn't automatically enter the Import Tool (Merge Tool in older versions), open the script file and change the:

cmd("$[Page4]Import");

line to:

cmd("$[Page4]Merge");

You probably will need to do it if you're using the latest stable version.

 

DOWNLOAD: ajz_copyToSculptRoom_v1.01.zip

Edited by carlosan
  • Like 2

Share this post


Link to post
Share on other sites

Very cool! :good: Finally got it to work, but for some reason, if I run the script from the Paint Module, it moves the user to the Sculpt Module, but nothing else. However, if I run it from the Sculpt Room, it works.

Share this post


Link to post
Share on other sites

So, to clarify...I have to initiate the script from the Paint Module (if I try it directly in the Sculpt module, it sends me back to the Paint Module... :blink: ?) > run it a 2nd time from the Sculpt module.

Share this post


Link to post
Share on other sites

So, to clarify...I have to initiate the script from the Paint Module (if I try it directly in the Sculpt module, it sends me back to the Paint Module... :blink: ?) >

The script switches to Paint Room, because it is one of the rooms in which Export Model command is accessible from. Generally, with cmd (string &in ID) you cannot access something that is not available in a given room, hence the automatic switch to Paint Room.

If you don't like it, you can remove the whole if condition to prevent this from happening:

  if(!IsInRoom("Paint")){
    ToRoom("Paint");
  }
But if you do this, then running the script from Sculpt and Retopo rooms will have no effect at all. You'll have to manually switch to any of the other rooms first.

run it a 2nd time from the Sculpt module.

I'm not sure what you mean. Why would you need to run it twice (apart of a known problem I mentioned in the first post)? Could you perhaps record a video depicting the issue? It would help me to understand what is going on. Edited by ajz3d

Share this post


Link to post
Share on other sites

I just thought it switching to the Paint Workspace was an unintended function. That's why I brought it up. It's weird. After the first attempt...sometimes two or three attempts = nothing. Then I try a 4th time and it works. Strange

Share this post


Link to post
Share on other sites

I just thought it switching to the Paint Workspace was an unintended function. That's why I brought it up.

Unfortunately I cannot do anything about it. That's how 3D Coat works. If Export Model command could be called from any room, there would be no need for room switching just to make that command available to the script.

 

It's weird. After the first attempt...sometimes two or three attempts = nothing. Then I try a 4th time and it works. Strange

This is strange indeed. The script is so short that I can't even think of a place where I could have made a mistake. It's basically just a short sequence of instructions. The script works for me every time I run it, even when I copy complex objects.

Have you tried running it with default 3D Coat preferences?

 

Carlos tested it yesterday and he said, that only when he started the script for the first time, it didn't load the mesh into the Import Tool. That's why I mentioned it in Known problems. Other tests, he said, were successful.

Edited by ajz3d

Share this post


Link to post
Share on other sites

Sort of obsolete because since 3DC devs implemented "Pick from Retopo" into Sculpt Room's Import tool and Use Visible Paint Objects as Retopo in the retopo room, we can now move paint objects from paint room to sculpt room via retopo room.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×