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>
* 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>
* 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>
* 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>