this someone didn't get committed
authorJoseph Eagar <joeedh@gmail.com>
Sun, 29 Nov 2009 00:45:40 +0000 (00:45 +0000)
committerJoseph Eagar <joeedh@gmail.com>
Sun, 29 Nov 2009 00:45:40 +0000 (00:45 +0000)
97 files changed:
1  2 
release/scripts/io/engine_render_pov.py
release/scripts/io/export_3ds.py
release/scripts/io/export_fbx.py
release/scripts/io/export_mdd.py
release/scripts/io/export_obj.py
release/scripts/io/export_ply.py
release/scripts/io/export_x3d.py
release/scripts/io/import_anim_bvh.py
release/scripts/io/import_scene_3ds.py
release/scripts/io/import_scene_obj.py
release/scripts/io/netrender/__init__.py
release/scripts/io/netrender/client.py
release/scripts/io/netrender/operators.py
release/scripts/io/netrender/slave.py
release/scripts/io/netrender/ui.py
release/scripts/io/netrender/utils.py
release/scripts/modules/bpy/__init__.py
release/scripts/modules/bpy/ops.py
release/scripts/modules/bpy/utils.py
release/scripts/modules/bpy_ext/Mesh.py
release/scripts/modules/bpy_ext/Object.py
release/scripts/modules/bpy_ext/__init__.py
release/scripts/modules/bpy_types.py
release/scripts/modules/dynamic_menu.py
release/scripts/modules/rna_prop_ui.py
release/scripts/op/add_mesh_torus.py
release/scripts/op/mesh.py
release/scripts/op/mesh_skin.py
release/scripts/op/presets.py
release/scripts/op/uvcalc_smart_project.py
release/scripts/op/vertexpaint_dirt.py
release/scripts/op/wm.py
release/scripts/presets/cloth/cotton.py
release/scripts/presets/cloth/denim.py
release/scripts/presets/cloth/leather.py
release/scripts/presets/cloth/rubber.py
release/scripts/presets/cloth/silk.py
release/scripts/presets/render/HDTV_1080p.py
release/scripts/presets/render/HDTV_720p.py
release/scripts/presets/render/TV_NTSC.py
release/scripts/presets/render/TV_PAL.py
release/scripts/presets/render/TV_PAL_16_colon_9.py
release/scripts/presets/sss/Apple.py
release/scripts/presets/sss/Chicken.py
release/scripts/presets/sss/Cream.py
release/scripts/presets/sss/Ketchup.py
release/scripts/presets/sss/Marble.py
release/scripts/presets/sss/Potato.py
release/scripts/presets/sss/Skim_Milk.py
release/scripts/presets/sss/Skin1.py
release/scripts/presets/sss/Skin2.py
release/scripts/presets/sss/Whole_Milk.py
release/scripts/templates/gamelogic.py
release/scripts/templates/gamelogic_basic.py
release/scripts/templates/gamelogic_module.py
release/scripts/templates/operator.py
release/scripts/templates/operator_simple.py
release/scripts/ui/properties_data_armature.py
release/scripts/ui/properties_data_bone.py
release/scripts/ui/properties_data_camera.py
release/scripts/ui/properties_data_curve.py
release/scripts/ui/properties_data_empty.py
release/scripts/ui/properties_data_lamp.py
release/scripts/ui/properties_data_lattice.py
release/scripts/ui/properties_data_mesh.py
release/scripts/ui/properties_data_metaball.py
release/scripts/ui/properties_data_modifier.py
release/scripts/ui/properties_data_text.py
release/scripts/ui/properties_game.py
release/scripts/ui/properties_material.py
release/scripts/ui/properties_object.py
release/scripts/ui/properties_object_constraint.py
release/scripts/ui/properties_particle.py
release/scripts/ui/properties_physics_cloth.py
release/scripts/ui/properties_physics_common.py
release/scripts/ui/properties_physics_field.py
release/scripts/ui/properties_physics_fluid.py
release/scripts/ui/properties_physics_smoke.py
release/scripts/ui/properties_physics_softbody.py
release/scripts/ui/properties_render.py
release/scripts/ui/properties_scene.py
release/scripts/ui/properties_texture.py
release/scripts/ui/properties_world.py
release/scripts/ui/space_buttons.py
release/scripts/ui/space_console.py
release/scripts/ui/space_filebrowser.py
release/scripts/ui/space_image.py
release/scripts/ui/space_info.py
release/scripts/ui/space_logic.py
release/scripts/ui/space_node.py
release/scripts/ui/space_outliner.py
release/scripts/ui/space_sequencer.py
release/scripts/ui/space_text.py
release/scripts/ui/space_time.py
release/scripts/ui/space_userpref.py
release/scripts/ui/space_view3d.py
release/scripts/ui/space_view3d_toolbar.py

index 510d921d64bb1bccc23b63b61c2e227591aa2cad,510d921d64bb1bccc23b63b61c2e227591aa2cad..ddca6eb43dc21003008571e9f5c8affb9ad1695b
@@@ -285,7 -285,7 +285,7 @@@ def write_pov(filename, scene=None, inf
                for ob in sel:
                        ob_num+= 1
                        
--                      if ob.type in ('LAMP', 'CAMERA', 'EMPTY', 'META'):
++                      if ob.type in ('LAMP', 'CAMERA', 'EMPTY', 'META', 'ARMATURE'):
                                continue
                        
                        me = ob.data
@@@ -722,26 -722,26 +722,26 @@@ class PovrayRender(bpy.types.RenderEngi
        def _export(self, scene):
                import tempfile
                
--              self.temp_file_in = tempfile.mktemp(suffix='.pov')
--              self.temp_file_out = tempfile.mktemp(suffix='.tga')
--              self.temp_file_ini = tempfile.mktemp(suffix='.ini')
++              self._temp_file_in = tempfile.mktemp(suffix='.pov')
++              self._temp_file_out = tempfile.mktemp(suffix='.tga')
++              self._temp_file_ini = tempfile.mktemp(suffix='.ini')
                '''
--              self.temp_file_in = '/test.pov'
--              self.temp_file_out = '/test.tga'
--              self.temp_file_ini = '/test.ini'
++              self._temp_file_in = '/test.pov'
++              self._temp_file_out = '/test.tga'
++              self._temp_file_ini = '/test.ini'
                '''
                
                def info_callback(txt):
                        self.update_stats("", "POVRAY: " + txt)
                        
--              write_pov(self.temp_file_in, scene, info_callback)
++              write_pov(self._temp_file_in, scene, info_callback)
                
        def _render(self):
                
--              try:            os.remove(self.temp_file_out) # so as not to load the old file
++              try:            os.remove(self._temp_file_out) # so as not to load the old file
                except: pass
                
--              write_pov_ini(self.temp_file_ini, self.temp_file_in, self.temp_file_out)
++              write_pov_ini(self._temp_file_ini, self._temp_file_in, self._temp_file_out)
                
                print ("***-STARTING-***")
                
                                pov_binary = winreg.QueryValueEx(regKey, 'Home')[0] + '\\bin\\pvengine'
                        
                if 1:
--                      self.process = subprocess.Popen([pov_binary, self.temp_file_ini]) # stdout=subprocess.PIPE, stderr=subprocess.PIPE
++                      self._process = subprocess.Popen([pov_binary, self._temp_file_ini]) # stdout=subprocess.PIPE, stderr=subprocess.PIPE
                else:
                        # This works too but means we have to wait until its done
--                      os.system('%s %s' % (pov_binary, self.temp_file_ini))
++                      os.system('%s %s' % (pov_binary, self._temp_file_ini))
                
                print ("***-DONE-***")
        
        def _cleanup(self):
--              for f in (self.temp_file_in, self.temp_file_ini, self.temp_file_out):
++              for f in (self._temp_file_in, self._temp_file_ini, self._temp_file_out):
                        try:            os.remove(f)
                        except: pass
                
                y= int(r.resolution_y*r.resolution_percentage*0.01)
  
                # Wait for the file to be created
--              while not os.path.exists(self.temp_file_out):
++              while not os.path.exists(self._temp_file_out):
                        if self.test_break():
--                              try:            self.process.terminate()
++                              try:            self._process.terminate()
                                except: pass
                                break
                        
--                      if self.process.poll() != None:
++                      if self._process.poll() != None:
                                self.update_stats("", "POVRAY: Failed")
                                break
                        
                        time.sleep(self.DELAY)
                
--              if os.path.exists(self.temp_file_out):
++              if os.path.exists(self._temp_file_out):
                        
                        self.update_stats("", "POVRAY: Rendering")
                        
                                result = self.begin_result(0, 0, x, y)
                                lay = result.layers[0]
                                # possible the image wont load early on.
--                              try:            lay.load_from_file(self.temp_file_out)
++                              try:            lay.load_from_file(self._temp_file_out)
                                except: pass
                                self.end_result(result)
                        
                        while True:
                                
                                # test if povray exists
--                              if self.process.poll() != None:
++                              if self._process.poll() != None:
                                        update_image();
                                        break
                                
                                # user exit
                                if self.test_break():
--                                      try:            self.process.terminate()
++                                      try:            self._process.terminate()
                                        except: pass
                                        
                                        break
                                
                                # Would be nice to redirect the output
--                              # stdout_value, stderr_value = self.process.communicate() # locks
++                              # stdout_value, stderr_value = self._process.communicate() # locks
                                
                                
                                # check if the file updated
--                              new_size = os.path.getsize(self.temp_file_out)
++                              new_size = os.path.getsize(self._temp_file_out)
                                
                                if new_size != prev_size:
                                        update_image()
@@@ -884,7 -884,7 +884,7 @@@ class RENDER_PT_povray_radiosity(Render
        def draw_header(self, context):
                scene = context.scene
  
--              self.layout.itemR(scene, "pov_radio_enable", text="")
++              self.layout.prop(scene, "pov_radio_enable", text="")
  
        def draw(self, context):
                layout = self.layout
                split = layout.split()
                
                col = split.column()
--              col.itemR(scene, "pov_radio_count", text="Rays")
--              col.itemR(scene, "pov_radio_recursion_limit", text="Recursions")
++              col.prop(scene, "pov_radio_count", text="Rays")
++              col.prop(scene, "pov_radio_recursion_limit", text="Recursions")
                col = split.column()
--              col.itemR(scene, "pov_radio_error_bound", text="Error")
++              col.prop(scene, "pov_radio_error_bound", text="Error")
                
--              layout.itemR(scene, "pov_radio_display_advanced")
++              layout.prop(scene, "pov_radio_display_advanced")
                
                if scene.pov_radio_display_advanced:
                        split = layout.split()
                
                        col = split.column()
--                      col.itemR(scene, "pov_radio_adc_bailout", slider=True)
--                      col.itemR(scene, "pov_radio_gray_threshold", slider=True)
--                      col.itemR(scene, "pov_radio_low_error_factor", slider=True)
++                      col.prop(scene, "pov_radio_adc_bailout", slider=True)
++                      col.prop(scene, "pov_radio_gray_threshold", slider=True)
++                      col.prop(scene, "pov_radio_low_error_factor", slider=True)
  
                        col = split.column()
--                      col.itemR(scene, "pov_radio_brightness")
--                      col.itemR(scene, "pov_radio_minimum_reuse", text="Min Reuse")
--                      col.itemR(scene, "pov_radio_nearest_count")
++                      col.prop(scene, "pov_radio_brightness")
++                      col.prop(scene, "pov_radio_minimum_reuse", text="Min Reuse")
++                      col.prop(scene, "pov_radio_nearest_count")
  
                        split = layout.split()
                
                        col = split.column()
--                      col.itemL(text="Estimation Influence:")
--                      col.itemR(scene, "pov_radio_media")
--                      col.itemR(scene, "pov_radio_normal")
++                      col.label(text="Estimation Influence:")
++                      col.prop(scene, "pov_radio_media")
++                      col.prop(scene, "pov_radio_normal")
                        
                        col = split.column()
--                      col.itemR(scene, "pov_radio_always_sample")
++                      col.prop(scene, "pov_radio_always_sample")
  
  bpy.types.register(RENDER_PT_povray_radiosity)
index a96abb502154e80afd0680d11d529450b9eaea90,a96abb502154e80afd0680d11d529450b9eaea90..5f585ac43361c35b2cd690b7ded2ad30106c847b
@@@ -1123,7 -1123,7 +1123,7 @@@ class Export3DS(bpy.types.Operator)
  
        
        def execute(self, context):
--              save_3ds(self.path, context)
++              save_3ds(self.properties.path, context)
                return ('FINISHED',)
        
        def invoke(self, context, event):
                return ('RUNNING_MODAL',)
        
        def poll(self, context): # Poll isnt working yet
--              print("Poll")
                return context.active_object != None
  
  bpy.ops.add(Export3DS)
@@@ -1142,6 -1142,6 +1141,6 @@@ import dynamic_men
  
  def menu_func(self, context):
      default_path = bpy.data.filename.replace(".blend", ".3ds")
--    self.layout.item_stringO(Export3DS.bl_idname, "path", default_path, text="Autodesk 3DS...")
++    self.layout.operator(Export3DS.bl_idname, text="Autodesk 3DS...").path = default_path
  
  menu_item = dynamic_menu.add(bpy.types.INFO_MT_file_export, menu_func)
index ec2d2791b5233dd35afadc97fa4d2163aed4705c,ec2d2791b5233dd35afadc97fa4d2163aed4705c..e5bf01b0d9d1a327e5848f4474798fcab6a87a3d
@@@ -498,8 -498,8 +498,7 @@@ def write(filename, batch_objects = Non
                        # not public
                        pose = fbxArm.blenObject.pose
  #                     pose = fbxArm.blenObject.getPose()
--                      self.__pose_bone =              pose.pose_channels[self.blenName]
--#                     self.__pose_bone =              pose.bones[self.blenName]
++                      self.__pose_bone =              pose.bones[self.blenName]
                        
                        # store a list if matricies here, (poseMatrix, head, tail)
                        # {frame:posematrix, frame:posematrix, ...}
@@@ -3394,36 -3394,36 +3393,36 @@@ class ExportFBX(bpy.types.Operator)
                return context.active_object != None
        
        def execute(self, context):
--              if not self.path:
++              if not self.properties.path:
                        raise Exception("path not set")
  
                GLOBAL_MATRIX = mtx4_identity
--              GLOBAL_MATRIX[0][0] = GLOBAL_MATRIX[1][1] = GLOBAL_MATRIX[2][2] = self._SCALE
--              if self._XROT90: GLOBAL_MATRIX = GLOBAL_MATRIX * mtx4_x90n
--              if self._YROT90: GLOBAL_MATRIX = GLOBAL_MATRIX * mtx4_y90n
--              if self._ZROT90: GLOBAL_MATRIX = GLOBAL_MATRIX * mtx4_z90n
++              GLOBAL_MATRIX[0][0] = GLOBAL_MATRIX[1][1] = GLOBAL_MATRIX[2][2] = self.properties._SCALE
++              if self.properties._XROT90: GLOBAL_MATRIX = GLOBAL_MATRIX * mtx4_x90n
++              if self.properties._YROT90: GLOBAL_MATRIX = GLOBAL_MATRIX * mtx4_y90n
++              if self.properties._ZROT90: GLOBAL_MATRIX = GLOBAL_MATRIX * mtx4_z90n
                        
--              write(self.path,
++              write(self.properties.path,
                          None, # XXX
                          context,
--                        self.EXP_OBS_SELECTED,
--                        self.EXP_MESH,
--                        self.EXP_MESH_APPLY_MOD,
--#                       self.EXP_MESH_HQ_NORMALS,
--                        self.EXP_ARMATURE,
--                        self.EXP_LAMP,
--                        self.EXP_CAMERA,
--                        self.EXP_EMPTY,
--                        self.EXP_IMAGE_COPY,
++                        self.properties.EXP_OBS_SELECTED,
++                        self.properties.EXP_MESH,
++                        self.properties.EXP_MESH_APPLY_MOD,
++#                       self.properties.EXP_MESH_HQ_NORMALS,
++                        self.properties.EXP_ARMATURE,
++                        self.properties.EXP_LAMP,
++                        self.properties.EXP_CAMERA,
++                        self.properties.EXP_EMPTY,
++                        self.properties.EXP_IMAGE_COPY,
                          GLOBAL_MATRIX,
--                        self.ANIM_ENABLE,
--                        self.ANIM_OPTIMIZE,
--                        self.ANIM_OPTIMIZE_PRECISSION,
--                        self.ANIM_ACTION_ALL,
--                        self.BATCH_ENABLE,
--                        self.BATCH_GROUP,
--                        self.BATCH_FILE_PREFIX,
--                        self.BATCH_OWN_DIR)           
++                        self.properties.ANIM_ENABLE,
++                        self.properties.ANIM_OPTIMIZE,
++                        self.properties.ANIM_OPTIMIZE_PRECISSION,
++                        self.properties.ANIM_ACTION_ALL,
++                        self.properties.BATCH_ENABLE,
++                        self.properties.BATCH_GROUP,
++                        self.properties.BATCH_FILE_PREFIX,
++                        self.properties.BATCH_OWN_DIR)                
  
                return ('FINISHED',)
        
@@@ -3467,7 -3467,7 +3466,7 @@@ import dynamic_men
  
  def menu_func(self, context):
      default_path = bpy.data.filename.replace(".blend", ".fbx")
--    self.layout.item_stringO(ExportFBX.bl_idname, "path", default_path, text="Autodesk FBX...")
++    self.layout.operator(ExportFBX.bl_idname, text="Autodesk FBX...").path = default_path
  
  menu_item = dynamic_menu.add(bpy.types.INFO_MT_file_export, menu_func)
  
index 2b3e1681449fc043fdc9705ca6020f17bfdc8663,2b3e1681449fc043fdc9705ca6020f17bfdc8663..c160b94e5462d5c05cda628ac0a9f69b77ed395e
@@@ -156,11 -156,11 +156,10 @@@ class ExportMDD(bpy.types.Operator)
  
      # get first scene to get min and max properties for frames, fps
  
--    sce = bpy.data.scenes[bpy.data.scenes.keys()[0]]
--    minframe = sce.rna_type.properties["current_frame"].soft_min
--    maxframe = sce.rna_type.properties["current_frame"].soft_max
--    minfps = sce.render_data.rna_type.properties["fps"].soft_min
--    maxfps = sce.render_data.rna_type.properties["fps"].soft_max
++    minframe = 1
++    maxframe = 300000
++    minfps = 1
++    maxfps = 120
  
      # List of operator properties, the attributes will be assigned
      # to the class instance from the operator settings before calling.
          return (ob and ob.type=='MESH')
  
      def execute(self, context):
--        if not self.path:
++        if not self.properties.path:
              raise Exception("filename not set")
--        write(self.path, context.scene, context.active_object,
--            self.start_frame, self.end_frame, self.fps )
++        write(self.properties.path, context.scene, context.active_object,
++            self.properties.start_frame, self.properties.end_frame, self.properties.fps )
          return ('FINISHED',)
      
      def invoke(self, context, event):
@@@ -192,10 -192,10 +191,9 @@@ import dynamic_men
  
  def menu_func(self, context):
      default_path = bpy.data.filename.replace(".blend", ".mdd")
--    self.layout.item_stringO(ExportMDD.bl_idname, "path", default_path, text="Vertex Keyframe Animation (.mdd)...")
++    self.layout.operator(ExportMDD.bl_idname, text="Vertex Keyframe Animation (.mdd)...").path = default_path
  
  menu_item = dynamic_menu.add(bpy.types.INFO_MT_file_export, menu_func)
  
  if __name__=='__main__':
--    #Blender.Window.FileSelector(mdd_export_ui, 'EXPORT MDD', sys.makename(ext='.mdd'))
--    bpy.ops.EXPORT_OT_mdd(path="/tmp/test.mdd")
++    bpy.ops.export.mdd(path="/tmp/test.mdd")
index 2c77cbd702afe17dad133b89a68ceb7a30b1198e,2c77cbd702afe17dad133b89a68ceb7a30b1198e..0a9085c15f189b637e6273083b9e5da656683464
@@@ -485,10 -485,10 +485,10 @@@ def write(filename, objects, scene
                                        newob = bpy.data.add_object('MESH', 'temp_object')
                                        newob.data = me
                                        # if we forget to set Object.data - crash
--                                      scene.add_object(newob)
++                                      scene.objects.link(newob)
                                        newob.convert_to_triface(scene)
                                        # mesh will still be there
--                                      scene.remove_object(newob)
++                                      scene.objects.unlink(newob)
                        '''
                        
                        # Make our own list so it can be sorted to reduce context switching
@@@ -972,24 -972,24 +972,24 @@@ class ExportOBJ(bpy.types.Operator)
        
        def execute(self, context):
  
--              do_export(self.path, context,
--                                EXPORT_TRI=self.use_triangles,
--                                EXPORT_EDGES=self.use_edges,
--                                EXPORT_NORMALS=self.use_normals,
--                                EXPORT_NORMALS_HQ=self.use_hq_normals,
--                                EXPORT_UV=self.use_uvs,
--                                EXPORT_MTL=self.use_materials,
--                                EXPORT_COPY_IMAGES=self.copy_images,
--                                EXPORT_APPLY_MODIFIERS=self.use_modifiers,
--                                EXPORT_ROTX90=self.use_rotate90,
--                                EXPORT_BLEN_OBS=self.use_blen_objects,
--                                EXPORT_GROUP_BY_OB=self.group_by_object,
--                                EXPORT_GROUP_BY_MAT=self.group_by_material,
--                                EXPORT_KEEP_VERT_ORDER=self.keep_vertex_order,
--                                EXPORT_POLYGROUPS=self.use_vertex_groups,
--                                EXPORT_CURVE_AS_NURBS=self.use_nurbs,
--                                EXPORT_SEL_ONLY=self.use_selection,
--                                EXPORT_ALL_SCENES=self.use_all_scenes)
++              do_export(self.properties.path, context,
++                                EXPORT_TRI=self.properties.use_triangles,
++                                EXPORT_EDGES=self.properties.use_edges,
++                                EXPORT_NORMALS=self.properties.use_normals,
++                                EXPORT_NORMALS_HQ=self.properties.use_hq_normals,
++                                EXPORT_UV=self.properties.use_uvs,
++                                EXPORT_MTL=self.properties.use_materials,
++                                EXPORT_COPY_IMAGES=self.properties.copy_images,
++                                EXPORT_APPLY_MODIFIERS=self.properties.use_modifiers,
++                                EXPORT_ROTX90=self.properties.use_rotate90,
++                                EXPORT_BLEN_OBS=self.properties.use_blen_objects,
++                                EXPORT_GROUP_BY_OB=self.properties.group_by_object,
++                                EXPORT_GROUP_BY_MAT=self.properties.group_by_material,
++                                EXPORT_KEEP_VERT_ORDER=self.properties.keep_vertex_order,
++                                EXPORT_POLYGROUPS=self.properties.use_vertex_groups,
++                                EXPORT_CURVE_AS_NURBS=self.properties.use_nurbs,
++                                EXPORT_SEL_ONLY=self.properties.use_selection,
++                                EXPORT_ALL_SCENES=self.properties.use_all_scenes)
  
                return ('FINISHED',)
        
@@@ -1008,7 -1008,7 +1008,7 @@@ import dynamic_men
  
  def menu_func(self, context):
      default_path = bpy.data.filename.replace(".blend", ".obj")
--    self.layout.item_stringO(ExportOBJ.bl_idname, "path", default_path, text="Wavefront (.obj)...")
++    self.layout.operator(ExportOBJ.bl_idname, text="Wavefront (.obj)...").path = default_path
  
  menu_item = dynamic_menu.add(bpy.types.INFO_MT_file_export, menu_func)
  
index 99fa3233278105c10e2cdf14b78f267b94bbbb94,99fa3233278105c10e2cdf14b78f267b94bbbb94..50cb3134f83982f8f8f4a7f062b2059ff473e753
@@@ -274,14 -274,14 +274,14 @@@ class ExportPLY(bpy.types.Operator)
        def execute(self, context):
                # print("Selected: " + context.active_object.name)
  
--              if not self.path:
++              if not self.properties.path:
                        raise Exception("filename not set")
                        
--              write(self.path, context.scene, context.active_object,\
--                      EXPORT_APPLY_MODIFIERS = self.use_modifiers,
--                      EXPORT_NORMALS = self.use_normals,
--                      EXPORT_UV = self.use_uvs,
--                      EXPORT_COLORS = self.use_colors,
++              write(self.properties.path, context.scene, context.active_object,\
++                      EXPORT_APPLY_MODIFIERS = self.properties.use_modifiers,
++                      EXPORT_NORMALS = self.properties.use_normals,
++                      EXPORT_UV = self.properties.use_uvs,
++                      EXPORT_COLORS = self.properties.use_colors,
                )
  
                return ('FINISHED',)
@@@ -298,7 -298,7 +298,7 @@@ import dynamic_men
  
  def menu_func(self, context):
      default_path = bpy.data.filename.replace(".blend", ".ply")
--    self.layout.item_stringO(ExportPLY.bl_idname, "path", default_path, text="Stanford (.ply)...")
++    self.layout.operator(ExportPLY.bl_idname, text="Stanford (.ply)...").path = default_path
  
  menu_item = dynamic_menu.add(bpy.types.INFO_MT_file_export, menu_func)
  
index c8c5f71f6fff3513de437a76cf3c5af061b510a5,c8c5f71f6fff3513de437a76cf3c5af061b510a5..8546d8619f4cbbc458911e3056f336067d97b0ad
@@@ -1230,7 -1230,7 +1230,7 @@@ class ExportX3D(bpy.types.Operator)
        
        
        def execute(self, context):
--              x3d_export(self.path, context, self.apply_modifiers, self.triangulate, self.compress)
++              x3d_export(self.properties.path, context, self.properties.apply_modifiers, self.properties.triangulate, self.properties.compress)
                return ('FINISHED',)
        
        def invoke(self, context, event):
@@@ -1244,7 -1244,7 +1244,7 @@@ import dynamic_men
  
  def menu_func(self, context):
      default_path = bpy.data.filename.replace(".blend", ".x3d")
--    self.layout.item_stringO(ExportX3D.bl_idname, "path", default_path, text="X3D Extensible 3D (.x3d)...")
++    self.layout.operator(ExportX3D.bl_idname, text="X3D Extensible 3D (.x3d)...").path = default_path
  
  menu_item = dynamic_menu.add(bpy.types.INFO_MT_file_export, menu_func)
  
index dff9a3ac0c8eabdf53f0be280073e2ad2b486881,dff9a3ac0c8eabdf53f0be280073e2ad2b486881..65f397f681a956cf9696ae0f99d9f4ee0d0e6296
@@@ -460,7 -460,7 +460,7 @@@ def bvh_node_dict2armature(context, bvh
        bpy.ops.object.mode_set(mode='POSE', toggle=False)
        
        pose= arm_ob.pose
--      pose_bones= pose.pose_channels
++      pose_bones= pose.bones
        
        
        if ROT_STYLE=='NATIVE':
@@@ -863,7 -863,7 +863,7 @@@ class BvhImporter(bpy.types.Operator)
        def execute(self, context):
                # print("Selected: " + context.active_object.name)
  
--              read_bvh(context, self.path)
++              read_bvh(context, self.properties.path)
  
                return ('FINISHED',)
        
@@@ -877,5 -877,5 +877,5 @@@ bpy.ops.add(BvhImporter
  
  
  import dynamic_menu
--menu_func = lambda self, context: self.layout.itemO(BvhImporter.bl_idname, text="Motion Capture (.bvh)...")
++menu_func = lambda self, context: self.layout.operator(BvhImporter.bl_idname, text="Motion Capture (.bvh)...")
  menu_item = dynamic_menu.add(bpy.types.INFO_MT_file_import, menu_func)
index cd351ccb99e20bf863e5e933a4fbd7965ddd3656,cd351ccb99e20bf863e5e933a4fbd7965ddd3656..57b93d3c683bde965b6b6c629653e33830dbf5d9
@@@ -465,7 -465,7 +465,7 @@@ def process_next_chunk(file, previous_c
                        # bmesh.transform(contextMatrix)
                        ob = bpy.data.add_object("MESH", tempName)
                        ob.data = bmesh
--                      SCN.add_object(ob)
++                      SCN.objects.link(ob)
  #                     ob = SCN_OBJECTS.new(bmesh, tempName)
                        '''
                        if contextMatrix_tx:
  
                        ob = bpy.data.add_object("LAMP", "Lamp")
                        ob.data = bpy.data.add_lamp("Lamp")
--                      SCN.add_object(ob)
++                      SCN.objects.link(ob)
                        
                        contextLamp[1]= ob.data
  #                     contextLamp[1]= bpy.data.lamps.new()
@@@ -1156,7 -1156,7 +1156,7 @@@ class IMPORT_OT_autodesk_3ds(bpy.types.
  #     apply_matrix = BoolProperty(name="Transform Fix", description="Workaround for object transformations importing incorrectly", default=False),
        
        def execute(self, context):
--              load_3ds(self.path, context, 0.0, False, False)
++              load_3ds(self.properties.path, context, 0.0, False, False)
                return ('FINISHED',)
        
        def invoke(self, context, event):
  bpy.ops.add(IMPORT_OT_autodesk_3ds)
  
  import dynamic_menu
--menu_func = lambda self, context: self.layout.itemO(IMPORT_OT_autodesk_3ds.bl_idname, text="3D Studio (.3ds)...")
++menu_func = lambda self, context: self.layout.operator(IMPORT_OT_autodesk_3ds.bl_idname, text="3D Studio (.3ds)...")
  menu_item = dynamic_menu.add(bpy.types.INFO_MT_file_import, menu_func)
  
  # NOTES:
index d1b29a3024da96f7e61d48cfeae118f05f1e109f,d1b29a3024da96f7e61d48cfeae118f05f1e109f..0ef0083b44d928e51fadb86e0d26bcdd99156169
@@@ -864,7 -864,7 +864,7 @@@ def create_mesh(scn, new_objects, has_n
        
        ob= bpy.data.add_object("MESH", "Mesh")
        ob.data= me
--      scn.add_object(ob)
++      scn.objects.link(ob)
  #     ob= scn.objects.new(me)
        new_objects.append(ob)
  
@@@ -1601,18 -1601,18 +1601,18 @@@ class IMPORT_OT_obj(bpy.types.Operator)
        def execute(self, context):
                # print("Selected: " + context.active_object.name)
  
--              load_obj(self.path,
++              load_obj(self.properties.path,
                                 context,
--                               self.CLAMP_SIZE,
--                               self.CREATE_FGONS,
--                               self.CREATE_SMOOTH_GROUPS,
--                               self.CREATE_EDGES,
--                               self.SPLIT_OBJECTS,
--                               self.SPLIT_GROUPS,
--                               self.SPLIT_MATERIALS,
--                               self.ROTATE_X90,
--                               self.IMAGE_SEARCH,
--                               self.POLYGROUPS)
++                               self.properties.CLAMP_SIZE,
++                               self.properties.CREATE_FGONS,
++                               self.properties.CREATE_SMOOTH_GROUPS,
++                               self.properties.CREATE_EDGES,
++                               self.properties.SPLIT_OBJECTS,
++                               self.properties.SPLIT_GROUPS,
++                               self.properties.SPLIT_MATERIALS,
++                               self.properties.ROTATE_X90,
++                               self.properties.IMAGE_SEARCH,
++                               self.properties.POLYGROUPS)
  
                return ('FINISHED',)
        
@@@ -1626,7 -1626,7 +1626,7 @@@ bpy.ops.add(IMPORT_OT_obj
  
  
  import dynamic_menu
--menu_func = lambda self, context: self.layout.itemO(IMPORT_OT_obj.bl_idname, text="Wavefront (.obj)...")
++menu_func = lambda self, context: self.layout.operator(IMPORT_OT_obj.bl_idname, text="Wavefront (.obj)...")
  menu_item = dynamic_menu.add(bpy.types.INFO_MT_file_import, menu_func)
  
  
index be3d25d83feb31d2efd0f354c09e907e38b55335,be3d25d83feb31d2efd0f354c09e907e38b55335..9e48164a5ebad8814749a9855a1ac59be01052bf
  
  # This directory is a Python package.
  
--import model
--import operators
--import client
--import slave
--import master
--import master_html
--import utils
--import balancing
--import ui
++from netrender import model
++from netrender import operators
++from netrender import client
++from netrender import slave
++from netrender import master
++from netrender import master_html
++from netrender import utils
++from netrender import balancing
++from netrender import ui
  
--# store temp data in bpy module
--
--import bpy
--
--bpy.netrender_jobs = []
--bpy.netrender_slaves = []
--bpy.netrender_blacklist = []
++jobs = []
++slaves = []
++blacklist = []
  
index 9cb176972e60d7df2833899aac71cc10248d5766,9cb176972e60d7df2833899aac71cc10248d5766..8fdedde3f52fa05ff38cb88d6b46f297b42abdf6
@@@ -21,6 -21,6 +21,7 @@@ import sys, os, r
  import http, http.client, http.server, urllib
  import subprocess, shutil, time, hashlib
  
++import netrender
  import netrender.model
  import netrender.slave as slave
  import netrender.master as master
@@@ -113,7 -113,7 +114,7 @@@ def clientSendJob(conn, scene, anim = F
        # LIBRARIES
        ###########################
        for lib in bpy.data.libraries:
--              job.addFile(bpy.utils.expandpath(lib_path))
++              job.addFile(bpy.utils.expandpath(lib.filename))
                
        ###########################
        # IMAGES
        
        job.name = job_name
        
--      for slave in scene.network_render.slaves_blacklist:
++      for slave in netrender.blacklist:
                job.blacklist.append(slave.id)
        
        job.chunks = netsettings.chunks
@@@ -200,14 -200,14 +201,14 @@@ class NetworkRenderEngine(bpy.types.Ren
  
  
        def render_slave(self, scene):
--              slave.render_slave(self, scene)
++              slave.render_slave(self, scene.network_render)
        
        def render_client(self, scene):
                netsettings = scene.network_render
                self.update_stats("", "Network render client initiation")
                
                
--              conn = clientConnection(scene)
++              conn = clientConnection(netsettings.server_address, netsettings.server_port)
                
                if conn:
                        # Sending file
                        conn.close()
  
  def compatible(module):
--      exec("import " + module)
--      module = eval(module)
--      for member in dir(module):
--              subclass = getattr(module, member)
++      module = __import__(module)
++      for subclass in module.__dict__.values():
                try:            subclass.COMPAT_ENGINES.add('NET_RENDER')
                except: pass
        del module
index 8f727ca96b3c1317eba8fedd29d0accbf5442d13,8f727ca96b3c1317eba8fedd29d0accbf5442d13..b5b16b1fb9cb49ab0c5e77d9863b6c22d254ab4a
@@@ -21,6 -21,6 +21,7 @@@ import sys, o
  import http, http.client, http.server, urllib, socket
  import webbrowser
  
++import netrender
  from netrender.utils import *
  import netrender.client as client
  import netrender.model
@@@ -36,8 -36,8 +37,9 @@@ class RENDER_OT_netclientanim(bpy.types
        
        def execute(self, context):
                scene = context.scene
++              netsettings = scene.network_render
                
--              conn = clientConnection(scene)
++              conn = clientConnection(netsettings.server_address, netsettings.server_port)
                
                if conn:
                        # Sending file
@@@ -62,8 -62,8 +64,9 @@@ class RENDER_OT_netclientsend(bpy.types
        
        def execute(self, context):
                scene = context.scene
++              netsettings = scene.network_render
                
--              conn = clientConnection(scene)
++              conn = clientConnection(netsettings.server_address, netsettings.server_port)
                
                if conn:
                        # Sending file
@@@ -86,7 -86,7 +89,7 @@@ class RENDER_OT_netclientstatus(bpy.typ
        
        def execute(self, context):
                netsettings = context.scene.network_render
--              conn = clientConnection(context.scene)
++              conn = clientConnection(netsettings.server_address, netsettings.server_port)
  
                if conn:
                        conn.request("GET", "/status")
                        while(len(netsettings.jobs) > 0):
                                netsettings.jobs.remove(0)
                        
--                      bpy.netrender_jobs = []
++                      netrender.jobs = []
                        
                        for j in jobs:
--                              bpy.netrender_jobs.append(j)
++                              netrender.jobs.append(j)
                                netsettings.jobs.add()
                                job = netsettings.jobs[-1]
                                
@@@ -130,8 -130,8 +133,8 @@@ class RENDER_OT_netclientblacklistslave
                if netsettings.active_slave_index >= 0:
                        
                        # deal with data
--                      slave = bpy.netrender_slaves.pop(netsettings.active_slave_index)
--                      bpy.netrender_blacklist.append(slave)
++                      slave = netrender.slaves.pop(netsettings.active_slave_index)
++                      netrender.blacklist.append(slave)
                        
                        # deal with rna
                        netsettings.slaves_blacklist.add()
@@@ -160,8 -160,8 +163,8 @@@ class RENDER_OT_netclientwhitelistslave
                if netsettings.active_blacklisted_slave_index >= 0:
                        
                        # deal with data
--                      slave = bpy.netrender_blacklist.pop(netsettings.active_blacklisted_slave_index)
--                      bpy.netrender_slaves.append(slave)
++                      slave = netrender.blacklist.pop(netsettings.active_blacklisted_slave_index)
++                      netrender.slaves.append(slave)
                        
                        # deal with rna
                        netsettings.slaves.add()
@@@ -187,7 -187,7 +190,7 @@@ class RENDER_OT_netclientslaves(bpy.typ
        
        def execute(self, context):
                netsettings = context.scene.network_render
--              conn = clientConnection(context.scene)
++              conn = clientConnection(netsettings.server_address, netsettings.server_port)
                
                if conn:
                        conn.request("GET", "/slaves")
                        while(len(netsettings.slaves) > 0):
                                netsettings.slaves.remove(0)
                        
--                      bpy.netrender_slaves = []
++                      netrender.slaves = []
                        
                        for s in slaves:
--                              for i in range(len(bpy.netrender_blacklist)):
--                                      slave = bpy.netrender_blacklist[i]
++                              for i in range(len(netrender.blacklist)):
++                                      slave = netrender.blacklist[i]
                                        if slave.id == s.id:
--                                              bpy.netrender_blacklist[i] = s
++                                              netrender.blacklist[i] = s
                                                netsettings.slaves_blacklist[i].name = s.name
                                                break
                                else:
--                                      bpy.netrender_slaves.append(s)
++                                      netrender.slaves.append(s)
                                        
                                        netsettings.slaves.add()
                                        slave = netsettings.slaves[-1]
@@@ -233,10 -233,10 +236,10 @@@ class RENDER_OT_netclientcancel(bpy.typ
                
        def execute(self, context):
                netsettings = context.scene.network_render
--              conn = clientConnection(context.scene)
++              conn = clientConnection(netsettings.server_address, netsettings.server_port)
                
                if conn:
--                      job = bpy.netrender_jobs[netsettings.active_job_index]
++                      job = netrender.jobs[netsettings.active_job_index]
                        
                        conn.request("POST", "/cancel", headers={"job-id":job.id})
                        
@@@ -261,7 -261,7 +264,7 @@@ class RENDER_OT_netclientcancelall(bpy.
                
        def execute(self, context):
                netsettings = context.scene.network_render
--              conn = clientConnection(context.scene)
++              conn = clientConnection(netsettings.server_address, netsettings.server_port)
                
                if conn:
                        conn.request("POST", "/clear")
@@@ -291,10 -291,10 +294,10 @@@ class netclientdownload(bpy.types.Opera
                netsettings = context.scene.network_render
                rd = context.scene.render_data
                
--              conn = clientConnection(context.scene)
++              conn = clientConnection(netsettings.server_address, netsettings.server_port)
                
                if conn:
--                      job = bpy.netrender_jobs[netsettings.active_job_index]
++                      job = netrender.jobs[netsettings.active_job_index]
                        
                        for frame in job.frames:
                                client.requestResult(conn, job.id, frame.number)
@@@ -332,26 -332,26 +335,16 @@@ class netclientscan(bpy.types.Operator)
                return True
                
        def execute(self, context):
--              netsettings = context.scene.network_render
--              
--              try:
--                      s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
--                      s.setsockopt(socket.SOL_SOCKET, socket.SO_BROADCAST, 1)
--                      s.settimeout(30)
--      
--                      s.bind(('', 8000))
--                      
--                      buf, address = s.recvfrom(64)
--                      
--                      print("received:", buf)
--                      
--                      netsettings.server_address = address[0]
--                      netsettings.server_port = int(str(buf, encoding='utf8'))
--              except socket.timeout:
--                      print("no server info")
++              address, port = clientScan()
++
++              if address:
++                      scene = context.scene
++                      netsettings = scene.network_render
++                      netsettings.server_address = address
++                      netsettings.server_port = port
                
                return ('FINISHED',)
--      
++
        def invoke(self, context, event):
                return self.execute(context)
  
@@@ -369,7 -369,7 +362,7 @@@ class netclientweb(bpy.types.Operator)
                
                
                # open connection to make sure server exists
--              conn = clientConnection(context.scene)
++              conn = clientConnection(netsettings.server_address, netsettings.server_port)
                
                if conn:
                        conn.close()
index 882af76202bcfbe6e3d990704cfe3b732501cc87,882af76202bcfbe6e3d990704cfe3b732501cc87..74fc44e23d27797f74e5186578be97d776cc738f
@@@ -23,6 -23,6 +23,8 @@@ import subprocess, tim
  from netrender.utils import *
  import netrender.model
  
++BLENDER_PATH = sys.argv[0]
++
  CANCEL_POLL_SPEED = 2
  MAX_TIMEOUT = 10
  INCREMENT_TIMEOUT = 1
@@@ -85,13 -85,13 +87,12 @@@ def testFile(conn, job_id, slave_id, JO
        return job_full_path
  
  
--def render_slave(engine, scene):
--      netsettings = scene.network_render
++def render_slave(engine, netsettings):
        timeout = 1
        
        engine.update_stats("", "Network render node initiation")
        
--      conn = clientConnection(scene)
++      conn = clientConnection(netsettings.server_address, netsettings.server_port)
        
        if conn:
                conn.request("POST", "/slave", repr(slave_Info().serialize()))
                                                frame_args += ["-f", str(frame.number)]
                                        
                                        val = SetErrorMode()
--                                      process = subprocess.Popen([sys.argv[0], "-b", job_full_path, "-o", JOB_PREFIX + "######", "-E", "BLENDER_RENDER", "-F", "MULTILAYER"] + frame_args, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
++                                      process = subprocess.Popen([BLENDER_PATH, "-b", job_full_path, "-o", JOB_PREFIX + "######", "-E", "BLENDER_RENDER", "-F", "MULTILAYER"] + frame_args, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
                                        RestoreErrorMode(val)
                                elif job.type == netrender.model.JOB_PROCESS:
                                        command = job.frames[0].command
                                                return
                        
                conn.close()
++
++if __name__ == "__main__":
++      pass
index df75c175caea7eba2eeebf13556a7f0312a69760,df75c175caea7eba2eeebf13556a7f0312a69760..081d9952871cc860e66ec9648e1fffc35f8c7815
@@@ -21,6 -21,6 +21,7 @@@ import sys, o
  import http, http.client, http.server, urllib
  import subprocess, shutil, time, hashlib
  
++import netrender
  import netrender.slave as slave
  import netrender.master as master
  
@@@ -62,15 -62,15 +63,15 @@@ class RENDER_PT_network_settings(Render
                split = layout.split()
                
                col = split.column()
--              col.itemR(scene.network_render, "mode")
--              col.itemR(scene.network_render, "path")
--              col.itemR(scene.network_render, "server_address")
--              col.itemR(scene.network_render, "server_port")
++              col.prop(scene.network_render, "mode")
++              col.prop(scene.network_render, "path")
++              col.prop(scene.network_render, "server_address")
++              col.prop(scene.network_render, "server_port")
                
                if scene.network_render.mode == "RENDER_MASTER":
--                      col.itemR(scene.network_render, "server_broadcast")
++                      col.prop(scene.network_render, "server_broadcast")
                else:
--                      col.itemO("render.netclientscan", icon="ICON_FILE_REFRESH", text="")
++                      col.operator("render.netclientscan", icon="ICON_FILE_REFRESH", text="")
  
  @rnaType
  class RENDER_PT_network_job(RenderButtonsPanel):
                split = layout.split()
                
                col = split.column()
--              col.itemO("render.netclientanim", icon='ICON_RENDER_ANIMATION')
--              col.itemO("render.netclientsend", icon="ICON_FILE_BLEND")
--              col.itemO("render.netclientweb", icon="ICON_QUESTION")
--              col.itemR(scene.network_render, "job_name")
++              col.operator("render.netclientanim", icon='ICON_RENDER_ANIMATION')
++              col.operator("render.netclientsend", icon="ICON_FILE_BLEND")
++              col.operator("render.netclientweb", icon="ICON_QUESTION")
++              col.prop(scene.network_render, "job_name")
                row = col.row()
--              row.itemR(scene.network_render, "priority")
--              row.itemR(scene.network_render, "chunks")
++              row.prop(scene.network_render, "priority")
++              row.prop(scene.network_render, "chunks")
  
  @rnaType
  class RENDER_PT_network_slaves(RenderButtonsPanel):
                row.template_list(netsettings, "slaves", netsettings, "active_slave_index", rows=2)
  
                sub = row.column(align=True)
--              sub.itemO("render.netclientslaves", icon="ICON_FILE_REFRESH", text="")
--              sub.itemO("render.netclientblacklistslave", icon="ICON_ZOOMOUT", text="")
++              sub.operator("render.netclientslaves", icon="ICON_FILE_REFRESH", text="")
++              sub.operator("render.netclientblacklistslave", icon="ICON_ZOOMOUT", text="")
                
--              if len(bpy.netrender_slaves) == 0 and len(netsettings.slaves) > 0:
++              if len(netrender.slaves) == 0 and len(netsettings.slaves) > 0:
                        while(len(netsettings.slaves) > 0):
                                netsettings.slaves.remove(0)
                
                if netsettings.active_slave_index >= 0 and len(netsettings.slaves) > 0:
--                      layout.itemS()
++                      layout.separator()
                        
--                      slave = bpy.netrender_slaves[netsettings.active_slave_index]
++                      slave = netrender.slaves[netsettings.active_slave_index]
  
--                      layout.itemL(text="Name: " + slave.name)
--                      layout.itemL(text="Address: " + slave.address[0])
--                      layout.itemL(text="Seen: " + time.ctime(slave.last_seen))
--                      layout.itemL(text="Stats: " + slave.stats)
++                      layout.label(text="Name: " + slave.name)
++                      layout.label(text="Address: " + slave.address[0])
++                      layout.label(text="Seen: " + time.ctime(slave.last_seen))
++                      layout.label(text="Stats: " + slave.stats)
  
  @rnaType
  class RENDER_PT_network_slaves_blacklist(RenderButtonsPanel):
                row.template_list(netsettings, "slaves_blacklist", netsettings, "active_blacklisted_slave_index", rows=2)
  
                sub = row.column(align=True)
--              sub.itemO("render.netclientwhitelistslave", icon="ICON_ZOOMOUT", text="")
++              sub.operator("render.netclientwhitelistslave", icon="ICON_ZOOMOUT", text="")
  
--              if len(bpy.netrender_blacklist) == 0 and len(netsettings.slaves_blacklist) > 0:
++              if len(netrender.blacklist) == 0 and len(netsettings.slaves_blacklist) > 0:
                        while(len(netsettings.slaves_blacklist) > 0):
                                netsettings.slaves_blacklist.remove(0)
                
                if netsettings.active_blacklisted_slave_index >= 0 and len(netsettings.slaves_blacklist) > 0:
--                      layout.itemS()
++                      layout.separator()
                        
--                      slave = bpy.netrender_blacklist[netsettings.active_blacklisted_slave_index]
++                      slave = netrender.blacklist[netsettings.active_blacklisted_slave_index]
  
--                      layout.itemL(text="Name: " + slave.name)
--                      layout.itemL(text="Address: " + slave.address[0])
--                      layout.itemL(text="Seen: " + slave.last_seen)
--                      layout.itemL(text="Stats: " + time.ctime(slave.stats))
++                      layout.label(text="Name: " + slave.name)
++                      layout.label(text="Address: " + slave.address[0])
++                      layout.label(text="Seen: " + time.ctime(slave.last_seen))
++                      layout.label(text="Stats: " + slave.stats)
  
  @rnaType
  class RENDER_PT_network_jobs(RenderButtonsPanel):
                row.template_list(netsettings, "jobs", netsettings, "active_job_index", rows=2)
  
                sub = row.column(align=True)
--              sub.itemO("render.netclientstatus", icon="ICON_FILE_REFRESH", text="")
--              sub.itemO("render.netclientcancel", icon="ICON_ZOOMOUT", text="")
--              sub.itemO("render.netclientcancelall", icon="ICON_PANEL_CLOSE", text="")
--              sub.itemO("render.netclientdownload", icon='ICON_RENDER_ANIMATION', text="")
++              sub.operator("render.netclientstatus", icon="ICON_FILE_REFRESH", text="")
++              sub.operator("render.netclientcancel", icon="ICON_ZOOMOUT", text="")
++              sub.operator("render.netclientcancelall", icon="ICON_PANEL_CLOSE", text="")
++              sub.operator("render.netclientdownload", icon='ICON_RENDER_ANIMATION', text="")
  
--              if len(bpy.netrender_jobs) == 0 and len(netsettings.jobs) > 0:
++              if len(netrender.jobs) == 0 and len(netsettings.jobs) > 0:
                        while(len(netsettings.jobs) > 0):
                                netsettings.jobs.remove(0)
                
                if netsettings.active_job_index >= 0 and len(netsettings.jobs) > 0:
--                      layout.itemS()
++                      layout.separator()
                        
--                      job = bpy.netrender_jobs[netsettings.active_job_index]
++                      job = netrender.jobs[netsettings.active_job_index]
  
--                      layout.itemL(text="Name: %s" % job.name)
--                      layout.itemL(text="Length: %04i" % len(job))
--                      layout.itemL(text="Done: %04i" % job.results[DONE])
--                      layout.itemL(text="Error: %04i" % job.results[ERROR])
++                      layout.label(text="Name: %s" % job.name)
++                      layout.label(text="Length: %04i" % len(job))
++                      layout.label(text="Done: %04i" % job.results[DONE])
++                      layout.label(text="Error: %04i" % job.results[ERROR])
  
  @rnaType
  class NetRenderSettings(bpy.types.IDPropertyGroup):
index a16043dd3cb1719f043e65ee060c6578afc6a2ad,a16043dd3cb1719f043e65ee060c6578afc6a2ad..e549e872398bac407d54d02272ac85eb988da863
  #
  # ##### END GPL LICENSE BLOCK #####
  
--import bpy
  import sys, os
  import re
--import http, http.client, http.server, urllib
++import http, http.client, http.server, urllib, socket
  import subprocess, shutil, time, hashlib
  
  import netrender.model
  
++try:
++  import bpy
++except:
++  bpy = None
++
  VERSION = b"0.5"
  
  # Jobs status
@@@ -39,27 -39,27 +43,48 @@@ DONE = 
  ERROR = 3
  
  STATUS_TEXT = {
--                                                              QUEUED: "Queued",
--                                                              DISPATCHED: "Dispatched",
--                                                              DONE: "Done",
--                                                              ERROR: "Error"
--                                                      }
++              QUEUED: "Queued",
++              DISPATCHED: "Dispatched",
++              DONE: "Done",
++              ERROR: "Error"
++              }
  
  def rnaType(rna_type):
--      bpy.types.register(rna_type)
++      if bpy: bpy.types.register(rna_type)
        return rna_type
  
  def rnaOperator(rna_op):
--      bpy.ops.add(rna_op)
++      if bpy: bpy.ops.add(rna_op)
        return rna_op
  
--def clientConnection(scene):
--              netsettings = scene.network_render
++def clientScan():
++      try:
++              s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
++              s.setsockopt(socket.SOL_SOCKET, socket.SO_BROADCAST, 1)
++              s.settimeout(30)
++
++              s.bind(('', 8000))
++              
++              buf, address = s.recvfrom(64)
                
--              if netsettings.server_address == "[default]":
--                      bpy.ops.render.netclientscan()
++              print("received:", buf)
++              
++              address = address[0]
++              port = int(str(buf, encoding='utf8'))
++              return (address, port)
++      except socket.timeout:
++              print("no server info")
++              return ("", 8000) # return default values
++
++def clientConnection(address, port):
++              if address == "[default]":
++#            calling operator from python is fucked, scene isn't in context
++#                     if bpy:
++#                             bpy.ops.render.netclientscan()
++#                     else:
++                              address, port = clientScan()
                
--              conn = http.client.HTTPConnection(netsettings.server_address, netsettings.server_port)
++              conn = http.client.HTTPConnection(address, port)
                
                if clientVerifyVersion(conn):
                        return conn
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..39b8fd340ba5e3ac27d47cfa8dfc9269650c2941
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,85 @@@
++# ##### BEGIN GPL LICENSE BLOCK #####
++#
++#  This program is free software; you can redistribute it and/or
++#  modify it under the terms of the GNU General Public License
++#  as published by the Free Software Foundation; either version 2
++#  of the License, or (at your option) any later version.
++#
++#  This program is distributed in the hope that it will be useful,
++#  but WITHOUT ANY WARRANTY; without even the implied warranty of
++#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
++#  GNU General Public License for more details.
++#
++#  You should have received a copy of the GNU General Public License
++#  along with this program; if not, write to the Free Software Foundation,
++#  Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
++#
++# ##### END GPL LICENSE BLOCK #####
++
++# internal blender C module
++import _bpy
++from _bpy import types, props
++
++data = _bpy.data
++context = _bpy.context
++
++# python modules
++from bpy import utils
++
++from bpy import ops as _ops_module
++
++# fake operator module
++ops = _ops_module.ops_fake_module
++
++def load_scripts(reload_scripts=False):
++    import os
++    import sys
++    import traceback
++
++    def test_import(module_name):
++        try:
++            return __import__(module_name)
++        except:
++            traceback.print_exc()
++            return None
++
++    for base_path in utils.script_paths():
++        for path_subdir in ("ui", "op", "io"):
++            path = os.path.join(base_path, path_subdir)
++            sys.path.insert(0, path)
++            for f in sorted(os.listdir(path)):
++                if f.endswith(".py"):
++                    # python module
++                    mod = test_import(f[0:-3])
++                elif "." not in f:
++                    # python package
++                    mod = test_import(f)
++                else:
++                    mod = None
++
++                if reload_scripts and mod:
++                    print("Reloading:", mod)
++                    reload(mod)
++
++def _main():
++
++    # a bit nasty but this prevents help() and input() from locking blender
++    # Ideally we could have some way for the console to replace sys.stdin but
++    # python would lock blender while waiting for a return value, not easy :|
++    import sys
++    sys.stdin = None
++
++    if "-d" in sys.argv and False: # Enable this to measure startup speed
++        import cProfile
++        cProfile.run('import bpy; bpy.load_scripts()', 'blender.prof')
++
++        import pstats
++        p = pstats.Stats('blender.prof')
++        p.sort_stats('cumulative').print_stats(100)
++
++    else:
++        load_scripts()
++
++_main()
++
++
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..5b3009db2bf4ad3c6dccefbe00cb8ac5b3cba30c
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,195 @@@
++# ##### BEGIN GPL LICENSE BLOCK #####
++#
++#  This program is free software; you can redistribute it and/or
++#  modify it under the terms of the GNU General Public License
++#  as published by the Free Software Foundation; either version 2
++#  of the License, or (at your option) any later version.
++#
++#  This program is distributed in the hope that it will be useful,
++#  but WITHOUT ANY WARRANTY; without even the implied warranty of
++#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
++#  GNU General Public License for more details.
++#
++#  You should have received a copy of the GNU General Public License
++#  along with this program; if not, write to the Free Software Foundation,
++#  Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
++#
++# ##### END GPL LICENSE BLOCK #####
++
++# <pep8-80 compliant>
++
++# for slightly faster access
++from _bpy import ops as ops_module
++
++op_add = ops_module.add
++op_remove = ops_module.remove
++op_dir = ops_module.dir
++op_call = ops_module.call
++op_as_string = ops_module.as_string
++op_get_rna = ops_module.get_rna
++
++# Keep in sync with WM_types.h
++context_dict = {
++    'INVOKE_DEFAULT': 0,
++    'INVOKE_REGION_WIN': 1,
++    'INVOKE_AREA': 2,
++    'INVOKE_SCREEN': 3,
++    'EXEC_DEFAULT': 4,
++    'EXEC_REGION_WIN': 5,
++    'EXEC_AREA': 6,
++    'EXEC_SCREEN': 7,
++}
++
++
++class bpy_ops(object):
++    '''
++    Fake module like class.
++
++     bpy.ops
++    '''
++
++    def __getattr__(self, module):
++        '''
++        gets a bpy.ops submodule
++        '''
++        if module.startswith('__'):
++            raise AttributeError(module)
++        return bpy_ops_submodule(module)
++
++    def add(self, pyop):
++        op_add(pyop)
++
++    def remove(self, pyop):
++        op_remove(pyop)
++
++    def __dir__(self):
++
++        submodules = set()
++
++        # add this classes functions
++        for id_name in dir(self.__class__):
++            if not id_name.startswith('__'):
++                submodules.add(id_name)
++
++        for id_name in op_dir():
++            id_split = id_name.split('_OT_', 1)
++
++            if len(id_split) == 2:
++                submodules.add(id_split[0].lower())
++            else:
++                submodules.add(id_split[0])
++
++        return list(submodules)
++
++    def __repr__(self):
++        return "<module like class 'bpy.ops'>"
++
++
++class bpy_ops_submodule(object):
++    '''
++    Utility class to fake submodules.
++
++    eg. bpy.ops.object
++    '''
++    __keys__ = ('module',)
++
++    def __init__(self, module):
++        self.module = module
++
++    def __getattr__(self, func):
++        '''
++        gets a bpy.ops.submodule function
++        '''
++        if func.startswith('__'):
++            raise AttributeError(func)
++        return bpy_ops_submodule_op(self.module, func)
++
++    def __dir__(self):
++
++        functions = set()
++
++        module_upper = self.module.upper()
++
++        for id_name in op_dir():
++            id_split = id_name.split('_OT_', 1)
++            if len(id_split) == 2 and module_upper == id_split[0]:
++                functions.add(id_split[1])
++
++        return list(functions)
++
++    def __repr__(self):
++        return "<module like class 'bpy.ops.%s'>" % self.module
++
++
++class bpy_ops_submodule_op(object):
++    '''
++    Utility class to fake submodule operators.
++
++    eg. bpy.ops.object.somefunc
++    '''
++
++    __keys__ = ('module', 'func')
++
++
++    def _get_doc(self):
++        return op_as_string(self.idname())
++
++    __doc__ = property(_get_doc)
++
++    def __init__(self, module, func):
++        self.module = module
++        self.func = func
++
++    def idname(self):
++        # submod.foo -> SUBMOD_OT_foo
++        return self.module.upper() + '_OT_' + self.func
++
++    def __call__(self, *args, **kw):
++
++        # Get the operator from blender
++        if len(args) > 2:
++            raise ValueError("1 or 2 args execution context is supported")
++
++        C_dict = None
++
++        if args:
++
++            C_exec = 'EXEC_DEFAULT'
++
++            if len(args) == 2:
++                C_exec = args[0]
++                C_dict = args[1]
++            else:
++                if type(args[0]) != str:
++                    C_dict = args[0]
++                else:
++                    C_exec = args[0]
++
++            try:
++                context = context_dict[C_exec]
++            except:
++                raise ValueError("Expected a single context argument in: " + \
++                 str(list(context_dict.keys())))
++
++            if len(args) == 2:
++                C_dict = args[1]
++
++            return op_call(self.idname(), C_dict, kw, context)
++
++        else:
++            return op_call(self.idname(), C_dict, kw)
++
++    def get_rna(self):
++        '''
++        currently only used for 'bl_rna'
++        '''
++        return op_get_rna(self.idname())
++
++    def __repr__(self): # useful display, repr(op)
++        return op_as_string(self.idname())
++
++    def __str__(self): # used for print(...)
++        return "<function bpy.ops.%s.%s at 0x%x'>" % \
++                (self.module, self.func, id(self))
++
++ops_fake_module = bpy_ops()
index 5a73364c1b1593b80aef38943b320912559ee810,5a73364c1b1593b80aef38943b320912559ee810..a2c6f764e3b214d3585ee6fe14e1da2051a2146b
@@@ -25,6 -25,6 +25,27 @@@ def expandpath(path)
  
      return path
  
--import types
--bpy.utils = types.ModuleType("bpy.utils")
--bpy.utils.expandpath = expandpath
++# base scripts
++_scripts = os.path.join(os.path.dirname(__file__), os.path.pardir, os.path.pardir)
++_scripts = (os.path.normpath(_scripts), )
++
++def script_paths(*args):
++    if not args:
++        return _scripts
++
++    subdir = os.path.join(*args)
++    script_paths = []
++    for path in _scripts:
++        script_paths.append(os.path.join(path, subdir))
++
++    return script_paths
++
++
++_presets = os.path.join(_scripts[0], "presets") # FIXME - multiple paths 
++
++def preset_paths(subdir):
++      '''
++      Returns a list of paths for a spesific preset.
++      '''
++      
++      return (os.path.join(_presets, subdir), )
diff --cc release/scripts/modules/bpy_ext/Mesh.py
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391,e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000
deleted file mode 100644,100644
+++ /dev/null
diff --cc release/scripts/modules/bpy_ext/Object.py
index ccd9da414d872259025d40c5d185f4ee14d5323e,e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000
deleted file mode 100644,100644
+++ /dev/null
diff --cc release/scripts/modules/bpy_ext/__init__.py
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391,e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000
deleted file mode 100644,100644
+++ /dev/null
index 23862c5c840f6bceec9e08d8aeee088e9477b43c,23862c5c840f6bceec9e08d8aeee088e9477b43c..70fecec0235caf319521ef29971cd63dfe755299
  #  Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
  #
  # ##### END GPL LICENSE BLOCK #####
++from _bpy import types as bpy_types
  
--import bpy
--
--StructRNA = bpy.types.Struct.__bases__[0]
--# StructRNA = bpy.types.Struct
++StructRNA = bpy_types.Struct.__bases__[0]
++# StructRNA = bpy_types.Struct
  
  
  class Context(StructRNA):
--    
++
      def copy(self):
          new_context = {}
++        generic_keys = StructRNA.__dict__.keys()
          for item in dir(self):
--            if item not in StructRNA.__dict__ and item != "id_data":
++            if item not in generic_keys:
                  new_context[item] = getattr(self, item)
--            
++
          return new_context
  
  
--class Object(bpy.types.ID):
++class Object(bpy_types.ID):
  
      def _get_children(self):
++        import bpy
          return [child for child in bpy.data.objects if child.parent == self]
  
      children = property(_get_children)
@@@ -45,8 -45,8 +46,8 @@@ def ord_ind(i1,i2)
      if i1<i2: return i1,i2
      return i2,i1
  
--class Mesh(bpy.types.ID):
--    
++class Mesh(bpy_types.ID):
++
      def _get_edge_keys(self):
          return [edge_key for face in self.faces for edge_key in face.edge_keys]
  
@@@ -91,3 -91,3 +92,65 @@@ class MeshFace(StructRNA)
          return ord_ind(verts[0], verts[1]),  ord_ind(verts[1], verts[2]),  ord_ind(verts[2], verts[3]),  ord_ind(verts[3], verts[0])
  
      edge_keys = property(_get_edge_keys)
++
++
++import collections
++class OrderedMeta(type):
++    def __init__(cls, name, bases, attributes):
++        super(OrderedMeta, cls).__init__(name, bases, attributes)
++        cls.order = list(attributes.keys())
++    def __prepare__(name, bases, **kwargs):
++        return collections.OrderedDict()
++
++
++# Only defined so operators members can be used by accessing self.order
++class Operator(StructRNA, metaclass=OrderedMeta):
++    pass
++
++
++class Menu(StructRNA):
++    
++    def path_menu(self, searchpaths, operator):
++        layout = self.layout
++        # hard coded to set the operators 'path' to the filename.
++        
++        import os
++
++        def path_to_name(f):
++            ''' Only capitalize all lowercase names, mixed case use them as is.
++            '''
++            f_base = os.path.splitext(f)[0]
++            
++            # string replacements
++            f_base = f_base.replace("_colon_", ":")
++            
++            f_base = f_base.replace("_", " ")
++            
++            if f_base.lower() == f_base:
++                return ' '.join([w[0].upper() + w[1:] for w in f_base.split()])
++            else:
++                return f_base
++
++        layout = self.layout
++
++        # collect paths
++        files = []
++        for path in searchpaths:
++            files.extend([(f, os.path.join(path, f)) for f in os.listdir(path)])
++
++        files.sort()
++
++        for f, path in files:
++
++            if f.startswith("."):
++                continue
++
++            layout.operator(operator, text=path_to_name(f)).path = path
++    
++    def draw_preset(self, context):
++        '''Define these on the subclass
++         - preset_operator
++         - preset_subdir
++        '''
++        import bpy
++        self.path_menu(bpy.utils.preset_paths(self.preset_subdir), self.preset_operator)
index e176626aac34d9b78faf78029546f4a08886dbd9,e176626aac34d9b78faf78029546f4a08886dbd9..84960a29e7fbf259e60d315d83e5d2645e422b4b
@@@ -109,5 -109,5 +109,3 @@@ DynMenu.add = ad
  # dont ever use this directly!
  bpy.types.register(DynMenu)
  '''
--
--
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..ef853b395ea6f07a5a1036f3ff2e2a080d59096d
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,271 @@@
++# ##### BEGIN GPL LICENSE BLOCK #####
++#
++#  This program is free software; you can redistribute it and/or
++#  modify it under the terms of the GNU General Public License
++#  as published by the Free Software Foundation; either version 2
++#  of the License, or (at your option) any later version.
++#
++#  This program is distributed in the hope that it will be useful,
++#  but WITHOUT ANY WARRANTY; without even the implied warranty of
++#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
++#  GNU General Public License for more details.
++#
++#  You should have received a copy of the GNU General Public License
++#  along with this program; if not, write to the Free Software Foundation,
++#  Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
++#
++# ##### END GPL LICENSE BLOCK #####
++
++# <pep8 compliant>
++
++import bpy
++
++def rna_idprop_ui_get(item, create=True):
++    try:
++        return item['_RNA_UI']
++    except:
++        if create:
++            item['_RNA_UI'] = {}
++            return item['_RNA_UI']
++        else:
++            return None
++
++
++def rna_idprop_ui_prop_get(item, prop, create=True):
++
++    rna_ui = rna_idprop_ui_get(item, create)
++
++    if rna_ui == None:
++        return None
++
++    try:
++        return rna_ui[prop]
++    except:
++        rna_ui[prop] = {}
++        return rna_ui[prop]
++
++
++def rna_idprop_ui_prop_clear(item, prop):
++    rna_ui = rna_idprop_ui_get(item, False)
++
++    if rna_ui == None:
++        return
++
++    try:
++        del rna_ui[prop]
++    except:
++        pass
++
++
++def draw(layout, context, context_member, use_edit = True):
++
++    def assign_props(prop, val, key):
++        prop.path = context_member
++        prop.property = key
++
++        try:
++            prop.value = str(val)
++        except:
++            pass
++
++    rna_item = eval("context." + context_member)
++
++    items = rna_item.items()
++    items.sort()
++
++    if use_edit:
++        row = layout.row()
++        props = row.operator("wm.properties_add", text="Add")
++        props.path = context_member
++        del row
++
++    for key, val in items:
++
++        if key == '_RNA_UI':
++            continue
++
++        row = layout.row()
++        convert_to_pyobject = getattr(val, "convert_to_pyobject", None)
++
++        val_orig = val
++        if convert_to_pyobject:
++            val_draw = val = val.convert_to_pyobject()
++            val_draw = str(val_draw)
++        else:
++            val_draw = val
++
++        box = row.box()
++
++        if use_edit:
++            split = box.split(percentage=0.75)
++            row = split.row()
++        else:
++            row = box.row()
++
++        row.label(text=key)
++
++        # explicit exception for arrays
++        if convert_to_pyobject and not hasattr(val_orig, "len"):
++            row.label(text=val_draw)
++        else:
++            row.prop(rna_item, '["%s"]' % key, text="")
++
++        if use_edit:
++            row = split.row(align=True)
++            prop = row.operator("wm.properties_edit", text="edit")
++            assign_props(prop, val_draw, key)
++
++            prop = row.operator("wm.properties_remove", text="", icon='ICON_ZOOMOUT')
++            assign_props(prop, val_draw, key)
++
++
++from bpy.props import *
++
++
++rna_path = StringProperty(name="Property Edit",
++    description="Property path edit", maxlen=1024, default="", hidden=True)
++
++rna_value = StringProperty(name="Property Value",
++    description="Property value edit", maxlen=1024, default="")
++
++rna_property = StringProperty(name="Property Name",
++    description="Property name edit", maxlen=1024, default="")
++
++rna_min = FloatProperty(name="Min", default=0.0, precision=3)
++rna_max = FloatProperty(name="Max", default=1.0, precision=3)
++
++class WM_OT_properties_edit(bpy.types.Operator):
++    '''Internal use (edit a property path)'''
++    bl_idname = "wm.properties_edit"
++    bl_label = "Edit Property!"
++
++    path = rna_path
++    property = rna_property
++    value = rna_value
++    min = rna_min
++    max = rna_max
++    description = StringProperty(name="Tip", default="")
++
++    # the class instance is not persistant, need to store in the class
++    # not ideal but changes as the op runs.
++    _last_prop = ['']
++
++    def execute(self, context):
++        path = self.properties.path
++        value = self.properties.value
++        prop = self.properties.property
++        prop_old = self._last_prop[0]
++
++        try:
++            value_eval = eval(value)
++        except:
++            value_eval = value
++
++        if type(value_eval) == str:
++            value_eval = '"' + value_eval + '"'
++
++        # First remove
++        item = eval("context.%s" % path)
++
++        rna_idprop_ui_prop_clear(item, prop_old)
++        exec_str = "del item['%s']" % prop_old
++        # print(exec_str)
++        exec(exec_str)
++
++
++        # Reassign
++        exec_str = "item['%s'] = %s" % (prop, value_eval)
++        # print(exec_str)
++        exec(exec_str)
++
++        prop_type = type(item[prop])
++
++        prop_ui = rna_idprop_ui_prop_get(item, prop)
++
++        if prop_type in (float, int):
++
++            prop_ui['soft_min'] = prop_ui['min'] = prop_type(self.properties.min)
++            prop_ui['soft_max'] = prop_ui['max'] = prop_type(self.properties.max)
++
++        prop_ui['description'] = self.properties.description
++
++        return ('FINISHED',)
++
++    def invoke(self, context, event):
++
++        self._last_prop[:] = [self.properties.property]
++
++        item = eval("context.%s" % self.properties.path)
++
++        # setup defaults
++        prop_ui = rna_idprop_ui_prop_get(item, self.properties.property, False) # dont create
++        if prop_ui:
++            self.properties.min = prop_ui.get("min", -1000000000)
++            self.properties.max = prop_ui.get("max",  1000000000)
++            self.properties.description = prop_ui.get("description",  "")
++
++        if 0:
++            _message= "PyConsole, press Ctrl+D to unlock the BGE"
++            import sys
++
++            # evaluate commands in current namespace
++            frame= sys._getframe()
++            namespace = frame.f_globals.copy()
++            namespace.update(frame.f_locals)
++
++            import code
++
++            # Autocomp in python, not as comprehensive as IPython
++            import rlcompleter
++
++            try: # ick, some pythons dont have this
++                import readline
++                readline.parse_and_bind("tab: complete")
++            except:
++                pass
++
++            code.interact(banner=_message, local=namespace)
++
++        wm = context.manager
++        wm.invoke_props_popup(self, event)
++        return ('RUNNING_MODAL',)
++
++
++class WM_OT_properties_add(bpy.types.Operator):
++    '''Internal use (edit a property path)'''
++    bl_idname = "wm.properties_add"
++    bl_label = "Add Property"
++
++    path = rna_path
++
++    def execute(self, context):
++        item = eval("context.%s" % self.properties.path)
++
++        def unique_name(names):
++            prop = 'prop'
++            prop_new = prop
++            i = 1
++            while prop_new in names:
++                prop_new = prop + str(i)
++                i+=1
++
++            return prop_new
++
++        property = unique_name(item.keys())
++
++        item[property] = 1.0
++        return ('FINISHED',)
++
++class WM_OT_properties_remove(bpy.types.Operator):
++    '''Internal use (edit a property path)'''
++    bl_idname = "wm.properties_remove"
++    bl_label = "Add Property"
++
++    path = rna_path
++    property = rna_property
++
++    def execute(self, context):
++        item = eval("context.%s" % self.properties.path)
++        del item[self.properties.property]
++        return ('FINISHED',)
++
index ddc4f0b977002a2f33aa714a860f2a697a6cfa74,ddc4f0b977002a2f33aa714a860f2a697a6cfa74..fe8feecf43d3df4782284ee1cf872422f676cea7
@@@ -96,10 -96,10 +96,10 @@@ class AddTorus(bpy.types.Operator)
  
      def execute(self, context):
  
--        verts_loc, faces = add_torus(self.major_radius,
--                                    self.minor_radius,
--                                    self.major_segments,
--                                    self.minor_segments)
++        verts_loc, faces = add_torus(self.properties.major_radius,
++                                    self.properties.minor_radius,
++                                    self.properties.major_segments,
++                                    self.properties.minor_segments)
  
          mesh = bpy.data.add_mesh("Torus")
  
          mesh.update()
          ob_new = bpy.data.add_object('MESH', "Torus")
          ob_new.data = mesh
--        scene.add_object(ob_new)
++        scene.objects.link(ob_new)
          scene.objects.active = ob_new
          ob_new.selected = True
  
@@@ -130,7 -130,7 +130,7 @@@ bpy.ops.add(AddTorus
  # Add to a menu
  import dynamic_menu
  
--menu_func = (lambda self, context: self.layout.itemO(AddTorus.bl_idname,
++menu_func = (lambda self, context: self.layout.operator(AddTorus.bl_idname,
                                          text="Torus", icon='ICON_MESH_DONUT'))
  
  menu_item = dynamic_menu.add(bpy.types.INFO_MT_mesh_add, menu_func)
index f78e33730f0907191f9c9c28ffb7f85f08f0ee3e,f78e33730f0907191f9c9c28ffb7f85f08f0ee3e..0e57bc440d10a780a8310c33a8a8e0245a4b7e9f
@@@ -4,12 -4,12 +4,12 @@@
  #  modify it under the terms of the GNU General Public License
  #  as published by the Free Software Foundation; either version 2
  #  of the License, or (at your option) any later version.
--# 
++#
  #  This program is distributed in the hope that it will be useful,
  #  but WITHOUT ANY WARRANTY; without even the implied warranty of
  #  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  #  GNU General Public License for more details.
--# 
++#
  #  You should have received a copy of the GNU General Public License
  #  along with this program; if not, write to the Free Software Foundation,
  #  Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
@@@ -26,12 -26,12 +26,12 @@@ def main(context)
          bpy.ops.object.mode_set(mode='OBJECT', toggle=False)
  
      mesh = ob.data
--    
++
      face_list = [face for face in mesh.faces]
      face_edge_keys = [face.edge_keys for face in face_list]
  
      edge_face_count = mesh.edge_face_count_dict
--    
++
      def test_interior(index):
          for key in face_edge_keys[index]:
              if edge_face_count[key] < 3:
index f9a92c8cd82225d26a04c531e8d1f918dc85b75a,f9a92c8cd82225d26a04c531e8d1f918dc85b75a..63b5a44e901ea652a50cc829f9ba384ff0678939
@@@ -233,9 -233,9 +233,12 @@@ def mesh_faces_extend(me, faces, mat_id
        while i < new_facetot:
                
                f = [v.index for v in faces[i]]
--              if len(f)==4 and f[3]==0:
--                      f = f[1], f[2], f[3], f[0]
--              
++              if len(f)==4:
++                      if f[3]==0:
++                              f = f[1], f[2], f[3], f[0]
++              else:
++                      f = f[0], f[1], f[2], 0
++
                mf = me_faces[orig_facetot+i]
                mf.verts_raw =  f
                mf.material_index = mat_idx
@@@ -536,10 -536,10 +539,15 @@@ def main(context)
        
        # The line below checks if any of the vert loops are differenyt in length.
        if False in [len(v[0]) == len(vertLoops[0][0]) for v in vertLoops]:
--              CULL_METHOD = PupMenu('Small to large edge loop distrobution method%t|remove edges evenly|remove smallest edges')
--              if CULL_METHOD == -1:
--                      if is_editmode: Window.EditMode(1)
--                      return
++#XXX          CULL_METHOD = PupMenu('Small to large edge loop distrobution method%t|remove edges evenly|remove smallest edges')
++#XXX          if CULL_METHOD == -1:
++#XXX                  if is_editmode: Window.EditMode(1)
++#XXX                  return
++
++              CULL_METHOD = 1 # XXX FIXME
++              
++              
++              
                
                if CULL_METHOD ==1: # RESET CULL_METHOD
                        CULL_METHOD = 0 # shortest
@@@ -642,7 -642,7 +650,7 @@@ bpy.ops.add(MESH_OT_skin
  
  # Add to a menu
  import dynamic_menu
--menu_item = dynamic_menu.add(bpy.types.VIEW3D_MT_edit_mesh_faces, (lambda self, context: self.layout.itemO("mesh.skin", text="Bridge Faces")) )
++menu_item = dynamic_menu.add(bpy.types.VIEW3D_MT_edit_mesh_faces, (lambda self, context: self.layout.operator("mesh.skin", text="Bridge Faces")) )
  
  if __name__ == "__main__":
        bpy.ops.mesh.skin()
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..5af6fb00e9865ab086ed09a5d54d4e0411d79429
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,139 @@@
++# ##### BEGIN GPL LICENSE BLOCK #####
++#
++#  This program is free software; you can redistribute it and/or
++#  modify it under the terms of the GNU General Public License
++#  as published by the Free Software Foundation; either version 2
++#  of the License, or (at your option) any later version.
++# 
++#  This program is distributed in the hope that it will be useful,
++#  but WITHOUT ANY WARRANTY; without even the implied warranty of
++#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
++#  GNU General Public License for more details.
++# 
++#  You should have received a copy of the GNU General Public License
++#  along with this program; if not, write to the Free Software Foundation,
++#  Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
++#
++# ##### END GPL LICENSE BLOCK #####
++
++import bpy
++import os
++
++class AddPresetBase(bpy.types.Operator):
++    '''Base preset class, only for subclassing
++    subclasses must define 
++     - preset_values
++     - preset_path '''
++    bl_idname = "render.preset_add"
++    bl_label = "Add Render Preset"
++
++    name = bpy.props.StringProperty(name="Name", description="Name of the preset, used to make the path name", maxlen= 64, default= "")
++
++    '''
++    preset_values = [
++        "bpy.context.scene.render_data.resolution_x",
++        "bpy.context.scene.render_data.resolution_y",
++        "bpy.context.scene.render_data.pixel_aspect_x",
++        "bpy.context.scene.render_data.pixel_aspect_y",
++        "bpy.context.scene.render_data.fps",
++        "bpy.context.scene.render_data.fps_base",
++        "bpy.context.scene.render_data.resolution_percentage",
++    ]
++
++    preset_subdir = "render"
++    '''
++    
++    def _as_filename(self, name): # could reuse for other presets
++        for char in " !@#$%^&*(){}:\";'[]<>,./?":
++            name = name.replace('.', '_')
++        return name.lower()
++
++    def execute(self, context):
++
++        if not self.properties.name:
++            return ('FINISHED',)
++
++        filename = self._as_filename(self.properties.name) + ".py"
++
++        target_path = bpy.utils.preset_paths(self.preset_subdir)[0] # we need some way to tell the user and system preset path
++
++        file_preset = open(os.path.join(target_path, filename), 'w')
++        
++        for rna_path in self.preset_values:
++            file_preset.write("%s = %s\n" % (rna_path, eval(rna_path)))
++
++        file_preset.close()
++
++        return ('FINISHED',)
++
++    def invoke(self, context, event):
++        wm = context.manager
++        wm.invoke_props_popup(self, event)
++        return ('RUNNING_MODAL',)
++
++
++class AddPresetRender(AddPresetBase):
++    '''Add a Render Preset.'''
++    bl_idname = "render.preset_add"
++    bl_label = "Add Render Preset"
++    name = AddPresetBase.name
++
++    preset_values = [
++        "bpy.context.scene.render_data.resolution_x",
++        "bpy.context.scene.render_data.resolution_y",
++        "bpy.context.scene.render_data.pixel_aspect_x",
++        "bpy.context.scene.render_data.pixel_aspect_y",
++        "bpy.context.scene.render_data.fps",
++        "bpy.context.scene.render_data.fps_base",
++        "bpy.context.scene.render_data.resolution_percentage",
++    ]
++
++    preset_subdir = "render"
++
++
++class AddPresetSSS(AddPresetBase):
++    '''Add a Subsurface Scattering Preset.'''
++    bl_idname = "material.sss_preset_add"
++    bl_label = "Add SSS Preset"
++    name = AddPresetBase.name
++
++    preset_values = [
++        "bpy.context.material.subsurface_scattering.back",
++        "bpy.context.material.subsurface_scattering.color[0]",
++        "bpy.context.material.subsurface_scattering.color[1]",
++        "bpy.context.material.subsurface_scattering.color[2]",
++        "bpy.context.material.subsurface_scattering.color_factor",
++        "bpy.context.material.subsurface_scattering.error_tolerance",
++        "bpy.context.material.subsurface_scattering.front",
++        "bpy.context.material.subsurface_scattering.ior",
++        "bpy.context.material.subsurface_scattering.radius[0]",
++        "bpy.context.material.subsurface_scattering.radius[1]",
++        "bpy.context.material.subsurface_scattering.radius[2]",
++        "bpy.context.material.subsurface_scattering.scale",
++        "bpy.context.material.subsurface_scattering.texture_factor",
++    ]
++
++    preset_subdir = "sss"
++    
++class AddPresetCloth(AddPresetBase):
++    '''Add a Cloth Preset.'''
++    bl_idname = "cloth.preset_add"
++    bl_label = "Add Cloth Preset"
++    name = AddPresetBase.name
++    
++    preset_values = [
++        "bpy.context.cloth.settings.quality",
++        "bpy.context.cloth.settings.mass",
++        "bpy.context.cloth.settings.structural_stiffness",
++        "bpy.context.cloth.settings.bending_stiffness",
++        "bpy.context.cloth.settings.spring_damping",
++        "bpy.context.cloth.settings.air_damping",
++    ]
++    
++    preset_subdir = "cloth"
++
++bpy.ops.add(AddPresetRender)
++bpy.ops.add(AddPresetSSS)
++bpy.ops.add(AddPresetCloth)
++
++
index 11202329a3da367eb919b1a7af7afe371ac6b466,11202329a3da367eb919b1a7af7afe371ac6b466..cc8aa5fe63a5533b2d9e2636eb2c5adb1fb62987
@@@ -1128,7 -1128,7 +1128,7 @@@ class SmartProject(bpy.types.Operator)
                return context.active_object != None
  
        def execute(self, context):
--              main(context, self.island_margin, self.angle_limit)
++              main(context, self.properties.island_margin, self.properties.angle_limit)
                return ('FINISHED',)
  
  bpy.ops.add(SmartProject)
  # Add to a menu
  import dynamic_menu
  
--menu_func = (lambda self, context: self.layout.itemO(SmartProject.bl_idname,
++menu_func = (lambda self, context: self.layout.operator(SmartProject.bl_idname,
                                                                                text="Smart Project"))
  
  menu_item = dynamic_menu.add(bpy.types.VIEW3D_MT_uv_map, menu_func)
index 04398dfa8cec2a9bd45b310e366fb260b4c9e1cc,04398dfa8cec2a9bd45b310e366fb260b4c9e1cc..585a2231e21ae10432046c831f7d92d7b6002747
@@@ -166,7 -166,7 +166,7 @@@ class VertexPaintDirt(bpy.types.Operato
  
          t = time.time()
  
--        applyVertexDirt(me, self.blur_iterations, self.blur_strength, math.radians(self.dirt_angle), math.radians(self.clean_angle), self.dirt_only)
++        applyVertexDirt(me, self.properties.blur_iterations, self.properties.blur_strength, math.radians(self.properties.dirt_angle), math.radians(self.properties.clean_angle), self.properties.dirt_only)
  
          print('Dirt calculated in %.6f' % (time.time()-t))
  
index e65002ee0c09613228c58f3b27ff4681a1ae0a6e,e65002ee0c09613228c58f3b27ff4681a1ae0a6e..92b1434b696bd6262a5712e408efc008d9567398
@@@ -4,12 -4,12 +4,12 @@@
  #  modify it under the terms of the GNU General Public License
  #  as published by the Free Software Foundation; either version 2
  #  of the License, or (at your option) any later version.
--# 
++#
  #  This program is distributed in the hope that it will be useful,
  #  but WITHOUT ANY WARRANTY; without even the implied warranty of
  #  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  #  GNU General Public License for more details.
--# 
++#
  #  You should have received a copy of the GNU General Public License
  #  along with this program; if not, write to the Free Software Foundation,
  #  Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
@@@ -19,6 -19,6 +19,7 @@@
  # <pep8-80 compliant>
  
  import bpy
++import os
  
  from bpy.props import *
  
@@@ -60,10 -60,10 +61,9 @@@ def context_path_validate(context, path
  
  
  def execute_context_assign(self, context):
--    if context_path_validate(context, self.path) == NullPathMember:
++    if context_path_validate(context, self.properties.path) == NullPathMember:
          return ('PASS_THROUGH',)
--
--    exec("context.%s=self.value" % self.path)
++    exec("context.%s=self.properties.value" % self.properties.path)
      return ('FINISHED',)
  
  
@@@ -92,7 -92,7 +92,7 @@@ class WM_OT_context_set_int(bpy.types.O
  
  class WM_OT_context_set_float(bpy.types.Operator): # same as enum
      '''Set a context value.'''
--    bl_idname = "wm.context_set_int"
++    bl_idname = "wm.context_set_float"
      bl_label = "Context Set"
  
      path = rna_path_prop
@@@ -135,10 -135,10 +135,10 @@@ class WM_OT_context_toggle(bpy.types.Op
  
      def execute(self, context):
  
--        if context_path_validate(context, self.path) == NullPathMember:
++        if context_path_validate(context, self.properties.path) == NullPathMember:
              return ('PASS_THROUGH',)
  
--        exec("context.%s=not (context.%s)" % (self.path, self.path))
++        exec("context.%s=not (context.%s)" % (self.properties.path, self.properties.path))
          return ('FINISHED',)
  
  
@@@ -156,11 -156,11 +156,11 @@@ class WM_OT_context_toggle_enum(bpy.typ
  
      def execute(self, context):
  
--        if context_path_validate(context, self.path) == NullPathMember:
++        if context_path_validate(context, self.properties.path) == NullPathMember:
              return ('PASS_THROUGH',)
  
          exec("context.%s = ['%s', '%s'][context.%s!='%s']" % \
--            (self.path, self.value_1, self.value_2, self.path, self.value_2))
++            (self.properties.path, self.properties.value_1, self.properties.value_2, self.properties.path, self.properties.value_2))
  
          return ('FINISHED',)
  
@@@ -175,23 -175,23 +175,23 @@@ class WM_OT_context_cycle_int(bpy.types
  
      def execute(self, context):
  
--        value = context_path_validate(context, self.path)
++        value = context_path_validate(context, self.properties.path)
          if value == NullPathMember:
              return ('PASS_THROUGH',)
  
--        self.value = value
--        if self.reverse:
--            self.value -= 1
++        self.properties.value = value
++        if self.properties.reverse:
++            self.properties.value -= 1
          else:
--            self.value += 1
++            self.properties.value += 1
          execute_context_assign(self, context)
  
--        if self.value != eval("context.%s" % self.path):
++        if self.properties.value != eval("context.%s" % self.properties.path):
              # relies on rna clamping int's out of the range
--            if self.reverse:
--                self.value = (1 << 32)
++            if self.properties.reverse:
++                self.properties.value = (1 << 32)
              else:
--                self.value = - (1 << 32)
++                self.properties.value = - (1 << 32)
              execute_context_assign(self, context)
  
          return ('FINISHED',)
@@@ -207,14 -207,14 +207,14 @@@ class WM_OT_context_cycle_enum(bpy.type
  
      def execute(self, context):
  
--        value = context_path_validate(context, self.path)
++        value = context_path_validate(context, self.properties.path)
          if value == NullPathMember:
              return ('PASS_THROUGH',)
  
          orig_value = value
  
          # Have to get rna enum values
--        rna_struct_str, rna_prop_str = self.path.rsplit('.', 1)
++        rna_struct_str, rna_prop_str = self.properties.path.rsplit('.', 1)
          i = rna_prop_str.find('[')
  
          # just incse we get "context.foo.bar[0]"
          orig_index = enums.index(orig_value)
  
          # Have the info we need, advance to the next item
--        if self.reverse:
++        if self.properties.reverse:
              if orig_index == 0:
                  advance_enum = enums[-1]
              else:
                  advance_enum = enums[orig_index + 1]
  
          # set the new value
--        exec("context.%s=advance_enum" % self.path)
++        exec("context.%s=advance_enum" % self.properties.path)
          return ('FINISHED',)
  
  doc_id = StringProperty(name="Doc ID",
--        description="ID for the documentation", maxlen=1024, default="")
++        description="", maxlen=1024, default="", hidden=True)
  
--doc_new = StringProperty(name="Doc New",
++doc_new = StringProperty(name="Edit Description",
          description="", maxlen=1024, default="")
  
  
@@@ -271,7 -271,7 +271,7 @@@ class WM_OT_doc_view(bpy.types.Operator
          return '.'.join([class_obj.identifier for class_obj in ls])
  
      def execute(self, context):
--        id_split = self.doc_id.split('.')
++        id_split = self.properties.doc_id.split('.')
          if len(id_split) == 1: # rna, class
              url = '%s/bpy.types.%s-class.html' % (self._prefix, id_split[0])
          elif len(id_split) == 2: # rna, class.prop
@@@ -317,9 -317,9 +317,9 @@@ class WM_OT_doc_edit(bpy.types.Operator
  
      def execute(self, context):
  
--        class_name, class_prop = self.doc_id.split('.')
++        class_name, class_prop = self.properties.doc_id.split('.')
  
--        if not self.doc_new:
++        if not self.properties.doc_new:
              return ('RUNNING_MODAL',)
  
          # check if this is an operator
          if op_class:
              rna = op_class.bl_rna
              doc_orig = rna.description
--            if doc_orig == self.doc_new:
++            if doc_orig == self.properties.doc_new:
                  return ('RUNNING_MODAL',)
  
--            print("op - old:'%s' -> new:'%s'" % (doc_orig, self.doc_new))
--            upload["title"] = 'OPERATOR %s:%s' % (self.doc_id, doc_orig)
--            upload["description"] = self.doc_new
++            print("op - old:'%s' -> new:'%s'" % (doc_orig, self.properties.doc_new))
++            upload["title"] = 'OPERATOR %s:%s' % (self.properties.doc_id, doc_orig)
++            upload["description"] = self.properties.doc_new
  
              self._send_xmlrpc(upload)
  
          else:
              rna = getattr(bpy.types, class_name).bl_rna
              doc_orig = rna.properties[class_prop].description
--            if doc_orig == self.doc_new:
++            if doc_orig == self.properties.doc_new:
                  return ('RUNNING_MODAL',)
  
--            print("rna - old:'%s' -> new:'%s'" % (doc_orig, self.doc_new))
--            upload["title"] = 'RNA %s:%s' % (self.doc_id, doc_orig)
++            print("rna - old:'%s' -> new:'%s'" % (doc_orig, self.properties.doc_new))
++            upload["title"] = 'RNA %s:%s' % (self.properties.doc_id, doc_orig)
  
--        upload["description"] = self.doc_new
++        upload["description"] = self.properties.doc_new
  
          self._send_xmlrpc(upload)
  
          return ('RUNNING_MODAL',)
  
  
++class WM_OT_reload_scripts(bpy.types.Operator):
++    '''Load online reference docs'''
++    bl_idname = "wm.reload_scripts"
++    bl_label = "Reload Scripts"
++
++    def execute(self, context):
++        MOD = type(bpy)
++        import sys
++        bpy.load_scripts(True)
++        '''
++        prefix = bpy.base_path
++        items = list(sys.modules.items())
++        items.sort()
++        items.reverse()
++        for mod_name, mod in items:
++            mod_file = getattr(mod, "__file__", "")
++            if mod_file.startswith(prefix) and "__init__" not in mod_file:
++                print(mod_file)
++                reload(mod)
++                """
++                for submod_name in dir(mod):
++                    submod = getattr(mod, submod_name)
++                    if isinstance(submod, MOD):
++                        reload(submod)
++                """
++            else:
++                print("Ignoring:", mod, mod_file)
++        '''
++        return ('FINISHED',)
++
++
  bpy.ops.add(MESH_OT_delete_edgeloop)
  
  bpy.ops.add(WM_OT_context_set_boolean)
@@@ -376,3 -376,3 +407,11 @@@ bpy.ops.add(WM_OT_context_cycle_int
  
  bpy.ops.add(WM_OT_doc_view)
  bpy.ops.add(WM_OT_doc_edit)
++
++bpy.ops.add(WM_OT_reload_scripts)
++
++# experemental!
++import rna_prop_ui
++bpy.ops.add(rna_prop_ui.WM_OT_properties_edit)
++bpy.ops.add(rna_prop_ui.WM_OT_properties_add)
++bpy.ops.add(rna_prop_ui.WM_OT_properties_remove)
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..7fe8b890b38265d9eb292ccd861235ad685427f8
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,6 @@@
++bpy.context.cloth.settings.quality = 5
++bpy.context.cloth.settings.mass = 0.300
++bpy.context.cloth.settings.structural_stiffness = 15.000
++bpy.context.cloth.settings.bending_stiffness = 0.500
++bpy.context.cloth.settings.spring_damping = 5.000
++bpy.context.cloth.settings.air_damping = 1.000
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..4cad384a0140a61ca02fa840fb1056607ce87493
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,6 @@@
++bpy.context.cloth.settings.quality = 12
++bpy.context.cloth.settings.mass = 1
++bpy.context.cloth.settings.structural_stiffness = 40
++bpy.context.cloth.settings.bending_stiffness = 10
++bpy.context.cloth.settings.spring_damping = 25
++bpy.context.cloth.settings.air_damping = 1
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..11176c7e81489114633694971519d49c51e13c77
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,6 @@@
++bpy.context.cloth.settings.quality = 15
++bpy.context.cloth.settings.mass = 0.4
++bpy.context.cloth.settings.structural_stiffness = 80
++bpy.context.cloth.settings.bending_stiffness = 150
++bpy.context.cloth.settings.spring_damping = 25
++bpy.context.cloth.settings.air_damping = 1
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..101c11b141ab9d167de2fb2a63378a731c6077c3
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,6 @@@
++bpy.context.active_object.modifiers['Cloth'].settings.quality = 7
++bpy.context.active_object.modifiers['Cloth'].settings.mass = 3
++bpy.context.active_object.modifiers['Cloth'].settings.structural_stiffness = 15
++bpy.context.active_object.modifiers['Cloth'].settings.bending_stiffness = 25
++bpy.context.active_object.modifiers['Cloth'].settings.spring_damping = 25
++bpy.context.active_object.modifiers['Cloth'].settings.air_damping = 1
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..a0dea5f1fd3fc25b7cf3add7edf1299b5e7e80e6
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,6 @@@
++bpy.context.cloth.settings.quality = 5
++bpy.context.cloth.settings.mass = 0.150
++bpy.context.cloth.settings.structural_stiffness = 5
++bpy.context.cloth.settings.bending_stiffness = 0.05
++bpy.context.cloth.settings.spring_damping = 0
++bpy.context.cloth.settings.air_damping = 1
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..a0297a200f3364878e24d4457e1ddc8c7f1a9910
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,7 @@@
++bpy.context.scene.render_data.resolution_x = 1920
++bpy.context.scene.render_data.resolution_y = 1080
++bpy.context.scene.render_data.resolution_percentage = 100
++bpy.context.scene.render_data.pixel_aspect_x = 1
++bpy.context.scene.render_data.pixel_aspect_y = 1
++bpy.context.scene.render_data.fps = 24
++bpy.context.scene.render_data.fps_base = 1
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..4d34a928eb3c44c80b2f221a101e3271abc25111
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,7 @@@
++bpy.context.scene.render_data.resolution_x = 1280
++bpy.context.scene.render_data.resolution_y = 720
++bpy.context.scene.render_data.resolution_percentage = 100
++bpy.context.scene.render_data.pixel_aspect_x = 1
++bpy.context.scene.render_data.pixel_aspect_y = 1
++bpy.context.scene.render_data.fps = 24
++bpy.context.scene.render_data.fps_base = 1
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..c6bc7518fac3c02de998f5b04140fc91ced40e9d
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,7 @@@
++bpy.context.scene.render_data.resolution_x = 720
++bpy.context.scene.render_data.resolution_y = 480
++bpy.context.scene.render_data.resolution_percentage = 100
++bpy.context.scene.render_data.pixel_aspect_x = 10
++bpy.context.scene.render_data.pixel_aspect_y = 11
++bpy.context.scene.render_data.fps = 30
++bpy.context.scene.render_data.fps_base = 1.001
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..7044070fb0cbcc22eba7a4bfde1ffbf8fad9a998
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,7 @@@
++bpy.context.scene.render_data.resolution_x = 720
++bpy.context.scene.render_data.resolution_y = 576
++bpy.context.scene.render_data.resolution_percentage = 100
++bpy.context.scene.render_data.pixel_aspect_x = 54
++bpy.context.scene.render_data.pixel_aspect_y = 51
++bpy.context.scene.render_data.fps = 25
++bpy.context.scene.render_data.fps_base = 1
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..756d34c8af3c920893376f07ccf20e3588e3a324
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,7 @@@
++bpy.context.scene.render_data.resolution_x = 720
++bpy.context.scene.render_data.resolution_y = 576
++bpy.context.scene.render_data.resolution_percentage = 100
++bpy.context.scene.render_data.pixel_aspect_x = 64
++bpy.context.scene.render_data.pixel_aspect_y = 45
++bpy.context.scene.render_data.fps = 25
++bpy.context.scene.render_data.fps_base = 1
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..474769cd36fe59750938773c63f3988ffe992eb3
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,2 @@@
++bpy.context.active_object.active_material.subsurface_scattering.radius = 11.605, 3.884, 1.754
++bpy.context.active_object.active_material.subsurface_scattering.color = 0.430, 0.210, 0.168
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..6253de093768b822a0912566a10614f839aaeaa3
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,2 @@@
++bpy.context.active_object.active_material.subsurface_scattering.radius = 9.436, 3.348, 1.790
++bpy.context.active_object.active_material.subsurface_scattering.color = 0.439, 0.216, 0.141
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..f0a5292b85c48f8e185793bf43a212e0687c943c
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,2 @@@
++bpy.context.active_object.active_material.subsurface_scattering.radius = 15.028, 4.664, 2.541
++bpy.context.active_object.active_material.subsurface_scattering.color = 0.987, 0.943, 0.827
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..caece1ea7ca4145540306aa9891a8d13ae458924
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,2 @@@
++bpy.context.active_object.active_material.subsurface_scattering.radius = 4.762, 0.575, 0.394
++bpy.context.active_object.active_material.subsurface_scattering.color = 0.222, 0.008, 0.002
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..ea894f698001456191e628a4d5cb6afd7baaf5f5
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,2 @@@
++bpy.context.active_object.active_material.subsurface_scattering.radius = 8.509, 5.566, 3.951
++bpy.context.active_object.active_material.subsurface_scattering.color = 0.925, 0.905, 0.884
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..89407dff42733dfef2a3d4ea4ead5be41b4df358
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,2 @@@
++bpy.context.active_object.active_material.subsurface_scattering.radius = 14.266, 7.228, 2.036
++bpy.context.active_object.active_material.subsurface_scattering.color = 0.855, 0.740, 0.292
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..2e5b19d4f5366f22b3bcad07263c8ddb0470f35b
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,2 @@@
++bpy.context.active_object.active_material.subsurface_scattering.radius = 18.424, 10.443, 3.502
++bpy.context.active_object.active_material.subsurface_scattering.color = 0.889, 0.888, 0.796
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..42fb1fac43a7d2be9e08f65d69f2840650c5bebd
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,2 @@@
++bpy.context.active_object.active_material.subsurface_scattering.radius = 3.673, 1.367, 0.683
++bpy.context.active_object.active_material.subsurface_scattering.color = 0.574, 0.313, 0.174
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..52b649ecd8f22300d06076843ef6e84deff1cf75
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,2 @@@
++bpy.context.active_object.active_material.subsurface_scattering.radius = 4.821, 1.694, 1.090
++bpy.context.active_object.active_material.subsurface_scattering.color = 0.749, 0.571, 0.467
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..4cb6ccf3dcf7926b9973915449cfc1a8740c6fda
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,2 @@@
++bpy.context.active_object.active_material.subsurface_scattering.radius = 10.899, 6.575, 2.508
++bpy.context.active_object.active_material.subsurface_scattering.color = 0.947, 0.931, 0.852
index 37d354d0e6bb038a0877918a6236784cc30fb3e3,37d354d0e6bb038a0877918a6236784cc30fb3e3..0d1bc7fa29df385e9b7a908682420899ff7d0de3
@@@ -1,21 -1,21 +1,3 @@@
--# ##### BEGIN GPL LICENSE BLOCK #####
--#
--#  This program is free software; you can redistribute it and/or
--#  modify it under the terms of the GNU General Public License
--#  as published by the Free Software Foundation; either version 2
--#  of the License, or (at your option) any later version.
--#
--#  This program is distributed in the hope that it will be useful,
--#  but WITHOUT ANY WARRANTY; without even the implied warranty of
--#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
--#  GNU General Public License for more details.
--#
--#  You should have received a copy of the GNU General Public License
--#  along with this program; if not, write to the Free Software Foundation,
--#  Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
--#
--# ##### END GPL LICENSE BLOCK #####
--
  # This script must be assigned to a python controller
  # where it can access the object that owns it and the sensors/actuators that it connects to.
  
@@@ -42,23 -42,23 +24,23 @@@ def main()
  
      # Some example functions, remove to write your own script.
      # check for a positive sensor, will run on any object without errors.
--    print 'Logic info for KX_GameObject', own.name
++    print('Logic info for KX_GameObject', own.name)
      input = False
  
      for sens in cont.sensors:
          # The sensor can be on another object, we may want to use it
          own_sens = sens.owner
--        print '    sensor:', sens.name,
++        print('    sensor:', sens.name, end=' ')
          if sens.positive:
--            print '(true)'
++            print('(true)')
              input = True
          else:
--            print '(false)'
++            print('(false)')
  
      for actu in cont.actuators:
          # The actuator can be on another object, we may want to use it
          own_actu = actu.owner
--        print '    actuator:', actu.name
++        print('    actuator:', actu.name)
  
          # This runs the actuator or turns it off
          # note that actuators will continue to run unless explicitly turned off.
@@@ -76,9 -76,9 +58,9 @@@
  
      # Loop through all other objects in the scene
      sce = GameLogic.getCurrentScene()
--    print 'Scene Objects:', sce.name
++    print('Scene Objects:', sce.name)
      for ob in sce.objects:
--        print '   ', ob.name, ob.worldPosition
++        print('   ', ob.name, ob.worldPosition)
  
  
      # Example where collision objects are checked for their properties
@@@ -90,7 -90,7 +72,7 @@@
          if ob.has_key('life'):
              own['life'] += ob['life']
              ob['life'] = 0
--    print own['life']
++    print(own['life'])
      """
  
  main()
index 0accb57ccc26f14a9f53158acdbee48626ddb145,0accb57ccc26f14a9f53158acdbee48626ddb145..5e7d19672feb39baaa6e61567214b9e3bd91cc91
@@@ -1,20 -1,20 +1,3 @@@
--# ##### BEGIN GPL LICENSE BLOCK #####
--#
--#  This program is free software; you can redistribute it and/or
--#  modify it under the terms of the GNU General Public License
--#  as published by the Free Software Foundation; either version 2
--#  of the License, or (at your option) any later version.
--#
--#  This program is distributed in the hope that it will be useful,
--#  but WITHOUT ANY WARRANTY; without even the implied warranty of
--#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
--#  GNU General Public License for more details.
--#
--#  You should have received a copy of the GNU General Public License
--#  along with this program; if not, write to the Free Software Foundation,
--#  Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
--#
--# ##### END GPL LICENSE BLOCK #####
  
  def main():
  
index 8cb4fd7ca8dad01a600775807cf333a8743a5784,8cb4fd7ca8dad01a600775807cf333a8743a5784..5a61a3592dc1ccd9b73d31907f30e6748c4b1033
@@@ -1,21 -1,21 +1,3 @@@
--# ##### BEGIN GPL LICENSE BLOCK #####
--#
--#  This program is free software; you can redistribute it and/or
--#  modify it under the terms of the GNU General Public License
--#  as published by the Free Software Foundation; either version 2
--#  of the License, or (at your option) any later version.
--#
--#  This program is distributed in the hope that it will be useful,
--#  but WITHOUT ANY WARRANTY; without even the implied warranty of
--#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
--#  GNU General Public License for more details.
--#
--#  You should have received a copy of the GNU General Public License
--#  along with this program; if not, write to the Free Software Foundation,
--#  Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
--#
--# ##### END GPL LICENSE BLOCK #####
--
  # This module can be accessed by a python controller with
  # its execution method set to 'Module'
  # * Set the module string to "gamelogic_module.main" (without quotes)
index 1ed45f3e2119f38db4e3b6633a39509157b6fb99,1ed45f3e2119f38db4e3b6633a39509157b6fb99..5e8a2f33cb7d719d2d2b17952262051553834668
@@@ -1,20 -1,20 +1,3 @@@
--# ##### BEGIN GPL LICENSE BLOCK #####
--#
--#  This program is free software; you can redistribute it and/or
--#  modify it under the terms of the GNU General Public License
--#  as published by the Free Software Foundation; either version 2
--#  of the License, or (at your option) any later version.
--#
--#  This program is distributed in the hope that it will be useful,
--#  but WITHOUT ANY WARRANTY; without even the implied warranty of
--#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
--#  GNU General Public License for more details.
--#
--#  You should have received a copy of the GNU General Public License
--#  along with this program; if not, write to the Free Software Foundation,
--#  Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
--#
--# ##### END GPL LICENSE BLOCK #####
  
  import bpy
  
@@@ -45,7 -45,7 +28,7 @@@ class ExportSomeData(bpy.types.Operator
          #if not self.is_property_set("path"):
          #    raise Exception("filename not set")
  
--        write_some_data(self.path, context, self.use_setting)
++        write_some_data(self.properties.path, context, self.properties.use_setting)
  
          return ('FINISHED',)
  
@@@ -68,7 -68,7 +51,7 @@@ bpy.ops.add(ExportSomeData
  
  # Only needed if you want to add into a dynamic menu
  import dynamic_menu
--menu_func = lambda self, context: self.layout.itemO("export.some_data", text="Example Exporter...")
++menu_func = lambda self, context: self.layout.operator("export.some_data", text="Example Exporter...")
  menu_item = dynamic_menu.add(bpy.types.INFO_MT_file_export, menu_func)
  
  # Use for running this script directly
index 438df083d4de6bfec516a9dafd70d1c8f797132d,438df083d4de6bfec516a9dafd70d1c8f797132d..030ed85f01f23439694db0fd2a4f1d2da37960b4
@@@ -1,20 -1,20 +1,3 @@@
--# ##### BEGIN GPL LICENSE BLOCK #####
--#
--#  This program is free software; you can redistribute it and/or
--#  modify it under the terms of the GNU General Public License
--#  as published by the Free Software Foundation; either version 2
--#  of the License, or (at your option) any later version.
--#
--#  This program is distributed in the hope that it will be useful,
--#  but WITHOUT ANY WARRANTY; without even the implied warranty of
--#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
--#  GNU General Public License for more details.
--#
--#  You should have received a copy of the GNU General Public License
--#  along with this program; if not, write to the Free Software Foundation,
--#  Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
--#
--# ##### END GPL LICENSE BLOCK #####
  
  def main(context):
      for ob in context.scene.objects:
index f45f7ab6f609d0fb4229c2872b76a2fbeca4a088,f45f7ab6f609d0fb4229c2872b76a2fbeca4a088..1024ddc7836bc551c39b3cf4f49b5e98befd195e
@@@ -19,6 -19,6 +19,8 @@@
  # <pep8 compliant>
  import bpy
  
++narrowui = 180
++
  
  class DataButtonsPanel(bpy.types.Panel):
      bl_space_type = 'PROPERTIES'
@@@ -39,15 -39,15 +41,18 @@@ class DATA_PT_context_arm(DataButtonsPa
          ob = context.object
          arm = context.armature
          space = context.space_data
++        wide_ui = context.region.width > narrowui
  
--        split = layout.split(percentage=0.65)
--
--        if ob:
--            split.template_ID(ob, "data")
--            split.itemS()
--        elif arm:
--            split.template_ID(space, "pin_id")
--            split.itemS()
++        if wide_ui:
++            split = layout.split(percentage=0.65)
++            if ob:
++                split.template_ID(ob, "data")
++                split.separator()
++            elif arm:
++                split.template_ID(space, "pin_id")
++                split.separator()
++        else:
++            layout.template_ID(ob, "data")
  
  
  class DATA_PT_skeleton(DataButtonsPanel):
      def draw(self, context):
          layout = self.layout
  
--        ob = context.object
          arm = context.armature
--        space = context.space_data
++        wide_ui = context.region.width > narrowui
  
--        layout.itemR(arm, "pose_position", expand=True)
++        layout.prop(arm, "pose_position", expand=True)
  
          split = layout.split()
  
          col = split.column()
--        col.itemL(text="Layers:")
--        col.itemR(arm, "layer", text="")
--        col.itemL(text="Protected Layers:")
--        col.itemR(arm, "layer_protection", text="")
++        col.label(text="Layers:")
++        col.prop(arm, "layer", text="")
++        col.label(text="Protected Layers:")
++        col.prop(arm, "layer_protection", text="")
  
--        col = split.column()
--        col.itemL(text="Deform:")
--        col.itemR(arm, "deform_vertexgroups", text="Vertex Groups")
--        col.itemR(arm, "deform_envelope", text="Envelopes")
--        col.itemR(arm, "deform_quaternion", text="Quaternion")
--        col.itemR(arm, "deform_bbone_rest", text="B-Bones Rest")
++        if wide_ui:
++            col = split.column()
++        col.label(text="Deform:")
++        col.prop(arm, "deform_vertexgroups", text="Vertex Groups")
++        col.prop(arm, "deform_envelope", text="Envelopes")
++        col.prop(arm, "deform_quaternion", text="Quaternion")
++        col.prop(arm, "deform_bbone_rest", text="B-Bones Rest")
  
  
  class DATA_PT_display(DataButtonsPanel):
          layout = self.layout
  
          arm = context.armature
++        wide_ui = context.region.width > narrowui
  
--        layout.row().itemR(arm, "drawtype", expand=True)
++        if wide_ui:
++            layout.row().prop(arm, "drawtype", expand=True)
++        else:
++            layout.row().prop(arm, "drawtype", text="")
++
++        split = layout.split()
++
++        col = split.column()
++        col.prop(arm, "draw_names", text="Names")
++        col.prop(arm, "draw_axes", text="Axes")
++        col.prop(arm, "draw_custom_bone_shapes", text="Shapes")
  
--        flow = layout.column_flow()
--        flow.itemR(arm, "draw_names", text="Names")
--        flow.itemR(arm, "draw_axes", text="Axes")
--        flow.itemR(arm, "draw_custom_bone_shapes", text="Shapes")
--        flow.itemR(arm, "draw_group_colors", text="Colors")
--        flow.itemR(arm, "delay_deform", text="Delay Refresh")
++        if wide_ui:
++            col = split.column()
++        col.prop(arm, "draw_group_colors", text="Colors")
++        col.prop(arm, "delay_deform", text="Delay Refresh")
  
  
  class DATA_PT_bone_groups(DataButtonsPanel):
  
          ob = context.object
          pose = ob.pose
++        wide_ui = context.region.width > narrowui
  
          row = layout.row()
          row.template_list(pose, "bone_groups", pose, "active_bone_group_index", rows=2)
  
          col = row.column(align=True)
--        col.active = (ob.proxy == None)
--        col.itemO("pose.group_add", icon='ICON_ZOOMIN', text="")
--        col.itemO("pose.group_remove", icon='ICON_ZOOMOUT', text="")
++        col.active = (ob.proxy is None)
++        col.operator("pose.group_add", icon='ICON_ZOOMIN', text="")
++        col.operator("pose.group_remove", icon='ICON_ZOOMOUT', text="")
  
          group = pose.active_bone_group
          if group:
              col = layout.column()
--            col.active = (ob.proxy == None)
--            col.itemR(group, "name")
++            col.active = (ob.proxy is None)
++            col.prop(group, "name")
  
--            split = layout.split(0.5)
--            split.active = (ob.proxy == None)
--            split.itemR(group, "color_set")
++            split = layout.split()
++            split.active = (ob.proxy is None)
++
++            col = split.column()
++            col.prop(group, "color_set")
              if group.color_set:
--                split.template_triColorSet(group, "colors")
++                if wide_ui:
++                    col = split.column()
++                col.template_triColorSet(group, "colors")
  
          row = layout.row(align=True)
--        row.active = (ob.proxy == None)
++        row.active = (ob.proxy is None)
  
--        row.itemO("pose.group_assign", text="Assign")
--        row.itemO("pose.group_remove", text="Remove") #row.itemO("pose.bone_group_remove_from", text="Remove")
--        #row.itemO("object.bone_group_select", text="Select")
--        #row.itemO("object.bone_group_deselect", text="Deselect")
++        row.operator("pose.group_assign", text="Assign")
++        row.operator("pose.group_remove", text="Remove") #row.operator("pose.bone_group_remove_from", text="Remove")
++        #row.operator("object.bone_group_select", text="Select")
++        #row.operator("object.bone_group_deselect", text="Deselect")
  
  
  class DATA_PT_paths(DataButtonsPanel):
          layout = self.layout
  
          arm = context.armature
++        wide_ui = context.region.width > narrowui
  
--        layout.itemR(arm, "paths_type", expand=True)
++        if wide_ui:
++            layout.prop(arm, "paths_type", expand=True)
++        else:
++            layout.prop(arm, "paths_type", text="")
  
          split = layout.split()
  
          col = split.column()
          sub = col.column(align=True)
          if (arm.paths_type == 'CURRENT_FRAME'):
--            sub.itemR(arm, "path_before_current", text="Before")
--            sub.itemR(arm, "path_after_current", text="After")
++            sub.prop(arm, "path_before_current", text="Before")
++            sub.prop(arm, "path_after_current", text="After")
          elif (arm.paths_type == 'RANGE'):
--            sub.itemR(arm, "path_start_frame", text="Start")
--            sub.itemR(arm, "path_end_frame", text="End")
++            sub.prop(arm, "path_start_frame", text="Start")
++            sub.prop(arm, "path_end_frame", text="End")
  
--        sub.itemR(arm, "path_size", text="Step")
--        col.row().itemR(arm, "paths_location", expand=True)
++        sub.prop(arm, "path_size", text="Step")
++        col.row().prop(arm, "paths_location", expand=True)
  
--        col = split.column()
--        col.itemL(text="Display:")
--        col.itemR(arm, "paths_show_frame_numbers", text="Frame Numbers")
--        col.itemR(arm, "paths_highlight_keyframes", text="Keyframes")
--        col.itemR(arm, "paths_show_keyframe_numbers", text="Keyframe Numbers")
++        if wide_ui:
++            col = split.column()
++        col.label(text="Display:")
++        col.prop(arm, "paths_show_frame_numbers", text="Frame Numbers")
++        col.prop(arm, "paths_highlight_keyframes", text="Keyframes")
++        col.prop(arm, "paths_show_keyframe_numbers", text="Keyframe Numbers")
  
--        layout.itemS()
++        layout.separator()
  
--        row = layout.row()
--        row.itemO("pose.paths_calculate", text="Calculate Paths")
--        row.itemO("pose.paths_clear", text="Clear Paths")
++        split = layout.split()
++
++        col = split.column()
++        col.operator("pose.paths_calculate", text="Calculate Paths")
++
++        if wide_ui:
++            col = split.column()
++        col.operator("pose.paths_clear", text="Clear Paths")
  
  
  class DATA_PT_ghost(DataButtonsPanel):
          layout = self.layout
  
          arm = context.armature
++        wide_ui = context.region.width > narrowui
  
--        layout.itemR(arm, "ghost_type", expand=True)
++        if wide_ui:
++            layout.prop(arm, "ghost_type", expand=True)
++        else:
++            layout.prop(arm, "ghost_type", text="")
  
          split = layout.split()
  
  
          sub = col.column(align=True)
          if arm.ghost_type == 'RANGE':
--            sub.itemR(arm, "ghost_start_frame", text="Start")
--            sub.itemR(arm, "ghost_end_frame", text="End")
--            sub.itemR(arm, "ghost_size", text="Step")
++            sub.prop(arm, "ghost_start_frame", text="Start")
++            sub.prop(arm, "ghost_end_frame", text="End")
++            sub.prop(arm, "ghost_size", text="Step")
          elif arm.ghost_type == 'CURRENT_FRAME':
--            sub.itemR(arm, "ghost_step", text="Range")
--            sub.itemR(arm, "ghost_size", text="Step")
++            sub.prop(arm, "ghost_step", text="Range")
++            sub.prop(arm, "ghost_size", text="Step")
  
--        col = split.column()
--        col.itemL(text="Display:")
--        col.itemR(arm, "ghost_only_selected", text="Selected Only")
++        if wide_ui:
++            col = split.column()
++        col.label(text="Display:")
++        col.prop(arm, "ghost_only_selected", text="Selected Only")
  
  bpy.types.register(DATA_PT_context_arm)
  bpy.types.register(DATA_PT_skeleton)
index d1dd11638995fa4f8ec13c024d85ff0e1f40e87b,d1dd11638995fa4f8ec13c024d85ff0e1f40e87b..3b8911b38964bb6ab666e13822bda5a2508bb21d
@@@ -19,6 -19,6 +19,8 @@@
  # <pep8 compliant>
  import bpy
  
++narrowui = 180
++
  
  class BoneButtonsPanel(bpy.types.Panel):
      bl_space_type = 'PROPERTIES'
@@@ -41,8 -41,8 +43,8 @@@ class BONE_PT_context_bone(BoneButtonsP
              bone = context.edit_bone
  
          row = layout.row()
--        row.itemL(text="", icon='ICON_BONE_DATA')
--        row.itemR(bone, "name", text="")
++        row.label(text="", icon='ICON_BONE_DATA')
++        row.prop(bone, "name", text="")
  
  
  class BONE_PT_transform(BoneButtonsPanel):
  
          ob = context.object
          bone = context.bone
++        wide_ui = context.region.width > narrowui
++
          if not bone:
              bone = context.edit_bone
--
--            row = layout.row()
--            row.column().itemR(bone, "head")
--            row.column().itemR(bone, "tail")
--
--            col = row.column()
--            sub = col.column(align=True)
--            sub.itemL(text="Roll:")
--            sub.itemR(bone, "roll", text="")
--            sub.itemL()
--            sub.itemR(bone, "locked")
++            if wide_ui:
++                row = layout.row()
++                row.column().prop(bone, "head")
++                row.column().prop(bone, "tail")
++
++                col = row.column()
++                sub = col.column(align=True)
++                sub.label(text="Roll:")
++                sub.prop(bone, "roll", text="")
++                sub.label()
++                sub.prop(bone, "locked")
++            else:
++                col = layout.column()
++                col.prop(bone, "head")
++                col.prop(bone, "tail")
++                col.prop(bone, "roll")
++                col.prop(bone, "locked")
  
          else:
--            pchan = ob.pose.pose_channels[context.bone.name]
--
--            row = layout.row()
--            col = row.column()
--            col.itemR(pchan, "location")
--            col.active = not (bone.parent and bone.connected)
--
--            col = row.column()
--            if pchan.rotation_mode == 'QUATERNION':
--                col.itemR(pchan, "rotation_quaternion", text="Rotation")
--            elif pchan.rotation_mode == 'AXIS_ANGLE':
--                #col.itemL(text="Rotation")
--                #col.itemR(pchan, "rotation_angle", text="Angle")
--                #col.itemR(pchan, "rotation_axis", text="Axis")
--                col.itemR(pchan, "rotation_axis_angle", text="Rotation")
++            pchan = ob.pose.bones[context.bone.name]
++
++            if wide_ui:
++                row = layout.row()
++                col = row.column()
++                col.prop(pchan, "location")
++                col.active = not (bone.parent and bone.connected)
++
++                col = row.column()
++                if pchan.rotation_mode == 'QUATERNION':
++                    col.prop(pchan, "rotation_quaternion", text="Rotation")
++                elif pchan.rotation_mode == 'AXIS_ANGLE':
++                    #col.label(text="Rotation")
++                    #col.prop(pchan, "rotation_angle", text="Angle")
++                    #col.prop(pchan, "rotation_axis", text="Axis")
++                    col.prop(pchan, "rotation_axis_angle", text="Rotation")
++                else:
++                    col.prop(pchan, "rotation_euler", text="Rotation")
++
++                row.column().prop(pchan, "scale")
++
++                layout.prop(pchan, "rotation_mode")
              else:
--                col.itemR(pchan, "rotation_euler", text="Rotation")
--
--            row.column().itemR(pchan, "scale")
--
--            layout.itemR(pchan, "rotation_mode")
++                col = layout.column()
++                sub = col.column()
++                sub.active = not (bone.parent and bone.connected)
++                sub.prop(pchan, "location")
++                col.label(text="Rotation:")
++                col.prop(pchan, "rotation_mode", text="")
++                if pchan.rotation_mode == 'QUATERNION':
++                    col.prop(pchan, "rotation_quaternion", text="")
++                elif pchan.rotation_mode == 'AXIS_ANGLE':
++                    col.prop(pchan, "rotation_axis_angle", text="")
++                else:
++                    col.prop(pchan, "rotation_euler", text="")
++                col.prop(pchan, "scale")
  
  
  class BONE_PT_transform_locks(BoneButtonsPanel):
  
          ob = context.object
          bone = context.bone
--        pchan = ob.pose.pose_channels[context.bone.name]
++        pchan = ob.pose.bones[context.bone.name]
  
          row = layout.row()
          col = row.column()
--        col.itemR(pchan, "lock_location")
++        col.prop(pchan, "lock_location")
          col.active = not (bone.parent and bone.connected)
  
          col = row.column()
          if pchan.rotation_mode in ('QUATERNION', 'AXIS_ANGLE'):
--            col.itemR(pchan, "lock_rotations_4d", text="Lock Rotation")
++            col.prop(pchan, "lock_rotations_4d", text="Lock Rotation")
              if pchan.lock_rotations_4d:
--                col.itemR(pchan, "lock_rotation_w", text="W")
--            col.itemR(pchan, "lock_rotation", text="")
++                col.prop(pchan, "lock_rotation_w", text="W")
++            col.prop(pchan, "lock_rotation", text="")
          else:
--            col.itemR(pchan, "lock_rotation", text="Rotation")
++            col.prop(pchan, "lock_rotation", text="Rotation")
  
--        row.column().itemR(pchan, "lock_scale")
++        row.column().prop(pchan, "lock_scale")
  
  
  class BONE_PT_relations(BoneButtonsPanel):
          ob = context.object
          bone = context.bone
          arm = context.armature
++        wide_ui = context.region.width > narrowui
  
          if not bone:
              bone = context.edit_bone
              pchan = None
          else:
--            pchan = ob.pose.pose_channels[context.bone.name]
++            pchan = ob.pose.bones[context.bone.name]
  
          split = layout.split()
  
          col = split.column()
--        col.itemL(text="Layers:")
--        col.itemR(bone, "layer", text="")
++        col.label(text="Layers:")
++        col.prop(bone, "layer", text="")
  
--        col.itemS()
++        col.separator()
  
          if ob and pchan:
--            col.itemL(text="Bone Group:")
--            col.item_pointerR(pchan, "bone_group", ob.pose, "bone_groups", text="")
++            col.label(text="Bone Group:")
++            col.prop_object(pchan, "bone_group", ob.pose, "bone_groups", text="")
  
--        col = split.column()
--        col.itemL(text="Parent:")
++        if wide_ui:
++            col = split.column()
++        col.label(text="Parent:")
          if context.bone:
--            col.itemR(bone, "parent", text="")
++            col.prop(bone, "parent", text="")
          else:
--            col.item_pointerR(bone, "parent", arm, "edit_bones", text="")
++            col.prop_object(bone, "parent", arm, "edit_bones", text="")
  
          sub = col.column()
--        sub.active = bone.parent != None
--        sub.itemR(bone, "connected")
--        sub.itemR(bone, "hinge", text="Inherit Rotation")
--        sub.itemR(bone, "inherit_scale", text="Inherit Scale")
++        sub.active = (bone.parent is not None)
++        sub.prop(bone, "connected")
++        sub.prop(bone, "hinge", text="Inherit Rotation")
++        sub.prop(bone, "inherit_scale", text="Inherit Scale")
  
  
  class BONE_PT_display(BoneButtonsPanel):
  
          ob = context.object
          bone = context.bone
--        arm = context.armature
++        wide_ui = context.region.width > narrowui
  
          if not bone:
              bone = context.edit_bone
              pchan = None
          else:
--            pchan = ob.pose.pose_channels[context.bone.name]
++            pchan = ob.pose.bones[context.bone.name]
  
          if ob and pchan:
  
              split = layout.split()
  
              col = split.column()
++            col.prop(bone, "draw_wire", text="Wireframe")
++            col.prop(bone, "hidden", text="Hide")
  
--            col.itemR(bone, "draw_wire", text="Wireframe")
--            col.itemR(bone, "hidden", text="Hide")
--
--            col = split.column()
--
--            col.itemL(text="Custom Shape:")
--            col.itemR(pchan, "custom_shape", text="")
++            if wide_ui:
++                col = split.column()
++            col.label(text="Custom Shape:")
++            col.prop(pchan, "custom_shape", text="")
  
  
  class BONE_PT_deform(BoneButtonsPanel):
          if not bone:
              bone = context.edit_bone
  
--        self.layout.itemR(bone, "deform", text="")
++        self.layout.prop(bone, "deform", text="")
  
      def draw(self, context):
          layout = self.layout
  
          bone = context.bone
++        wide_ui = context.region.width > narrowui
  
          if not bone:
              bone = context.edit_bone
          split = layout.split()
  
          col = split.column()
--        col.itemL(text="Envelope:")
++        col.label(text="Envelope:")
  
          sub = col.column(align=True)
--        sub.itemR(bone, "envelope_distance", text="Distance")
--        sub.itemR(bone, "envelope_weight", text="Weight")
--        col.itemR(bone, "multiply_vertexgroup_with_envelope", text="Multiply")
++        sub.prop(bone, "envelope_distance", text="Distance")
++        sub.prop(bone, "envelope_weight", text="Weight")
++        col.prop(bone, "multiply_vertexgroup_with_envelope", text="Multiply")
  
          sub = col.column(align=True)
--        sub.itemL(text="Radius:")
--        sub.itemR(bone, "head_radius", text="Head")
--        sub.itemR(bone, "tail_radius", text="Tail")
++        sub.label(text="Radius:")
++        sub.prop(bone, "head_radius", text="Head")
++        sub.prop(bone, "tail_radius", text="Tail")
  
--        col = split.column()
--        col.itemL(text="Curved Bones:")
++        if wide_ui:
++            col = split.column()
++        col.label(text="Curved Bones:")
  
          sub = col.column(align=True)
--        sub.itemR(bone, "bbone_segments", text="Segments")
--        sub.itemR(bone, "bbone_in", text="Ease In")
--        sub.itemR(bone, "bbone_out", text="Ease Out")
++        sub.prop(bone, "bbone_segments", text="Segments")
++        sub.prop(bone, "bbone_in", text="Ease In")
++        sub.prop(bone, "bbone_out", text="Ease Out")
++
++        col.label(text="Offset:")
++        col.prop(bone, "cyclic_offset")
++
++
++class BONE_PT_properties(BoneButtonsPanel):
++    bl_label = "Properties"
++    bl_default_closed = True
++
++    def draw(self, context):
++        import rna_prop_ui
++        # reload(rna_prop_ui)
++        obj = context.object
++        if obj and obj.mode == 'POSE':
++            item = "active_pchan"
++        else:
++            item = "active_bone"
  
--        col.itemL(text="Offset:")
--        col.itemR(bone, "cyclic_offset")
++        rna_prop_ui.draw(self.layout, context, item)
  
  bpy.types.register(BONE_PT_context_bone)
  bpy.types.register(BONE_PT_transform)
@@@ -252,3 -252,3 +296,4 @@@ bpy.types.register(BONE_PT_transform_lo
  bpy.types.register(BONE_PT_relations)
  bpy.types.register(BONE_PT_display)
  bpy.types.register(BONE_PT_deform)
++bpy.types.register(BONE_PT_properties)
index eefd243218678f2d8766170c0c8f0e8d20d438d9,eefd243218678f2d8766170c0c8f0e8d20d438d9..e8cba6be7dfd8ee4b50e825172b24390f4444a79
@@@ -19,6 -19,6 +19,8 @@@
  # <pep8 compliant>
  import bpy
  
++narrowui = 180
++
  
  class DataButtonsPanel(bpy.types.Panel):
      bl_space_type = 'PROPERTIES'
@@@ -39,15 -39,15 +41,21 @@@ class DATA_PT_context_camera(DataButton
          ob = context.object
          cam = context.camera
          space = context.space_data
--
--        split = layout.split(percentage=0.65)
--
--        if ob:
--            split.template_ID(ob, "data")
--            split.itemS()
--        elif cam:
--            split.template_ID(space, "pin_id")
--            split.itemS()
++        wide_ui = context.region.width > narrowui
++
++        if wide_ui:
++            split = layout.split(percentage=0.65)
++            if ob:
++                split.template_ID(ob, "data")
++                split.separator()
++            elif cam:
++                split.template_ID(space, "pin_id")
++                split.separator()
++        else:
++            if ob:
++                layout.template_ID(ob, "data")
++            elif cam:
++                layout.template_ID(space, "pin_id")
  
  
  class DATA_PT_camera(DataButtonsPanel):
          layout = self.layout
  
          cam = context.camera
++        wide_ui = context.region.width > narrowui
  
--        layout.itemR(cam, "type", expand=True)
++        if wide_ui:
++            layout.prop(cam, "type", expand=True)
++        else:
++            layout.prop(cam, "type", text="")
  
--        row = layout.row()
++        split = layout.split()
++
++        col = split.column()
          if cam.type == 'PERSP':
              if cam.lens_unit == 'MILLIMETERS':
--                row.itemR(cam, "lens", text="Angle")
++                col.prop(cam, "lens", text="Angle")
              elif cam.lens_unit == 'DEGREES':
--                row.itemR(cam, "angle")
--            row.itemR(cam, "lens_unit", text="")
++                col.prop(cam, "angle")
++            if wide_ui:
++                col = split.column()
++            col.prop(cam, "lens_unit", text="")
  
          elif cam.type == 'ORTHO':
--            row.itemR(cam, "ortho_scale")
++            col.prop(cam, "ortho_scale")
  
--        layout.itemR(cam, "panorama")
++        layout.prop(cam, "panorama")
  
          split = layout.split()
  
          col = split.column(align=True)
--        col.itemL(text="Shift:")
--        col.itemR(cam, "shift_x", text="X")
--        col.itemR(cam, "shift_y", text="Y")
++        col.label(text="Shift:")
++        col.prop(cam, "shift_x", text="X")
++        col.prop(cam, "shift_y", text="Y")
  
--        col = split.column(align=True)
--        col.itemL(text="Clipping:")
--        col.itemR(cam, "clip_start", text="Start")
--        col.itemR(cam, "clip_end", text="End")
++        if wide_ui:
++            col = split.column(align=True)
++        col.label(text="Clipping:")
++        col.prop(cam, "clip_start", text="Start")
++        col.prop(cam, "clip_end", text="End")
  
--        layout.itemL(text="Depth of Field:")
++        layout.label(text="Depth of Field:")
  
--        row = layout.row()
--        row.itemR(cam, "dof_object", text="")
--        row.itemR(cam, "dof_distance", text="Distance")
++        split = layout.split()
++
++        col = split.column()
++        col.prop(cam, "dof_object", text="")
++
++        if wide_ui:
++            col = split.column()
++        col.prop(cam, "dof_distance", text="Distance")
  
  
  class DATA_PT_camera_display(DataButtonsPanel):
          layout = self.layout
  
          cam = context.camera
++        wide_ui = context.region.width > narrowui
  
          split = layout.split()
  
          col = split.column()
--        col.itemR(cam, "show_limits", text="Limits")
--        col.itemR(cam, "show_mist", text="Mist")
--        col.itemR(cam, "show_title_safe", text="Title Safe")
--        col.itemR(cam, "show_name", text="Name")
--
--        col = split.column()
--        col.itemR(cam, "draw_size", text="Size")
--        col.itemS()
--        col.itemR(cam, "show_passepartout", text="Passepartout")
++        col.prop(cam, "show_limits", text="Limits")
++        col.prop(cam, "show_mist", text="Mist")
++        col.prop(cam, "show_title_safe", text="Title Safe")
++        col.prop(cam, "show_name", text="Name")
++
++        if wide_ui:
++            col = split.column()
++        col.prop(cam, "draw_size", text="Size")
++        col.separator()
++        col.prop(cam, "show_passepartout", text="Passepartout")
          sub = col.column()
          sub.active = cam.show_passepartout
--        sub.itemR(cam, "passepartout_alpha", text="Alpha", slider=True)
++        sub.prop(cam, "passepartout_alpha", text="Alpha", slider=True)
  
  bpy.types.register(DATA_PT_context_camera)
  bpy.types.register(DATA_PT_camera)
index e2987e0a05c47bac99c1b774fdff7c3aefd00047,e2987e0a05c47bac99c1b774fdff7c3aefd00047..9a7961cfa3331c4d833ebac13d7b0cdb195bf7d7
@@@ -19,6 -19,6 +19,8 @@@
  # <pep8 compliant>
  import bpy
  
++narrowui = 180
++
  
  class DataButtonsPanel(bpy.types.Panel):
      bl_space_type = 'PROPERTIES'
@@@ -26,7 -26,7 +28,7 @@@
      bl_context = "data"
  
      def poll(self, context):
--        return (context.object and context.object.type in ('CURVE', 'SURFACE') and context.curve)
++        return (context.object and context.object.type in ('CURVE', 'SURFACE', 'TEXT') and context.curve)
  
  
  class DataButtonsPanelCurve(DataButtonsPanel):
@@@ -54,15 -54,15 +56,20 @@@ class DATA_PT_context_curve(DataButtons
          ob = context.object
          curve = context.curve
          space = context.space_data
++        wide_ui = context.region.width > narrowui
++
  
--        split = layout.split(percentage=0.65)
++        if wide_ui:
++            split = layout.split(percentage=0.65)
  
--        if ob:
--            split.template_ID(ob, "data")
--            split.itemS()
--        elif curve:
--            split.template_ID(space, "pin_id")
--            split.itemS()
++            if ob:
++                split.template_ID(ob, "data")
++                split.separator()
++            elif curve:
++                split.template_ID(space, "pin_id")
++                split.separator()
++        else:
++            layout.template_ID(ob, "data")
  
  
  class DATA_PT_shape_curve(DataButtonsPanel):
  
          ob = context.object
          curve = context.curve
--        space = context.space_data
++        wide_ui = context.region.width > narrowui
          is_surf = (ob.type == 'SURFACE')
++        is_curve = (ob.type == 'CURVE')
++        is_text = (ob.type == 'TEXT')
  
--        if not is_surf:
++        if is_curve:
              row = layout.row()
--            row.itemR(curve, "dimensions", expand=True)
++            row.prop(curve, "dimensions", expand=True)
  
          split = layout.split()
  
          col = split.column()
--
--        if not is_surf:
--            sub = col.column()
--            sub.active = (curve.dimensions == '2D')
--            sub.itemL(text="Caps:")
--            row = sub.row()
--            row.itemR(curve, "front")
--            row.itemR(curve, "back")
--
--        col.itemL(text="Textures:")
--#             col.itemR(curve, "uv_orco")
--        col.itemR(curve, "auto_texspace")
--
--        col = split.column()
--        col.itemL(text="Resolution:")
++        col.label(text="Resolution:")
          sub = col.column(align=True)
--        sub.itemR(curve, "resolution_u", text="Preview U")
--        sub.itemR(curve, "render_resolution_u", text="Render U")
++        sub.prop(curve, "resolution_u", text="Preview U")
++        sub.prop(curve, "render_resolution_u", text="Render U")
++        if is_curve:
++            col.label(text="Twisting:")
++            col.prop(curve, "twist_mode", text="")
++            col.prop(curve, "twist_smooth", text="Smooth")
++        if is_text:
++            col.label(text="Display:")
++            col.prop(curve, "fast", text="Fast Editing")
++
++        if wide_ui:
++            col = split.column()
  
          if is_surf:
              sub = col.column(align=True)
--            sub.itemR(curve, "resolution_v", text="Preview V")
--            sub.itemR(curve, "render_resolution_v", text="Render V")
++            sub.label(text="")
++            sub.prop(curve, "resolution_v", text="Preview V")
++            sub.prop(curve, "render_resolution_v", text="Render V")
  
--        # XXX - put somewhere nicer.
--        row = layout.row()
--        row.itemR(curve, "twist_mode")
--        row.itemR(curve, "twist_smooth") # XXX - may not be kept
++        if is_curve or is_text:
++            sub = col.column()
++            sub.active = (curve.dimensions == '2D')
++            sub.label(text="Caps:")
++            sub.prop(curve, "front")
++            sub.prop(curve, "back")
  
--#             col.itemL(text="Display:")
--#             col.itemL(text="HANDLES")
--#             col.itemL(text="NORMALS")
--#             col.itemR(curve, "vertex_normal_flip")
++        col.label(text="Textures:")
++#       col.prop(curve, "uv_orco")
++        col.prop(curve, "auto_texspace")
  
  
  class DATA_PT_geometry_curve(DataButtonsPanel):
          layout = self.layout
  
          curve = context.curve
++        wide_ui = context.region.width > narrowui
  
          split = layout.split()
  
          col = split.column()
--        col.itemL(text="Modification:")
--        col.itemR(curve, "width")
--        col.itemR(curve, "extrude")
--        col.itemL(text="Taper Object:")
--        col.itemR(curve, "taper_object", text="")
++        col.label(text="Modification:")
++        col.prop(curve, "width")
++        col.prop(curve, "extrude")
++        col.label(text="Taper Object:")
++        col.prop(curve, "taper_object", text="")
  
--        col = split.column()
--        col.itemL(text="Bevel:")
--        col.itemR(curve, "bevel_depth", text="Depth")
--        col.itemR(curve, "bevel_resolution", text="Resolution")
--        col.itemL(text="Bevel Object:")
--        col.itemR(curve, "bevel_object", text="")
++        if wide_ui:
++            col = split.column()
++        col.label(text="Bevel:")
++        col.prop(curve, "bevel_depth", text="Depth")
++        col.prop(curve, "bevel_resolution", text="Resolution")
++        col.label(text="Bevel Object:")
++        col.prop(curve, "bevel_object", text="")
  
  
  class DATA_PT_pathanim(DataButtonsPanelCurve):
      def draw_header(self, context):
          curve = context.curve
  
--        self.layout.itemR(curve, "use_path", text="")
++        self.layout.prop(curve, "use_path", text="")
  
      def draw(self, context):
          layout = self.layout
  
          curve = context.curve
++        wide_ui = context.region.width > narrowui
  
          layout.active = curve.use_path
  
++        row = layout.row()
++        layout.prop(curve, "path_length", text="Frames")
++
++        if wide_ui:
++            row.label()
++
          split = layout.split()
  
          col = split.column()
--        col.itemR(curve, "path_length", text="Frames")
--        col.itemR(curve, "use_path_follow")
++        col.prop(curve, "use_path_follow")
++        col.prop(curve, "use_stretch")
  
--        col = split.column()
--        col.itemR(curve, "use_stretch")
--        col.itemR(curve, "use_radius")
--        col.itemR(curve, "use_time_offset", text="Offset Children")
++        if wide_ui:
++            col = split.column()
++        col.prop(curve, "use_radius")
++        col.prop(curve, "use_time_offset", text="Offset Children")
  
  
  class DATA_PT_active_spline(DataButtonsPanelActive):
              # These settings are below but its easier to have
              # poly's set aside since they use so few settings
              col = split.column()
--            col.itemL(text="Cyclic:")
--            col.itemR(act_spline, "smooth")
++            col.label(text="Cyclic:")
++            col.prop(act_spline, "smooth")
              col = split.column()
--            col.itemR(act_spline, "cyclic_u", text="U")
++            col.prop(act_spline, "cyclic_u", text="U")
  
          else:
              col = split.column()
--            col.itemL(text="Cyclic:")
++            col.label(text="Cyclic:")
              if act_spline.type == 'NURBS':
--                col.itemL(text="Bezier:")
--                col.itemL(text="Endpoint:")
--                col.itemL(text="Order:")
++                col.label(text="Bezier:")
++                col.label(text="Endpoint:")
++                col.label(text="Order:")
  
--            col.itemL(text="Resolution:")
++            col.label(text="Resolution:")
  
              col = split.column()
--            col.itemR(act_spline, "cyclic_u", text="U")
++            col.prop(act_spline, "cyclic_u", text="U")
  
              if act_spline.type == 'NURBS':
                  sub = col.column()
                  # sub.active = (not act_spline.cyclic_u)
--                sub.itemR(act_spline, "bezier_u", text="U")
--                sub.itemR(act_spline, "endpoint_u", text="U")
++                sub.prop(act_spline, "bezier_u", text="U")
++                sub.prop(act_spline, "endpoint_u", text="U")
  
                  sub = col.column()
--                sub.itemR(act_spline, "order_u", text="U")
--            col.itemR(act_spline, "resolution_u", text="U")
++                sub.prop(act_spline, "order_u", text="U")
++            col.prop(act_spline, "resolution_u", text="U")
  
              if is_surf:
                  col = split.column()
--                col.itemR(act_spline, "cyclic_v", text="V")
++                col.prop(act_spline, "cyclic_v", text="V")
  
                  # its a surface, assume its a nurb.
                  sub = col.column()
                  sub.active = (not act_spline.cyclic_v)
--                sub.itemR(act_spline, "bezier_v", text="V")
--                sub.itemR(act_spline, "endpoint_v", text="V")
++                sub.prop(act_spline, "bezier_v", text="V")
++                sub.prop(act_spline, "endpoint_v", text="V")
                  sub = col.column()
--                sub.itemR(act_spline, "order_v", text="V")
--                sub.itemR(act_spline, "resolution_v", text="V")
--
++                sub.prop(act_spline, "order_v", text="V")
++                sub.prop(act_spline, "resolution_v", text="V")
  
              if not is_surf:
                  split = layout.split()
                  col = split.column()
                  col.active = (curve.dimensions == '3D')
  
--                col.itemL(text="Interpolation:")
--                col.itemR(act_spline, "tilt_interpolation", text="Tilt")
--                col.itemR(act_spline, "radius_interpolation", text="Radius")
++                col.label(text="Interpolation:")
++                col.prop(act_spline, "tilt_interpolation", text="Tilt")
++                col.prop(act_spline, "radius_interpolation", text="Radius")
++
++            layout.prop(act_spline, "smooth")
++
++
++class DATA_PT_font(DataButtonsPanel):
++    bl_label = "Font"
++
++    def poll(self, context):
++        return (context.object and context.object.type == 'TEXT' and context.curve)
++
++    def draw(self, context):
++        layout = self.layout
++
++        text = context.curve
++        char = context.curve.edit_format
++        wide_ui = context.region.width > narrowui
++
++        if wide_ui:
++            layout.prop(text, "font")
++        else:
++            layout.prop(text, "font", text="")
++
++        split = layout.split()
++
++        col = split.column()
++        col.prop(text, "text_size", text="Size")
++        if wide_ui:
++            col = split.column()
++        col.prop(text, "shear")
++
++        split = layout.split()
++
++        col = split.column()
++        col.label(text="Object Font:")
++        col.prop(text, "family", text="")
++
++        if wide_ui:
++            col = split.column()
++        col.label(text="Text on Curve:")
++        col.prop(text, "text_on_curve", text="")
++
++        split = layout.split()
++
++        col = split.column(align=True)
++        col.label(text="Underline:")
++        col.prop(text, "ul_position", text="Position")
++        col.prop(text, "ul_height", text="Thickness")
  
--            split = layout.split()
++        if wide_ui:
              col = split.column()
--            col.itemR(act_spline, "smooth")
++        col.label(text="Character:")
++        col.prop(char, "bold")
++        col.prop(char, "italic")
++        col.prop(char, "underline")
++#       col.prop(char, "style")
++#       col.prop(char, "wrap")
++
++
++class DATA_PT_paragraph(DataButtonsPanel):
++    bl_label = "Paragraph"
++
++    def poll(self, context):
++        return (context.object and context.object.type == 'TEXT' and context.curve)
++
++    def draw(self, context):
++        layout = self.layout
++
++        text = context.curve
++        wide_ui = context.region.width > narrowui
++
++        layout.label(text="Align:")
++        if wide_ui:
++            layout.prop(text, "spacemode", expand=True)
++        else:
++            layout.prop(text, "spacemode", text="")
++
++        split = layout.split()
++
++        col = split.column(align=True)
++        col.label(text="Spacing:")
++        col.prop(text, "spacing", text="Character")
++        col.prop(text, "word_spacing", text="Word")
++        col.prop(text, "line_dist", text="Line")
++
++        if wide_ui:
++            col = split.column(align=True)
++        col.label(text="Offset:")
++        col.prop(text, "offset_x", text="X")
++        col.prop(text, "offset_y", text="Y")
++
++
++class DATA_PT_textboxes(DataButtonsPanel):
++    bl_label = "Text Boxes"
++
++    def poll(self, context):
++        return (context.object and context.object.type == 'TEXT' and context.curve)
++
++    def draw(self, context):
++        layout = self.layout
++
++        text = context.curve
++        wide_ui = context.region.width > narrowui
++
++        for box in text.textboxes:
++            split = layout.box().split()
++
++            col = split.column(align=True)
++            col.label(text="Dimensions:")
++            col.prop(box, "width", text="Width")
++            col.prop(box, "height", text="Height")
++
++            if wide_ui:
++                col = split.column(align=True)
++            col.label(text="Offset:")
++            col.prop(box, "x", text="X")
++            col.prop(box, "y", text="Y")
  
  bpy.types.register(DATA_PT_context_curve)
  bpy.types.register(DATA_PT_shape_curve)
  bpy.types.register(DATA_PT_geometry_curve)
  bpy.types.register(DATA_PT_pathanim)
  bpy.types.register(DATA_PT_active_spline)
++bpy.types.register(DATA_PT_font)
++bpy.types.register(DATA_PT_paragraph)
++bpy.types.register(DATA_PT_textboxes)
index 3f6c7523b3e4f80054c4b6e557cb90e1ff40e360,3f6c7523b3e4f80054c4b6e557cb90e1ff40e360..9f304d2dc1b4d0f4e1108e8a2a1c72a0d2b9b820
@@@ -19,6 -19,6 +19,8 @@@
  # <pep8 compliant>
  import bpy
  
++narrowui = 180
++
  
  class DataButtonsPanel(bpy.types.Panel):
      bl_space_type = 'PROPERTIES'
@@@ -36,8 -36,8 +38,13 @@@ class DATA_PT_empty(DataButtonsPanel)
          layout = self.layout
  
          ob = context.object
++        wide_ui = context.region.width > narrowui
++
++        if wide_ui:
++            layout.prop(ob, "empty_draw_type", text="Display")
++        else:
++            layout.prop(ob, "empty_draw_type", text="")
  
--        layout.itemR(ob, "empty_draw_type", text="Display")
--        layout.itemR(ob, "empty_draw_size", text="Size")
++        layout.prop(ob, "empty_draw_size", text="Size")
  
  bpy.types.register(DATA_PT_empty)
index c7ad5b1c8953acf36fdb6534c321eab0bb41294b,c7ad5b1c8953acf36fdb6534c321eab0bb41294b..d5025983ff3f31137d1e75e67b208a3bb085411d
@@@ -19,6 -19,6 +19,8 @@@
  # <pep8 compliant>
  import bpy
  
++narrowui = 180
++
  
  class DataButtonsPanel(bpy.types.Panel):
      bl_space_type = 'PROPERTIES'
@@@ -46,15 -46,15 +48,21 @@@ class DATA_PT_context_lamp(DataButtonsP
          ob = context.object
          lamp = context.lamp
          space = context.space_data
--
--        split = layout.split(percentage=0.65)
--
--        if ob:
--            split.template_ID(ob, "data")
--            split.itemS()
--        elif lamp:
--            split.template_ID(space, "pin_id")
--            split.itemS()
++        wide_ui = context.region.width > narrowui
++
++        if wide_ui:
++            split = layout.split(percentage=0.65)
++            if ob:
++                split.template_ID(ob, "data")
++                split.separator()
++            elif lamp:
++                split.template_ID(space, "pin_id")
++                split.separator()
++        else:
++            if ob:
++                layout.template_ID(ob, "data")
++            elif lamp:
++                layout.template_ID(space, "pin_id")
  
  
  class DATA_PT_lamp(DataButtonsPanel):
          layout = self.layout
  
          lamp = context.lamp
++        wide_ui = context.region.width > narrowui
  
--        layout.itemR(lamp, "type", expand=True)
++        if wide_ui:
++            layout.prop(lamp, "type", expand=True)
++        else:
++            layout.prop(lamp, "type", text="")
  
          split = layout.split()
  
          col = split.column()
          sub = col.column()
--        sub.itemR(lamp, "color", text="")
--        sub.itemR(lamp, "energy")
++        sub.prop(lamp, "color", text="")
++        sub.prop(lamp, "energy")
  
          if lamp.type in ('POINT', 'SPOT'):
--            sub.itemL(text="Falloff:")
--            sub.itemR(lamp, "falloff_type", text="")
--            sub.itemR(lamp, "distance")
++            sub.label(text="Falloff:")
++            sub.prop(lamp, "falloff_type", text="")
++            sub.prop(lamp, "distance")
  
              if lamp.falloff_type == 'LINEAR_QUADRATIC_WEIGHTED':
--                col.itemL(text="Attenuation Factors:")
++                col.label(text="Attenuation Factors:")
                  sub = col.column(align=True)
--                sub.itemR(lamp, "linear_attenuation", slider=True, text="Linear")
--                sub.itemR(lamp, "quadratic_attenuation", slider=True, text="Quadratic")
++                sub.prop(lamp, "linear_attenuation", slider=True, text="Linear")
++                sub.prop(lamp, "quadratic_attenuation", slider=True, text="Quadratic")
  
--            col.itemR(lamp, "sphere")
++            col.prop(lamp, "sphere")
  
          if lamp.type == 'AREA':
--            col.itemR(lamp, "distance")
--            col.itemR(lamp, "gamma")
++            col.prop(lamp, "distance")
++            col.prop(lamp, "gamma")
  
--        col = split.column()
--        col.itemR(lamp, "negative")
--        col.itemR(lamp, "layer", text="This Layer Only")
--        col.itemR(lamp, "specular")
--        col.itemR(lamp, "diffuse")
++        if wide_ui:
++            col = split.column()
++        col.prop(lamp, "negative")
++        col.prop(lamp, "layer", text="This Layer Only")
++        col.prop(lamp, "specular")
++        col.prop(lamp, "diffuse")
  
  
  class DATA_PT_sunsky(DataButtonsPanel):
          layout = self.layout
  
          lamp = context.lamp.sky
++        wide_ui = context.region.width > narrowui
  
--        layout.itemR(lamp, "sky")
++        layout.prop(lamp, "sky")
  
          row = layout.row()
          row.active = lamp.sky or lamp.atmosphere
--        row.itemR(lamp, "atmosphere_turbidity", text="Turbidity")
++        row.prop(lamp, "atmosphere_turbidity", text="Turbidity")
  
          split = layout.split()
  
          col = split.column()
          col.active = lamp.sky
--        col.itemL(text="Blending:")
++        col.label(text="Blending:")
          sub = col.column()
--        sub.itemR(lamp, "sky_blend_type", text="")
--        sub.itemR(lamp, "sky_blend", text="Factor")
++        sub.prop(lamp, "sky_blend_type", text="")
++        sub.prop(lamp, "sky_blend", text="Factor")
  
--        col.itemL(text="Color Space:")
++        col.label(text="Color Space:")
          sub = col.column()
--        sub.row().itemR(lamp, "sky_color_space", expand=True)
--        sub.itemR(lamp, "sky_exposure", text="Exposure")
++        sub.row().prop(lamp, "sky_color_space", expand=True)
++        sub.prop(lamp, "sky_exposure", text="Exposure")
  
--        col = split.column()
++        if wide_ui:
++            col = split.column()
          col.active = lamp.sky
--        col.itemL(text="Horizon:")
++        col.label(text="Horizon:")
          sub = col.column()
--        sub.itemR(lamp, "horizon_brightness", text="Brightness")
--        sub.itemR(lamp, "spread", text="Spread")
++        sub.prop(lamp, "horizon_brightness", text="Brightness")
++        sub.prop(lamp, "spread", text="Spread")
  
--        col.itemL(text="Sun:")
++        col.label(text="Sun:")
          sub = col.column()
--        sub.itemR(lamp, "sun_brightness", text="Brightness")
--        sub.itemR(lamp, "sun_size", text="Size")
--        sub.itemR(lamp, "backscattered_light", slider=True, text="Back Light")
++        sub.prop(lamp, "sun_brightness", text="Brightness")
++        sub.prop(lamp, "sun_size", text="Size")
++        sub.prop(lamp, "backscattered_light", slider=True, text="Back Light")
  
--        layout.itemS()
++        layout.separator()
  
--        layout.itemR(lamp, "atmosphere")
++        layout.prop(lamp, "atmosphere")
  
          split = layout.split()
  
          col = split.column()
          col.active = lamp.atmosphere
--        col.itemL(text="Intensity:")
--        col.itemR(lamp, "sun_intensity", text="Sun")
--        col.itemR(lamp, "atmosphere_distance_factor", text="Distance")
++        col.label(text="Intensity:")
++        col.prop(lamp, "sun_intensity", text="Sun")
++        col.prop(lamp, "atmosphere_distance_factor", text="Distance")
  
--        col = split.column()
++        if wide_ui:
++            col = split.column()
          col.active = lamp.atmosphere
--        col.itemL(text="Scattering:")
++        col.label(text="Scattering:")
          sub = col.column(align=True)
--        sub.itemR(lamp, "atmosphere_inscattering", slider=True, text="Inscattering")
--        sub.itemR(lamp, "atmosphere_extinction", slider=True, text="Extinction")
++        sub.prop(lamp, "atmosphere_inscattering", slider=True, text="Inscattering")
++        sub.prop(lamp, "atmosphere_extinction", slider=True, text="Extinction")
  
  
  class DATA_PT_shadow(DataButtonsPanel):
          layout = self.layout
  
          lamp = context.lamp
++        wide_ui = context.region.width > narrowui
  
--        layout.itemR(lamp, "shadow_method", expand=True)
++        if wide_ui:
++            layout.prop(lamp, "shadow_method", expand=True)
++        else:
++            layout.prop(lamp, "shadow_method", text="")
  
          if lamp.shadow_method != 'NOSHADOW':
              split = layout.split()
  
              col = split.column()
--            col.itemR(lamp, "shadow_color", text="")
++            col.prop(lamp, "shadow_color", text="")
  
--            col = split.column()
--            col.itemR(lamp, "shadow_layer", text="This Layer Only")
--            col.itemR(lamp, "only_shadow")
++            if wide_ui:
++                col = split.column()
++            col.prop(lamp, "shadow_layer", text="This Layer Only")
++            col.prop(lamp, "only_shadow")
  
          if lamp.shadow_method == 'RAY_SHADOW':
              col = layout.column()
--            col.itemL(text="Sampling:")
--            col.row().itemR(lamp, "shadow_ray_sampling_method", expand=True)
++            col.label(text="Sampling:")
++            if wide_ui:
++                col.row().prop(lamp, "shadow_ray_sampling_method", expand=True)
++            else:
++                col.prop(lamp, "shadow_ray_sampling_method", text="")
  
              if lamp.type in ('POINT', 'SUN', 'SPOT'):
                  split = layout.split()
  
                  col = split.column()
--                col.itemR(lamp, "shadow_soft_size", text="Soft Size")
++                col.prop(lamp, "shadow_soft_size", text="Soft Size")
  
--                col.itemR(lamp, "shadow_ray_samples", text="Samples")
++                col.prop(lamp, "shadow_ray_samples", text="Samples")
                  if lamp.shadow_ray_sampling_method == 'ADAPTIVE_QMC':
--                    col.itemR(lamp, "shadow_adaptive_threshold", text="Threshold")
--                col = split.column()
++                    col.prop(lamp, "shadow_adaptive_threshold", text="Threshold")
++                if wide_ui:
++                    col = split.column()
  
              elif lamp.type == 'AREA':
                  split = layout.split()
  
                  col = split.column()
--                sub = split.column(align=True)
++
                  if lamp.shape == 'SQUARE':
--                    col.itemR(lamp, "shadow_ray_samples_x", text="Samples")
++                    col.prop(lamp, "shadow_ray_samples_x", text="Samples")
                  elif lamp.shape == 'RECTANGLE':
--                    col.itemR(lamp, "shadow_ray_samples_x", text="Samples X")
--                    col.itemR(lamp, "shadow_ray_samples_y", text="Samples Y")
++                    col.prop(lamp, "shadow_ray_samples_x", text="Samples X")
++                    col.prop(lamp, "shadow_ray_samples_y", text="Samples Y")
  
                  if lamp.shadow_ray_sampling_method == 'ADAPTIVE_QMC':
--                    col.itemR(lamp, "shadow_adaptive_threshold", text="Threshold")
++                    col.prop(lamp, "shadow_adaptive_threshold", text="Threshold")
++                    if wide_ui:
++                        col = split.column()
  
                  elif lamp.shadow_ray_sampling_method == 'CONSTANT_JITTERED':
--                    sub.itemR(lamp, "umbra")
--                    sub.itemR(lamp, "dither")
--                    sub.itemR(lamp, "jitter")
++                    if wide_ui:
++                        col = split.column()
++                    col.prop(lamp, "umbra")
++                    col.prop(lamp, "dither")
++                    col.prop(lamp, "jitter")
++                else:
++                    if wide_ui:
++                        col = split.column()
++
  
          elif lamp.shadow_method == 'BUFFER_SHADOW':
              col = layout.column()
--            col.itemL(text="Buffer Type:")
--            col.row().itemR(lamp, "shadow_buffer_type", expand=True)
++            col.label(text="Buffer Type:")
++            if wide_ui:
++                col.row().prop(lamp, "shadow_buffer_type", expand=True)
++            else:
++                col.row().prop(lamp, "shadow_buffer_type", text="")
  
              if lamp.shadow_buffer_type in ('REGULAR', 'HALFWAY', 'DEEP'):
                  split = layout.split()
  
                  col = split.column()
--                col.itemL(text="Filter Type:")
--                col.itemR(lamp, "shadow_filter_type", text="")
++                col.label(text="Filter Type:")
++                col.prop(lamp, "shadow_filter_type", text="")
                  sub = col.column(align=True)
--                sub.itemR(lamp, "shadow_buffer_soft", text="Soft")
--                sub.itemR(lamp, "shadow_buffer_bias", text="Bias")
++                sub.prop(lamp, "shadow_buffer_soft", text="Soft")
++                sub.prop(lamp, "shadow_buffer_bias", text="Bias")
  
--                col = split.column()
--                col.itemL(text="Sample Buffers:")
--                col.itemR(lamp, "shadow_sample_buffers", text="")
++                if wide_ui:
++                    col = split.column()
++                col.label(text="Sample Buffers:")
++                col.prop(lamp, "shadow_sample_buffers", text="")
                  sub = col.column(align=True)
--                sub.itemR(lamp, "shadow_buffer_size", text="Size")
--                sub.itemR(lamp, "shadow_buffer_samples", text="Samples")
++                sub.prop(lamp, "shadow_buffer_size", text="Size")
++                sub.prop(lamp, "shadow_buffer_samples", text="Samples")
                  if lamp.shadow_buffer_type == 'DEEP':
--                    col.itemR(lamp, "compression_threshold")
++                    col.prop(lamp, "compression_threshold")
  
              elif lamp.shadow_buffer_type == 'IRREGULAR':
--                layout.itemR(lamp, "shadow_buffer_bias", text="Bias")
++                layout.prop(lamp, "shadow_buffer_bias", text="Bias")
++
++            split = layout.split()
  
--            row = layout.row()
--            row.itemR(lamp, "auto_clip_start", text="Autoclip Start")
--            sub = row.row()
++            col = split.column()
++            col.prop(lamp, "auto_clip_start", text="Autoclip Start")
++            sub = col.column()
              sub.active = not lamp.auto_clip_start
--            sub.itemR(lamp, "shadow_buffer_clip_start", text="Clip Start")
++            sub.prop(lamp, "shadow_buffer_clip_start", text="Clip Start")
  
--            row = layout.row()
--            row.itemR(lamp, "auto_clip_end", text="Autoclip End")
--            sub = row.row()
++            if wide_ui:
++                col = split.column()
++            col.prop(lamp, "auto_clip_end", text="Autoclip End")
++            sub = col.column()
              sub.active = not lamp.auto_clip_end
--            sub.itemR(lamp, "shadow_buffer_clip_end", text=" Clip End")
++            sub.prop(lamp, "shadow_buffer_clip_end", text=" Clip End")
  
  
  class DATA_PT_area(DataButtonsPanel):
          split = layout.split()
  
          col = split.column()
--        col.row().itemR(lamp, "shape", expand=True)
++        col.row().prop(lamp, "shape", expand=True)
  
          sub = col.column(align=True)
          if (lamp.shape == 'SQUARE'):
--            sub.itemR(lamp, "size")
++            sub.prop(lamp, "size")
          elif (lamp.shape == 'RECTANGLE'):
--            sub.itemR(lamp, "size", text="Size X")
--            sub.itemR(lamp, "size_y", text="Size Y")
++            sub.prop(lamp, "size", text="Size X")
++            sub.prop(lamp, "size_y", text="Size Y")
  
  
  class DATA_PT_spot(DataButtonsPanel):
          layout = self.layout
  
          lamp = context.lamp
++        wide_ui = context.region.width > narrowui
  
          split = layout.split()
  
          col = split.column()
          sub = col.column()
--        sub.itemR(lamp, "spot_size", text="Size")
--        sub.itemR(lamp, "spot_blend", text="Blend", slider=True)
--        col.itemR(lamp, "square")
++        sub.prop(lamp, "spot_size", text="Size")
++        sub.prop(lamp, "spot_blend", text="Blend", slider=True)
++        col.prop(lamp, "square")
  
--        col = split.column()
--        col.itemR(lamp, "halo")
++        if wide_ui:
++            col = split.column()
++        else:
++            col.separator()
++        col.prop(lamp, "halo")
          sub = col.column(align=True)
          sub.active = lamp.halo
--        sub.itemR(lamp, "halo_intensity", text="Intensity")
++        sub.prop(lamp, "halo_intensity", text="Intensity")
          if lamp.shadow_method == 'BUFFER_SHADOW':
--            sub.itemR(lamp, "halo_step", text="Step")
++            sub.prop(lamp, "halo_step", text="Step")
  
  
  class DATA_PT_falloff_curve(DataButtonsPanel):
index 3a18a09670af20505e5aff4f35fd56443275d225,3a18a09670af20505e5aff4f35fd56443275d225..640f625a7defa408ca72191f3c8a398c81e24b91
@@@ -19,6 -19,6 +19,8 @@@
  # <pep8 compliant>
  import bpy
  
++narrowui = 180
++
  
  class DataButtonsPanel(bpy.types.Panel):
      bl_space_type = 'PROPERTIES'
@@@ -39,15 -39,15 +41,21 @@@ class DATA_PT_context_lattice(DataButto
          ob = context.object
          lat = context.lattice
          space = context.space_data
--
--        split = layout.split(percentage=0.65)
--
--        if ob:
--            split.template_ID(ob, "data")
--            split.itemS()
--        elif lat:
--            split.template_ID(space, "pin_id")
--            split.itemS()
++        wide_ui = context.region.width > narrowui
++
++        if wide_ui:
++            split = layout.split(percentage=0.65)
++            if ob:
++                split.template_ID(ob, "data")
++                split.separator()
++            elif lat:
++                split.template_ID(space, "pin_id")
++                split.separator()
++        else:
++            if ob:
++                layout.template_ID(ob, "data")
++            elif lat:
++                layout.template_ID(space, "pin_id")
  
  
  class DATA_PT_lattice(DataButtonsPanel):
          layout = self.layout
  
          lat = context.lattice
--
--        row = layout.row()
--        row.itemR(lat, "points_u")
--        row.itemR(lat, "interpolation_type_u", expand=True)
--
--        row = layout.row()
--        row.itemR(lat, "points_v")
--        row.itemR(lat, "interpolation_type_v", expand=True)
--
--        row = layout.row()
--        row.itemR(lat, "points_w")
--        row.itemR(lat, "interpolation_type_w", expand=True)
--
--        row = layout.row()
--        row.itemO("lattice.make_regular")
--        row.itemR(lat, "outside")
++        wide_ui = context.region.width > narrowui
++
++        split = layout.split()
++        col = split.column()
++        col.prop(lat, "points_u")
++        if wide_ui:
++            col = split.column()
++        col.prop(lat, "interpolation_type_u", text="")
++
++        split = layout.split()
++        col = split.column()
++        col.prop(lat, "points_v")
++        if wide_ui:
++            col = split.column()
++        col.prop(lat, "interpolation_type_v", text="")
++
++        split = layout.split()
++        col = split.column()
++        col.prop(lat, "points_w")
++        if wide_ui:
++            col = split.column()
++        col.prop(lat, "interpolation_type_w", text="")
++
++        layout.prop(lat, "outside")
  
  bpy.types.register(DATA_PT_context_lattice)
  bpy.types.register(DATA_PT_lattice)
index 49e26a2e8c2fcd70d349280c55eca6b560385d09,49e26a2e8c2fcd70d349280c55eca6b560385d09..46866a896710f3ef5f784a35839407566b2da7f0
@@@ -19,6 -19,6 +19,8 @@@
  # <pep8 compliant>
  import bpy
  
++narrowui = 180
++
  
  class DataButtonsPanel(bpy.types.Panel):
      bl_space_type = 'PROPERTIES'
@@@ -39,15 -39,15 +41,21 @@@ class DATA_PT_context_mesh(DataButtonsP
          ob = context.object
          mesh = context.mesh
          space = context.space_data
--
--        split = layout.split(percentage=0.65)
--
--        if ob:
--            split.template_ID(ob, "data")
--            split.itemS()
--        elif mesh:
--            split.template_ID(space, "pin_id")
--            split.itemS()
++        wide_ui = context.region.width > narrowui
++
++        if wide_ui:
++            split = layout.split(percentage=0.65)
++            if ob:
++                split.template_ID(ob, "data")
++                split.separator()
++            elif mesh:
++                split.template_ID(space, "pin_id")
++                split.separator()
++        else:
++            if ob:
++                layout.template_ID(ob, "data")
++            elif mesh:
++                layout.template_ID(space, "pin_id")
  
  
  class DATA_PT_normals(DataButtonsPanel):
          layout = self.layout
  
          mesh = context.mesh
++        wide_ui = context.region.width > narrowui
  
          split = layout.split()
  
          col = split.column()
--        col.itemR(mesh, "autosmooth")
++        col.prop(mesh, "autosmooth")
          sub = col.column()
          sub.active = mesh.autosmooth
--        sub.itemR(mesh, "autosmooth_angle", text="Angle")
++        sub.prop(mesh, "autosmooth_angle", text="Angle")
  
--        col = split.column()
--        col.itemR(mesh, "vertex_normal_flip")
--        col.itemR(mesh, "double_sided")
++        if wide_ui:
++            col = split.column()
++        else:
++            col.separator()
++        col.prop(mesh, "vertex_normal_flip")
++        col.prop(mesh, "double_sided")
  
  
  class DATA_PT_settings(DataButtonsPanel):
  
          mesh = context.mesh
  
--        split = layout.split()
--
--        col = split.column()
--        col.itemR(mesh, "texture_mesh")
++        layout.prop(mesh, "texture_mesh")
  
  
  class DATA_PT_vertex_groups(DataButtonsPanel):
          row.template_list(ob, "vertex_groups", ob, "active_vertex_group_index", rows=rows)
  
          col = row.column(align=True)
--        col.itemO("object.vertex_group_add", icon='ICON_ZOOMIN', text="")
--        col.itemO("object.vertex_group_remove", icon='ICON_ZOOMOUT', text="")
++        col.operator("object.vertex_group_add", icon='ICON_ZOOMIN', text="")
++        col.operator("object.vertex_group_remove", icon='ICON_ZOOMOUT', text="")
  
--        col.itemO("object.vertex_group_copy", icon='ICON_COPY_ID', text="")
++        col.operator("object.vertex_group_copy", icon='ICON_COPY_ID', text="")
          if ob.data.users > 1:
--            col.itemO("object.vertex_group_copy_to_linked", icon='ICON_LINK_AREA', text="")
++            col.operator("object.vertex_group_copy_to_linked", icon='ICON_LINK_AREA', text="")
  
          if group:
              row = layout.row()
--            row.itemR(group, "name")
++            row.prop(group, "name")
  
          if ob.mode == 'EDIT' and len(ob.vertex_groups) > 0:
              row = layout.row()
  
              sub = row.row(align=True)
--            sub.itemO("object.vertex_group_assign", text="Assign")
--            sub.itemO("object.vertex_group_remove_from", text="Remove")
++            sub.operator("object.vertex_group_assign", text="Assign")
++            sub.operator("object.vertex_group_remove_from", text="Remove")
  
              sub = row.row(align=True)
--            sub.itemO("object.vertex_group_select", text="Select")
--            sub.itemO("object.vertex_group_deselect", text="Deselect")
++            sub.operator("object.vertex_group_select", text="Select")
++            sub.operator("object.vertex_group_deselect", text="Deselect")
  
--            layout.itemR(context.tool_settings, "vertex_group_weight", text="Weight")
++            layout.prop(context.tool_settings, "vertex_group_weight", text="Weight")
  
  
  class DATA_PT_shape_keys(DataButtonsPanel):
          ob = context.object
          key = ob.data.shape_keys
          kb = ob.active_shape_key
++        wide_ui = context.region.width > narrowui
  
          enable_edit = ob.mode != 'EDIT'
          enable_edit_value = False
  
--        if ob.shape_key_lock == False:
++        if ob.shape_key_lock is False:
              if enable_edit or (ob.type == 'MESH' and ob.shape_key_edit_mode):
                  enable_edit_value = True
  
          col = row.column()
  
          sub = col.column(align=True)
--        sub.itemO("object.shape_key_add", icon='ICON_ZOOMIN', text="")
--        sub.itemO("object.shape_key_remove", icon='ICON_ZOOMOUT', text="")
++        sub.operator("object.shape_key_add", icon='ICON_ZOOMIN', text="")
++        sub.operator("object.shape_key_remove", icon='ICON_ZOOMOUT', text="")
  
          if kb:
--            col.itemS()
++            col.separator()
  
              sub = col.column(align=True)
--            sub.item_enumO("object.shape_key_move", "type", 'UP', icon='ICON_TRIA_UP', text="")
--            sub.item_enumO("object.shape_key_move", "type", 'DOWN', icon='ICON_TRIA_DOWN', text="")
++            sub.operator("object.shape_key_move", icon='ICON_TRIA_UP', text="").type = 'UP'
++            sub.operator("object.shape_key_move", icon='ICON_TRIA_DOWN', text="").type = 'DOWN'
  
              split = layout.split(percentage=0.4)
              row = split.row()
              row.enabled = enable_edit
--            row.itemR(key, "relative")
++            if wide_ui:
++                row.prop(key, "relative")
  
              row = split.row()
              row.alignment = 'RIGHT'
  
++            if not wide_ui:
++                layout.prop(key, "relative")
++                row = layout.row()
++
++
              sub = row.row(align=True)
              subsub = sub.row(align=True)
              subsub.active = enable_edit_value
              if ob.shape_key_lock:
--                subsub.itemR(ob, "shape_key_lock", icon='ICON_PINNED', text="")
++                subsub.prop(ob, "shape_key_lock", icon='ICON_PINNED', text="")
              else:
--                subsub.itemR(ob, "shape_key_lock", icon='ICON_UNPINNED', text="")
++                subsub.prop(ob, "shape_key_lock", icon='ICON_UNPINNED', text="")
              if kb.mute:
--                subsub.itemR(kb, "mute", icon='ICON_MUTE_IPO_ON', text="")
++                subsub.prop(kb, "mute", icon='ICON_MUTE_IPO_ON', text="")
              else:
--                subsub.itemR(kb, "mute", icon='ICON_MUTE_IPO_OFF', text="")
--            sub.itemR(ob, "shape_key_edit_mode", text="")
++                subsub.prop(kb, "mute", icon='ICON_MUTE_IPO_OFF', text="")
++            sub.prop(ob, "shape_key_edit_mode", text="")
  
              sub = row.row(align=True)
--            sub.itemO("object.shape_key_mirror", icon='ICON_ARROW_LEFTRIGHT', text="")
--            sub.itemO("object.shape_key_clear", icon='ICON_X', text="")
++            sub.operator("object.shape_key_mirror", icon='ICON_ARROW_LEFTRIGHT', text="")
++            sub.operator("object.shape_key_clear", icon='ICON_X', text="")
  
  
              row = layout.row()
--            row.itemR(kb, "name")
++            row.prop(kb, "name")
  
              if key.relative:
                  if ob.active_shape_key_index != 0:
                      row = layout.row()
                      row.active = enable_edit_value
--                    row.itemR(kb, "value")
++                    row.prop(kb, "value")
  
                      split = layout.split()
  
                      col = split.column(align=True)
                      col.active = enable_edit_value
--                    col.itemL(text="Range:")
--                    col.itemR(kb, "slider_min", text="Min")
--                    col.itemR(kb, "slider_max", text="Max")
++                    col.label(text="Range:")
++                    col.prop(kb, "slider_min", text="Min")
++                    col.prop(kb, "slider_max", text="Max")
  
--                    col = split.column(align=True)
++                    if wide_ui:
++                        col = split.column(align=True)
                      col.active = enable_edit_value
--                    col.itemL(text="Blend:")
--                    col.item_pointerR(kb, "vertex_group", ob, "vertex_groups", text="")
--                    col.item_pointerR(kb, "relative_key", key, "keys", text="")
++                    col.label(text="Blend:")
++                    col.prop_object(kb, "vertex_group", ob, "vertex_groups", text="")
++                    col.prop_object(kb, "relative_key", key, "keys", text="")
  
              else:
                  row = layout.row()
                  row.active = enable_edit_value
--                row.itemR(key, "slurph")
++                row.prop(key, "slurph")
  
  
  class DATA_PT_uv_texture(DataButtonsPanel):
          col.template_list(me, "uv_textures", me, "active_uv_texture_index", rows=2)
  
          col = row.column(align=True)
--        col.itemO("mesh.uv_texture_add", icon='ICON_ZOOMIN', text="")
--        col.itemO("mesh.uv_texture_remove", icon='ICON_ZOOMOUT', text="")
++        col.operator("mesh.uv_texture_add", icon='ICON_ZOOMIN', text="")
++        col.operator("mesh.uv_texture_remove", icon='ICON_ZOOMOUT', text="")
  
          lay = me.active_uv_texture
          if lay:
--            layout.itemR(lay, "name")
++            layout.prop(lay, "name")
  
  
  class DATA_PT_vertex_colors(DataButtonsPanel):
          col.template_list(me, "vertex_colors", me, "active_vertex_color_index", rows=2)
  
          col = row.column(align=True)
--        col.itemO("mesh.vertex_color_add", icon='ICON_ZOOMIN', text="")
--        col.itemO("mesh.vertex_color_remove", icon='ICON_ZOOMOUT', text="")
++        col.operator("mesh.vertex_color_add", icon='ICON_ZOOMIN', text="")
++        col.operator("mesh.vertex_color_remove", icon='ICON_ZOOMOUT', text="")
  
          lay = me.active_vertex_color
          if lay:
--            layout.itemR(lay, "name")
++            layout.prop(lay, "name")
  
  bpy.types.register(DATA_PT_context_mesh)
  bpy.types.register(DATA_PT_normals)
index 45330acd8e4de94ce9345c8d806742fd2113a2dd,45330acd8e4de94ce9345c8d806742fd2113a2dd..e36bdc991e179920694af3a0740acb92815d6465
@@@ -19,6 -19,6 +19,8 @@@
  # <pep8 compliant>
  import bpy
  
++narrowui = 180
++
  
  class DataButtonsPanel(bpy.types.Panel):
      bl_space_type = 'PROPERTIES'
@@@ -39,15 -39,15 +41,21 @@@ class DATA_PT_context_metaball(DataButt
          ob = context.object
          mball = context.meta_ball
          space = context.space_data
--
--        split = layout.split(percentage=0.65)
--
--        if ob:
--            split.template_ID(ob, "data")
--            split.itemS()
--        elif mball:
--            split.template_ID(space, "pin_id")
--            split.itemS()
++        wide_ui = context.region.width > narrowui
++
++        if wide_ui:
++            split = layout.split(percentage=0.65)
++            if ob:
++                split.template_ID(ob, "data")
++                split.separator()
++            elif mball:
++                split.template_ID(space, "pin_id")
++                split.separator()
++        else:
++            if ob:
++                layout.template_ID(ob, "data")
++            elif mball:
++                layout.template_ID(space, "pin_id")
  
  
  class DATA_PT_metaball(DataButtonsPanel):
          layout = self.layout
  
          mball = context.meta_ball
++        wide_ui = context.region.width > narrowui
  
          split = layout.split()
  
          col = split.column()
--        col.itemL(text="Resolution:")
++        col.label(text="Resolution:")
          sub = col.column(align=True)
--        sub.itemR(mball, "wire_size", text="View")
--        sub.itemR(mball, "render_size", text="Render")
++        sub.prop(mball, "wire_size", text="View")
++        sub.prop(mball, "render_size", text="Render")
  
--        col = split.column()
--        col.itemL(text="Settings:")
--        col.itemR(mball, "threshold", text="Threshold")
++        if wide_ui:
++            col = split.column()
++        col.label(text="Settings:")
++        col.prop(mball, "threshold", text="Threshold")
  
--        layout.itemL(text="Update:")
--        layout.itemR(mball, "flag", expand=True)
++        layout.label(text="Update:")
++        if wide_ui:
++            layout.prop(mball, "flag", expand=True)
++        else:
++            layout.prop(mball, "flag", text="")
  
  
  class DATA_PT_metaball_element(DataButtonsPanel):
          layout = self.layout
  
          metaelem = context.meta_ball.active_element
++        wide_ui = context.region.width > narrowui
  
--        split = layout.split(percentage=0.3)
--        split.itemL(text="Type:")
--        split.itemR(metaelem, "type", text="")
++        if wide_ui:
++            layout.prop(metaelem, "type")
++        else:
++            layout.prop(metaelem, "type", text="")
  
          split = layout.split()
  
--        col = split.column()
--        col.itemL(text="Settings:")
--        col.itemR(metaelem, "stiffness", text="Stiffness")
--        col.itemR(metaelem, "negative", text="Negative")
--        col.itemR(metaelem, "hide", text="Hide")
++        col = split.column(align=True)
++        col.label(text="Settings:")
++        col.prop(metaelem, "stiffness", text="Stiffness")
++        col.prop(metaelem, "negative", text="Negative")
++        col.prop(metaelem, "hide", text="Hide")
  
--        if metaelem.type == 'BALL':
++        if wide_ui:
              col = split.column(align=True)
  
--        elif metaelem.type == 'CUBE':
--            col = split.column(align=True)
--            col.itemL(text="Size:")
--            col.itemR(metaelem, "size_x", text="X")
--            col.itemR(metaelem, "size_y", text="Y")
--            col.itemR(metaelem, "size_z", text="Z")
++        if metaelem.type in ('CUBE', 'ELLIPSOID'):
++            col.label(text="Size:")
++            col.prop(metaelem, "size_x", text="X")
++            col.prop(metaelem, "size_y", text="Y")
++            col.prop(metaelem, "size_z", text="Z")
  
          elif metaelem.type == 'TUBE':
--            col = split.column(align=True)
--            col.itemL(text="Size:")
--            col.itemR(metaelem, "size_x", text="X")
++            col.label(text="Size:")
++            col.prop(metaelem, "size_x", text="X")
  
          elif metaelem.type == 'PLANE':
--            col = split.column(align=True)
--            col.itemL(text="Size:")
--            col.itemR(metaelem, "size_x", text="X")
--            col.itemR(metaelem, "size_y", text="Y")
--
--        elif metaelem.type == 'ELLIPSOID':
--            col = split.column(align=True)
--            col.itemL(text="Size:")
--            col.itemR(metaelem, "size_x", text="X")
--            col.itemR(metaelem, "size_y", text="Y")
--            col.itemR(metaelem, "size_z", text="Z")
++            col.label(text="Size:")
++            col.prop(metaelem, "size_x", text="X")
++            col.prop(metaelem, "size_y", text="Y")
  
  bpy.types.register(DATA_PT_context_metaball)
  bpy.types.register(DATA_PT_metaball)
index 410fbadec095bf93466319cd3ad0f53a2c1abada,410fbadec095bf93466319cd3ad0f53a2c1abada..46355bacd02091ed52d74430e6769caeb046b331
@@@ -19,6 -19,6 +19,8 @@@
  # <pep8 compliant>
  import bpy
  
++narrowui = 180
++
  
  class DataButtonsPanel(bpy.types.Panel):
      bl_space_type = 'PROPERTIES'
@@@ -33,437 -33,437 +35,656 @@@ class DATA_PT_modifiers(DataButtonsPane
          layout = self.layout
  
          ob = context.object
++        wide_ui = context.region.width > narrowui
  
          row = layout.row()
--        row.item_menu_enumO("object.modifier_add", "type")
--        row.itemL()
++        row.operator_menu_enum("object.modifier_add", "type")
++        if wide_ui:
++            row.label()
  
          for md in ob.modifiers:
              box = layout.template_modifier(md)
              if box:
                  # match enum type to our functions, avoids a lookup table.
--                getattr(self, md.type)(box, ob, md)
++                getattr(self, md.type)(box, ob, md, wide_ui)
  
      # the mt.type enum is (ab)used for a lookup on function names
      # ...to avoid lengthy if statements
      # so each type must have a function here.
  
--    def ARMATURE(self, layout, ob, md):
--        layout.itemR(md, "object")
++    def ARMATURE(self, layout, ob, md, wide_ui):
++        split = layout.split()
  
--        split = layout.split(percentage=0.5)
--        split.itemL(text="Vertex Group:")
--        sub = split.split(percentage=0.7)
--        sub.item_pointerR(md, "vertex_group", ob, "vertex_groups", text="")
--        subsub = sub.row()
--        subsub.active = md.vertex_group
--        subsub.itemR(md, "invert")
++        col = split.column()
++        col.label(text="Object:")
++        col.prop(md, "object", text="")
  
--        layout.itemS()
++        if wide_ui:
++            col = split.column()
++        col.label(text="Vertex Group::")
++        col.prop_object(md, "vertex_group", ob, "vertex_groups", text="")
++        sub = col.column()
++        sub.active = bool(md.vertex_group)
++        sub.prop(md, "invert")
  
          split = layout.split()
  
          col = split.column()
--        col.itemL(text="Bind To:")
--        col.itemR(md, "use_vertex_groups", text="Vertex Groups")
--        col.itemR(md, "use_bone_envelopes", text="Bone Envelopes")
++        col.label(text="Bind To:")
++        col.prop(md, "use_vertex_groups", text="Vertex Groups")
++        col.prop(md, "use_bone_envelopes", text="Bone Envelopes")
++
++        if wide_ui:
++            col = split.column()
++        col.label(text="Deformation:")
++        col.prop(md, "quaternion")
++        col.prop(md, "multi_modifier")
++
++    def ARRAY(self, layout, ob, md, wide_ui):
++        if wide_ui:
++            layout.prop(md, "fit_type")
++        else:
++            layout.prop(md, "fit_type", text="")
  
--        col = split.column()
--        col.itemL(text="Deformation:")
--        col.itemR(md, "quaternion")
--        col.itemR(md, "multi_modifier")
  
--    def ARRAY(self, layout, ob, md):
--        layout.itemR(md, "fit_type")
          if md.fit_type == 'FIXED_COUNT':
--            layout.itemR(md, "count")
++            layout.prop(md, "count")
          elif md.fit_type == 'FIT_LENGTH':
--            layout.itemR(md, "length")
++            layout.prop(md, "length")
          elif md.fit_type == 'FIT_CURVE':
--            layout.itemR(md, "curve")
++            layout.prop(md, "curve")
  
--        layout.itemS()
++        layout.separator()
  
          split = layout.split()
  
          col = split.column()
--        col.itemR(md, "constant_offset")
++        col.prop(md, "constant_offset")
          sub = col.column()
          sub.active = md.constant_offset
--        sub.itemR(md, "constant_offset_displacement", text="")
++        sub.prop(md, "constant_offset_displacement", text="")
  
--        col.itemS()
++        col.separator()
  
--        col.itemR(md, "merge_adjacent_vertices", text="Merge")
++        col.prop(md, "merge_adjacent_vertices", text="Merge")
          sub = col.column()
          sub.active = md.merge_adjacent_vertices
--        sub.itemR(md, "merge_end_vertices", text="First Last")
--        sub.itemR(md, "merge_distance", text="Distance")
++        sub.prop(md, "merge_end_vertices", text="First Last")
++        sub.prop(md, "merge_distance", text="Distance")
  
--        col = split.column()
--        col.itemR(md, "relative_offset")
++        if wide_ui:
++            col = split.column()
++        col.prop(md, "relative_offset")
          sub = col.column()
          sub.active = md.relative_offset
--        sub.itemR(md, "relative_offset_displacement", text="")
++        sub.prop(md, "relative_offset_displacement", text="")
  
--        col.itemS()
++        col.separator()
  
--        col.itemR(md, "add_offset_object")
++        col.prop(md, "add_offset_object")
          sub = col.column()
          sub.active = md.add_offset_object
--        sub.itemR(md, "offset_object", text="")
++        sub.prop(md, "offset_object", text="")
  
--        layout.itemS()
++        layout.separator()
  
          col = layout.column()
--        col.itemR(md, "start_cap")
--        col.itemR(md, "end_cap")
++        col.prop(md, "start_cap")
++        col.prop(md, "end_cap")
  
--    def BEVEL(self, layout, ob, md):
--        row = layout.row()
--        row.itemR(md, "width")
--        row.itemR(md, "only_vertices")
++    def BEVEL(self, layout, ob, md, wide_ui):
++        split = layout.split()
  
--        layout.itemL(text="Limit Method:")
--        layout.row().itemR(md, "limit_method", expand=True)
++        col = split.column()
++        col.prop(md, "width")
++
++        if wide_ui:
++            col = split.column()
++        col.prop(md, "only_vertices")
++
++        layout.label(text="Limit Method:")
++        layout.row().prop(md, "limit_method", expand=True)
          if md.limit_method == 'ANGLE':
--            layout.itemR(md, "angle")
++            layout.prop(md, "angle")
          elif md.limit_method == 'WEIGHT':
--            layout.row().itemR(md, "edge_weight_method", expand=True)
--
--    def BOOLEAN(self, layout, ob, md):
--        layout.itemR(md, "operation")
--        layout.itemR(md, "object")
++            layout.row().prop(md, "edge_weight_method", expand=True)
  
--    def BUILD(self, layout, ob, md):
++    def BOOLEAN(self, layout, ob, md, wide_ui):
          split = layout.split()
  
          col = split.column()
--        col.itemR(md, "start")
--        col.itemR(md, "length")
++        col.label(text="Operation:")
++        col.prop(md, "operation", text="")
++
++        if wide_ui:
++            col = split.column()
++        col.label(text="Object:")
++        col.prop(md, "object", text="")
++
++    def BUILD(self, layout, ob, md, wide_ui):
++        split = layout.split()
  
          col = split.column()
--        col.itemR(md, "randomize")
++        col.prop(md, "start")
++        col.prop(md, "length")
++
++        if wide_ui:
++            col = split.column()
++        col.prop(md, "randomize")
          sub = col.column()
          sub.active = md.randomize
--        sub.itemR(md, "seed")
++        sub.prop(md, "seed")
++
++    def CAST(self, layout, ob, md, wide_ui):
++        split = layout.split(percentage=0.25)
++
++        if wide_ui:
++            split.label(text="Cast Type:")
++            split.prop(md, "cast_type", text="")
++        else:
++            layout.prop(md, "cast_type", text="")
++
++        split = layout.split(percentage=0.25)
++
++        col = split.column()
++        col.prop(md, "x")
++        col.prop(md, "y")
++        col.prop(md, "z")
++
++        col = split.column()
++        col.prop(md, "factor")
++        col.prop(md, "radius")
++        col.prop(md, "size")
++        col.prop(md, "from_radius")
  
--    def CAST(self, layout, ob, md):
--        layout.itemR(md, "cast_type")
--        layout.itemR(md, "object")
++        split = layout.split()
++
++        col = split.column()
++        col.label(text="Vertex Group:")
++        col.prop_object(md, "vertex_group", ob, "vertex_groups", text="")
++        if wide_ui:
++            col = split.column()
++        col.label(text="Control Object:")
++        col.prop(md, "object", text="")
          if md.object:
--            layout.itemR(md, "use_transform")
--
--        flow = layout.column_flow()
--        flow.itemR(md, "x")
--        flow.itemR(md, "y")
--        flow.itemR(md, "z")
--        flow.itemR(md, "factor")
--        flow.itemR(md, "radius")
--        flow.itemR(md, "size")
--
--        layout.itemR(md, "from_radius")
--
--        layout.item_pointerR(md, "vertex_group", ob, "vertex_groups")
--
--    def CLOTH(self, layout, ob, md):
--        layout.itemL(text="See Cloth panel.")
--
--    def COLLISION(self, layout, ob, md):
--        layout.itemL(text="See Collision panel.")
--
--    def CURVE(self, layout, ob, md):
--        layout.itemR(md, "object")
--        layout.item_pointerR(md, "vertex_group", ob, "vertex_groups")
--        layout.itemR(md, "deform_axis")
--
--    def DECIMATE(self, layout, ob, md):
--        layout.itemR(md, "ratio")
--        layout.itemR(md, "face_count")
--
--    def DISPLACE(self, layout, ob, md):
--        layout.item_pointerR(md, "vertex_group", ob, "vertex_groups")
--        layout.itemR(md, "texture")
--        layout.itemR(md, "midlevel")
--        layout.itemR(md, "strength")
--        layout.itemR(md, "direction")
--        layout.itemR(md, "texture_coordinates")
++            col.prop(md, "use_transform")
++
++    def CLOTH(self, layout, ob, md, wide_ui):
++        layout.label(text="See Cloth panel.")
++
++    def COLLISION(self, layout, ob, md, wide_ui):
++        layout.label(text="See Collision panel.")
++
++    def CURVE(self, layout, ob, md, wide_ui):
++        split = layout.split()
++
++        col = split.column()
++        col.label(text="Object:")
++        col.prop(md, "object", text="")
++        if wide_ui:
++            col = split.column()
++        col.label(text="Vertex Group:")
++        col.prop_object(md, "vertex_group", ob, "vertex_groups", text="")
++        layout.label(text="Deformation Axis:")
++        layout.row().prop(md, "deform_axis", expand=True)
++
++    def DECIMATE(self, layout, ob, md, wide_ui):
++        layout.prop(md, "ratio")
++        layout.prop(md, "face_count")
++
++    def DISPLACE(self, layout, ob, md, wide_ui):
++        split = layout.split()
++
++        col = split.column()
++        col.label(text="Texture:")
++        col.prop(md, "texture", text="")
++        col.label(text="Vertex Group:")
++        col.prop_object(md, "vertex_group", ob, "vertex_groups", text="")
++
++        if wide_ui:
++            col = split.column()
++        col.label(text="Direction:")
++        col.prop(md, "direction", text="")
++        col.label(text="Texture Coordinates:")
++        col.prop(md, "texture_coordinates", text="")
          if md.texture_coordinates == 'OBJECT':
--            layout.itemR(md, "texture_coordinate_object", text="Object")
++            layout.prop(md, "texture_coordinate_object", text="Object")
          elif md.texture_coordinates == 'UV' and ob.type == 'MESH':
--            layout.item_pointerR(md, "uv_layer", ob.data, "uv_textures")
++            layout.prop_object(md, "uv_layer", ob.data, "uv_textures")
++
++        layout.separator()
  
--    def EDGE_SPLIT(self, layout, ob, md):
          split = layout.split()
  
          col = split.column()
--        col.itemR(md, "use_edge_angle", text="Edge Angle")
++        col.prop(md, "midlevel")
++
++        if wide_ui:
++            col = split.column()
++        col.prop(md, "strength")
++
++    def EDGE_SPLIT(self, layout, ob, md, wide_ui):
++        split = layout.split()
++
++        col = split.column()
++        col.prop(md, "use_edge_angle", text="Edge Angle")
          sub = col.column()
          sub.active = md.use_edge_angle
--        sub.itemR(md, "split_angle")
++        sub.prop(md, "split_angle")
++
++        if wide_ui:
++            col = split.column()
++        col.prop(md, "use_sharp", text="Sharp Edges")
++
++    def EXPLODE(self, layout, ob, md, wide_ui):
++        split = layout.split()
  
          col = split.column()
--        col.itemR(md, "use_sharp", text="Sharp Edges")
++        col.label(text="Vertex group:")
++        col.prop_object(md, "vertex_group", ob, "vertex_groups", text="")
++        sub = col.column()
++        sub.active = bool(md.vertex_group)
++        sub.prop(md, "protect")
  
--    def EXPLODE(self, layout, ob, md):
--        layout.item_pointerR(md, "vertex_group", ob, "vertex_groups")
--        layout.itemR(md, "protect")
++        if wide_ui:
++            col = split.column()
++        col.prop(md, "split_edges")
++        col.prop(md, "unborn")
++        col.prop(md, "alive")
++        col.prop(md, "dead")
  
--        flow = layout.column_flow(2)
--        flow.itemR(md, "split_edges")
--        flow.itemR(md, "unborn")
--        flow.itemR(md, "alive")
--        flow.itemR(md, "dead")
++        layout.operator("object.explode_refresh", text="Refresh")
  
--        layout.itemO("object.explode_refresh", text="Refresh")
++    def FLUID_SIMULATION(self, layout, ob, md, wide_ui):
++        layout.label(text="See Fluid panel.")
  
--    def FLUID_SIMULATION(self, layout, ob, md):
--        layout.itemL(text="See Fluid panel.")
++    def HOOK(self, layout, ob, md, wide_ui):
++        split = layout.split()
  
--    def HOOK(self, layout, ob, md):
--        col = layout.column()
--        col.itemR(md, "object")
++        col = split.column()
++        col.label(text="Object:")
++        col.prop(md, "object", text="")
          if md.object and md.object.type == 'ARMATURE':
--            layout.item_pointerR(md, "subtarget", md.object.data, "bones", text="Bone")
++            col.label(text="Bone:")
++            col.prop_object(md, "subtarget", md.object.data, "bones", text="")
++        if wide_ui:
++            col = split.column()
++        col.label(text="Vertex Group:")
++        col.prop_object(md, "vertex_group", ob, "vertex_groups", text="")
  
--        layout.item_pointerR(md, "vertex_group", ob, "vertex_groups")
++        layout.separator()
  
          split = layout.split()
--        split.itemR(md, "falloff")
--        split.itemR(md, "force", slider=True)
--
--        layout.itemS()
  
--        row = layout.row()
--        row.itemO("object.hook_reset", text="Reset")
--        row.itemO("object.hook_recenter", text="Recenter")
++        col = split.column()
++        col.prop(md, "falloff")
++        col.prop(md, "force", slider=True)
++        if wide_ui:
++            col = split.column()
++        else:
++            col.separator()
++        col.operator("object.hook_reset", text="Reset")
++        col.operator("object.hook_recenter", text="Recenter")
  
          if ob.mode == 'EDIT':
++            layout.separator()
              row = layout.row()
--            row.itemO("object.hook_select", text="Select")
--            row.itemO("object.hook_assign", text="Assign")
++            row.operator("object.hook_select", text="Select")
++            row.operator("object.hook_assign", text="Assign")
  
--    def LATTICE(self, layout, ob, md):
--        layout.itemR(md, "object")
--        layout.item_pointerR(md, "vertex_group", ob, "vertex_groups")
++    def LATTICE(self, layout, ob, md, wide_ui):
++        split = layout.split()
  
--    def MASK(self, layout, ob, md):
--        layout.itemR(md, "mode")
++        col = split.column()
++        col.label(text="Object:")
++        col.prop(md, "object", text="")
++
++        if wide_ui:
++            col = split.column()
++        col.label(text="Vertex Group:")
++        col.prop_object(md, "vertex_group", ob, "vertex_groups", text="")
++
++    def MASK(self, layout, ob, md, wide_ui):
++        split = layout.split()
++
++        col = split.column()
++        col.label(text="Mode:")
++        col.prop(md, "mode", text="")
++        if wide_ui:
++            col = split.column()
++        col.label(text="Vertex Group:")
          if md.mode == 'ARMATURE':
--            layout.itemR(md, "armature")
++            col.prop(md, "armature", text="")
          elif md.mode == 'VERTEX_GROUP':
--            layout.item_pointerR(md, "vertex_group", ob, "vertex_groups")
--        layout.itemR(md, "inverse")
++            col.prop_object(md, "vertex_group", ob, "vertex_groups", text="")
  
--    def MESH_DEFORM(self, layout, ob, md):
--        layout.itemR(md, "object")
--        layout.item_pointerR(md, "vertex_group", ob, "vertex_groups")
--        layout.itemR(md, "invert")
++        sub = col.column()
++        sub.active = bool(md.vertex_group)
++        sub.prop(md, "invert")
  
--        layout.itemS()
++    def MESH_DEFORM(self, layout, ob, md, wide_ui):
++        split = layout.split()
++        col = split.column()
++        col.label(text="Object:")
++        col.prop(md, "object", text="")
++        if md.object and md.object.type == 'ARMATURE':
++            col.label(text="Bone:")
++            col.prop_object(md, "subtarget", md.object.data, "bones", text="")
++        if wide_ui:
++            col = split.column()
++        col.label(text="Vertex Group:")
++        col.prop_object(md, "vertex_group", ob, "vertex_groups", text="")
++
++        sub = col.column()
++        sub.active = bool(md.vertex_group)
++        sub.prop(md, "invert")
++
++        layout.separator()
  
          if md.is_bound:
--            layout.itemO("object.meshdeform_bind", text="Unbind")
++            layout.operator("object.meshdeform_bind", text="Unbind")
          else:
--            layout.itemO("object.meshdeform_bind", text="Bind")
--            row = layout.row()
--            row.itemR(md, "precision")
--            row.itemR(md, "dynamic")
++            layout.operator("object.meshdeform_bind", text="Bind")
++            split = layout.split()
++
++            col = split.column()
++            col.prop(md, "precision")
++
++            if wide_ui:
++                col = split.column()
++            col.prop(md, "dynamic")
++
++    def MIRROR(self, layout, ob, md, wide_ui):
++        layout.prop(md, "merge_limit")
++        if wide_ui:
++            split = layout.split(percentage=0.25)
++        else:
++            split = layout.split(percentage=0.4)
++
++        col = split.column()
++        col.label(text="Axis:")
++        col.prop(md, "x")
++        col.prop(md, "y")
++        col.prop(md, "z")
++
++        if wide_ui:
++            col = split.column()
++        else:
++            subsplit = layout.split()
++            col = subsplit.column()
++        col.label(text="Options:")
++        col.prop(md, "clip", text="Clipping")
++        col.prop(md, "mirror_vertex_groups", text="Vertex Groups")
++
++        col = split.column()
++        col.label(text="Textures:")
++        col.prop(md, "mirror_u", text="U")
++        col.prop(md, "mirror_v", text="V")
++
++        col = layout.column()
++        col.label(text="Mirror Object:")
++        col.prop(md, "mirror_object", text="")
++
++    def MULTIRES(self, layout, ob, md, wide_ui):
++        if wide_ui:
++            layout.row().prop(md, "subdivision_type", expand=True)
++        else:
++            layout.row().prop(md, "subdivision_type", text="")
++        layout.prop(md, "level")
  
--    def MIRROR(self, layout, ob, md):
--        layout.itemR(md, "merge_limit")
          split = layout.split()
  
          col = split.column()
--        col.itemR(md, "x")
--        col.itemR(md, "y")
--        col.itemR(md, "z")
++        col.operator("object.multires_subdivide", text="Subdivide")
++
++        if wide_ui:
++            col = split.column()
++        col.operator("object.multires_higher_levels_delete", text="Delete Higher")
++
++    def PARTICLE_INSTANCE(self, layout, ob, md, wide_ui):
++        layout.prop(md, "object")
++        layout.prop(md, "particle_system_number", text="Particle System")
  
++        split = layout.split()
          col = split.column()
--        col.itemL(text="Textures:")
--        col.itemR(md, "mirror_u")
--        col.itemR(md, "mirror_v")
++        col.label(text="Create From:")
++        col.prop(md, "normal")
++        col.prop(md, "children")
++        col.prop(md, "size")
  
++        if wide_ui:
++            col = split.column()
++        col.label(text="Show Particles When:")
++        col.prop(md, "alive")
++        col.prop(md, "unborn")
++        col.prop(md, "dead")
++
++        layout.separator()
++
++        layout.prop(md, "path", text="Create Along Paths")
++
++        split = layout.split()
++        split.active = md.path
          col = split.column()
--        col.itemR(md, "clip", text="Do Clipping")
--        col.itemR(md, "mirror_vertex_groups", text="Vertex Group")
++        col.row().prop(md, "axis", expand=True)
++        col.prop(md, "keep_shape")
  
--        layout.itemR(md, "mirror_object")
++        if wide_ui:
++            col = split.column()
++        col.prop(md, "position", slider=True)
++        col.prop(md, "random_position", text="Random", slider=True)
  
--    def MULTIRES(self, layout, ob, md):
--        layout.itemR(md, "subdivision_type")
++    def PARTICLE_SYSTEM(self, layout, ob, md, wide_ui):
++        layout.label(text="See Particle panel.")
++
++    def SHRINKWRAP(self, layout, ob, md, wide_ui):
++        split = layout.split()
++        col = split.column()
++        col.label(text="Target:")
++        col.prop(md, "target", text="")
++        if wide_ui:
++            col = split.column()
++        col.label(text="Vertex Group:")
++        col.prop_object(md, "vertex_group", ob, "vertex_groups", text="")
++
++        split = layout.split()
++
++        col = split.column()
++        col.prop(md, "offset")
++        col.prop(md, "subsurf_levels")
++
++        if wide_ui:
++            col = split.column()
++            col.label(text="Mode:")
++        col.prop(md, "mode", text="")
++
++        if wide_ui:
++            split = layout.split(percentage=0.25)
++        else:
++            split = layout.split(percentage=0.35)
++        col = split.column()
  
--        row = layout.row()
--        row.itemO("object.multires_subdivide", text="Subdivide")
--        row.itemO("object.multires_higher_levels_delete", text="Delete Higher")
--
--        layout.itemR(md, "level")
--
--    def PARTICLE_INSTANCE(self, layout, ob, md):
--        layout.itemR(md, "object")
--        layout.itemR(md, "particle_system_number")
--
--        flow = layout.column_flow()
--        flow.itemR(md, "normal")
--        flow.itemR(md, "children")
--        flow.itemR(md, "size")
--        flow.itemR(md, "path")
--        if md.path:
--            flow.itemR(md, "keep_shape")
--        flow.itemR(md, "unborn")
--        flow.itemR(md, "alive")
--        flow.itemR(md, "dead")
--        flow.itemL(md, "")
--        if md.path:
--            flow.itemR(md, "axis", text="")
--
--        if md.path:
--            row = layout.row()
--            row.itemR(md, "position", slider=True)
--            row.itemR(md, "random_position", text="Random", slider=True)
--
--    def PARTICLE_SYSTEM(self, layout, ob, md):
--        layout.itemL(text="See Particle panel.")
--
--    def SHRINKWRAP(self, layout, ob, md):
--        layout.itemR(md, "target")
--        layout.item_pointerR(md, "vertex_group", ob, "vertex_groups")
--        layout.itemR(md, "offset")
--        layout.itemR(md, "subsurf_levels")
--        layout.itemR(md, "mode")
          if md.mode == 'PROJECT':
--            layout.itemR(md, "subsurf_levels")
--            layout.itemR(md, "auxiliary_target")
++            col.label(text="Axis:")
++            col.prop(md, "x")
++            col.prop(md, "y")
++            col.prop(md, "z")
++
++            col = split.column()
++            col.label(text="Direction:")
++            col.prop(md, "negative")
++            col.prop(md, "positive")
++
++            if wide_ui:
++                col = split.column()
++            else:
++                subsplit = layout.split()
++                col = subsplit.column()
++            col.label(text="Cull Faces:")
++            col.prop(md, "cull_front_faces", text="Front")
++            col.prop(md, "cull_back_faces", text="Back")
++
++            layout.label(text="Auxiliary Target:")
++            layout.prop(md, "auxiliary_target", text="")
  
--            row = layout.row()
--            row.itemR(md, "x")
--            row.itemR(md, "y")
--            row.itemR(md, "z")
--
--            flow = layout.column_flow()
--            flow.itemR(md, "negative")
--            flow.itemR(md, "positive")
--            flow.itemR(md, "cull_front_faces")
--            flow.itemR(md, "cull_back_faces")
          elif md.mode == 'NEAREST_SURFACEPOINT':
--            layout.itemR(md, "keep_above_surface")
--
--    def SIMPLE_DEFORM(self, layout, ob, md):
--        layout.itemR(md, "mode")
--        layout.item_pointerR(md, "vertex_group", ob, "vertex_groups")
--        layout.itemR(md, "origin")
--        layout.itemR(md, "relative")
--        layout.itemR(md, "factor")
--        layout.itemR(md, "limits")
--        if md.mode in ('TAPER', 'STRETCH'):
--            layout.itemR(md, "lock_x_axis")
--            layout.itemR(md, "lock_y_axis")
++            layout.prop(md, "keep_above_surface")
  
--    def SMOKE(self, layout, ob, md):
--        layout.itemL(text="See Smoke panel.")
++    def SIMPLE_DEFORM(self, layout, ob, md, wide_ui):
++        split = layout.split()
++
++        col = split.column()
++        col.label(text="Mode:")
++        col.prop(md, "mode", text="")
++
++        if wide_ui:
++            col = split.column()
++        col.label(text="Vertex Group:")
++        col.prop_object(md, "vertex_group", ob, "vertex_groups", text="")
  
--    def SMOOTH(self, layout, ob, md):
          split = layout.split()
  
          col = split.column()
--        col.itemR(md, "x")
--        col.itemR(md, "y")
--        col.itemR(md, "z")
++        col.label(text="Origin:")
++        col.prop(md, "origin", text="")
++        sub = col.column()
++        sub.active = md.origin
++        sub.prop(md, "relative")
++
++        if wide_ui:
++            col = split.column()
++        col.label(text="Deform:")
++        col.prop(md, "factor")
++        col.prop(md, "limits", slider=True)
++        if md.mode in ('TAPER', 'STRETCH'):
++            col.prop(md, "lock_x_axis")
++            col.prop(md, "lock_y_axis")
++
++    def SMOKE(self, layout, ob, md, wide_ui):
++        layout.label(text="See Smoke panel.")
++
++    def SMOOTH(self, layout, ob, md, wide_ui):
++        split = layout.split(percentage=0.25)
++
++        col = split.column()
++        col.label(text="Axis:")
++        col.prop(md, "x")
++        col.prop(md, "y")
++        col.prop(md, "z")
  
          col = split.column()
--        col.itemR(md, "factor")
--        col.itemR(md, "repeat")
++        col.prop(md, "factor")
++        col.prop(md, "repeat")
++        col.label(text="Vertex Group:")
++        col.prop_object(md, "vertex_group", ob, "vertex_groups", text="")
  
--        layout.item_pointerR(md, "vertex_group", ob, "vertex_groups")
++    def SOFT_BODY(self, layout, ob, md, wide_ui):
++        layout.label(text="See Soft Body panel.")
  
--    def SOFT_BODY(self, layout, ob, md):
--        layout.itemL(text="See Soft Body panel.")
++    def SUBSURF(self, layout, ob, md, wide_ui):
++        if wide_ui:
++            layout.row().prop(md, "subdivision_type", expand=True)
++        else:
++            layout.row().prop(md, "subdivision_type", text="")
  
--    def SUBSURF(self, layout, ob, md):
--        layout.row().itemR(md, "subdivision_type", expand=True)
++        split = layout.split()
++        col = split.column()
++        col.label(text="Subdivisions:")
++        col.prop(md, "levels", text="View")
++        col.prop(md, "render_levels", text="Render")
  
--        flow = layout.column_flow()
--        flow.itemR(md, "levels", text="Preview")
--        flow.itemR(md, "render_levels", text="Render")
--        flow.itemR(md, "optimal_draw", text="Optimal Display")
--        flow.itemR(md, "subsurf_uv")
++        if wide_ui:
++            col = split.column()
++        col.label(text="Options:")
++        col.prop(md, "optimal_draw", text="Optimal Display")
++        col.prop(md, "subsurf_uv")
  
--    def SURFACE(self, layout, ob, md):
--        layout.itemL(text="See Fields panel.")
++    def SURFACE(self, layout, ob, md, wide_ui):
++        layout.label(text="See Fields panel.")
  
--    def UV_PROJECT(self, layout, ob, md):
++    def UV_PROJECT(self, layout, ob, md, wide_ui):
          if ob.type == 'MESH':
--            layout.item_pointerR(md, "uv_layer", ob.data, "uv_textures")
--            layout.itemR(md, "image")
--            layout.itemR(md, "override_image")
--
              split = layout.split()
--
              col = split.column()
--            col.itemL(text="Aspect Ratio:")
++            col.label(text="UV Layer:")
++            col.prop_object(md, "uv_layer", ob.data, "uv_textures", text="")
  
--            sub = col.column(align=True)
--            sub.itemR(md, "horizontal_aspect_ratio", text="Horizontal")
--            sub.itemR(md, "vertical_aspect_ratio", text="Vertical")
++            if wide_ui:
++                col = split.column()
++            col.label(text="Image:")
++            col.prop(md, "image", text="")
  
++            split = layout.split()
              col = split.column()
--            col.itemL(text="Projectors:")
++            col.prop(md, "override_image")
++            col.prop(md, "num_projectors", text="Projectors")
++            for proj in md.projectors:
++                col.prop(proj, "object", text="")
  
++            if wide_ui:
++                col = split.column()
              sub = col.column(align=True)
--            sub.itemR(md, "num_projectors", text="Number")
--            for proj in md.projectors:
--                sub.itemR(proj, "object", text="")
++            sub.label(text="Aspect Ratio:")
++            sub.prop(md, "horizontal_aspect_ratio", text="Horizontal")
++            sub.prop(md, "vertical_aspect_ratio", text="Vertical")
  
--    def WAVE(self, layout, ob, md):
++    def WAVE(self, layout, ob, md, wide_ui):
          split = layout.split()
  
          col = split.column()
--        col.itemL(text="Motion:")
--        col.itemR(md, "x")
--        col.itemR(md, "y")
--        col.itemR(md, "cyclic")
++        col.label(text="Motion:")
++        col.prop(md, "x")
++        col.prop(md, "y")
++        col.prop(md, "cyclic")
  
--        col = split.column()
--        col.itemR(md, "normals")
++        if wide_ui:
++            col = split.column()
++        col.prop(md, "normals")
          sub = col.column()
          sub.active = md.normals
--        sub.itemR(md, "x_normal", text="X")
--        sub.itemR(md, "y_normal", text="Y")
--        sub.itemR(md, "z_normal", text="Z")
++        sub.prop(md, "x_normal", text="X")
++        sub.prop(md, "y_normal", text="Y")
++        sub.prop(md, "z_normal", text="Z")
  
          split = layout.split()
  
          col = split.column()
--        col.itemL(text="Time:")
++        col.label(text="Time:")
          sub = col.column(align=True)
--        sub.itemR(md, "time_offset", text="Offset")
--        sub.itemR(md, "lifetime", text="Life")
--        col.itemR(md, "damping_time", text="Damping")
++        sub.prop(md, "time_offset", text="Offset")
++        sub.prop(md, "lifetime", text="Life")
++        col.prop(md, "damping_time", text="Damping")
  
--        col = split.column()
--        col.itemL(text="Position:")
++        if wide_ui:
++            col = split.column()
++        col.label(text="Position:")
          sub = col.column(align=True)
--        sub.itemR(md, "start_position_x", text="X")
--        sub.itemR(md, "start_position_y", text="Y")
--        col.itemR(md, "falloff_radius", text="Falloff")
++        sub.prop(md, "start_position_x", text="X")
++        sub.prop(md, "start_position_y", text="Y")
++        col.prop(md, "falloff_radius", text="Falloff")
  
--        layout.itemS()
++        layout.separator()
  
--        layout.itemR(md, "start_position_object")
--        layout.item_pointerR(md, "vertex_group", ob, "vertex_groups")
--        layout.itemR(md, "texture")
--        layout.itemR(md, "texture_coordinates")
++        layout.prop(md, "start_position_object")
++        layout.prop_object(md, "vertex_group", ob, "vertex_groups")
++        layout.prop(md, "texture")
++        layout.prop(md, "texture_coordinates")
          if md.texture_coordinates == 'MAP_UV' and ob.type == 'MESH':
--            layout.item_pointerR(md, "uv_layer", ob.data, "uv_textures")
++            layout.prop_object(md, "uv_layer", ob.data, "uv_textures")
          elif md.texture_coordinates == 'OBJECT':
--            layout.itemR(md, "texture_coordinates_object")
++            layout.prop(md, "texture_coordinates_object")
  
--        layout.itemS()
++        layout.separator()
  
--        flow = layout.column_flow()
--        flow.itemR(md, "speed", slider=True)
--        flow.itemR(md, "height", slider=True)
--        flow.itemR(md, "width", slider=True)
--        flow.itemR(md, "narrowness", slider=True)
++        split = layout.split()
++
++        col = split.column()
++        col.prop(md, "speed", slider=True)
++        col.prop(md, "height", slider=True)
++
++        if wide_ui:
++            col = split.column()
++        col.prop(md, "width", slider=True)
++        col.prop(md, "narrowness", slider=True)
  
  bpy.types.register(DATA_PT_modifiers)
diff --cc release/scripts/ui/properties_data_text.py
index b622264569fae8b7124191de5a989e0783678723,b622264569fae8b7124191de5a989e0783678723..0000000000000000000000000000000000000000
deleted file mode 100644,100644
+++ /dev/null
@@@ -1,205 -1,205 +1,0 @@@
--# ##### BEGIN GPL LICENSE BLOCK #####
--#
--#  This program is free software; you can redistribute it and/or
--#  modify it under the terms of the GNU General Public License
--#  as published by the Free Software Foundation; either version 2
--#  of the License, or (at your option) any later version.
--#
--#  This program is distributed in the hope that it will be useful,
--#  but WITHOUT ANY WARRANTY; without even the implied warranty of
--#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
--#  GNU General Public License for more details.
--#
--#  You should have received a copy of the GNU General Public License
--#  along with this program; if not, write to the Free Software Foundation,
--#  Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
--#
--# ##### END GPL LICENSE BLOCK #####
--
--# <pep8 compliant>
--import bpy
--
--
--class DataButtonsPanel(bpy.types.Panel):
--    bl_space_type = 'PROPERTIES'
--    bl_region_type = 'WINDOW'
--    bl_context = "data"
--
--    def poll(self, context):
--        return (context.object and context.object.type == 'TEXT' and context.curve)
--
--
--class DATA_PT_context_text(DataButtonsPanel):
--    bl_label = ""
--    bl_show_header = False
--
--    def draw(self, context):
--        layout = self.layout
--
--        ob = context.object
--        curve = context.curve
--        space = context.space_data
--
--        split = layout.split(percentage=0.65)
--
--        if ob:
--            split.template_ID(ob, "data")
--            split.itemS()
--        elif curve:
--            split.template_ID(space, "pin_id")
--            split.itemS()
--
--
--class DATA_PT_shape_text(DataButtonsPanel):
--    bl_label = "Shape Text"
--
--    def draw(self, context):
--        layout = self.layout
--
--        ob = context.object
--        curve = context.curve
--        space = context.space_data
--
--        split = layout.split()
--
--        col = split.column()
--        col.itemL(text="Caps:")
--        row = col.row()
--        row .itemR(curve, "front")
--        row .itemR(curve, "back")
--        # col = split.column()
--        col.itemL(text="Textures:")
--        col.itemR(curve, "uv_orco")
--        col.itemR(curve, "auto_texspace")
--
--        col = split.column()
--        col.itemL(text="Resolution:")
--        sub = col.column(align=True)
--        sub.itemR(curve, "resolution_u", text="Preview")
--        sub.itemR(curve, "render_resolution_u", text="Render")
--
--        # resolution_v is not used for text
--
--        sub = col.column(align=True)
--        col.itemL(text="Display:")
--        col.itemR(curve, "fast", text="Fast Editing")
--
--
--class DATA_PT_geometry_text(DataButtonsPanel):
--    bl_label = "Geometry"
--
--    def draw(self, context):
--        layout = self.layout
--
--        curve = context.curve
--
--        split = layout.split()
--
--        col = split.column()
--        col.itemL(text="Modification:")
--        col.itemR(curve, "width")
--        col.itemR(curve, "extrude")
--        col.itemL(text="Taper Object:")
--        col.itemR(curve, "taper_object", text="")
--
--        col = split.column()
--        col.itemL(text="Bevel:")
--        col.itemR(curve, "bevel_depth", text="Depth")
--        col.itemR(curve, "bevel_resolution", text="Resolution")
--        col.itemL(text="Bevel Object:")
--        col.itemR(curve, "bevel_object", text="")
--
--
--class DATA_PT_font(DataButtonsPanel):
--    bl_label = "Font"
--
--    def draw(self, context):
--        layout = self.layout
--
--        text = context.curve
--        char = context.curve.edit_format
--
--        layout.itemR(text, "font")
--
--        row = layout.row()
--        row.itemR(text, "text_size", text="Size")
--        row.itemR(text, "shear")
--
--        split = layout.split()
--
--        col = split.column()
--        col.itemL(text="Object Font:")
--        col.itemR(text, "family", text="")
--
--        col = split.column()
--        col.itemL(text="Text on Curve:")
--        col.itemR(text, "text_on_curve", text="")
--
--        split = layout.split()
--
--        col = split.column()
--        col.itemL(text="Character:")
--        col.itemR(char, "bold")
--        col.itemR(char, "italic")
--        col.itemR(char, "underline")
--#             col.itemR(char, "style")
--#             col.itemR(char, "wrap")
--
--        col = split.column(align=True)
--        col.itemL(text="Underline:")
--        col.itemR(text, "ul_position", text="Position")
--        col.itemR(text, "ul_height", text="Thickness")
--
--
--class DATA_PT_paragraph(DataButtonsPanel):
--    bl_label = "Paragraph"
--
--    def draw(self, context):
--        layout = self.layout
--
--        text = context.curve
--
--        layout.itemL(text="Align:")
--        layout.itemR(text, "spacemode", expand=True)
--
--        split = layout.split()
--
--        col = split.column(align=True)
--        col.itemL(text="Spacing:")
--        col.itemR(text, "spacing", text="Character")
--        col.itemR(text, "word_spacing", text="Word")
--        col.itemR(text, "line_dist", text="Line")
--
--        col = split.column(align=True)
--        col.itemL(text="Offset:")
--        col.itemR(text, "offset_x", text="X")
--        col.itemR(text, "offset_y", text="Y")
--
--
--class DATA_PT_textboxes(DataButtonsPanel):
--    bl_label = "Text Boxes"
--
--    def draw(self, context):
--        layout = self.layout
--
--        text = context.curve
--
--        for box in text.textboxes:
--            split = layout.box().split()
--
--            col = split.column(align=True)
--            col.itemL(text="Dimensions:")
--            col.itemR(box, "width", text="Width")
--            col.itemR(box, "height", text="Height")
--
--            col = split.column(align=True)
--            col.itemL(text="Offset:")
--            col.itemR(box, "x", text="X")
--            col.itemR(box, "y", text="Y")
--
--bpy.types.register(DATA_PT_context_text)
--bpy.types.register(DATA_PT_shape_text)
--bpy.types.register(DATA_PT_geometry_text)
--bpy.types.register(DATA_PT_font)
--bpy.types.register(DATA_PT_paragraph)
--bpy.types.register(DATA_PT_textboxes)
index b445585507da0fabd9efe09089294ff8e61e7551,b445585507da0fabd9efe09089294ff8e61e7551..6f62d35f8db47e54667e33e26651c6e9b9562f3a
@@@ -19,6 -19,6 +19,8 @@@
  # <pep8 compliant>
  import bpy
  
++narrowui = 180
++
  
  class PhysicsButtonsPanel(bpy.types.Panel):
      bl_space_type = 'PROPERTIES'
@@@ -40,115 -40,115 +42,123 @@@ class PHYSICS_PT_game_physics(PhysicsBu
          ob = context.active_object
          game = ob.game
          soft = ob.game.soft_body
++        wide_ui = context.region.width > narrowui
  
--        layout.itemR(game, "physics_type")
--        layout.itemS()
++        if wide_ui:
++            layout.prop(game, "physics_type")
++        else:
++            layout.prop(game, "physics_type", text="")
++        layout.separator()
  
          #if game.physics_type == 'DYNAMIC':
          if game.physics_type in ('DYNAMIC', 'RIGID_BODY'):
              split = layout.split()
  
              col = split.column()
--            col.itemR(game, "actor")
--            col.itemR(game, "ghost")
--            col.itemR(ob, "restrict_render", text="Invisible") # out of place but useful
++            col.prop(game, "actor")
++            col.prop(game, "ghost")
++            col.prop(ob, "restrict_render", text="Invisible") # out of place but useful
  
--            col = split.column()
--            col.itemR(game, "material_physics")
--            col.itemR(game, "rotate_from_normal")
--            col.itemR(game, "no_sleeping")
++            if wide_ui:
++                col = split.column()
++            col.prop(game, "material_physics")
++            col.prop(game, "rotate_from_normal")
++            col.prop(game, "no_sleeping")
  
--            layout.itemS()
++            layout.separator()
  
              split = layout.split()
  
              col = split.column()
--            col.itemL(text="Attributes:")
--            col.itemR(game, "mass")
--            col.itemR(game, "radius")
--            col.itemR(game, "form_factor")
++            col.label(text="Attributes:")
++            col.prop(game, "mass")
++            col.prop(game, "radius")
++            col.prop(game, "form_factor")
  
--            col = split.column()
++            if wide_ui:
++                col = split.column()
              sub = col.column()
              sub.active = (game.physics_type == 'RIGID_BODY')
--            sub.itemR(game, "anisotropic_friction")
++            sub.prop(game, "anisotropic_friction")
              subsub = sub.column()
              subsub.active = game.anisotropic_friction
--            subsub.itemR(game, "friction_coefficients", text="", slider=True)
++            subsub.prop(game, "friction_coefficients", text="", slider=True)
  
              split = layout.split()
  
              col = split.column()
--            col.itemL(text="Velocity:")
++            col.label(text="Velocity:")
              sub = col.column(align=True)
--            sub.itemR(game, "minimum_velocity", text="Minimum")
--            sub.itemR(game, "maximum_velocity", text="Maximum")
++            sub.prop(game, "minimum_velocity", text="Minimum")
++            sub.prop(game, "maximum_velocity", text="Maximum")
  
--            col = split.column()
--            col.itemL(text="Damping:")
++            if wide_ui:
++                col = split.column()
++            col.label(text="Damping:")
              sub = col.column(align=True)
--            sub.itemR(game, "damping", text="Translation", slider=True)
--            sub.itemR(game, "rotation_damping", text="Rotation", slider=True)
++            sub.prop(game, "damping", text="Translation", slider=True)
++            sub.prop(game, "rotation_damping", text="Rotation", slider=True)
  
--            layout.itemS()
++            layout.separator()
  
              split = layout.split()
  
              col = split.column()
--     &