ExtrudeMod::ExtrudeMod(BOOL create) { //watje new mapping ver < 4 of this modifier use the old mapping ver = 4; pblock = NULL; ReplaceReference(0, CreateParameterBlock(descVer6, PBLOCK_LENGTH, CURRENT_VERSION)); pblock->SetValue(PB_AMOUNT, TimeValue(0), dlgAmount); pblock->SetValue(PB_SEGS, TimeValue(0), dlgSegs); pblock->SetValue(PB_CAPSTART, TimeValue(0), dlgCapStart); pblock->SetValue(PB_CAPEND, TimeValue(0), dlgCapEnd); pblock->SetValue(PB_CAPTYPE, TimeValue(0), dlgCapType); pblock->SetValue(PB_OUTPUT, TimeValue(0), dlgOutput); pblock->SetValue(PB_MAPPING, TimeValue(0), dlgMapping); pblock->SetValue(PB_GEN_MATIDS, TimeValue(0), dlgGenMatIDs); pblock->SetValue(PB_USE_SHAPEIDS, TimeValue(0), dlgUseShapeIDs); pblock->SetValue(PB_SMOOTH, TimeValue(0), dlgSmooth); dlgProc.SetMod(this); #ifdef PHYSICAL_SCALE_UVS if (create) if (!GetPhysicalScaleUVsDisabled()) SetUsePhysicalScaleUVs(true); #endif }
void ExtrudePostLoadCallback::proc(ILoad *iload) { DWORD oldVer = ((ExtrudeMod*)(cb->targ))->pblock->GetVersion(); ReferenceTarget *targ = cb->targ; cb->proc(iload); if (oldVer<4) ((ExtrudeMod*)targ)->pblock->SetValue(PB_GEN_MATIDS,0,FALSE); if (oldVer<5) ((ExtrudeMod*)targ)->pblock->SetValue(PB_USE_SHAPEIDS,0,FALSE); if (oldVer<6) ((ExtrudeMod*)targ)->pblock->SetValue(PB_SMOOTH,0,TRUE); // russom - 11/19/01 // If file loaded has the lathe output set to NURBS, set it Mesh #ifdef NO_NURBS int output; ((ExtrudeMod*)targ)->pblock->GetValue(PB_OUTPUT, TimeValue(0), output, FOREVER); if( output == NURBS_OUTPUT ) ((ExtrudeMod*)targ)->pblock->SetValue(PB_OUTPUT, TimeValue(0), MESH_OUTPUT); #endif // russom - 11/19/01 // If file loaded has the lathe output set to Patches, set it Mesh #ifdef NO_PATCHES int outputPatch; ((ExtrudeMod*)targ)->pblock->GetValue(PB_OUTPUT, TimeValue(0), outputPatch, FOREVER); if( outputPatch == PATCH_OUTPUT ) ((ExtrudeMod*)targ)->pblock->SetValue(PB_OUTPUT, TimeValue(0), MESH_OUTPUT); #endif delete this; }
Texmap *plRTSpotLight::GetProjMap() { if( !fLightPB->GetInt( kUseProjectorBool ) ) return nil; Interval valid = Interval(0,0); if( !GetTex() ) { if( fLightPB->GetInt( kUseProjectorBool ) ) { PBBitmap* bitmap = fLightPB->GetBitmap( kProjMapTexButton, 0 ); SetProjMap( &bitmap->bi ); } } if( GetTex() ) { const char* dbgTexName = GetTex()->GetName(); IParamBlock2 *bitmapPB = fTex->GetParamBlockByID(plLayerTex::kBlkBitmap); hsAssert(bitmapPB, "LayerTex with no param block"); int noCompress = fLightPB->GetInt(kProjNoCompress); int noMip = fLightPB->GetInt(kProjNoMip); bitmapPB->SetValue(kBmpNonCompressed, TimeValue(0), noCompress); bitmapPB->SetValue(kBmpNoFilter, TimeValue(0), noMip); } return (Texmap *)GetTex(); }
Texmap *plRTProjDirLight::GetProjMap() { // If we don't have one, create one plLayerTex *layer = (plLayerTex *)fProjPB->GetTexmap( kTexmap, 0 ); if( layer == nil || layer->ClassID() != LAYER_TEX_CLASS_ID ) { layer = new plLayerTex; fProjPB->SetValue( kTexmap, 0, (Texmap *)layer ); IParamBlock2 *bitmapPB = layer->GetParamBlockByID( plLayerTex::kBlkBitmap ); bitmapPB->SetValue( kBmpUseBitmap, 0, 1 ); } // Backwards compatability here PBBitmap *bitmap = fProjPB->GetBitmap( kProjMap, 0 ); if( bitmap != nil ) { layer->SetBitmap( &bitmap->bi ); fProjPB->SetValue( kProjMap, 0, (PBBitmap *)nil ); } if( layer ) { const char* dbgTexName = layer->GetName(); IParamBlock2 *bitmapPB = layer->GetParamBlockByID(plLayerTex::kBlkBitmap); hsAssert(bitmapPB, "LayerTex with no param block"); int noCompress = fProjPB->GetInt(kProjNoCompress); int noMip = fProjPB->GetInt(kProjNoMip); bitmapPB->SetValue(kBmpNonCompressed, TimeValue(0), noCompress); bitmapPB->SetValue(kBmpNoFilter, TimeValue(0), noMip); } return (Texmap *)layer; }
void ProgressPanel::doProgressStartOnMainThread(const NodePtr& node, const QString &message, const QString & /*messageid*/, bool canCancel) { startTask(node, TimeValue(INT_MIN), TimeValue(INT_MAX), TimeValue(1), false, canCancel, message); }
// --- Methods inherited from Tex3D --- void Speckle::ReadSXPData(const TCHAR *name, void *sxpdata) { SpeckleState *state = (SpeckleState*)sxpdata; if (state != NULL && (state->version == SPECKLE_SXP_VERSION)) { SetColor(0, ColorFromCol24(state->col1), TimeValue(0)); SetColor(1, ColorFromCol24(state->col2), TimeValue(0)); SetSize(state->size, TimeValue(0)); } }
int main () { printf ("Results of animation2_test:\n"); try { AnimationManager manager; manager.LoadResource ("data/test.xanim"); Node::Pointer node = Node::Create (), target1 = Node::Create (), target2 = Node::Create (); target1->SetName ("target1"); target2->SetName ("target2"); target1->BindToParent (*node); target2->BindToParent (*node); Animation animation = manager.PlayAnimation ("animation1", *node, &event_handler); animation.RegisterEventHandler (AnimationEvent_OnPlay, &event_handler); animation.RegisterEventHandler (AnimationEvent_OnPause, &event_handler); animation.RegisterEventHandler (AnimationEvent_OnStop, &event_handler); animation.RegisterEventHandler (AnimationEvent_OnUpdate, &event_handler); animation.RegisterEventHandler (AnimationEvent_OnDestroy, &event_handler); printf ("animation duration: %.2f\n", animation.Duration ()); node->Update (TimeValue (2, 1)); node->Update (TimeValue (3, 1)); animation.Pause (); animation.Pause (); node->Update (TimeValue (4, 1)); printf ("animation offset %.2f\n", animation.Tell ()); animation.Play (); animation.Play (); node->Update (TimeValue (5, 1)); printf ("animation offset %.2f\n", animation.Tell ()); animation.Stop (); node->Update (TimeValue (6, 1)); printf ("animation offset %.2f\n", animation.Tell ()); } catch (std::exception& e) { printf ("%s\n", e.what ()); } return 0; }
// --- Methods inherited from Tex3D --- void Splat::ReadSXPData(TCHAR *name, void *sxpdata) { SplatState *state = (SplatState*)sxpdata; if (state != NULL && (state->version == SPLAT_SXP_VERSION)) { SetColor(0, ColorFromCol24(state->col1), TimeValue(0)); SetColor(1, ColorFromCol24(state->col2), TimeValue(0)); SetSize(state->size, TimeValue(0)); SetThresh(state->thresh, TimeValue(0)); } }
RelaxMod::RelaxMod() { pblock = NULL; ReplaceReference(0, CreateParameterBlock(descVer1, PBLOCK_LENGTH, CURRENT_VERSION)); pblock->SetValue (PB_RELAX, TimeValue(0), DEF_RELAX); pblock->SetValue (PB_ITER, TimeValue(0), DEF_ITER); pblock->SetValue (PB_BOUNDARY, TimeValue(0), DEF_BOUNDARY); pblock->SetValue (PB_SADDLE, TimeValue(0), DEF_SADDLE); version = RELAXMOD_CURRENT_VERSION; }
void EditPolyData::ShrinkSelection (IMeshSelect *imod, int level) { DbgAssert (mpMesh); if( !mpMesh ) return; BitArray newSel; int mnSelLevel = meshSelLevel[level]; DbgAssert (mpMesh->GetFlag (MN_MESH_FILLED_IN)); if (!mpMesh->GetFlag (MN_MESH_FILLED_IN)) return; SynchBitArrays(); switch (mnSelLevel) { case MNM_SL_VERTEX: // Find the edges between two selected vertices. mpMesh->ClearEFlags (MN_USER); mpMesh->PropegateComponentFlags (MNM_SL_EDGE, MN_USER, mnSelLevel, MN_SEL, true); newSel = mVertSel; // De-select all the vertices touching edges to unselected vertices: for (int i=0; i<mpMesh->nume; i++) { if (!mpMesh->e[i].GetFlag (MN_USER)) { newSel.Clear (mpMesh->e[i].v1); newSel.Clear (mpMesh->e[i].v2); } } SetVertSel (newSel, imod, TimeValue(0)); break; case MNM_SL_EDGE: // Find all vertices used by only selected edges: mpMesh->ClearVFlags (MN_USER); mpMesh->PropegateComponentFlags (MNM_SL_VERTEX, MN_USER, mnSelLevel, MN_SEL, true); newSel = mEdgeSel; for (int i=0; i<mpMesh->nume; i++) { // Deselect edges with at least one vertex touching a nonselected edge: if (!mpMesh->v[mpMesh->e[i].v1].GetFlag (MN_USER) || !mpMesh->v[mpMesh->e[i].v2].GetFlag (MN_USER)) newSel.Clear (i); } SetEdgeSel (newSel, imod, TimeValue(0)); break; case MNM_SL_FACE: // Find all vertices used by only selected faces: mpMesh->ClearVFlags (MN_USER); mpMesh->PropegateComponentFlags (MNM_SL_VERTEX, MN_USER, mnSelLevel, MN_SEL, true); newSel = mFaceSel; for (int i=0; i<mpMesh->numf; i++) { for (int j=0; j<mpMesh->f[i].deg; j++) { if (!mpMesh->v[mpMesh->f[i].vtx[j]].GetFlag (MN_USER)) { // Deselect faces with at least one vertex touching a nonselected face: newSel.Clear (i); break; } } } SetFaceSel (newSel, imod, TimeValue(0)); break; } }
// --- Methods inherited from Tex3D --- void Planet::ReadSXPData(TCHAR *name, void *sxpdata) { PlanetState *state = (PlanetState*)sxpdata; if (state != NULL && (state->version == PLANET_SXP_VERSION)) { SetSize(state->size, TimeValue(0)); SetPercent(state->percent, TimeValue(0)); SetIsland(state->island, TimeValue(0)); SetSeed(state->seed, TimeValue(0)); } }
void Plate::Init() { ivalid.SetEmpty(); nth = 1; do_nth = TRUE; applyBlur = TRUE; useEnvMap = TRUE; SetBlur(1.0f, TimeValue(0)); SetThick(0.5f, TimeValue(0)); SetRefrAmt(1.0f, TimeValue(0)); }
Matrix3 plDistributor::IOTM(int iRepNode) const { // objectTM = otm * nodeTM // objectTM * Inverse(nodeTM) = otm INode* repNode = fRepNodes[iRepNode]; Matrix3 objectTM = repNode->GetObjectTM(TimeValue(0)); Matrix3 nodeTM = repNode->GetNodeTM(TimeValue(0)); Matrix3 OTM = objectTM * Inverse(nodeTM); return OTM; }
Matrix3 plDistributor::IInvOTM(int iRepNode) const { // objectTM = otm * nodeTM // invOTM * objectTM = nodeTM // invOTM = nodeTM * invObjectTM INode* repNode = fRepNodes[iRepNode]; Matrix3 objectTM = repNode->GetObjectTM(TimeValue(0)); Matrix3 nodeTM = repNode->GetNodeTM(TimeValue(0)); Matrix3 invOTM = nodeTM * Inverse(objectTM); return invOTM; }
void EditPolyData::GrowSelection (IMeshSelect *imod, int level) { DbgAssert (mpMesh); if( !mpMesh ) return; BitArray newSel; int mnSelLevel = meshSelLevel[level]; DbgAssert (mpMesh->GetFlag (MN_MESH_FILLED_IN)); if (!mpMesh->GetFlag (MN_MESH_FILLED_IN)) return; SynchBitArrays(); int i; switch (mnSelLevel) { case MNM_SL_VERTEX: for (i=0; i<mpMesh->numv; i++) mpMesh->v[i].SetFlag (MN_USER, mVertSel[i]!=0); mpMesh->ClearEFlags (MN_USER); mpMesh->PropegateComponentFlags (MNM_SL_EDGE, MN_USER, MNM_SL_VERTEX, MN_USER); newSel.SetSize (mpMesh->numv); for (i=0; i<mpMesh->nume; i++) { if (mpMesh->e[i].GetFlag (MN_USER)) { newSel.Set (mpMesh->e[i].v1); newSel.Set (mpMesh->e[i].v2); } } SetVertSel (newSel, imod, TimeValue(0)); break; case MNM_SL_EDGE: for (i=0; i<mpMesh->nume; i++) mpMesh->e[i].SetFlag (MN_USER, mEdgeSel[i]!=0); mpMesh->ClearVFlags (MN_USER); mpMesh->PropegateComponentFlags (MNM_SL_VERTEX, MN_USER, MNM_SL_EDGE, MN_USER); newSel.SetSize (mpMesh->nume); for (i=0; i<mpMesh->nume; i++) { if (mpMesh->v[mpMesh->e[i].v1].GetFlag (MN_USER) || mpMesh->v[mpMesh->e[i].v2].GetFlag (MN_USER)) newSel.Set (i); } SetEdgeSel (newSel, imod, TimeValue(0)); break; case MNM_SL_FACE: for (i=0; i<mpMesh->numf; i++) mpMesh->f[i].SetFlag (MN_USER, mFaceSel[i]!=0); mpMesh->ClearVFlags (MN_USER); mpMesh->PropegateComponentFlags (MNM_SL_VERTEX, MN_USER, MNM_SL_FACE, MN_USER); newSel.SetSize (mpMesh->numf); for (i=0; i<mpMesh->numf; i++) { int j; for (j=0; j<mpMesh->f[i].deg; j++) { if (mpMesh->v[mpMesh->f[i].vtx[j]].GetFlag (MN_USER)) break; } if (j<mpMesh->f[i].deg) newSel.Set (i); } SetFaceSel (newSel, imod, TimeValue(0)); break; } }
void FEVersionFix::proc (ILoad *iload) { int type; // See if we're dealing with an old parameter block: ReferenceTarget* ref = mod->GetReference (kFEX_PBLOCK_REF); if (ref != NULL && ref->ClassID() != Class_ID(PARAMETER_BLOCK2_CLASS_ID, 0)) { // Must be an old param block. IParamBlock *mp_pblock = (IParamBlock*) ref; mp_pblock->GetValue (kFexType, TimeValue(0), type, FOREVER); mp_pblock->SetValue (kFexType, TimeValue(0), type+1); } delete this; }
BOOL plDistributor::ISpaceClear(int iRepNode, const Matrix3& l2w, Box3& clearBox, plMeshCacheTab& cache) const { if( !fDistTree ) return true; // If we have high isolation, // clearBox = Box3(Point3(-fSpacing*0.5f, -fSpacing*0.5f, 0), Point3(fSpacing*0.5f, fSpacing*0.5f, fSpacing)); // Else if we have medium isolation // clearBox = cache[iRepNode]->getBoundingBox(); // The mesh's bounds // Else if we have low isolation or None isolation // clearBox = Box3(Point3(-kSmallSpace, -kSmallSpace, 0), Point3(kSmallSpace, kSmallSpace, kSmallSpace)); // kSmallSpace ~= 0.5f or one or something // We want to set up the box (for high, low and none) in Post OTM space. So instead of multiplying // by l2w, we want to multiply box = box * invOTM * l2w (because l2w already has OTM folded in). When using // the mesh bounds (Medium), l2w is the right transform. // objectTM = otm * nodeTM // invOTM * objectTM = nodeTM // invOTM = nodeTM * invObjectTM const float kSmallSpace = 0.5f; switch( fIsolation ) { case kIsoHigh: { INode* repNode = fRepNodes[iRepNode]; Matrix3 objectTM = repNode->GetObjectTM(TimeValue(0)); Matrix3 nodeTM = repNode->GetNodeTM(TimeValue(0)); Matrix3 invOTM = nodeTM * Inverse(objectTM); clearBox = Box3(Point3(-fSpacing*0.5f, -fSpacing*0.5f, 0.f), Point3(fSpacing*0.5f, fSpacing*0.5f, fSpacing)); clearBox = clearBox * invOTM; } break; case kIsoMedium: clearBox = cache[iRepNode].fMesh->getBoundingBox(); // The mesh's bounds break; case kIsoLow: case kIsoNone: default: { INode* repNode = fRepNodes[iRepNode]; Matrix3 objectTM = repNode->GetObjectTM(TimeValue(0)); Matrix3 nodeTM = repNode->GetNodeTM(TimeValue(0)); Matrix3 invOTM = nodeTM * Inverse(objectTM); clearBox = Box3(Point3(-kSmallSpace, -kSmallSpace, 0.f), Point3(kSmallSpace, kSmallSpace, kSmallSpace)); clearBox = clearBox * invOTM; } break; } clearBox = clearBox * l2w; return fDistTree->BoxClear(clearBox, fFade); }
void ClientPerfDataStore::reset() { _operationType = CIMOPTYPE_INVOKE_METHOD; _serverTimeKnown = false; _errorCondition = false; _serverTime = 0; _networkStartTime = TimeValue(); _networkEndTime = TimeValue(); _requestSize = 0; _responseSize = 0; _messID = ""; }
void ViewerDisplayScheduler::getFrameRangeToRender(TimeValue &first, TimeValue &last) const { ViewerNodePtr isViewer = getOutputNode()->isEffectViewerNode(); ViewerNodePtr leadViewer = isViewer->getApp()->getLastViewerUsingTimeline(); ViewerNodePtr v = leadViewer ? leadViewer : isViewer; assert(v); int left, right; v->getTimelineBounds(&left, &right); first = TimeValue(left); last = TimeValue(right); }
void Wood::Init() { if (xyzGen) xyzGen->Reset(); else ReplaceReference( 0, GetNewDefaultXYZGen()); ivalid.SetEmpty(); SetColor(0, Color(0.79f,0.69f,0.27f), TimeValue(0)); SetColor(1, Color(0.51f,0.32f,0.05f), TimeValue(0)); RegisterDistanceDefault(_T("Wood Params"), _T("Size"), 7.0f, IN_TO_M(7.0f)); float size = GetDistanceDefault(_T("Wood Params"), _T("Size")); SetSize(size, TimeValue(0)); SetR1(1.0f, TimeValue(0)); SetR2(1.0f, TimeValue(0)); for (int i=0; i<NSUBTEX; i++) mapOn[i] = TRUE; }
// This method is called to reset the texmap back to its default values. void Speckle::Init() { // Reset the XYZGen or allocate a new one if (xyzGen) xyzGen->Reset(); else ReplaceReference(0, GetNewDefaultXYZGen()); // Set the inital colors and size SetColor(0, DEFAULT_COLOR1, TimeValue(0)); SetColor(1, DEFAULT_COLOR2, TimeValue(0)); SetSize(DEFAULT_SPECKLE_SIZE, TimeValue(0)); // Set the validity interval of the texture to empty texValidity.SetEmpty(); }
BOOL plDistributor::ISetSurfaceNode(INode* surfNode) const { if( !IGetMesh(surfNode, fSurfObjToDelete, fSurfMesh) ) { return false; } fSurfNode = surfNode; fSurfToWorld = surfNode->GetObjectTM(TimeValue(0)); fWorldToSurf = Inverse(fSurfToWorld); fSurfToWorldVec = Transpose(fWorldToSurf); fWorldToSurfVec = Transpose(fSurfToWorld); fSurfAngProbVec = FNormalize(fWorldToSurfVec * fAngProbVec); // This doesn't have anything to do with the surface node, but it // does have to do with the SurfAngProbVec, and this is as good a // place as any to do it. ISetAngProbCosines(); fSurfAlignVec = FNormalize(fWorldToSurfVec * fAlignVec); if( INeedMeshTree() ) IMakeMeshTree(); return true; }
// This method is called to reset the texmap back to its default values. void Speckle::Init() { // Reset the XYZGen or allocate a new one if (xyzGen) xyzGen->Reset(); else ReplaceReference(0, GetNewDefaultXYZGen()); // Set the inital colors and size SetColor(0, DEFAULT_COLOR1, TimeValue(0)); SetColor(1, DEFAULT_COLOR2, TimeValue(0)); RegisterDistanceDefault(_T("Speckle Params"), _T("Size"), DEFAULT_SPECKLE_SIZE, IN_TO_M(DEFAULT_SPECKLE_SIZE)); float size = GetDistanceDefault(_T("Speckle Params"), _T("Size")); SetSize(size, TimeValue(0)); // Set the validity interval of the texture to empty texValidity.SetEmpty(); }
void EditPolyData::SelectEdgeLoop(IMeshSelect *imod) { DbgAssert (mpMesh); if( !mpMesh ) return; BitArray nsel = mEdgeSel; mpMesh->SelectEdgeLoop (nsel); SetEdgeSel (nsel, imod, TimeValue(0)); }
static void getRoDFromItem(const RotoDrawableItemPtr& item, TimeValue time, ViewIdx view, bool isPainting, RectD* rod) { // Account for motion-blur RangeD range; int divisions; if (!isPainting) { item->getMotionBlurSettings(time, view, &range, &divisions); } else { range.min = range.max = time; divisions = 1; } double interval = divisions >= 1 ? (range.max - range.min) / divisions : 1.; bool rodSet = false; for (int i = 0; i < divisions; ++i) { double t = divisions > 1 ? range.min + i * interval : time; RectD divisionRoD = item->getBoundingBox(TimeValue(t), view); if (!rodSet) { rodSet = true; *rod = divisionRoD; } else { rod->merge(divisionRoD); } } }
void HwmpReactiveRegressionTest::CreateDevices () { int64_t streamsUsed = 0; // 1. setup WiFi YansWifiPhyHelper wifiPhy = YansWifiPhyHelper::Default (); // This test suite output was originally based on YansErrorRateModel wifiPhy.SetErrorRateModel ("ns3::YansErrorRateModel"); YansWifiChannelHelper wifiChannel = YansWifiChannelHelper::Default (); Ptr<YansWifiChannel> chan = wifiChannel.Create (); wifiPhy.SetChannel (chan); // 2. setup mesh MeshHelper mesh = MeshHelper::Default (); mesh.SetStackInstaller ("ns3::Dot11sStack"); mesh.SetMacType ("RandomStart", TimeValue (Seconds (0.1))); mesh.SetNumberOfInterfaces (1); NetDeviceContainer meshDevices = mesh.Install (wifiPhy, *m_nodes); // Six devices, 4 streams per device streamsUsed += mesh.AssignStreams (meshDevices, streamsUsed); NS_TEST_EXPECT_MSG_EQ (streamsUsed, (meshDevices.GetN () * 4), "Stream assignment mismatch"); streamsUsed += wifiChannel.AssignStreams (chan, streamsUsed); NS_TEST_EXPECT_MSG_EQ (streamsUsed, (meshDevices.GetN () * 4), "Stream assignment mismatch"); // 3. setup TCP/IP InternetStackHelper internetStack; internetStack.Install (*m_nodes); Ipv4AddressHelper address; address.SetBase ("10.1.1.0", "255.255.255.0"); m_interfaces = address.Assign (meshDevices); // 4. write PCAP if needed wifiPhy.EnablePcapAll (CreateTempDirFilename (PREFIX)); }
StretchMod::StretchMod() : SimpleMod() { MakeRefByID(FOREVER, SIMPMOD_PBLOCKREF, CreateParameterBlock(descVer, PBLOCK_LENGTH, 0)); pblock->SetValue(PB_AXIS, TimeValue(0), 2/*Z*/); }
SkewMod::SkewMod() : SimpleMod() { MakeRefByID(FOREVER, SIMPMOD_PBLOCKREF, CreateParameterBlock(descVer0, PBLOCK_LENGTH, CURRENT_VERSION)); pblock->SetValue(PB_AXIS, TimeValue(0), 2/*Z*/); }
TimeValue ViewerNode::getLastRenderedTime() const { OpenGLViewerI* uiContext = getUiContext(); return uiContext ? uiContext->getCurrentlyDisplayedTime() : TimeValue(getApp()->getTimeLine()->currentFrame()); }
RefResult SymmetryMod::NotifyRefChanged( const Interval& changeInt,RefTargetHandle hTarget, PartID& partID, RefMessage message, BOOL propagate) { ParamID pid; int weld; IParamMap2 *pPMap; HWND hDialog, hThreshLabel; switch (message) { case REFMSG_CHANGE: if (hTarget != mp_pblock) break; pid = mp_pblock->LastNotifyParamID (); if (pid != kSymWeld) break; pPMap = mp_pblock->GetMap(kSymmetryParams); if (!pPMap) break; hDialog = pPMap->GetHWnd(); if (!hDialog) break; mp_pblock->GetValue (kSymWeld, TimeValue(0), weld, FOREVER); hThreshLabel = GetDlgItem (hDialog, IDC_SYM_THRESH_LABEL); if (hThreshLabel) EnableWindow (hThreshLabel, weld); break; } return REF_SUCCEED; }