synched with trunk at revision 34793
authorNick Samarin <nicks1987@bigmir.net>
Wed, 16 Feb 2011 16:56:11 +0000 (16:56 +0000)
committerNick Samarin <nicks1987@bigmir.net>
Wed, 16 Feb 2011 16:56:11 +0000 (16:56 +0000)
1  2 
release/scripts/ui/properties_data_modifier.py
release/scripts/ui/properties_game.py
release/scripts/ui/properties_scene.py

index f659b254fd86aa2fecd745d08c6fa9349a20a0df,e93b34fe0556e18f57ea2e92d06fd58ef04b9adb..f17cd8a4b9814675a536b48a3f3892da9a134b43
@@@ -52,24 -52,22 +52,22 @@@ class DATA_PT_modifiers(ModifierButtons
          col = split.column()
          col.label(text="Object:")
          col.prop(md, "object", text="")
+         col.prop(md, "use_deform_preserve_volume")
  
          col = split.column()
-         col.label(text="Vertex Group::")
+         col.label(text="Bind To:")
+         col.prop(md, "use_vertex_groups", text="Vertex Groups")
+         col.prop(md, "use_bone_envelopes", text="Bone Envelopes")
+         split = layout.split()
+         col = split.split()
          col.prop_search(md, "vertex_group", ob, "vertex_groups", text="")
          sub = col.column()
          sub.active = bool(md.vertex_group)
          sub.prop(md, "invert_vertex_group")
  
-         split = layout.split()
-         col = split.column()
-         col.label(text="Bind To:")
-         col.prop(md, "use_vertex_groups", text="Vertex Groups")
-         col.prop(md, "use_bone_envelopes", text="Bone Envelopes")
-         col = split.column()
-         col.label(text="Deformation:")
-         col.prop(md, "use_deform_preserve_volume")
+         col = layout.column()
          col.prop(md, "use_multi_modifier")
  
      def ARRAY(self, layout, ob, md):
              col.prop(md, "use_dynamic_bind")
  
      def MIRROR(self, layout, ob, md):
-         layout.prop(md, "merge_threshold")
          split = layout.split(percentage=0.25)
  
          col = split.column()
  
          col = split.column()
          col.label(text="Options:")
+         col.prop(md, "use_mirror_merge", text="Merge")
          col.prop(md, "use_clip", text="Clipping")
          col.prop(md, "use_mirror_vertex_groups", text="Vertex Groups")
  
          col.prop(md, "use_mirror_v", text="V")
  
          col = layout.column()
+         
+         if md.use_mirror_merge == True:
+             col.prop(md, "merge_threshold")
          col.label(text="Mirror Object:")
          col.prop(md, "mirror_object", text="")
  
 +    def NAVMESH(self, layout, ob, md):
 +        split = layout.split()
 +        if ob.mode == 'EDIT':
 +            col = split.column()
 +            col.operator("object.assign_navpolygon", text="Assign poly idx")
 +            col = split.column()
 +            col.operator("object.assign_new_navpolygon", text="Assign new poly idx")
 +
      def MULTIRES(self, layout, ob, md):
          layout.row().prop(md, "subdivision_type", expand=True)
  
          col.operator("object.multires_subdivide", text="Subdivide")
          col.operator("object.multires_higher_levels_delete", text="Delete Higher")
          col.operator("object.multires_reshape", text="Reshape")
+         col.operator("object.multires_base_apply", text="Apply Base")
          col.prop(md, "show_only_control_edges")
  
          layout.separator()
  
  
  def register():
-     pass
+     bpy.utils.register_module(__name__)
  
  
  def unregister():
-     pass
+     bpy.utils.unregister_module(__name__)
  
  if __name__ == "__main__":
      register()
index f8f88586bdd4ebe23d0f9505dbe9395d76cdb023,2717e315ee8287d7af235cd248d778793bc5ecdf..60934891b7f11446fbcdb32c62c4dcbe685898e3
@@@ -72,7 -72,6 +72,6 @@@ class PHYSICS_PT_game_physics(PhysicsBu
  
              col = split.column()
              sub = col.column()
-             sub.active = (game.physics_type == 'RIGID_BODY')
              sub.prop(game, "use_anisotropic_friction")
              subsub = sub.column()
              subsub.active = game.use_anisotropic_friction
              col.prop(game, "use_ghost")
              col.prop(ob, "hide_render", text="Invisible")
  
+             layout.separator()
+             split = layout.split()
+             col = split.column()
+             col.label(text="Attributes:")
+             col.prop(game, "radius")
+             col = split.column()
+             sub = col.column()
+             sub.prop(game, "use_anisotropic_friction")
+             subsub = sub.column()
+             subsub.active = game.use_anisotropic_friction
+             subsub.prop(game, "friction_coefficients", text="", slider=True)
          elif game.physics_type in ('SENSOR', 'INVISIBLE', 'NO_COLLISION', 'OCCLUDE'):
              layout.prop(ob, "hide_render", text="Invisible")
  
@@@ -184,31 -198,6 +198,31 @@@ class PHYSICS_PT_game_collision_bounds(
          col = split.column()
          col.prop(game, "use_collision_compound", text="Compound")
  
 +class PHYSICS_PT_game_obstacles(PhysicsButtonsPanel, bpy.types.Panel):
 +    bl_label = "Create obstacle"
 +    COMPAT_ENGINES = {'BLENDER_GAME'}
 +
 +    @classmethod
 +    def poll(self, context):
 +        game = context.object.game
 +        rd = context.scene.render
 +        return (game.physics_type in ('DYNAMIC', 'RIGID_BODY', 'SENSOR', 'SOFT_BODY', 'STATIC'))  and (rd.engine in cls.COMPAT_ENGINES)
 +
 +    def draw_header(self, context):
 +        game = context.active_object.game
 +
 +        self.layout.prop(game, "create_obstacle", text="")
 +
 +    def draw(self, context):
 +        layout = self.layout
 +
 +        game = context.active_object.game
 +
 +        layout.active = game.create_obstacle
 +
 +        split = layout.split()
 +        col = split.column()
 +        col.prop(game, "obstacle_radius", text="Radius")
  
  class RenderButtonsPanel():
      bl_space_type = 'PROPERTIES'
@@@ -353,21 -342,25 +367,25 @@@ class RENDER_PT_game_performance(Render
          layout = self.layout
  
          gs = context.scene.game_settings
+         row = layout.row()
+         row.prop(gs, "use_frame_rate")
+         row.prop(gs, "use_display_lists")
  
-         split = layout.split()
  
-         col = split.column()
-         col.label(text="Show:")
-         col.prop(gs, "show_debug_properties", text="Debug Properties")
-         col.prop(gs, "show_framerate_profile", text="Framerate and Profile")
-         col.prop(gs, "show_physics_visualization", text="Physics Visualization")
-         col.prop(gs, "use_deprecation_warnings")
+ class RENDER_PT_game_display(RenderButtonsPanel, bpy.types.Panel):
+     bl_label = "Display"
+     COMPAT_ENGINES = {'BLENDER_GAME'}
  
-         col = split.column()
+     def draw(self, context):
+         layout = self.layout
  
-         col.label(text="Render:")
-         col.prop(gs, "use_frame_rate")
-         col.prop(gs, "use_display_lists")
+         gs = context.scene.game_settings
+         flow = layout.column_flow()
+         flow.prop(gs, "show_debug_properties", text="Debug Properties")
+         flow.prop(gs, "show_framerate_profile", text="Framerate and Profile")
+         flow.prop(gs, "show_physics_visualization", text="Physics Visualization")
+         flow.prop(gs, "use_deprecation_warnings")
+         flow.prop(gs, "show_mouse")
  
  
  class RENDER_PT_game_sound(RenderButtonsPanel, bpy.types.Panel):
@@@ -515,26 -508,13 +533,26 @@@ class WORLD_PT_game_physics(WorldButton
              col.label(text="Logic Steps:")
              col.prop(gs, "logic_step_max", text="Max")
  
 +class WORLD_PT_game_physics_obstacles(WorldButtonsPanel, bpy.types.Panel):
 +    bl_label = "Obstacle simulation"
 +    COMPAT_ENGINES = {'BLENDER_GAME'}
 +
 +    def draw(self, context):
 +        layout = self.layout
 +
 +        gs = context.scene.game_settings
 +
 +        layout.prop(gs, "obstacle_simulation", text = "Type")
 +        if gs.obstacle_simulation != 'None':
 +            layout.prop(gs, "level_height")
 +            layout.prop(gs, "show_obstacle_simulation")
  
  def register():
-     pass
+     bpy.utils.register_module(__name__)
  
  
  def unregister():
-     pass
+     bpy.utils.unregister_module(__name__)
  
  if __name__ == "__main__":
      register()
index 46a8e90393d199e599476efbd7a41558d5e30f47,d3586c645e65dd38d738f9edbe4f289564c58199..51fe7c9e132107c2cb18c05bdaff94c24aa5ae82
@@@ -53,6 -53,7 +53,7 @@@ class SCENE_PT_unit(SceneButtonsPanel, 
  
          col = layout.column()
          col.row().prop(unit, "system", expand=True)
+         col.row().prop(unit, "system_rotation", expand=True)
  
          split = layout.split()
          split.active = (unit.system != 'NONE')
@@@ -63,8 -64,6 +64,6 @@@
          col = split.column()
          col.prop(unit, "use_separate")
  
-         layout.column().prop(unit, "rotation_units")
  
  class SCENE_PT_keying_sets(SceneButtonsPanel, bpy.types.Panel):
      bl_label = "Keying Sets"
@@@ -198,6 -197,7 +197,7 @@@ class SCENE_PT_simplify(SceneButtonsPan
  class SCENE_PT_custom_props(SceneButtonsPanel, PropertyPanel, bpy.types.Panel):
      COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
      _context_path = "scene"
+     _property_type = bpy.types.Scene
  
  
  from bpy.props import *
@@@ -229,7 -229,7 +229,7 @@@ class ANIM_OT_keying_set_export(bpy.typ
          f.write("# Keying Set: %s\n" % ks.name)
  
          f.write("import bpy\n\n")
-         f.write("scene= bpy.data.scenes[0]\n\n") # XXX, why not use the current scene?
+         f.write("scene= bpy.data.scenes[0]\n\n")  # XXX, why not use the current scene?
  
          # Add KeyingSet and set general settings
          f.write("# Keying Set Level declarations\n")
          if not ks.is_path_absolute:
              f.write("ks.is_path_absolute = False\n")
          f.write("\n")
-     
          f.write("ks.bl_options = %r\n" % ks.bl_options)
          f.write("\n")
  
  
      def invoke(self, context, event):
          wm = context.window_manager
-         wm.add_fileselect(self)
+         wm.fileselect_add(self)
          return {'RUNNING_MODAL'}
  
-     COMPAT_ENGINES = {'BLENDER_RENDER'}
 +class SCENE_PT_navmesh(SceneButtonsPanel, bpy.types.Panel):
 +    bl_label = "Navmesh"
 +    bl_default_closed = True
++    COMPAT_ENGINES = {'BLENDER_GAME'}
 +
 +    def draw(self, context):
 +        layout = self.layout
 +
 +        rd = context.scene.game_settings.recast_data
 +
 +        layout.operator("object.create_navmesh", text='Build navigation mesh')
 +
 +        layout.label(text="Rasterization:")
 +        split = layout.split()
 +
 +        col = split.column()
 +        col.prop(rd, "cell_size")
 +        col = split.column()
 +        col.prop(rd, "cell_height")
 +
 +        layout.separator()
 +
 +        layout.label(text="Agent:")
 +        split = layout.split()
 +
 +        col = split.column()
 +        row = col.row()
 +        row.prop(rd, "agent_height")
 +        row = col.row()
 +        row.prop(rd, "agent_radius")
 +
 +        col = split.column()
 +        row = col.row()
 +        row.prop(rd, "max_slope")
 +        row = col.row()
 +        row.prop(rd, "max_climb")
 +
 +        layout.separator()
 +
 +        layout.label(text="Region:")
 +        split = layout.split()
 +        col = split.column()
 +        col.prop(rd, "region_min_size")
 +
 +        col = split.column()
 +        col.prop(rd, "region_merge_size")
 +
 +        layout.separator()
 +
 +        layout.label(text="Polygonization:")
 +        split = layout.split()
 +        col = split.column()
 +        row = col.row()
 +        row.prop(rd, "edge_max_len")
 +        row = col.row()
 +        row.prop(rd, "edge_max_error")
 +
 +        col = split.column()
 +        row = col.row()
 +        row.prop(rd, "verts_per_poly")
 +
 +        layout.separator()
 +
 +        layout.label(text="Detail Mesh:")
 +        split = layout.split()
 +        col = split.column()
 +        col.prop(rd, "sample_dist")
 +
 +        col = split.column()
 +        col.prop(rd, "sample_max_error")
 +
  
  def register():
-     pass
+     bpy.utils.register_module(__name__)
  
  
  def unregister():
-     pass
+     bpy.utils.unregister_module(__name__)
  
  if __name__ == "__main__":
      register()