blender/doc/python_api/examples
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
..
aud.py
blf.py Cleanup: unused imports 2019-03-17 21:00:56 +11:00
bmesh.ops.1.py Cleanup: pep8 function indentation 2018-06-26 19:58:56 +02:00
bpy.app.handlers.1.py Spelling fixes in comments and descriptions, patch by luzpaz. 2018-09-19 18:18:05 +02:00
bpy.app.handlers.py Cleanup: pep8 function indentation 2018-06-26 19:58:56 +02:00
bpy.app.timers.1.py Python API Docs: Examples for new timer api 2018-11-27 11:31:48 +01:00
bpy.app.timers.2.py Docs: use float in bpy.app.timer examples 2018-11-28 06:09:42 +11:00
bpy.app.timers.3.py Python API Docs: Examples for new timer api 2018-11-27 11:31:48 +01:00
bpy.app.timers.4.py Docs: use float in bpy.app.timer examples 2018-11-28 06:09:42 +11:00
bpy.app.timers.5.py Docs: use float in bpy.app.timer examples 2018-11-28 06:09:42 +11:00
bpy.app.translations.py Cleanup: Update some links to new wiki 2018-08-13 21:55:30 -04:00
bpy.data.py
bpy.ops.1.py
bpy.ops.2.py Collections and groups unification 2018-05-18 13:34:24 +02:00
bpy.ops.3.py
bpy.ops.py
bpy.props.1.py Docs: update examples for 2.8x 2019-03-22 00:07:06 +11:00
bpy.props.2.py Docs: update examples for 2.8x 2019-03-22 00:07:06 +11:00
bpy.props.3.py Docs: update examples for 2.8x 2019-03-22 00:07:06 +11:00
bpy.props.4.py Cleanup: pep8 function indentation 2018-06-26 19:58:56 +02:00
bpy.props.5.py Cleanup: pep8 function indentation 2018-06-26 19:58:56 +02:00
bpy.props.py Docs: update examples for 2.8x 2019-03-22 00:07:06 +11:00
bpy.types.AddonPreferences.1.py Docs: update examples for 2.8x 2019-03-22 00:07:06 +11:00
bpy.types.BlendDataLibraries.load.py
bpy.types.BlendDataLibraries.write.py
bpy.types.bpy_prop_collection.foreach_get.py
bpy.types.bpy_prop_collection.foreach_set.py
bpy.types.bpy_struct.keyframe_insert.1.py Docs: update examples for 2.8x 2019-03-22 00:07:06 +11:00
bpy.types.bpy_struct.keyframe_insert.py
bpy.types.Depsgraph.1.py Dependency graph API changes 2019-05-16 11:49:21 +02:00
bpy.types.Depsgraph.2.py Dependency graph API changes 2019-05-16 11:49:21 +02:00
bpy.types.Depsgraph.3.py Dependency graph API changes 2019-05-16 11:49:21 +02:00
bpy.types.Depsgraph.4.py Tweak API to support adding evaluated meshes to main database 2019-05-16 16:42:16 +02:00
bpy.types.Depsgraph.5.py Tweak API to support adding evaluated meshes to main database 2019-05-16 16:42:16 +02:00
bpy.types.Depsgraph.6.py Tweak API to support adding evaluated meshes to main database 2019-05-16 16:42:16 +02:00
bpy.types.ID.user_clear.1.py
bpy.types.Menu.1.py
bpy.types.Menu.2.py Python / Cleanup: rename INFO_MT to TOPBAR_MT/VIEW3D_MT to reflect actual location. 2018-08-29 16:25:50 +02:00
bpy.types.Menu.3.py UI / Python: rename X-Ray to In Front, Draw to Display. 2018-09-06 13:26:46 +02:00
bpy.types.Menu.4.py Cleanup: pep8 function indentation 2018-06-26 19:58:56 +02:00
bpy.types.Menu.py
bpy.types.Mesh.py
bpy.types.NodeTree.py Cleanup: pep8 function indentation 2018-06-26 19:58:56 +02:00
bpy.types.Object.py Cleanup: unused imports 2019-03-17 21:00:56 +11:00
bpy.types.Operator.1.py Docs: update examples for 2.8x 2019-03-22 00:07:06 +11:00
bpy.types.Operator.2.py Docs: update examples for 2.8x 2019-03-22 00:07:06 +11:00
bpy.types.Operator.3.py Docs: update examples for 2.8x 2019-03-22 00:07:06 +11:00
bpy.types.Operator.4.py Docs: update examples for 2.8x 2019-03-22 00:07:06 +11:00
bpy.types.Operator.5.py
bpy.types.Operator.6.py Docs: update examples for 2.8x 2019-03-22 00:07:06 +11:00
bpy.types.Operator.py Cleanup: pep8 function indentation 2018-06-26 19:58:56 +02:00
bpy.types.Panel.1.py UI: text keyword argument to label 2018-08-28 12:34:51 +10:00
bpy.types.Panel.2.py UI: text keyword argument to label 2018-08-28 12:34:51 +10:00
bpy.types.Panel.py
bpy.types.PropertyGroup.py Docs: update examples for 2.8x 2019-03-22 00:07:06 +11:00
bpy.types.RenderEngine.py Python API: tweak RenderEngine example to be a bit more efficient. 2019-03-27 16:25:19 +01:00
bpy.types.UIList.1.py
bpy.types.UIList.2.py Docs: update examples for 2.8x 2019-03-22 00:07:06 +11:00
bpy.types.WindowManager.popup_menu.py UI: text keyword argument to label 2018-08-28 12:34:51 +10:00
gpu.1.py Cleanup: gpu docs 2018-11-20 07:38:20 +11:00
gpu.2.py Cleanup: gpu docs 2018-11-20 07:38:20 +11:00
gpu.3.py Cleanup: gpu docs 2018-11-20 07:38:20 +11:00
gpu.4.py Cleanup: gpu docs 2018-11-20 07:38:20 +11:00
gpu.5.py Cleanup: gpu docs 2018-11-20 07:38:20 +11:00
gpu.6.py Cleanup: gpu docs 2018-11-20 07:38:20 +11:00
gpu.7.py Cleanup: gpu docs 2018-11-20 07:38:20 +11:00
gpu.8.py Cleanup: gpu docs 2018-11-20 07:38:20 +11:00
gpu.9.py Cleanup: gpu docs 2018-11-20 07:38:20 +11:00
gpu.10.py Cleanup: gpu docs 2018-11-20 07:38:20 +11:00
gpu.11.py Cleanup: gpu docs 2018-11-20 07:38:20 +11:00
gpu.shader.py Cleanup: gpu docs 2018-11-20 07:38:20 +11:00
mathutils.Color.py Spelling fixes in comments and descriptions, patch by luzpaz. 2018-09-03 16:55:01 +02:00
mathutils.Euler.py
mathutils.kdtree.py
mathutils.Matrix.py
mathutils.py
mathutils.Quaternion.py Spelling fixes in comments and descriptions, patch by luzpaz. 2018-09-03 16:55:01 +02:00
mathutils.Vector.py