Issue with custom properties

Hi I am having issues with custom properties in my script. The script works in my testing scene, but not when I run it in another scene (for example if I want to use it in production). Its like the custom property isnt being initialised by the script.
It looks like the custom properties arn’t being initialised.

Any ideas? Sorry for the length of the code, I can provide explanation if needed.
This is the error:

Traceback (most recent call last):
  File "[path]\explode_bake.py", line 206, in draw
    section2 = layout.column(align=True)
KeyError: 'bpy_struct[key]: key "ObjList" not found'


location: <unknown location>:-1

Here’s my script:
http://pastebin.com/7EutA0pz

You’re not registering the properties right, either put the call to initSceneProperties() in register() or place the property registration directly there:

http://pastebin.com/dBKxu03M

Thanks for that, I wasn’t sure where to actually do the initialisation so that helps, however I’m still having the issue. For some reason the property isn’t being found (same error as above but at line 183).

I checked if I find the properties through the python console and I can, so it seems they’re being correctly created. Maybe it’s something wrong with the way I try to get it’s value?

It’s indeed the way you try to access it, what you ask Blender to get for you is an ID property with name “ObjList”, which does not exist.

What you want is bpy.context.scene.ObjList, not bpy.context.scene[“ObjList”].

Awesome, thanks a lot!