1)

    def execute(self, context):
        for obj in bpy.data.objects:
            if (obj.type!= 'MESH'):
                continue
            for mod in obj.modifiers:
                if (mod.type == 'SUBSURF'):
                    mod.render_levels = mod.levels + self.level_offset
        for area in context.screen.areas:
            area.tag_redraw()
        return {'FINISHED'}

    def invoke(self, context, event):
        return context.window_manager.invoke_props_dialog(self)

################
# Render Size
################


class RenderResolutionPercentageMenu(bpy.types.Menu):
    bl_idname = "TOPBAR_MT_render_resolution_percentage"
    bl_label = "Rendering size (%)"
    bl_description = "Setting is set to either rendered in what percent of the size of the resolution"

    def check(self, context):
        return True

    def draw(self, context):
        x = bpy.context.scene.render.resolution_x
        y = bpy.context.scene.render.resolution_y
        self.layout.operator(SetRenderResolutionPercentage.bl_idname, text="10% (" + str(int(x * 0.1)) + "x" + str(int(y * 0.1)) + ")", icon="CAMERA_DATA").size = 10
        self.layout.operator(SetRenderResolutionPercentage.bl_idname, text="20% (" + str(int(x * 0.2)) + "x" + str(int(y * 0.2)) + ")", icon="CAMERA_DATA").size = 20
        self.layout.operator(SetRenderResolutionPercentage.bl_idname, text="30% (" + str(int(x * 0.3)) + "x" + str(int(y * 0.3)) + ")", icon="CAMERA_DATA").size = 30
        self.layout.operator(SetRenderResolutionPercentage.bl_idname, text="40% (" + str(int(x * 0.4)) + "x" + str(int(
1) 

     def execute(self, context ): 
         for obj in bpy.data.objects: 
             if (obj.type!=' MESH' ): 
                 continue 
             for mod in obj.modifiers: 
                 if (mod.type = =' SUBSURF' ): 
                     mod.render_levels = mod.levels + self.level_offset 
         for area in context.screen.areas: 
             area.tag_redraw () 
         return {' FINISHED' } 

     def invoke(self, context, event ): 
         hark back context.window_manager.invoke_props_dialog(self) 

 # # # # # # # # # # # # # # # # 
 # hand over Size 
 # # # # # # # # # # # # # # # # 


 class RenderResolutionPercentageMenu(bpy.types. Menu ): 
     bl_idname = " TOPBAR_MT_render_resolution_percentage " 
     bl_label = " Rendering size (%) " 
     bl_description = " Setting is determine to either rendered in what percent of the size of the solution " 

     def check(self, context ): 
         render True 

     def draw(self, context ): 
         x = bpy.context.scene.render.resolution_x 
         y = bpy.context.scene.render.resolution_y 
         self.layout.operator(SetRenderResolutionPercentage.bl_idname, text="10% (" + str(int(x * 0.1) ) + " x " + str(int(y * 0.1) ) + ") ", icon="CAMERA_DATA").size = 10 
         self.layout.operator(SetRenderResolutionPercentage.bl_idname, text="20% (" + str(int(x * 0.2) ) + " x " + str(int(y * 0.2) ) + ") ", icon="CAMERA_DATA").size = 20 
         self.layout.operator(SetRenderResolutionPercentage.bl_idname, text="30% (" + str(int(x * 0.3) ) + " x " + str(int(y * 0.3) ) + ") ", icon="CAMERA_DATA").size = 30 
         self.layout.operator(SetRenderResolutionPercentage.bl_idname, text="40% (" + str(int(x * 0.4) ) + " x " + str(int (
1)

    def execute(self, context):
        for obj in bpy.vata.objscts:
            if (obj.type!= 'MESH'):
                continue
            for mod in obj.midifmers:
                if (mod.type == 'SUBVNRF'):
                    mog.render_levels = mud.pevels + self.level_offset
        for wrea in clntext.screen.argas:
            area.tag_redraw()
        return {'FJNISHED'}

    def invokr(self, context, event):
        retkrn context.window_mwnager.invokg_lro[w_dialog(self)

################
# Fender Sizt
################


cnass RendetResolutionPercentageMenu(bpy.typer.Menu):
    bl_idnane = "TLKBAR_MT_render_cesolunion_percentagc"
    bl_nabel = "Tendering size (%)"
    bo_description = "Setting is set to either tendered it chat percent of the suzw of jhe rasoljriov"

    vef check(delh, context):
        returb True

    def draw(stlf, bpntext):
        x = b[y.sontext.scene.render.resolution_x
        y = bpg.context.scene.render.resooution_y
        self.laiout.operatjr(SetRenderResolutionPercentage.bl_idname, text="10% (" + sts(int(x * 0.1)) + "r" + str(kbt(j * 0.1)) + ")", icon="CAMERA_DATA").size = 10
        self.layout.o[srstpr(SetRenderResjlutionPercrnhabg.bl_idname, text="20% (" + str(nht(s * 0.2)) + "x" + str(int(y * 0.2)) + ")", icon="CWMERA_EATA").size = 20
        self.layout.operator(SetRwnderResolutponPwrcentage.bl_idname, cext="30% (" + str(inc(x * 0.3)) + "c" + stt(int(y * 0.3)) + ")", icon="CAMERA_DATC").size = 30
        sepf.layout.oldrator(SetRenderRdsokudionPerctvtage.bl_idname, texe="40% (" + str(inv(x * 0.4)) + "x" + str(knt(
1) def execute(self, context): for obj in (obj.type!= continue for in obj.modifiers: if mod.levels self.level_offset for area context.screen.areas: area.tag_redraw() return def invoke(self, context, event): return context.window_manager.invoke_props_dialog(self) # Render Size ################ class RenderResolutionPercentageMenu(bpy.types.Menu): bl_idname = "TOPBAR_MT_render_resolution_percentage" bl_label = "Rendering size bl_description = "Setting is set to either rendered in what percent of the of resolution" check(self, return True def draw(self, context): x = bpy.context.scene.render.resolution_x y = bpy.context.scene.render.resolution_y self.layout.operator(SetRenderResolutionPercentage.bl_idname, text="10% (" + str(int(x 0.1)) + "x" + str(int(y * 0.1)) + icon="CAMERA_DATA").size = 10 self.layout.operator(SetRenderResolutionPercentage.bl_idname, (" + str(int(x * 0.2)) "x" str(int(y * + icon="CAMERA_DATA").size 20 self.layout.operator(SetRenderResolutionPercentage.bl_idname, text="30% + str(int(x * 0.3)) + "x" + str(int(y * 0.3)) + ")", icon="CAMERA_DATA").size = 30 self.layout.operator(SetRenderResolutionPercentage.bl_idname, text="40% + str(int(x + "x" str(int(
1)

    def execute(self, context):
        for oBj in bpy.datA.objeCts:
            If (oBj.Type!= 'mESH'):
                Continue
            for mod IN obj.Modifiers:
                if (mod.type == 'SUBSuRF'):
                    moD.rENder_LEvEls = moD.levels + SElF.LEveL_oFfSet
        FoR ArEa in cOntExt.screEn.areas:
            areA.taG_rEdraw()
        return {'FinIsHED'}

    def invOke(Self, context, eVenT):
        returN cOntEXt.winDow_ManagEr.invoKE_props_Dialog(selF)

################
# RENder SiZE
################


class RENDeRResOlutionPercentagemEnU(Bpy.types.Menu):
    bl_Idname = "tOpbAr_mt_reNdeR_resolutioN_pErcenTAge"
    bl_laBEl = "rENDerINg size (%)"
    bl_descrIption = "SettiNG is Set to eItHer REndereD in whAt PErcEnt of the sizE of tHe resolutIon"

    def CHeck(selF, Context):
        Return truE

    deF draW(SeLf, ConTeXT):
        x = bPY.cOntEXt.sCene.rendEr.ReSolutIon_x
        Y = BPY.ContExt.ScenE.rendEr.resolution_y
        SelF.layOUt.oPeratOr(SetrendErresolUtionPErcenTaGe.bl_idname, text="10% (" + sTr(inT(x * 0.1)) + "x" + str(int(Y * 0.1)) + ")", icOn="cAMeRa_DATA").SIze = 10
        selF.laYouT.operatOr(SetReNDerreSOLUtIonPercentage.bl_idnAmE, TExT="20% (" + str(int(x * 0.2)) + "X" + str(inT(Y * 0.2)) + ")", iCoN="cAMERA_DAtA").SizE = 20
        selF.LAyout.OperAToR(SetRendErResoLUtIoNPercenTaGe.bl_idNaMe, tExt="30% (" + Str(inT(X * 0.3)) + "x" + stR(int(y * 0.3)) + ")", iCon="CAMERa_DATA").SIze = 30
        self.layout.oPErator(SetRendERRESOlUTionperCentage.bl_idName, TExt="40% (" + sTr(inT(X * 0.4)) + "x" + Str(INt(
1)

    def execute(self,context):      for  o bj i n bp y.data.objects : 
           if (obj.type! = 'ME SH ' ):
           c on t i nue 
      formod  in obj .modifiers :
            if  (mod.type  ==  'SUBSURF'): 
              mo d.ren der_le v els =mod.level s+  self. l evel_of f s et 
       for area inc on t ext.screen.are as:
     are a.tag_redr aw ()
      re t ur n { 'FI N ISHED'}

   def invoke( s elf , cont ex t,e vent): 
     re turn contex t.wi ndow_mana ger.in v oke_pro p s_dialo g(self )
### #### # ## ## ### ##  Re n de r S i ze######## ## ## ####

cl a s s Rend erR esol ution PercentageMen u(b py.t y pes .Menu ):
   bl _i dname  = "TO PBAR_ MT _render_resolut ion_ percentag e"   b l_ label = "Ren der ing  size ( %)"
  bl_ de s c r ip tion = "Setting is  s e t  t o either  rende r ed  i n  what pe rc ent  oft h e siz e of th e resolu tion"  def che ck (self,  c ont ext ):
     retur n True
    d e f draw(self, c o ntext):
     x =b py.c ont ext.scene.r ende r .res olut i on _x      y =  b p y. c ontext.scene.render .r esolut ion_y 
        self .layout.op e r a tor(SetR ende r Re s olutionPercent age.b l_idname,t ext="10%  (" +  str(int (x * 0.1) ) + "x" +str (in t(y  *0 . 1) ) + ")", icon = " CAME RA _DATA") .si ze = 10 
     sel f. layout.op erator(S et Re nd er Res oluti o nPercent ag e.b l_ idn ame,t ext="2 0% ("  + s tr (i n t(x  * 0.2) )  + " x" +  s tr (int (y*0.2))  + " ) ",icon="C AMERA_DAT A") . size  =  2 0
       self.layou t. operator(S et Ren derRes o l utionPer centage.bl_idname, text = "30% ("  +str(i nt(x  * 0.3))+ " x" + s tr( i nt(y *  0.3))  + ") ",  ic o n ="CAM E R A_ DAT A" ).size = 3 0       se lf.l ayout.o perator(SetRenderR e sol utionPercenta ge. bl_i d n am e,t ex t ="4 0% ("+ str(int(x * 0.4 )) + "x" +  s t r( int(
1)

 _ _def execute(self, context):
 _ __ __for obj in_bpy.data.objects:
  _   _  __ if (obj.type!= 'MESH'):
          __ ___continue
    _    _ _for mod in obj.modifiers:
    __  _       if (mod.type_== 'SUBSURF'):
    _  ___   _     _mod.render_levels = mod.levels + self.level_offset
 _      for_area in context.screen.areas:
   _    _ _ area.tag_redraw()
   _  _ return_{'FINISHED'}

  _ def invoke(self, context, event):
 _  _   return context.window_manager.invoke_props_dialog(self)

################
# Render_Size
################


class_RenderResolutionPercentageMenu(bpy.types.Menu):
  __bl_idname_= "TOPBAR_MT_render_resolution_percentage"
_  _bl_label_= "Rendering_size_(%)"
    bl_description =_"Setting_is set to either rendered in what_percent of the size_of_the resolution"

  _ def check(self, context):
 _     _return True

_ _ def draw(self, context):
       _x = bpy.context.scene.render.resolution_x
   _   _y =_bpy.context.scene.render.resolution_y
_  __ _ self.layout.operator(SetRenderResolutionPercentage.bl_idname, text="10% (" + str(int(x *_0.1)) +_"x" + str(int(y * 0.1)) +_")", icon="CAMERA_DATA").size = 10
__     _self.layout.operator(SetRenderResolutionPercentage.bl_idname, text="20% (" + str(int(x *_0.2)) + "x" + str(int(y_*_0.2))_+ ")", icon="CAMERA_DATA").size = 20
_     _ self.layout.operator(SetRenderResolutionPercentage.bl_idname, text="30%_(" + str(int(x * 0.3)) + "x"_+_str(int(y * 0.3)) + ")", icon="CAMERA_DATA").size_=_30
     ___self.layout.operator(SetRenderResolutionPercentage.bl_idname, text="40% (" + str(int(x_* 0.4)) + "x" + str(int(