Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2018-08-14 03:02:43 +0300
committerCampbell Barton <ideasman42@gmail.com>2018-08-14 03:08:34 +0300
commit5e8dbafb5b211f9a2c7de5580a7e83254706521b (patch)
tree3d24a17ec7508ce349f0dcd26ee476835c2f7a17 /source/blender/editors/physics/particle_object.c
parentefdc0959b17fba969b25bcbf7318322a01d791d0 (diff)
parent98f4a8eedf218c240adbac586fed02cfe51e01a9 (diff)
Merge branch 'master' into blender2.8
Diffstat (limited to 'source/blender/editors/physics/particle_object.c')
-rw-r--r--source/blender/editors/physics/particle_object.c140
1 files changed, 70 insertions, 70 deletions
diff --git a/source/blender/editors/physics/particle_object.c b/source/blender/editors/physics/particle_object.c
index 4431e4f4a54..fa272ffe34d 100644
--- a/source/blender/editors/physics/particle_object.c
+++ b/source/blender/editors/physics/particle_object.c
@@ -82,7 +82,7 @@ static float I[4][4] = {{1.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 1.0f, 0.0f, 0.0f}, {0.0
static int particle_system_add_exec(bContext *C, wmOperator *UNUSED(op))
{
Main *bmain = CTX_data_main(C);
- Object *ob= ED_object_context(C);
+ Object *ob = ED_object_context(C);
Scene *scene = CTX_data_scene(C);
if (!scene || !ob)
@@ -90,8 +90,8 @@ static int particle_system_add_exec(bContext *C, wmOperator *UNUSED(op))
object_add_particle_system(bmain, scene, ob, NULL);
- WM_event_add_notifier(C, NC_OBJECT|ND_PARTICLE, ob);
- WM_event_add_notifier(C, NC_OBJECT|ND_POINTCACHE, ob);
+ WM_event_add_notifier(C, NC_OBJECT | ND_PARTICLE, ob);
+ WM_event_add_notifier(C, NC_OBJECT | ND_POINTCACHE, ob);
return OPERATOR_FINISHED;
}
@@ -108,7 +108,7 @@ void OBJECT_OT_particle_system_add(wmOperatorType *ot)
ot->exec = particle_system_add_exec;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
static int particle_system_remove_exec(bContext *C, wmOperator *UNUSED(op))
@@ -131,13 +131,13 @@ static int particle_system_remove_exec(bContext *C, wmOperator *UNUSED(op))
if (mode_orig & OB_MODE_PARTICLE_EDIT) {
if ((ob->mode & OB_MODE_PARTICLE_EDIT) == 0) {
if (view_layer->basact && view_layer->basact->object == ob) {
- WM_event_add_notifier(C, NC_SCENE|ND_MODE|NS_MODE_OBJECT, NULL);
+ WM_event_add_notifier(C, NC_SCENE | ND_MODE | NS_MODE_OBJECT, NULL);
}
}
}
- WM_event_add_notifier(C, NC_OBJECT|ND_PARTICLE, ob);
- WM_event_add_notifier(C, NC_OBJECT|ND_POINTCACHE, ob);
+ WM_event_add_notifier(C, NC_OBJECT | ND_PARTICLE, ob);
+ WM_event_add_notifier(C, NC_OBJECT | ND_POINTCACHE, ob);
return OPERATOR_FINISHED;
}
@@ -154,7 +154,7 @@ void OBJECT_OT_particle_system_remove(wmOperatorType *ot)
ot->exec = particle_system_remove_exec;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
/********************** new particle settings operator *********************/
@@ -167,7 +167,7 @@ static bool psys_poll(bContext *C)
static int new_particle_settings_exec(bContext *C, wmOperator *UNUSED(op))
{
- Main *bmain= CTX_data_main(C);
+ Main *bmain = CTX_data_main(C);
ParticleSystem *psys;
ParticleSettings *part = NULL;
Object *ob;
@@ -179,11 +179,11 @@ static int new_particle_settings_exec(bContext *C, wmOperator *UNUSED(op))
/* add or copy particle setting */
if (psys->part)
- part= BKE_particlesettings_copy(bmain, psys->part);
+ part = BKE_particlesettings_copy(bmain, psys->part);
else
- part= BKE_particlesettings_add(bmain, "ParticleSettings");
+ part = BKE_particlesettings_add(bmain, "ParticleSettings");
- ob= ptr.id.data;
+ ob = ptr.id.data;
if (psys->part)
id_us_min(&psys->part->id);
@@ -195,7 +195,7 @@ static int new_particle_settings_exec(bContext *C, wmOperator *UNUSED(op))
DEG_relations_tag_update(bmain);
DEG_id_tag_update(&ob->id, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_OBJECT|ND_PARTICLE, ob);
+ WM_event_add_notifier(C, NC_OBJECT | ND_PARTICLE, ob);
return OPERATOR_FINISHED;
}
@@ -212,7 +212,7 @@ void PARTICLE_OT_new(wmOperatorType *ot)
ot->poll = psys_poll;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
/********************** keyed particle target operators *********************/
@@ -221,7 +221,7 @@ static int new_particle_target_exec(bContext *C, wmOperator *UNUSED(op))
{
Main *bmain = CTX_data_main(C);
PointerRNA ptr = CTX_data_pointer_get_type(C, "particle_system", &RNA_ParticleSystem);
- ParticleSystem *psys= ptr.data;
+ ParticleSystem *psys = ptr.data;
Object *ob = ptr.id.data;
ParticleTarget *pt;
@@ -230,7 +230,7 @@ static int new_particle_target_exec(bContext *C, wmOperator *UNUSED(op))
return OPERATOR_CANCELLED;
pt = psys->targets.first;
- for (; pt; pt=pt->next)
+ for (; pt; pt = pt->next)
pt->flag &= ~PTARGET_CURRENT;
pt = MEM_callocN(sizeof(ParticleTarget), "keyed particle target");
@@ -243,7 +243,7 @@ static int new_particle_target_exec(bContext *C, wmOperator *UNUSED(op))
DEG_relations_tag_update(bmain);
DEG_id_tag_update(&ob->id, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_OBJECT|ND_PARTICLE, ob);
+ WM_event_add_notifier(C, NC_OBJECT | ND_PARTICLE, ob);
return OPERATOR_FINISHED;
}
@@ -259,14 +259,14 @@ void PARTICLE_OT_new_target(wmOperatorType *ot)
ot->exec = new_particle_target_exec;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
static int remove_particle_target_exec(bContext *C, wmOperator *UNUSED(op))
{
Main *bmain = CTX_data_main(C);
PointerRNA ptr = CTX_data_pointer_get_type(C, "particle_system", &RNA_ParticleSystem);
- ParticleSystem *psys= ptr.data;
+ ParticleSystem *psys = ptr.data;
Object *ob = ptr.id.data;
ParticleTarget *pt;
@@ -275,7 +275,7 @@ static int remove_particle_target_exec(bContext *C, wmOperator *UNUSED(op))
return OPERATOR_CANCELLED;
pt = psys->targets.first;
- for (; pt; pt=pt->next) {
+ for (; pt; pt = pt->next) {
if (pt->flag & PTARGET_CURRENT) {
BLI_remlink(&psys->targets, pt);
MEM_freeN(pt);
@@ -291,7 +291,7 @@ static int remove_particle_target_exec(bContext *C, wmOperator *UNUSED(op))
DEG_relations_tag_update(bmain);
DEG_id_tag_update(&ob->id, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_OBJECT|ND_PARTICLE, ob);
+ WM_event_add_notifier(C, NC_OBJECT | ND_PARTICLE, ob);
return OPERATOR_FINISHED;
}
@@ -307,7 +307,7 @@ void PARTICLE_OT_target_remove(wmOperatorType *ot)
ot->exec = remove_particle_target_exec;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
/************************ move up particle target operator *********************/
@@ -315,7 +315,7 @@ void PARTICLE_OT_target_remove(wmOperatorType *ot)
static int target_move_up_exec(bContext *C, wmOperator *UNUSED(op))
{
PointerRNA ptr = CTX_data_pointer_get_type(C, "particle_system", &RNA_ParticleSystem);
- ParticleSystem *psys= ptr.data;
+ ParticleSystem *psys = ptr.data;
Object *ob = ptr.id.data;
ParticleTarget *pt;
@@ -323,13 +323,13 @@ static int target_move_up_exec(bContext *C, wmOperator *UNUSED(op))
return OPERATOR_CANCELLED;
pt = psys->targets.first;
- for (; pt; pt=pt->next) {
+ for (; pt; pt = pt->next) {
if (pt->flag & PTARGET_CURRENT && pt->prev) {
BLI_remlink(&psys->targets, pt);
BLI_insertlinkbefore(&psys->targets, pt->prev, pt);
DEG_id_tag_update(&ob->id, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_OBJECT|ND_PARTICLE, ob);
+ WM_event_add_notifier(C, NC_OBJECT | ND_PARTICLE, ob);
break;
}
}
@@ -346,7 +346,7 @@ void PARTICLE_OT_target_move_up(wmOperatorType *ot)
ot->exec = target_move_up_exec;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
/************************ move down particle target operator *********************/
@@ -354,20 +354,20 @@ void PARTICLE_OT_target_move_up(wmOperatorType *ot)
static int target_move_down_exec(bContext *C, wmOperator *UNUSED(op))
{
PointerRNA ptr = CTX_data_pointer_get_type(C, "particle_system", &RNA_ParticleSystem);
- ParticleSystem *psys= ptr.data;
+ ParticleSystem *psys = ptr.data;
Object *ob = ptr.id.data;
ParticleTarget *pt;
if (!psys)
return OPERATOR_CANCELLED;
pt = psys->targets.first;
- for (; pt; pt=pt->next) {
+ for (; pt; pt = pt->next) {
if (pt->flag & PTARGET_CURRENT && pt->next) {
BLI_remlink(&psys->targets, pt);
BLI_insertlinkafter(&psys->targets, pt->next, pt);
DEG_id_tag_update(&ob->id, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_OBJECT|ND_PARTICLE, ob);
+ WM_event_add_notifier(C, NC_OBJECT | ND_PARTICLE, ob);
break;
}
}
@@ -384,7 +384,7 @@ void PARTICLE_OT_target_move_down(wmOperatorType *ot)
ot->exec = target_move_down_exec;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
/************************ refresh dupli objects *********************/
@@ -392,14 +392,14 @@ void PARTICLE_OT_target_move_down(wmOperatorType *ot)
static int dupliob_refresh_exec(bContext *C, wmOperator *UNUSED(op))
{
PointerRNA ptr = CTX_data_pointer_get_type(C, "particle_system", &RNA_ParticleSystem);
- ParticleSystem *psys= ptr.data;
+ ParticleSystem *psys = ptr.data;
if (!psys)
return OPERATOR_CANCELLED;
psys_check_group_weights(psys->part);
DEG_id_tag_update(&psys->part->id, OB_RECALC_DATA | PSYS_RECALC_REDO);
- WM_event_add_notifier(C, NC_OBJECT|ND_PARTICLE, NULL);
+ WM_event_add_notifier(C, NC_OBJECT | ND_PARTICLE, NULL);
return OPERATOR_FINISHED;
}
@@ -413,7 +413,7 @@ void PARTICLE_OT_dupliob_refresh(wmOperatorType *ot)
ot->exec = dupliob_refresh_exec;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
/************************ move up particle dupliweight operator *********************/
@@ -421,7 +421,7 @@ void PARTICLE_OT_dupliob_refresh(wmOperatorType *ot)
static int dupliob_move_up_exec(bContext *C, wmOperator *UNUSED(op))
{
PointerRNA ptr = CTX_data_pointer_get_type(C, "particle_system", &RNA_ParticleSystem);
- ParticleSystem *psys= ptr.data;
+ ParticleSystem *psys = ptr.data;
ParticleSettings *part;
ParticleDupliWeight *dw;
@@ -429,13 +429,13 @@ static int dupliob_move_up_exec(bContext *C, wmOperator *UNUSED(op))
return OPERATOR_CANCELLED;
part = psys->part;
- for (dw=part->dupliweights.first; dw; dw=dw->next) {
+ for (dw = part->dupliweights.first; dw; dw = dw->next) {
if (dw->flag & PART_DUPLIW_CURRENT && dw->prev) {
BLI_remlink(&part->dupliweights, dw);
BLI_insertlinkbefore(&part->dupliweights, dw->prev, dw);
DEG_id_tag_update(&part->id, OB_RECALC_DATA | PSYS_RECALC_REDO);
- WM_event_add_notifier(C, NC_OBJECT|ND_PARTICLE, NULL);
+ WM_event_add_notifier(C, NC_OBJECT | ND_PARTICLE, NULL);
break;
}
}
@@ -452,7 +452,7 @@ void PARTICLE_OT_dupliob_move_up(wmOperatorType *ot)
ot->exec = dupliob_move_up_exec;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
/********************** particle dupliweight operators *********************/
@@ -460,14 +460,14 @@ void PARTICLE_OT_dupliob_move_up(wmOperatorType *ot)
static int copy_particle_dupliob_exec(bContext *C, wmOperator *UNUSED(op))
{
PointerRNA ptr = CTX_data_pointer_get_type(C, "particle_system", &RNA_ParticleSystem);
- ParticleSystem *psys= ptr.data;
+ ParticleSystem *psys = ptr.data;
ParticleSettings *part;
ParticleDupliWeight *dw;
if (!psys)
return OPERATOR_CANCELLED;
part = psys->part;
- for (dw=part->dupliweights.first; dw; dw=dw->next) {
+ for (dw = part->dupliweights.first; dw; dw = dw->next) {
if (dw->flag & PART_DUPLIW_CURRENT) {
dw->flag &= ~PART_DUPLIW_CURRENT;
dw = MEM_dupallocN(dw);
@@ -475,7 +475,7 @@ static int copy_particle_dupliob_exec(bContext *C, wmOperator *UNUSED(op))
BLI_addhead(&part->dupliweights, dw);
DEG_id_tag_update(&part->id, OB_RECALC_DATA | PSYS_RECALC_REDO);
- WM_event_add_notifier(C, NC_OBJECT|ND_PARTICLE, NULL);
+ WM_event_add_notifier(C, NC_OBJECT | ND_PARTICLE, NULL);
break;
}
}
@@ -494,13 +494,13 @@ void PARTICLE_OT_dupliob_copy(wmOperatorType *ot)
ot->exec = copy_particle_dupliob_exec;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
static int remove_particle_dupliob_exec(bContext *C, wmOperator *UNUSED(op))
{
PointerRNA ptr = CTX_data_pointer_get_type(C, "particle_system", &RNA_ParticleSystem);
- ParticleSystem *psys= ptr.data;
+ ParticleSystem *psys = ptr.data;
ParticleSettings *part;
ParticleDupliWeight *dw;
@@ -508,7 +508,7 @@ static int remove_particle_dupliob_exec(bContext *C, wmOperator *UNUSED(op))
return OPERATOR_CANCELLED;
part = psys->part;
- for (dw=part->dupliweights.first; dw; dw=dw->next) {
+ for (dw = part->dupliweights.first; dw; dw = dw->next) {
if (dw->flag & PART_DUPLIW_CURRENT) {
BLI_remlink(&part->dupliweights, dw);
MEM_freeN(dw);
@@ -522,7 +522,7 @@ static int remove_particle_dupliob_exec(bContext *C, wmOperator *UNUSED(op))
dw->flag |= PART_DUPLIW_CURRENT;
DEG_id_tag_update(&part->id, OB_RECALC_DATA | PSYS_RECALC_REDO);
- WM_event_add_notifier(C, NC_OBJECT|ND_PARTICLE, NULL);
+ WM_event_add_notifier(C, NC_OBJECT | ND_PARTICLE, NULL);
return OPERATOR_FINISHED;
}
@@ -538,7 +538,7 @@ void PARTICLE_OT_dupliob_remove(wmOperatorType *ot)
ot->exec = remove_particle_dupliob_exec;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
/************************ move down particle dupliweight operator *********************/
@@ -546,7 +546,7 @@ void PARTICLE_OT_dupliob_remove(wmOperatorType *ot)
static int dupliob_move_down_exec(bContext *C, wmOperator *UNUSED(op))
{
PointerRNA ptr = CTX_data_pointer_get_type(C, "particle_system", &RNA_ParticleSystem);
- ParticleSystem *psys= ptr.data;
+ ParticleSystem *psys = ptr.data;
ParticleSettings *part;
ParticleDupliWeight *dw;
@@ -554,13 +554,13 @@ static int dupliob_move_down_exec(bContext *C, wmOperator *UNUSED(op))
return OPERATOR_CANCELLED;
part = psys->part;
- for (dw=part->dupliweights.first; dw; dw=dw->next) {
+ for (dw = part->dupliweights.first; dw; dw = dw->next) {
if (dw->flag & PART_DUPLIW_CURRENT && dw->next) {
BLI_remlink(&part->dupliweights, dw);
BLI_insertlinkafter(&part->dupliweights, dw->next, dw);
DEG_id_tag_update(&part->id, OB_RECALC_DATA | PSYS_RECALC_REDO);
- WM_event_add_notifier(C, NC_OBJECT|ND_PARTICLE, NULL);
+ WM_event_add_notifier(C, NC_OBJECT | ND_PARTICLE, NULL);
break;
}
}
@@ -577,7 +577,7 @@ void PARTICLE_OT_dupliob_move_down(wmOperatorType *ot)
ot->exec = dupliob_move_down_exec;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
/************************ connect/disconnect hair operators *********************/
@@ -587,7 +587,7 @@ static void disconnect_hair(
Object *ob, ParticleSystem *psys)
{
ParticleSystemModifierData *psmd = psys_get_modifier(ob, psys);
- ParticleEditSettings *pset= PE_settings(scene);
+ ParticleEditSettings *pset = PE_settings(scene);
ParticleData *pa;
PTCacheEdit *edit;
PTCacheEditPoint *point;
@@ -603,9 +603,9 @@ static void disconnect_hair(
return;
edit = psys->edit;
- point= edit ? edit->points : NULL;
+ point = edit ? edit->points : NULL;
- for (i=0, pa=psys->particles; i<psys->totpart; i++, pa++) {
+ for (i = 0, pa = psys->particles; i < psys->totpart; i++, pa++) {
if (point) {
ekey = point->keys;
point++;
@@ -613,7 +613,7 @@ static void disconnect_hair(
psys_mat_hair_to_global(ob, psmd->mesh_final, psys->part->from, pa, hairmat);
- for (k=0, key=pa->hair; k<pa->totkey; k++, key++) {
+ for (k = 0, key = pa->hair; k < pa->totkey; k++, key++) {
mul_m4_v3(hairmat, key->co);
if (ekey) {
@@ -636,16 +636,16 @@ static void disconnect_hair(
static int disconnect_hair_exec(bContext *C, wmOperator *op)
{
Depsgraph *depsgraph = CTX_data_depsgraph(C);
- Scene *scene= CTX_data_scene(C);
- Object *ob= ED_object_context(C);
- ParticleSystem *psys= NULL;
+ Scene *scene = CTX_data_scene(C);
+ Object *ob = ED_object_context(C);
+ ParticleSystem *psys = NULL;
const bool all = RNA_boolean_get(op->ptr, "all");
if (!ob)
return OPERATOR_CANCELLED;
if (all) {
- for (psys=ob->particlesystem.first; psys; psys=psys->next) {
+ for (psys = ob->particlesystem.first; psys; psys = psys->next) {
disconnect_hair(depsgraph, scene, ob, psys);
}
}
@@ -655,7 +655,7 @@ static int disconnect_hair_exec(bContext *C, wmOperator *op)
}
DEG_id_tag_update(&ob->id, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_OBJECT|ND_PARTICLE, ob);
+ WM_event_add_notifier(C, NC_OBJECT | ND_PARTICLE, ob);
return OPERATOR_FINISHED;
}
@@ -686,7 +686,7 @@ static bool remap_hair_emitter(
ParticleData *pa, *tpa;
PTCacheEditPoint *edit_point;
PTCacheEditKey *ekey;
- BVHTreeFromMesh bvhtree= {NULL};
+ BVHTreeFromMesh bvhtree = {NULL};
MFace *mface = NULL, *mf;
MEdge *medge = NULL, *me;
MVert *mvert;
@@ -737,7 +737,7 @@ static bool remap_hair_emitter(
mvert = mesh->mvert;
/* convert to global coordinates */
- for (i=0; i<numverts; i++)
+ for (i = 0; i < numverts; i++)
mul_m4_v3(to_mat, mvert[i].co);
if (mesh->totface != 0) {
@@ -829,7 +829,7 @@ static bool remap_hair_emitter(
sub_v3_v3v3(offset, nearest.co, from_co);
if (edit_point) {
- for (k=0, key=pa->hair, tkey=tpa->hair, ekey = edit_point->keys; k<tpa->totkey; k++, key++, tkey++, ekey++) {
+ for (k = 0, key = pa->hair, tkey = tpa->hair, ekey = edit_point->keys; k < tpa->totkey; k++, key++, tkey++, ekey++) {
float co_orig[3];
if (from_global)
@@ -848,7 +848,7 @@ static bool remap_hair_emitter(
edit_point++;
}
else {
- for (k=0, key=pa->hair, tkey=tpa->hair; k<tpa->totkey; k++, key++, tkey++) {
+ for (k = 0, key = pa->hair, tkey = tpa->hair; k < tpa->totkey; k++, key++, tkey++) {
float co_orig[3];
if (from_global)
@@ -895,9 +895,9 @@ static bool connect_hair(
static int connect_hair_exec(bContext *C, wmOperator *op)
{
Depsgraph *depsgraph = CTX_data_depsgraph(C);
- Scene *scene= CTX_data_scene(C);
- Object *ob= ED_object_context(C);
- ParticleSystem *psys= NULL;
+ Scene *scene = CTX_data_scene(C);
+ Object *ob = ED_object_context(C);
+ ParticleSystem *psys = NULL;
const bool all = RNA_boolean_get(op->ptr, "all");
bool any_connected = false;
@@ -905,7 +905,7 @@ static int connect_hair_exec(bContext *C, wmOperator *op)
return OPERATOR_CANCELLED;
if (all) {
- for (psys=ob->particlesystem.first; psys; psys=psys->next) {
+ for (psys = ob->particlesystem.first; psys; psys = psys->next) {
any_connected |= connect_hair(depsgraph, scene, ob, psys);
}
}
@@ -921,7 +921,7 @@ static int connect_hair_exec(bContext *C, wmOperator *op)
}
DEG_id_tag_update(&ob->id, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_OBJECT|ND_PARTICLE, ob);
+ WM_event_add_notifier(C, NC_OBJECT | ND_PARTICLE, ob);
return OPERATOR_FINISHED;
}
@@ -974,7 +974,7 @@ static void copy_particle_edit(
LOOP_POINTS {
HairKey *hkey = pa->hair;
- point->keys= MEM_dupallocN(point->keys);
+ point->keys = MEM_dupallocN(point->keys);
LOOP_KEYS {
key->co = hkey->co;
key->time = &hkey->time;
@@ -1058,7 +1058,7 @@ static bool copy_particle_systems_to_object(const bContext *C,
#define PSYS_FROM_NEXT(cur) (single_psys_from ? NULL : (cur)->next)
totpsys = single_psys_from ? 1 : BLI_listbase_count(&ob_from->particlesystem);
- tmp_psys = MEM_mallocN(sizeof(ParticleSystem*) * totpsys, "temporary particle system array");
+ tmp_psys = MEM_mallocN(sizeof(ParticleSystem *) * totpsys, "temporary particle system array");
cdmask = 0;
for (psys_from = PSYS_FROM_FIRST, i = 0;
@@ -1132,7 +1132,7 @@ static bool copy_particle_systems_to_object(const bContext *C,
psys;
psys = psys->next, psys_from = PSYS_FROM_NEXT(psys_from), ++i)
{
- float (*from_mat)[4], (*to_mat)[4];
+ float(*from_mat)[4], (*to_mat)[4];
switch (space) {
case PAR_COPY_SPACE_OBJECT: