Modifiers: Remove remaining parts of md->scene

This commit is contained in:
Sergey Sharybin 2018-06-22 15:04:06 +02:00
parent a7ca8fe1dd
commit 888fb065a4
7 changed files with 1 additions and 21 deletions

View File

@ -2093,8 +2093,6 @@ static void mesh_calc_modifiers(
for (; md; md = md->next, curr = curr->next) {
const ModifierTypeInfo *mti = modifierType_getInfo(md->type);
md->scene = scene;
if (!modifier_isEnabled(scene, md, required_mode)) {
continue;
}
@ -2160,8 +2158,6 @@ static void mesh_calc_modifiers(
for (; md; md = md->next, curr = curr->next) {
const ModifierTypeInfo *mti = modifierType_getInfo(md->type);
md->scene = scene;
if (!modifier_isEnabled(scene, md, required_mode)) {
continue;
}
@ -2638,8 +2634,6 @@ static void editbmesh_calc_modifiers(
for (i = 0; md; i++, md = md->next, curr = curr->next) {
const ModifierTypeInfo *mti = modifierType_getInfo(md->type);
md->scene = scene;
if (!editbmesh_modifier_is_enabled(scene, md, dm)) {
continue;
}

View File

@ -855,8 +855,6 @@ static void curve_calc_modifiers_pre(
for (; md; md = md->next) {
const ModifierTypeInfo *mti = modifierType_getInfo(md->type);
md->scene = scene;
if (!modifier_isEnabled(scene, md, required_mode))
continue;
if (mti->type != eModifierTypeType_OnlyDeform)
@ -961,7 +959,6 @@ static void curve_calc_modifiers_post(
for (; md; md = md->next) {
const ModifierTypeInfo *mti = modifierType_getInfo(md->type);
md->scene = scene;
if (!modifier_isEnabled(scene, md, required_mode))
continue;

View File

@ -1045,8 +1045,6 @@ void BKE_lattice_modifiers_calc(struct Depsgraph *depsgraph, Scene *scene, Objec
for (; md; md = md->next) {
const ModifierTypeInfo *mti = modifierType_getInfo(md->type);
md->scene = scene;
if (!(mti->flags & eModifierTypeFlag_AcceptsLattice)) continue;
if (!(md->mode & eModifierMode_Realtime)) continue;
if (editmode && !(md->mode & eModifierMode_Editmode)) continue;

View File

@ -1150,8 +1150,6 @@ Mesh *BKE_mesh_create_derived_for_modifier(
KeyBlock *kb;
ModifierEvalContext mectx = {depsgraph, ob, 0};
md->scene = scene;
if (!(md->mode & eModifierMode_Realtime)) {
return NULL;
}

View File

@ -5031,7 +5031,6 @@ static void direct_link_modifiers(FileData *fd, ListBase *lb)
for (md=lb->first; md; md=md->next) {
md->error = NULL;
md->scene = NULL;
/* if modifiers disappear, or for upward compatibility */
if (NULL == modifierType_getInfo(md->type))

View File

@ -527,8 +527,6 @@ static int modifier_apply_shape(
{
const ModifierTypeInfo *mti = modifierType_getInfo(md->type);
md->scene = scene;
if (mti->isDisabled && mti->isDisabled(scene, md, 0)) {
BKE_report(reports, RPT_ERROR, "Modifier is disabled, skipping apply");
return 0;
@ -587,8 +585,6 @@ static int modifier_apply_obdata(ReportList *reports, Depsgraph *depsgraph, Scen
{
const ModifierTypeInfo *mti = modifierType_getInfo(md->type);
md->scene = scene;
if (mti->isDisabled && mti->isDisabled(scene, md, 0)) {
BKE_report(reports, RPT_ERROR, "Modifier is disabled, skipping apply");
return 0;

View File

@ -33,6 +33,7 @@
*/
struct Mesh;
struct Scene;
typedef enum ModifierType {
eModifierType_None = 0,
@ -112,9 +113,6 @@ typedef struct ModifierData {
short pad;
char name[64]; /* MAX_NAME */
/* XXX for timing info set by caller... solve later? (ton) */
struct Scene *scene;
char *error;
} ModifierData;