mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-04-27 07:15:37 +00:00
Merge branch 'development' of https://github.com/GarageGames/Torque3D into PBR_ProbeArrayGLWIP
# Conflicts: # Engine/source/gfx/D3D11/gfxD3D11Device.cpp # Engine/source/lighting/lightManager.cpp # Templates/Full/game/levels/Empty Room.mis # Templates/Full/game/levels/Empty Terrain.mis
This commit is contained in:
commit
97ec99f704
235 changed files with 7064 additions and 3090 deletions
|
|
@ -126,13 +126,14 @@ static void processNode(GuiTreeViewCtrl* tree, domNode* node, S32 parentID, Scen
|
|||
}
|
||||
}
|
||||
|
||||
DefineEngineFunction( enumColladaForImport, bool, (const char * shapePath, const char * ctrl), ,
|
||||
DefineEngineFunction( enumColladaForImport, bool, (const char * shapePath, const char * ctrl, bool loadCachedDts), ("", "", true),
|
||||
"(string shapePath, GuiTreeViewCtrl ctrl) Collect scene information from "
|
||||
"a COLLADA file and store it in a GuiTreeView control. This function is "
|
||||
"used by the COLLADA import gui to show a preview of the scene contents "
|
||||
"prior to import, and is probably not much use for anything else.\n"
|
||||
"@param shapePath COLLADA filename\n"
|
||||
"@param ctrl GuiTreeView control to add elements to\n"
|
||||
"@param loadCachedDts dictates if it should try and load the cached dts file if it exists"
|
||||
"@return true if successful, false otherwise\n"
|
||||
"@ingroup Editors\n"
|
||||
"@internal")
|
||||
|
|
@ -147,7 +148,7 @@ DefineEngineFunction( enumColladaForImport, bool, (const char * shapePath, const
|
|||
// Check if a cached DTS is available => no need to import the collada file
|
||||
// if we can load the DTS instead
|
||||
Torque::Path path(shapePath);
|
||||
if (ColladaShapeLoader::canLoadCachedDTS(path))
|
||||
if (loadCachedDts && ColladaShapeLoader::canLoadCachedDTS(path))
|
||||
return false;
|
||||
|
||||
// Check if this is a Sketchup file (.kmz) and if so, mount the zip filesystem
|
||||
|
|
|
|||
|
|
@ -30,6 +30,7 @@
|
|||
#include "T3D/pointLight.h"
|
||||
#include "T3D/spotLight.h"
|
||||
|
||||
#include "T3D/Scene.h"
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Collada <light> elements are very similar, but are arranged as separate, unrelated
|
||||
|
|
@ -140,11 +141,11 @@ static void processNodeLights(AppNode* appNode, const MatrixF& offset, SimGroup*
|
|||
|
||||
// Load lights from a collada file and add to the scene.
|
||||
DefineEngineFunction( loadColladaLights, bool, (const char * filename, const char * parentGroup, const char * baseObject), ("", ""),
|
||||
"(string filename, SimGroup parentGroup=MissionGroup, SimObject baseObject=-1)"
|
||||
"(string filename, SimGroup parentGroup=Scene, SimObject baseObject=-1)"
|
||||
"Load all light instances from a COLLADA (.dae) file and add to the scene.\n"
|
||||
"@param filename COLLADA filename to load lights from\n"
|
||||
"@param parentGroup (optional) name of an existing simgroup to add the new "
|
||||
"lights to (defaults to MissionGroup)\n"
|
||||
"lights to (defaults to root Scene)\n"
|
||||
"@param baseObject (optional) name of an object to use as the origin (useful "
|
||||
"if you are loading the lights for a collada scene and have moved or rotated "
|
||||
"the geometry)\n"
|
||||
|
|
@ -165,16 +166,16 @@ DefineEngineFunction( loadColladaLights, bool, (const char * filename, const cha
|
|||
Torque::Path path(filename);
|
||||
|
||||
// Optional group to add the lights to. Create if it does not exist, and use
|
||||
// the MissionGroup if not specified.
|
||||
SimGroup* missionGroup = dynamic_cast<SimGroup*>(Sim::findObject("MissionGroup"));
|
||||
// the root Scene if not specified.
|
||||
Scene* scene = Scene::getRootScene();
|
||||
SimGroup* group = 0;
|
||||
if (!String::isEmpty(parentGroup)){
|
||||
if (!Sim::findObject(parentGroup, group)) {
|
||||
// Create the group if it could not be found
|
||||
group = new SimGroup;
|
||||
if (group->registerObject(parentGroup)) {
|
||||
if (missionGroup)
|
||||
missionGroup->addObject(group);
|
||||
if (scene)
|
||||
scene->addObject(group);
|
||||
}
|
||||
else {
|
||||
delete group;
|
||||
|
|
@ -183,7 +184,7 @@ DefineEngineFunction( loadColladaLights, bool, (const char * filename, const cha
|
|||
}
|
||||
}
|
||||
if (!group)
|
||||
group = missionGroup;
|
||||
group = scene;
|
||||
|
||||
// Optional object to provide the base transform
|
||||
MatrixF offset(true);
|
||||
|
|
|
|||
|
|
@ -412,7 +412,7 @@ void TSShapeLoader::generateObjects()
|
|||
AppMesh* mesh = subshape->objMeshes[iMesh];
|
||||
mesh->detailSize = 2;
|
||||
String name = String::GetTrailingNumber( mesh->getName(), mesh->detailSize );
|
||||
name = getUniqueName( name, cmpMeshNameAndSize, meshNames, &(subshape->objMeshes), (void*)mesh->detailSize );
|
||||
name = getUniqueName( name, cmpMeshNameAndSize, meshNames, &(subshape->objMeshes), (void*)(uintptr_t)mesh->detailSize );
|
||||
meshNames.push_back( name );
|
||||
|
||||
// Fix up any collision details that don't have a negative detail level.
|
||||
|
|
|
|||
|
|
@ -74,9 +74,9 @@ EndImplementEnumType;
|
|||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
String TSShapeConstructor::smCapsuleShapePath("core/art/shapes/unit_capsule.dts");
|
||||
String TSShapeConstructor::smCubeShapePath("core/art/shapes/unit_cube.dts");
|
||||
String TSShapeConstructor::smSphereShapePath("core/art/shapes/unit_sphere.dts");
|
||||
String TSShapeConstructor::smCapsuleShapePath("tools/shapes/unit_capsule.dts");
|
||||
String TSShapeConstructor::smCubeShapePath("tools/shapes/unit_cube.dts");
|
||||
String TSShapeConstructor::smSphereShapePath("tools/shapes/unit_sphere.dts");
|
||||
|
||||
ResourceRegisterPostLoadSignal< TSShape > TSShapeConstructor::_smAutoLoad( &TSShapeConstructor::_onTSShapeLoaded );
|
||||
ResourceRegisterUnloadSignal< TSShape > TSShapeConstructor::_smAutoUnload( &TSShapeConstructor::_onTSShapeUnloaded );
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue