diff --git a/tasks.py b/tasks.py index 99e67c559c..44cf04f5df 100644 --- a/tasks.py +++ b/tasks.py @@ -1079,7 +1079,8 @@ def ci_build( novelty_thor_scenes=False, skip_delete_tmp_dir=False, # bool cloudrendering_first=False, - only_cloudrendering=False + only_cloudrendering=False, + private_scenes_skip=False ): assert (commit_id is None) == ( branch is None @@ -1159,14 +1160,19 @@ def ci_build( # disabling delete temporarily since it interferes with pip releases # pytest_s3_object(build["commit_id"]).delete() logger.info(f"pending build for {build['branch']} {build['commit_id']}") + + if not private_scenes_skip: + novelty_thor_scenes = False + private_repos = [] + clean(private_repos=private_repos) + private_scene_options = [novelty_thor_scenes] + subprocess.check_call("git fetch", shell=True) subprocess.check_call("git checkout %s --" % build["branch"], shell=True) logger.info(f" After checkout") subprocess.check_call("git checkout -qf %s" % build["commit_id"], shell=True) - private_scene_options = [novelty_thor_scenes] - build_archs = ["OSXIntel64"] # , "Linux64"] build_archs = [] if only_cloudrendering else ["OSXIntel64"] # , "Linux64"] diff --git a/unity/Assets/Scripts/CapturePass.cs b/unity/Assets/Scripts/CapturePass.cs index 80ee117773..6fa7447ade 100644 --- a/unity/Assets/Scripts/CapturePass.cs +++ b/unity/Assets/Scripts/CapturePass.cs @@ -52,8 +52,6 @@ public class CaptureConfig { public string shaderName; - public ReplacelementMode replacementMode; - public int? toDisplay = 0; public bool cloudRendering; @@ -450,9 +448,9 @@ public class ReplacementShaderCapture: RenderToTexture { private readonly Transform cameraParent; private ReplacelementMode mode; - public ReplacementShaderCapture(CaptureConfig config, Transform cameraParent) : base(config, null) { + public ReplacementShaderCapture(CaptureConfig config, ReplacelementMode replacementMode, Transform cameraParent) : base(config, null) { this.cameraParent = cameraParent; - this.mode = config.replacementMode; + this.mode = replacementMode; } public override void OnInitialize(Camera mainCamera) { diff --git a/unity/Assets/Scripts/RenderingManager.cs b/unity/Assets/Scripts/RenderingManager.cs index 438af2cbd7..a7e333aad1 100644 --- a/unity/Assets/Scripts/RenderingManager.cs +++ b/unity/Assets/Scripts/RenderingManager.cs @@ -32,8 +32,6 @@ public class RenderingManager : MonoBehaviour { private Texture2D readTex; - private static bool isMainCameraPassCreated = false; - public RenderToTexture distortionMap { get; private set; @@ -166,7 +164,7 @@ void Awake() { var depthPass = new RenderToTexture( - new CaptureConfig() { name = "_depth", antiAliasLevel = antiAliasLevel, shaderName = "Hidden/DepthBW" }, + new CaptureConfig() { name = "_depth", antiAliasLevel = antiAliasLevel, shaderName = "Hidden/DepthBW", renderTextureFormat = RenderTextureFormat.RFloat }, camera: camera ); @@ -176,17 +174,20 @@ void Awake() { ); var idPass = new ReplacementShaderCapture( - new CaptureConfig() { name = "_id", antiAliasLevel = antiAliasLevel, shaderName = "Hidden/UberReplacement", replacementMode = ReplacelementMode.ObjectId }, + new CaptureConfig() { name = "_id", antiAliasLevel = antiAliasLevel, shaderName = "Hidden/UberReplacement" }, + replacementMode: ReplacelementMode.ObjectId, cameraParent: camera.transform ); var classPass = new ReplacementShaderCapture( - new CaptureConfig() { name = "_class", antiAliasLevel = antiAliasLevel, shaderName = "Hidden/UberReplacement", replacementMode = ReplacelementMode.CatergoryId }, + new CaptureConfig() { name = "_class", antiAliasLevel = antiAliasLevel, shaderName = "Hidden/UberReplacement" }, + replacementMode: ReplacelementMode.CatergoryId, cameraParent: camera.transform ); var normalsPass = new ReplacementShaderCapture( - new CaptureConfig() { name = "_normals", antiAliasLevel = antiAliasLevel, shaderName = "Hidden/UberReplacement", replacementMode = ReplacelementMode.Normals }, + new CaptureConfig() { name = "_normals", antiAliasLevel = antiAliasLevel, shaderName = "Hidden/UberReplacement" }, + replacementMode: ReplacelementMode.Normals, cameraParent: camera.transform ); @@ -197,7 +198,7 @@ void Awake() { // make first _img capture created render to Display int? toDisplay = null; this.mainPass = new MultiCapture( - config: new CaptureConfig() { name = "_img", antiAliasLevel = antiAliasLevel, cloudRendering = cloudRenderingCapture, toDisplay = isMainCameraPassCreated ? toDisplay : 0}, + config: new CaptureConfig() { name = "_img", antiAliasLevel = antiAliasLevel, cloudRendering = cloudRenderingCapture, toDisplay = IsMainCamera ? 0 : toDisplay}, camera: camera, passes: new List() { }