1
$\begingroup$

After adding an draw handler to my operator my terminal is showing the following:

Traceback (most recent call last):
File "C:\Users\3DDigitalVenue_1\AppData\Roaming\Blender 
Foundation\Blender\2.80\scripts\addons\project\OP_operators.py", line 104, 
in draw_callback_3d
self.shader.bind()
File "c:\Program Files\Blender 
Foundation\Blender\2.80\scripts\modules\bpy_types.py", line 670, in 
__getattribute__
properties = StructRNA.path_resolve(self, "properties")
ReferenceError: StructRNA of type ModalVectorOperator has been removed

The program still runs but i don't know if it's important this warning or from where it's coming. Here is the function i pass to my handler:

  def draw_callback_3d(self, op, context):

    # Draw lines
    bgl.glLineWidth(10)
    self.shader.bind()
    self.shader.uniform_float("color", (1, 0.3, 0.7, 1.0))
    self.batch.draw(self.shader)
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.