Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/object/object_add.c
| Context not available. | |||||
| baseob = BKE_mball_basis_find(scene, ob); | baseob = BKE_mball_basis_find(scene, ob); | ||||
| if (ob != baseob) { | /* flag all mballs in the same 'group' (as all of them are part of the new mesh, so get rid of them all) */ | ||||
| /* if motherball is converting it would be marked as done later */ | Object *tmp; | ||||
mont29: We try to avoid those 'private' markers (the `_` prepended to varnames) as much as possible… | |||||
| ob->flag |= OB_DONE; | for (Base *base_tmp = scene->base.first; base_tmp; base_tmp = base_tmp->next) { | ||||
Not Done Inline ActionsYou do not need base_next temp var at all here, since you do not free base, you can just do: for (Base *base_tmp = scene->base.first; base_tmp; base_tmp = base_tmp->next) {
...
}mont29: You do not need base_next temp var at all here, since you do not free base, you can just do… | |||||
| tmp = base_tmp->object; | |||||
| if (tmp->type == OB_MBALL) { | |||||
| /* if motherball is converting it would be marked as done later */ | |||||
| if (BKE_mball_is_basis_for(baseob, tmp) && (tmp != baseob)) { | |||||
| tmp->flag |= OB_DONE; | |||||
| } | |||||
| } | |||||
| } | } | ||||
| if (!(baseob->flag & OB_DONE)) { | if (!(baseob->flag & OB_DONE)) { | ||||
| Context not available. | |||||
| ob = base->object; | ob = base->object; | ||||
| if (ob->type == OB_MBALL) { | if (ob->type == OB_MBALL) { | ||||
| if (ob->flag & OB_DONE) { | if (ob->flag & OB_DONE) { | ||||
| Object *ob_basis = NULL; | ED_base_object_free_and_unlink(bmain, scene, base); | ||||
| if (BKE_mball_is_basis(ob) || | |||||
| ((ob_basis = BKE_mball_basis_find(scene, ob)) && (ob_basis->flag & OB_DONE))) | |||||
| { | |||||
| ED_base_object_free_and_unlink(bmain, scene, base); | |||||
| } | |||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| Context not available. | |||||
We try to avoid those 'private' markers (the _ prepended to varnames) as much as possible, not needed here anyway…