Re: Scripting copy pasting of UV sets?
You bet, Simon. Fixed some 5000+ texture copy paste operations for me :) BIG thanks! Morten Den 17. marts 2015 kl. 15:22 skrev Simon Reeves si...@simonreeves.com: You're welcome hope it was useful! Simon Reeves London, UK si...@simonreeves.com mailto:si...@simonreeves.com www.simonreeves.com http://www.simonreeves.com www.analogstudio.co.uk http://www.analogstudio.co.uk On 17 March 2015 at 11:24, Morten Bartholdy x...@colorshopvfx.dk mailto:x...@colorshopvfx.dk wrote: Wow, thanks Simon and Eric. You guys are awesome :) Cheers Morten Den 16. marts 2015 kl. 14:29 skrev Eric Thivierge ethivie...@hybride.com mailto:ethivie...@hybride.com : and run. Hopefully your objects are numbered sequentially starting from 0 and up and doesn't have number padding. # Python si = Application for i in xrange(si.Selection.Count): si.CopyUVW(Alembic_tiles1.Cube_new_ + str(i) + .polymsh.cls.Texture_Coordinates_AUTO.Texture_Proj_Global, Alembic_tiles1.Cube_new_ + str(i) + .sample[*]) si.PasteUVW(Alembic_tiles.Cube_new_ + str(i) + .polymsh.cls.Texture_Coordinates_AUTO.Texture_Projection_Global, Alembic_tiles.Cube_new_ + str(i) + .sample[*], siDefaultPasteUVsMode) Hope that gets you closer. Eric T. On 3/16/2015 6:39 AM, Morten Bartholdy wrote: I have some alembic files with 2100 individual objects which need a new set of UV's. I would like to copy a particular UV set from an identical set of geometry which is not animated (so I could make an XZ projection) onto the animated set of geometry. I suspect this calls for a script that goes through the naming: geo_01 with UV_01 and copying and pasting. In the Script Editor it looks like this for one particular object: Application.CopyUVW(Alembic_tiles1.Cube_new_2.polymsh.cls.Texture_Coordinates_AUTO.Texture_Proj_Global, Alembic_tiles1.Cube_new_2.sample[*]) Application.PasteUVW(Alembic_tiles.Cube_new_2.polymsh.cls.Texture_Coordinates_AUTO.Texture_Projection_Global, Alembic_tiles.Cube_new_2.sample[*], siDefaultPasteUVsMode) How can I make these scriptlines go through 2100 files? Cheers Morten
Re: Scripting copy pasting of UV sets?
Wow, thanks Simon and Eric. You guys are awesome :) Cheers Morten Den 16. marts 2015 kl. 14:29 skrev Eric Thivierge ethivie...@hybride.com: and run. Hopefully your objects are numbered sequentially starting from 0 and up and doesn't have number padding. # Python si = Application for i in xrange(si.Selection.Count): si.CopyUVW(Alembic_tiles1.Cube_new_ + str(i) + .polymsh.cls.Texture_Coordinates_AUTO.Texture_Proj_Global, Alembic_tiles1.Cube_new_ + str(i) + .sample[*]) si.PasteUVW(Alembic_tiles.Cube_new_ + str(i) + .polymsh.cls.Texture_Coordinates_AUTO.Texture_Projection_Global, Alembic_tiles.Cube_new_ + str(i) + .sample[*], siDefaultPasteUVsMode) Hope that gets you closer. Eric T. On 3/16/2015 6:39 AM, Morten Bartholdy wrote: I have some alembic files with 2100 individual objects which need a new set of UV's. I would like to copy a particular UV set from an identical set of geometry which is not animated (so I could make an XZ projection) onto the animated set of geometry. I suspect this calls for a script that goes through the naming: geo_01 with UV_01 and copying and pasting. In the Script Editor it looks like this for one particular object: Application.CopyUVW(Alembic_tiles1.Cube_new_2.polymsh.cls.Texture_Coordinates_AUTO.Texture_Proj_Global, Alembic_tiles1.Cube_new_2.sample[*]) Application.PasteUVW(Alembic_tiles.Cube_new_2.polymsh.cls.Texture_Coordinates_AUTO.Texture_Projection_Global, Alembic_tiles.Cube_new_2.sample[*], siDefaultPasteUVsMode) How can I make these scriptlines go through 2100 files? Cheers Morten
Re: Scripting copy pasting of UV sets?
You're welcome hope it was useful! Simon Reeves London, UK *si...@simonreeves.com si...@simonreeves.com* *www.simonreeves.com http://www.simonreeves.com* *www.analogstudio.co.uk http://www.analogstudio.co.uk* On 17 March 2015 at 11:24, Morten Bartholdy x...@colorshopvfx.dk wrote: Wow, thanks Simon and Eric. You guys are awesome :) Cheers Morten Den 16. marts 2015 kl. 14:29 skrev Eric Thivierge ethivie...@hybride.com: Select all of the original meshes and run. Hopefully your objects are numbered sequentially starting from 0 and up and doesn't have number padding. # Python si = Application for i in xrange(si.Selection.Count): si.CopyUVW(Alembic_tiles1.Cube_new_ + str(i) + .polymsh.cls.Texture_Coordinates_AUTO.Texture_Proj_Global, Alembic_tiles1.Cube_new_ + str(i) + .sample[*]) si.PasteUVW(Alembic_tiles.Cube_new_ + str(i) + .polymsh.cls.Texture_Coordinates_AUTO.Texture_Projection_Global, Alembic_tiles.Cube_new_ + str(i) + .sample[*], siDefaultPasteUVsMode) Hope that gets you closer. Eric T. On 3/16/2015 6:39 AM, Morten Bartholdy wrote: I have some alembic files with 2100 individual objects which need a new set of UV's. I would like to copy a particular UV set from an identical set of geometry which is not animated (so I could make an XZ projection) onto the animated set of geometry. I suspect this calls for a script that goes through the naming: geo_01 with UV_01 and copying and pasting. In the Script Editor it looks like this for one particular object: Application.CopyUVW(Alembic_tiles1.Cube_new_2.polymsh.cls.Texture_Coordinates_AUTO.Texture_Proj_Global, Alembic_tiles1.Cube_new_2.sample[*]) Application.PasteUVW(Alembic_tiles.Cube_new_2.polymsh.cls.Texture_Coordinates_AUTO.Texture_Projection_Global, Alembic_tiles.Cube_new_2.sample[*], siDefaultPasteUVsMode) How can I make these scriptlines go through 2100 files? Cheers Morten
Re: Scripting copy pasting of UV sets?
Select all of the original meshes and run. Hopefully your objects are numbered sequentially starting from 0 and up and doesn't have number padding. # Python si = Application for i in xrange(si.Selection.Count): si.CopyUVW(Alembic_tiles1.Cube_new_ + str(i) + .polymsh.cls.Texture_Coordinates_AUTO.Texture_Proj_Global, Alembic_tiles1.Cube_new_ + str(i) + .sample[*]) si.PasteUVW(Alembic_tiles.Cube_new_ + str(i) + .polymsh.cls.Texture_Coordinates_AUTO.Texture_Projection_Global, Alembic_tiles.Cube_new_ + str(i) + .sample[*], siDefaultPasteUVsMode) Hope that gets you closer. Eric T. On 3/16/2015 6:39 AM, Morten Bartholdy wrote: I have some alembic files with 2100 individual objects which need a new set of UV's. I would like to copy a particular UV set from an identical set of geometry which is not animated (so I could make an XZ projection) onto the animated set of geometry. I suspect this calls for a script that goes through the naming: geo_01 with UV_01 and copying and pasting. In the Script Editor it looks like this for one particular object: Application.CopyUVW(Alembic_tiles1.Cube_new_2.polymsh.cls.Texture_Coordinates_AUTO.Texture_Proj_Global, Alembic_tiles1.Cube_new_2.sample[*]) Application.PasteUVW(Alembic_tiles.Cube_new_2.polymsh.cls.Texture_Coordinates_AUTO.Texture_Projection_Global, Alembic_tiles.Cube_new_2.sample[*], siDefaultPasteUVsMode) How can I make these scriptlines go through 2100 files? Cheers Morten
Re: Scripting copy pasting of UV sets?
Try this, you need to change name of source object and it's UVs as its quick and dirty http://pastebin.com/GfuSYWe8# Simon Reeves London, UK *si...@simonreeves.com si...@simonreeves.com* *www.simonreeves.com http://www.simonreeves.com* *www.analogstudio.co.uk http://www.analogstudio.co.uk* On 16 March 2015 at 10:39, Morten Bartholdy x...@colorshopvfx.dk wrote: I have some alembic files with 2100 individual objects which need a new set of UV's. I would like to copy a particular UV set from an identical set of geometry which is not animated (so I could make an XZ projection) onto the animated set of geometry. I suspect this calls for a script that goes through the naming: geo_01 with UV_01 and copying and pasting. In the Script Editor it looks like this for one particular object: Application.CopyUVW(Alembic_tiles1.Cube_new_2.polymsh.cls.Texture_Coordinates_AUTO.Texture_Proj_Global, Alembic_tiles1.Cube_new_2.sample[*]) Application.PasteUVW(Alembic_tiles.Cube_new_2.polymsh.cls.Texture_Coordinates_AUTO.Texture_Projection_Global, Alembic_tiles.Cube_new_2.sample[*], siDefaultPasteUVsMode) How can I make these scriptlines go through 2100 files? Cheers Morten
Scripting copy pasting of UV sets?
I have some alembic files with 2100 individual objects which need a new set of UV's. I would like to copy a particular UV set from an identical set of geometry which is not animated (so I could make an XZ projection) onto the animated set of geometry. I suspect this calls for a script that goes through the naming: geo_01 with UV_01 and copying and pasting. In the Script Editor it looks like this for one particular object: Application.CopyUVW(Alembic_tiles1.Cube_new_2.polymsh.cls.Texture_Coordinates_AUTO.Texture_Proj_Global, Alembic_tiles1.Cube_new_2.sample[*]) Application.PasteUVW(Alembic_tiles.Cube_new_2.polymsh.cls.Texture_Coordinates_AUTO.Texture_Projection_Global, Alembic_tiles.Cube_new_2.sample[*], siDefaultPasteUVsMode) How can I make these scriptlines go through 2100 files? Cheers Morten