andyp123 / blender_vertex_color_master

Blender addon for working more precisely with vertex colours.
345 stars 38 forks source link

Master #2

Closed JoseConseco closed 6 years ago

JoseConseco commented 6 years ago

Hi, great job on including linear gradient, and random colors. I just modified some stuff, becaouse it didn't work on blender 2.79a. Also I reworked masking - instead of using custom property, now VCM is using build in blender buttons for masking. I think this is more convenient this way. List of changes:

JoseConseco commented 6 years ago

Also I saw you implemented linear gradient custom colors, but thing is, it won't work with modal operator (after pressing f6, user won't be able to change colors). I do not think there is way around it (unless maybe using foreground, and background color from paint colors...)

andyp123 commented 6 years ago

Thanks for the pull request. I will merge the changes after I take a proper look, but for now I'll just state my opinion after scanning the changes quickly.

I didn't realise that len(color) wouldn't work. That's a shame, since it's fairly future proof, and it did work on older builds. I guess if we can check the version is greater than 2.79, then it's also ok, and will continue to work in future versions of Blender.

I was a bit worried about removing vertex masking, but if it's going to be in 2.79a, then I agree that it's best to use the built-in support.

What is the reason for needing a seed for the random colours? I get that you want the colours to be the same each time, but that was the reason for adding the order-based parameter, which also gives you a better separation of colours. Is there a reason seed is better? Sorry, I haven't really used this feature much, and have mostly just been painting gradients for foliage lately :)

JoseConseco commented 6 years ago

"What is the reason for needing a seed for the random colours?" For example see difference - ordered (left) vs random(rigth) islands color : image Both have their uses. Seed - as you mentioned, It helps you get same result on new execution of operator (useful if you already masked ID colors in texture software, but you have to remake mesh slightly and bake ID's again). BTW. I'm thinking - maybe actually ordered vert color, also need some offset value - to get different colors if users want - but I guess it can be done with HSV sliders now...

Also - not sure why - but randomizing hue dosen't work right now. I get always red results when using random mehs island colors. I may check this out later...

JoseConseco commented 6 years ago

Ok. Found out why hue randomization won't work. In line 872: is: color = Color((1, 1, 1)) but should be: color = Color((1, 0, 0)) You can't change hue on white color, that is why it didn't work. This code for island selection is slow, so maybe I will change it to bmesh in future....

andyp123 commented 6 years ago

Doh! I was changed that bit of code to make the flow easier to read and then introduced a bug. Thanks for pointing it out. It's fixed now. I also added the HSV offset to random island colors, which was something I was going to add before but didn't get around to.