This was suggest on rightclickselect https://blender.community/c/rightclickselect/w0dbbc/
FEATURES
- The user can now change the opacity of the Overlay while using the UV Editor
Differential D5348
The ability to change the opacity of the wirefrane of the Uv editor Authored by Eitan Traurig (EitanSomething) on Jul 26 2019, 5:18 AM.
Details This was suggest on rightclickselect https://blender.community/c/rightclickselect/w0dbbc/ FEATURES
Diff Detail
Event TimelineComment Actions Hey Eitan, Please note that I have not yet tested this patch, so these are just from a quick view. And I barely know what I'm doing so I might be quite wrong about the following. LOL space_image.c 588. Looks like you accidentally removed some whitespace. Not that it matters, but best to not make changes outside your intended patch. uvedit_draw.c 354. It appears that there is a "GPUBlend(true)" at the beginning of every case in that switch. So it could be used one just before it. In fact it is also used in the section before, so you could probably put it just after "if (edges) {" uvedit_draw.c 414 - If you look at the section around line 350 there is a condition where they are turning on GPU_blend. And later on at 414 they then use the same condition to turn it off again. The assumption is that the default state is off, so you'll want to turn in off again after you need it. To my eye it looks like you could just turn it on "if (edges)" and off again at the bottom of the block. uvedit_draw.c 405 - This looks a bit wrong to me. In this section (originally) there is black outline and and inner line that is using colors col1 and col2, taken from theme colors (TH_WIRE_EDIT & TH_EDGE_SELECT) but in your version the inner and outer lines are both black. I think you needed to do something like col1[3] = sima->wireframe_opacity; col2[3] = sima->wireframe_opacity; and then use those colors instead. rna_space.c, 2715. I think you want the short name of that operator to be "Wireframe Opacity", not just "Opacity", in case it is used among other similarly-named things. Comment Actions Hey Eiten! Looking a lot nicer! And again, take my comments only as suggestions and with a grain of salt as I have much to learn. But I still think the variable name is a bit too unspecific. When looking at the SpaceImage struct we really want the members to be quite obvious. I would call that float "outline_opacity" or something else very specific. I think it is a similar issue in the definition of the property. I think line 2716 in rna_space.c should be something like the following in case it is used next to thing with similar names. In this case it will display as "Overlay Opacity" by default. RNA_def_property_ui_text(prop, "Overlay Opacity", "Opacity of overlays"); Comment Actions
Comment Actions
If by "default" you just mean that it starts with a value of "1" every time an Image Editor is opened, then that should just be an assignment to the "simage" var in Image_new() in space_image.c. I think. Comment Actions
This might not have been done the proper way. Comment Actions Checked this patch, seems like a start but there are some strange behaviors.
Comment Actions I will update the code after T62917 is committed the this will be ready for approval. Comment Actions Hey Eitan, I tried your patch and it's nice but i really don't understand the point of changing wireframes opacity in the UV Editor. I assume if you are going to have an image with UVs on top, then you would want to dim the image (change it's Alpha) to be able to see & select your UVs, it's the same concept with Reference Images & Meshes, you would want the reference in the back to be dimmed a bit so u can model while using it. These are my thoughts on this feature, if there is good use for it then i would be glad to know it ,so i can embrace it too. Thanks. Comment Actions I haven’t been able to get this to work with rebase after current master.I think it has to due with https://developer.blender.org/rB64f8f7db7cce0c8923afcabb523f7400f744387e but more research is needed |