Changeset View
Changeset View
Standalone View
Standalone View
source/blender/blenkernel/intern/mesh_convert.c
| Show First 20 Lines • Show All 1,149 Lines • ▼ Show 20 Lines | switch (object->type) { | ||||
| default: | default: | ||||
| /* Object does not have geometry data. */ | /* Object does not have geometry data. */ | ||||
| return NULL; | return NULL; | ||||
| } | } | ||||
| if (new_mesh == NULL) { | if (new_mesh == NULL) { | ||||
| /* Happens in special cases like request of mesh for non-mother meta ball. */ | /* Happens in special cases like request of mesh for non-mother meta ball. */ | ||||
| return NULL; | return NULL; | ||||
| } | } | ||||
| /* The result must have 0 users, since it's just a mesh which is free-dangling data-block. | /* The result must have 0 users, since it's just a mesh which is free-dangling data-block. | ||||
| * All the conversion functions are supposed to ensure mesh is not counted. */ | * All the conversion functions are supposed to ensure mesh is not counted. */ | ||||
| BLI_assert(new_mesh->id.us == 0); | BLI_assert(new_mesh->id.us == 0); | ||||
| /* It is possible that mesh came from modifier stack evaluation, which preserves edit_mesh | |||||
| * pointer (which allows draw manager to access edit mesh when drawing). Normally this does | |||||
| * not cause ownership problems because evaluated object runtime is keeping track of the real | |||||
| * ownership. | |||||
| * | |||||
| * Here we are constructing a mesh which is supposed to be iondependent, which means no shared | |||||
| * ownership is allowed, so we make sure edit mesh is reset to NULL (which is similar to as if | |||||
| * one duplicates the objects and applies all the modifiers). */ | |||||
| new_mesh->edit_mesh = NULL; | |||||
| return new_mesh; | return new_mesh; | ||||
| } | } | ||||
| static int foreach_libblock_make_original_callback(LibraryIDLinkCallbackData *cb_data) | static int foreach_libblock_make_original_callback(LibraryIDLinkCallbackData *cb_data) | ||||
| { | { | ||||
| ID **id_p = cb_data->id_pointer; | ID **id_p = cb_data->id_pointer; | ||||
| if (*id_p == NULL) { | if (*id_p == NULL) { | ||||
| return IDWALK_RET_NOP; | return IDWALK_RET_NOP; | ||||
| ▲ Show 20 Lines • Show All 430 Lines • Show Last 20 Lines | |||||