Skip to content

Commit 75449fd

Browse files
committed
Merge remote-tracking branch 'remotes/lc/tundra2_lc' into tundra2
2 parents 513bf49 + ad1fcf8 commit 75449fd

File tree

8 files changed

+102
-62
lines changed

8 files changed

+102
-62
lines changed

WhatsNew.txt

+16
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1+
v2.5 https://github.com/realXtend/naali/compare/tundra2.4.1...tundra2.5
2+
------
3+
- Undo/redo functionality in scene editing.
4+
- Optional interest management system implemented into server->client scene updates. Configurable from the command line or with the interest management settings dialog. Contributed by Kari Vatjus-Anttila.
5+
- Update to Bullet 2.8.1 and physics rolling friction support for EC_RigidBody. Contributed by Peter C.
6+
- Update to Qt 4.8.4 on Windows.
7+
- Update to OpenSSL 0.9.8x on Windows. Contributed by Peter C.
8+
- Official support for compiling on Visual Studio 2010 and cleanup of the Windows dependencies build script.
9+
- Support for compiling without Boost (TUNDRA_NO_BOOST CMake define). Cleanup of Tundra codebase of Boost-specific constructs.
10+
- Per-rigidbody gravity enable/disable.
11+
- Wire protocol resiliency for adding component attributes to the end of a component's attribute list while maintaining future version compatibility.
12+
Unfortunately Tundra 2.4.x can not retroactively support this and is incompatible eg. with the EC_RigidBody component.
13+
- For consistency, signal individual component removals also when an entity is being removed from the scene. This may simplify eg. script code checking for removal of specific components.
14+
- Added a Javascript Tundra1 -> Tundra2 scene orientation converter.
15+
- Several bugfixes and convenience improvements in the API.
16+
117
v2.4.1 - https://github.com/realXtend/naali/compare/tundra2.4...tundra2.4.1
218
------
319
- Add support for Crunch texture format (#532), see http://code.google.com/p/crunch/

doc/dependencies.txt

-39
This file was deleted.

src/Core/ECEditorModule/ECAttributeEditor.cpp

+57-12
Original file line numberDiff line numberDiff line change
@@ -1733,7 +1733,10 @@ template<> void ECAttributeEditor<AssetReference>::Update(IAttribute *attr)
17331733

17341734
QtStringPropertyManager *stringManager = dynamic_cast<QtStringPropertyManager *>(propertyMgr_);
17351735
if (!stringManager)
1736+
{
1737+
LogWarning("Failed to update attribute value in ECEditor, couldn't find stringmanager");
17361738
return;
1739+
}
17371740

17381741
stringManager->setValue(rootProperty_, attribute->Get().ref);
17391742
}
@@ -1841,34 +1844,52 @@ void AssetReferenceAttributeEditor::OpenAssetsWindow()
18411844
QString assetType = components_[0].lock()->GetFramework()->Asset()->GetResourceTypeFromAssetRef(assetRef->Get());
18421845
LogDebug("Creating AssetsWindow for asset type " + assetType);
18431846
AssetsWindow *assetsWindow = new AssetsWindow(assetType, fw, fw->Ui()->MainWindow());
1844-
connect(assetsWindow, SIGNAL(SelectedAssetChanged(AssetPtr)), SLOT(HandleAssetPicked(AssetPtr)));
1847+
connect(assetsWindow, SIGNAL(SelectedAssetChanged(AssetPtr)), SLOT(HandleAssetSelected(AssetPtr)));
18451848
connect(assetsWindow, SIGNAL(AssetPicked(AssetPtr)), SLOT(HandleAssetPicked(AssetPtr)));
18461849
connect(assetsWindow, SIGNAL(PickCanceled()), SLOT(RestoreOriginalValue()));
18471850
assetsWindow->setAttribute(Qt::WA_DeleteOnClose);
18481851
assetsWindow->setWindowFlags(Qt::Tool);
18491852
assetsWindow->show();
18501853

1851-
// Save the original asset ref(s), if we decide to cancel
1852-
foreach(const ComponentWeakPtr &c, components_)
1853-
if (c.lock())
1854-
{
1855-
Attribute<AssetReference> *ref = FindAttribute<AssetReference>(c.lock());
1856-
if (ref)
1857-
originalValues[c] = ref->Get();
1858-
}
1854+
SaveOriginalValue();
18591855
}
18601856
}
18611857

1858+
void AssetReferenceAttributeEditor::SaveOriginalValue()
1859+
{
1860+
originalValues.clear();
1861+
1862+
// Save the original asset ref(s), if we decide to cancel
1863+
foreach(const ComponentWeakPtr &c, components_)
1864+
if (c.lock())
1865+
{
1866+
Attribute<AssetReference> *ref = FindAttribute<AssetReference>(c.lock());
1867+
if (ref)
1868+
originalValues[c] = ref->Get();
1869+
}
1870+
}
1871+
18621872
void AssetReferenceAttributeEditor::HandleAssetPicked(AssetPtr asset)
1873+
{
1874+
// Choice was final, set new original values
1875+
originalValues.clear();
1876+
HandleAssetSelected(asset);
1877+
SaveOriginalValue();
1878+
}
1879+
1880+
void AssetReferenceAttributeEditor::HandleAssetSelected(AssetPtr asset)
18631881
{
18641882
if (asset)
18651883
{
18661884
LogDebug("AssetReferenceAttributeEditor: Setting new value " + asset->Name());
18671885
SetValue(AssetReference(asset->Name()));
1868-
Update();
1886+
// Update() does not update immediately, need to reinit
1887+
UnInitialize();
1888+
Initialize();
18691889
}
18701890
}
18711891

1892+
18721893
void AssetReferenceAttributeEditor::RestoreOriginalValue()
18731894
{
18741895
Attribute<AssetReference> *assetRef= FindAttribute<AssetReference>(components_[0].lock());
@@ -1947,6 +1968,12 @@ template<> void ECAttributeEditor<AssetReferenceList>::Update(IAttribute *attr)
19471968
Initialize();
19481969
}
19491970

1971+
if (!stringManager)
1972+
{
1973+
LogWarning("Failed to update attribute value in ECEditor, couldn't find stringmanager");
1974+
return;
1975+
}
1976+
19501977
if (value.Size() <= children.size())
19511978
for(uint i = 0; i < (uint)value.Size(); ++i)
19521979
stringManager->setValue(children[i], value[i].ref);
@@ -2121,13 +2148,18 @@ void AssetReferenceListAttributeEditor::OpenAssetsWindow()
21212148
LogDebug("OpenAssetsWindow, index " + QString::number(currentIndex));
21222149
LogDebug("Creating AssetsWindow for asset type " + assetType);
21232150
AssetsWindow *assetsWindow = new AssetsWindow(assetType, fw, fw->Ui()->MainWindow());
2124-
connect(assetsWindow, SIGNAL(SelectedAssetChanged(AssetPtr)), SLOT(HandleAssetPicked(AssetPtr)));
2151+
connect(assetsWindow, SIGNAL(SelectedAssetChanged(AssetPtr)), SLOT(HandleAssetSelected(AssetPtr)));
21252152
connect(assetsWindow, SIGNAL(AssetPicked(AssetPtr)), SLOT(HandleAssetPicked(AssetPtr)));
21262153
connect(assetsWindow, SIGNAL(PickCanceled()), SLOT(RestoreOriginalValue()));
21272154
assetsWindow->setAttribute(Qt::WA_DeleteOnClose);
21282155
assetsWindow->setWindowFlags(Qt::Tool);
21292156
assetsWindow->show();
21302157

2158+
SaveOriginalValue();
2159+
}
2160+
2161+
void AssetReferenceListAttributeEditor::SaveOriginalValue()
2162+
{
21312163
originalValues.clear();
21322164

21332165
// Save the original asset ref(s), if we decide to cancel
@@ -2141,6 +2173,14 @@ void AssetReferenceListAttributeEditor::OpenAssetsWindow()
21412173
}
21422174

21432175
void AssetReferenceListAttributeEditor::HandleAssetPicked(AssetPtr asset)
2176+
{
2177+
// Choice was final, set new original values
2178+
originalValues.clear();
2179+
HandleAssetSelected(asset);
2180+
SaveOriginalValue();
2181+
}
2182+
2183+
void AssetReferenceListAttributeEditor::HandleAssetSelected(AssetPtr asset)
21442184
{
21452185
Attribute<AssetReferenceList> *refList = FindAttribute<AssetReferenceList>(components_[0].lock());
21462186
if (!refList)
@@ -2165,7 +2205,9 @@ void AssetReferenceListAttributeEditor::HandleAssetPicked(AssetPtr asset)
21652205
newRefList.Set(currentIndex, AssetReference(asset->Name()));
21662206

21672207
SetValue(newRefList);
2168-
Update();
2208+
// Update() does not update immediately, need to reinit
2209+
UnInitialize();
2210+
Initialize();
21692211
}
21702212
}
21712213

@@ -2252,7 +2294,10 @@ template<> void ECAttributeEditor<EntityReference>::Update(IAttribute *attr)
22522294

22532295
QtStringPropertyManager *stringManager = dynamic_cast<QtStringPropertyManager *>(propertyMgr_);
22542296
if (!stringManager)
2297+
{
2298+
LogWarning("Failed to update attribute value in ECEditor, couldn't find stringmanager");
22552299
return;
2300+
}
22562301

22572302
stringManager->setValue(rootProperty_, attribute->Get().ref);
22582303
}

src/Core/ECEditorModule/ECAttributeEditor.h

+4
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,9 @@ class AssetReferenceAttributeEditor : public ECAttributeEditor<AssetReference>
299299
private slots:
300300
void OpenAssetsWindow();
301301
void HandleNewEditor(QtProperty *prop, QObject *);
302+
void HandleAssetSelected(AssetPtr asset);
302303
void HandleAssetPicked(AssetPtr asset);
304+
void SaveOriginalValue();
303305
void RestoreOriginalValue();
304306
void OpenEditor();
305307

@@ -330,7 +332,9 @@ class AssetReferenceListAttributeEditor : public ECAttributeEditor<AssetReferenc
330332
private slots:
331333
void OpenAssetsWindow();
332334
void HandleNewEditor(QtProperty *prop, QObject *);
335+
void HandleAssetSelected(AssetPtr asset);
333336
void HandleAssetPicked(AssetPtr asset);
337+
void SaveOriginalValue();
334338
void RestoreOriginalValue();
335339
void OpenEditor();
336340

src/Core/PhysicsModule/EC_VolumeTrigger.cpp

+17-8
Original file line numberDiff line numberDiff line change
@@ -199,27 +199,23 @@ void EC_VolumeTrigger::OnPhysicsUpdate()
199199
for(EntitiesWithinVolumeMap::iterator it = entities_.begin(); it != entities_.end();)
200200
{
201201
bool remove = false;
202+
EntityPtr entity = it->first.lock();
202203

203204
// Entity was destroyed without us knowing? Remove from map in that case
204-
if (it->first.expired())
205+
if (!entity)
205206
remove = true;
206207
else
207208
{
208209
// If collision is old, remove the entity if its rigidbody is active
209210
// (inactive rigidbodies do not refresh the collision, so we would remove the entity mistakenly)
210211
if (!it->second)
211212
{
212-
EntityPtr entity = it->first.lock();
213213
bool active = true;
214214
shared_ptr<EC_RigidBody> rigidbody = entity->GetComponent<EC_RigidBody>();
215215
if (rigidbody)
216216
active = rigidbody->IsActive();
217217
if (active)
218-
{
219218
remove = true;
220-
emit entityLeave(entity.get());
221-
disconnect(entity.get(), SIGNAL(EntityRemoved(Entity*, AttributeChange::Type)), this, SLOT(OnEntityRemoved(Entity*)));
222-
}
223219
}
224220
else
225221
{
@@ -235,6 +231,11 @@ void EC_VolumeTrigger::OnPhysicsUpdate()
235231
EntitiesWithinVolumeMap::iterator current = it;
236232
++it;
237233
entities_.erase(current);
234+
if (entity)
235+
{
236+
emit entityLeave(entity.get());
237+
disconnect(entity.get(), SIGNAL(EntityRemoved(Entity*, AttributeChange::Type)), this, SLOT(OnEntityRemoved(Entity*)));
238+
}
238239
}
239240
}
240241
}
@@ -255,17 +256,25 @@ void EC_VolumeTrigger::OnPhysicsCollision(Entity* otherEntity, const float3& pos
255256
if (byPivot.Get() && !IsPivotInside(entity.get()))
256257
return;
257258

259+
bool refreshed = false;
260+
258261
if (newCollision)
259262
{
260263
// make sure the entity isn't already inside the volume
261264
if (entities_.find(entity) == entities_.end())
262265
{
266+
entities_[entity] = true;
267+
refreshed = true;
263268
emit entityEnter(otherEntity);
264269
connect(otherEntity, SIGNAL(EntityRemoved(Entity*, AttributeChange::Type)), this, SLOT(OnEntityRemoved(Entity*)), Qt::UniqueConnection);
265270
}
266271
}
267-
// Refresh the collision status to new
268-
entities_[entity] = true;
272+
273+
if (!refreshed)
274+
{
275+
// Refresh the collision status to new
276+
entities_[entity] = true;
277+
}
269278
}
270279

271280
/** Called when the given entity is deleted from the scene. In that case, remove the Entity immediately from our tracking data structure (and signal listeners). */

src/Core/TundraCore/Framework/Application.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@
6363
/// @note Modify these values when you are making a custom Tundra build. Also the version needs to be changed here on releases.
6464
const char *Application::organizationName = "realXtend";
6565
const char *Application::applicationName = "Tundra";
66-
const char *Application::version = "2.4.1";
66+
const char *Application::version = "2.5";
6767

6868
Application::Application(Framework *owner, int &argc, char **argv) :
6969
QApplication(argc, argv),

tools/installers/tundra-installer.nsi

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
# Note: You can define custom version from outside this script by using /DVERSION=YourCustomVersion
44
!ifndef VERSION
5-
!define VERSION "2.4.1"
5+
!define VERSION "2.5"
66
!endif
77

88
Name "Tundra ${VERSION}"

tools/mac-bundle-app.bash

+6-1
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,14 @@ cp -R $qtlibdir/QtDeclarative.framework $frameworksdir
5858

5959
echo "Deploying Qt plugins from $qtpluginsdir to app bundle."
6060
cp -R $qtpluginsdir/* $bundledir/Contents/Plugins
61+
mkdir $bundledir/Contents/MacOS/qtplugins
62+
mkdir $bundledir/Contents/MacOS/qtplugins/script
63+
cp -R $depsdir/build/qtscriptgenerator/plugins/script/*.dylib $bundledir/Contents/MacOS/qtplugins/script
64+
debugplugins=`find $bundledir/Contents/MacOS/qtplugins/script -name "*_debug*.dylib"`
65+
rm $debugplugins
6166

6267
echo "Deploying Ogre plugins from $ogredir to app bundle."
63-
cp $ogredir/*.dylib $bundledir/Contents/Plugins
68+
cp $ogredir/lib/relwithdebinfo/*.dylib $bundledir/Contents/Plugins
6469
cp $ogredir/lib* $bundledir/Contents/Components
6570
ogresamples=`find $bundledir/Contents/Plugins -name "Sample_*.dylib"`
6671
rm $ogresamples

0 commit comments

Comments
 (0)