2009-11-01 15:21:20 +00:00
|
|
|
# ##### 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.
|
2009-11-03 07:23:02 +00:00
|
|
|
#
|
2009-11-01 15:21:20 +00:00
|
|
|
# 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.
|
2009-11-03 07:23:02 +00:00
|
|
|
#
|
2009-11-01 15:21:20 +00:00
|
|
|
# You should have received a copy of the GNU General Public License
|
|
|
|
# along with this program; if not, write to the Free Software Foundation,
|
2010-02-12 13:34:04 +00:00
|
|
|
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
2009-11-01 15:21:20 +00:00
|
|
|
#
|
|
|
|
# ##### END GPL LICENSE BLOCK #####
|
2009-10-31 20:16:59 +00:00
|
|
|
|
2009-10-31 23:35:56 +00:00
|
|
|
# <pep8 compliant>
|
2009-07-20 20:28:29 +00:00
|
|
|
import bpy
|
2011-08-12 06:57:00 +00:00
|
|
|
from bpy.types import Panel
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2009-11-21 00:05:43 +00:00
|
|
|
|
2010-08-02 02:55:12 +00:00
|
|
|
class PhysicsButtonsPanel():
|
2009-10-31 19:31:45 +00:00
|
|
|
bl_space_type = 'PROPERTIES'
|
|
|
|
bl_region_type = 'WINDOW'
|
|
|
|
bl_context = "physics"
|
2009-07-20 20:28:29 +00:00
|
|
|
|
2009-10-31 23:35:56 +00:00
|
|
|
|
2011-08-12 06:57:00 +00:00
|
|
|
class PHYSICS_PT_game_physics(PhysicsButtonsPanel, Panel):
|
2009-10-31 19:31:45 +00:00
|
|
|
bl_label = "Physics"
|
2010-06-10 23:53:13 +00:00
|
|
|
COMPAT_ENGINES = {'BLENDER_GAME'}
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2010-08-09 01:37:09 +00:00
|
|
|
@classmethod
|
|
|
|
def poll(cls, context):
|
2010-08-05 16:05:30 +00:00
|
|
|
ob = context.active_object
|
|
|
|
rd = context.scene.render
|
2010-08-09 01:37:09 +00:00
|
|
|
return ob and ob.game and (rd.engine in cls.COMPAT_ENGINES)
|
2010-08-05 16:05:30 +00:00
|
|
|
|
2009-10-31 19:31:45 +00:00
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
|
|
|
|
|
|
|
ob = context.active_object
|
|
|
|
game = ob.game
|
|
|
|
soft = ob.game.soft_body
|
|
|
|
|
2010-08-06 15:17:44 +00:00
|
|
|
layout.prop(game, "physics_type")
|
2009-11-23 00:27:30 +00:00
|
|
|
layout.separator()
|
2009-10-31 19:31:45 +00:00
|
|
|
|
|
|
|
#if game.physics_type == 'DYNAMIC':
|
2011-03-07 13:23:45 +00:00
|
|
|
if game.physics_type in {'DYNAMIC', 'RIGID_BODY'}:
|
2009-10-31 19:31:45 +00:00
|
|
|
split = layout.split()
|
|
|
|
|
|
|
|
col = split.column()
|
2010-08-18 07:14:10 +00:00
|
|
|
col.prop(game, "use_actor")
|
|
|
|
col.prop(game, "use_ghost")
|
2010-09-07 15:17:42 +00:00
|
|
|
col.prop(ob, "hide_render", text="Invisible") # out of place but useful
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2010-08-06 15:17:44 +00:00
|
|
|
col = split.column()
|
2011-03-03 01:47:17 +00:00
|
|
|
col.prop(game, "use_material_physics_fh")
|
2010-08-19 17:10:43 +00:00
|
|
|
col.prop(game, "use_rotate_from_normal")
|
2010-08-18 07:14:10 +00:00
|
|
|
col.prop(game, "use_sleep")
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2009-11-23 00:27:30 +00:00
|
|
|
layout.separator()
|
2009-10-31 19:31:45 +00:00
|
|
|
|
|
|
|
split = layout.split()
|
|
|
|
|
|
|
|
col = split.column()
|
2009-11-23 00:27:30 +00:00
|
|
|
col.label(text="Attributes:")
|
|
|
|
col.prop(game, "mass")
|
|
|
|
col.prop(game, "radius")
|
|
|
|
col.prop(game, "form_factor")
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2010-08-06 15:17:44 +00:00
|
|
|
col = split.column()
|
2009-10-31 19:31:45 +00:00
|
|
|
sub = col.column()
|
2010-08-19 17:10:43 +00:00
|
|
|
sub.prop(game, "use_anisotropic_friction")
|
2009-10-31 19:31:45 +00:00
|
|
|
subsub = sub.column()
|
2010-08-19 17:10:43 +00:00
|
|
|
subsub.active = game.use_anisotropic_friction
|
2009-11-23 00:27:30 +00:00
|
|
|
subsub.prop(game, "friction_coefficients", text="", slider=True)
|
2009-10-31 19:31:45 +00:00
|
|
|
|
|
|
|
split = layout.split()
|
|
|
|
|
|
|
|
col = split.column()
|
2009-11-23 00:27:30 +00:00
|
|
|
col.label(text="Velocity:")
|
2009-10-31 19:31:45 +00:00
|
|
|
sub = col.column(align=True)
|
2010-08-19 17:10:43 +00:00
|
|
|
sub.prop(game, "velocity_min", text="Minimum")
|
|
|
|
sub.prop(game, "velocity_max", text="Maximum")
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2010-08-06 15:17:44 +00:00
|
|
|
col = split.column()
|
2009-11-23 00:27:30 +00:00
|
|
|
col.label(text="Damping:")
|
2009-10-31 19:31:45 +00:00
|
|
|
sub = col.column(align=True)
|
2009-11-23 00:27:30 +00:00
|
|
|
sub.prop(game, "damping", text="Translation", slider=True)
|
|
|
|
sub.prop(game, "rotation_damping", text="Rotation", slider=True)
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2009-11-23 00:27:30 +00:00
|
|
|
layout.separator()
|
2009-10-31 19:31:45 +00:00
|
|
|
|
|
|
|
split = layout.split()
|
|
|
|
|
|
|
|
col = split.column()
|
2009-11-23 00:27:30 +00:00
|
|
|
col.label(text="Lock Translation:")
|
2010-08-19 17:10:43 +00:00
|
|
|
col.prop(game, "lock_location_x", text="X")
|
|
|
|
col.prop(game, "lock_location_y", text="Y")
|
|
|
|
col.prop(game, "lock_location_z", text="Z")
|
2009-10-31 19:31:45 +00:00
|
|
|
|
|
|
|
col = split.column()
|
2009-11-23 00:27:30 +00:00
|
|
|
col.label(text="Lock Rotation:")
|
2010-08-19 17:10:43 +00:00
|
|
|
col.prop(game, "lock_rotation_x", text="X")
|
|
|
|
col.prop(game, "lock_rotation_y", text="Y")
|
|
|
|
col.prop(game, "lock_rotation_z", text="Z")
|
2009-10-31 19:31:45 +00:00
|
|
|
|
|
|
|
elif game.physics_type == 'SOFT_BODY':
|
|
|
|
col = layout.column()
|
2010-08-18 07:14:10 +00:00
|
|
|
col.prop(game, "use_actor")
|
|
|
|
col.prop(game, "use_ghost")
|
2010-07-15 16:56:04 +00:00
|
|
|
col.prop(ob, "hide_render", text="Invisible")
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2009-11-23 00:27:30 +00:00
|
|
|
layout.separator()
|
2009-10-31 19:31:45 +00:00
|
|
|
|
|
|
|
split = layout.split()
|
|
|
|
|
|
|
|
col = split.column()
|
2009-11-23 00:27:30 +00:00
|
|
|
col.label(text="Attributes:")
|
|
|
|
col.prop(game, "mass")
|
2010-08-18 07:14:10 +00:00
|
|
|
col.prop(soft, "weld_threshold")
|
2010-08-20 06:09:58 +00:00
|
|
|
col.prop(soft, "location_iterations")
|
|
|
|
col.prop(soft, "linear_stiffness", slider=True)
|
2009-11-23 00:27:30 +00:00
|
|
|
col.prop(soft, "dynamic_friction", slider=True)
|
2010-08-18 07:14:10 +00:00
|
|
|
col.prop(soft, "collision_margin", slider=True)
|
2010-08-20 06:09:58 +00:00
|
|
|
col.prop(soft, "use_bending_constraints", text="Bending Constraints")
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2010-08-06 15:17:44 +00:00
|
|
|
col = split.column()
|
2010-08-20 06:09:58 +00:00
|
|
|
col.prop(soft, "use_shape_match")
|
2009-10-31 19:31:45 +00:00
|
|
|
sub = col.column()
|
2010-08-20 06:09:58 +00:00
|
|
|
sub.active = soft.use_shape_match
|
2010-08-18 07:14:10 +00:00
|
|
|
sub.prop(soft, "shape_threshold", slider=True)
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2009-11-23 00:27:30 +00:00
|
|
|
col.separator()
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2009-11-23 00:27:30 +00:00
|
|
|
col.label(text="Cluster Collision:")
|
2010-08-20 06:09:58 +00:00
|
|
|
col.prop(soft, "use_cluster_rigid_to_softbody")
|
|
|
|
col.prop(soft, "use_cluster_soft_to_softbody")
|
2009-10-31 23:35:56 +00:00
|
|
|
sub = col.column()
|
2010-08-22 16:33:26 +00:00
|
|
|
sub.active = (soft.use_cluster_rigid_to_softbody or soft.use_cluster_soft_to_softbody)
|
2009-11-23 00:27:30 +00:00
|
|
|
sub.prop(soft, "cluster_iterations", text="Iterations")
|
2009-10-31 19:31:45 +00:00
|
|
|
|
|
|
|
elif game.physics_type == 'STATIC':
|
|
|
|
col = layout.column()
|
2010-08-18 07:14:10 +00:00
|
|
|
col.prop(game, "use_actor")
|
|
|
|
col.prop(game, "use_ghost")
|
2010-07-15 16:56:04 +00:00
|
|
|
col.prop(ob, "hide_render", text="Invisible")
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2011-02-07 11:42:49 +00:00
|
|
|
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)
|
|
|
|
|
2011-03-07 13:23:45 +00:00
|
|
|
elif game.physics_type in {'SENSOR', 'INVISIBLE', 'NO_COLLISION', 'OCCLUDE'}:
|
2010-07-15 16:56:04 +00:00
|
|
|
layout.prop(ob, "hide_render", text="Invisible")
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2009-10-31 23:35:56 +00:00
|
|
|
|
2011-08-12 06:57:00 +00:00
|
|
|
class PHYSICS_PT_game_collision_bounds(PhysicsButtonsPanel, Panel):
|
2009-10-31 19:31:45 +00:00
|
|
|
bl_label = "Collision Bounds"
|
2010-06-10 23:53:13 +00:00
|
|
|
COMPAT_ENGINES = {'BLENDER_GAME'}
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2010-08-09 01:37:09 +00:00
|
|
|
@classmethod
|
|
|
|
def poll(cls, context):
|
2009-10-31 19:31:45 +00:00
|
|
|
game = context.object.game
|
2010-02-23 12:48:35 +00:00
|
|
|
rd = context.scene.render
|
2011-03-07 13:23:45 +00:00
|
|
|
return (game.physics_type in {'DYNAMIC', 'RIGID_BODY', 'SENSOR', 'SOFT_BODY', 'STATIC'}) and (rd.engine in cls.COMPAT_ENGINES)
|
2009-10-31 19:31:45 +00:00
|
|
|
|
|
|
|
def draw_header(self, context):
|
|
|
|
game = context.active_object.game
|
|
|
|
|
2009-11-23 00:27:30 +00:00
|
|
|
self.layout.prop(game, "use_collision_bounds", text="")
|
2009-10-31 19:31:45 +00:00
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
|
|
|
|
|
|
|
game = context.active_object.game
|
|
|
|
|
|
|
|
layout.active = game.use_collision_bounds
|
2010-08-19 17:10:43 +00:00
|
|
|
layout.prop(game, "collision_bounds_type", text="Bounds")
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2011-02-26 16:04:14 +00:00
|
|
|
row = layout.row()
|
|
|
|
row.prop(game, "collision_margin", text="Margin", slider=True)
|
|
|
|
row.prop(game, "use_collision_compound", text="Compound")
|
2009-11-21 00:05:43 +00:00
|
|
|
|
2011-09-11 15:36:11 +00:00
|
|
|
|
2011-09-09 22:47:26 +00:00
|
|
|
class PHYSICS_PT_game_obstacles(PhysicsButtonsPanel, Panel):
|
|
|
|
bl_label = "Create Obstacle"
|
2010-08-05 13:54:56 +00:00
|
|
|
COMPAT_ENGINES = {'BLENDER_GAME'}
|
2011-09-11 15:36:11 +00:00
|
|
|
|
2010-10-03 16:28:28 +00:00
|
|
|
@classmethod
|
2011-09-09 22:47:26 +00:00
|
|
|
def poll(cls, context):
|
2010-06-10 00:19:06 +00:00
|
|
|
game = context.object.game
|
|
|
|
rd = context.scene.render
|
2010-10-03 16:28:28 +00:00
|
|
|
return (game.physics_type in ('DYNAMIC', 'RIGID_BODY', 'SENSOR', 'SOFT_BODY', 'STATIC')) and (rd.engine in cls.COMPAT_ENGINES)
|
2010-06-10 00:19:06 +00:00
|
|
|
|
|
|
|
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
|
|
|
|
|
2011-09-09 22:47:26 +00:00
|
|
|
row = layout.row()
|
|
|
|
row.prop(game, "obstacle_radius", text="Radius")
|
|
|
|
row.label()
|
2009-07-20 20:28:29 +00:00
|
|
|
|
2011-09-11 15:36:11 +00:00
|
|
|
|
2010-08-02 02:55:12 +00:00
|
|
|
class RenderButtonsPanel():
|
2009-10-31 19:31:45 +00:00
|
|
|
bl_space_type = 'PROPERTIES'
|
|
|
|
bl_region_type = 'WINDOW'
|
|
|
|
bl_context = "render"
|
2.5: Render/Game Engine
An engine to use for output can now be selected an influences what
shows in the buttons window, only showing relevant data. The idea
behind this is to make it more clear what is supported where, make
the system more pluggable for external render/game engines, and save
space hiding stuff that is not relevant anyway.
* Top header now has an engine menu, to choose between the blender
render engine, game engine, and other future external engines.
* If the game engine is enabled, the buttons window should show
only properties that work in the game engine, and similarly for
the render engine.
* Moved panels from the logic space and game tabs to the physics,
scene and world tabs instead, and removed the game tab.
* Materials and textures tabs should eventually become game
specific too, to better show what is supported.
2009-07-23 21:50:40 +00:00
|
|
|
|
2010-08-09 01:37:09 +00:00
|
|
|
@classmethod
|
|
|
|
def poll(cls, context):
|
2010-02-23 12:48:35 +00:00
|
|
|
rd = context.scene.render
|
2010-08-09 01:37:09 +00:00
|
|
|
return (rd.engine in cls.COMPAT_ENGINES)
|
2.5: Render/Game Engine
An engine to use for output can now be selected an influences what
shows in the buttons window, only showing relevant data. The idea
behind this is to make it more clear what is supported where, make
the system more pluggable for external render/game engines, and save
space hiding stuff that is not relevant anyway.
* Top header now has an engine menu, to choose between the blender
render engine, game engine, and other future external engines.
* If the game engine is enabled, the buttons window should show
only properties that work in the game engine, and similarly for
the render engine.
* Moved panels from the logic space and game tabs to the physics,
scene and world tabs instead, and removed the game tab.
* Materials and textures tabs should eventually become game
specific too, to better show what is supported.
2009-07-23 21:50:40 +00:00
|
|
|
|
2009-10-31 23:35:56 +00:00
|
|
|
|
2011-08-12 06:57:00 +00:00
|
|
|
class RENDER_PT_game(RenderButtonsPanel, Panel):
|
2009-10-31 19:31:45 +00:00
|
|
|
bl_label = "Game"
|
2010-06-10 23:53:13 +00:00
|
|
|
COMPAT_ENGINES = {'BLENDER_GAME'}
|
2.5: Render/Game Engine
An engine to use for output can now be selected an influences what
shows in the buttons window, only showing relevant data. The idea
behind this is to make it more clear what is supported where, make
the system more pluggable for external render/game engines, and save
space hiding stuff that is not relevant anyway.
* Top header now has an engine menu, to choose between the blender
render engine, game engine, and other future external engines.
* If the game engine is enabled, the buttons window should show
only properties that work in the game engine, and similarly for
the render engine.
* Moved panels from the logic space and game tabs to the physics,
scene and world tabs instead, and removed the game tab.
* Materials and textures tabs should eventually become game
specific too, to better show what is supported.
2009-07-23 21:50:40 +00:00
|
|
|
|
2009-10-31 19:31:45 +00:00
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
2.5: Render/Game Engine
An engine to use for output can now be selected an influences what
shows in the buttons window, only showing relevant data. The idea
behind this is to make it more clear what is supported where, make
the system more pluggable for external render/game engines, and save
space hiding stuff that is not relevant anyway.
* Top header now has an engine menu, to choose between the blender
render engine, game engine, and other future external engines.
* If the game engine is enabled, the buttons window should show
only properties that work in the game engine, and similarly for
the render engine.
* Moved panels from the logic space and game tabs to the physics,
scene and world tabs instead, and removed the game tab.
* Materials and textures tabs should eventually become game
specific too, to better show what is supported.
2009-07-23 21:50:40 +00:00
|
|
|
|
2009-10-31 19:31:45 +00:00
|
|
|
row = layout.row()
|
2009-11-23 00:27:30 +00:00
|
|
|
row.operator("view3d.game_start", text="Start")
|
|
|
|
row.label()
|
2.5: Render/Game Engine
An engine to use for output can now be selected an influences what
shows in the buttons window, only showing relevant data. The idea
behind this is to make it more clear what is supported where, make
the system more pluggable for external render/game engines, and save
space hiding stuff that is not relevant anyway.
* Top header now has an engine menu, to choose between the blender
render engine, game engine, and other future external engines.
* If the game engine is enabled, the buttons window should show
only properties that work in the game engine, and similarly for
the render engine.
* Moved panels from the logic space and game tabs to the physics,
scene and world tabs instead, and removed the game tab.
* Materials and textures tabs should eventually become game
specific too, to better show what is supported.
2009-07-23 21:50:40 +00:00
|
|
|
|
2009-10-31 23:35:56 +00:00
|
|
|
|
2011-08-12 06:57:00 +00:00
|
|
|
class RENDER_PT_game_player(RenderButtonsPanel, Panel):
|
2009-10-31 19:31:45 +00:00
|
|
|
bl_label = "Standalone Player"
|
2010-06-10 23:53:13 +00:00
|
|
|
COMPAT_ENGINES = {'BLENDER_GAME'}
|
2009-10-31 19:31:45 +00:00
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
|
|
|
|
2010-08-18 08:26:18 +00:00
|
|
|
gs = context.scene.game_settings
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2010-08-17 17:03:52 +00:00
|
|
|
layout.prop(gs, "show_fullscreen")
|
2009-10-31 19:31:45 +00:00
|
|
|
|
|
|
|
split = layout.split()
|
|
|
|
|
|
|
|
col = split.column()
|
2009-11-23 00:27:30 +00:00
|
|
|
col.label(text="Resolution:")
|
2009-10-31 19:31:45 +00:00
|
|
|
sub = col.column(align=True)
|
2009-11-23 00:27:30 +00:00
|
|
|
sub.prop(gs, "resolution_x", slider=False, text="X")
|
|
|
|
sub.prop(gs, "resolution_y", slider=False, text="Y")
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2010-08-06 15:17:44 +00:00
|
|
|
col = split.column()
|
2009-11-23 00:27:30 +00:00
|
|
|
col.label(text="Quality:")
|
2009-10-31 19:31:45 +00:00
|
|
|
sub = col.column(align=True)
|
2009-11-23 00:27:30 +00:00
|
|
|
sub.prop(gs, "depth", text="Bit Depth", slider=False)
|
|
|
|
sub.prop(gs, "frequency", text="FPS", slider=False)
|
2009-10-31 19:31:45 +00:00
|
|
|
|
|
|
|
# framing:
|
|
|
|
col = layout.column()
|
2009-11-23 00:27:30 +00:00
|
|
|
col.label(text="Framing:")
|
2010-08-20 06:09:58 +00:00
|
|
|
col.row().prop(gs, "frame_type", expand=True)
|
|
|
|
if gs.frame_type == 'LETTERBOX':
|
|
|
|
col.prop(gs, "frame_color", text="")
|
2.5: Render/Game Engine
An engine to use for output can now be selected an influences what
shows in the buttons window, only showing relevant data. The idea
behind this is to make it more clear what is supported where, make
the system more pluggable for external render/game engines, and save
space hiding stuff that is not relevant anyway.
* Top header now has an engine menu, to choose between the blender
render engine, game engine, and other future external engines.
* If the game engine is enabled, the buttons window should show
only properties that work in the game engine, and similarly for
the render engine.
* Moved panels from the logic space and game tabs to the physics,
scene and world tabs instead, and removed the game tab.
* Materials and textures tabs should eventually become game
specific too, to better show what is supported.
2009-07-23 21:50:40 +00:00
|
|
|
|
2009-10-31 23:35:56 +00:00
|
|
|
|
2011-08-12 06:57:00 +00:00
|
|
|
class RENDER_PT_game_stereo(RenderButtonsPanel, Panel):
|
2009-10-31 19:31:45 +00:00
|
|
|
bl_label = "Stereo"
|
2010-06-10 23:53:13 +00:00
|
|
|
COMPAT_ENGINES = {'BLENDER_GAME'}
|
2009-10-31 19:31:45 +00:00
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
|
|
|
|
2010-08-18 08:26:18 +00:00
|
|
|
gs = context.scene.game_settings
|
2009-10-31 19:31:45 +00:00
|
|
|
stereo_mode = gs.stereo
|
|
|
|
|
|
|
|
# stereo options:
|
2009-11-23 00:27:30 +00:00
|
|
|
layout.prop(gs, "stereo", expand=True)
|
2009-10-31 19:31:45 +00:00
|
|
|
|
|
|
|
# stereo:
|
|
|
|
if stereo_mode == 'STEREO':
|
2009-11-23 00:27:30 +00:00
|
|
|
layout.prop(gs, "stereo_mode")
|
2010-08-20 06:09:58 +00:00
|
|
|
layout.prop(gs, "stereo_eye_separation")
|
2009-10-31 19:31:45 +00:00
|
|
|
|
|
|
|
# dome:
|
|
|
|
elif stereo_mode == 'DOME':
|
2010-08-06 15:17:44 +00:00
|
|
|
layout.prop(gs, "dome_mode", text="Dome Type")
|
2009-10-31 19:31:45 +00:00
|
|
|
|
|
|
|
dome_type = gs.dome_mode
|
|
|
|
|
2009-10-31 23:35:56 +00:00
|
|
|
split = layout.split()
|
2009-10-31 19:31:45 +00:00
|
|
|
|
|
|
|
if dome_type == 'FISHEYE' or \
|
|
|
|
dome_type == 'TRUNCATED_REAR' or \
|
|
|
|
dome_type == 'TRUNCATED_FRONT':
|
|
|
|
|
2009-10-31 23:35:56 +00:00
|
|
|
col = split.column()
|
2009-11-23 00:27:30 +00:00
|
|
|
col.prop(gs, "dome_buffer_resolution", text="Resolution", slider=True)
|
|
|
|
col.prop(gs, "dome_angle", slider=True)
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2010-08-06 15:17:44 +00:00
|
|
|
col = split.column()
|
2009-11-23 00:27:30 +00:00
|
|
|
col.prop(gs, "dome_tesselation", text="Tesselation")
|
|
|
|
col.prop(gs, "dome_tilt")
|
2009-10-31 19:31:45 +00:00
|
|
|
|
|
|
|
elif dome_type == 'PANORAM_SPH':
|
2009-10-31 23:35:56 +00:00
|
|
|
col = split.column()
|
2009-11-21 00:05:43 +00:00
|
|
|
|
2009-11-23 00:27:30 +00:00
|
|
|
col.prop(gs, "dome_buffer_resolution", text="Resolution", slider=True)
|
2010-08-06 15:17:44 +00:00
|
|
|
col = split.column()
|
2009-11-23 00:27:30 +00:00
|
|
|
col.prop(gs, "dome_tesselation", text="Tesselation")
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2010-09-07 15:17:42 +00:00
|
|
|
else: # cube map
|
2009-10-31 23:35:56 +00:00
|
|
|
col = split.column()
|
2009-11-23 00:27:30 +00:00
|
|
|
col.prop(gs, "dome_buffer_resolution", text="Resolution", slider=True)
|
2010-08-06 15:17:44 +00:00
|
|
|
|
|
|
|
col = split.column()
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2009-11-23 00:27:30 +00:00
|
|
|
layout.prop(gs, "dome_text")
|
2.5: Render/Game Engine
An engine to use for output can now be selected an influences what
shows in the buttons window, only showing relevant data. The idea
behind this is to make it more clear what is supported where, make
the system more pluggable for external render/game engines, and save
space hiding stuff that is not relevant anyway.
* Top header now has an engine menu, to choose between the blender
render engine, game engine, and other future external engines.
* If the game engine is enabled, the buttons window should show
only properties that work in the game engine, and similarly for
the render engine.
* Moved panels from the logic space and game tabs to the physics,
scene and world tabs instead, and removed the game tab.
* Materials and textures tabs should eventually become game
specific too, to better show what is supported.
2009-07-23 21:50:40 +00:00
|
|
|
|
2009-10-31 23:35:56 +00:00
|
|
|
|
2011-08-12 06:57:00 +00:00
|
|
|
class RENDER_PT_game_shading(RenderButtonsPanel, Panel):
|
2009-10-31 19:31:45 +00:00
|
|
|
bl_label = "Shading"
|
2010-06-10 23:53:13 +00:00
|
|
|
COMPAT_ENGINES = {'BLENDER_GAME'}
|
2009-10-31 19:31:45 +00:00
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
|
|
|
|
2010-08-18 08:26:18 +00:00
|
|
|
gs = context.scene.game_settings
|
2009-11-21 00:05:43 +00:00
|
|
|
|
2010-08-06 15:17:44 +00:00
|
|
|
layout.prop(gs, "material_mode", expand=True)
|
2009-10-31 19:31:45 +00:00
|
|
|
|
|
|
|
if gs.material_mode == 'GLSL':
|
|
|
|
split = layout.split()
|
|
|
|
|
|
|
|
col = split.column()
|
2010-08-20 06:09:58 +00:00
|
|
|
col.prop(gs, "use_glsl_lights", text="Lights")
|
|
|
|
col.prop(gs, "use_glsl_shaders", text="Shaders")
|
|
|
|
col.prop(gs, "use_glsl_shadows", text="Shadows")
|
2011-05-02 09:08:43 +00:00
|
|
|
col.prop(gs, "use_glsl_color_management", text="Color Management")
|
2009-10-31 19:31:45 +00:00
|
|
|
|
|
|
|
col = split.column()
|
2010-08-20 06:09:58 +00:00
|
|
|
col.prop(gs, "use_glsl_ramps", text="Ramps")
|
|
|
|
col.prop(gs, "use_glsl_nodes", text="Nodes")
|
|
|
|
col.prop(gs, "use_glsl_extra_textures", text="Extra Textures")
|
2009-08-18 15:27:48 +00:00
|
|
|
|
2009-10-31 23:35:56 +00:00
|
|
|
|
2011-08-12 06:57:00 +00:00
|
|
|
class RENDER_PT_game_performance(RenderButtonsPanel, Panel):
|
2009-10-31 19:31:45 +00:00
|
|
|
bl_label = "Performance"
|
2010-06-10 23:53:13 +00:00
|
|
|
COMPAT_ENGINES = {'BLENDER_GAME'}
|
2009-10-31 19:31:45 +00:00
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
|
|
|
|
2010-08-18 08:26:18 +00:00
|
|
|
gs = context.scene.game_settings
|
2011-08-30 12:45:56 +00:00
|
|
|
col = layout.column()
|
|
|
|
row = col.row()
|
2011-02-07 14:53:40 +00:00
|
|
|
row.prop(gs, "use_frame_rate")
|
|
|
|
row.prop(gs, "use_display_lists")
|
2011-09-08 05:42:44 +00:00
|
|
|
|
2011-08-30 12:45:56 +00:00
|
|
|
col.prop(gs, "restrict_animation_updates")
|
2009-11-21 00:05:43 +00:00
|
|
|
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2011-08-12 06:57:00 +00:00
|
|
|
class RENDER_PT_game_display(RenderButtonsPanel, Panel):
|
2011-02-07 14:53:40 +00:00
|
|
|
bl_label = "Display"
|
|
|
|
COMPAT_ENGINES = {'BLENDER_GAME'}
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2011-02-07 14:53:40 +00:00
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
2010-08-06 15:17:44 +00:00
|
|
|
|
2011-02-07 14:53:40 +00:00
|
|
|
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")
|
2011-02-27 09:36:29 +00:00
|
|
|
flow.prop(gs, "show_mouse", text="Mouse Cursor")
|
2011-09-11 15:36:11 +00:00
|
|
|
|
|
|
|
|
2011-09-09 22:47:26 +00:00
|
|
|
class SceneButtonsPanel():
|
|
|
|
bl_space_type = 'PROPERTIES'
|
|
|
|
bl_region_type = 'WINDOW'
|
|
|
|
bl_context = "scene"
|
2011-09-11 15:36:11 +00:00
|
|
|
|
|
|
|
|
2011-09-09 22:47:26 +00:00
|
|
|
class SCENE_PT_game_navmesh(SceneButtonsPanel, bpy.types.Panel):
|
|
|
|
bl_label = "Navigation mesh"
|
|
|
|
bl_default_closed = True
|
|
|
|
COMPAT_ENGINES = {'BLENDER_GAME'}
|
2011-09-11 15:36:11 +00:00
|
|
|
|
2011-09-10 08:43:11 +00:00
|
|
|
@classmethod
|
|
|
|
def poll(cls, context):
|
|
|
|
scene = context.scene
|
|
|
|
return (scene and scene.render.engine in cls.COMPAT_ENGINES)
|
2011-09-09 22:47:26 +00:00
|
|
|
|
|
|
|
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()
|
2011-09-11 15:36:11 +00:00
|
|
|
|
2011-09-09 22:47:26 +00:00
|
|
|
col = split.column()
|
|
|
|
col.prop(rd, "edge_max_len")
|
|
|
|
col.prop(rd, "edge_max_error")
|
|
|
|
|
|
|
|
split.prop(rd, "verts_per_poly")
|
2011-09-11 15:36:11 +00:00
|
|
|
|
2011-09-09 22:47:26 +00:00
|
|
|
col = layout.column()
|
|
|
|
col.label(text="Detail Mesh:")
|
|
|
|
row = col.row()
|
|
|
|
row.prop(rd, "sample_dist")
|
|
|
|
row.prop(rd, "sample_max_error")
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2009-10-31 23:35:56 +00:00
|
|
|
|
2010-08-02 02:55:12 +00:00
|
|
|
class WorldButtonsPanel():
|
2009-10-31 19:31:45 +00:00
|
|
|
bl_space_type = 'PROPERTIES'
|
|
|
|
bl_region_type = 'WINDOW'
|
|
|
|
bl_context = "world"
|
2.5: Render/Game Engine
An engine to use for output can now be selected an influences what
shows in the buttons window, only showing relevant data. The idea
behind this is to make it more clear what is supported where, make
the system more pluggable for external render/game engines, and save
space hiding stuff that is not relevant anyway.
* Top header now has an engine menu, to choose between the blender
render engine, game engine, and other future external engines.
* If the game engine is enabled, the buttons window should show
only properties that work in the game engine, and similarly for
the render engine.
* Moved panels from the logic space and game tabs to the physics,
scene and world tabs instead, and removed the game tab.
* Materials and textures tabs should eventually become game
specific too, to better show what is supported.
2009-07-23 21:50:40 +00:00
|
|
|
|
2009-10-31 23:35:56 +00:00
|
|
|
|
2011-08-12 06:57:00 +00:00
|
|
|
class WORLD_PT_game_context_world(WorldButtonsPanel, Panel):
|
2009-10-31 19:31:45 +00:00
|
|
|
bl_label = ""
|
2010-08-26 01:05:37 +00:00
|
|
|
bl_options = {'HIDE_HEADER'}
|
2010-06-10 23:53:13 +00:00
|
|
|
COMPAT_ENGINES = {'BLENDER_GAME'}
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2010-08-09 01:37:09 +00:00
|
|
|
@classmethod
|
|
|
|
def poll(cls, context):
|
2010-02-23 12:48:35 +00:00
|
|
|
rd = context.scene.render
|
2009-10-31 19:31:45 +00:00
|
|
|
return (context.scene) and (rd.use_game_engine)
|
2.5: Render/Game Engine
An engine to use for output can now be selected an influences what
shows in the buttons window, only showing relevant data. The idea
behind this is to make it more clear what is supported where, make
the system more pluggable for external render/game engines, and save
space hiding stuff that is not relevant anyway.
* Top header now has an engine menu, to choose between the blender
render engine, game engine, and other future external engines.
* If the game engine is enabled, the buttons window should show
only properties that work in the game engine, and similarly for
the render engine.
* Moved panels from the logic space and game tabs to the physics,
scene and world tabs instead, and removed the game tab.
* Materials and textures tabs should eventually become game
specific too, to better show what is supported.
2009-07-23 21:50:40 +00:00
|
|
|
|
2009-10-31 19:31:45 +00:00
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
2.5: Render/Game Engine
An engine to use for output can now be selected an influences what
shows in the buttons window, only showing relevant data. The idea
behind this is to make it more clear what is supported where, make
the system more pluggable for external render/game engines, and save
space hiding stuff that is not relevant anyway.
* Top header now has an engine menu, to choose between the blender
render engine, game engine, and other future external engines.
* If the game engine is enabled, the buttons window should show
only properties that work in the game engine, and similarly for
the render engine.
* Moved panels from the logic space and game tabs to the physics,
scene and world tabs instead, and removed the game tab.
* Materials and textures tabs should eventually become game
specific too, to better show what is supported.
2009-07-23 21:50:40 +00:00
|
|
|
|
2009-10-31 19:31:45 +00:00
|
|
|
scene = context.scene
|
|
|
|
world = context.world
|
|
|
|
space = context.space_data
|
2010-08-06 15:17:44 +00:00
|
|
|
|
|
|
|
split = layout.split(percentage=0.65)
|
|
|
|
if scene:
|
|
|
|
split.template_ID(scene, "world", new="world.new")
|
|
|
|
elif world:
|
|
|
|
split.template_ID(space, "pin_id")
|
2009-10-31 23:35:56 +00:00
|
|
|
|
2009-11-21 00:05:43 +00:00
|
|
|
|
2011-08-12 06:57:00 +00:00
|
|
|
class WORLD_PT_game_world(WorldButtonsPanel, Panel):
|
2009-10-31 19:31:45 +00:00
|
|
|
bl_label = "World"
|
2010-06-10 23:53:13 +00:00
|
|
|
COMPAT_ENGINES = {'BLENDER_GAME'}
|
2.5: Render/Game Engine
An engine to use for output can now be selected an influences what
shows in the buttons window, only showing relevant data. The idea
behind this is to make it more clear what is supported where, make
the system more pluggable for external render/game engines, and save
space hiding stuff that is not relevant anyway.
* Top header now has an engine menu, to choose between the blender
render engine, game engine, and other future external engines.
* If the game engine is enabled, the buttons window should show
only properties that work in the game engine, and similarly for
the render engine.
* Moved panels from the logic space and game tabs to the physics,
scene and world tabs instead, and removed the game tab.
* Materials and textures tabs should eventually become game
specific too, to better show what is supported.
2009-07-23 21:50:40 +00:00
|
|
|
|
2010-08-09 01:37:09 +00:00
|
|
|
@classmethod
|
|
|
|
def poll(cls, context):
|
2010-08-05 16:05:30 +00:00
|
|
|
scene = context.scene
|
2010-08-09 01:37:09 +00:00
|
|
|
return (scene.world and scene.render.engine in cls.COMPAT_ENGINES)
|
2010-08-05 16:05:30 +00:00
|
|
|
|
2009-10-31 19:31:45 +00:00
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
2.5: Render/Game Engine
An engine to use for output can now be selected an influences what
shows in the buttons window, only showing relevant data. The idea
behind this is to make it more clear what is supported where, make
the system more pluggable for external render/game engines, and save
space hiding stuff that is not relevant anyway.
* Top header now has an engine menu, to choose between the blender
render engine, game engine, and other future external engines.
* If the game engine is enabled, the buttons window should show
only properties that work in the game engine, and similarly for
the render engine.
* Moved panels from the logic space and game tabs to the physics,
scene and world tabs instead, and removed the game tab.
* Materials and textures tabs should eventually become game
specific too, to better show what is supported.
2009-07-23 21:50:40 +00:00
|
|
|
|
2009-10-31 19:31:45 +00:00
|
|
|
world = context.world
|
2.5: Render/Game Engine
An engine to use for output can now be selected an influences what
shows in the buttons window, only showing relevant data. The idea
behind this is to make it more clear what is supported where, make
the system more pluggable for external render/game engines, and save
space hiding stuff that is not relevant anyway.
* Top header now has an engine menu, to choose between the blender
render engine, game engine, and other future external engines.
* If the game engine is enabled, the buttons window should show
only properties that work in the game engine, and similarly for
the render engine.
* Moved panels from the logic space and game tabs to the physics,
scene and world tabs instead, and removed the game tab.
* Materials and textures tabs should eventually become game
specific too, to better show what is supported.
2009-07-23 21:50:40 +00:00
|
|
|
|
2011-02-26 16:04:14 +00:00
|
|
|
row = layout.row()
|
|
|
|
row.column().prop(world, "horizon_color")
|
|
|
|
row.column().prop(world, "ambient_color")
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2009-11-21 00:05:43 +00:00
|
|
|
|
2011-08-12 06:57:00 +00:00
|
|
|
class WORLD_PT_game_mist(WorldButtonsPanel, Panel):
|
2009-11-14 23:24:15 +00:00
|
|
|
bl_label = "Mist"
|
2010-06-10 23:53:13 +00:00
|
|
|
COMPAT_ENGINES = {'BLENDER_GAME'}
|
2009-11-21 00:05:43 +00:00
|
|
|
|
2010-08-09 01:37:09 +00:00
|
|
|
@classmethod
|
|
|
|
def poll(cls, context):
|
2010-08-05 16:05:30 +00:00
|
|
|
scene = context.scene
|
2010-08-09 01:37:09 +00:00
|
|
|
return (scene.world and scene.render.engine in cls.COMPAT_ENGINES)
|
2010-08-05 16:05:30 +00:00
|
|
|
|
2009-11-14 23:24:15 +00:00
|
|
|
def draw_header(self, context):
|
|
|
|
world = context.world
|
2009-11-21 00:05:43 +00:00
|
|
|
|
2010-08-22 17:23:08 +00:00
|
|
|
self.layout.prop(world.mist_settings, "use_mist", text="")
|
2009-11-21 00:05:43 +00:00
|
|
|
|
2009-11-14 23:24:15 +00:00
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
2.5: Render/Game Engine
An engine to use for output can now be selected an influences what
shows in the buttons window, only showing relevant data. The idea
behind this is to make it more clear what is supported where, make
the system more pluggable for external render/game engines, and save
space hiding stuff that is not relevant anyway.
* Top header now has an engine menu, to choose between the blender
render engine, game engine, and other future external engines.
* If the game engine is enabled, the buttons window should show
only properties that work in the game engine, and similarly for
the render engine.
* Moved panels from the logic space and game tabs to the physics,
scene and world tabs instead, and removed the game tab.
* Materials and textures tabs should eventually become game
specific too, to better show what is supported.
2009-07-23 21:50:40 +00:00
|
|
|
|
2009-11-14 23:24:15 +00:00
|
|
|
world = context.world
|
2009-11-21 00:05:43 +00:00
|
|
|
|
2010-08-22 17:23:08 +00:00
|
|
|
layout.active = world.mist_settings.use_mist
|
2009-11-21 00:05:43 +00:00
|
|
|
|
2011-02-26 16:04:14 +00:00
|
|
|
row = layout.row()
|
|
|
|
row.prop(world.mist_settings, "start")
|
|
|
|
row.prop(world.mist_settings, "depth")
|
2009-10-31 23:35:56 +00:00
|
|
|
|
2009-11-21 00:05:43 +00:00
|
|
|
|
2011-08-12 06:57:00 +00:00
|
|
|
class WORLD_PT_game_physics(WorldButtonsPanel, Panel):
|
2009-10-31 19:31:45 +00:00
|
|
|
bl_label = "Physics"
|
2010-06-10 23:53:13 +00:00
|
|
|
COMPAT_ENGINES = {'BLENDER_GAME'}
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2010-08-09 01:37:09 +00:00
|
|
|
@classmethod
|
|
|
|
def poll(cls, context):
|
2010-08-05 16:05:30 +00:00
|
|
|
scene = context.scene
|
2010-08-09 01:37:09 +00:00
|
|
|
return (scene.world and scene.render.engine in cls.COMPAT_ENGINES)
|
2010-08-05 16:05:30 +00:00
|
|
|
|
2009-10-31 19:31:45 +00:00
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
|
|
|
|
2010-08-18 08:26:18 +00:00
|
|
|
gs = context.scene.game_settings
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2009-11-23 00:27:30 +00:00
|
|
|
layout.prop(gs, "physics_engine")
|
2009-10-31 19:31:45 +00:00
|
|
|
if gs.physics_engine != 'NONE':
|
2009-11-23 00:27:30 +00:00
|
|
|
layout.prop(gs, "physics_gravity", text="Gravity")
|
2009-10-31 19:31:45 +00:00
|
|
|
|
|
|
|
split = layout.split()
|
|
|
|
|
|
|
|
col = split.column()
|
2009-11-23 00:27:30 +00:00
|
|
|
col.label(text="Physics Steps:")
|
2009-10-31 19:31:45 +00:00
|
|
|
sub = col.column(align=True)
|
2009-11-23 00:27:30 +00:00
|
|
|
sub.prop(gs, "physics_step_max", text="Max")
|
|
|
|
sub.prop(gs, "physics_step_sub", text="Substeps")
|
|
|
|
col.prop(gs, "fps", text="FPS")
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2010-08-06 15:17:44 +00:00
|
|
|
col = split.column()
|
2009-11-23 00:27:30 +00:00
|
|
|
col.label(text="Logic Steps:")
|
|
|
|
col.prop(gs, "logic_step_max", text="Max")
|
2009-10-31 19:31:45 +00:00
|
|
|
|
|
|
|
col = layout.column()
|
2009-11-23 00:27:30 +00:00
|
|
|
col.prop(gs, "use_occlusion_culling", text="Occlusion Culling")
|
2009-10-31 19:31:45 +00:00
|
|
|
sub = col.column()
|
|
|
|
sub.active = gs.use_occlusion_culling
|
2009-11-23 00:27:30 +00:00
|
|
|
sub.prop(gs, "occlusion_culling_resolution", text="Resolution")
|
2009-10-31 19:31:45 +00:00
|
|
|
|
|
|
|
else:
|
|
|
|
split = layout.split()
|
|
|
|
|
|
|
|
col = split.column()
|
2009-11-23 00:27:30 +00:00
|
|
|
col.label(text="Physics Steps:")
|
|
|
|
col.prop(gs, "fps", text="FPS")
|
2009-10-31 19:31:45 +00:00
|
|
|
|
|
|
|
col = split.column()
|
2009-11-23 00:27:30 +00:00
|
|
|
col.label(text="Logic Steps:")
|
|
|
|
col.prop(gs, "logic_step_max", text="Max")
|
2.5: Render/Game Engine
An engine to use for output can now be selected an influences what
shows in the buttons window, only showing relevant data. The idea
behind this is to make it more clear what is supported where, make
the system more pluggable for external render/game engines, and save
space hiding stuff that is not relevant anyway.
* Top header now has an engine menu, to choose between the blender
render engine, game engine, and other future external engines.
* If the game engine is enabled, the buttons window should show
only properties that work in the game engine, and similarly for
the render engine.
* Moved panels from the logic space and game tabs to the physics,
scene and world tabs instead, and removed the game tab.
* Materials and textures tabs should eventually become game
specific too, to better show what is supported.
2009-07-23 21:50:40 +00:00
|
|
|
|
2011-09-11 15:36:11 +00:00
|
|
|
|
2011-09-09 22:47:26 +00:00
|
|
|
class WORLD_PT_game_physics_obstacles(WorldButtonsPanel, Panel):
|
2010-06-10 00:19:06 +00:00
|
|
|
bl_label = "Obstacle simulation"
|
2010-07-18 12:46:03 +00:00
|
|
|
COMPAT_ENGINES = {'BLENDER_GAME'}
|
2011-09-11 15:36:11 +00:00
|
|
|
|
2011-09-10 08:43:11 +00:00
|
|
|
@classmethod
|
|
|
|
def poll(cls, context):
|
|
|
|
scene = context.scene
|
|
|
|
return (scene.world and scene.render.engine in cls.COMPAT_ENGINES)
|
2010-06-10 00:19:06 +00:00
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
|
|
|
|
2010-10-03 16:28:28 +00:00
|
|
|
gs = context.scene.game_settings
|
2010-06-10 00:19:06 +00:00
|
|
|
|
2011-09-11 15:36:11 +00:00
|
|
|
layout.prop(gs, "obstacle_simulation", text="Type")
|
2011-09-09 22:47:26 +00:00
|
|
|
if gs.obstacle_simulation != 'NONE':
|
2010-07-15 18:41:29 +00:00
|
|
|
layout.prop(gs, "level_height")
|
|
|
|
layout.prop(gs, "show_obstacle_simulation")
|
2010-02-14 11:21:21 +00:00
|
|
|
|
2011-04-04 10:13:04 +00:00
|
|
|
if __name__ == "__main__": # only for live edit.
|
2011-02-10 23:48:22 +00:00
|
|
|
bpy.utils.register_module(__name__)
|