LightArchitect V2 Addon port to blender 4.3

Hi everyone,

I am a filmaker trying to setup a previz workflow in blender for my live action feature film , my process involves creating photoscans of locations and then adding lights to the scene using the light architect addon https://blendermarket.com/products/lightarchitect---filmmaking-add-on

the only problem is after buying the addon, i realised it doesnt work with blender 4.3

trying to change the init.py to get it to work myself
i see these errors in the terminal

/Users/sauravsuresh/Library/Application Support/Blender/4.3/scripts/addons/LightArchitect2_0_InstallFile/__init__.py:3690
rna_uiItemO: unknown operator 'my.2ktf'
/Users/sauravsuresh/Library/Application Support/Blender/4.3/scripts/addons/LightArchitect2_0_InstallFile/__init__.py:3690

This is the class that had the bl_idname = ‘my.2ktf’

class NEW_OT_MoleRichardson2KTFresnelOperator (bpy.types.Operator):
    bl_idname = 'my.2ktf'
    bl_label = '2K Fresnel'
    
    def execute(self, context):
        
        section = "\\Collection\\"
        objects = ["2K light with default stand"]
        
        directory = tungstendefaultsblendfile + section
        
        for obj in objects:
            filename = obj
            bpy.ops.wm.append(filename=filename, directory=directory)
            
            return{'FINISHED'}

which is then used here

class NEW_PT_LightArchitectTabOneSpotlights(bpy.types.Panel):
    """Creates a Panel in the Object properties window"""
    bl_label = "SPOTLIGHT UNITS"
    bl_idname = "SPOTLIGHTING_PT_rigs"
    bl_space_type = 'VIEW_3D'
    bl_region_type = 'UI'
    bl_category = "Light Architect"      
    
    def draw(self, context):
        layout = self.layout

        obj = context.object

        row = layout.row()
        row.label(text="Daylight Spot Units:")
        
        row = layout.row()
        row.operator("my.400joker")
        row.operator("my.800joker")
        
        row = layout.row()
        row.operator("my.m18hmi")
        row.operator("my.m40hmi")
        
        row = layout.row()
        row.operator("my.m90hmi")
        row.operator("my.18khmi")
        
        row = layout.row()
        row = layout.row()
        
        row = layout.row()
        row.label(text="Tungsten Spot Units:")
        
        row = layout.row()
        row.operator("my.150tf")
        row.operator("my.300tf")
        
        row = layout.row()
        row.operator("my.650tf")
        row.operator("my.750tf")
        
        row = layout.row()
        row = layout.row()
        row = layout.row()
        
        row.operator("my.sourcefour750wt")
        
        row = layout.row()
        row = layout.row()
        
        row = layout.row()
        row.operator("my.1ktf")
        row.operator("my.2ktf")
        
        row = layout.row()
        row.operator("my.5ktf")
        row.operator("my.12ktf")
        
        row = layout.row()

These classes are then later registered like so

register, unregister = bpy.utils.register_classes_factory(classes)

I dont understand why blender cant find the operator , can anyone help please

Hi! Can you please add addon name to the title to make this thread more searchable? If you solve the problem, it may help other encountering the same issue.

/Users/sauravsuresh/Library/Application Support/Blender/4.3/scripts/addons/LightArchitect2_0_InstallFile/init.py:3690

Can you please attach a few lines of code from this part? If it’s just a draw method, then you need to check traceback earlier - there must be some error during registration.

Thanks @Andrej for the prompt reply, i have updated the title to include the name of the addon.

Last login: Wed Feb  5 19:29:35 on console
/Applications/Blender.app/Contents/MacOS/Blender ; exit;
sauravsuresh@Sauravs-Mac-mini ~ % /Applications/Blender.app/Contents/MacOS/Blender ; exit;
🔄 blenderkit: Verbose is enabled
🔄 blenderkit: Read in JSON settings from file
blenderkit updater: Running background check for update
🔄 blenderkit: Starting background checking thread
🔄 blenderkit: Checking for update now in background
🔄 blenderkit: Checking for update function
ℹ️  blenderkit: Global dir permissions are OK. [19:41:12.697, utils.py:1429]
🔄 blenderkit: Read in JSON settings from file
🔄 blenderkit: Determined it's not yet time to check for updates
🔄 blenderkit: Aborting check for updated, check interval not reached
🔄 blenderkit: Finished check update, doing callback
🔄 blenderkit: Running background update callback
🔄 blenderkit: BG thread: Finished check update, no callback
ℹ️  blenderkit: First request for BlenderKit-Client reports failed: <class 'requests.exceptions.ConnectionError'> HTTPConnectionPool(host='127.0.0.1', port=62485): Max retries exceeded with url: /report (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x331f4fa90>: Failed to establish a new connection: [Errno 61] Connection refused')) [19:41:12.976, timer.py:64]
ℹ️  blenderkit: BlenderKit-Client v1.3.1 starting on http://127.0.0.1:62485 [19:41:12.990, client_lib.py:658]
2025-02-05 19:41:13.021 Blender[1608:25721] +[IMKClient subclass]: chose IMKClient_Modern
2025-02-05 19:41:13.021 Blender[1608:25721] +[IMKInputSession subclass]: chose IMKInputSession_Modern
⚠️  blenderkit: Request for BlenderKit-Client reports failed: <class 'requests.exceptions.ConnectionError'> HTTPConnectionPool(host='127.0.0.1', port=62485): Max retries exceeded with url: /report (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x3353c1d10>: Failed to establish a new connection: [Errno 61] Connection refused')) [19:41:13.039, timer.py:69]
ℹ️  blenderkit: BlenderKit-Client is running on port 62485! [19:41:13.239, timer.py:124]
Info: Deleted 1 object(s)
rna_uiItemO: unknown operator 'my.2ktf'
/Users/sauravsuresh/Library/Application Support/Blender/4.3/scripts/addons/LightArchitect2_0_InstallFile/__init__.py:3690
rna_uiItemO: unknown operator 'my.2ktf'
/Users/sauravsuresh/Library/Application Support/Blender/4.3/scripts/addons/LightArchitect2_0_InstallFile/__init__.py:3690
rna_uiItemO: unknown operator 'my.2ktf'
/Users/sauravsuresh/Library/Application Support/Blender/4.3/scripts/addons/LightArchitect2_0_InstallFile/__init__.py:3690
rna_uiItemO: unknown operator 'my.2ktf'
/Users/sauravsuresh/Library/Application Support/Blender/4.3/scripts/addons/LightArchitect2_0_InstallFile/__init__.py:3690
rna_uiItemO: unknown operator 'my.2ktf'
/Users/sauravsuresh/Library/Application Support/Blender/4.3/scripts/addons/LightArchitect2_0_InstallFile/__init__.py:3690
rna_uiItemO: unknown operator 'my.2ktf'
/Users/sauravsuresh/Library/Application Support/Blender/4.3/scripts/addons/LightArchitect2_0_InstallFile/__init__.py:3690
rna_uiItemO: unknown operator 'my.2ktf'
/Users/sauravsuresh/Library/Application Support/Blender/4.3/scripts/addons/LightArchitect2_0_InstallFile/__init__.py:3690
rna_uiItemO: unknown operator 'my.2ktf'
/Users/sauravsuresh/Library/Application Support/Blender/4.3/scripts/addons/LightArchitect2_0_InstallFile/__init__.py:3690
rna_uiItemO: unknown operator 'my.2ktf'
/Users/sauravsuresh/Library/Application Support/Blender/4.3/scripts/addons/LightArchitect2_0_InstallFile/__init__.py:3690
rna_uiItemO: unknown operator 'my.2ktf'
/Users/sauravsuresh/Library/Application Support/Blender/4.3/scripts/addons/LightArchitect2_0_InstallFile/__init__.py:3690
rna_uiItemO: unknown operator 'my.2ktf'
/Users/sauravsuresh/Library/Application Support/Blender/4.3/scripts/addons/LightArchitect2_0_InstallFile/__init__.py:3690
rna_uiItemO: unknown operator 'my.2ktf'
/Users/sauravsuresh/Library/Application Support/Blender/4.3/scripts/addons/LightArchitect2_0_InstallFile/__init__.py:3690
rna_uiItemO: unknown operator 'my.2ktf'
/Users/sauravsuresh/Library/Application Support/Blender/4.3/scripts/addons/LightArchitect2_0_InstallFile/__init__.py:3690
rna_uiItemO: unknown operator 'my.2ktf'
/Users/sauravsuresh/Library/Application Support/Blender/4.3/scripts/addons/LightArchitect2_0_InstallFile/__init__.py:3690
rna_uiItemO: unknown operator 'my.2ktf'
/Users/sauravsuresh/Library/Application Support/Blender/4.3/scripts/addons/LightArchitect2_0_InstallFile/__init__.py:3690
rna_uiItemO: unknown operator 'my.2ktf'
/Users/sauravsuresh/Library/Application Support/Blender/4.3/scripts/addons/LightArchitect2_0_InstallFile/__init__.py:3690
rna_uiItemO: unknown operator 'my.2ktf'
/Users/sauravsuresh/Library/Application Support/Blender/4.3/scripts/addons/LightArchitect2_0_InstallFile/__init__.py:3690
rna_uiItemO: unknown operator 'my.2ktf'
/Users/sauravsuresh/Library/Application Support/Blender/4.3/scripts/addons/LightArchitect2_0_InstallFile/__init__.py:3690

This is the entire output of the blender console window of blender with the addon installed, I open blender, then delete the default cube and try to click on any button in the addon

the code to register classses and the code for the draw method and the operator is included in the original comment, Any help would be greatly appreciated…

thanks!

Okay, then the chances are my.2ktf is just not registered.
Check classes variable - does it have NEW_OT_MoleRichardson2KTFresnelOperator in it? If it’s missing it, just add it to the end of the list and restart Blender, it should solve the problem. If it’s not missing, there might be some other condition to give us clues on why it’s missing.

Thanks andrej, that seems to have solved that error, but when i click on any of the buttons of the addon , it doesnt seem to work. no errors on the console either. i tested out the same addon with blender 3.0 and that seems to work fine. Im guessing the blender python api has changed as a result of the move from 3.0 to 4.0 which is causing the addon to not work?

Have reached out to the addon creator from blender market but there is no response yet

Given that my.2ktf was never registered, I’d say part of addon was always broken, it’s not Python API changes in 4.0. Could be similar problem with other parts of the addon.

Can you share some .execute code of some specific operator that isn’t working? You can also try to run it’s code separately ouside extension to narrow down which part of isn’t working exactly.

This is the execute function of a class

#Arri 150w Tungsten Fresnel with Default stand
class NEW_OT_Arri150TFresnelOperator (bpy.types.Operator):
    bl_idname = 'my.150tf'
    bl_label = '150w Fresnel'
    
    def execute(self, context):
        
        section = "\\Collection\\"
        objects = ["150w light with default stand"]
        
        directory = tungstendefaultsblendfile + section
        
        for obj in objects:
            filename = obj
            bpy.ops.wm.append(filename=filename, directory=directory)
            
            return{'FINISHED'}

No other operator seems to work when this addon is installed in blender 4.0 but the same addon works well, ( all operators are responsive on 3.0 )

try to run and make bpy.ops.wm.append(filename=filename, directory=directory) working outside this addon, it seems to be some appending issue.

Got it to work finally! :clinking_glasses:
So the problem was two fold,

  1. The my.twoktf operator was not registered like @Andrej found out above
  2. the append was not working because of "" in the code, when i changed backslashes () to forward slashes (/), the path string was interpreted correctly by Blender

Thanks @Andrej for the support!