Details
- Reviewers
Sergey Sharybin (sergey) Joshua Leung (aligorith) - Maniphest Tasks
- T54829: COW Operators: 3D View
- Commits
- rBS46514cf86523: COW Operators: Fix VIEW3D_OT_view_all and camera mode of VIEW3D_OT_viewnumpad
rB46514cf86523: COW Operators: Fix VIEW3D_OT_view_all and camera mode of VIEW3D_OT_viewnumpad
Diff Detail
- Repository
- rB Blender
Event Timeline
Something seems a bit fishy here with comparing evaluated view layer stuff against the original camera data and/or then writing the evaluated data to the originals in other places. Thoughts @Sergey Sharybin (sergey) ?
Testfile for View All:
| source/blender/editors/space_view3d/view3d_edit.c | ||
|---|---|---|
| 3777 | AFAIK, we really shouldn't be storing the evaluated data back to the original scene data. Have you tried just changing the ED_view3d_smooth_view() -> .camera parameter a few lines down instead? | |
For viewnumpad_exec, the final result when pressing numpad0 seems to be always correct.
Here is my test file:
What was not correct was the smooth view (noticeable when replacing smooth_viewtx with 2000).
As for view3d_all_exec, I can't see a problem with your file? (except that without --enable-copy-on-write I don't see the results of the Array modifier and the file crashes Blender 2.79)
With my file, it is correctly reading the visibility state of objects in other collections, which wasn't happening before.
| source/blender/editors/space_view3d/view3d_edit.c | ||
|---|---|---|
| 3740 | Moved down to the one place where it's actually used, to avoid asking for evaluated stuff. | |
| 3777 | I think you're absolutely right. I was wrongly assuming that v3d->camera was some sort of runtime 'current view'. | |
Removed silly assignment of evaluated camera to v3d->camera. Fixes Ed_view3d_smooth_view.
Fixed pointer comparison between evaluated and original camera object
Fixed coding style according to guidelines: should be Object *ob, not Object* ob