[gluon] Re: Review Request: Reload the Assets when their file changes.

[ Thread Index | Date Index | More lists.tuxfamily.org/gluon Archives ]


This is an automatically generated e-mail. To reply, visit: http://git.reviewboard.kde.org/r/100445/

creator/lib/objectmanager.h (Diff revision 1)
namespace GluonCreator
55
            void startAssetsWatch();
"startAssetsWatch" is a bit strange english. I'd rename it to "startWatchingAssets" or "watchAssets" or something.

creator/plugins/docks/projectdock/projectdock.cpp (Diff revision 1)
void GluonCreator::ProjectDock::newAssetTriggered()
354
347
                GluonEngine::Game::instance()->gameProject()->removeChild( newAsset );
What's the point of this? It seems to me this is a rather hackish approach to doing the assignment. Why not pass d->currentContextIndex and newAssetName to ObjectManager::createNewAsset instead?

- Arjen


On January 26th, 2011, 6:39 p.m., Giulio Camuffo wrote:

Review request for Gluon.
By Giulio Camuffo.

Updated Jan. 26, 2011, 6:39 p.m.

Description

This patch makes Creator watch the files of the Assets for changes with a KDirWatch. If a file changes it calls reload() on the respective Asset.
It also modifies some code in graphics to support this (that is, do not return if it was already loaded but instead discard and load again), but there will probably be the need to do the same in Input and Audio.

Testing

Tested modifying a material .gml and a texture image.

Diffs

  • creator/lib/objectmanager.h (c39b8af)
  • creator/lib/objectmanager.cpp (a088c80)
  • creator/mainwindow.cpp (960535e)
  • creator/plugins/docks/projectdock/projectdock.cpp (382ace5)
  • engine/asset.h (5d3a126)
  • engine/asset.cpp (e134db2)
  • graphics/material.cpp (9e1a040)
  • graphics/texture.cpp (00fe36d)

View Diff



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/