replace bpy.context with context when its passed in.