1

I'd like to create a footer where there's no "FOOTER" bl_region_type for example in the 3D view, it seems impossible to do in python? is this hardcoded in C++?

import bpy

class HELLO_PT_world(bpy.types.Header): bl_idname = "HELLO_PT_world" bl_label = "HelloWorld" bl_space_type = "VIEW_3D" bl_region_type = "FOOTER"

def draw(self, context):
    self.layout.label(text="Is This Working?")


print("Trying to register") from bpy.utils import register_class register_class(HELLO_PT_world) #-> RuntimeError: Error: Region not found in space type # Well I want to add a new region in this space... Duh...

Fox
  • 1,892
  • 18
  • 48

1 Answers1

1

Easily checked.

The type of region available to each of the area types is probably in the docs somewhere, however it is easily checked using the python console.

With a 3d view area as the variable area (C.screens.areas[3] in this example)

>>> area
bpy.data.screens['Scripting.001']...Area

>>> area.type 'VIEW_3D'

>>> for region in area.regions: ... region.type ...
'TOOL_HEADER' 'HEADER' 'TOOLS' 'UI' 'WINDOW'

if it's not there, it's not possible with python.

Somewhat related https://blender.stackexchange.com/a/161773/15543

batFINGER
  • 84,216
  • 10
  • 108
  • 233