+class AddRenderMethod(bpy.types.Operator):
+ bl_idname = "material.add_render_method"
+ bl_label = "Add Render Method"
+ bl_description = "Add a new render method to the material"
+
+ def execute(self, context):
+ mat = context.active_object.active_material
+ mat.render_methods.add()
+ mat.active_render_method_index = len(mat.uniforms)-1
+
+ return {"FINISHED"}
+
+class RemoveRenderMethod(bpy.types.Operator):
+ bl_idname = "material.remove_render_method"
+ bl_label = "Remove Render Method"
+ bl_description = "Remove the selected render method from the material"
+
+ def execute(self, context):
+ mat = context.active_object.active_material
+ mat.render_methods.remove(mat.active_render_method_index)
+ mat.active_render_method_index = min(mat.active_render_method_index, len(mat.render_methods)-1)
+
+ return {"FINISHED"}
+