Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Sharybin <sergey.vfx@gmail.com>2011-09-15 17:02:37 +0400
committerSergey Sharybin <sergey.vfx@gmail.com>2011-09-15 17:02:37 +0400
commit30293dc2ca8052ad0c7113c77365feca590f4d05 (patch)
treec5f4a092be7204ef2107792c0a16c0d9f331dbba /release/scripts/startup/bl_ui
parente715a7185ca176c8a73cd638d4acaa40f75a7d77 (diff)
parent9648c6016b35a72aa23395f5d200e342df16490b (diff)
svn merge -r39834:40222 https://svn.blender.org/svnroot/bf-blender/trunk/blender
Diffstat (limited to 'release/scripts/startup/bl_ui')
-rw-r--r--release/scripts/startup/bl_ui/properties_data_armature.py10
-rw-r--r--release/scripts/startup/bl_ui/properties_data_modifier.py159
-rw-r--r--release/scripts/startup/bl_ui/properties_data_speaker.py2
-rw-r--r--release/scripts/startup/bl_ui/properties_game.py112
-rw-r--r--release/scripts/startup/bl_ui/properties_physics_fluid.py2
-rw-r--r--release/scripts/startup/bl_ui/space_userpref.py13
-rw-r--r--release/scripts/startup/bl_ui/space_view3d_toolbar.py7
7 files changed, 277 insertions, 28 deletions
diff --git a/release/scripts/startup/bl_ui/properties_data_armature.py b/release/scripts/startup/bl_ui/properties_data_armature.py
index 96e10919806..708f485a0f8 100644
--- a/release/scripts/startup/bl_ui/properties_data_armature.py
+++ b/release/scripts/startup/bl_ui/properties_data_armature.py
@@ -74,6 +74,7 @@ class DATA_PT_skeleton(ArmatureButtonsPanel, Panel):
if context.scene.render.engine == "BLENDER_GAME":
layout.row().prop(arm, "vert_deformer", expand=True)
+
class DATA_PT_display(ArmatureButtonsPanel, Panel):
bl_label = _("Display")
@@ -185,9 +186,12 @@ class DATA_PT_pose_library(ArmatureButtonsPanel, Panel):
layout.template_ID(ob, "pose_library", new="poselib.new", unlink="poselib.unlink")
if poselib:
+ # list of poses in pose library
row = layout.row()
row.template_list(poselib, "pose_markers", poselib.pose_markers, "active_index", rows=5)
+ # column of operators for active pose
+ # - goes beside list
col = row.column(align=True)
col.active = (poselib.library is None)
@@ -203,7 +207,11 @@ class DATA_PT_pose_library(ArmatureButtonsPanel, Panel):
col.operator("poselib.pose_remove", icon='ZOOMOUT', text="").pose = pose_marker_active.name
col.operator("poselib.apply_pose", icon='ZOOM_SELECTED', text="").pose_index = poselib.pose_markers.active_index
- layout.operator("poselib.action_sanitise")
+ col.operator("poselib.action_sanitise", icon='HELP', text="") # XXX: put in menu?
+
+ # properties for active marker
+ if pose_marker_active is not None:
+ layout.prop(pose_marker_active, "name")
# TODO: this panel will soon be depreceated too
diff --git a/release/scripts/startup/bl_ui/properties_data_modifier.py b/release/scripts/startup/bl_ui/properties_data_modifier.py
index 40e455ef88e..8f1e1af4802 100644
--- a/release/scripts/startup/bl_ui/properties_data_modifier.py
+++ b/release/scripts/startup/bl_ui/properties_data_modifier.py
@@ -379,6 +379,10 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel):
col.label(text=_("Mirror Object:"))
col.prop(md, "mirror_object", text="")
+ def NAVMESH(self, layout, ob, md):
+ layout.operator("object.assign_navpolygon")
+ layout.operator("object.assign_new_navpolygon")
+
def MULTIRES(self, layout, ob, md):
layout.row().prop(md, "subdivision_type", expand=True)
@@ -608,32 +612,31 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel):
layout.label(text=_("Settings can be found inside the Physics context"))
def UV_PROJECT(self, layout, ob, md):
- if ob.type == 'MESH':
- split = layout.split()
+ split = layout.split()
- col = split.column()
- col.label(text=_("Image:"))
- col.prop(md, "image", text="")
+ col = split.column()
+ col.label(text=_("Image:"))
+ col.prop(md, "image", text="")
- col = split.column()
- col.label(text=_("UV Layer:"))
- col.prop_search(md, "uv_layer", ob.data, "uv_textures", text="")
+ col = split.column()
+ col.label(text=_("UV Layer:"))
+ col.prop_search(md, "uv_layer", ob.data, "uv_textures", text="")
- split = layout.split()
- col = split.column()
- col.prop(md, "use_image_override")
- col.prop(md, "projector_count", text=_("Projectors"))
- for proj in md.projectors:
- col.prop(proj, "object", text="")
+ split = layout.split()
+ col = split.column()
+ col.prop(md, "use_image_override")
+ col.prop(md, "projector_count", text=_("Projectors"))
+ for proj in md.projectors:
+ col.prop(proj, "object", text="")
- col = split.column()
- sub = col.column(align=True)
- sub.prop(md, "aspect_x", text=_("Aspect X"))
- sub.prop(md, "aspect_y", text=_("Aspect Y"))
+ col = split.column()
+ sub = col.column(align=True)
+ sub.prop(md, "aspect_x", text=_("Aspect X"))
+ sub.prop(md, "aspect_y", text=_("Aspect Y"))
- sub = col.column(align=True)
- sub.prop(md, "scale_x", text=_("Scale X"))
- sub.prop(md, "scale_y", text=_("Scale Y"))
+ sub = col.column(align=True)
+ sub.prop(md, "scale_x", text=_("Scale X"))
+ sub.prop(md, "scale_y", text=_("Scale Y"))
def WARP(self, layout, ob, md):
use_falloff = (md.falloff_type != 'NONE')
@@ -737,5 +740,119 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel):
col.prop(md, "width", slider=True)
col.prop(md, "narrowness", slider=True)
+ @staticmethod
+ def vertex_weight_mask(layout, ob, md):
+ layout.label(text="Influence/Mask Options:")
+
+ split = layout.split(percentage=0.4)
+ split.label(text="Global Influence:")
+ split.prop(md, "mask_constant", text="")
+
+ if not md.mask_texture:
+ split = layout.split(percentage=0.4)
+ split.label(text="Vertex Group Mask:")
+ split.prop_search(md, "mask_vertex_group", ob, "vertex_groups", text="")
+
+ if not md.mask_vertex_group:
+ split = layout.split(percentage=0.4)
+ split.label(text="Texture Mask:")
+ split.template_ID(md, "mask_texture", new="texture.new")
+ if md.mask_texture:
+ split = layout.split()
+
+ col = split.column()
+ col.label(text="Texture Coordinates:")
+ col.prop(md, "mask_tex_mapping", text="")
+
+ col = split.column()
+ col.label(text="Use Channel:")
+ col.prop(md, "mask_tex_use_channel", text="")
+
+ if md.mask_tex_mapping == 'OBJECT':
+ layout.prop(md, "mask_tex_map_object", text="Object")
+ elif md.mask_tex_mapping == 'UV' and ob.type == 'MESH':
+ layout.prop_search(md, "mask_tex_uv_layer", ob.data, "uv_textures")
+
+ def VERTEX_WEIGHT_EDIT(self, layout, ob, md):
+ split = layout.split()
+ col = split.column()
+ col.label(text="Vertex Group:")
+ col.prop_search(md, "vertex_group", ob, "vertex_groups", text="")
+
+ col = split.column()
+ col.label(text="Default Weight:")
+ col.prop(md, "default_weight", text="")
+
+ layout.prop(md, "falloff_type")
+ if md.falloff_type == 'CURVE':
+ col = layout.column()
+ col.template_curve_mapping(md, "map_curve")
+
+ split = layout.split(percentage=0.4)
+ split.prop(md, "use_add")
+ row = split.row()
+ row.active = md.use_add
+ row.prop(md, "add_threshold")
+
+ split = layout.split(percentage=0.4)
+ split.prop(md, "use_remove")
+ row = split.row()
+ row.active = md.use_remove
+ row.prop(md, "remove_threshold")
+
+ # Common mask options
+ layout.separator()
+ self.vertex_weight_mask(layout, ob, md)
+
+ def VERTEX_WEIGHT_MIX(self, layout, ob, md):
+ split = layout.split()
+
+ col = split.column()
+ col.label(text="Vertex Group A:")
+ col.prop_search(md, "vertex_group_a", ob, "vertex_groups", text="")
+ col.label(text="Default Weight A:")
+ col.prop(md, "default_weight_a", text="")
+
+ col.label(text="Mix Mode:")
+ col.prop(md, "mix_mode", text="")
+
+ col = split.column()
+ col.label(text="Vertex Group B:")
+ col.prop_search(md, "vertex_group_b", ob, "vertex_groups", text="")
+ col.label(text="Default Weight B:")
+ col.prop(md, "default_weight_b", text="")
+
+ col.label(text="Mix Set:")
+ col.prop(md, "mix_set", text="")
+
+ # Common mask options
+ layout.separator()
+ self.vertex_weight_mask(layout, ob, md)
+
+ def VERTEX_WEIGHT_PROXIMITY(self, layout, ob, md):
+ split = layout.split()
+
+ col = split.column()
+ col.label(text="Vertex Group:")
+ col.prop_search(md, "vertex_group", ob, "vertex_groups", text="")
+
+ col = split.column()
+ col.label(text="Target Object:")
+ col.prop(md, "target", text="")
+
+ layout.row().prop(md, "proximity_mode", expand=True)
+ if md.proximity_mode == 'GEOMETRY':
+ layout.row().prop(md, "proximity_geometry", expand=True)
+
+ row = layout.row()
+ row.prop(md, "min_dist")
+ row.prop(md, "max_dist")
+
+ layout.prop(md, "falloff_type")
+
+ # Common mask options
+ layout.separator()
+ self.vertex_weight_mask(layout, ob, md)
+
if __name__ == "__main__": # only for live edit.
bpy.utils.register_module(__name__)
diff --git a/release/scripts/startup/bl_ui/properties_data_speaker.py b/release/scripts/startup/bl_ui/properties_data_speaker.py
index 657c0fe652a..a1b86b51f5f 100644
--- a/release/scripts/startup/bl_ui/properties_data_speaker.py
+++ b/release/scripts/startup/bl_ui/properties_data_speaker.py
@@ -81,7 +81,7 @@ class DATA_PT_distance(DataButtonsPanel, bpy.types.Panel):
speaker = context.speaker
split = layout.split()
-
+
col = split.column()
col.label("Volume:")
col.prop(speaker, "volume_min", text="Minimum")
diff --git a/release/scripts/startup/bl_ui/properties_game.py b/release/scripts/startup/bl_ui/properties_game.py
index 123abdfe54a..52cdfc4ad00 100644
--- a/release/scripts/startup/bl_ui/properties_game.py
+++ b/release/scripts/startup/bl_ui/properties_game.py
@@ -196,6 +196,33 @@ class PHYSICS_PT_game_collision_bounds(PhysicsButtonsPanel, Panel):
row.prop(game, "use_collision_compound", text=_("Compound"))
+class PHYSICS_PT_game_obstacles(PhysicsButtonsPanel, Panel):
+ bl_label = "Create Obstacle"
+ COMPAT_ENGINES = {'BLENDER_GAME'}
+
+ @classmethod
+ def poll(cls, 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
+
+ row = layout.row()
+ row.prop(game, "obstacle_radius", text="Radius")
+ row.label()
+
+
class RenderButtonsPanel():
bl_space_type = 'PROPERTIES'
bl_region_type = 'WINDOW'
@@ -344,7 +371,7 @@ class RENDER_PT_game_performance(RenderButtonsPanel, Panel):
row = col.row()
row.prop(gs, "use_frame_rate")
row.prop(gs, "use_display_lists")
-
+
col.prop(gs, "restrict_animation_updates")
@@ -364,6 +391,69 @@ class RENDER_PT_game_display(RenderButtonsPanel, Panel):
flow.prop(gs, "show_mouse", text=_("Mouse Cursor"))
+class SceneButtonsPanel():
+ bl_space_type = 'PROPERTIES'
+ bl_region_type = 'WINDOW'
+ bl_context = "scene"
+
+
+class SCENE_PT_game_navmesh(SceneButtonsPanel, bpy.types.Panel):
+ bl_label = "Navigation mesh"
+ bl_default_closed = True
+ COMPAT_ENGINES = {'BLENDER_GAME'}
+
+ @classmethod
+ def poll(cls, context):
+ scene = context.scene
+ return (scene and scene.render.engine in cls.COMPAT_ENGINES)
+
+ def draw(self, context):
+ layout = self.layout
+
+ rd = context.scene.game_settings.recast_data
+
+ layout.operator("object.create_navmesh", text='Build navigation mesh')
+
+ col = layout.column()
+ col.label(text="Rasterization:")
+ row = col.row()
+ row.prop(rd, "cell_size")
+ row.prop(rd, "cell_height")
+
+ col = layout.column()
+ col.label(text="Agent:")
+ split = col.split()
+
+ col = split.column()
+ col.prop(rd, "agent_height", text="Height")
+ col.prop(rd, "agent_radius", text="Radius")
+
+ col = split.column()
+ col.prop(rd, "max_slope")
+ col.prop(rd, "max_climb")
+
+ col = layout.column()
+ col.label(text="Region:")
+ row = col.row()
+ row.prop(rd, "region_min_size")
+ row.prop(rd, "region_merge_size")
+
+ col = layout.column()
+ col.label(text="Polygonization:")
+ split = col.split()
+
+ col = split.column()
+ col.prop(rd, "edge_max_len")
+ col.prop(rd, "edge_max_error")
+
+ split.prop(rd, "verts_per_poly")
+
+ col = layout.column()
+ col.label(text="Detail Mesh:")
+ row = col.row()
+ row.prop(rd, "sample_dist")
+ row.prop(rd, "sample_max_error")
+
class WorldButtonsPanel():
bl_space_type = 'PROPERTIES'
@@ -488,5 +578,25 @@ class WORLD_PT_game_physics(WorldButtonsPanel, Panel):
col.label(text=_("Logic Steps:"))
col.prop(gs, "logic_step_max", text=_("Max"))
+
+class WORLD_PT_game_physics_obstacles(WorldButtonsPanel, Panel):
+ bl_label = "Obstacle simulation"
+ COMPAT_ENGINES = {'BLENDER_GAME'}
+
+ @classmethod
+ def poll(cls, context):
+ scene = context.scene
+ return (scene.world and scene.render.engine in cls.COMPAT_ENGINES)
+
+ 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")
+
if __name__ == "__main__": # only for live edit.
bpy.utils.register_module(__name__)
diff --git a/release/scripts/startup/bl_ui/properties_physics_fluid.py b/release/scripts/startup/bl_ui/properties_physics_fluid.py
index cd808c2cf45..775ad116846 100644
--- a/release/scripts/startup/bl_ui/properties_physics_fluid.py
+++ b/release/scripts/startup/bl_ui/properties_physics_fluid.py
@@ -46,7 +46,7 @@ class PHYSICS_PT_fluid(PhysicButtonsPanel, Panel):
row = layout.row()
if fluid is None:
- row.label(_("built without fluids"))
+ row.label(_("Built without fluids"))
return
row.prop(fluid, "type")
diff --git a/release/scripts/startup/bl_ui/space_userpref.py b/release/scripts/startup/bl_ui/space_userpref.py
index 12f992903c7..c90497de29c 100644
--- a/release/scripts/startup/bl_ui/space_userpref.py
+++ b/release/scripts/startup/bl_ui/space_userpref.py
@@ -773,7 +773,18 @@ class USERPREF_MT_ndof_settings(Menu):
layout.separator()
layout.label(text="orbit options")
- layout.prop(input_prefs, "ndof_orbit_invert_axes")
+ if input_prefs.view_rotate_method == 'TRACKBALL':
+ layout.prop(input_prefs, "ndof_roll_invert_axis")
+ layout.prop(input_prefs, "ndof_tilt_invert_axis")
+ layout.prop(input_prefs, "ndof_rotate_invert_axis")
+ else:
+ layout.prop(input_prefs, "ndof_orbit_invert_axes")
+
+ layout.separator()
+ layout.label(text="pan options")
+ layout.prop(input_prefs, "ndof_panx_invert_axis")
+ layout.prop(input_prefs, "ndof_pany_invert_axis")
+ layout.prop(input_prefs, "ndof_panz_invert_axis")
layout.separator()
layout.label(text="fly options")
diff --git a/release/scripts/startup/bl_ui/space_view3d_toolbar.py b/release/scripts/startup/bl_ui/space_view3d_toolbar.py
index 62836a20381..16d4b9b7fe6 100644
--- a/release/scripts/startup/bl_ui/space_view3d_toolbar.py
+++ b/release/scripts/startup/bl_ui/space_view3d_toolbar.py
@@ -55,6 +55,9 @@ def draw_gpencil_tools(context, layout):
row = col.row()
row.operator("gpencil.draw", text=_("Draw")).mode = 'DRAW'
row.operator("gpencil.draw", text=_("Line")).mode = 'DRAW_STRAIGHT'
+
+ row = col.row()
+ row.operator("gpencil.draw", text=_("Poly")).mode = 'DRAW_POLY'
row.operator("gpencil.draw", text=_("Erase")).mode = 'ERASER'
row = col.row()
@@ -766,9 +769,9 @@ class VIEW3D_PT_tools_brush_texture(PaintPanel, Panel):
col = row.column()
if brush.use_texture_overlay:
- col.prop(brush, "use_texture_overlay", toggle=True, text="", icon='MUTE_IPO_OFF')
+ col.prop(brush, "use_texture_overlay", toggle=True, text="", icon='RESTRICT_VIEW_OFF')
else:
- col.prop(brush, "use_texture_overlay", toggle=True, text="", icon='MUTE_IPO_ON')
+ col.prop(brush, "use_texture_overlay", toggle=True, text="", icon='RESTRICT_VIEW_ON')
col.active = tex_slot.map_mode in {'FIXED', 'TILED'}