diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2019-05-17 11:23:31 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2019-05-17 11:24:45 +0300 |
commit | 5186cfbea4c1c1111d6e6061ab877ee8d9b4f206 (patch) | |
tree | 2826f2a5f8e072c96bd4278b55335c6a35852fe5 | |
parent | e02f68c57757f07fdacdc9db4a0ad38533dd74fb (diff) |
Depsgraph: State behavior details more explicitly
-rw-r--r-- | doc/python_api/examples/bpy.types.Depsgraph.4.py | 4 | ||||
-rw-r--r-- | doc/python_api/examples/bpy.types.Depsgraph.5.py | 2 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_object_api.c | 3 |
3 files changed, 7 insertions, 2 deletions
diff --git a/doc/python_api/examples/bpy.types.Depsgraph.4.py b/doc/python_api/examples/bpy.types.Depsgraph.4.py index 41f94a32c4c..a7b6068cfae 100644 --- a/doc/python_api/examples/bpy.types.Depsgraph.4.py +++ b/doc/python_api/examples/bpy.types.Depsgraph.4.py @@ -15,6 +15,10 @@ animation or modifiers into account: When is used on evaluated object all modifiers are taken into account. .. note:: The result mesh is owned by the object. It can be freed by calling `object.to_mesh_clear()`. +.. note:: + The result mesh must be treated as temporary, and can not be referenced from objects in the main + database. If the mesh intended to be used in a persistent manner use bpy.data.meshes.new_from_object() + instead. .. note:: If object does not have geometry (i.e. camera) the functions returns None. """ import bpy diff --git a/doc/python_api/examples/bpy.types.Depsgraph.5.py b/doc/python_api/examples/bpy.types.Depsgraph.5.py index a37d2674ecd..353161a547a 100644 --- a/doc/python_api/examples/bpy.types.Depsgraph.5.py +++ b/doc/python_api/examples/bpy.types.Depsgraph.5.py @@ -17,7 +17,7 @@ When is used on evaluated object all modifiers are taken into account. All the references (such as materials) are re-mapped to original. This ensures validity and consistency of the main database. -.. note:: The result mesh is added to the main database. +.. note:: The result mesh is added to the main database. This mesh can be referenced by any object, .. note:: If object does not have geometry (i.e. camera) the functions returns None. """ import bpy diff --git a/source/blender/makesrna/intern/rna_object_api.c b/source/blender/makesrna/intern/rna_object_api.c index da00e1f155d..7362f6ba610 100644 --- a/source/blender/makesrna/intern/rna_object_api.c +++ b/source/blender/makesrna/intern/rna_object_api.c @@ -895,7 +895,8 @@ void RNA_api_object(StructRNA *srna) RNA_def_function_ui_description( func, "Create a Mesh data-block from the current state of the object. The object owns the " - "data-block. To force free it use to_mesh_clear()"); + "data-block. To force free it use to_mesh_clear(). " + "The result is temporary and can not be used by objects from the main database"); RNA_def_function_flag(func, FUNC_USE_REPORTS); parm = RNA_def_pointer(func, "mesh", "Mesh", "", "Mesh created from object"); RNA_def_function_return(func, parm); |