Update libraries script

by - 2012/03/25 3 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 uncommitted 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