forked from bartvdbraak/blender
made texflag a short everywhere (only stores one flag)
fix for crash with separate (missing NULL check)
This commit is contained in:
parent
a6645bfafb
commit
a28b9512fe
@ -114,7 +114,7 @@ int ray_hit_boundbox(struct BoundBox *bb, float ray_start[3], float ray_normal[3
|
||||
void object_handle_update(struct Scene *scene, struct Object *ob);
|
||||
|
||||
float give_timeoffset(struct Object *ob);
|
||||
int give_obdata_texspace(struct Object *ob, int **texflag, float **loc, float **size, float **rot);
|
||||
int give_obdata_texspace(struct Object *ob, short **texflag, float **loc, float **size, float **rot);
|
||||
|
||||
int object_insert_ptcache(struct Object *ob);
|
||||
// void object_delete_ptcache(struct Object *ob, int index);
|
||||
|
@ -1102,7 +1102,7 @@ ParticleSystem *copy_particlesystem(ParticleSystem *psys)
|
||||
pa->hair = MEM_dupallocN(pa->hair);
|
||||
}
|
||||
|
||||
if(psysn->particles->keys || psysn->particles->boid) {
|
||||
if(psysn->particles && (psysn->particles->keys || psysn->particles->boid)) {
|
||||
ParticleKey *key = psysn->particles->keys;
|
||||
BoidParticle *boid = psysn->particles->boid;
|
||||
|
||||
@ -2475,7 +2475,7 @@ float give_timeoffset(Object *ob) {
|
||||
}
|
||||
}
|
||||
|
||||
int give_obdata_texspace(Object *ob, int **texflag, float **loc, float **size, float **rot) {
|
||||
int give_obdata_texspace(Object *ob, short **texflag, float **loc, float **size, float **rot) {
|
||||
|
||||
if (ob->data==NULL)
|
||||
return 0;
|
||||
|
@ -1258,7 +1258,7 @@ static void copymenu_modifiers(Scene *scene, View3D *v3d, Object *ob)
|
||||
static void copy_texture_space(Object *to, Object *ob)
|
||||
{
|
||||
float *poin1= NULL, *poin2= NULL;
|
||||
int texflag= 0;
|
||||
short texflag= 0;
|
||||
|
||||
if(ob->type==OB_MESH) {
|
||||
texflag= ((Mesh *)ob->data)->texflag;
|
||||
|
@ -292,7 +292,7 @@ static void createTransTexspace(bContext *C, TransInfo *t)
|
||||
TransData *td;
|
||||
Object *ob;
|
||||
ID *id;
|
||||
int *texflag;
|
||||
short *texflag;
|
||||
|
||||
ob = OBACT;
|
||||
|
||||
|
@ -174,7 +174,7 @@ typedef struct Curve {
|
||||
float size[3];
|
||||
float rot[3];
|
||||
|
||||
int texflag; /* keep an int because of give_obdata_texspace() */
|
||||
short texflag, pad1; /* keep a short because of give_obdata_texspace() */
|
||||
|
||||
short drawflag, twist_mode, pad[2];
|
||||
float twist_smooth, pad2;
|
||||
|
@ -77,7 +77,7 @@ typedef struct MetaBall {
|
||||
|
||||
char flag, flag2; /* flag is enum for updates, flag2 is bitflags for settings */
|
||||
short totcol;
|
||||
int texflag; /* used to store MB_AUTOSPACE */
|
||||
short texflag, pad; /* used to store MB_AUTOSPACE */
|
||||
|
||||
/* texture space, copied as one block in editobject.c */
|
||||
float loc[3];
|
||||
|
Loading…
Reference in New Issue
Block a user