# Variable in bpy. context

Is it possible to insert a variable into a bpy context?

Like

bpy.types.Scene.propertyNameProp = StringProperty(name="Name", default="", maxlen=10, description="Name of your property")
propName = bpy.context.scene.propertyNameProp
bpy.types.Scene.propName()

• Yes you can, but I think that you are heading into what Drivers are created for. Specifically registering your code within the Driver_Namespace. Click here for a similar solution – Rick Riggs Mar 8 '16 at 15:52