How to edit color buffer?

How to edit color buffer?

Anonymous
Not applicable
847 Views
1 Reply
Message 1 of 2

How to edit color buffer?

Anonymous
Not applicable

To actually read data from color buffer and store it as file this code works:

view = OpenMayaUI.M3dView.active3dView()
image = OpenMaya.MImage()
view.readColorBuffer(image, True) 
image.writeToFile('whatever.jpg', 'jpg')

But, if I read the file, change the data and try to use 'writeColorBuffer' method, nothing changes. I do realize this worked till like 2015, so my question is what class and what methods should I use now to edit color buffer? I would like to do this using the Viewport 2.0. It looks like this is unresolved problem for more than 3 years, so any info will be appreciated.

848 Views
1 Reply
Reply (1)
Message 2 of 2

livinamukS9FUA
Participant
Participant

Did you ever figure this out? are you talking about directly writing to the Maya color framebuffer?

0 Likes