I want to display the modifier panel in the Npanel,
I have achieved the panel like this, but I cant't display the added modifiers:
This is my code:
import bpy
from bpy.types import Panel
from bl_ui.properties_data_modifier import DATA_PT_modifiers
class HelloWorldPanelA(bpy.types.Panel):
"""Creates a Panel in the Object properties window"""
bl_label = "Hello World Panel"
bl_idname = "OBJECT_PT_helloA"
bl_space_type = 'VIEW_3D'
bl_region_type = 'UI'
bl_category= 'NewTab'
def draw(self, context):
mp = DATA_PT_modifiers(context)
layout = self.layout
ob = context.object
row = layout.row()
layout.operator_menu_enum("object.modifier_add", "type")
layout.template_modifiers()
def register():
bpy.utils.register_class(HelloWorldPanelA)
def unregister():
bpy.utils.unregister_class(HelloWorldPanelA)
if __name__ == "__main__":
register()
if I add a "Bevel modifier", it will got an error "Panel type 'MOD_PT_Bevel' not found."
So how to display the added modifiers? Thank you very much