// Define Layout ==============================================
XSIPLUGINCALLBACK CStatus sn_squashstretch_op_DefineLayout( CRef& in_ctxt )
{
   Context ctxt( in_ctxt );
   PPGLayout oLayout;
   PPGItem oItem;

   oLayout = ctxt.GetSource();
   oLayout.Clear();

   oLayout.AddItem(L"blend",L"Blend");
   oLayout.AddItem(L"driver",L"Driver");
   oLayout.AddItem(L"u",L"U Value");

   oLayout.AddGroup("Squash");
   oLayout.AddRow();
   oLayout.AddItem(L"sq_min",L"Min");
   oLayout.AddItem(L"sq_max",L"Max");
   oLayout.EndRow();
   oLayout.AddRow();
   oLayout.AddItem(L"sq_y",L"Y");
   oLayout.AddItem(L"sq_z",L"Z");
   oLayout.EndRow();
   oLayout.EndGroup();

   oLayout.AddGroup("Stretch");
   oLayout.AddRow();
   oLayout.AddItem(L"st_min",L"Min");
   oLayout.AddItem(L"st_max",L"Max");
   oLayout.EndRow();
   oLayout.AddRow();
   oLayout.AddItem(L"st_y",L"Y");
   oLayout.AddItem(L"st_z",L"Z");
   oLayout.EndRow();
   oLayout.EndGroup();

   return CStatus::OK;
}
XSIPLUGINCALLBACK CStatus VMFImportProperty_DefineLayout( const CRef & in_Ctx )
{
	PPGLayout oLayout = Context( in_Ctx ).GetSource() ;
	
	PPGItem item ;
	
	oLayout.Clear() ;
	
	
	item = oLayout.AddItem( L"VMFImportProperty" ) ;
	
	oLayout.AddGroup(L"File") ;
	
	oLayout.AddRow() ;
	item = oLayout.AddItem( L"Filename",L"Import File",siControlFilePath ) ;
	item.PutAttribute( siUIFileMustExist, true ) ;
	item.PutAttribute( siUIOpenFile, true ) ;
	item.PutAttribute( siUIFileFilter, L"Valve VMF Files (*.vmf)|*.vmf|All Files (*.*)|*.*||" ) ;
	oLayout.EndRow() ;

	oLayout.AddRow() ;
	item = oLayout.AddItem( L"TexturePath",L"Texture Path",siControlFolder ) ;
	item.PutAttribute( siUIInitialDir, L"user" ) ;
	oLayout.EndRow() ;

	oLayout.EndGroup() ;
	
	oLayout.AddGroup( L"Options" ) ;
	oLayout.AddRow();
	oLayout.AddRow();
	item = oLayout.AddItem( L"UseMaterials" ) ;
	oLayout.EndRow();
	oLayout.EndGroup() ;

	return CStatus::OK;	
}
// Define Layout ==============================================
XSIPLUGINCALLBACK CStatus sn_squashstretch2_op_DefineLayout( CRef& in_ctxt )
{
   Context ctxt( in_ctxt );
   PPGLayout oLayout;
   PPGItem oItem;

   oLayout = ctxt.GetSource();
   oLayout.Clear();

   oLayout.AddItem(L"blend",L"Blend");

   oLayout.AddGroup("Driver");
   oLayout.AddItem(L"driver",L"Driver");
   oLayout.AddRow();
   oLayout.AddItem(L"driver_min",L"Min");
   oLayout.AddItem(L"driver_ctr",L"Center");
   oLayout.AddItem(L"driver_max",L"Max");
   oLayout.EndRow();
   oLayout.EndGroup();

   oLayout.AddGroup("Axis");
   CValueArray modeItems(6);
   modeItems[0] = L"X";
   modeItems[1] = (LONG)0l;
   modeItems[2] = L"Y";
   modeItems[3] = (LONG)1l;
   modeItems[4] = L"Z";
   modeItems[5] = (LONG)2l;
   oLayout.AddEnumControl(L"axis",modeItems,L"Pointing Axis");
   oLayout.EndGroup();

   oLayout.AddGroup("Stretch / Squash");
   oLayout.AddItem(L"squash",L"Squash");
   oLayout.AddItem(L"stretch",L"Stretch");
   oLayout.EndGroup();

   return CStatus::OK;
}
SICALLBACK AppLink_3DCoat_DefineLayout( CRef& in_ctxt )
{	
	Context ctxt(in_ctxt);
	PPGLayout ppg = ctxt.GetSource();
	PPGItem item;

	Plugin pl(app.GetPlugins().GetItem(L"AppLink_3DCoat_Plugin"));
	CString logoPath = CUtils::BuildPath(app.GetInstallationPath(pl.GetOrigin()), L"AppLink_3DCoat", L"Application", L"Plugins", L"3dcoatLogo.bmp");

	CString txt = L"*Select folder ..\\My Documents\\3D-CoatV3\\Exchange";
	ppg.Clear();

	ppg.AddTab(L"General");
		item = ppg.AddItem(L"Logo",L"", siControlBitmap);
		item.PutAttribute(siUIFilePath, logoPath);
		item.PutAttribute(siUINoLabel, true);

		ppg.AddGroup(L"Locations");
			item = ppg.AddItem( L"tempLocation", L"", siControlFilePath );
			//item.PutAttribute( siUIInitialDir, L"project" ) ;
			//item.PutAttribute( siUIFileFilter, L"3D files (*.obj,*.lwo)|*.obj,*.lwo|All Files (*.*)|*.*||" ) ;
			item = ppg.AddItem( L"coatLocation", L"", siControlFolder ) ;
			item.PutAttribute( siUIInitialDir, L"user" ) ;
			ppg.AddStaticText(txt.GetAsciiString());
			//item = ppg.AddItem( L"coatExe", L"", siControlFilePath);
			//item.PutAttribute( siUIInitialDir, L"user" );
			//item.PutAttribute( siUIFileFilter, L"Exe files (*.exe)|*.exe|All Files (*.*)|*.*||" ) ;

		ppg.EndGroup();

//Paint mesh in 3D-Coat using per-pixel painting [ppp]
//Paint mesh in 3D-Coat using microvertex painting [mv]
//Paint mesh in 3D-Coat using Ptex [ptex]
//Perform UV-mapping in 3D-Coat [uv]
//Drop reference mesh to 3D-Coat [ref]
//Drop retopo mesh as new layer in 3D-Coat [retopo]
//Drop mesh in 3D-Coat as voxel object [vox] 
//Drop mesh in 3D-Coat as new pen alpha [alpha]
//Drop mesh in 3D-Coat as new merging primitive for voxels [prim]
//Drop mesh in 3D-Coat as a curve profile [curv]
//Drop mesh in 3D-Coat for Auto-retopology [autopo]

		ppg.AddGroup(L"Export");
			CValueArray sizeItems( 22 ) ;
			sizeItems[0] = L"Per-pixel painting"; sizeItems[1] = (LONG)0 ;
			sizeItems[2] = L"Microvertex painting"; sizeItems[3] = (LONG)1 ;
			sizeItems[4] = L"Ptex"; sizeItems[5] = (LONG)2 ;
			sizeItems[6] = L"Perform UV-mapping"; sizeItems[7] = (LONG)3 ;
			sizeItems[8] = L"Drop reference mesh"; sizeItems[9] = (LONG)4 ;
			sizeItems[10] = L"Drop retopo mesh as new layer"; sizeItems[11] = (LONG)5 ;
			sizeItems[12] = L"Drop mesh as voxel object"; sizeItems[13] = (LONG)6 ;
			sizeItems[14] = L"Drop mesh as new pen alpha"; sizeItems[15] = (LONG)7 ;
			sizeItems[16] = L"Drop mesh as new merging primitive for voxels"; sizeItems[17] = (LONG)8 ;
			sizeItems[18] = L"Drop mesh as a curve profile"; sizeItems[19] = (LONG)9 ;
			sizeItems[20] = L"Drop mesh for Auto-retopology"; sizeItems[21] = (LONG)10 ;
			ppg.AddEnumControl( L"typePaint", sizeItems, L"", siControlCombo ) ;
			ppg.AddItem(L"bExpNorm");
			ppg.AddItem(L"bExpMat");
			ppg.AddItem(L"bExpUV");
			ppg.AddItem(L"bExpSkipImp");
			ppg.AddItem(L"bExpSkipExp");
			//ppg.AddItem(L"bCopyTexE");

			item = ppg.AddButton( L"Coat3DExport", L"Export to 3DCoat" );
			item.PutAttribute(siUICX, (LONG)ppg.GetAttribute(siUICX));
		ppg.EndGroup();

		ppg.AddGroup(L"Import");
			ppg.AddItem(L"bImpNorm");
			ppg.AddItem(L"bImpMat");

			CValueArray sizeItems2( 4 );
			sizeItems2[0] = L"Normal map"; sizeItems2[1] = (LONG)0 ;
			sizeItems2[2] = L"Bump map"; sizeItems2[3] = (LONG)1 ;
			ppg.AddEnumControl( L"swMap", sizeItems2, L"", siControlCombo ) ;

			ppg.AddItem(L"bImpUV");
			ppg.AddRow();
				ppg.AddItem(L"bReplace");
				ppg.AddItem(L"bEvent");
			ppg.EndRow();
			//ppg.AddItem(L"bCopyTexI");
			item = ppg.AddButton( L"Coat3DImport", L"Import from 3DCoat" );
			item.PutAttribute(siUICX, (LONG)ppg.GetAttribute(siUICX));
		ppg.EndGroup();

		ppg.AddTab(L"3D-Coat Location");
			item = ppg.AddItem( L"exeLocation", L"", siControlFilePath );
			item.PutAttribute( siUIFileFilter, L"Exe files (*.exe)|*.exe|All Files (*.*)|*.*||" );
			item.PutAttribute( siUIOpenFile, true );
			ppg.AddItem(L"bStart");

	
	return CStatus::OK;
}
示例#5
0
/** Defines the visual layout of the options dialog */
CStatus OgreMeshExportOptions_DefineLayout( const CRef & in_Ctx )
{
	// XSI will call this to define the visual appearance of the CustomProperty
	// The layout is shared between all instances of the CustomProperty
	// and is CACHED!!!.  You can force the code to re-execute by using the 
	// XSIUtils.Reload feature, or right-clicking the property page and selecting 'Refresh'

	PPGLayout oLayout = Context( in_Ctx ).GetSource() ;
	PPGItem item ;

	oLayout.Clear() ;

	// Mesh tab
	oLayout.AddTab(L"Basic");
    // Object 

	oLayout.AddGroup(L"Object(s) to export");
	item = oLayout.AddItem(L"objectName");
    item.PutAttribute( siUINoLabel, true );
	oLayout.EndGroup();
	
	oLayout.AddGroup(L"Mesh");
    item = oLayout.AddItem(L"targetMeshFileName", L"Target", siControlFilePath);
	item.PutAttribute( siUINoLabel, true );
	item.PutAttribute( siUIFileFilter, L"OGRE Mesh format (*.mesh)|*.mesh|All Files (*.*)|*.*||" );
	item = oLayout.AddItem(L"mergeSubmeshes") ;
	item = oLayout.AddItem(L"exportChildren") ;


    item = oLayout.AddItem(L"calculateEdgeLists");
    item = oLayout.AddItem(L"calculateTangents");
	CValueArray tangentVals;
	tangentVals.Add(L"Tangent");
	tangentVals.Add(L"t");
	tangentVals.Add(L"Texture Coords");
	tangentVals.Add(L"uvw");
	item = oLayout.AddEnumControl(L"tangentSemantic", tangentVals, L"Tangent Semantic", XSI::siControlCombo);
	item = oLayout.AddItem(L"tangentsSplitMirrored");
	item = oLayout.AddItem(L"tangentsSplitRotated");
	item = oLayout.AddItem(L"tangentsUseParity");
	oLayout.AddGroup(L"Level of Detail Reduction");
    item = oLayout.AddItem(L"numLodLevels");
	item = oLayout.AddItem(L"lodDistanceIncrement");
	CValueArray vals;
	vals.Add(L"Percentage");
	vals.Add(L"p");
	vals.Add(L"Constant");
	vals.Add(L"c");
	item = oLayout.AddEnumControl(L"lodQuota", vals, L"Quota", XSI::siControlCombo);
	item = oLayout.AddItem(L"lodReduction");
	oLayout.EndGroup();
	oLayout.EndGroup();

	oLayout.AddTab(L"Materials");
	// Material Tab
    item = oLayout.AddItem(L"exportMaterials") ;
    item = oLayout.AddItem(L"targetMaterialFileName", L"Target", siControlFilePath) ;
	item.PutAttribute( siUINoLabel, true );
	item.PutAttribute( siUIFileFilter, L"OGRE Material script (*.material)|*.material|All Files (*.*)|*.*||" );
	item = oLayout.AddItem(L"materialPrefix");
    item = oLayout.AddItem(L"copyTextures");
	
	
	// Skeleton Tab
	oLayout.AddTab(L"Animation");

	item = oLayout.AddItem(L"exportVertexAnimation");
	item = oLayout.AddItem(L"exportSkeleton");
	item = oLayout.AddItem(L"targetSkeletonFileName", L"Target", siControlFilePath);
	item.PutAttribute( siUINoLabel, true );
	item.PutAttribute( siUIFileFilter, L"OGRE Skeleton format (*.skeleton)|*.skeleton|All Files (*.*)|*.*||" );
	item = oLayout.AddItem(L"fps");

	oLayout.AddGroup(L"Animations");
	item = oLayout.AddItem(L"animationList", L"Animations", siControlGrid);
	item.PutAttribute( siUINoLabel, true );
	item.PutAttribute(siUIGridColumnWidths, L"0:15:250:30:30:75");
	item.PutAttribute(siUIGridHideRowHeader, true);

	oLayout.AddRow();
	item = oLayout.AddButton(L"refreshAnimation", L"Refresh");
	item = oLayout.AddButton(L"addAnimation", L"Add");
	item = oLayout.AddButton(L"removeAnimation", L"Remove");
	oLayout.EndRow();
	oLayout.EndGroup();


	// Make animatino name read-only (not any more)
	//item.PutAttribute(siUIGridReadOnlyColumns, L"1:0:0:0");







	return CStatus::OK;	
}