14 #define DNA_DEPRECATED_ALLOW
66 #define CUSTOMDATA_GROW 5
90 return (((mask_required->
vmask & mask_ref->
vmask) == mask_required->
vmask) &&
196 for (i = 0; i <
count; i++) {
203 memcpy(dw, dvert->
dw, dvert->
totweight *
sizeof(*dw));
214 for (
int i = 0; i <
count; i++) {
228 const int size =
sizeof(
void *);
230 for (
int i = 0; i <
count; i++) {
245 for (
int i = 0; i <
count; i++) {
254 const float *weights,
255 const float *
UNUSED(sub_weights),
261 struct MDeformWeight_Link {
262 struct MDeformWeight_Link *
next;
267 MDeformWeight_Link *dest_dwlink =
nullptr;
268 MDeformWeight_Link *
node;
272 for (
int i = 0; i <
count; i++) {
274 float interp_weight = weights[i];
276 for (
int j = 0; j < source->
totweight; j++) {
278 float weight = dw->
weight * interp_weight;
280 if (weight == 0.0f) {
295 MDeformWeight_Link *tmp_dwlink =
static_cast<MDeformWeight_Link *
>(
296 alloca(
sizeof(*tmp_dwlink)));
297 tmp_dwlink->dw.def_nr = dw->
def_nr;
298 tmp_dwlink->dw.weight = weight;
301 tmp_dwlink->next = dest_dwlink;
302 dest_dwlink = tmp_dwlink;
312 if (dvert->
dw && (dvert->
totweight == totweight)) {
330 if (
node->dw.weight > 1.0f) {
331 node->dw.weight = 1.0f;
337 memset(dvert, 0,
sizeof(*dvert));
348 const float *weights,
349 const float *
UNUSED(sub_weights),
356 float no[3] = {0.0f};
369 const float mixfactor)
371 const float *no_src = (
const float *)source;
372 float *no_dst = (
float *)
dest;
413 for (
int i = 0; i <
count; i++) {
414 dest_tf[i] = source_tf[i];
419 const void **sources,
const float *weights,
const float *sub_weights,
int count,
void *
dest)
422 float uv[4][2] = {{0.0f}};
424 const float *sub_weight = sub_weights;
425 for (
int i = 0; i <
count; i++) {
426 const float interp_weight = weights[i];
429 for (
int j = 0; j < 4; j++) {
431 for (
int k = 0; k < 4; k++, sub_weight++) {
442 *tf = *(
MTFace *)(*sources);
443 memcpy(tf->
uv, uv,
sizeof(tf->
uv));
451 for (
int j = 0; j < 4; j++) {
452 const int source_index = corner_indices[j];
456 memcpy(tf->
uv, uv,
sizeof(tf->
uv));
461 static MTFace default_tf = {{{0, 0}, {1, 0}, {1, 1}, {0, 1}}};
464 for (
int i = 0; i <
count; i++) {
486 const float *weights,
487 const float *
UNUSED(sub_weights),
492 for (
int i = 0; i <
count; i++) {
493 const float interp_weight = weights[i];
494 const float src = *(
const float *)sources[i];
503 bool has_errors =
false;
505 for (
int i = 0; i < totitems; i++, fp++) {
529 const float *weights,
530 const float *
UNUSED(sub_weights),
536 const float weight = weights[i];
537 const float src = *
static_cast<const int *
>(sources[i]);
540 const int rounded_result =
static_cast<int>(round(
result));
541 *
static_cast<int *
>(
dest) = rounded_result;
566 for (
int i = 0; i <
count; i++) {
567 dest_tf[i] = source_tf[i];
572 const void **sources,
const float *weights,
const float *sub_weights,
int count,
void *
dest)
575 float uv[4][2] = {{0.0f}};
577 const float *sub_weight = sub_weights;
578 for (
int i = 0; i <
count; i++) {
579 const float interp_weight = weights[i];
582 for (
int j = 0; j < 4; j++) {
584 for (
int k = 0; k < 4; k++, sub_weight++) {
595 memcpy(osf->
uv, uv,
sizeof(osf->
uv));
603 for (
int j = 0; j < 4; j++) {
606 memcpy(osf->
uv, uv,
sizeof(osf->
uv));
611 static OrigSpaceFace default_osf = {{{0, 0}, {1, 0}, {1, 1}, {0, 1}}};
614 for (
int i = 0; i <
count; i++) {
615 osf[i] = default_osf;
630 int nverts = (ci[1] == 3) ? 4 : 3;
632 int cornersize = s->
totdisp / corners;
634 if (corners != nverts) {
646 for (
int S = 0; S < corners; S++) {
647 memcpy(d + cornersize * S, s->
disps + cornersize * ci[S],
sizeof(
float[3]) * cornersize);
660 for (
int i = 0; i <
count; i++) {
662 d[i].disps =
static_cast<float(*)[3]
>(
MEM_dupallocN(s[i].disps));
663 d[i].hidden =
static_cast<unsigned int *
>(
MEM_dupallocN(s[i].hidden));
666 d[i].disps =
nullptr;
667 d[i].hidden =
nullptr;
672 d[i].level = s[i].
level;
680 for (
int i = 0; i <
count; i++) {
687 d[i].disps =
nullptr;
688 d[i].hidden =
nullptr;
698 for (
int i = 0; i <
count; i++) {
703 if (!
cdf_read_data(cdf,
sizeof(
float[3]) * d[i].totdisp, d[i].disps)) {
704 CLOG_ERROR(&
LOG,
"failed to read multires displacement %d/%d %d", i,
count, d[i].totdisp);
716 for (
int i = 0; i <
count; i++) {
717 if (!
cdf_write_data(cdf,
sizeof(
float[3]) * d[i].totdisp, d[i].disps)) {
718 CLOG_ERROR(&
LOG,
"failed to write multires displacement %d/%d %d", i,
count, d[i].totdisp);
731 for (
int i = 0; i <
count; i++) {
732 size +=
sizeof(
float[3]) * d[i].totdisp;
745 const float *weights,
746 const float *
UNUSED(sub_weights),
751 for (
int i = 0; i <
count; i++) {
752 const float interp_weight = weights[i];
753 const float *
src =
static_cast<const float *
>(sources[i]);
754 mask += (*src) * interp_weight;
770 for (
int i = 0; i <
count; i++) {
773 d[i].level = s[i].
level;
786 for (
int i = 0; i <
count; i++) {
801 const float mixfactor)
805 unsigned char tmp_col[4];
814 const float f = ((
float)m2->
r + (
float)m2->
g + (
float)m2->
b) / 3.0f;
828 unsigned char src[4] = {m1->
r, m1->
g, m1->
b, m1->
a};
829 unsigned char dst[4] = {m2->
r, m2->
g, m2->
b, m2->
a};
844 memcpy(tmp_col,
src,
sizeof(tmp_col));
849 m2->
r = (char)dst[0];
850 m2->
g = (char)dst[1];
851 m2->
b = (char)dst[2];
852 m2->
a = (char)dst[3];
867 return r *
r +
g *
g +
b *
b +
a *
a < 0.001f;
875 m->
g = (
float)m->
g * fac;
877 m->
a = (
float)m->
a * fac;
941 MLoopCol default_mloopcol = {255, 255, 255, 255};
943 for (
int i = 0; i <
count; i++) {
944 mlcol[i] = default_mloopcol;
949 const float *weights,
950 const float *
UNUSED(sub_weights),
962 for (
int i = 0; i <
count; i++) {
963 const float interp_weight = weights[i];
965 col.r +=
src->r * interp_weight;
966 col.g +=
src->g * interp_weight;
967 col.b +=
src->b * interp_weight;
968 col.a +=
src->a * interp_weight;
990 const float mixfactor)
1047 const float *weights,
1048 const float *
UNUSED(sub_weights),
1057 for (
int i = 0; i <
count; i++) {
1058 const float interp_weight = weights[i];
1061 if (interp_weight > 0.0f) {
1074 bool has_errors =
false;
1076 for (
int i = 0; i < totitems; i++, uv++) {
1091 const int UNUSED(mixmode),
1092 const float UNUSED(mixfactor))
1141 const float *weights,
1142 const float *
UNUSED(sub_weights),
1149 for (
int i = 0; i <
count; i++) {
1150 const float interp_weight = weights[i];
1161 const void **sources,
const float *weights,
const float *sub_weights,
int count,
void *
dest)
1169 }
col[4] = {{0.0f}};
1171 const float *sub_weight = sub_weights;
1172 for (
int i = 0; i <
count; i++) {
1173 const float interp_weight = weights[i];
1175 for (
int j = 0; j < 4; j++) {
1177 const MCol *
src =
static_cast<const MCol *
>(sources[i]);
1178 for (
int k = 0; k < 4; k++, sub_weight++,
src++) {
1179 const float w = (*sub_weight) * interp_weight;
1187 const MCol *
src =
static_cast<const MCol *
>(sources[i]);
1188 col[j].a +=
src[j].a * interp_weight;
1189 col[j].r +=
src[j].r * interp_weight;
1190 col[j].g +=
src[j].g * interp_weight;
1191 col[j].b +=
src[j].b * interp_weight;
1197 for (
int j = 0; j < 4; j++) {
1213 for (
int j = 0; j < 4; j++) {
1214 col[j] = mcol[corner_indices[j]];
1217 memcpy(mcol,
col,
sizeof(
col));
1222 static MCol default_mcol = {255, 255, 255, 255};
1225 for (
int i = 0; i < 4 *
count; i++) {
1226 mcol[i] = default_mcol;
1236 const float *weights,
1237 const float *
UNUSED(sub_weights),
1241 float **in = (
float **)sources;
1249 for (
int i = 0; i <
count; i++) {
1250 const float interp_weight = weights[i];
1251 f += *in[i] * interp_weight;
1255 *((
float *)
dest) = f;
1259 const float *weights,
1260 const float *
UNUSED(sub_weights),
1264 float **in = (
float **)sources;
1273 for (
int i = 0; i <
count; i++) {
1274 const float interp_weight = weights[i];
1292 for (
int i = 0; i <
count; i++) {
1304 const float *weights,
1305 const float *
UNUSED(sub_weights),
1312 for (
int i = 0; i <
count; i++) {
1313 const float interp_weight = weights[i];
1333 short(*flnors)[4][3] =
static_cast<short(*)[4][3]
>(
data);
1341 memcpy(flnors, nors,
sizeof(nors));
1352 int *fmap_num = (
int *)
data;
1353 for (
int i = 0; i <
count; i++) {
1367 const float mixfactor)
1404 memcpy(tmp_col, m1->
color,
sizeof(tmp_col));
1418 for (
int i = 0; i < 4; i++) {
1423 return tot < 0.001f;
1459 MPropCol default_propcol = {{1.0f, 1.0f, 1.0f, 1.0f}};
1461 for (
int i = 0; i <
count; i++) {
1467 const float *weights,
1468 const float *
UNUSED(sub_weights),
1473 float col[4] = {0.0f, 0.0f, 0.0f, 0.0f};
1474 for (
int i = 0; i <
count; i++) {
1475 const float interp_weight = weights[i];
1489 const float *weights,
1490 const float *
UNUSED(sub_weights),
1495 for (
int i = 0; i <
count; i++) {
1496 const float interp_weight = weights[i];
1522 float *values =
static_cast<float *
>(
data);
1523 bool has_errors =
false;
1524 for (
int i = 0; i < totitems * 3; i++) {
1542 const float *weights,
1543 const float *
UNUSED(sub_weights),
1548 for (
int i = 0; i <
count; i++) {
1549 const float interp_weight = weights[i];
1573 float *values =
static_cast<float *
>(
data);
1574 bool has_errors =
false;
1575 for (
int i = 0; i < totitems * 2; i++) {
1593 const float *weights,
1594 const float *
UNUSED(sub_weights),
1599 for (
int i = 0; i <
count; i++) {
1600 const float interp_weight = weights[i];
1601 const bool src = *(
const bool *)sources[i];
1602 result |=
src && (interp_weight > 0.0f);
1609 {
sizeof(
MVert),
"MVert", 1,
nullptr,
nullptr,
nullptr,
nullptr,
nullptr,
nullptr},
1611 {
sizeof(
float[2]),
"", 1,
nullptr,
nullptr,
nullptr,
nullptr,
nullptr,
nullptr},
1623 {
sizeof(
MEdge),
"MEdge", 1,
nullptr,
nullptr,
nullptr,
nullptr,
nullptr,
nullptr},
1625 {
sizeof(
MFace),
"MFace", 1,
nullptr,
nullptr,
nullptr,
nullptr,
nullptr,
nullptr},
1627 {
sizeof(
MTFace),
"MTFace", 1,
1630 nullptr,
nullptr,
nullptr,
1631 nullptr,
nullptr,
nullptr,
1632 nullptr,
nullptr,
nullptr,
1636 {
sizeof(
MCol[4]),
"MCol", 4,
1637 N_(
"Col"),
nullptr,
nullptr,
1639 nullptr,
nullptr,
nullptr,
1640 nullptr,
nullptr,
nullptr,
1641 nullptr,
nullptr,
nullptr,
1664 {
sizeof(int),
"", 0,
nullptr,
nullptr,
nullptr,
nullptr,
nullptr,
layerDefault_fmap,
nullptr},
1705 {
sizeof(
float[3]),
"", 0,
nullptr,
nullptr,
nullptr,
nullptr,
nullptr,
nullptr},
1709 {
sizeof(int),
"", 0,
nullptr,
nullptr,
nullptr,
nullptr,
nullptr,
nullptr},
1753 {
sizeof(
float[4][4]),
"", 0,
N_(
"Tangent"),
nullptr,
nullptr,
nullptr,
nullptr,
nullptr},
1785 {
sizeof(
MCol[4]),
"", 0,
nullptr,
nullptr,
nullptr,
nullptr,
nullptr,
nullptr},
1797 {
sizeof(
float[3]),
"", 0,
nullptr,
nullptr,
nullptr,
nullptr,
nullptr,
nullptr},
1799 {
sizeof(
MRecast),
"MRecast", 1,
N_(
"Recast"),
nullptr,
nullptr,
nullptr,
nullptr},
1801 {
sizeof(
MPoly),
"MPoly", 1,
N_(
"NGon Face"),
nullptr,
nullptr,
nullptr,
nullptr,
nullptr},
1806 N_(
"NGon Face-Vertex"),
1813 {
sizeof(int),
"", 0,
nullptr,
nullptr,
nullptr,
nullptr,
nullptr,
nullptr},
1821 {
sizeof(
float),
"", 0,
N_(
"SubSurfCrease"),
nullptr,
nullptr,
nullptr},
1843 N_(
"PreviewLoopCol"),
1909 {
sizeof(
float[4]),
"", 0,
nullptr,
nullptr,
nullptr,
nullptr,
nullptr,
nullptr},
1911 {
sizeof(
short[4][3]),
"", 0,
nullptr,
nullptr,
nullptr,
nullptr,
layerSwap_flnor,
nullptr},
1913 {
sizeof(
short[2]),
"vec2s", 1,
nullptr,
nullptr,
nullptr,
nullptr,
nullptr,
nullptr},
1915 {
sizeof(int),
"", 0,
nullptr,
nullptr,
nullptr,
nullptr,
nullptr,
nullptr},
1917 {
sizeof(
float[3]),
"vec3f", 1,
nullptr,
nullptr,
nullptr,
nullptr,
nullptr,
nullptr},
1919 {
sizeof(
float),
"MFloatProperty", 1,
nullptr,
nullptr,
nullptr,
nullptr,
nullptr,
nullptr},
1921 {
sizeof(
int8_t),
"MInt8Property", 1,
N_(
"Int8"),
nullptr,
nullptr,
nullptr,
nullptr,
nullptr},
1923 {-1,
"", 1,
nullptr,
nullptr,
nullptr,
nullptr,
nullptr,
nullptr},
1991 {
sizeof(
float),
"float", 1,
nullptr,
nullptr,
nullptr,
nullptr,
nullptr,
nullptr},
2007 "CDMStringProperty",
2038 "CDCustomLoopNormal",
2039 "CDSculptFaceGroups",
2142 printf(
"verts mask=0x%" PRIx64 ":\n",
mask->vmask);
2149 printf(
"edges mask=0x%" PRIx64 ":\n",
mask->emask);
2156 printf(
"faces mask=0x%" PRIx64 ":\n",
mask->fmask);
2163 printf(
"loops mask=0x%" PRIx64 ":\n",
mask->lmask);
2170 printf(
"polys mask=0x%" PRIx64 ":\n",
mask->pmask);
2198 data->typemap[i] = -1;
2201 for (
int i = 0; i <
data->totlayer; i++) {
2202 const int type =
data->layers[i].type;
2203 if (
type != lasttype) {
2216 return (memcmp(
data->typemap, data_copy.
typemap,
sizeof(
data->typemap)) == 0);
2228 int lasttype = -1, lastactive = 0, lastrender = 0, lastclone = 0, lastmask = 0;
2229 int number = 0, maxnumber = -1;
2230 bool changed =
false;
2232 for (
int i = 0; i < source->
totlayer; i++) {
2233 layer = &source->
layers[i];
2237 int flag = layer->
flag;
2239 if (
type != lasttype) {
2242 lastactive = layer->
active;
2258 if ((maxnumber != -1) && (number >= maxnumber)) {
2266 switch (alloctype) {
2286 newlayer->
uid = layer->
uid;
2288 newlayer->
active = lastactive;
2310 for (
int i = 0; i <
data->totlayer; i++) {
2349 if (typeInfo->
free) {
2361 if (
data->external) {
2363 data->external =
nullptr;
2375 for (
int i = 0; i <
data->totlayer; i++) {
2389 for (
int i = 0; i <
data->totlayer; i++) {
2410 for (
int i = 0; i <
data->totlayer; i++) {
2424 for (
int i = 0; i <
data->totlayer; i++) {
2425 if (
data->layers[i].type ==
type) {
2449 i = (
data->layers[i + n].type ==
type) ? (i + n) : (-1);
2457 for (
int i = 0; i <
data->totlayer; i++) {
2458 if (
data->layers[i].type ==
type) {
2459 if (
STREQ(
data->layers[i].name, name)) {
2470 const int layer_index =
data->typemap[
type];
2472 return (layer_index != -1) ? layer_index +
data->layers[layer_index].active : -1;
2477 const int layer_index =
data->typemap[
type];
2479 return (layer_index != -1) ? layer_index +
data->layers[layer_index].active_rnd : -1;
2484 const int layer_index =
data->typemap[
type];
2486 return (layer_index != -1) ? layer_index +
data->layers[layer_index].active_clone : -1;
2491 const int layer_index =
data->typemap[
type];
2493 return (layer_index != -1) ? layer_index +
data->layers[layer_index].active_mask : -1;
2502 const int layer_index =
data->typemap[
type];
2504 return (named_index != -1) ? named_index - layer_index : -1;
2509 const int layer_index =
data->typemap[
type];
2511 return (layer_index != -1) ?
data->layers[layer_index].active : -1;
2516 const int layer_index =
data->typemap[
type];
2518 return (layer_index != -1) ?
data->layers[layer_index].active_rnd : -1;
2523 const int layer_index =
data->typemap[
type];
2525 return (layer_index != -1) ?
data->layers[layer_index].active_clone : -1;
2530 const int layer_index =
data->typemap[
type];
2532 return (layer_index != -1) ?
data->layers[layer_index].active_mask : -1;
2539 return layer_index < 0 ? nullptr :
data->layers[layer_index].name;
2544 for (
int i = 0; i <
data->totlayer; i++) {
2545 if (
data->layers[i].type ==
type) {
2546 data->layers[i].active = n;
2553 for (
int i = 0; i <
data->totlayer; i++) {
2554 if (
data->layers[i].type ==
type) {
2555 data->layers[i].active_rnd = n;
2562 for (
int i = 0; i <
data->totlayer; i++) {
2563 if (
data->layers[i].type ==
type) {
2564 data->layers[i].active_clone = n;
2571 for (
int i = 0; i <
data->totlayer; i++) {
2572 if (
data->layers[i].type ==
type) {
2573 data->layers[i].active_mask = n;
2580 const int layer_index =
data->typemap[
type];
2583 for (
int i = 0; i <
data->totlayer; i++) {
2584 if (
data->layers[i].type ==
type) {
2585 data->layers[i].active = n - layer_index;
2592 const int layer_index =
data->typemap[
type];
2595 for (
int i = 0; i <
data->totlayer; i++) {
2596 if (
data->layers[i].type ==
type) {
2597 data->layers[i].active_rnd = n - layer_index;
2604 const int layer_index =
data->typemap[
type];
2607 for (
int i = 0; i <
data->totlayer; i++) {
2608 if (
data->layers[i].type ==
type) {
2609 data->layers[i].active_clone = n - layer_index;
2616 const int layer_index =
data->typemap[
type];
2619 for (
int i = 0; i <
data->totlayer; i++) {
2620 if (
data->layers[i].type ==
type) {
2621 data->layers[i].active_mask = n - layer_index;
2628 for (
int i = 0; i <
data->totlayer; i++) {
2629 if (
data->layers[i].type ==
type) {
2630 data->layers[i].flag |= flag;
2637 const int nflag = ~flag;
2639 for (
int i = 0; i <
data->totlayer; i++) {
2640 if (
data->layers[i].type ==
type) {
2641 data->layers[i].flag &= nflag;
2654 data->maxlayer += amount;
2656 memcpy(tmp,
data->layers,
sizeof(*tmp) *
data->totlayer);
2672 int flag = 0, index =
data->totlayer;
2673 void *newlayerdata =
nullptr;
2684 newlayerdata = layerdata;
2686 else if (totelem > 0 && typeInfo->
size > 0) {
2694 if (!newlayerdata) {
2701 if (typeInfo->
copy) {
2702 typeInfo->
copy(layerdata, newlayerdata, totelem);
2705 memcpy(newlayerdata, layerdata, (
size_t)totelem * typeInfo->
size);
2718 if (index >=
data->maxlayer) {
2720 if (newlayerdata != layerdata) {
2730 for (; index > 0 &&
data->layers[index - 1].type >
type; index--) {
2731 data->layers[index] =
data->layers[index - 1];
2740 data->layers[index].flag = flag;
2741 data->layers[index].data = newlayerdata;
2755 data->layers[index].name[0] =
'\0';
2758 if (index > 0 &&
data->layers[index - 1].type ==
type) {
2759 data->layers[index].active =
data->layers[index - 1].active;
2760 data->layers[index].active_rnd =
data->layers[index - 1].active_rnd;
2761 data->layers[index].active_clone =
data->layers[index - 1].active_clone;
2762 data->layers[index].active_mask =
data->layers[index - 1].active_mask;
2765 data->layers[index].active = 0;
2766 data->layers[index].active_rnd = 0;
2767 data->layers[index].active_clone = 0;
2768 data->layers[index].active_mask = 0;
2773 return &
data->layers[index];
2800 data,
type, alloctype, layerdata, totelem, name);
2819 data,
type, alloctype, layerdata, totelem, name);
2822 if (layer ==
nullptr) {
2834 const int n = index - index_first;
2837 if ((index_first == -1) || (n < 0)) {
2844 for (
int i = index + 1; i <
data->totlayer; i++) {
2845 data->layers[i - 1] =
data->layers[i];
2855 const int index_nonzero = n ? n : 1;
2858 for (layer = &
data->layers[i]; i < data->totlayer && layer->
type ==
type; i++, layer++) {
2859 if (layer->
active >= index_nonzero) {
2921 for (
int i = 0; i <
data->totlayer; i++) {
2922 if (
data->layers[i].type ==
type) {
2934 for (
int i = 0; i <
data->totlayer; i++) {
2944 const int layer_index,
2947 if (layer_index == -1) {
2960 if (typeInfo->
copy) {
2962 (
size_t)totelem, typeInfo->
size,
"CD duplicate ref layer");
2963 typeInfo->
copy(layer->
data, dst_data, totelem);
2964 layer->
data = dst_data;
3011 for (
int i = 0; i <
data->totlayer; i++) {
3012 if (
data->layers[i].anonymous_id == anonymous_id) {
3022 for (
int i = 0; i <
data->totlayer; i++) {
3032 if (layer_index == -1) {
3044 bool changed =
false;
3045 for (i = 0, j = 0; i <
data->totlayer; i++) {
3075 for (
int i = 0; i <
data->totlayer; i++) {
3086 if (typeInfo->
copy) {
3087 typeInfo->
copy(src_data_ofs, dst_data_ofs,
count);
3090 memcpy(dst_data_ofs, src_data_ofs, (
size_t)
count * typeInfo->
size);
3096 int src_layer_index,
3097 int dst_layer_index,
3104 const void *src_data = source->
layers[src_layer_index].
data;
3105 void *dst_data =
dest->layers[dst_layer_index].data;
3109 const size_t src_offset = (size_t)src_index * typeInfo->
size;
3110 const size_t dst_offset = (
size_t)dst_index * typeInfo->
size;
3112 if (!
count || !src_data || !dst_data) {
3113 if (
count && !(src_data ==
nullptr && dst_data ==
nullptr)) {
3115 "null data for %s type (%p --> %p), skipping",
3123 if (typeInfo->
copy) {
3138 for (
int src_i = 0; src_i < source->
totlayer; src_i++) {
3155 for (
int src_i = 0; src_i < source->
totlayer; src_i++) {
3160 while (dest_i < dest->totlayer &&
dest->layers[dest_i].type < source->
layers[src_i].
type) {
3165 if (dest_i >=
dest->totlayer) {
3186 int destination_index,
3190 if (source_layer_index == -1) {
3194 if (destinaiton_layer_index == -1) {
3200 destinaiton_layer_index,
3208 for (
int i = 0; i <
data->totlayer; i++) {
3212 if (typeInfo->
free) {
3213 size_t offset = (size_t)index * typeInfo->
size;
3221 #define SOURCE_BUF_SIZE 100
3225 const int *src_indices,
3226 const float *weights,
3227 const float *sub_weights,
3236 const void **sources = source_buf;
3245 float *default_weights =
nullptr;
3246 if (weights ==
nullptr) {
3248 static_cast<float *
>(
3250 default_weights_buf;
3252 weights = default_weights;
3257 for (
int src_i = 0; src_i < source->
totlayer; src_i++) {
3266 while (dest_i < dest->totlayer &&
dest->layers[dest_i].type < source->
layers[src_i].
type) {
3271 if (dest_i >=
dest->totlayer) {
3279 for (
int j = 0; j <
count; j++) {
3301 if (!
ELEM(default_weights,
nullptr, default_weights_buf)) {
3308 for (
int i = 0; i <
data->totlayer; i++) {
3311 if (typeInfo->
swap) {
3312 const size_t offset = (size_t)index * typeInfo->
size;
3321 char buff_static[256];
3323 if (index_a == index_b) {
3327 for (
int i = 0; i <
data->totlayer; i++) {
3329 const size_t size = typeInfo->
size;
3330 const size_t offset_a =
size * index_a;
3331 const size_t offset_b =
size * index_b;
3340 if (buff != buff_static) {
3352 if (layer_index == -1) {
3367 int layer_index =
data->typemap[
type];
3368 if (layer_index == -1) {
3380 if (layer_index == -1) {
3384 return data->layers[layer_index].data;
3391 if (layer_index == -1) {
3395 return data->layers[layer_index].data;
3401 if (layer_index == -1) {
3405 return data->layers[layer_index].data;
3412 if (layer_index == -1) {
3416 return data->layers[layer_index].offset;
3423 if (layer_index == -1) {
3427 return data->layers[layer_index].offset;
3434 if (layer_index == -1) {
3438 return data->layers[layer_index].offset;
3446 if ((layer_index == -1) || !name) {
3450 BLI_strncpy(
data->layers[layer_index].name, name,
sizeof(
data->layers[layer_index].name));
3459 return (layer_index == -1) ? nullptr :
data->layers[layer_index].name;
3467 if (layer_index == -1) {
3471 data->layers[layer_index].data =
ptr;
3480 if (layer_index == -1) {
3484 data->layers[layer_index].data =
ptr;
3498 if (typeInfo->
copy) {
3502 memcpy(
dest, source, typeInfo->
size);
3568 if (
data->totlayer) {
3625 dest->pool =
nullptr;
3633 void *tmp =
nullptr;
3648 void *tmp =
nullptr;
3667 if (*block ==
nullptr) {
3671 for (
int i = 0; i <
data->totlayer; i++) {
3675 if (typeInfo->
free) {
3682 if (
data->totsize) {
3691 if (block ==
nullptr) {
3694 for (
int i = 0; i <
data->totlayer; i++) {
3697 if (typeInfo->
free) {
3698 const size_t offset =
data->layers[i].offset;
3703 if (
data->totsize) {
3704 memset(block, 0,
data->totsize);
3714 if (
data->totsize > 0) {
3726 if (block ==
nullptr) {
3729 for (
int i = 0; i <
data->totlayer; i++) {
3732 const size_t offset =
data->layers[i].offset;
3734 if (typeInfo->
free) {
3758 if (*block ==
nullptr) {
3762 for (
int i = 0; i <
data->totlayer; i++) {
3775 const bool no_mask = (mask_exclude == 0);
3777 if (*dest_block ==
nullptr) {
3780 memset(*dest_block, 0,
dest->totsize);
3786 for (
int src_i = 0; src_i < source->
totlayer; src_i++) {
3791 while (dest_i < dest->totlayer &&
dest->layers[dest_i].type < source->
layers[src_i].
type) {
3797 if (dest_i >=
dest->totlayer) {
3808 if (typeInfo->
copy) {
3809 typeInfo->
copy(src_data, dest_data, 1);
3812 memcpy(dest_data, src_data, typeInfo->
size);
3824 while (dest_i < dest->totlayer) {
3842 if (layer_index == -1) {
3853 if (layer_index == -1) {
3862 if (n < 0 || n >=
data->totlayer) {
3895 for (
int i = 0; i <
data->totlayer; i++) {
3906 for (
int i = 0; i <
data->totlayer; i++) {
3909 if (typeInfo->
free) {
3920 for (
int i = 0; i <
data->totlayer; i++) {
3931 for (
int i = 0; i <
data->totlayer; i++) {
3951 memcpy(
dest, source, typeInfo->
size);
3956 int type,
const void *source,
void *
dest,
const int mixmode,
const float mixfactor)
3969 memcpy(
dest, source, typeInfo->
size);
3977 if (typeInfo->
equal) {
4015 if (typeInfo->
add) {
4029 if (typeInfo->
copy) {
4033 memcpy(
dest, source, typeInfo->
size);
4046 if (typeInfo->
copy) {
4050 memcpy(
dest, source, typeInfo->
size);
4063 if (typeInfo->
copy) {
4067 memcpy(
dest, source, typeInfo->
size);
4072 const void **src_blocks_ofs,
4073 const float *weights,
4074 const float *sub_weights,
4076 void *dst_block_ofs,
4085 typeInfo->
interp(src_blocks_ofs, weights, sub_weights,
count, dst_block_ofs);
4089 const void **src_blocks,
4090 const float *weights,
4091 const float *sub_weights,
4100 const void **sources = (
const void **)source_buf;
4109 float *default_weights =
nullptr;
4110 if (weights ==
nullptr) {
4113 default_weights_buf;
4115 weights = default_weights;
4119 for (
int i = 0; i <
data->totlayer; i++) {
4123 for (
int j = 0; j <
count; j++) {
4134 if (!
ELEM(default_weights,
nullptr, default_weights_buf)) {
4143 bool use_default_init)
4145 if (*dest_block ==
nullptr) {
4151 for (
int src_i = 0; src_i < source->
totlayer; src_i++) {
4156 while (dest_i < dest->totlayer &&
dest->layers[dest_i].type < source->
layers[src_i].
type) {
4157 if (use_default_init) {
4164 if (dest_i >=
dest->totlayer) {
4171 const void *src_data = source->
layers[src_i].
data;
4175 const size_t src_offset = (size_t)src_index * typeInfo->
size;
4192 if (use_default_init) {
4193 while (dest_i < dest->totlayer) {
4207 for (
int src_i = 0; src_i < source->
totlayer; src_i++) {
4212 while (dest_i < dest->totlayer &&
dest->layers[dest_i].type < source->
layers[src_i].
type) {
4217 if (dest_i >=
dest->totlayer) {
4227 (
size_t)dest_index * typeInfo->
size);
4229 if (typeInfo->
copy) {
4230 typeInfo->
copy(src_data, dst_data, 1);
4233 memcpy(dst_data, src_data, typeInfo->
size);
4259 if (layer.anonymous_id !=
nullptr) {
4262 layers_to_write.
append(layer);
4264 data.totlayer = layers_to_write.
size();
4272 return typeInfo->
size;
4290 return (typeInfo->
free !=
nullptr);
4311 for (
int i = 0; i <
data->totlayer; i++) {
4356 if (nlayer->
name[0] ==
'\0') {
4392 bool keeplayer =
true;
4400 if (!typeInfo->
defaultname && (index > 0) &&
data->layers[index - 1].type == layer->
type) {
4420 CLOG_WARN(&
LOG,
".blend file read: removing a data layer that should not have been written");
4425 for (
int i = index + 1; i <
data->totlayer; i++) {
4426 data->layers[i - 1] =
data->layers[i];
4444 switch (layer->
type) {
4462 CLOG_WARN(&
LOG,
"CustomDataLayer->data is NULL for type %d.", layer->
type);
4481 if (typeInfo->
validate !=
nullptr) {
4482 return typeInfo->
validate(layer->
data, totitems, do_fixes);
4494 for (i = 0, layer =
data->layers; i < data->totlayer; i++, layer++) {
4497 const char *structname;
4500 printf(
" dict(name='%s', struct='%s', type=%d, ptr='%p', elem=%d, length=%d),\n",
4504 (
const void *)layer->
data,
4531 for (
int i = 0; i <
data->totlayer; i++) {
4539 if (typeInfo->
free) {
4558 for (
int i = 0; i <
data->totlayer; i++) {
4559 layer = &
data->layers[i];
4586 for (
int i = 0; i <
data->totlayer; i++) {
4587 layer = &
data->layers[i];
4601 if (typeInfo->
read(cdf, layer->
data, totelem)) {
4632 for (
int i = 0; i <
data->totlayer; i++) {
4654 for (
int i = 0; i <
data->totlayer; i++) {
4671 CLOG_ERROR(&
LOG,
"Failed to open %s for writing.", filepath);
4677 for (i = 0; i <
data->totlayer; i++) {
4685 if (typeInfo->
write(cdf, layer->
data, totelem)) {
4698 if (i !=
data->totlayer) {
4705 for (i = 0; i <
data->totlayer; i++) {
4711 if (typeInfo->
free) {
4729 if (layer_index == -1) {
4740 external = MEM_cnew<CustomDataExternal>(__func__);
4741 data->external = external;
4753 if (layer_index == -1) {
4775 if (layer_index == -1) {
4791 #define COPY_BIT_FLAG(_type, _dst, _src, _f) \
4793 const _type _val = *((_type *)(_src)) & ((_type)(_f)); \
4794 *((_type *)(_dst)) &= ~((_type)(_f)); \
4795 *((_type *)(_dst)) |= _val; \
4799 switch (data_size) {
4817 #undef COPY_BIT_FLAG
4822 switch (data_size) {
4839 const void **sources,
4840 const float *weights,
4842 const float mix_factor)
4851 int best_src_idx = 0;
4853 const int data_type = laymap->
data_type;
4854 const int mix_mode = laymap->
mix_mode;
4873 data_size = (size_t)type_info->
size;
4874 interp_cd = type_info->
interp;
4875 copy_cd = type_info->
copy;
4880 if (
count > 1 && !interp_cd) {
4884 float tot_weight_true = 0.0f;
4885 int item_true_idx = -1, item_false_idx = -1;
4887 for (
int i = 0; i <
count; i++) {
4889 tot_weight_true += weights[i];
4896 best_src_idx = (tot_weight_true >= 0.5f) ? item_true_idx : item_false_idx;
4900 float max_weight = 0.0f;
4902 for (
int i = 0; i <
count; i++) {
4903 if (weights[i] > max_weight) {
4904 max_weight = weights[i];
4914 interp_cd(sources, weights,
nullptr,
count, tmp_dst);
4916 else if (data_flag) {
4917 copy_bit_flag(tmp_dst, sources[best_src_idx], data_size, data_flag);
4921 copy_cd(sources[best_src_idx], tmp_dst, 1);
4924 memcpy(tmp_dst, sources[best_src_idx], data_size);
4938 else if (!(data_type &
CD_FAKE)) {
4944 if (mix_factor >= 0.5f) {
4945 memcpy(data_dst, tmp_dst, data_size);
4954 const void **sources,
4955 const float *weights,
4957 const float mix_factor)
4962 const int data_type = laymap->
data_type;
4963 const int mix_mode = laymap->
mix_mode;
4979 interp_cd(sources, weights,
nullptr,
count, tmp_dst);
4980 if (space_transform) {
4992 const int totelem = me_remap->
items_num;
4994 const int data_type = laymap->
data_type;
4995 const void *data_src = laymap->
data_src;
5004 size_t tmp_buff_size = 32;
5005 const void **tmp_data_src =
nullptr;
5014 tmp_buff_size,
sizeof(*tmp_data_src), __func__);
5026 data_size = (size_t)type_info->
size;
5033 for (
int i = 0; i < totelem; i++, data_dst =
POINTER_OFFSET(data_dst, data_step), mapit++) {
5035 const float mix_factor = laymap->
mix_factor *
5044 if (
UNLIKELY(sources_num > tmp_buff_size)) {
5045 tmp_buff_size = (size_t)sources_num;
5046 tmp_data_src = (
const void **)
MEM_reallocN((
void *)tmp_data_src,
5047 sizeof(*tmp_data_src) * tmp_buff_size);
5050 for (
int j = 0; j < sources_num; j++) {
5051 const size_t src_idx = (size_t)mapit->
indices_src[j];
5052 tmp_data_src[j] =
POINTER_OFFSET(data_src, (data_step * src_idx) + data_offset);
5077 for (
int i = 0; i <
count; i++) {
5078 const MDisps *md = &mdlist[i];
5096 if (grid_paint_mask) {
5098 for (
int i = 0; i <
count; i++) {
5124 switch (layer.type) {
5133 BLO_write_raw(writer,
sizeof(
float) *
count,
static_cast<const float *
>(layer.data));
5136 BLO_write_raw(writer,
sizeof(
float) *
count,
static_cast<const float *
>(layer.data));
5148 BLO_write_raw(writer,
sizeof(
float) *
count,
static_cast<const float *
>(layer.data));
5151 const char *structname;
5155 int datasize = structnum *
count;
5159 printf(
"%s error: layer '%s':%d - can't be written to file\n",
5168 if (
data->external) {
5176 for (
int i = 0; i <
count; i++) {
5180 if (mdisps[i].totdisp && !mdisps[i].level) {
5185 float gridsize =
sqrtf(mdisps[i].totdisp);
5194 if (!external && !mdisps[i].disps) {
5205 if (grid_paint_mask) {
5206 for (
int i = 0; i <
count; i++) {
5229 while (i < data->totlayer) {
5245 "Allocated custom data layer that was not saved correctly for layer->type = %d.",
5285 const char *structname;
5290 "%sdict(name='%s', struct='%s', type=%d, ptr='%p', elem=%d, length=%d),\n",
5316 return &CPPType::get<float>();
5318 return &CPPType::get<float2>();
5320 return &CPPType::get<float3>();
5322 return &CPPType::get<int>();
5324 return &CPPType::get<ColorGeometry4f>();
5326 return &CPPType::get<bool>();
5328 return &CPPType::get<int8_t>();
5330 return &CPPType::get<ColorGeometry4b>();
5339 if (
type.is<
float>()) {
5348 if (
type.is<
int>()) {
5354 if (
type.is<
bool>()) {
typedef float(TangentPoint)[2]
void BKE_anonymous_attribute_id_decrement_weak(const AnonymousAttributeID *anonymous_id)
const char * BKE_anonymous_attribute_id_internal_name(const AnonymousAttributeID *anonymous_id)
void BKE_anonymous_attribute_id_increment_weak(const AnonymousAttributeID *anonymous_id)
CustomData interface, see also DNA_customdata_types.h.
void(* cd_datatransfer_interp)(const struct CustomDataTransferLayerMap *laymap, void *dest, const void **sources, const float *weights, int count, float mix_factor)
bool(* cd_validate)(void *item, uint totitems, bool do_fixes)
@ CDT_MIX_REPLACE_BELOW_THRESHOLD
@ CDT_MIX_REPLACE_ABOVE_THRESHOLD
void(* cd_copy)(const void *source, void *dest, int count)
#define CD_TYPE_AS_MASK(_type)
void(* cd_interp)(const void **sources, const float *weights, const float *sub_weights, int count, void *dest)
bool cdf_write_open(CDataFile *cdf, const char *filepath)
bool cdf_read_data(CDataFile *cdf, unsigned int size, void *data)
void cdf_read_close(CDataFile *cdf)
CDataFile * cdf_create(int type)
void cdf_write_close(CDataFile *cdf)
void cdf_free(CDataFile *cdf)
bool cdf_read_layer(CDataFile *cdf, CDataFileLayer *blay)
CDataFileLayer * cdf_layer_add(CDataFile *cdf, int type, const char *name, size_t datasize)
CDataFileLayer * cdf_layer_find(CDataFile *cdf, int type, const char *name)
bool cdf_write_layer(CDataFile *cdf, CDataFileLayer *blay)
bool cdf_read_open(CDataFile *cdf, const char *filepath)
bool cdf_write_data(CDataFile *cdf, unsigned int size, void *data)
int multires_mdisp_corners(const struct MDisps *s)
int BKE_ccg_gridsize(int level)
#define BLI_assert_unreachable()
#define BLI_assert_msg(a, msg)
#define BLI_BITMAP_SIZE(_num)
A dynamically sized string ADT.
void BLI_dynstr_appendf(DynStr *__restrict ds, const char *__restrict format,...) ATTR_PRINTF_FORMAT(2
void BLI_endian_switch_float_array(float *val, int size) ATTR_NONNULL(1)
void BLI_kdtree_nd_() free(KDTree *tree)
MINLINE unsigned char round_fl_to_uchar_clamp(float a)
MINLINE void blend_color_add_float(float dst[4], const float src1[4], const float src2[4])
MINLINE void blend_color_interpolate_byte(unsigned char dst[4], const unsigned char src1[4], const unsigned char src2[4], float t)
MINLINE void blend_color_sub_byte(unsigned char dst[4], const unsigned char src1[4], const unsigned char src2[4])
MINLINE void blend_color_mul_float(float dst[4], const float src1[4], const float src2[4])
MINLINE void blend_color_mul_byte(unsigned char dst[4], const unsigned char src1[4], const unsigned char src2[4])
MINLINE void blend_color_mix_float(float dst[4], const float src1[4], const float src2[4])
MINLINE void blend_color_sub_float(float dst[4], const float src1[4], const float src2[4])
MINLINE void blend_color_add_byte(unsigned char dst[4], const unsigned char src1[4], const unsigned char src2[4])
MINLINE void blend_color_mix_byte(unsigned char dst[4], const unsigned char src1[4], const unsigned char src2[4])
MINLINE void blend_color_interpolate_float(float dst[4], const float src1[4], const float src2[4], float t)
void BLI_space_transform_invert_normal(const struct SpaceTransform *data, float no[3])
MINLINE void mul_v4_fl(float r[4], float f)
MINLINE void add_v4_v4(float r[4], const float a[4])
MINLINE void copy_v4_v4(float r[4], const float a[4])
MINLINE void madd_v3_v3fl(float r[3], const float a[3], float f)
MINLINE float len_squared_v2v2(const float a[2], const float b[2]) ATTR_WARN_UNUSED_RESULT
MINLINE void madd_v2_v2fl(float r[2], const float a[2], float f)
MINLINE void mul_v3_v3v3(float r[3], const float a[3], const float b[3])
MINLINE float normalize_v3(float r[3])
MINLINE void sub_v3_v3v3(float r[3], const float a[3], const float b[3])
MINLINE void mul_v2_fl(float r[2], float f)
void interp_v2_v2v2(float r[2], const float a[2], const float b[2], float t)
MINLINE void copy_v2_v2(float r[2], const float a[2])
MINLINE void copy_v3_v3(float r[3], const float a[3])
void copy_vn_fl(float *array_tar, int size, float val)
void interp_v3_v3v3_slerp_safe(float target[3], const float a[3], const float b[3], float t)
void minmax_v2v2_v2(float min[2], float max[2], const float vec[2])
MINLINE void add_v2_v2(float r[2], const float a[2])
MINLINE void add_v3_v3v3(float r[3], const float a[3], const float b[3])
bool is_finite_v2(const float a[2]) ATTR_WARN_UNUSED_RESULT
MINLINE void copy_v3_v3_short(short r[3], const short a[3])
void minmax_v4v4_v4(float min[4], float max[4], const float vec[4])
MINLINE float normalize_v3_v3(float r[3], const float a[3])
void copy_vn_i(int *array_tar, int size, int val)
MINLINE void zero_v2(float r[2])
MINLINE void copy_v3_fl(float r[3], float f)
MINLINE void madd_v4_v4fl(float r[4], const float a[4], float f)
MINLINE void zero_v3(float r[3])
MINLINE void copy_v4_fl(float r[4], float f)
void BLI_mempool_free(BLI_mempool *pool, void *addr) ATTR_NONNULL(1
BLI_mempool * BLI_mempool_create(unsigned int esize, unsigned int elem_num, unsigned int pchunk, unsigned int flag) ATTR_MALLOC ATTR_WARN_UNUSED_RESULT ATTR_RETURNS_NONNULL
void * BLI_mempool_alloc(BLI_mempool *pool) ATTR_MALLOC ATTR_WARN_UNUSED_RESULT ATTR_RETURNS_NONNULL ATTR_NONNULL(1)
void BLI_mempool_destroy(BLI_mempool *pool) ATTR_NONNULL(1)
bool BLI_path_abs(char *path, const char *basepath) ATTR_NONNULL()
#define STRNCPY(dst, src)
char * BLI_strncpy(char *__restrict dst, const char *__restrict src, size_t maxncpy) ATTR_NONNULL()
bool BLI_uniquename_cb(UniquenameCheckCallback unique_check, void *arg, const char *defname, char delim, char *name, size_t name_len)
#define INIT_MINMAX2(min, max)
#define POINTER_OFFSET(v, ofs)
#define BLO_read_data_address(reader, ptr_p)
void BLO_write_float3_array(BlendWriter *writer, uint num, const float *data_ptr)
#define BLO_write_struct_array_at_address(writer, struct_name, array_size, address, data_ptr)
#define BLO_write_struct(writer, struct_name, data_ptr)
#define BLO_write_struct_array(writer, struct_name, array_size, data_ptr)
void BLO_write_struct_array_by_name(BlendWriter *writer, const char *struct_name, int array_size, const void *data_ptr)
bool BLO_read_requires_endian_switch(BlendDataReader *reader)
void BLO_write_raw(BlendWriter *writer, size_t size_in_bytes, const void *data_ptr)
bool BLO_write_is_undo(BlendWriter *writer)
#define CLOG_ERROR(clg_ref,...)
#define CLOG_WARN(clg_ref,...)
ID and Library types, which are fundamental for sdna.
#define ID_BLEND_PATH_FROM_GLOBAL(_id)
#define CD_MASK_SCULPT_FACE_SETS
#define CD_MASK_BM_ELEM_PYPTR
#define MAX_CUSTOMDATA_LAYER_NAME
#define CD_MASK_ORIGINDEX
#define CD_MASK_MDEFORMVERT
#define CD_MASK_TESSLOOPNORMAL
#define CD_MASK_MVERT_SKIN
#define CD_MASK_PREVIEW_MCOL
#define CD_MASK_FREESTYLE_FACE
#define CD_MASK_SHAPE_KEYINDEX
#define CD_MASK_ORIGSPACE_MLOOP
#define CD_MASK_CLOTH_ORCO
#define CD_MASK_PREVIEW_MLOOPCOL
#define CD_MASK_GRID_PAINT_MASK
#define CD_MASK_CUSTOMLOOPNORMAL
#define CD_MASK_FREESTYLE_EDGE
#define CD_MASK_ORIGSPACE
#define CD_MASK_MLOOPTANGENT
#define CD_MASK_PAINT_MASK
struct FreestyleEdge FreestyleEdge
struct MVertSkin MVertSkin
struct MStringProperty MStringProperty
struct GridPaintMask GridPaintMask
struct MDeformVert MDeformVert
struct OrigSpaceFace OrigSpaceFace
struct OrigSpaceLoop OrigSpaceLoop
struct MIntProperty MIntProperty
struct MFloatProperty MFloatProperty
struct FreestyleFace FreestyleFace
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint GLsizei GLsizei GLenum type _GL_VOID_RET _GL_VOID GLsizei GLenum GLenum const void *pixels _GL_VOID_RET _GL_VOID const void *pointer _GL_VOID_RET _GL_VOID GLdouble v _GL_VOID_RET _GL_VOID GLfloat v _GL_VOID_RET _GL_VOID GLint GLint i2 _GL_VOID_RET _GL_VOID GLint j _GL_VOID_RET _GL_VOID GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble GLdouble GLdouble zFar _GL_VOID_RET _GL_UINT GLdouble *equation _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLenum GLfloat *v _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLfloat *values _GL_VOID_RET _GL_VOID GLushort *values _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLenum GLdouble *params _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_BOOL GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLenum GLfloat param _GL_VOID_RET _GL_VOID GLenum GLint param _GL_VOID_RET _GL_VOID GLushort pattern _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint const GLdouble *points _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint GLdouble GLdouble GLint GLint const GLdouble *points _GL_VOID_RET _GL_VOID GLdouble GLdouble u2 _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLdouble GLdouble v2 _GL_VOID_RET _GL_VOID GLenum GLfloat param _GL_VOID_RET _GL_VOID GLenum GLint param _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLdouble GLdouble nz _GL_VOID_RET _GL_VOID GLfloat GLfloat nz _GL_VOID_RET _GL_VOID GLint GLint nz _GL_VOID_RET _GL_VOID GLshort GLshort nz _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_VOID GLsizei const GLfloat *values _GL_VOID_RET _GL_VOID GLsizei const GLushort *values _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID const GLuint const GLclampf *priorities _GL_VOID_RET _GL_VOID GLdouble y _GL_VOID_RET _GL_VOID GLfloat y _GL_VOID_RET _GL_VOID GLint y _GL_VOID_RET _GL_VOID GLshort y _GL_VOID_RET _GL_VOID GLdouble GLdouble z _GL_VOID_RET _GL_VOID GLfloat GLfloat z _GL_VOID_RET _GL_VOID GLint GLint z _GL_VOID_RET _GL_VOID GLshort GLshort z _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble w _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat w _GL_VOID_RET _GL_VOID GLint GLint GLint w _GL_VOID_RET _GL_VOID GLshort GLshort GLshort w _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble y2 _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat y2 _GL_VOID_RET _GL_VOID GLint GLint GLint y2 _GL_VOID_RET _GL_VOID GLshort GLshort GLshort y2 _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble z _GL_VOID_RET _GL_VOID GLdouble GLdouble z _GL_VOID_RET _GL_VOID GLuint *buffer _GL_VOID_RET _GL_VOID GLdouble t _GL_VOID_RET _GL_VOID GLfloat t _GL_VOID_RET _GL_VOID GLint t _GL_VOID_RET _GL_VOID GLshort t _GL_VOID_RET _GL_VOID GLdouble GLdouble r _GL_VOID_RET _GL_VOID GLfloat GLfloat r _GL_VOID_RET _GL_VOID GLint GLint r _GL_VOID_RET _GL_VOID GLshort GLshort r _GL_VOID_RET _GL_VOID GLdouble GLdouble r
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum type
Read Guarded memory(de)allocation.
#define MEM_recallocN(vmemh, len)
#define MEM_reallocN(vmemh, len)
Group Output data from inside of a node group A color picker Mix two input colors RGB to Convert a color s luminance to a grayscale value Generate a normal vector and a dot product Bright Control the brightness and contrast of the input color Vector Map an input vectors to used to fine tune the interpolation of the input Camera Retrieve information about the camera and how it relates to the current shading point s position Clamp a value between a minimum and a maximum Vector Perform vector math operation Invert a color
#define BM_ITER_ELEM(ele, iter, data, itype)
#define BM_ITER_MESH(ele, iter, bm, itype)
ATTR_WARN_UNUSED_RESULT BMesh * bm
const BMAllocTemplate bm_mesh_chunksize_default
ATTR_WARN_UNUSED_RESULT const BMLoop * l
static DBVT_INLINE btScalar size(const btDbvtVolume &a)
SIMD_FORCE_INLINE const btScalar & w() const
Return the w value.
constexpr const T * data() const
void append(const T &value)
void CustomData_debug_info_from_layers(const CustomData *data, const char *indent, DynStr *dynstr)
static void layerDefault_origindex(void *data, int count)
bool CustomData_set_layer_name(const CustomData *data, int type, int n, const char *name)
static void customData_free_layer__internal(CustomDataLayer *layer, int totelem)
static int layerMaxNum_tface()
static void layerInterp_mdeformvert(const void **sources, const float *weights, const float *UNUSED(sub_weights), int count, void *dest)
static void layerAdd_mloopuv(void *data1, const void *data2)
void CustomData_swap(CustomData *data, const int index_a, const int index_b)
static void layerDoMinMax_propcol(const void *data, void *vmin, void *vmax)
const CustomData_MeshMasks CD_MASK_EVERYTHING
static void layerInitMinMax_mloop_origspace(void *vmin, void *vmax)
void CustomData_bmesh_set(const CustomData *data, void *block, int type, const void *source)
int CustomData_get_layer_index_n(const CustomData *data, int type, int n)
void CustomData_set(const CustomData *data, int index, int type, const void *source)
static void write_mdisps(BlendWriter *writer, int count, const MDisps *mdlist, int external)
static void layerSwap_flnor(void *data, const int *corner_indices)
static bool layerValidate_mloopuv(void *data, const uint totitems, const bool do_fixes)
void CustomData_set_only_copy(const CustomData *data, eCustomDataMask mask)
void CustomData_bmesh_set_n(CustomData *data, void *block, int type, int n, const void *source)
void * CustomData_duplicate_referenced_layer(CustomData *data, const int type, const int totelem)
bool CustomData_free_layer_active(CustomData *data, int type, int totelem)
void * CustomData_add_layer(CustomData *data, int type, eCDAllocType alloctype, void *layerdata, int totelem)
static void CustomData_bmesh_alloc_block(CustomData *data, void **block)
void CustomData_external_add(CustomData *data, ID *UNUSED(id), int type, int UNUSED(totelem), const char *filepath)
static void layerInitMinMax_mloopcol(void *vmin, void *vmax)
const CustomData_MeshMasks CD_MASK_BAREMESH_ORIGINDEX
void CustomData_bmesh_copy_data(const CustomData *source, CustomData *dest, void *src_block, void **dest_block)
static const LayerTypeInfo LAYERTYPEINFO[CD_NUMTYPES]
bool CustomData_layer_has_interp(const CustomData *data, int layer_n)
void CustomData_free_layers(CustomData *data, int type, int totelem)
static bool layerRead_mdisps(CDataFile *cdf, void *data, int count)
static void layerMultiply_mloopuv(void *data, float fac)
bool CustomData_merge(const CustomData *source, CustomData *dest, eCustomDataMask mask, eCDAllocType alloctype, int totelem)
static bool layerEqual_mloopuv(const void *data1, const void *data2)
void customdata_data_transfer_interp_normal_normals(const CustomDataTransferLayerMap *laymap, void *data_dst, const void **sources, const float *weights, const int count, const float mix_factor)
static bool check_bit_flag(const void *data, const size_t data_size, const uint64_t flag)
static void layerInterp_mcol(const void **sources, const float *weights, const float *sub_weights, int count, void *dest)
void CustomData_blend_write(BlendWriter *writer, CustomData *data, Span< CustomDataLayer > layers_to_write, int count, eCustomDataMask cddata_mask, ID *id)
void CustomData_external_read(CustomData *data, ID *id, eCustomDataMask mask, int totelem)
void CustomData_interp(const CustomData *source, CustomData *dest, const int *src_indices, const float *weights, const float *sub_weights, int count, int dest_index)
void * CustomData_add_layer_anonymous(CustomData *data, int type, eCDAllocType alloctype, void *layerdata, int totelem, const AnonymousAttributeID *anonymous_id)
static bool layerEqual_mloop_origspace(const void *data1, const void *data2)
bool CustomData_free_layer(CustomData *data, int type, int totelem, int index)
static void layerCopy_propString(const void *source, void *dest, int count)
static void blend_read_mdisps(BlendDataReader *reader, int count, MDisps *mdisps, int external)
static void layerInterp_paint_mask(const void **sources, const float *weights, const float *UNUSED(sub_weights), int count, void *dest)
static void layerDoMinMax_mloopuv(const void *data, void *vmin, void *vmax)
void * CustomData_bmesh_get_n(const CustomData *data, void *block, int type, int n)
static int CustomData_get_layer_index__notypemap(const CustomData *data, int type)
void bpy_bm_generic_invalidate(struct BPy_BMGeneric *UNUSED(self))
void CustomData_data_mix_value(int type, const void *source, void *dest, const int mixmode, const float mixfactor)
void CustomData_bmesh_free_block(CustomData *data, void **block)
static bool CustomData_layer_ensure_data_exists(CustomDataLayer *layer, size_t count)
static void layerDefault_mvert_skin(void *data, int count)
void CustomData_set_layer_render(CustomData *data, int type, int n)
int CustomData_get_named_layer_index(const CustomData *data, int type, const char *name)
static void layerDefault_tface(void *data, int count)
static void customdata_data_transfer_interp_generic(const CustomDataTransferLayerMap *laymap, void *data_dst, const void **sources, const float *weights, const int count, const float mix_factor)
static const LayerTypeInfo * layerType_getInfo(int type)
static void * customData_duplicate_referenced_layer_index(CustomData *data, const int layer_index, const int totelem)
int CustomData_get_layer_index(const CustomData *data, int type)
const char * CustomData_get_layer_name(const CustomData *data, int type, int n)
int CustomData_get_stencil_layer_index(const CustomData *data, int type)
int CustomData_number_of_layers_typemask(const CustomData *data, eCustomDataMask mask)
bool CustomData_layertype_is_singleton(int type)
void CustomData_MeshMasks_update(CustomData_MeshMasks *mask_dst, const CustomData_MeshMasks *mask_src)
void CustomData_bmesh_init_pool(CustomData *data, int totelem, const char htype)
void CustomData_set_layer_stencil_index(CustomData *data, int type, int n)
static void layerCopy_propInt(const void *source, void *dest, int count)
static bool layerWrite_mdisps(CDataFile *cdf, const void *data, int count)
const char * CustomData_get_active_layer_name(const CustomData *data, const int type)
static void CustomData_bmesh_set_default_n(CustomData *data, void **block, int n)
int CustomData_get_active_layer(const CustomData *data, int type)
bool CustomData_data_equals(int type, const void *data1, const void *data2)
static void layerCopy_mvert_skin(const void *source, void *dest, int count)
void CustomData_bmesh_free_block_data_exclude_by_type(CustomData *data, void *block, const eCustomDataMask mask_exclude)
void customData_mask_layers__print(const CustomData_MeshMasks *mask)
void CustomData_bmesh_set_layer_n(CustomData *data, void *block, int n, const void *source)
void CustomData_reset(CustomData *data)
void * CustomData_get_n(const CustomData *data, int type, int index, int n)
bool CustomData_layer_has_math(const CustomData *data, int layer_n)
void * CustomData_set_layer_n(const CustomData *data, int type, int n, void *ptr)
void * CustomData_bmesh_get(const CustomData *data, void *block, int type)
static void write_grid_paint_mask(BlendWriter *writer, int count, const GridPaintMask *grid_paint_mask)
int CustomData_get_offset_named(const CustomData *data, int type, const char *name)
static bool customdata_unique_check(void *arg, const char *name)
static void layerDoMinMax_mloop_origspace(const void *data, void *vmin, void *vmax)
static void layerSwap_tface(void *data, const int *corner_indices)
bool CustomData_MeshMasks_are_matching(const CustomData_MeshMasks *mask_ref, const CustomData_MeshMasks *mask_required)
void CustomData_data_add(int type, void *data1, const void *data2)
void CustomData_copy_data_layer(const CustomData *source, CustomData *dest, int src_layer_index, int dst_layer_index, int src_index, int dst_index, int count)
bool CustomData_has_interp(const CustomData *data)
static void layerCopy_tface(const void *source, void *dest, int count)
void * CustomData_duplicate_referenced_layer_n(CustomData *data, const int type, const int n, const int totelem)
static const char * layerType_getName(int type)
bool CustomData_layer_validate(CustomDataLayer *layer, const uint totitems, const bool do_fixes)
void CustomData_bmesh_interp(CustomData *data, const void **src_blocks, const float *weights, const float *sub_weights, int count, void *dst_block)
const CustomData_MeshMasks CD_MASK_BAREMESH
static void layerFree_mdisps(void *data, int count, int UNUSED(size))
bool CustomData_has_layer(const CustomData *data, int type)
static void layerInitMinMax_mloopuv(void *vmin, void *vmax)
static void customData_update_offsets(CustomData *data)
static void layerInterp_shapekey(const void **sources, const float *weights, const float *UNUSED(sub_weights), int count, void *dest)
static void layerAdd_mloopcol(void *data1, const void *data2)
static void copy_bit_flag(void *dst, const void *src, const size_t data_size, const uint64_t flag)
static bool customData_resize(CustomData *data, int amount)
void CustomData_external_remove(CustomData *data, ID *id, int type, int totelem)
bool CustomData_is_referenced_layer(CustomData *data, int type)
static void layerDefault_propcol(void *data, int count)
static void layerCopy_propFloat(const void *source, void *dest, int count)
static void layerAdd_mloop_origspace(void *data1, const void *data2)
void CustomData_set_layer_render_index(CustomData *data, int type, int n)
static void layerSwap_origspace_face(void *data, const int *corner_indices)
void CustomData_set_layer_active(CustomData *data, int type, int n)
static void layerMultiply_propfloat3(void *data, float fac)
static void layerInterp_propfloat2(const void **sources, const float *weights, const float *UNUSED(sub_weights), int count, void *dest)
bool CustomData_layertype_is_dynamic(int type)
void * CustomData_get_layer(const CustomData *data, int type)
static void layerCopy_mdeformvert(const void *source, void *dest, int count)
static void layerMultiply_mloop_origspace(void *data, float fac)
static bool layerEqual_propcol(const void *data1, const void *data2)
int CustomData_layertype_layers_max(const int type)
static void layerInitMinMax_propcol(void *vmin, void *vmax)
void CustomData_free(CustomData *data, int totelem)
static void layerFree_mdeformvert(void *data, int count, int size)
void CustomData_bmesh_interp_n(CustomData *data, const void **src_blocks_ofs, const float *weights, const float *sub_weights, int count, void *dst_block_ofs, int n)
static void layerCopy_mdisps(const void *source, void *dest, int count)
static void layerCopyValue_mloopuv(const void *source, void *dest, const int mixmode, const float mixfactor)
void CustomData_data_copy_value(int type, const void *source, void *dest)
static void layerAdd_propfloat3(void *data1, const void *data2)
bool CustomData_free_layer_named(CustomData *data, const char *name, const int totelem)
bool CustomData_verify_versions(CustomData *data, int index)
static bool layerValidate_propfloat3(void *data, const uint totitems, const bool do_fixes)
void CustomData_external_reload(CustomData *data, ID *UNUSED(id), eCustomDataMask mask, int totelem)
int CustomData_get_n_offset(const CustomData *data, int type, int n)
void CustomData_clear_layer_flag(CustomData *data, int type, int flag)
void CustomData_free_temporary(CustomData *data, int totelem)
int CustomData_get_stencil_layer(const CustomData *data, int type)
static void layerInterp_mloopuv(const void **sources, const float *weights, const float *UNUSED(sub_weights), int count, void *dest)
int CustomData_get_clone_layer(const CustomData *data, int type)
static void blend_read_paint_mask(BlendDataReader *reader, int count, GridPaintMask *grid_paint_mask)
static void layerCopy_grid_paint_mask(const void *source, void *dest, int count)
void CustomData_free_typemask(CustomData *data, int totelem, eCustomDataMask mask)
const CustomData_MeshMasks CD_MASK_BMESH
static void layerCopy_origspace_face(const void *source, void *dest, int count)
void CustomData_update_typemap(CustomData *data)
void CustomData_blend_read(BlendDataReader *reader, CustomData *data, int count)
void CustomData_data_multiply(int type, void *data, float fac)
void CustomData_bmesh_set_default(CustomData *data, void **block)
const char * CustomData_layertype_name(int type)
static void layerAdd_propcol(void *data1, const void *data2)
void * CustomData_get(const CustomData *data, int index, int type)
static size_t layerFilesize_mdisps(CDataFile *UNUSED(cdf), const void *data, int count)
static void layerCopy_bmesh_elem_py_ptr(const void *UNUSED(source), void *dest, int count)
bool CustomData_bmesh_merge(const CustomData *source, CustomData *dest, eCustomDataMask mask, eCDAllocType alloctype, BMesh *bm, const char htype)
static void CustomData_external_free(CustomData *data)
static void layerInterp_propInt(const void **sources, const float *weights, const float *UNUSED(sub_weights), int count, void *dest)
void CustomData_layers__print(CustomData *data)
static void layerAdd_propfloat2(void *data1, const void *data2)
static CustomDataLayer * customData_add_layer__internal(CustomData *data, int type, eCDAllocType alloctype, void *layerdata, int totelem, const char *name)
static bool customdata_typemap_is_valid(const CustomData *data)
bool CustomData_has_referenced(const CustomData *data)
void CustomData_copy(const CustomData *source, CustomData *dest, eCustomDataMask mask, eCDAllocType alloctype, int totelem)
static bool layerEqual_mloopcol(const void *data1, const void *data2)
void CustomData_validate_layer_name(const CustomData *data, int type, const char *name, char *outname)
void * CustomData_add_layer_named(CustomData *data, int type, eCDAllocType alloctype, void *layerdata, int totelem, const char *name)
void * CustomData_bmesh_get_layer_n(const CustomData *data, void *block, int n)
void CustomData_data_transfer(const MeshPairRemap *me_remap, const CustomDataTransferLayerMap *laymap)
void CustomData_blend_write_prepare(CustomData &data, Vector< CustomDataLayer, 16 > &layers_to_write)
void CustomData_data_initminmax(int type, void *min, void *max)
static void layerFree_bmesh_elem_py_ptr(void *data, int count, int size)
int CustomData_number_of_layers(const CustomData *data, int type)
int CustomData_get_active_layer_index(const CustomData *data, int type)
void * CustomData_get_layer_n(const CustomData *data, int type, int n)
void CustomData_set_layer_clone(CustomData *data, int type, int n)
int CustomData_sizeof(int type)
void CustomData_set_layer_unique_name(CustomData *data, int index)
static void layerInterp_propfloat3(const void **sources, const float *weights, const float *UNUSED(sub_weights), int count, void *dest)
void CustomData_set_layer_active_index(CustomData *data, int type, int n)
static void layerDefault_mcol(void *data, int count)
static void layerMultiply_propcol(void *data, float fac)
static void customdata_external_filename(char filepath[FILE_MAX], ID *id, CustomDataExternal *external)
void CustomData_file_write_info(int type, const char **r_struct_name, int *r_struct_num)
bool CustomData_bmesh_has_free(const CustomData *data)
void CustomData_free_elem(CustomData *data, int index, int count)
static void layerInterp_origspace_face(const void **sources, const float *weights, const float *sub_weights, int count, void *dest)
void CustomData_copy_data(const CustomData *source, CustomData *dest, int source_index, int dest_index, int count)
static void layerInterp_mvert_skin(const void **sources, const float *weights, const float *UNUSED(sub_weights), int count, void *dest)
int CustomData_get_offset(const CustomData *data, int type)
bool CustomData_external_test(CustomData *data, int type)
static void layerCopyValue_propcol(const void *source, void *dest, const int mixmode, const float mixfactor)
static void layerDefault_origspace_face(void *data, int count)
void CustomData_realloc(CustomData *data, int totelem)
void * CustomData_set_layer(const CustomData *data, int type, void *ptr)
static void layerInterp_propcol(const void **sources, const float *weights, const float *UNUSED(sub_weights), int count, void *dest)
void CustomData_bmesh_copy_data_exclude_by_type(const CustomData *source, CustomData *dest, void *src_block, void **dest_block, const eCustomDataMask mask_exclude)
static void layerSwap_mcol(void *data, const int *corner_indices)
static void layerMultiply_propfloat2(void *data, float fac)
static bool layerValidate_propFloat(void *data, const uint totitems, const bool do_fixes)
static void layerInterp_propFloat(const void **sources, const float *weights, const float *UNUSED(sub_weights), int count, void *dest)
int CustomData_get_render_layer(const CustomData *data, int type)
const CustomData_MeshMasks CD_MASK_DERIVEDMESH
static void layerInterp_normal(const void **sources, const float *weights, const float *UNUSED(sub_weights), int count, void *dest)
static void layerInterp_mloopcol(const void **sources, const float *weights, const float *UNUSED(sub_weights), int count, void *dest)
static void layerCopyValue_normal(const void *source, void *dest, const int mixmode, const float mixfactor)
static void layerInterp_propbool(const void **sources, const float *weights, const float *UNUSED(sub_weights), int count, void *dest)
void CustomData_external_write(CustomData *data, ID *id, eCustomDataMask mask, int totelem, int free)
static bool cd_layer_find_dupe(CustomData *data, const char *name, int type, int index)
static void layerDefault_fmap(void *data, int count)
static void layerCopyValue_mloop_origspace(const void *source, void *dest, const int UNUSED(mixmode), const float UNUSED(mixfactor))
void * CustomData_get_layer_named(const CustomData *data, int type, const char *name)
static void layerDoMinMax_mloopcol(const void *data, void *vmin, void *vmax)
void CustomData_from_bmesh_block(const CustomData *source, CustomData *dest, void *src_block, int dest_index)
int CustomData_get_clone_layer_index(const CustomData *data, int type)
static void layerInterp_bweight(const void **sources, const float *weights, const float *UNUSED(sub_weights), int count, void *dest)
static const char * LAYERTYPENAMES[CD_NUMTYPES]
int CustomData_get_render_layer_index(const CustomData *data, int type)
void CustomData_set_layer_clone_index(CustomData *data, int type, int n)
void CustomData_copy_data_named(const CustomData *source, CustomData *dest, int source_index, int dest_index, int count)
void CustomData_copy_elements(int type, void *src_data_ofs, void *dst_data_ofs, int count)
void CustomData_duplicate_referenced_layers(CustomData *data, int totelem)
void CustomData_data_dominmax(int type, const void *data, void *min, void *max)
void * CustomData_duplicate_referenced_layer_named(CustomData *data, const int type, const char *name, const int totelem)
bool CustomData_has_math(const CustomData *data)
static void layerInterp_mloop_origspace(const void **sources, const float *weights, const float *UNUSED(sub_weights), int count, void *dest)
BLI_STATIC_ASSERT(ARRAY_SIZE(((CustomData *) nullptr) ->typemap)==CD_NUMTYPES, "size mismatch")
int CustomData_get_named_layer(const CustomData *data, int type, const char *name)
static void layerDefault_mloopcol(void *data, int count)
void CustomData_set_layer_flag(CustomData *data, int type, int flag)
void CustomData_to_bmesh_block(const CustomData *source, CustomData *dest, int src_index, void **dest_block, bool use_default_init)
static bool layerValidate_propfloat2(void *data, const uint totitems, const bool do_fixes)
void CustomData_copy_layer_type_data(const CustomData *source, CustomData *destination, int type, int source_index, int destination_index, int count)
const CustomData_MeshMasks CD_MASK_MESH
void CustomData_bmesh_free_block_data(CustomData *data, void *block)
#define COPY_BIT_FLAG(_type, _dst, _src, _f)
void CustomData_set_layer_stencil(CustomData *data, int type, int n)
static void layerFree_grid_paint_mask(void *data, int count, int UNUSED(size))
static void layerCopyValue_mloopcol(const void *source, void *dest, const int mixmode, const float mixfactor)
static void layerSwap_mdisps(void *data, const int *ci)
void CustomData_swap_corners(CustomData *data, int index, const int *corner_indices)
static void layerMultiply_mloopcol(void *data, float fac)
static void layerInterp_tface(const void **sources, const float *weights, const float *sub_weights, int count, void *dest)
void * CustomData_duplicate_referenced_layer_anonymous(CustomData *data, const int UNUSED(type), const AnonymousAttributeID *anonymous_id, const int totelem)
void CustomData_bmesh_update_active_layers(CustomData *fdata, CustomData *ldata)
SyclQueue void void * src
SyclQueue void void size_t num_bytes void
static const float data2[18 *GP_PRIM_DATABUF_SIZE]
static const float data1[33 *GP_PRIM_DATABUF_SIZE]
ccl_gpu_kernel_postfix ccl_global float int int int int float bool int offset
void *(* MEM_malloc_arrayN)(size_t len, size_t size, const char *str)
void(* MEM_freeN)(void *vmemh)
void *(* MEM_dupallocN)(const void *vmemh)
void *(* MEM_calloc_arrayN)(size_t len, size_t size, const char *str)
size_t(* MEM_allocN_len)(const void *vmemh)
void *(* MEM_mallocN)(size_t len, const char *str)
ccl_device_inline float2 interp(const float2 &a, const float2 &b, float t)
ccl_device_inline float4 mask(const int4 &mask, const float4 &a)
const blender::CPPType * custom_data_type_to_cpp_type(const eCustomDataType type)
eCustomDataType cpp_type_to_custom_data_type(const blender::CPPType &type)
static const pxr::TfToken b("b", pxr::TfToken::Immortal)
static const pxr::TfToken g("g", pxr::TfToken::Immortal)
static void update(bNodeTree *ntree)
static PropertyRNA * typemap[IDP_NUMTYPES]
unsigned __int64 uint64_t
const struct AnonymousAttributeID * anonymous_id
const float * mix_weights
cd_datatransfer_interp interp
struct BLI_mempool * pool
CustomDataExternal * external
bool(* write)(CDataFile *cdf, const void *data, int count)
void(* set_default)(void *data, int count)
void(* dominmax)(const void *data1, void *min, void *max)
void(* free)(void *data, int count, int size)
void(* add)(void *data1, const void *data2)
size_t(* filesize)(CDataFile *cdf, const void *data, int count)
void(* copyvalue)(const void *source, void *dest, const int mixmode, const float mixfactor)
bool(* read)(CDataFile *cdf, void *data, int count)
void(* initminmax)(void *min, void *max)
void(* swap)(void *data, const int *corner_indices)
bool(* equal)(const void *data1, const void *data2)
void(* multiply)(void *data, float fac)
MeshPairRemapItem * items