Commit Graph

10 Commits (5dd88ba05c628e8feb18a3f37e295cb61729c178)

Author SHA1 Message Date
amzn-mike 5dd88ba05c
[LYN-9953] Asset Processor: Fix file watcher event handlers calling APM methods directly instead … (#7289)
* Fix file watcher event handlers calling APM methods directly instead of queuing them to run on the APM thread

Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com>

* Add unit test

Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com>

* Fix compile errors

Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com>

* Fix compile errors

Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com>

* Fix compile errors

Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com>

* Fix compile errors

Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com>

* Change ASSERT_ checks to EXPECT_ checks

Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com>

* Refactored Test

Removed leftover direct call
Changed invokeMethod to use lambda form

Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com>

* Fix compile error

Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com>
4 years ago
Chris Burel ce0bb1ca2b [AssetProcessor] Refactor the FileWatcher to use only one watch thread
This change reworks the AssetProcessor's FileWatcher so that it only uses
one thread. This is motivated by getting better support for inotify on
Linux. The previous architecture required calling `inotify_init` once for
each directory that was being watched, and using separate inotify instances
for each watched tree. In addition, having separate threads per watched
tree is not necessary, and just consumes system resources. Each platform
supports watching multiple directories with the same platform-specific
watcher API, so each platform has been updated accordingly.

The interface to the FileWatcher class is greatly simplified. Previously,
it supported client-supplied filtering of the paths that would generate
notifications. This was done by subclassing `FolderWatchBase` and
implementing `OnFileChange`. However, only one filter was ever used, so
that filter is now hard-coded in the FileWatcher class, and the classes
driving the old filtering mechanism are removed. Users of the interface
now have a much easier time, they just call `AddFolderWatch` with the path
to watch, and only have to connect to one set of signals, instead of
separate signals per watched directory.

Signed-off-by: Chris Burel <burelc@amazon.com>
4 years ago
amzn-mike 8ee384f436
Asset Processor: Remove gem loading from AP (#6488)
* AssetBuilder sends builder registration network message to AP

Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com>

* Add AP activating status message

Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com>

* First builder handles registration.

Fixed deadlock caused by AP and AssetBuilder waiting on each other when registering by moving AP builder start code to a thread

Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com>

* Clean up external builder registration

Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com>

* Add thread description for builder manager idle thread

Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com>

* Remove gem loading

Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com>

* Clean up builder registration and remove unused functions

Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com>

* Remove PostActivate call from batch application since it will be called after builders are registered

Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com>

* Removal external builder dependency scanning since we no longer support builder dlls

Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com>

* Fix missing bus disconnect

Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com>

* Remove unused variable

Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com>

* Moved AP-AssetBuilder specific types into AssetBuilder.Static library.  Also removed some unused/old code

Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com>
4 years ago
Esteban Papp d046389a30 Code/Tools/AssetProcessor
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
4 years ago
AMZN-stankowi 9ee9730294
Automated test for scene files with and without python scripts running python incorrectly (#2373)
* Cleared m_scriptFilename between scene files.
This fixes a bug where a Python script file would be run on a scene file
that didn't have a script file set.
Added a general case version to SceneBuilderWorker.cpp, to make it easy
to mark all scene files as dirty.
Automated tests for this will come in a separate pull request.

Signed-off-by: stankowi <4838196+AMZN-stankowi@users.noreply.github.com>

* Work in progress automated tests

Signed-off-by: stankowi <4838196+AMZN-stankowi@users.noreply.github.com>

* Python test done

Signed-off-by: stankowi <4838196+AMZN-stankowi@users.noreply.github.com>

* Sorted jobs work now. This may sort too aggressively, I'll remove the additional sorting after some testing.

Signed-off-by: stankowi <4838196+AMZN-stankowi@users.noreply.github.com>

* Cleaned up test

Signed-off-by: stankowi <4838196+AMZN-stankowi@users.noreply.github.com>

* Fixed stray '

Signed-off-by: stankowi <4838196+AMZN-stankowi@users.noreply.github.com>

* Removed temp code from test

Signed-off-by: stankowi <4838196+AMZN-stankowi@users.noreply.github.com>

* Command line help options for AP
Removed job sorting that wasn't actually sorting jobs

Signed-off-by: stankowi <4838196+AMZN-stankowi@users.noreply.github.com>

* Changed constant variable names to match coding standards

Signed-off-by: stankowi <4838196+AMZN-stankowi@users.noreply.github.com>
4 years ago
Steve Pham 38261d0800
Shorten copyright headers by splitting into 2 lines (#2213)
* Updated all copyright headers to split the longer original copyright line into 2 shorter lines

Signed-off-by: Steve Pham <spham@amazon.com>
4 years ago
Steve Pham b4a2edec6a
Final update copyright headers to reference license files at the repo root (#1693)
* Final update copyright headers to reference license files at the repo root

Signed-off-by: spham <spham@amazon.com>

* Fix copyright validator unit tests to support the stale O3DE header scenario

Signed-off-by: spham <spham@amazon.com>
5 years ago
Steve Pham 70042fcdcd
O3DE Copyright Updates for Linux Foundation (#1504) 5 years ago
alexpete 36c4e827bd Integrating latest from github/staging
Integrating up through commit 5e1bdae
5 years ago
alexpete a10351f38d Initial commit 5 years ago