andyp123 / blender_vertex_color_master

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

Vertex color transfer blend error #29

Closed shamsfk closed 1 year ago

shamsfk commented 4 years ago

Hi! I'm trying to blend (multiply) ambient-occlusion vertex color layer with my hand-painted vertex color layer.

But there is an error on blend button press:

Traceback (most recent call last): File "C:\Users\bulat\AppData\Roaming\Blender Foundation\Blender\2.82\scripts\addons\vertex_color_master\vcm_ops.py", line 883, in invoke self.result_channel = settings.dst_channel_id NameError: name 'settings' is not defined

location: :-1

I'v tried to add settings = context.scene.vertex_color_master_settings on line 882 well, it does not throw an error anymore, and even does something, but it is not even close to actual multiplication of my colors to b/w occlusion values I need to achieve.

What can be done?

shamsfk commented 4 years ago

Oh, that was an easy fix)

there was 2 things missing around line 883: 1) definition of settings 2) _id postfix on result

that works perfectly fine:

def invoke(self, context, event):
        settings = context.scene.vertex_color_master_settings
        self.result_channel_id = settings.dst_channel_id
        return self.execute(context)
shamsfk commented 4 years ago

It would be nice to add "RGB" blend option, but that is something beyond my knowledge of blender and python and it is not very important as I can just do it 3 times, for each channel)

MathiasLArt commented 1 year ago

thanks for posting the fix!

andyp123 commented 1 year ago

Thanks for finding this and sorry I didn't notice your post for all this time. I've fixed the issue in the addon code now, so it'll be fixed in the next release (whenever that may be).