コード例 #1
0
ファイル: Symmetry.cpp プロジェクト: innovatelogic/ilogic-vm
void SymmetryMod::BeginEditParams (IObjParam  *ip, ULONG flags,Animatable *prev) {
	mp_ip = ip;

	// Create sub object editing modes.
	mp_moveMode    = new MoveModBoxCMode(this,ip);
	mp_rotMode     = new RotateModBoxCMode(this,ip);
	mp_scaleMode = new UScaleModBoxCMode (this, ip);
	mp_nuScaleMode = new NUScaleModBoxCMode (this, ip);
	mp_squashMode = new SquashModBoxCMode (this, ip);

	TimeValue t = ip->GetTime();
	NotifyDependents(Interval(t,t), PART_ALL, REFMSG_BEGIN_EDIT);
	NotifyDependents(Interval(t,t), PART_ALL, REFMSG_MOD_DISPLAY_ON);
	SetAFlag(A_MOD_BEING_EDITED);

	// For PB2 we ask the ClassDesc2 to take care of the BeginEditParams
	symDesc.BeginEditParams(ip,this,flags,prev);
}
コード例 #2
0
ファイル: torus.cpp プロジェクト: innovatelogic/ilogic-vm
TorusObject::TorusObject(BOOL loading)
	{
	SetAFlag(A_PLUGIN1);
	ReplaceReference(0, CreateParameterBlock(descVer3, PBLOCK_LENGTH, CURRENT_VERSION));
	assert(pblock);

	pblock->SetValue(PB_SMOOTH,0,dlgSmooth);
	pblock->SetValue(PB_SEGMENTS,0,dlgSegments);
	pblock->SetValue(PB_SIDES,0,dlgSides);	
	pblock->SetValue(PB_RADIUS,0,crtRadius1);
	pblock->SetValue(PB_RADIUS2,0,crtRadius2);	
	pblock->SetValue(PB_GENUVS,0,TRUE);

#ifdef PHYSICAL_SCALE_UVS
	if (!loading && !GetPhysicalScaleUVsDisabled())
		SetUsePhysicalScaleUVs(true);
#endif
	}
コード例 #3
0
ファイル: relax.cpp プロジェクト: innovatelogic/ilogic-vm
void RelaxMod::BeginEditParams( IObjParam *ip, ULONG flags,Animatable *prev ) {
	this->ip = ip;
	editMod = this;

	TimeValue t = ip->GetTime();
	NotifyDependents(Interval(t,t), PART_ALL, REFMSG_BEGIN_EDIT);
	NotifyDependents(Interval(t,t), PART_ALL, REFMSG_MOD_DISPLAY_ON);
	SetAFlag(A_MOD_BEING_EDITED);

	pmapParam = CreateCPParamMap(
		descParam,PARAMDESC_LENGTH,
		pblock,
		ip,
		hInstance,
		MAKEINTRESOURCE(IDD_RELAX),
		GetString (IDS_PARAMETERS),
		0);
}
コード例 #4
0
ファイル: NP.cpp プロジェクト: CCChaos/RyzomCore
// World scaling
void EditPatchMod::RescaleWorldUnits(float f) 
{
	if (TestAFlag(A_WORK1))
		return;
	SetAFlag(A_WORK1);
	
	// rescale all our references
	for (int i = 0; i < NumRefs(); i++)
	{
		ReferenceMaker *srm = GetReference(i);
		if (srm) 
			srm->RescaleWorldUnits(f);
	}
	
	// Now rescale stuff inside our data structures
	EPModContextEnumProc proc(f);
	EnumModContexts(&proc);
	NotifyDependents(FOREVER, PART_GEOM, REFMSG_CHANGE);
}
コード例 #5
0
ファイル: torus.cpp プロジェクト: innovatelogic/ilogic-vm
IOResult TorusObject::Load(ILoad *iload) 
	{
	ClearAFlag(A_PLUGIN1);

	IOResult res;
	while (IO_OK==(res=iload->OpenChunk())) {
		switch (iload->CurChunkID()) {	
			case NEWMAP_CHUNKID:
				SetAFlag(A_PLUGIN1);
				break;
			}
		iload->CloseChunk();
		if (res!=IO_OK)  return res;
		}

	iload->RegisterPostLoadCallback(
		new ParamBlockPLCB(versions,NUM_OLDVERSIONS,&curVersion,this,0));
	return IO_OK;
	}
コード例 #6
0
void RendSpline::BeginEditParams( IObjParam *ip, ULONG flags,Animatable *prev )
{
	this->ip = ip;

	ip->EnableShowEndResult(FALSE);

	TimeValue t = ip->GetTime();
	NotifyDependents(Interval(t,t), PART_ALL, REFMSG_BEGIN_EDIT);
	NotifyDependents(Interval(t,t), PART_ALL, REFMSG_MOD_DISPLAY_ON);
	SetAFlag(A_MOD_BEING_EDITED);	

	RendSplineDesc.BeginEditParams(ip, this, flags, prev);

	// pointcache_param_blk.SetUserDlgProc(new PointCacheParamsMapDlgProc(this));

	paramDlgProc = new RendSplineParamsMapDlgProc(this);
	rendspline_param_blk.SetUserDlgProc(paramDlgProc);

}
コード例 #7
0
ファイル: EditFaceData.cpp プロジェクト: 2asoft/xray
void EditFaceDataMod::BeginEditParams (IObjParam  *ip, ULONG flags,Animatable *prev) {
	this->ip = ip;	
	editMod  = this;

	selectMode = new SelectModBoxCMode(this,ip);

	// Restore the selection level.
	ip->SetSubObjectLevel(selLevel);

	if (!hParams) {
		hParams = ip->AddRollupPage (hInstance, MAKEINTRESOURCE (IDD_FACEDATA_EDIT),
			FaceDataDlgProc, GetString (IDS_EDIT_FACE_DATA), (LPARAM)this, 0);
	} else {
		UpdateDialog ();
	}

	TimeValue t = ip->GetTime();
	NotifyDependents(Interval(t,t), PART_ALL, REFMSG_BEGIN_EDIT);
	NotifyDependents(Interval(t,t), PART_ALL, REFMSG_MOD_DISPLAY_ON);
	SetAFlag(A_MOD_BEING_EDITED);	
}
コード例 #8
0
ファイル: paint_main.cpp プロジェクト: CCChaos/RyzomCore
void PaintPatchMod::BeginEditParams(IObjParam *ip, ULONG flags, Animatable *prev)
{
	this->ip = ip;
	
	CreatePatchDataTempData();

	hOpsPanel = ip->AddRollupPage(hInstance, MAKEINTRESOURCE(IDD_EDPATCH_OPS),
		PatchOpsDlgProc, "Geometry", (LPARAM) this, rsOps ? 0 : APPENDROLL_CLOSED);

	// Create sub object editing modes.
	paintMode		= new EPM_PaintCMode(this, ip);
	
	// Disable show end result.
	ip->EnableShowEndResult(FALSE);
	
	// Setup named selection sets	
	SetupNamedSelDropDown();
	
	TimeValue t = ip->GetTime();
	NotifyDependents(Interval(t, t), PART_ALL, REFMSG_BEGIN_EDIT);
	NotifyDependents(Interval(t, t), PART_ALL, REFMSG_MOD_DISPLAY_ON);
	SetAFlag(A_MOD_BEING_EDITED);	
}
コード例 #9
0
bhkCapsuleObject::bhkCapsuleObject(BOOL loading)
{
   SetAFlag(A_PLUGIN1);
   capsuleDesc.MakeAutoParamBlocks(this);
   assert(pblock2);
}
コード例 #10
0
bhkSphereObject::bhkSphereObject(BOOL loading)
{
   SetAFlag(A_PLUGIN1);
   sphereDesc.MakeAutoParamBlocks(this);
   assert(pblock2);
}
コード例 #11
0
void EditPatchMod::BeginEditParams(IObjParam *ip, ULONG flags, Animatable *prev)
{
    this->ip = ip;

    patchUIValid = FALSE;
    CreatePatchDataTempData();

    hSelectPanel = ip->AddRollupPage(hInstance, MAKEINTRESOURCE(IDD_EDPATCH_SELECT),
                                     PatchSelectDlgProc, GetString(IDS_TH_SELECTION), (LPARAM)this, rsSel ? 0 : APPENDROLL_CLOSED);
    hOpsPanel = ip->AddRollupPage(hInstance, MAKEINTRESOURCE(IDD_EDPATCH_OPS),
                                  PatchOpsDlgProc, GetString(IDS_TH_GEOMETRY), (LPARAM) this, rsOps ? 0 : APPENDROLL_CLOSED);
    /* watje 3 - 18 - 99
    if (selLevel == EP_OBJECT)
    {
    hSurfPanel = ip->AddRollupPage(hInstance, MAKEINTRESOURCE(IDD_EDPATCH_SURF_OBJ),
    PatchObjSurfDlgProc, GetString(IDS_TH_SURFACEPROPERTIES), (LPARAM) this, rsSurf ? 0 : APPENDROLL_CLOSED);
    }
    else
    */
    if (selLevel == EP_PATCH)
    {
        hSurfPanel = ip->AddRollupPage(hInstance, MAKEINTRESOURCE(IDD_EDPATCH_SURF),
                                       PatchSurfDlgProc, GetString(IDS_TH_SURFACEPROPERTIES), (LPARAM) this, rsSurf ? 0 : APPENDROLL_CLOSED);
    }
    else
        hSurfPanel = NULL;

    if (selLevel == EP_TILE)
    {
        hTilePanel = ip->AddRollupPage(hInstance, MAKEINTRESOURCE(IDD_EDPATCH_TILE),
                                       PatchTileDlgProc, "Tile Properties", (LPARAM) this, rsTile ? 0 : APPENDROLL_CLOSED);
    }
    else
        hTilePanel = NULL;

    if (selLevel == EP_EDGE)
    {
        hEdgePanel = ip->AddRollupPage(hInstance, MAKEINTRESOURCE(IDD_EDPATCH_EDGE),
                                       PatchEdgeDlgProc, "Edge Properties", (LPARAM) this, rsEdge ? 0 : APPENDROLL_CLOSED);
    }
    else
        hEdgePanel = NULL;

    // Create sub object editing modes.
    moveMode        = new MoveModBoxCMode(this, ip);
    rotMode         = new RotateModBoxCMode(this, ip);
    uscaleMode      = new UScaleModBoxCMode(this, ip);
    nuscaleMode     = new NUScaleModBoxCMode(this, ip);
    squashMode      = new SquashModBoxCMode(this, ip);
    selectMode      = new SelectModBoxCMode(this, ip);
    extrudeMode		= new EPM_ExtrudeCMode(this, ip);
    bevelMode		= new EPM_BevelCMode(this, ip);
    bindMode		= new EPM_BindCMode(this, ip);

    // Restore the selection level.
    ip->SetSubObjectLevel(selLevel);

    // Disable show end result.
    ip->EnableShowEndResult(FALSE);

    // Setup named selection sets
    SetupNamedSelDropDown();

    // Update selection UI display
    SelectionChanged();

    TimeValue t = ip->GetTime();
    NotifyDependents(Interval(t, t), PART_ALL, REFMSG_BEGIN_EDIT);
    NotifyDependents(Interval(t, t), PART_ALL, REFMSG_MOD_DISPLAY_ON);
    SetAFlag(A_MOD_BEING_EDITED);
}
コード例 #12
0
bhkBoxObject::bhkBoxObject(BOOL loading)
{
   SetAFlag(A_PLUGIN1);
   boxDesc.MakeAutoParamBlocks(this);
   assert(pblock2);
}
コード例 #13
0
ファイル: simpobj.cpp プロジェクト: 2asoft/xray
SimpleWSMObject::SimpleWSMObject()
	{
	ivalid.SetEmpty();
	mesh.EnableEdgeList(1);
	SetAFlag(A_OBJ_CREATING);
	}