Notifications
Clear all

[Closed] texture synchronize with Maxscript

Hi guys!

Since I am an artist, an my programming knowledge its not so big I need a hand there.

Would it be possible to make a texture synchronize with maxscript?

Where I work we use a server where all the workers we share the textures, but I like to work in a local way, so I can take some advantages but I have to check and manually copy the textures I have created.

Would it be possible to create something like: (it may not have sense, as I’ve told and not a programmer but I hope you undertand what i mean(

local_textures = #()
server_textures = #()

for i = 1 to numberOfFilesInAFolder do
(
append theNameOfTheFile local_textures
)

for i = 1 to numberOfFilesInAFolder do
(
append theNameOfTheFile server_textures
)

then compare both arrays and the one that doesnt match copy it to server?

An I’d like to do the opposite step too, copy from server to local.

Is this the wat to achieve it? Any better idea?

Thanks!

3 Replies

Definitely possible.

What I would do is create a function that reads the server folder for each of the files and compares them to your local drive. If there is no match to a file, it would copy it over and change the filename to “filename_current”. If it matches the name, but the timestamp on the texture on the server is newer, it copys the file in your folder to another folder labeled “backup” and changed that file from “filename_current” to “filename_timestamp”, then moves the new one on the server to your folder and renames it “filename_current”. Finally, if there is nothing new, the script does nothing. You could even have a messagebox pop up telling you what’s changed, such as “there are X new textures and Y updated textures”, or “No new textures at this time”.

You could set up 2 variables, 1 setting the local drive and 1 for the remote. If you wanted to flip the script to sync local files to the server, just flip the settings. I am assuming you don’t have multiple artists working on the same texture, otherwise it could get quite crazy.

Unfortunately I don’t have time to write the script out right now, but I’m jotting it down for something possible to do in the future. It shouldn’t be that difficult for anyone in your studio that knows Maxscript.

Don’t reinvent the wheel.

http://www.bittorrent.com/sync – free

http://allwaysync.com/index.html – free/paid

I’ve used Bittorrent Sync, it’s pretty good and effective. should solve your problem.

Hope this helps.

Thanks for the replys mates!

I know there are programs to do that, but I feel like in my new job they dont want to install too much different programs… thats why I wanted to do it through the maxscript.

Thanks for your feedback dstinct! I’ll try to work on it on my spare time