0
$\begingroup$

Code works, but layout (layout.template_modifiers()) with the list of the modifiers are not disabled

import bpy

class LayoutModifier(bpy.types.Panel):
    bl_label = "Layout Modifier"
    bl_space_type = 'PROPERTIES'
    bl_region_type = 'WINDOW'
    bl_context = "object"


    def draw(self, _context):
        layout = self.layout

        layout.template_modifiers()


from bpy.utils import register_class

if __name__ == "__main__":

    register_class(LayoutModifier)
$\endgroup$
4
  • 1
    $\begingroup$ Where is the rest of the relevant code? What does "doesn't work" mean? $\endgroup$ Jan 14 at 16:07
  • $\begingroup$ The code works. It can be run in Blender. A header will appear in the "object" section, but there will be nothing inside this header, although in theory there should be a list with modifiers $\endgroup$
    – user78950
    Jan 14 at 18:31
  • $\begingroup$ I think template_modifiers is broken. There's at least one bug against it: T88655 that I've just confirmed is in 2.96 and 3.0 $\endgroup$ Jan 14 at 21:43
  • 1
    $\begingroup$ I also just confirmed that your class looks just like the code that is used to generate the modifiers panel, except for the add modifiers menu. Oddly when I add the add modifiers menu to your draw routine, I can use it in Object Data to add a modifier but the modifier only shows up in the modifiers tab and not your new panel. $\endgroup$ Jan 14 at 21:54

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.