Update libraries script

by - 2012/03/25 6 Comments Development

Hey there!

Just wanted to share one script which might be useful for almost everyone (and after some further improvements for everyone :)

This script checks which files in svn repository were moved/renamed using `svn mv` command and updates paths used by data blocks in all blend files from this repository preventing “dead links” and manual work to repair all this stuff.

How to use it: simply rename/move needed files using `svn mv` command and before commit run the script.


  • Script was written to work with out directory structure (basically it assumes svn checkout is done to /mango folder), so before running it you’ll need to make some tweaks to paths.
  • Script is working directly with .blend files and in theory it might corrupt something. So do not use it on uncommited to the svn files.
  • Currently script changes paths only critical for us at this moment, probably some extra paths should also be fixed (like paths to external multires data, text data blocks and so on). Easy to add but i’m a bit too lazy for this :)

This script is using small python library which read/writes .blend files which was written by Jeroen Bakker for blender aid project.

So, here’s the script: updateLibraries

Have a nice day!


  1. oiaohm says:

    I wonder if the day that svn and git and the like are integrated in as a standard storage will come.

    I know that blend files have served blender well. But it would be nice to be able unbind a blend file so its more suitable to be text based diffs for svn and git for alterations. blend as extract format for stand alone from the svn and git storage. Doing this would allow svn and git logs really work as they were designed to show exactly what was changed in a particular version. Also allow a particular alteration to be pulled out.

    Some ways the current blend format gets in the way of team work.

    To me current version control in blender is a after thought when it needs to be front and centre.

    • Sergey says:

      Hm.. Not actually sure what you mean.
      For sure binary .blend files aren’t so nice for VCS systems especially in a situations when conflcts happens. But, well, i’m not actually sure why somebod will want to work on the same file in the same time. Linking system should resolve this easily. Also, switching to ASCII-based files (to mace VCS happy) for several-million-faced scene.. Not actually optimal :) Also think it’s more up to exporters/importers to deal with such kind of a usecase.
      It’s kind of pretty simple to construct diff from current blend files. At least it’s easy to find differences in data blocks or added/deleted data blocks which would help merging two blen files. But if the same data block was changed in two files (like, somebody sculpted on a model with multires and somebody else changed topology of this object) it’s really hard to merge such changes.
      And the issue, which was resolved by this script is totally related on restructurizing external folder structure. Probably having support for such things in currently developing asset mnager would be nice.

      Does this answer your question or i’ve got you totally wrong? :)

  2. Lorenzo Silva Costa says:

    good luck with the project Mongo

  3. Hey there! I just wanted to ask if you ever have
    any issues with hackers? My last blog (wordpress) was hacked and I ended up losing many months of hard work due to no data backup.
    Do you have any methods to prevent hackers?

  4. I’ve been exploring for a little for any high quality
    articles or blog posts in this sort of house . Exploring in Yahoo I at last stumbled upon this website.
    Studying this information So i am satisfied to show that
    I’ve a very good uncanny feeling I came upon exactly what I needed.
    I such a lot indisputably will make sure to do not disregard this website
    and provides it a look regularly.

  5. I almost never drop responses, however i did some searching and wound up here Update libraries script |
    Tears of Steel. And I do have a couple of questions for you if
    it’s allright. Is it only me oor does it give the impression like a few of these remarks look like they are
    written by brain dead individuals? :-P And, if you are
    posting on additional social sites, I’d like to keep up with anything fresh you have
    to post. Could you list of every one of all your social pages like your linkedin
    profile, Facfebook page or twitter feed?

Leave a Reply

Your email address will not be published. Required fields are marked *


You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>