Audiokinetic's Community Q&A is the forum where users can ask and answer questions within the Wwise and Strata communities. If you would like to get an answer from Audiokinetic's Technical support team, make sure you use the Support Tickets page.

WAAPI - Get project dirty state not working

0 votes

This:

_project_is_dirty = client.call("ak.wwise.core.object.get", {"from": {"ofType": ["Project"]},
                                "options": {"return": ["workunit:isDirty"]}})["return"][0]["workunit:isDirty"]
Returns alwasy False, even if the project has suffered moidifications. I am on Wwise 2019.2.1 if that matters.
Is this possibly a bug?
asked May 21, 2020 in General Discussion by Eduardo B. (270 points)

1 Answer

+1 vote
 
Best answer

This would only check for the dirty flag on the project object (it would be true if you modify project settings for example). You also need to check for the dirty flags on all work units.

Here is how:

objects = client.call("ak.wwise.core.object.get", {"from": {"ofType": ["Project", "WorkUnit"]},
                                "options": {"return": ["workunit:isDirty"]}})["return"]

_project_is_dirty = any(map(lambda x:x["workunit:isDirty"],objects))
pprint.pprint(_project_is_dirty)

answered May 22, 2020 by Bernard R. (Audiokinetic) (35,090 points)
selected May 22, 2020 by Bernard R. (Audiokinetic)
Thx Bernard! Didnt quite get the dirty project concept.
...