Page MenuHome

First version of patch to disable nonrenderable objects and shading when using 'external editor' for image editing
Needs ReviewPublic

Authored by Tom Musgrove (letterrip) on Mar 8 2017, 8:53 AM.

Diff Detail

Event Timeline

Tom Musgrove (letterrip) retitled this revision from to First version of patch to disable nonrenderable objects and shading when using 'external editor' for image editing.Mar 8 2017, 8:53 AM
Tom Musgrove (letterrip) updated this object.
Tom Musgrove (letterrip) set the repository for this revision to rB Blender.
Tom Musgrove (letterrip) updated this revision to Diff 8397.
Tom Musgrove (letterrip) removed rB Blender as the repository for this revision.Mar 8 2017, 8:59 AM
Tom Musgrove (letterrip) updated this revision to Diff 8400.

The updated patch now is part of the C function instead of the python function and the user can now optionally have the shading and non renderable objects disabled as per Campbell's suggestions.

Tom Musgrove (letterrip) set the repository for this revision to rB Blender.Mar 8 2017, 9:04 AM
source/blender/editors/sculpt_paint/paint_image_proj.c
5461

Changing draw type seems quite extreme, especially since we can't assume much about what the user does. They could have rendering set, glsl for example.

When all lamps are deleted from a scene in some modes Blender disables lighting (flat shaded), have some memory of Blender having the ability to disable shading under some conditions but would need to double check on this. While supporting every mode might be hard to support, I think its reasonable try support disabling shaders for GLSL painting since its a fairly common.

Could you check on how GPU_SHADER_LIGHTING is used?

Note: tex_mat_set_texture_cb disables lighting, tex_mat_set_material_cb doesn't by the looks of it, think best approach would be to use make tex_mat_set_material_cb optionally disable lighting.