Merge branch 'master' into blender2.8
This commit is contained in:
commit
a989913dd4
|
@ -1890,7 +1890,6 @@ static void createTransParticleVerts(bContext *C, TransInfo *t)
|
|||
{
|
||||
TransData *td = NULL;
|
||||
TransDataExtension *tx;
|
||||
Base *base = CTX_data_active_base(C);
|
||||
Object *ob = CTX_data_active_object(C);
|
||||
ParticleEditSettings *pset = PE_settings(t->scene);
|
||||
PTCacheEdit *edit = PE_get_current(t->scene, t->view_layer, ob);
|
||||
|
@ -1910,8 +1909,6 @@ static void createTransParticleVerts(bContext *C, TransInfo *t)
|
|||
if (psys)
|
||||
psmd = psys_get_modifier(ob, psys);
|
||||
|
||||
base->flag |= BA_HAS_RECALC_DATA;
|
||||
|
||||
for (i = 0, point = edit->points; i < edit->totpoint; i++, point++) {
|
||||
point->flag &= ~PEP_TRANSFORM;
|
||||
transformparticle = 0;
|
||||
|
@ -5612,10 +5609,9 @@ static void set_trans_object_base_flags(TransInfo *t)
|
|||
/* and we store them temporal in base (only used for transform code) */
|
||||
/* this because after doing updates, the object->recalc is cleared */
|
||||
for (base = view_layer->object_bases.first; base; base = base->next) {
|
||||
if (base->object->recalc & OB_RECALC_OB)
|
||||
base->flag_legacy |= BA_HAS_RECALC_OB;
|
||||
if (base->object->recalc & OB_RECALC_DATA)
|
||||
base->flag_legacy |= BA_HAS_RECALC_DATA;
|
||||
if (base->object->recalc & (OB_RECALC_OB | OB_RECALC_DATA)) {
|
||||
base->flag |= BA_SNAP_FIX_DEPS_FIASCO;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -5696,10 +5692,9 @@ static int count_proportional_objects(TransInfo *t)
|
|||
/* and we store them temporal in base (only used for transform code) */
|
||||
/* this because after doing updates, the object->recalc is cleared */
|
||||
for (base = view_layer->object_bases.first; base; base = base->next) {
|
||||
if (base->object->recalc & OB_RECALC_OB)
|
||||
base->flag_legacy |= BA_HAS_RECALC_OB;
|
||||
if (base->object->recalc & OB_RECALC_DATA)
|
||||
base->flag_legacy |= BA_HAS_RECALC_DATA;
|
||||
if (base->object->recalc & (OB_RECALC_OB | OB_RECALC_DATA)) {
|
||||
base->flag |= BA_SNAP_FIX_DEPS_FIASCO;
|
||||
}
|
||||
}
|
||||
|
||||
return total;
|
||||
|
@ -5715,7 +5710,7 @@ static void clear_trans_object_base_flags(TransInfo *t)
|
|||
base->flag |= BASE_SELECTED;
|
||||
}
|
||||
|
||||
base->flag_legacy &= ~(BA_WAS_SEL | BA_HAS_RECALC_OB | BA_HAS_RECALC_DATA | BA_TEMP_TAG | BA_TRANSFORM_CHILD | BA_TRANSFORM_PARENT);
|
||||
base->flag_legacy &= ~(BA_WAS_SEL | BA_SNAP_FIX_DEPS_FIASCO | BA_TEMP_TAG | BA_TRANSFORM_CHILD | BA_TRANSFORM_PARENT);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -161,17 +161,8 @@ static void iter_snap_objects(
|
|||
void *data)
|
||||
{
|
||||
Base *base_act = sctx->eval_ctx.view_layer->basact;
|
||||
/* Need an exception for particle edit because the base is flagged with BA_HAS_RECALC_DATA
|
||||
* which makes the loop skip it, even the derived mesh will never change
|
||||
*
|
||||
* To solve that problem, we do it first as an exception.
|
||||
* */
|
||||
if (base_act && base_act->object && base_act->object->mode & OB_MODE_PARTICLE_EDIT) {
|
||||
sob_callback(sctx, false, base_act->object, base_act->object->obmat, data);
|
||||
}
|
||||
|
||||
for (Base *base = sctx->eval_ctx.view_layer->object_bases.first; base != NULL; base = base->next) {
|
||||
if ((BASE_VISIBLE(base)) && (base->flag_legacy & (BA_HAS_RECALC_OB | BA_HAS_RECALC_DATA)) == 0 &&
|
||||
if ((BASE_VISIBLE(base)) && (base->flag_legacy & BA_SNAP_FIX_DEPS_FIASCO) == 0 &&
|
||||
!((snap_select == SNAP_NOT_SELECTED && ((base->flag & BASE_SELECTED) || (base->flag_legacy & BA_WAS_SEL))) ||
|
||||
(snap_select == SNAP_NOT_ACTIVE && base == base_act)))
|
||||
{
|
||||
|
|
|
@ -531,9 +531,13 @@ enum {
|
|||
|
||||
/* also needed for base!!!!! or rather, they interfere....*/
|
||||
/* base->flag and ob->flag */
|
||||
#define BA_WAS_SEL (1 << 1)
|
||||
#define BA_HAS_RECALC_OB (1 << 2)
|
||||
#define BA_HAS_RECALC_DATA (1 << 3)
|
||||
enum {
|
||||
BA_WAS_SEL = (1 << 1),
|
||||
/* NOTE: BA_HAS_RECALC_DATA can be re-used later if freed in readfile.c. */
|
||||
// BA_HAS_RECALC_OB = (1 << 2), /* DEPRECATED */
|
||||
// BA_HAS_RECALC_DATA = (1 << 3), /* DEPRECATED */
|
||||
BA_SNAP_FIX_DEPS_FIASCO = (1 << 2), /* Yes, re-use deprecated bit, all fine since it's runtime only. */
|
||||
};
|
||||
|
||||
/* NOTE: this was used as a proper setting in past, so nullify before using */
|
||||
#define BA_TEMP_TAG (1 << 5)
|
||||
|
|
Loading…
Reference in New Issue