This implements an operator to flip the contents of an image buffer. It
supports flipping the image horizontally and vertically.
Details
- Reviewers
Jacques Lucke (JacquesLucke) - Commits
- rB7d874b03433d: Image: Flip image operator
Diff Detail
- Repository
- rB Blender
Event Timeline
Haven't tried yet, but overall the code seems to make sense. I wonder, has there been a decision made somewhere to add this operator?
| source/blender/editors/space_image/image_ops.c | ||
|---|---|---|
| 2675 | Comments should end with a ., same below. | |
| 2683 | I think you might have to be careful with returning early because of BKE_image_release_ibuf. | |
| 2696 | What does fp and cp stand for? I wouldn't mind a slighly more descriptive name. | |
| 2701 | Haven't tried it, but it seems like this should be size_x - x - 1. | |
I wonder, has there been a decision made somewhere to add this operator?
No as far as I know. This is just something I was trying to do yesterday and the functionality was not there. If the editor supports resize and invert, I don't see a reason for not supporting flipping.
| source/blender/editors/space_image/image_ops.c | ||
|---|---|---|
| 2696 | This naming is used in other places in this file, I guess it refers to char_pixels and float_pixels. I can use those names for this operator if you think that is better. | |
Alright, seems to make sense.
I'll test the patch tomorrow.
| source/blender/editors/space_image/image_ops.c | ||
|---|---|---|
| 2696 | Hm yes, I think char_pixels and float_pixels is better here. | |