Aggressive PRUNE_ALPHA under visual_guard (still JPEG Alpha unlink) - #2
Aggressive PRUNE_ALPHA under visual_guard (still JPEG Alpha unlink)#2liminallyspaced wants to merge 2 commits into
Conversation
Cycles object_cull.cpp ANDs when both object cull flags are set on the same name (keeps nearby off-frustum for reflections). Dual flags on the CAMERA_CULL scatter list would regress the Classroom cull slice of the 41% plate. Split into disjoint sets: payload objects get use_camera_cull only; distance_objects (far tiny via min_camera_distance) get use_distance_cull only. Scene may enable both flags; missing distance RNA stays camera-only. Manifest stays 0.3.5; no store % change.
JPEG Alpha unlink only; Preserve Look/Balanced/Video withhold; visual_guard own group fail-closed; time_factor 1.0; manifest 0.3.5; no store %.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ada533cdc4
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if distance_enabled: | ||
| # Prefer scene distance on whenever RNA exists (Manual path / later | ||
| # objects). Object flags still drive which objects actually cull. | ||
| jrnl.set_prop(scene, "cycles.use_distance_cull", True, SPEED_TAG) |
There was a problem hiding this comment.
Do not enable distance cull outside the planned set
When a scene already has objects with object.cycles.use_distance_cull=True while the scene-level distance switch is off, any CAMERA_CULL action now turns scene.cycles.use_distance_cull on even if payload["distance_objects"] is empty or unrelated. That activates pre-existing per-object distance-cull flags outside the analyzed payload, so Aggressive Make it Fast can unexpectedly cull far objects that the planner did not select; only enable this scene flag when the selected distance set is intended and safe.
Useful? React with 👍 / 👎.
| return [SpeedAction( | ||
| "DEAD_CLOSURE_PRUNE", | ||
| "%d JPEG / opaque-constant Alpha socket(s) -> unlink (PRUNE_ALPHA)" | ||
| % n, | ||
| "dead", 1, 1.0, 1, |
There was a problem hiding this comment.
Run the visual guard before auto-unlinking Alpha
This adds DEAD_CLOSURE_PRUNE to the auto plan only for Aggressive stills, but the UI apply path calls run_guarded_speed_plan only when plan.profile == "PRESERVE_LOOK" (scenequant/ui/operators.py lines 1533-1544), and _allowed_by_policy excludes this kind from Preserve Look. As a result the newly automated Alpha unlink never reaches the visual-guard group added in this commit and is applied directly with no render/rollback check; include this kind/profile in guarded execution before putting it in the default plan if the intended behavior is fail-closed.
Useful? React with 👍 / 👎.
Summary
DEAD_CLOSURE_PRUNEinto Aggressive Make it Fast for PRUNE_ALPHA only (JPEG / no-alpha / IGNORE / Value=1.0 Alpha unlink). No new Cycles RNA.time_factor1.0. Auto label is not "manual". Auto tier is 1 so it clearsDEFAULT_TIER_MAX.BALANCED_BLOCKED_KINDS), and Video (VIDEO_BLOCKED_KINDS+ Aggressive+VIDEO special-case) withhold it. Other PRUNE_* stay Manual-later at tier 2._HANDLERS["DEAD_CLOSURE_PRUNE"]; apply uses payload records; revert is existingNODE_UNLINK. 0.3.5visual_guardisolates the kind in its own group and fail-closes.This PR starts from
plugwalk/distance-cull-aggressive(PR #1, CAMERA_CULL disjoint-set AND-on-same-object fix). That commit is included; leave PR 1 open.Test plan
python3 tests/test_dead_closures.py— ALL TESTS PASSED (216 ok)python3 tests/test_speed_solver.py— ALL TESTS PASSED (260 ok)python3 tests/test_visual_guard.py— ALL TESTS PASSED (15 ok)python3 tests/test_portal_meshes.py— ALL TESTS PASSED (98 ok)tests/test_preserve_look.pyneeds Blender (bpy); not run in this environment