30 # include "winsock2.h"
36 #define DNA_DEPRECATED_ALLOW
97 #define U (*((const UserDef *)&U))
102 uint *mcol, *mcoln, *mcolmain;
113 mcoln[0] = mcol[mface->
v1];
114 mcoln[1] = mcol[mface->
v2];
115 mcoln[2] = mcol[mface->
v3];
116 mcoln[3] = mcol[mface->
v4];
146 for (bone = lb->
first; bone; bone = bone->
next) {
152 if (bone->
dist <= 0.0f) {
164 for (bone = lb->
first; bone; bone = bone->
next) {
165 if (bone->
layer == 0) {
209 if (nhs->
val == 0.0f) {
229 if (!
node->storage) {
241 image = (
Image *)nodeid;
242 iuser =
node->storage;
246 if (iuser->
flag & IMA_DO_PREMUL) {
266 if (prop->
len != i) {
267 printf(
"Found and fixed bad id property group length.\n");
289 int a, mtfacen, mcoln;
291 if (!me->vdata.totlayer) {
299 if (!me->edata.totlayer) {
318 for (
a = 0;
a < me->
totface;
a++, mtf++, tf++, mcol += 4) {
319 memcpy(mcol, tf->col,
sizeof(tf->col));
320 memcpy(mtf->uv, tf->uv,
sizeof(tf->uv));
340 if (layer->
name[0] == 0) {
342 strcpy(layer->
name,
"UVMap");
351 if (layer->
name[0] == 0) {
353 strcpy(layer->
name,
"Col");
391 iuser->
frames = nia->frames;
392 iuser->
sfra = nia->sfra;
393 iuser->
offset = nia->nr - 1;
394 iuser->
cycl = nia->cyclic;
397 node->storage = iuser;
437 for (con = lb->
first; con; con = con->
next) {
453 data->subtarget[0] =
'\0';
531 ob->colbits |= (1 <<
a);
662 for (j = 0; j < 4; j++) {
664 cp = ((
char *)&tface->col[j]) + 1;
665 for (k = 0; k < 3; k++) {
666 cp[k] = (cp[k] > 126) ? 255 : cp[k] * 2;
680 if (me->subdiv == 0) {
696 sipo->v2d.max[0] = 15000.0;
744 TFace *tface = me->tface;
746 for (b = 0; b < 4; b++) {
747 tface->uv[b][0] /= 32767.0f;
748 tface->uv[b][1] /= 32767.0f;
761 if (sound->
volume < 0.01f) {
779 sound->
flags |= SOUND_FLAGS_3D;
782 sound->
flags &= ~SOUND_FLAGS_3D;
796 ME_SUBSURF = (1 << 7),
798 if (me->
flag & ME_SMESH) {
799 me->
flag &= ~ME_SMESH;
800 me->
flag |= ME_SUBSURF;
805 if (me->subdiv < 2) {
826 for (i = 0; i < me->
totface * 4; i++) {
834 for (i = 0; i < me->
totface; i++) {
835 TFace *tf = &((TFace *)me->tface)[i];
837 for (j = 0; j < 4; j++) {
838 char *
col = (
char *)&tf->col[j];
872 enum { ME_SUBSURF = (1 << 7) };
873 if ((me->
flag & ME_SUBSURF) && (me->subdivr == 0)) {
874 me->subdivr = me->subdiv;
879 sce->
r.stereomode = 1;
889 for (sl =
area->spacedata.first; sl; sl = sl->
next) {
892 sseq->v2d.keeptot = 0;
919 for (curcon = list->
first; curcon; curcon = curcon->
next) {
962 for (sl =
area->spacedata.first; sl; sl = sl->
next) {
965 sac->v2d.max[0] = 32000;
969 sla->v2d.max[0] = 32000;
994 for (curcon = list->
first; curcon; curcon = curcon->
next) {
1029 for (sl =
area->spacedata.first; sl; sl = sl->
next) {
1033 sbuts->v2d.maxzoom = 1.2f;
1035 if (sbuts->
mainb == BUTS_LAMP) {
1036 sbuts->
mainb = CONTEXT_SHADING;
1039 else if (sbuts->
mainb == BUTS_MAT) {
1040 sbuts->
mainb = CONTEXT_SHADING;
1043 else if (sbuts->
mainb == BUTS_TEX) {
1044 sbuts->
mainb = CONTEXT_SHADING;
1047 else if (sbuts->
mainb == BUTS_ANIM) {
1048 sbuts->
mainb = CONTEXT_OBJECT;
1050 else if (sbuts->
mainb == BUTS_WORLD) {
1051 sbuts->
mainb = CONTEXT_SCENE;
1054 else if (sbuts->
mainb == BUTS_RENDER) {
1055 sbuts->
mainb = CONTEXT_SCENE;
1058 else if (sbuts->
mainb == BUTS_FPAINT) {
1059 sbuts->
mainb = CONTEXT_EDITING;
1061 else if (sbuts->
mainb == BUTS_RADIO) {
1062 sbuts->
mainb = CONTEXT_SHADING;
1065 else if (sbuts->
mainb == BUTS_CONSTRAINT) {
1066 sbuts->
mainb = CONTEXT_OBJECT;
1068 else if (sbuts->
mainb == BUTS_SCRIPT) {
1069 sbuts->
mainb = CONTEXT_OBJECT;
1071 else if (sbuts->
mainb == BUTS_EDIT) {
1072 sbuts->
mainb = CONTEXT_EDITING;
1075 sbuts->
mainb = CONTEXT_SCENE;
1099 for (sl =
area->spacedata.first; sl; sl = sl->
next) {
1103 sac->v2d.maxzoom = 50;
1134 screen = screen->
id.
next;
1166 if (wrld->
aodist == 0.0f) {
1182 for (sl =
area->spacedata.first; sl; sl = sl->
next) {
1186 snla->v2d.maxzoom = 50;
1200 for (sl =
area->spacedata.first; sl; sl = sl->
next) {
1217 for (sl =
area->spacedata.first; sl; sl = sl->
next) {
1264 printf(
"NOTE: ortho render has changed, tweak new Camera 'scale' value.\n");
1331 enum { ARM_DRAWXRAY = (1 << 1) };
1332 if (arm->
flag & ARM_DRAWXRAY) {
1340 ME_SUBSURF = (1 << 7),
1341 ME_OPT_EDGES = (1 << 8),
1344 if ((me->
flag & ME_SUBSURF)) {
1353 if (me->subdiv != 0) {
1356 if (me->subdivr != 0) {
1360 if (me->
flag & ME_OPT_EDGES) {
1404 if (lt->
fu == 0.0f && lt->
fv == 0.0f && lt->
fw == 0.0f) {
1453 data->weight = 1.0f;
1454 data->orientweight = 1.0f;
1458 data->rootbone = -1;
1470 if (paf->
disp == 0) {
1476 if (paf->
omat == 0) {
1502 if (kb->
name[0] == 0) {
1503 strcpy(kb->
name,
"Basis");
1507 if (kb->
name[0] == 0) {
1521 int set_passepartout = 0;
1542 if (arm->
layer == 0) {
1547 for (; sce; sce = sce->
id.
next) {
1549 set_passepartout = 1;
1554 for (; cam; cam = cam->
id.
next) {
1555 if (set_passepartout) {
1581 if (arm->
layer == 0) {
1638 strcpy(ima->
id.
name + 2,
"Viewer Node");
1639 strcpy(ima->
filepath,
"Viewer Node");
1665 for (sl =
area->spacedata.first; sl; sl = sl->
next) {
1679 R_THREADS = (1 << 19),
1685 if (sce->
r.
mode & R_THREADS) {
1705 for (bezt = nu->
bezt,
a = 0; a < nu->pntsu;
a++, bezt++) {
1712 for (bp = nu->
bp,
a = 0; a < nu->pntsu * nu->
pntsv;
a++, bp++) {
1731 for (curcon = list->
first; curcon; curcon = curcon->
next) {
1732 switch (curcon->
type) {
1737 if (
data->flag == 0) {
1753 switch (curcon->
type) {
1766 if (
data->flag == 0) {
1800 if (collection->layer == 0) {
1801 collection->layer = (1 << 20) - 1;
1830 TEX_ANIMCYCLIC = (1 << 6),
1831 TEX_ANIM5 = (1 << 7),
1872 for (; ob; ob = ob->
id.
next) {
1877 if (curdef->
name[0] ==
'\0') {
1890 switch (mmd->axis) {
1928 for (sl =
area->spacedata.first; sl; sl = sl->
next) {
1932 saction->v2d.tot.ymin = -1000.0;
1933 saction->v2d.tot.ymax = 0.0;
1935 saction->v2d.cur.ymin = -75.0;
1936 saction->v2d.cur.ymax = 5.0;
1968 for (curcon = list->
first; curcon; curcon = curcon->
next) {
1970 if (curcon->
flag & 0x20) {
1975 switch (curcon->
type) {
2001 if (curcon->
flag & 0x20) {
2006 switch (curcon->
type) {
2038 if (ob->
soft && !ob->
soft->pointcache) {
2046 printf(
"Old memory cache isn't supported for particles, so re-bake the simulation!\n");
2078 if (ma->gloss_mir == 0.0f) {
2079 ma->gloss_mir = 1.0f;
2188 for (k = 0; k < sb->
totkey; k++) {
2212 for (k = 0; k < sb->
totkey; k++) {
2252 "ParticleSystem %i",
2270 part->force_group = paf->
group;
2286 float fac = paf->
lifetime / 100.0f;
2320 for (; dup; dup = dup->
id.
next) {
2344 printf(
"Old particle system converted to new system.\n");
2384 for (strip = ob->nlastrips.first; strip; strip = strip->
next) {
2385 float length, actlength, repeat;
2401 if (strip->
scale == 0.0f) {
2402 strip->
scale = 1.0f;
2460 if (ob->fluidsimSettings) {
2499 if (nu->
pntsv > 1) {
2527 for (sl =
area->spacedata.first; sl; sl = sl->
next) {
2570 if (seq->strip && seq->strip->proxy) {
2571 seq->strip->proxy->quality = 90;
Blender kernel action and pose functionality.
void BKE_pose_tag_recalc(struct Main *bmain, struct bPose *pose)
void BKE_armature_where_is(struct bArmature *arm)
struct bConstraint * BKE_constraint_add_for_object(struct Object *ob, const char *name, short type)
void * CustomData_add_layer(struct CustomData *data, int type, eCDAllocType alloctype, void *layer, int totelem)
void calc_lat_fudu(int flag, int res, float *r_fu, float *r_du)
#define MAIN_VERSION_ATLEAST(main, ver, subver)
void BKE_mesh_strip_loose_faces(struct Mesh *me)
void BKE_mesh_calc_edges_legacy(struct Mesh *me, const bool use_old)
void BKE_mesh_update_customdata_pointers(struct Mesh *me, const bool do_ensure_tess_cd)
const ModifierTypeInfo * BKE_modifier_get_info(ModifierType type)
struct ModifierData * BKE_modifiers_findby_type(const struct Object *ob, ModifierType type)
struct ModifierData * BKE_modifier_new(int type)
@ eModifierTypeType_OnlyDeform
bool BKE_modifier_unique_name(struct ListBase *modifiers, struct ModifierData *md)
#define CMP_NODE_ALPHAOVER
General operations, lookup, etc. for blender objects.
struct PartEff * BKE_object_do_version_give_parteff_245(struct Object *ob)
struct ParticleSettings * BKE_particlesettings_add(struct Main *bmain, const char *name)
struct PointCache * BKE_ptcache_add(struct ListBase *ptcaches)
void * BLI_pophead(ListBase *listbase) ATTR_NONNULL(1)
void BLI_addhead(struct ListBase *listbase, void *vlink) ATTR_NONNULL(1)
#define LISTBASE_FOREACH(type, var, list)
void BLI_addtail(struct ListBase *listbase, void *vlink) ATTR_NONNULL(1)
int BLI_findindex(const struct ListBase *listbase, const void *vlink) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
void BLI_insertlinkbefore(struct ListBase *listbase, void *vnextlink, void *vnewlink) ATTR_NONNULL(1)
int BLI_listbase_count(const struct ListBase *listbase) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
void unit_m4(float m[4][4])
MINLINE void mul_v3_fl(float r[3], float f)
MINLINE void copy_v3_v3(float r[3], const float a[3])
MINLINE void add_v3_v3v3(float r[3], const float a[3], const float b[3])
size_t BLI_snprintf(char *__restrict dst, size_t maxncpy, const char *__restrict format,...) ATTR_NONNULL(1
char * BLI_strncpy(char *__restrict dst, const char *__restrict src, const size_t maxncpy) ATTR_NONNULL()
#define STREQLEN(a, b, n)
Compatibility-like things for windows.
external readfile function prototypes.
Object groups, one object can be in many groups at once.
@ CONSTRAINT_TYPE_TRACKTO
@ CONSTRAINT_TYPE_LOCLIKE
@ CONSTRAINT_TYPE_ROTLIKE
@ CONSTRAINT_TYPE_KINEMATIC
@ CONSTRAINT_TYPE_LOCLIMIT
@ CONSTRAINT_TYPE_FOLLOWPATH
#define LA_FALLOFF_INVLINEAR
@ eModifierType_ParticleSystem
@ eSubsurfModifierFlag_Incremental
@ eSubsurfModifierFlag_DebugIncr
@ eSubsurfModifierFlag_ControlEdges
#define OB_FLUIDSIM_PARTICLE
Object is a sort of wrapper for general info.
#define PART_HAIR_BSPLINE
#define PTCACHE_DISK_CACHE
#define PE_DEFLECT_EMITTER
#define V3D_SELECT_OUTLINE
Read Guarded memory(de)allocation.
Group RGB to Bright Vector Camera Vector Combine Material Light Line Style Layer Add Ambient Diffuse Glossy Refraction Transparent Toon Principled Hair Volume Principled Light Particle Volume Image Sky Noise Wave Voronoi Brick Texture Vector Combine Vertex Separate Vector White RGB Map Separate Set Z Dilate Combine Combine Color Channel CMP_NODE_SPLITVIEWER
Group RGB to Bright Vector Camera Vector Combine Material Light Line Style Layer Add Ambient Diffuse Glossy Refraction Transparent Toon Principled Hair Volume Principled Light Particle Volume TEX_IMAGE
Group RGB to Bright Vector Camera Vector Combine Material Light Line Style Layer Add Ambient Diffuse Glossy Refraction Transparent Toon Principled Hair Volume Principled Light Particle Volume Image Sky Noise Wave Voronoi Brick Texture Vector Combine Vertex Separate Vector White RGB CMP_NODE_BLUR
Group RGB to Bright Vector Camera Vector Combine Material Light Line Style Layer Add Ambient Diffuse Glossy Refraction Transparent Toon Principled Hair Volume Principled Light Particle Volume Image Sky Noise Wave Voronoi Brick Texture Vector Combine Vertex Separate Vector White CMP_NODE_VIEWER
Group RGB to Bright Vector Camera Vector Combine Material Light Line Style Layer Add Ambient Diffuse Glossy Refraction Transparent Toon Principled Hair Volume Principled Light Particle Volume Image Sky Noise Wave Voronoi Brick Texture Vector Combine Vertex Separate Vector White RGB Map Separate Set CMP_NODE_IMAGE
Platform independent time functions.
#define SEQ_ALL_BEGIN(ed, _seq)
SIMD_FORCE_INLINE btScalar length(const btQuaternion &q)
Return the length of a quaternion.
struct PreviewImage * preview
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_callocN)(size_t len, const char *str)
static void area(int d1, int d2, int e1, int e2, float weights[2])
void blo_do_versions_oldnewmap_insert(OldNewMap *onm, const void *oldaddr, void *newaddr, int nr)
void * blo_do_versions_newlibadr(FileData *fd, const void *lib, const void *adr)
ListBase * SEQ_active_seqbase_get(const Editing *ed)
struct PointCache * point_cache
struct OldNewMap * libmap
struct FluidsimSettings * fss
struct FluidVertexVelocity * meshVelocities
struct CurveMapping * curfalloff
struct bNodeTree * nodetree
struct MDeformVert * dvert
struct CustomData vdata edata fdata
struct ModifierData * next
float instance_faces_scale
struct Collection * group
ParticleBrushData brush[7]
struct Object * instance_object
struct ParticleSystem * psys
struct ParticleSystem * next
struct PointCache * pointcache
struct bNodeTree * nodetree
struct ToolSettings * toolsettings
struct bActionStrip * next
struct bConstraint * next
struct bPoseChannel * next
struct PackedFile * packedfile
struct PackedFile * newpackedfile
double PIL_check_seconds_timer(void)
__forceinline const avxi srl(const avxi &a, const int32_t b)
ccl_device_inline float3 ceil(const float3 &a)
static void bone_version_239(ListBase *lb)
static void do_version_free_effects_245(ListBase *lb)
static void idproperties_fix_groups_lengths_recurse(IDProperty *prop)
void blo_do_version_old_trackto_to_constraints(Object *ob)
static void ntree_version_242(bNodeTree *ntree)
static void ntree_version_241(bNodeTree *ntree)
static void do_version_constraints_245(ListBase *lb)
static void ntree_version_245(FileData *fd, Library *lib, bNodeTree *ntree)
static void do_version_bone_head_tail_237(Bone *bone)
static void customdata_version_243(Mesh *me)
static void customdata_version_242(Mesh *me)
static void bone_version_238(ListBase *lb)
static void do_version_free_effect_245(Effect *eff)
static void do_version_ntree_242_2(bNodeTree *ntree)
static void vcol_to_fcol(Mesh *me)
static void idproperties_fix_group_lengths(ListBase idlist)
void blo_do_versions_pre250(FileData *fd, Library *lib, Main *bmain)