blender/intern
Sergey Sharybin 32d5d127cb Tweak API to support adding evaluated meshes to main database
One of the usecases is to create mesh from an object is a manner similar to
how Apply Modifiers does it, and have it in the bmain so it can be referenced
by other objects.

This usecase is something what went unnoticed in the previous API changes, so
here is a followup.

Summary of changes:

* bpy.meshes.new_from_object() behaves almost the same as before this change.
  The difference now is that it now ensures all referenced data-blocks are
	original (for example, materials referenced by the mesh).

* object.to_mesh() now creates free-standing Mesh data-block which is outside
  of any bmain. The object owns it, which guarantees the memory never leaks.

  It is possible to force free memory by calling object.to_mesh_clear().

Reviewers: brecht

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D4875
2019-05-16 16:42:16 +02:00
..
atomic Cleanup: comments (long lines) in atomic 2019-05-01 20:34:12 +10:00
audaspace Cleanup: clangg-format for rB157cc54ed521 2019-04-28 11:48:55 +02:00
clog Cleanup: comments (long lines) in various intern/ libs 2019-05-01 21:00:56 +10:00
cycles Tweak API to support adding evaluated meshes to main database 2019-05-16 16:42:16 +02:00
dualcon Cleanup: comments (long lines) in dualcon 2019-05-01 21:00:56 +10:00
eigen ClangFormat: apply to source, most of intern 2019-04-17 06:21:24 +02:00
elbeem Cleanup: use 2 space indentation for CMake 2019-04-17 06:35:54 +02:00
ffmpeg Cleanup: comments (long lines) in various intern/ libs 2019-05-01 21:00:56 +10:00
ghost GHOST: add header to display manager 2019-05-16 18:27:30 +10:00
glew-mx ClangFormat: apply to source, most of intern 2019-04-17 06:21:24 +02:00
guardedalloc Cleanup: comments (long lines) in various intern/ libs 2019-05-01 21:00:56 +10:00
iksolver Cleanup: comments (long lines) in various intern/ libs 2019-05-01 21:00:56 +10:00
itasc Cleanup: use 2 space indentation for CMake 2019-04-17 06:35:54 +02:00
libmv Disable clang-format for Libmv 2019-04-18 12:33:04 +02:00
locale Cleanup: comments (long lines) in various intern/ libs 2019-05-01 21:00:56 +10:00
memutil ClangFormat: apply to source, most of intern 2019-04-17 06:21:24 +02:00
mikktspace Cleanup: comments (long lines) in mikktspace 2019-05-01 20:41:33 +10:00
numaapi Cleanup: use 2 space indentation for CMake 2019-04-17 06:35:54 +02:00
opencolorio Cycles/Eevee: unified and improved texture image color space handling 2019-05-13 15:56:10 +02:00
opensubdiv Cleanup: add trailing commas to avoid right shift 2019-04-18 17:19:44 +02:00
openvdb ClangFormat: apply to source, most of intern 2019-04-17 06:21:24 +02:00
rigidbody Cleanup: comments (long lines) in rigidbody 2019-05-01 20:48:34 +10:00
smoke Cleanup: use 2 space indentation for CMake 2019-04-17 06:35:54 +02:00
string Cleanup: comments (long lines) in string 2019-05-01 20:32:38 +10:00
utfconv Cleanup: comments (long lines) in utfconv 2019-05-01 20:32:38 +10:00
CMakeLists.txt Cleanup: use 2 space indentation for CMake 2019-04-17 06:35:54 +02:00