blender/intern/cycles
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
..
app Fix T62408: Cycles viewport adaptive subdivision hangs after updates 2019-04-21 03:05:38 +02:00
blender Tweak API to support adding evaluated meshes to main database 2019-05-16 16:42:16 +02:00
bvh Cleanup: comments (long lines) in cycles 2019-05-01 21:41:07 +10:00
cmake ClangFormat: apply to source, most of intern 2019-04-17 06:21:24 +02:00
device Cycles: Don't advertise BVH8 being supported on 32bit platforms 2019-05-16 11:51:25 +02:00
doc ClangFormat: apply to source, most of intern 2019-04-17 06:21:24 +02:00
graph ClangFormat: apply to source, most of intern 2019-04-17 06:21:24 +02:00
kernel Fix T64515, T60434: crash in OSL and preview render after recent changes 2019-05-14 12:24:15 +02:00
render Lights: change sun light size to be specified as angle 2019-05-15 16:07:50 +02:00
subd Cleanup: comments (long lines) in cycles 2019-05-01 21:41:07 +10:00
test ClangFormat: apply to source, most of intern 2019-04-17 06:21:24 +02:00
util Fix Cycles build error after recent changes 2019-05-14 15:06:23 +02:00
CMakeLists.txt ClangFormat: apply to source, most of intern 2019-04-17 06:21:24 +02:00