7

Is there some way to lock files with a password or to lock open files to prevent them from being edited by others?

Use case examples:

A:

Jack wants to sell Blender models, but wants to ensure that only those who have paid and been sent a password can edit the models.
Can a password be used?

B:

Jack and Jill are making a hill for their water simulation. However, Jack wants to make sure the hill is completed before Jill tries to run a water simulation.
(How) can he lock the file?

To be clear:

  • LibreOffice (also open source) allows password protected files.
  • I do not want to sell files as described, but I do want to protect my files via password sometimes (and will need to in some situations).
  • About LibreOffice: it can encrypt a file, if the file's document format supports it. Both ZIP (used by Open Document Format) and PDF supports encryption in their specification. – Adhi Jun 06 '13 at 03:29

3 Answers3

7

No, for the same reasons ideasman42 said in his own answer. He suggests some workarounds however, here are mine..

Case A: You can use PasteAll.org (which has natural support for blend files) to safely upload and password protect a .blend file, you can then send the link and password to the customer.

Case B: Easy enough, they could work in separate personal files and merge them when ready. Link/Append

Ultimately, you are better off using an actual software that provides encryption such as 7zip.

iKlsR
  • 43,379
  • 12
  • 156
  • 189
  • it is easiest to simply use 7Zip to zip and add password to open the zip. The Ideasman42 answer can have different result later when the implementation of Blender changed. +1 to this answer :) – eriawan Jun 07 '13 at 04:11
4

No, this is not possible in Blender.

And it would be quite hard enforce even if the feature was supported in Blender - since its open source, someone could always compile their own version that allowed re-saving.

For case A: just use a video turnaround.

For case B: sounds like they just need good communication/team work. Note that some version-control allows locking so perhaps it can be done at that level.

ideasman42
  • 47,387
  • 10
  • 141
  • 223
  • I think in case A he was asking more about DRM, which is unlikely to be found in Blender ever. – Kyle Willey Jun 06 '13 at 02:05
  • Not DRM. LibreOffice allows passwords, for example. It's opensource, but still secure that way. I don't want to do what I mentioned in case A, but I would like to password protect my files sometimes. – A Wild RolandiXor Has Appeared Jun 06 '13 at 02:15
  • The .blend file format, and Gzip library used to compress it, doesn't include encryption feature. I don't think there's a way to do that from within Blender. – Adhi Jun 06 '13 at 02:22
1

File locking is generally an operating system feature. Blender could try, but it won't work in all platforms.

About encryption with a password, the compression and file format used by Blender is open, and they don't include encryption. You'll need a separate program to protect the file in such way. I think it can be done with an addon using some Python cryptography module, provided it can decrypt to an in-memory image and let Blender read from that, which I haven't seen an API call for (decrypting to temporary file to be loaded defeats the purpose).

Adhi
  • 14,310
  • 1
  • 55
  • 62
  • As I understand it "file locking" here doesn't refer to an editing lock (with a lock object or a .$$lock_somefile.blend.tmp$$ file) but rather to encryption. – wchargin Jun 09 '13 at 20:51
  • @WChargin The 2nd part of opening sentence made me think he want file locking, and the 2nd use case example are easiest done with such feature. I understood he wants a password, too, hence my 2nd paragraph. – Adhi Jun 09 '13 at 21:10