mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-20 23:23:47 +00:00
More updating of editor icons to assets
Fixed handling of convex shape editor's active and default materials Fixed assignment of material for convex shapes via editor Fixed material editor map assignment logic Added utility function to detect possible duplicate files in project to ProjectImporter Added conversion of legacy sky and water classes to importer Fixed bufferLen issue with guiTreeViewCtrl
This commit is contained in:
parent
2f5f585aaf
commit
555c563b39
18 changed files with 147 additions and 30 deletions
|
|
@ -207,7 +207,7 @@ GuiControl* GuiInspectorTypeCubemapAssetPtr::constructEditControl()
|
|||
dSprintf(szBuffer, sizeof(szBuffer), "CubemapEditor.openCubemapAsset(%d.getText());", retCtrl->getId());
|
||||
mShapeEdButton->setField("Command", szBuffer);
|
||||
|
||||
char bitmapName[512] = "tools/worldEditor/images/toolbar/shape-editor";
|
||||
char bitmapName[512] = "ToolsModule:shape_editor_n_image";
|
||||
mShapeEdButton->setBitmap(StringTable->insert(bitmapName));
|
||||
|
||||
mShapeEdButton->setDataField(StringTable->insert("Profile"), NULL, "GuiButtonProfile");
|
||||
|
|
|
|||
|
|
@ -282,7 +282,7 @@ DefineEngineMethod(className, get##name##Asset, const char*, (), , assetText(nam
|
|||
}\
|
||||
DefineEngineMethod(className, set##name, bool, (const char* mat), , assetText(name,assignment. first tries asset then material name.))\
|
||||
{\
|
||||
return object->_set##name(StringTable->insert(map));\
|
||||
return object->_set##name(StringTable->insert(mat));\
|
||||
}
|
||||
|
||||
#define INIT_MATERIALASSET(name) \
|
||||
|
|
|
|||
|
|
@ -160,7 +160,7 @@ GuiControl* GuiInspectorTypeParticleAssetPtr::constructEditControl()
|
|||
dSprintf(szBuffer, sizeof(szBuffer), "echo(\"Game Object Editor not implemented yet!\");", retCtrl->getId());
|
||||
mSMEdButton->setField("Command", szBuffer);
|
||||
|
||||
char bitmapName[512] = "tools/worldEditor/images/toolbar/shape-editor";
|
||||
char bitmapName[512] = "ToolsModule:shape_editor_n_image";
|
||||
mSMEdButton->setBitmap(StringTable->insert(bitmapName));
|
||||
|
||||
mSMEdButton->setDataField(StringTable->insert("Profile"), NULL, "GuiButtonProfile");
|
||||
|
|
|
|||
|
|
@ -195,7 +195,7 @@ GuiControl* GuiInspectorTypeStateMachineAssetPtr::constructEditControl()
|
|||
dSprintf(szBuffer, sizeof(szBuffer), "StateMachineEditor.loadStateMachineAsset(%d.getText()); Canvas.pushDialog(StateMachineEditor);", retCtrl->getId());
|
||||
mSMEdButton->setField("Command", szBuffer);
|
||||
|
||||
char bitmapName[512] = "tools/worldEditor/images/toolbar/shape-editor";
|
||||
char bitmapName[512] = "ToolsModule:shape_editor_n_image";
|
||||
mSMEdButton->setBitmap(StringTable->insert(bitmapName));
|
||||
|
||||
mSMEdButton->setDataField(StringTable->insert("Profile"), NULL, "GuiButtonProfile");
|
||||
|
|
|
|||
|
|
@ -2170,3 +2170,5 @@ void ConvexShape::Geometry::generate(const Vector< PlaneF > &planes, const Vecto
|
|||
faces.push_back( newFace );
|
||||
}
|
||||
}
|
||||
|
||||
DEF_MATERIALASSET_BINDS(ConvexShape, Material);
|
||||
|
|
|
|||
|
|
@ -586,8 +586,8 @@ S32 GuiTreeViewCtrl::Item::getDisplayTextWidth(GFont *font)
|
|||
if( bufLen == 0 )
|
||||
return 0;
|
||||
|
||||
// Add space for the string terminator
|
||||
bufLen++;
|
||||
// Add space for the string terminator and marker
|
||||
bufLen += 2;
|
||||
|
||||
char *buf = (char*)txtAlloc.alloc(bufLen);
|
||||
getDisplayText(bufLen, buf);
|
||||
|
|
|
|||
|
|
@ -220,7 +220,7 @@ GuiControl* GuiInspectorTypeMaterialName::construct(const char* command)
|
|||
mBrowseButton->setField( "Command", szBuffer );
|
||||
|
||||
//temporary static button name
|
||||
char bitmapName[512] = "tools/materialEditor/gui/change-material-btn";
|
||||
char bitmapName[512] = "ToolsModule:change_material_btn_n_image";
|
||||
mBrowseButton->setBitmap( StringTable->insert(bitmapName) );
|
||||
|
||||
mBrowseButton->setDataField( StringTable->insert("Profile"), NULL, "GuiButtonProfile" );
|
||||
|
|
@ -326,7 +326,7 @@ GuiControl* GuiInspectorTypeTerrainMaterialName::construct(const char* command)
|
|||
mBrowseButton->setField( "Command", szBuffer );
|
||||
|
||||
//temporary static button name
|
||||
char bitmapName[512] = "tools/gui/images/layers-btn";
|
||||
char bitmapName[512] = "ToolsModule:tools/gui/images/layers_btn_n_image";
|
||||
mBrowseButton->setBitmap(StringTable->insert(bitmapName) );
|
||||
|
||||
mBrowseButton->setDataField( StringTable->insert("Profile"), NULL, "GuiButtonProfile" );
|
||||
|
|
@ -804,7 +804,7 @@ GuiControl* GuiInspectorTypeShapeFilename::constructEditControl()
|
|||
dSprintf(szBuffer, sizeof(szBuffer), "ShapeEditorPlugin.open(%d.getText());", retCtrl->getId());
|
||||
mShapeEdButton->setField("Command", szBuffer);
|
||||
|
||||
char bitmapName[512] = "tools/worldEditor/images/toolbar/shape-editor";
|
||||
char bitmapName[512] = "ToolsModule:shape_editor_n_image";
|
||||
mShapeEdButton->setBitmap(StringTable->insert(bitmapName));
|
||||
|
||||
mShapeEdButton->setDataField(StringTable->insert("Profile"), NULL, "GuiButtonProfile");
|
||||
|
|
@ -956,7 +956,7 @@ GuiControl* GuiInspectorTypeRectUV::constructEditControl()
|
|||
mBrowseButton->setField( "Command", szBuffer );
|
||||
|
||||
//temporary static button name
|
||||
char bitmapName[512] = "tools/gui/images/uv-editor-btn";
|
||||
char bitmapName[512] = "ToolsModule:uv_editor_btn_n_image";
|
||||
mBrowseButton->setBitmap(StringTable->insert(bitmapName) );
|
||||
|
||||
mBrowseButton->setDataField( StringTable->insert("Profile"), NULL, "GuiButtonProfile" );
|
||||
|
|
@ -1544,7 +1544,7 @@ GuiControl* GuiInspectorTypeBitMask32Helper::constructEditControl()
|
|||
mButton->setField( "Command", szBuffer );
|
||||
mButton->setField( "buttonType", "ToggleButton" );
|
||||
mButton->setDataField( StringTable->insert("Profile"), NULL, "GuiInspectorButtonProfile" );
|
||||
mButton->setBitmap(StringTable->insert("tools/gui/images/arrowBtn.png") );
|
||||
mButton->setBitmap(StringTable->insert("ToolsModule:arrowBtn_image") );
|
||||
mButton->setStateOn( true );
|
||||
mButton->setExtent( 16, 16 );
|
||||
mButton->registerObject();
|
||||
|
|
|
|||
|
|
@ -257,7 +257,7 @@ bool GuiInspectorDynamicField::onAdd()
|
|||
mParent->getId() );
|
||||
|
||||
// FIXME Hardcoded image
|
||||
mDeleteButton->setField( "Bitmap", "tools/gui/images/iconDelete" );
|
||||
mDeleteButton->setField( "Bitmap", "ToolsModule:iconDelete_image" );
|
||||
mDeleteButton->setField( "Text", "X" );
|
||||
mDeleteButton->setField( "Command", szBuffer );
|
||||
mDeleteButton->setSizing( horizResizeLeft, vertResizeCenter );
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@ bool GuiInspectorDynamicGroup::createContent()
|
|||
addFieldBtn->setControlProfile( dynamic_cast<GuiControlProfile*>(profilePtr) );
|
||||
|
||||
// FIXME Hardcoded image
|
||||
addFieldBtn->setBitmap(StringTable->insert("tools/gui/images/iconAdd.png"));
|
||||
addFieldBtn->setBitmap(StringTable->insert("ToolsModule:iconAdd_image"));
|
||||
|
||||
char commandBuf[64];
|
||||
dSprintf(commandBuf, 64, "%d.addDynamicField();", this->getId());
|
||||
|
|
|
|||
|
|
@ -529,7 +529,7 @@ void GuiConvexEditorCtrl::on3DMouseDragged(const Gui3DMouseEvent & event)
|
|||
|
||||
setupShape( newShape );
|
||||
|
||||
newShape->setField("material", mConvexSEL->getMaterialName());
|
||||
newShape->_setMaterial(mConvexSEL->getMaterial());
|
||||
|
||||
submitUndo( CreateShape, newShape );
|
||||
|
||||
|
|
@ -1459,8 +1459,8 @@ bool GuiConvexEditorCtrl::isShapeValid( ConvexShape *shape )
|
|||
|
||||
void GuiConvexEditorCtrl::setupShape( ConvexShape *shape )
|
||||
{
|
||||
shape->setField( "materialAsset", mMaterialName );
|
||||
shape->registerObject();
|
||||
shape->_setMaterial(mMaterialName);
|
||||
updateShape( shape );
|
||||
|
||||
Scene* scene = Scene::getRootScene();
|
||||
|
|
@ -2284,9 +2284,10 @@ ConvexEditorTool::EventResult ConvexEditorCreateTool::on3DMouseDown( const Gui3D
|
|||
|
||||
mNewConvex->setTransform( objMat );
|
||||
|
||||
mNewConvex->setField( "materialAsset", Parent::mEditor->mMaterialName );
|
||||
|
||||
mNewConvex->registerObject();
|
||||
|
||||
mNewConvex->_setMaterial(Parent::mEditor->mMaterialName);
|
||||
|
||||
mPlaneSizes.set( 0.1f, 0.1f, 0.1f );
|
||||
mNewConvex->resizePlanes( mPlaneSizes );
|
||||
mEditor->updateShape( mNewConvex );
|
||||
|
|
@ -2509,7 +2510,7 @@ ConvexShape* ConvexEditorCreateTool::extrudeShapeFromFace( ConvexShape *inShape,
|
|||
}
|
||||
|
||||
//newShape->setField( "material", Parent::mEditor->mMaterialName );
|
||||
newShape->setField("materialAsset", inShape->getMaterialName());
|
||||
newShape->_setMaterial(inShape->getMaterial());
|
||||
|
||||
newShape->registerObject();
|
||||
mEditor->updateShape( newShape );
|
||||
|
|
|
|||
|
|
@ -129,7 +129,7 @@ void PostEffectVis::open( PostEffect *pfx )
|
|||
bmpCtrl->setSizing( GuiControl::horizResizeWidth, GuiControl::vertResizeHeight );
|
||||
bmpCtrl->setExtent( 341, 181 );
|
||||
bmpCtrl->setDataField( StringTable->insert( "wrap" ), NULL, "1" );
|
||||
bmpCtrl->setBitmap( "tools/gui/images/transp_grid" );
|
||||
bmpCtrl->setBitmap( "ToolsModule:transp_grid_image" );
|
||||
bmpCtrl->registerObject();
|
||||
winCtrl->addObject( bmpCtrl );
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue