AFRMod::AFRMod() { MakeRefByID( FOREVER, PBLOCK_REF, CreateParameterBlock( descVer0, PBLOCK_LENGTH, CURRENT_VERSION)); p1 = p2 = NULL; MakeRefByID(FOREVER,POINT1_REF,NewDefaultPoint3Controller()); MakeRefByID(FOREVER,POINT2_REF,NewDefaultPoint3Controller()); sel[0] = sel[1] = 0; pblock->SetValue(PB_FALLOFF,0,20.0f); Point3 pt(0,0,25); p2->SetValue(0,&pt); }
Control* BaseLimitCtrl::GetDefaultControlForDataType() { switch(SuperClassID()) { case CTRL_FLOAT_CLASS_ID: case CTRL_SHORT_CLASS_ID: case CTRL_INTEGER_CLASS_ID: return NewDefaultFloatController(); case CTRL_POINT3_CLASS_ID: return NewDefaultPoint3Controller(); case CTRL_POSITION_CLASS_ID: return NewDefaultPositionController(); case CTRL_ROTATION_CLASS_ID: return NewDefaultRotationController(); case CTRL_SCALE_CLASS_ID: return NewDefaultScaleController(); case CTRL_MATRIX3_CLASS_ID: return NewDefaultMatrix3Controller(); case CTRL_MASTERPOINT_CLASS_ID: return NewDefaultMasterPointController(); case CTRL_POINT4_CLASS_ID: return NewDefaultPoint4Controller(); case CTRL_COLOR24_CLASS_ID: return NewDefaultColorController(); case CTRL_FRGBA_CLASS_ID: return NewDefaultFRGBAController(); case CTRL_MORPH_CLASS_ID: default: return NULL; } }
FExtrudeMod::FExtrudeMod() { mp_base = NULL; mp_pblock = NULL; ReplaceReference (kFEX_POINT_REF, NewDefaultPoint3Controller()); fextrudeDesc.MakeAutoParamBlocks(this); }
FExtrudeMod::FExtrudeMod() { base = NULL; pblock = NULL; ReplaceReference(PBLOCK_REF, CreateParameterBlock(descVer0, PBLOCK_LENGTH, CURRENT_VERSION)); ReplaceReference(POINT_REF,NewDefaultPoint3Controller()); pblock->SetValue(PB_SCALE,0,100.0f); }
//from IUnReplaceableControl Control * Point3ExposeControl::GetReplacementClone() { Control *control = NewDefaultPoint3Controller(); if(control) { // set key per frame Interval range =GetCOREInterface()->GetAnimRange(); TimeValue tpf = GetTicksPerFrame(); SuspendAnimate(); AnimateOn(); Point3 v; for(TimeValue t= range.Start(); t<=range.End();t+=tpf) { GetValue(t,&v,Interval(t,t)); control->SetValue(t,&v,1,CTRL_ABSOLUTE); } ResumeAnimate(); } return control; }