mirror of
https://github.com/lucaspalomodevelop/meshlab.git
synced 2026-03-17 01:54:42 +00:00
updated all the precondition callback to use the standard MM_ enum.
This commit is contained in:
parent
8ceb13bdbd
commit
f781f2dddf
@ -454,11 +454,9 @@ int FilterColorProc::getPreConditions( QAction * filter ) const
|
||||
case CP_SCATTER_PER_MESH :
|
||||
case CP_PERLIN_COLOR :
|
||||
case CP_COLOR_NOISE :
|
||||
{
|
||||
return MeshFilterInterface::FP_Generic;
|
||||
break;
|
||||
}
|
||||
case CP_THRESHOLDING :
|
||||
return MeshModel::MM_NONE;
|
||||
|
||||
case CP_THRESHOLDING :
|
||||
case CP_BRIGHTNESS :
|
||||
case CP_CONTRAST :
|
||||
case CP_CONTR_BRIGHT :
|
||||
@ -468,11 +466,9 @@ int FilterColorProc::getPreConditions( QAction * filter ) const
|
||||
case CP_DESATURATION :
|
||||
case CP_WHITE_BAL :
|
||||
case CP_LEVELS :
|
||||
{
|
||||
return MeshFilterInterface::FP_VertexColor;
|
||||
break;
|
||||
}
|
||||
default: assert(0); return MeshFilterInterface::FP_Generic;
|
||||
return MeshModel::MM_VERTCOLOR;
|
||||
|
||||
default: assert(0); return MeshModel::MM_NONE;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -180,10 +180,10 @@ int QualityMapperFilter::getPreConditions( QAction * a) const
|
||||
switch(ID(a))
|
||||
{
|
||||
case FP_QUALITY_MAPPER :
|
||||
return MeshFilterInterface::FP_VertexQuality;
|
||||
return MeshModel::MM_VERTQUALITY;
|
||||
default :
|
||||
assert(0);
|
||||
return MeshFilterInterface::FP_Generic;
|
||||
return MeshModel::MM_NONE;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -419,27 +419,27 @@ int ExtraMeshColorizePlugin::getPreConditions(QAction *a) const
|
||||
case CP_RANDOM_FACE:
|
||||
case CP_DISCRETE_CURVATURE:
|
||||
case CP_COLOR_NON_TOPO_COHERENT:
|
||||
return MeshFilterInterface::FP_Face;
|
||||
return MeshModel::MM_FACENUMBER;
|
||||
|
||||
case CP_CLAMP_QUALITY:
|
||||
case CP_MAP_QUALITY_INTO_COLOR:
|
||||
return MeshFilterInterface::FP_VertexQuality;
|
||||
return MeshModel::MM_VERTQUALITY;
|
||||
|
||||
case CP_FACE_TO_VERTEX:
|
||||
case CP_FACE_SMOOTH:
|
||||
return MeshFilterInterface::FP_FaceColor;
|
||||
return MeshModel::MM_FACECOLOR;
|
||||
|
||||
case CP_VERTEX_SMOOTH:
|
||||
case CP_VERTEX_TO_FACE:
|
||||
return MeshFilterInterface::FP_VertexColor;
|
||||
return MeshModel::MM_VERTCOLOR;
|
||||
|
||||
case CP_TEXTURE_TO_VERTEX:
|
||||
case CP_TEXBORDER:
|
||||
return MeshFilterInterface::FP_WedgeTexCoord;
|
||||
return MeshModel::MM_WEDGTEXCOORD;
|
||||
|
||||
default: assert(0);
|
||||
}
|
||||
return MeshFilterInterface::FP_Generic;
|
||||
return MeshModel::MM_NONE;
|
||||
}
|
||||
|
||||
int ExtraMeshColorizePlugin::postCondition( QAction* a ) const
|
||||
|
||||
@ -441,9 +441,4 @@ int FilterIsoParametrization::postCondition( QAction* /*filter*/ ) const
|
||||
return MeshModel::MM_UNKNOWN;
|
||||
}
|
||||
|
||||
int FilterIsoParametrization::getPreConditions( QAction * /*filter*/ ) const
|
||||
{
|
||||
return MeshFilterInterface::FP_Generic;
|
||||
}
|
||||
|
||||
Q_EXPORT_PLUGIN(FilterIsoParametrization)
|
||||
|
||||
@ -58,7 +58,6 @@ class FilterIsoParametrization : public QObject, public MeshFilterInterface
|
||||
virtual void initParameterSet(QAction *,MeshDocument&, RichParameterSet & /*parent*/);
|
||||
virtual bool applyFilter(QAction *filter, MeshDocument&, RichParameterSet & /*parent*/, vcg::CallBackPos * cb);
|
||||
int postCondition(QAction* filter) const;
|
||||
int getPreConditions(QAction *) const;
|
||||
void PrintStats(CMeshO *mesh);
|
||||
AbstractMesh abs_mesh;
|
||||
ParamMesh para_mesh;
|
||||
|
||||
@ -81,16 +81,16 @@ int FilterTexturePlugin::getPreConditions(QAction *a) const
|
||||
{
|
||||
switch (ID(a))
|
||||
{
|
||||
case FP_UV_TO_COLOR : return MeshFilterInterface::FP_VertexTexCoord;
|
||||
case FP_UV_WEDGE_TO_VERTEX : return MeshFilterInterface::FP_WedgeTexCoord;
|
||||
case FP_BASIC_TRIANGLE_MAPPING : return MeshFilterInterface::FP_Face;
|
||||
case FP_SET_TEXTURE : return MeshFilterInterface::FP_WedgeTexCoord;
|
||||
case FP_COLOR_TO_TEXTURE : return MeshFilterInterface::FP_WedgeTexCoord + MeshFilterInterface::FP_VertexColor;
|
||||
case FP_TRANSFER_TO_TEXTURE : return FP_Generic;
|
||||
case FP_TEX_TO_VCOLOR_TRANSFER : return FP_Generic;
|
||||
case FP_UV_TO_COLOR : return MeshModel::MM_VERTTEXCOORD;
|
||||
case FP_UV_WEDGE_TO_VERTEX : return MeshModel::MM_WEDGTEXCOORD;
|
||||
case FP_BASIC_TRIANGLE_MAPPING : return MeshModel::MM_FACENUMBER;
|
||||
case FP_SET_TEXTURE : return MeshModel::MM_WEDGTEXCOORD;
|
||||
case FP_COLOR_TO_TEXTURE : return MeshModel::MM_VERTCOLOR;
|
||||
case FP_TRANSFER_TO_TEXTURE : return MeshModel::MM_NONE;
|
||||
case FP_TEX_TO_VCOLOR_TRANSFER : return MeshModel::MM_NONE;
|
||||
default: assert(0);
|
||||
}
|
||||
return MeshFilterInterface::FP_Generic;
|
||||
return MeshModel::MM_NONE;
|
||||
}
|
||||
|
||||
int FilterTexturePlugin::getRequirements(QAction *a)
|
||||
|
||||
@ -180,7 +180,7 @@ int FilterUnsharp::getPreConditions(QAction *a) const
|
||||
{
|
||||
case FP_VERTEX_QUALITY_SMOOTHING:
|
||||
case FP_UNSHARP_QUALITY:
|
||||
return MeshFilterInterface::FP_Face | MeshFilterInterface::FP_VertexQuality;
|
||||
return MeshModel::MM_FACENUMBER | MeshModel::MM_VERTQUALITY;
|
||||
case FP_SD_LAPLACIAN_SMOOTH:
|
||||
case FP_HC_LAPLACIAN_SMOOTH:
|
||||
case FP_LAPLACIAN_SMOOTH:
|
||||
@ -199,13 +199,13 @@ int FilterUnsharp::getPreConditions(QAction *a) const
|
||||
case FP_RECOMPUTE_VERTEX_NORMAL_ANGLE :
|
||||
case FP_FACE_NORMAL_NORMALIZE:
|
||||
case FP_CREASE_CUT:
|
||||
return MeshFilterInterface::FP_Face;
|
||||
return MeshModel::MM_FACENUMBER;
|
||||
case FP_UNSHARP_VERTEX_COLOR:
|
||||
return MeshFilterInterface::FP_Face | MeshFilterInterface::FP_VertexColor;
|
||||
return MeshModel::MM_FACENUMBER | MeshModel::MM_VERTCOLOR;
|
||||
|
||||
case FP_VERTEX_NORMAL_NORMALIZE: return MeshFilterInterface::FP_Generic;
|
||||
case FP_VERTEX_NORMAL_NORMALIZE: return MeshModel::MM_NONE;
|
||||
|
||||
default : assert(0); return MeshFilterInterface::FP_Generic;
|
||||
default : assert(0); return MeshModel::MM_NONE;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user