Пример #1
0
// Define Layout =====================================================
XSIPLUGINCALLBACK CStatus sn_inverseRotorder_op_DefineLayout( CRef& in_ctxt )
{
   Context ctxt( in_ctxt );
   PPGLayout layout;
   PPGItem item;

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

   CValueArray orderItems(12);
   orderItems[0] = L"XYZ";
   orderItems[1] = (LONG)0l;
   orderItems[2] = L"XZY";
   orderItems[3] = (LONG)1l;
   orderItems[4] = L"YXZ";
   orderItems[5] = (LONG)2l;
   orderItems[6] = L"YZX";
   orderItems[7] = (LONG)3l;
   orderItems[8] = L"ZXY";
   orderItems[9] = (LONG)4l;
   orderItems[10] = L"ZYX";
   orderItems[11] = (LONG)5l;

   layout.AddGroup("Rotation");
   layout.AddEnumControl("rotorder", orderItems, "Order");
   layout.EndGroup();
   return CStatus::OK;
}
Пример #2
0
// 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;
}
Пример #3
0
// Define Layout ==============================================
XSIPLUGINCALLBACK CStatus sn_null2curve_op_DefineLayout( CRef& in_ctxt )
{
   Context ctxt( in_ctxt );
   PPGLayout layout;
   PPGItem oItem;

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

   layout.AddGroup("Input");
   layout.AddItem(L"blend",L"Blend to Slider");
   layout.AddItem(L"u",L"U Value");
   layout.AddItem(L"imin",L"Minimum");
   layout.AddItem(L"imax",L"Maximum");
   layout.EndGroup();

   layout.AddGroup("Output");
   layout.AddItem(L"omin",L"Minimum");
   layout.AddItem(L"omax",L"Maximum");
   layout.EndGroup();

   layout.AddGroup("Softness");
   layout.AddItem(L"soft_blend",L"Blend");
   layout.EndGroup();

   layout.AddGroup("Orientation");
   CValueArray modeItems(6);
   modeItems[0] = L"Use Driver Rot";
   modeItems[1] = (LONG)0l;
   modeItems[2] = L"Use Upvector Rot";
   modeItems[3] = (LONG)1l;
   modeItems[4] = L"Tangent+Upvector";
   modeItems[5] = (LONG)2l;
   layout.AddEnumControl(L"upv_mode",modeItems,L"Mode");
   layout.EndGroup();

   return CStatus::OK;
}
Пример #4
0
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;	
}
Пример #6
0
// Define Layout ==============================================
XSIPLUGINCALLBACK CStatus sn_null2surface_op_DefineLayout( CRef& in_ctxt )
{
   Context ctxt( in_ctxt );
   PPGLayout layout;
   PPGItem oItem;
   layout = ctxt.GetSource();
   layout.Clear();
   layout.AddGroup("Override");
   layout.AddItem(L"blend",L"Blend to Sliders");
   layout.AddItem(L"u",L"U Value");
   layout.AddItem(L"v",L"V Value");
   layout.EndGroup();
   layout.AddGroup("Input");
   {
      CValueArray modeItems(4);
      modeItems[0] = L"Nurbs Based";
      modeItems[1] = (LONG)0l;
      modeItems[2] = L"Transform Based";
      modeItems[3] = (LONG)1l;
      layout.AddEnumControl(L"input_mode",modeItems,L"Mode");
   }
   layout.AddGroup("Nurbs Based");
   layout.AddItem(L"iu_center",L"U Center");
   layout.AddItem(L"iv_center",L"V Center");
   layout.AddItem(L"iu_variance",L"U Variance");
   layout.AddItem(L"iv_variance",L"V Variance");
   layout.AddItem(L"i0_minmax",L"Treat sliders as Min Max");
   layout.AddButton(L"setInputUV",L"Set from current Driver Pos");
   layout.EndGroup();
   layout.AddGroup("Transform Based");
   layout.AddItem(L"ix_center",L"Axis1 Center");
   layout.AddItem(L"iy_center",L"Axis2 Center");
   layout.AddItem(L"ix_variance",L"Axis1 Variance");
   layout.AddItem(L"iy_variance",L"Axis2 Variance");
   layout.AddItem(L"ix_invert",L"Axis1 Invert");
   layout.AddItem(L"iy_invert",L"Axis2 Invert");
   layout.AddItem(L"i1_minmax",L"Treat sliders as Min Max");
   {
      CValueArray modeItems(12);
      modeItems[0] = L"X / Y Plane";
      modeItems[1] = (LONG)0l;
      modeItems[2] = L"X / Z Plane";
      modeItems[3] = (LONG)1l;
      modeItems[4] = L"Y / Z Plane";
      modeItems[5] = (LONG)2l;
      modeItems[6] = L"Y / X Plane";
      modeItems[7] = (LONG)3l;
      modeItems[8] = L"Z / X Plane";
      modeItems[9] = (LONG)4l;
      modeItems[10] = L"Z / Y Plane";
      modeItems[11] = (LONG)5l;
      layout.AddEnumControl(L"axis_mode",modeItems,L"Axes");
   }
   layout.AddButton(L"setInputXY",L"Set from current Driver Pos");
   layout.EndGroup();
   layout.EndGroup();
   layout.AddGroup("Output");
   layout.AddItem(L"ou_center",L"U Center");
   layout.AddItem(L"ov_center",L"V Center");
   layout.AddItem(L"ou_variance",L"U Variance");
   layout.AddItem(L"ov_variance",L"V Variance");
   layout.AddItem(L"o_minmax",L"Treat sliders as Min Max");
   layout.AddItem(L"surf_index",L"Surface Index");
   layout.AddButton(L"setOutputUV",L"Set from current Driver Pos");
   layout.EndGroup();
   layout.AddGroup("Orientation");
   {
      CValueArray modeItems(14);
      modeItems[0] = L"Use Driver Rot";
      modeItems[1] = (LONG)0l;
      modeItems[2] = L"Use Upvector Rot";
      modeItems[3] = (LONG)1l;
      modeItems[4] = L"Orient by Surface (U)";
      modeItems[5] = (LONG)2l;
      modeItems[6] = L"Orient by Surface (V)";
      modeItems[7] = (LONG)3l;
      modeItems[8] = L"Normal + Upvector";
      modeItems[9] = (LONG)4l;
      modeItems[10] = L"Normal + Driver Orientation";
      modeItems[11] = (LONG)5l;
      modeItems[12] = L"UV Offset (Sliders below)";
      modeItems[13] = (LONG)6l;
      layout.AddEnumControl(L"upv_mode",modeItems,L"Mode");
   }
   layout.AddItem(L"upv_offsetu",L"U Offset");
   layout.AddItem(L"upv_offsetv",L"V Offset");
   layout.AddItem(L"upv_debug_pos",L"Show Upv Pos (debug)");
   layout.EndGroup();
   layout.AddGroup("Scaling");
   {
      CValueArray modeItems(4);
      modeItems[0] = L"Use Driver Scl";
      modeItems[1] = (LONG)0l;
      modeItems[2] = L"Use Upvector Scl";
      modeItems[3] = (LONG)1l;
      layout.AddEnumControl(L"scl_mode",modeItems,L"Mode");
   }
   layout.EndGroup();
   return CStatus::OK;
}