本文整理汇总了C++中IParamBlock2类的典型用法代码示例。如果您正苦于以下问题:C++ IParamBlock2类的具体用法?C++ IParamBlock2怎么用?C++ IParamBlock2使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了IParamBlock2类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: GetOrCreateSkin
bool NifImporter::ImportSkin(ImpNode *node, NiTriBasedGeomRef triGeom, int v_start/*=0*/)
{
bool ok = true;
NiSkinInstanceRef nifSkin = triGeom->GetSkinInstance();
if (!nifSkin)
return false;
INode *tnode = node->GetINode();
NiSkinDataRef data = nifSkin->GetSkinData();
NiSkinPartitionRef part = nifSkin->GetSkinPartition();
vector<NiNodeRef> nifBones = nifSkin->GetBones();
//create a skin modifier and add it
Modifier *skinMod = GetOrCreateSkin(tnode);
TriObject *triObject = GetTriObject(tnode->GetObjectRef());
Mesh& m = triObject->GetMesh();
//get the skin interface
if (ISkin *skin = (ISkin *) skinMod->GetInterface(I_SKIN)){
ISkinImportData* iskinImport = (ISkinImportData*) skinMod->GetInterface(I_SKINIMPORTDATA);
// Set the num weights to 4. Yes its in the nif but Shon doesn't like to expose those values
// and the value always seems to be 4 anyway. I'd also this be more dynamic than hard coded numbers
// but I cant figure out the correct values to pass the scripting engine from here so I'm giving up.
int numWeightsPerVertex = 4;
#if VERSION_3DSMAX >= ((5000<<16)+(15<<8)+0) // Version 5+
IParamBlock2 *params = skinMod->GetParamBlockByID(2/*advanced*/);
params->SetValue(0x7/*bone_Limit*/, 0, numWeightsPerVertex);
#endif
// Can get some truly bizarre animations without this in MAX with Civ4 Leaderheads
#if VERSION_3DSMAX > ((5000<<16)+(15<<8)+0) // Version 6+
BOOL ignore = TRUE;
params->SetValue(0xE/*ignoreBoneScale*/, 0, ignore);
#endif
//RefTargetHandle advanced = skinMod->GetReference(3);
//setMAXScriptValue(advanced, "bone_Limit", 0, numWeightsPerVertex);
Matrix3 geom = TOMATRIX3(triGeom->GetLocalTransform());
Matrix3 m3 = TOMATRIX3(data->GetOverallTransform());
Matrix3 im3 = Inverse(m3);
Matrix3 nm3 = im3 * geom;
iskinImport->SetSkinTm(tnode, nm3, nm3); // ???
// Create Bone List
Tab<INode*> bones;
for (size_t i=0; i<nifBones.size(); ++i){
NiNodeRef bone = nifBones[i];
if (INode *boneRef = FindNode(bone)) {
bones.Append(1, &boneRef);
iskinImport->AddBoneEx(boneRef, TRUE);
//// Set Bone Transform
Matrix3 b3 = TOMATRIX3(data->GetBoneTransform(i));
Matrix3 ib3 = Inverse(b3);
ib3 *= geom;
iskinImport->SetBoneTm(boneRef, ib3, ib3);
}
}
if (bones.Count() != data->GetBoneCount())
return false;
ObjectState os = tnode->EvalWorldState(0);
// Need to get a list of bones and weights for each vertex.
vector<VertexHolder> vertexHolders;
vertexHolders.resize(m.numVerts);
for (int i=0, n=data->GetBoneCount();i<n; ++i){
if (INode *boneRef = bones[i]){
vector<SkinWeight> weights = data->GetBoneWeights(i);
for (vector<SkinWeight>::iterator itr=weights.begin(), end=weights.end(); itr != end; ++itr){
VertexHolder& h = vertexHolders[itr->index];
h.vertIndex = itr->index;
++h.count;
h.weights.Append(1, &itr->weight);
h.boneNodeList.Append(1, &boneRef);
}
}
}
tnode->EvalWorldState(0);
skinMod->DisableModInViews();
skinMod->EnableModInViews();
#if VERSION_3DSMAX < ((5000<<16)+(15<<8)+0) // Version 4
gi->SetCommandPanelTaskMode(TASK_MODE_MODIFY);
gi->SelectNode(tnode);
#endif
// Assign the weights
for (vector<VertexHolder>::iterator itr=vertexHolders.begin(), end=vertexHolders.end(); itr != end; ++itr){
VertexHolder& h = (*itr);
if (h.count){
float sum = 0.0f;
for (int i = 0; i < h.count; ++i)
sum += h.weights[i];
ASSERT(fabs(sum-1.0f) < 0.001f);
BOOL add = iskinImport->AddWeights(tnode, h.vertIndex, h.boneNodeList, h.weights);
add = add; // What was the purpose of this?
}
//.........这里部分代码省略.........
示例2: return
IParamBlock2 *GetParamBlockByID (short id) { return (pblock->ID() == id) ? pblock : NULL; }
示例3: UpdateDlg
void PAOperatorObjectDlgProc::UpdateDlg(IParamMap2* map, HWND hWnd)
{
// BOOL bAxes, bDivergence, bRandom;
// bool varAnimated, divAnimated;
if(map && hWnd) {
IParamBlock2* ppb = map->GetParamBlock();
if(ppb) {
bool enableGeometry = true;
bool enableSubMtl = false;
bool enableMapping = false;
bool enableLockClosest = false;
int type = ppb->GetInt(kObject_channelType, 0);
bool isFloatType = (type == kObject_channelType_float);
EnableWindow( GetDlgItem(hWnd, IDC_FLOATTYPE), isFloatType );
int showControl = isFloatType ? SW_SHOW : SW_HIDE;
ShowWindow( GetDlgItem( hWnd, IDC_FLOATTYPE), showControl);
if (isFloatType) {
switch(ppb->GetInt(kObject_propertyFloat, 0)) {
case kObject_propertyFloat_distanceToPivot:
enableGeometry = false;
SetDlgItemText( hWnd, IDC_TEXT_PROPERTY, GetString(IDS_DESCRIPTION_DISTANCETOPIVOT));
break;
case kObject_propertyFloat_distanceToVertex:
enableLockClosest = true;
SetDlgItemText( hWnd, IDC_TEXT_PROPERTY, GetString(IDS_DESCRIPTION_DISTANCETOVERTEX));
break;
case kObject_propertyFloat_distanceToSurface:
enableLockClosest = true;
SetDlgItemText( hWnd, IDC_TEXT_PROPERTY, GetString(IDS_DESCRIPTION_DISTANCETOSURFACE));
break;
case kObject_propertyFloat_objectSpinRate:
enableGeometry = false;
SetDlgItemText( hWnd, IDC_TEXT_PROPERTY, GetString(IDS_DESCRIPTION_OBJECTSPINRATE));
break;
case kObject_propertyFloat_pointLuminance:
enableSubMtl = true;
enableLockClosest = true;
SetDlgItemText( hWnd, IDC_TEXT_PROPERTY, GetString(IDS_DESCRIPTION_POINTLUMINANCE));
break;
case kObject_propertyFloat_pointOpacity:
enableSubMtl = true;
enableLockClosest = true;
SetDlgItemText( hWnd, IDC_TEXT_PROPERTY, GetString(IDS_DESCRIPTION_POINTOPACITY));
break;
case kObject_propertyFloat_faceSquare:
enableLockClosest = true;
SetDlgItemText( hWnd, IDC_TEXT_PROPERTY, GetString(IDS_DESCRIPTION_FACESQUARE));
break;
case kObject_propertyFloat_softSelection:
enableLockClosest = true;
SetDlgItemText( hWnd, IDC_TEXT_PROPERTY, GetString(IDS_DESCRIPTION_SOFTSELECTION));
break;
}
}
bool isIntType = (type == kObject_channelType_integer);
EnableWindow( GetDlgItem(hWnd, IDC_INTTYPE), isIntType );
showControl = isIntType ? SW_SHOW : SW_HIDE;
ShowWindow( GetDlgItem( hWnd, IDC_INTTYPE), showControl);
if (isIntType) {
switch (ppb->GetInt(kObject_propertyInteger, 0)) {
case kObject_propertyInteger_objectIndexByPivot:
enableGeometry = false;
SetDlgItemText( hWnd, IDC_TEXT_PROPERTY, GetString(IDS_DESCRIPTION_OBJECTINDEXBYPIVOT));
break;
case kObject_propertyInteger_objectIndexByVertex:
SetDlgItemText( hWnd, IDC_TEXT_PROPERTY, GetString(IDS_DESCRIPTION_OBJECTINDEXBYVERTEX));
break;
case kObject_propertyInteger_objectIndexBySurface:
SetDlgItemText( hWnd, IDC_TEXT_PROPERTY, GetString(IDS_DESCRIPTION_OBJECTINDEXBYSURFACE));
break;
case kObject_propertyInteger_vertexIndex:
SetDlgItemText( hWnd, IDC_TEXT_PROPERTY, GetString(IDS_DESCRIPTION_VERTEXINDEX));
break;
case kObject_propertyInteger_faceIndex:
SetDlgItemText( hWnd, IDC_TEXT_PROPERTY, GetString(IDS_DESCRIPTION_FACEINDEX));
break;
case kObject_propertyInteger_materialIndex:
SetDlgItemText( hWnd, IDC_TEXT_PROPERTY, GetString(IDS_DESCRIPTION_MATERIALINDEX));
break;
}
}
bool isVectorType = (type == kObject_channelType_vector);
EnableWindow( GetDlgItem(hWnd, IDC_VECTORTYPE2), isVectorType );
showControl = isVectorType ? SW_SHOW : SW_HIDE;
ShowWindow( GetDlgItem( hWnd, IDC_VECTORTYPE2), showControl);
if (isVectorType) {
int vectorType = ppb->GetInt(kObject_propertyVector, 0);
switch(vectorType) {
case kObject_propertyVector_objectPosition:
enableGeometry = false;
SetDlgItemText( hWnd, IDC_TEXT_PROPERTY, GetString(IDS_DESCRIPTION_OBJECTPOSITION));
break;
case kObject_propertyVector_objectSpeed:
enableGeometry = false;
SetDlgItemText( hWnd, IDC_TEXT_PROPERTY, GetString(IDS_DESCRIPTION_OBJECTSPEED));
break;
case kObject_propertyVector_objectScale:
//.........这里部分代码省略.........
示例4: GetParamBlockByID
IParamBlock2* GetParamBlockByID(BlockID id) { return (m_pblock->ID() == id) ? m_pblock : NULL; }
示例5:
IParamBlock2 *ConvertToPoly::GetParamBlockByID (short id) {
return (pblock->ID() == id) ? pblock : NULL;
}
示例6: getLightId
//---------------------------------------------------------------
void LightExporter::exportLight( ExportNode* exportNode )
{
if ( !exportNode->getIsInVisualScene() )
return;
String lightId = getLightId(*exportNode);
INode * iNode = exportNode->getINode();
LightObject* lightObject = (LightObject*) (iNode->GetObjectRef());
if ( !lightObject )
return;
if ( mDocumentExporter->isExportedObject(ObjectIdentifier(lightObject)) )
return;
mDocumentExporter->insertExportedObject(ObjectIdentifier(lightObject), exportNode);
// Retrieve the target node, if we are not baking matrices.
// Baked matrices must always sample the transform!
ULONG ClassId = lightObject->ClassID().PartA();
bool isTargeted = !mDocumentExporter->getOptions().getBakeMatrices() && (ClassId == SPOT_LIGHT_CLASS_ID || ClassId == TDIR_LIGHT_CLASS_ID);
INode* targetNode = isTargeted ? iNode->GetTarget() : 0;
// some lights are not supported at all
switch (ClassId)
{
case FSPOT_LIGHT_CLASS_ID:
case SPOT_LIGHT_CLASS_ID:
case DIR_LIGHT_CLASS_ID:
case TDIR_LIGHT_CLASS_ID:
case SKY_LIGHT_CLASS_ID_PART_A:
case OMNI_LIGHT_CLASS_ID:
break;
default:
return;
}
// Determine the light's type
bool isSpot = false;
bool isDirectional = false;
bool isPoint = false;
bool isSky = false;
COLLADASW::Light::LightType lightType;
switch (ClassId)
{
case FSPOT_LIGHT_CLASS_ID:
case SPOT_LIGHT_CLASS_ID:
lightType = COLLADASW::Light::SPOT;
isSpot = true;
break;
case DIR_LIGHT_CLASS_ID:
case TDIR_LIGHT_CLASS_ID:
lightType = COLLADASW::Light::DIRECTIONAL;
isDirectional = true;
break;
case SKY_LIGHT_CLASS_ID_PART_A:
lightType = COLLADASW::Light::POINT;
isSky = true;
break;
case OMNI_LIGHT_CLASS_ID:
lightType = COLLADASW::Light::POINT;
isPoint = true;
break;
}
COLLADASW::Light * colladaLight = 0;
switch ( lightType )
{
case COLLADASW::Light::DIRECTIONAL:
colladaLight = new COLLADASW::DirectionalLight(COLLADASW::LibraryLights::mSW, lightId, COLLADASW::Utils::checkNCName(NativeString(exportNode->getINode()->GetName())));
break;
case COLLADASW::Light::POINT:
colladaLight = new COLLADASW::PointLight(COLLADASW::LibraryLights::mSW, lightId, COLLADASW::Utils::checkNCName(NativeString(exportNode->getINode()->GetName())));
break;
case COLLADASW::Light::SPOT:
colladaLight = new COLLADASW::SpotLight(COLLADASW::LibraryLights::mSW, lightId, COLLADASW::Utils::checkNCName(NativeString(exportNode->getINode()->GetName())));
break;
}
// Retrieve the parameter block
IParamBlock* parameters = 0;
IParamBlock2* parametersSky = 0;
if (isSky)
parametersSky = (IParamBlock2*) lightObject->GetReference(MaxLight::PBLOCK_REF_SKY);
else
parameters = (IParamBlock*) lightObject->GetReference(MaxLight::PBLOCK_REF);
if (!parameters && !parametersSky)
{
delete colladaLight;
return;
//.........这里部分代码省略.........
示例7: SetSize
void Smoke::SetSize(float f, TimeValue t) {
size = f;
// pblock->SetValue(PB_SIZE, t, f);
pblock->SetValue(smoke_size, t, f);
}
示例8: SetIter
void Smoke::SetIter(int i, TimeValue t) {
iter = i;
// pblock->SetValue(PB_ITER, t, i);
pblock->SetValue(smoke_iteration, t, i);
}
示例9: SetAmp
void Water::SetAmp(float f, TimeValue t, BOOL init) {
amp = f;
// pblock->SetValue(PB_AMP, t, f);
pblock->SetValue(water_amp, t, f);
if (init) ReInit();
}
示例10: GetValidity
Interval ConvertToPoly::GetValidity (TimeValue t) {
Interval ret = FOREVER;
pblock->GetValidity (t, ret);
return ret;
}
示例11: ModifyObject
void ConvertToPoly::ModifyObject (TimeValue t, ModContext &mc, ObjectState *os, INode *node) {
if (!os->obj->CanConvertToType (triObjectClassID)) return;
Interval ivalid=os->obj->ObjectValidity (t);
TriObject *triObj;
PolyObject *polyObj;
PolyObject *pobj = new PolyObject ();
#ifndef NO_PATCHES // orb 02-11-2002
PatchObject *patchObj;
if (os->obj->IsSubClassOf (patchObjectClassID)) {
patchObj = (PatchObject *) os->obj;
Convert (patchObj, t, pobj->mm, ivalid);
} else
#endif // NO_PATCHES
{
if (os->obj->IsSubClassOf (triObjectClassID)) {
triObj = (TriObject *) os->obj;
Convert (triObj, t, pobj->mm, ivalid);
pobj->SetDisplacementDisable (triObj->mDisableDisplacement);
pobj->SetDisplacementSplit (triObj->mSplitMesh);
pobj->SetDisplacementParameters (triObj->mDispApprox);
pobj->SetDisplacement (triObj->mSubDivideDisplacement);
} else {
if (os->obj->IsSubClassOf (polyObjectClassID)) {
polyObj = (PolyObject *) os->obj;
Convert (polyObj, t, pobj->mm, ivalid);
pobj->SetDisplacementDisable (polyObj->GetDisplacementDisable ());
pobj->SetDisplacementSplit (polyObj->GetDisplacementSplit());
pobj->SetDisplacementParameters (polyObj->GetDisplacementParameters());
pobj->SetDisplacement (polyObj->GetDisplacement ());
} else {
if (os->obj->CanConvertToType (polyObjectClassID)) {
polyObj = (PolyObject *) os->obj->ConvertToType (t, polyObjectClassID);
Convert (polyObj, t, pobj->mm, ivalid);
if (polyObj != os->obj) delete polyObj;
} else {
triObj = (TriObject *) os->obj->ConvertToType (t, triObjectClassID);
Convert (triObj, t, pobj->mm, ivalid);
if (triObj != os->obj) delete triObj;
}
}
}
}
// Handle Selection Conversion
int selConv, useSoftSel;
int selLevel;
pblock->GetValue (turn_sel_type, t, selConv, ivalid);
pblock->GetValue (turn_softsel, t, useSoftSel, ivalid);
pblock->GetValue (turn_sel_level, t, selLevel, ivalid);
if (selLevel && (pobj->mm.selLevel != UI2SelLevel(selLevel))) useSoftSel = false;
if (!useSoftSel) pobj->mm.freeVSelectionWeights ();
int i;
float *vsel;
switch (selConv) {
case 1: // Clear selection
pobj->mm.ClearVFlags (MN_SEL);
pobj->mm.ClearEFlags (MN_SEL);
pobj->mm.ClearFFlags (MN_SEL);
pobj->mm.freeVSelectionWeights ();
break;
case 2: // Invert selection
vsel = pobj->mm.getVSelectionWeights ();
for (i=0; i<pobj->mm.numv; i++) {
if (pobj->mm.v[i].GetFlag (MN_SEL)) pobj->mm.v[i].ClearFlag (MN_SEL);
else pobj->mm.v[i].SetFlag (MN_SEL);
if (vsel) {
vsel[i] = 1.0f - vsel[i];
if (vsel[i]<1) pobj->mm.v[i].ClearFlag (MN_SEL);
}
}
for (i=0; i<pobj->mm.nume; i++) {
if (pobj->mm.e[i].GetFlag (MN_SEL)) pobj->mm.e[i].ClearFlag (MN_SEL);
else pobj->mm.e[i].SetFlag (MN_SEL);
}
for (i=0; i<pobj->mm.numf; i++) {
if (pobj->mm.f[i].GetFlag (MN_SEL)) pobj->mm.f[i].ClearFlag (MN_SEL);
else pobj->mm.f[i].SetFlag (MN_SEL);
}
}
// Set Subobject Level if needed
if(selLevel != 0)
pobj->mm.selLevel = UI2SelLevel(selLevel);
// Set display flags:
pobj->mm.dispFlags = 0;
switch (pobj->mm.selLevel) {
case MNM_SL_VERTEX:
pobj->mm.SetDispFlag (MNDISP_VERTTICKS|MNDISP_SELVERTS);
break;
case MNM_SL_EDGE:
pobj->mm.SetDispFlag (MNDISP_SELEDGES);
break;
case MNM_SL_FACE:
pobj->mm.SetDispFlag (MNDISP_SELFACES);
//.........这里部分代码省略.........
示例12: SetRGBFilterColor
//---------------------------------------------------------------------------
//
void LuminaireObject::SetRGBFilterColor(Point3& value, TimeValue& time)
{
DbgAssert(mpBlock != NULL);
mpBlock->SetValue(kPB_FILTER_COLOR, time, value);
}
示例13: SetDimmer
//---------------------------------------------------------------------------
//
void LuminaireObject::SetDimmer(float value, TimeValue time)
{
DbgAssert(mpBlock != NULL);
mpBlock->SetValue(kPB_DIMMER, time, value);
}
示例14: EnableUIControls
void SolidifyPW::EnableUIControls()
{
if ((ip) && hWnd)
{
TimeValue t = 0;
Interval iv;
BOOL ioverrideMatID;
pblock->GetValue(pb_overrideinnermatid,t,ioverrideMatID,iv);
SpinnerOn(hWnd,IDC_MATIDSPIN2,IDC_MATID2, ioverrideMatID);
EnableWindow(GetDlgItem(hWnd,IDC_IMATIDSTATIC),ioverrideMatID);
BOOL ooverrideMatID;
pblock->GetValue(pb_overrideoutermatid,t,ooverrideMatID,iv);
SpinnerOn(hWnd,IDC_MATIDSPIN3,IDC_MATID3, ooverrideMatID);
EnableWindow(GetDlgItem(hWnd,IDC_OMATIDSTATIC),ooverrideMatID);
BOOL overrideMatID;
pblock->GetValue(pb_overridematid,t,overrideMatID,iv);
SpinnerOn(hWnd,IDC_MATIDSPIN,IDC_MATID, overrideMatID);
EnableWindow(GetDlgItem(hWnd,IDC_EMATIDSTATIC),overrideMatID);
BOOL autoSmooth;
pblock->GetValue(pb_autosmooth,t,autoSmooth,iv);
SpinnerOn(hWnd,IDC_AUTOSMOOTHSPIN,IDC_AUTOSMOOTH, autoSmooth);
EnableWindow(GetDlgItem(hWnd,IDC_ANGLESTATIC),autoSmooth);
if (autoSmooth)
{
EnableWindow(GetDlgItem(hWnd,IDC_SMOOTHCHECK),FALSE);
EnableWindow(GetDlgItem(hWnd,IDC_SGSTATIC),FALSE);
SpinnerOn(hWnd,IDC_SMOOTHGROUPSPIN,IDC_SMOOTHGROUP, FALSE);
}
else
{
EnableWindow(GetDlgItem(hWnd,IDC_SMOOTHCHECK),TRUE);
EnableWindow(GetDlgItem(hWnd,IDC_SGSTATIC),TRUE);
BOOL overridesg;
pblock->GetValue(pb_overridesg,t,overridesg,iv);
SpinnerOn(hWnd,IDC_SMOOTHGROUPSPIN,IDC_SMOOTHGROUP, overridesg);
}
int edgeMap;
pblock->GetValue(pb_edgemap,t,edgeMap,iv);
if (edgeMap < 2 )
{
EnableWindow(GetDlgItem(hWnd,IDC_TVSTATIC),FALSE);
SpinnerOn(hWnd,IDC_TVOFFSETSPIN,IDC_TVOFFSET, FALSE);
}
else
{
EnableWindow(GetDlgItem(hWnd,IDC_TVSTATIC),TRUE);
SpinnerOn(hWnd,IDC_TVOFFSETSPIN,IDC_TVOFFSET, TRUE);
}
}
}
示例15: ModifyObject
void SolidifyPW::ModifyObject(TimeValue t, ModContext &mc, ObjectState * os, INode *node)
{
//TODO: Add the code for actually modifying the object
meshInfo.Free();
if (os->obj->IsSubClassOf(triObjectClassID)) {
TriObject *tobj = (TriObject*)os->obj;
Mesh &mesh = tobj->GetMesh();
Interval iv = FOREVER;
float a,oa;
pblock->GetValue(pb_amount,t,a,iv);
pblock->GetValue(pb_oamount,t,oa,iv);
if (a == oa)
oa += 0.00001f;
BOOL overrideMatID;
int matid;
pblock->GetValue(pb_overridematid,t,overrideMatID,iv);
pblock->GetValue(pb_matid,t,matid,iv);
matid--;
if (!overrideMatID) matid = -1;
BOOL overridesg;
int sg;
pblock->GetValue(pb_overridesg,t,overridesg,iv);
pblock->GetValue(pb_sg,t,sg,iv);
if (!overridesg) sg = -1;
int edgeMap;
pblock->GetValue(pb_edgemap,t,edgeMap,iv);
float tvOffset;
pblock->GetValue(pb_tvoffset,t,tvOffset,iv);
BOOL ioverrideMatID;
int imatid;
pblock->GetValue(pb_overrideinnermatid,t,ioverrideMatID,iv);
pblock->GetValue(pb_innermatid,t,imatid,iv);
imatid--;
if (!ioverrideMatID) imatid = -1;
BOOL ooverrideMatID;
int omatid;
pblock->GetValue(pb_overrideoutermatid,t,ooverrideMatID,iv);
pblock->GetValue(pb_outermatid,t,omatid,iv);
omatid--;
if (!ooverrideMatID) omatid = -1;
BOOL selEdges, selInner,selOuter;
static BOOL selEdgesPrev = FALSE;
static BOOL selInnerPrev = FALSE;
static BOOL selOuterPrev = FALSE;
BOOL updateUI = FALSE;
pblock->GetValue(pb_seledges,t,selEdges,iv);
pblock->GetValue(pb_selinner,t,selInner,iv);
pblock->GetValue(pb_selouter,t,selOuter,iv);
if (selEdges && (!selEdgesPrev))
updateUI = TRUE;
if (selInner && (!selInnerPrev))
updateUI = TRUE;
if (selOuter && (!selOuterPrev))
updateUI = TRUE;
selEdgesPrev = selEdges;
selInnerPrev = selInner;
selOuterPrev = selOuter;
if (selEdges || selInner|| selOuter)
{
mesh.dispFlags = DISP_SELFACES;
mesh.selLevel = MESH_FACE;
}
int segments = 1;
pblock->GetValue(pb_segments,t,segments,iv);
if (segments < 1) segments = 1;
//.........这里部分代码省略.........