Changeset View
Changeset View
Standalone View
Standalone View
source/blender/blenkernel/intern/DerivedMesh.c
| Context not available. | |||||
| #include "DEG_depsgraph_query.h" | #include "DEG_depsgraph_query.h" | ||||
| #include "BKE_shrinkwrap.h" | #include "BKE_shrinkwrap.h" | ||||
| #include "CLG_log.h" | |||||
| #ifdef WITH_OPENSUBDIV | #ifdef WITH_OPENSUBDIV | ||||
| # include "DNA_userdef_types.h" | # include "DNA_userdef_types.h" | ||||
| #endif | #endif | ||||
| Context not available. | |||||
| # define ASSERT_IS_VALID_MESH(mesh) | # define ASSERT_IS_VALID_MESH(mesh) | ||||
| #endif | #endif | ||||
| static CLG_LogRef LOG = { "bke.derivedmesh" }; | |||||
| static ThreadRWMutex loops_cache_lock = PTHREAD_RWLOCK_INITIALIZER; | static ThreadRWMutex loops_cache_lock = PTHREAD_RWLOCK_INITIALIZER; | ||||
| Context not available. | |||||
| uid = kb->uid; | uid = kb->uid; | ||||
| } | } | ||||
| else { | else { | ||||
| printf("%s: error - could not find active shapekey %d!\n", | CLOG_ERROR(&LOG, "could not find active shapekey %d!", ob->shapenr - 1); | ||||
| __func__, ob->shapenr - 1); | |||||
| uid = INT_MAX; | uid = INT_MAX; | ||||
| } | } | ||||
| } | } | ||||
| Context not available. | |||||
| * which should be fed through the modifier | * which should be fed through the modifier | ||||
| * stack */ | * stack */ | ||||
| if (tmp.totvert != me->totvert && !did_shapekeys && me->key) { | if (tmp.totvert != me->totvert && !did_shapekeys && me->key) { | ||||
| printf("%s: YEEK! this should be recoded! Shape key loss!: ID '%s'\n", __func__, tmp.id.name); | CLOG_WARN(&LOG, "YEEK! this should be recoded! Shape key loss!: ID '%s'", tmp.id.name); | ||||
| if (tmp.key && !(tmp.id.tag & LIB_TAG_NO_MAIN)) { | if (tmp.key && !(tmp.id.tag & LIB_TAG_NO_MAIN)) { | ||||
| id_us_min(&tmp.key->id); | id_us_min(&tmp.key->id); | ||||
| } | } | ||||
| Context not available. | |||||
| kb->totelem = dm->numVertData; | kb->totelem = dm->numVertData; | ||||
| kb->data = MEM_calloc_arrayN(kb->totelem, 3 * sizeof(float), "kb->data derivedmesh.c"); | kb->data = MEM_calloc_arrayN(kb->totelem, 3 * sizeof(float), "kb->data derivedmesh.c"); | ||||
| fprintf(stderr, "%s: lost a shapekey layer: '%s'! (bmesh internal error)\n", __func__, kb->name); | CLOG_ERROR(&LOG, "lost a shapekey layer: '%s'! (bmesh internal error)", kb->name); | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| Context not available. | |||||
| /* ensure we can use mesh vertex count for derived mesh custom data */ | /* ensure we can use mesh vertex count for derived mesh custom data */ | ||||
| if (me_src->totvert != me_dst->totvert) { | if (me_src->totvert != me_dst->totvert) { | ||||
| fprintf(stderr, | CLOG_WARN(&LOG, "vertex size mismatch (mesh/eval) '%s' (%d != %d)", | ||||
| "%s: vertex size mismatch (mesh/eval) '%s' (%d != %d)\n", | me_src->id.name + 2, me_src->totvert, me_dst->totvert); | ||||
| __func__, me_src->id.name + 2, me_src->totvert, me_dst->totvert); | |||||
| return; | return; | ||||
| } | } | ||||
| Context not available. | |||||
| float *array; | float *array; | ||||
| if (me_src->totvert != kb->totelem) { | if (me_src->totvert != kb->totelem) { | ||||
| fprintf(stderr, | CLOG_WARN(&LOG, "vertex size mismatch (Mesh '%s':%d != KeyBlock '%s':%d)", | ||||
| "%s: vertex size mismatch (Mesh '%s':%d != KeyBlock '%s':%d)\n", | me_src->id.name + 2, me_src->totvert, kb->name, kb->totelem); | ||||
| __func__, me_src->id.name + 2, me_src->totvert, kb->name, kb->totelem); | |||||
| array = MEM_calloc_arrayN((size_t)me_src->totvert, sizeof(float[3]), __func__); | array = MEM_calloc_arrayN((size_t)me_src->totvert, sizeof(float[3]), __func__); | ||||
| } | } | ||||
| else { | else { | ||||
| Context not available. | |||||