0
$\begingroup$

The menu for this code is in the the video sequencer. It just brings in an image file into the video sequencer. It works except that I get search for unknown operator 'BPY_OT_OPS_OT_mesh.dissolve_limited()'. It gives that error 3 times in a row. I'm not dealing with meshes at all in the code but Dissolve Limited is something that I just started using recently. So I tested it on an older version of Blender I have and the error didn't show. I don't know if I saved a default state after I started using it or its something behind the scenes that is beyond me. I think the solution is to erase whatever traces in memory it resides in or something. Anyway to remove this error?

import bpy
import os           
import operator     

class CustomPanel(bpy.types.Panel):
    bl_label = "OpenSource::Classicism XL"
    bl_space_type = "SEQUENCE_EDITOR"
    bl_region_type = "UI"
    bl_options = {'DEFAULT_CLOSED'}

    def draw(self, context):
        def add_label():
        row = self.layout.row()
        row.label("Intro Directory")

    def add_import_button():
        col = self.layout.split().column(align = True)
        col.operator("sequencer.add_intro" , text= "Import")

    add_label()
    add_import_button()


class Add_Intro(bpy.types.Operator):
    bl_idname = "sequencer.add_intro"
    bl_label = "Add Intro"

    def execute(self, context): 

        def add_splash_screen():
            bpy.ops.sequencer.image_strip_add(directory="C:\\Users\\....png", "name":"image_file.png"}], frame_start=1, frame_end=26, channel=1)

        add_splash_screen()

    return {'FINISHED'}


def register():
    bpy.utils.register_module(__name__)

def unregister():
    bpy.utils.unregister_module(__name__)

if __name__ == "__main__":
    register()
$\endgroup$
0
$\begingroup$

I tried your script and had a few other issues aside from the one you mentioned. I tweaked it to make it work and had no issues. I bet you're getting the search for unknown operator from something else. Try going to File > Load Factory Settings to reset Blender.

import bpy
import os
import operator


class CustomPanel(bpy.types.Panel):
    bl_label = "OpenSource::Classicism XL"
    bl_space_type = "SEQUENCE_EDITOR"
    bl_region_type = "UI"
    bl_options = {'DEFAULT_CLOSED'}

    def draw(self, context):
        row = self.layout.row()
        row.label("Intro Directory")

        col = self.layout.split().column(align = True)
        col.operator("sequencer.add_intro" , text= "Import")


class Add_Intro(bpy.types.Operator):
    bl_idname = "sequencer.add_intro"
    bl_label = "Add Intro"

    def execute(self, context):

        def add_splash_screen():
            bpy.ops.sequencer.image_strip_add(directory="/home/doakey/Desktop/image.png", files=[{"name":"image.png"}], frame_start=1, frame_end=26, channel=1)

        add_splash_screen()

        return {'FINISHED'}


def register():
    bpy.utils.register_module(__name__)


def unregister():
    bpy.utils.unregister_module(__name__)


if __name__ == "__main__":
    register()
$\endgroup$

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.