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
|
2013-12-18 06:35:05 +00:00
|
|
|
from bpy.types import Panel, Menu
|
2009-11-21 00:05:43 +00:00
|
|
|
|
2011-09-20 18:29:19 +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):
|
2011-09-15 13:20:18 +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
|
|
|
|
2011-10-09 21:43:13 +00:00
|
|
|
physics_type = game.physics_type
|
|
|
|
|
2012-05-28 21:36:29 +00:00
|
|
|
if physics_type == 'CHARACTER':
|
2012-06-21 05:30:57 +00:00
|
|
|
layout.prop(game, "use_actor")
|
|
|
|
layout.prop(ob, "hide_render", text="Invisible") # out of place but useful
|
2012-05-28 21:36:29 +00:00
|
|
|
layout.prop(game, "step_height", slider=True)
|
|
|
|
layout.prop(game, "jump_speed")
|
|
|
|
layout.prop(game, "fall_speed")
|
|
|
|
|
|
|
|
elif 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")
|
2011-09-21 15:18:38 +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()
|
2011-09-21 15:18:38 +00:00
|
|
|
col.label(text="Attributes:")
|
2009-11-23 00:27:30 +00:00
|
|
|
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()
|
2011-09-21 15:18:38 +00:00
|
|
|
col.label(text="Velocity:")
|
2009-10-31 19:31:45 +00:00
|
|
|
sub = col.column(align=True)
|
2011-09-21 15:18:38 +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()
|
2011-09-21 15:18:38 +00:00
|
|
|
col.label(text="Damping:")
|
2009-10-31 19:31:45 +00:00
|
|
|
sub = col.column(align=True)
|
2011-09-21 15:18:38 +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()
|
2011-09-21 15:18:38 +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()
|
2011-09-21 15:18:38 +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
|
|
|
|
2011-10-09 21:43:13 +00:00
|
|
|
elif physics_type == 'SOFT_BODY':
|
2009-10-31 19:31:45 +00:00
|
|
|
col = layout.column()
|
2010-08-18 07:14:10 +00:00
|
|
|
col.prop(game, "use_actor")
|
|
|
|
col.prop(game, "use_ghost")
|
2011-09-21 15:18:38 +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()
|
2011-09-21 15:18:38 +00:00
|
|
|
col.label(text="Attributes:")
|
2009-11-23 00:27:30 +00:00
|
|
|
col.prop(game, "mass")
|
2012-03-28 12:18:25 +00:00
|
|
|
# disabled in the code
|
|
|
|
# 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)
|
2011-09-21 15:18:38 +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
|
|
|
|
2011-09-21 15:18:38 +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)
|
2011-09-21 15:18:38 +00:00
|
|
|
sub.prop(soft, "cluster_iterations", text="Iterations")
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2011-10-09 21:43:13 +00:00
|
|
|
elif physics_type == 'STATIC':
|
2009-10-31 19:31:45 +00:00
|
|
|
col = layout.column()
|
2010-08-18 07:14:10 +00:00
|
|
|
col.prop(game, "use_actor")
|
|
|
|
col.prop(game, "use_ghost")
|
2013-12-09 11:26:52 +00:00
|
|
|
col.prop(game, "use_record_animation")
|
2011-09-21 15:18:38 +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()
|
2011-09-21 15:18:38 +00:00
|
|
|
col.label(text="Attributes:")
|
2011-02-07 11:42:49 +00:00
|
|
|
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)
|
|
|
|
|
2012-04-20 18:50:18 +00:00
|
|
|
elif physics_type == 'SENSOR':
|
2012-04-15 11:47:08 +00:00
|
|
|
col = layout.column()
|
|
|
|
col.prop(game, "use_actor", text="Detect Actors")
|
|
|
|
col.prop(ob, "hide_render", text="Invisible")
|
|
|
|
|
|
|
|
elif physics_type in {'INVISIBLE', 'NO_COLLISION', 'OCCLUDE'}:
|
2011-09-21 15:18:38 +00:00
|
|
|
layout.prop(ob, "hide_render", text="Invisible")
|
2011-10-09 21:43:13 +00:00
|
|
|
|
|
|
|
elif physics_type == 'NAVMESH':
|
2011-10-10 07:21:42 +00:00
|
|
|
layout.operator("mesh.navmesh_face_copy")
|
|
|
|
layout.operator("mesh.navmesh_face_add")
|
|
|
|
|
|
|
|
layout.separator()
|
|
|
|
|
|
|
|
layout.operator("mesh.navmesh_reset")
|
|
|
|
layout.operator("mesh.navmesh_clear")
|
2012-08-08 01:29:20 +00:00
|
|
|
|
2012-10-30 15:44:16 +00:00
|
|
|
if physics_type not in {'NO_COLLISION', 'OCCLUDE'}:
|
|
|
|
layout.separator()
|
|
|
|
split = layout.split()
|
|
|
|
|
|
|
|
col = split.column()
|
|
|
|
col.prop(game, "collision_group")
|
|
|
|
col = split.column()
|
|
|
|
col.prop(game, "collision_mask")
|
2012-08-08 01:29:20 +00:00
|
|
|
|
2013-01-15 23:15:32 +00:00
|
|
|
|
2011-08-12 06:57:00 +00:00
|
|
|
class PHYSICS_PT_game_collision_bounds(PhysicsButtonsPanel, Panel):
|
2011-09-15 13:20:18 +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
|
2012-05-28 21:36:29 +00:00
|
|
|
return (game.physics_type in {'DYNAMIC', 'RIGID_BODY', 'SENSOR', 'SOFT_BODY', 'STATIC', 'CHARACTER'}) 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
|
2011-09-21 15:18:38 +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()
|
2011-09-21 15:18:38 +00:00
|
|
|
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
|
|
|
|
2009-07-20 20:28:29 +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
|
2011-09-26 16:53:04 +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
|
|
|
|
|
2011-09-25 02:49:46 +00:00
|
|
|
self.layout.prop(game, "use_obstacle_create", text="")
|
2010-06-10 00:19:06 +00:00
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
|
|
|
|
|
|
|
game = context.active_object.game
|
|
|
|
|
2011-09-25 02:49:46 +00:00
|
|
|
layout.active = game.use_obstacle_create
|
2010-06-10 00:19:06 +00:00
|
|
|
|
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):
|
|
|
|
rd = context.scene.render
|
|
|
|
return (rd.engine in cls.COMPAT_ENGINES)
|
|
|
|
|
2009-10-31 23:35:56 +00:00
|
|
|
|
2012-01-18 06:11:56 +00:00
|
|
|
class RENDER_PT_embedded(RenderButtonsPanel, Panel):
|
Cucumber, first batch of merge - UI changes and custom exit key
---------------------------------------------------------------
This was a test drive to see how painful the merge will be.
Next batches are:
- use desktop option for fullscreen
- multisampling option
- bullet collision mask
- python
- storage (vbo, dl, ...)
- lighting
[lighting still needs review]
[python could use review, although it should be straightforward]
[storage should be tested more I think]
Merged /branches/soc-2011-cucumber:r
36991,37059,37157,37416,37497-37499,37501,37522,39036,40593
36991:
==UI==
* Made some options available in Blender Game that were only available in Blender Render (camera resolution, animation fps)
* Created a panel for the embedded player
* Renamed the FPS option for the standalone player to Refresh Rate
* Moved framing options to display
* Made a button to launch the blender player from within blender (only tested on windows for now)
37059:
==UI==
* Added the option to change the exit key for the BGE. The UI currently just sets a number, and this feature most likely does not work for blenderplayer yet. More work on this to come.
* Removed the physics settings from the scene panel for the BGE.
* Added an Add menu in the logic brick header.
37157:
Making the bake options available in Blender Game
37416:
Making the exit key UI element accept key presses instead of numbers. It still does not work for the Blenderplayer, and it does not limit the input to key presses (other events don't work for exiting)
37497:
Some more work on getting the exit key to work in the Blenderplayer.
Input is now restricted to keyboard events only for the exit key UI.
37498:
Some clean up from the last commit.
The exit key setting affects the Blenderplayer now.
37499:
Cleaning up some duplicate code. Now the reverseTranslateTable for converting blender key codes to ketsji key codes is only defined in BL_BlenderDataConverter.
37501:
Centralizing the exit key methods to the keyboard devices. This should make it easier to get exit key control to the python API.
[37517: committed previously]
37522:
Moved control of the exit key away from the keyboard devices, and moved it to ketsjiengine.
Added setExitKey and getExitKey to the python API
39036:
A couple of the doversions were in the wrong spot. This should fix some issues with the exit key not being set.
[not committed entirely, see below]]
40552: space_logic.py (* fixed an error in space_logic.py *)
40593:
launch blenderplayer from ui not working in OSX fix - by Daniel Stokes and me
########################################################
code left behind (to be included in next commit):
########################################################
{
/* Initialize default values for collision masks */
Object *ob;
for(ob=main->object.first; ob; ob=ob->id.next)
ob->col_group = ob->col_mask = 1;
}
2011-12-20 03:11:56 +00:00
|
|
|
bl_label = "Embedded Player"
|
2010-06-10 23:53:13 +00:00
|
|
|
COMPAT_ENGINES = {'BLENDER_GAME'}
|
2012-01-01 08:52:54 +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
|
|
|
|
Cucumber, first batch of merge - UI changes and custom exit key
---------------------------------------------------------------
This was a test drive to see how painful the merge will be.
Next batches are:
- use desktop option for fullscreen
- multisampling option
- bullet collision mask
- python
- storage (vbo, dl, ...)
- lighting
[lighting still needs review]
[python could use review, although it should be straightforward]
[storage should be tested more I think]
Merged /branches/soc-2011-cucumber:r
36991,37059,37157,37416,37497-37499,37501,37522,39036,40593
36991:
==UI==
* Made some options available in Blender Game that were only available in Blender Render (camera resolution, animation fps)
* Created a panel for the embedded player
* Renamed the FPS option for the standalone player to Refresh Rate
* Moved framing options to display
* Made a button to launch the blender player from within blender (only tested on windows for now)
37059:
==UI==
* Added the option to change the exit key for the BGE. The UI currently just sets a number, and this feature most likely does not work for blenderplayer yet. More work on this to come.
* Removed the physics settings from the scene panel for the BGE.
* Added an Add menu in the logic brick header.
37157:
Making the bake options available in Blender Game
37416:
Making the exit key UI element accept key presses instead of numbers. It still does not work for the Blenderplayer, and it does not limit the input to key presses (other events don't work for exiting)
37497:
Some more work on getting the exit key to work in the Blenderplayer.
Input is now restricted to keyboard events only for the exit key UI.
37498:
Some clean up from the last commit.
The exit key setting affects the Blenderplayer now.
37499:
Cleaning up some duplicate code. Now the reverseTranslateTable for converting blender key codes to ketsji key codes is only defined in BL_BlenderDataConverter.
37501:
Centralizing the exit key methods to the keyboard devices. This should make it easier to get exit key control to the python API.
[37517: committed previously]
37522:
Moved control of the exit key away from the keyboard devices, and moved it to ketsjiengine.
Added setExitKey and getExitKey to the python API
39036:
A couple of the doversions were in the wrong spot. This should fix some issues with the exit key not being set.
[not committed entirely, see below]]
40552: space_logic.py (* fixed an error in space_logic.py *)
40593:
launch blenderplayer from ui not working in OSX fix - by Daniel Stokes and me
########################################################
code left behind (to be included in next commit):
########################################################
{
/* Initialize default values for collision masks */
Object *ob;
for(ob=main->object.first; ob; ob=ob->id.next)
ob->col_group = ob->col_mask = 1;
}
2011-12-20 03:11:56 +00:00
|
|
|
rd = context.scene.render
|
|
|
|
|
2009-10-31 19:31:45 +00:00
|
|
|
row = layout.row()
|
2011-09-21 15:18:38 +00:00
|
|
|
row.operator("view3d.game_start", text="Start")
|
2009-11-23 00:27:30 +00:00
|
|
|
row.label()
|
Cucumber, first batch of merge - UI changes and custom exit key
---------------------------------------------------------------
This was a test drive to see how painful the merge will be.
Next batches are:
- use desktop option for fullscreen
- multisampling option
- bullet collision mask
- python
- storage (vbo, dl, ...)
- lighting
[lighting still needs review]
[python could use review, although it should be straightforward]
[storage should be tested more I think]
Merged /branches/soc-2011-cucumber:r
36991,37059,37157,37416,37497-37499,37501,37522,39036,40593
36991:
==UI==
* Made some options available in Blender Game that were only available in Blender Render (camera resolution, animation fps)
* Created a panel for the embedded player
* Renamed the FPS option for the standalone player to Refresh Rate
* Moved framing options to display
* Made a button to launch the blender player from within blender (only tested on windows for now)
37059:
==UI==
* Added the option to change the exit key for the BGE. The UI currently just sets a number, and this feature most likely does not work for blenderplayer yet. More work on this to come.
* Removed the physics settings from the scene panel for the BGE.
* Added an Add menu in the logic brick header.
37157:
Making the bake options available in Blender Game
37416:
Making the exit key UI element accept key presses instead of numbers. It still does not work for the Blenderplayer, and it does not limit the input to key presses (other events don't work for exiting)
37497:
Some more work on getting the exit key to work in the Blenderplayer.
Input is now restricted to keyboard events only for the exit key UI.
37498:
Some clean up from the last commit.
The exit key setting affects the Blenderplayer now.
37499:
Cleaning up some duplicate code. Now the reverseTranslateTable for converting blender key codes to ketsji key codes is only defined in BL_BlenderDataConverter.
37501:
Centralizing the exit key methods to the keyboard devices. This should make it easier to get exit key control to the python API.
[37517: committed previously]
37522:
Moved control of the exit key away from the keyboard devices, and moved it to ketsjiengine.
Added setExitKey and getExitKey to the python API
39036:
A couple of the doversions were in the wrong spot. This should fix some issues with the exit key not being set.
[not committed entirely, see below]]
40552: space_logic.py (* fixed an error in space_logic.py *)
40593:
launch blenderplayer from ui not working in OSX fix - by Daniel Stokes and me
########################################################
code left behind (to be included in next commit):
########################################################
{
/* Initialize default values for collision masks */
Object *ob;
for(ob=main->object.first; ob; ob=ob->id.next)
ob->col_group = ob->col_mask = 1;
}
2011-12-20 03:11:56 +00:00
|
|
|
row = layout.row()
|
|
|
|
row.label(text="Resolution:")
|
|
|
|
row = layout.row(align=True)
|
|
|
|
row.prop(rd, "resolution_x", slider=False, text="X")
|
|
|
|
row.prop(rd, "resolution_y", slider=False, text="Y")
|
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):
|
2011-09-15 13:20:18 +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):
|
2013-09-16 13:24:28 +00:00
|
|
|
import sys
|
2009-10-31 19:31:45 +00:00
|
|
|
layout = self.layout
|
2013-09-16 13:24:28 +00:00
|
|
|
not_osx = sys.platform != "darwin"
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2010-08-18 08:26:18 +00:00
|
|
|
gs = context.scene.game_settings
|
2012-01-01 08:52:54 +00:00
|
|
|
|
Cucumber, first batch of merge - UI changes and custom exit key
---------------------------------------------------------------
This was a test drive to see how painful the merge will be.
Next batches are:
- use desktop option for fullscreen
- multisampling option
- bullet collision mask
- python
- storage (vbo, dl, ...)
- lighting
[lighting still needs review]
[python could use review, although it should be straightforward]
[storage should be tested more I think]
Merged /branches/soc-2011-cucumber:r
36991,37059,37157,37416,37497-37499,37501,37522,39036,40593
36991:
==UI==
* Made some options available in Blender Game that were only available in Blender Render (camera resolution, animation fps)
* Created a panel for the embedded player
* Renamed the FPS option for the standalone player to Refresh Rate
* Moved framing options to display
* Made a button to launch the blender player from within blender (only tested on windows for now)
37059:
==UI==
* Added the option to change the exit key for the BGE. The UI currently just sets a number, and this feature most likely does not work for blenderplayer yet. More work on this to come.
* Removed the physics settings from the scene panel for the BGE.
* Added an Add menu in the logic brick header.
37157:
Making the bake options available in Blender Game
37416:
Making the exit key UI element accept key presses instead of numbers. It still does not work for the Blenderplayer, and it does not limit the input to key presses (other events don't work for exiting)
37497:
Some more work on getting the exit key to work in the Blenderplayer.
Input is now restricted to keyboard events only for the exit key UI.
37498:
Some clean up from the last commit.
The exit key setting affects the Blenderplayer now.
37499:
Cleaning up some duplicate code. Now the reverseTranslateTable for converting blender key codes to ketsji key codes is only defined in BL_BlenderDataConverter.
37501:
Centralizing the exit key methods to the keyboard devices. This should make it easier to get exit key control to the python API.
[37517: committed previously]
37522:
Moved control of the exit key away from the keyboard devices, and moved it to ketsjiengine.
Added setExitKey and getExitKey to the python API
39036:
A couple of the doversions were in the wrong spot. This should fix some issues with the exit key not being set.
[not committed entirely, see below]]
40552: space_logic.py (* fixed an error in space_logic.py *)
40593:
launch blenderplayer from ui not working in OSX fix - by Daniel Stokes and me
########################################################
code left behind (to be included in next commit):
########################################################
{
/* Initialize default values for collision masks */
Object *ob;
for(ob=main->object.first; ob; ob=ob->id.next)
ob->col_group = ob->col_mask = 1;
}
2011-12-20 03:11:56 +00:00
|
|
|
row = layout.row()
|
|
|
|
row.operator("wm.blenderplayer_start", text="Start")
|
2012-01-11 20:53:22 +00:00
|
|
|
row.label()
|
2012-01-01 08:52:54 +00:00
|
|
|
|
Cucumber, first batch of merge - UI changes and custom exit key
---------------------------------------------------------------
This was a test drive to see how painful the merge will be.
Next batches are:
- use desktop option for fullscreen
- multisampling option
- bullet collision mask
- python
- storage (vbo, dl, ...)
- lighting
[lighting still needs review]
[python could use review, although it should be straightforward]
[storage should be tested more I think]
Merged /branches/soc-2011-cucumber:r
36991,37059,37157,37416,37497-37499,37501,37522,39036,40593
36991:
==UI==
* Made some options available in Blender Game that were only available in Blender Render (camera resolution, animation fps)
* Created a panel for the embedded player
* Renamed the FPS option for the standalone player to Refresh Rate
* Moved framing options to display
* Made a button to launch the blender player from within blender (only tested on windows for now)
37059:
==UI==
* Added the option to change the exit key for the BGE. The UI currently just sets a number, and this feature most likely does not work for blenderplayer yet. More work on this to come.
* Removed the physics settings from the scene panel for the BGE.
* Added an Add menu in the logic brick header.
37157:
Making the bake options available in Blender Game
37416:
Making the exit key UI element accept key presses instead of numbers. It still does not work for the Blenderplayer, and it does not limit the input to key presses (other events don't work for exiting)
37497:
Some more work on getting the exit key to work in the Blenderplayer.
Input is now restricted to keyboard events only for the exit key UI.
37498:
Some clean up from the last commit.
The exit key setting affects the Blenderplayer now.
37499:
Cleaning up some duplicate code. Now the reverseTranslateTable for converting blender key codes to ketsji key codes is only defined in BL_BlenderDataConverter.
37501:
Centralizing the exit key methods to the keyboard devices. This should make it easier to get exit key control to the python API.
[37517: committed previously]
37522:
Moved control of the exit key away from the keyboard devices, and moved it to ketsjiengine.
Added setExitKey and getExitKey to the python API
39036:
A couple of the doversions were in the wrong spot. This should fix some issues with the exit key not being set.
[not committed entirely, see below]]
40552: space_logic.py (* fixed an error in space_logic.py *)
40593:
launch blenderplayer from ui not working in OSX fix - by Daniel Stokes and me
########################################################
code left behind (to be included in next commit):
########################################################
{
/* Initialize default values for collision masks */
Object *ob;
for(ob=main->object.first; ob; ob=ob->id.next)
ob->col_group = ob->col_mask = 1;
}
2011-12-20 03:11:56 +00:00
|
|
|
row = layout.row()
|
|
|
|
row.label(text="Resolution:")
|
|
|
|
row = layout.row(align=True)
|
2013-09-16 13:24:28 +00:00
|
|
|
row.active = not_osx or not gs.show_fullscreen
|
Cucumber, first batch of merge - UI changes and custom exit key
---------------------------------------------------------------
This was a test drive to see how painful the merge will be.
Next batches are:
- use desktop option for fullscreen
- multisampling option
- bullet collision mask
- python
- storage (vbo, dl, ...)
- lighting
[lighting still needs review]
[python could use review, although it should be straightforward]
[storage should be tested more I think]
Merged /branches/soc-2011-cucumber:r
36991,37059,37157,37416,37497-37499,37501,37522,39036,40593
36991:
==UI==
* Made some options available in Blender Game that were only available in Blender Render (camera resolution, animation fps)
* Created a panel for the embedded player
* Renamed the FPS option for the standalone player to Refresh Rate
* Moved framing options to display
* Made a button to launch the blender player from within blender (only tested on windows for now)
37059:
==UI==
* Added the option to change the exit key for the BGE. The UI currently just sets a number, and this feature most likely does not work for blenderplayer yet. More work on this to come.
* Removed the physics settings from the scene panel for the BGE.
* Added an Add menu in the logic brick header.
37157:
Making the bake options available in Blender Game
37416:
Making the exit key UI element accept key presses instead of numbers. It still does not work for the Blenderplayer, and it does not limit the input to key presses (other events don't work for exiting)
37497:
Some more work on getting the exit key to work in the Blenderplayer.
Input is now restricted to keyboard events only for the exit key UI.
37498:
Some clean up from the last commit.
The exit key setting affects the Blenderplayer now.
37499:
Cleaning up some duplicate code. Now the reverseTranslateTable for converting blender key codes to ketsji key codes is only defined in BL_BlenderDataConverter.
37501:
Centralizing the exit key methods to the keyboard devices. This should make it easier to get exit key control to the python API.
[37517: committed previously]
37522:
Moved control of the exit key away from the keyboard devices, and moved it to ketsjiengine.
Added setExitKey and getExitKey to the python API
39036:
A couple of the doversions were in the wrong spot. This should fix some issues with the exit key not being set.
[not committed entirely, see below]]
40552: space_logic.py (* fixed an error in space_logic.py *)
40593:
launch blenderplayer from ui not working in OSX fix - by Daniel Stokes and me
########################################################
code left behind (to be included in next commit):
########################################################
{
/* Initialize default values for collision masks */
Object *ob;
for(ob=main->object.first; ob; ob=ob->id.next)
ob->col_group = ob->col_mask = 1;
}
2011-12-20 03:11:56 +00:00
|
|
|
row.prop(gs, "resolution_x", slider=False, text="X")
|
|
|
|
row.prop(gs, "resolution_y", slider=False, text="Y")
|
2012-01-11 20:53:22 +00:00
|
|
|
row = layout.row()
|
|
|
|
col = row.column()
|
|
|
|
col.prop(gs, "show_fullscreen")
|
2013-09-16 13:24:28 +00:00
|
|
|
|
|
|
|
if not_osx:
|
|
|
|
col = row.column()
|
|
|
|
col.prop(gs, "use_desktop")
|
|
|
|
col.active = gs.show_fullscreen
|
2012-01-17 17:57:20 +00:00
|
|
|
|
Cucumber, first batch of merge - UI changes and custom exit key
---------------------------------------------------------------
This was a test drive to see how painful the merge will be.
Next batches are:
- use desktop option for fullscreen
- multisampling option
- bullet collision mask
- python
- storage (vbo, dl, ...)
- lighting
[lighting still needs review]
[python could use review, although it should be straightforward]
[storage should be tested more I think]
Merged /branches/soc-2011-cucumber:r
36991,37059,37157,37416,37497-37499,37501,37522,39036,40593
36991:
==UI==
* Made some options available in Blender Game that were only available in Blender Render (camera resolution, animation fps)
* Created a panel for the embedded player
* Renamed the FPS option for the standalone player to Refresh Rate
* Moved framing options to display
* Made a button to launch the blender player from within blender (only tested on windows for now)
37059:
==UI==
* Added the option to change the exit key for the BGE. The UI currently just sets a number, and this feature most likely does not work for blenderplayer yet. More work on this to come.
* Removed the physics settings from the scene panel for the BGE.
* Added an Add menu in the logic brick header.
37157:
Making the bake options available in Blender Game
37416:
Making the exit key UI element accept key presses instead of numbers. It still does not work for the Blenderplayer, and it does not limit the input to key presses (other events don't work for exiting)
37497:
Some more work on getting the exit key to work in the Blenderplayer.
Input is now restricted to keyboard events only for the exit key UI.
37498:
Some clean up from the last commit.
The exit key setting affects the Blenderplayer now.
37499:
Cleaning up some duplicate code. Now the reverseTranslateTable for converting blender key codes to ketsji key codes is only defined in BL_BlenderDataConverter.
37501:
Centralizing the exit key methods to the keyboard devices. This should make it easier to get exit key control to the python API.
[37517: committed previously]
37522:
Moved control of the exit key away from the keyboard devices, and moved it to ketsjiengine.
Added setExitKey and getExitKey to the python API
39036:
A couple of the doversions were in the wrong spot. This should fix some issues with the exit key not being set.
[not committed entirely, see below]]
40552: space_logic.py (* fixed an error in space_logic.py *)
40593:
launch blenderplayer from ui not working in OSX fix - by Daniel Stokes and me
########################################################
code left behind (to be included in next commit):
########################################################
{
/* Initialize default values for collision masks */
Object *ob;
for(ob=main->object.first; ob; ob=ob->id.next)
ob->col_group = ob->col_mask = 1;
}
2011-12-20 03:11:56 +00:00
|
|
|
col = layout.column()
|
2011-09-21 15:18:38 +00:00
|
|
|
col.label(text="Quality:")
|
2012-01-11 20:53:22 +00:00
|
|
|
col.prop(gs, "samples")
|
Cucumber, first batch of merge - UI changes and custom exit key
---------------------------------------------------------------
This was a test drive to see how painful the merge will be.
Next batches are:
- use desktop option for fullscreen
- multisampling option
- bullet collision mask
- python
- storage (vbo, dl, ...)
- lighting
[lighting still needs review]
[python could use review, although it should be straightforward]
[storage should be tested more I think]
Merged /branches/soc-2011-cucumber:r
36991,37059,37157,37416,37497-37499,37501,37522,39036,40593
36991:
==UI==
* Made some options available in Blender Game that were only available in Blender Render (camera resolution, animation fps)
* Created a panel for the embedded player
* Renamed the FPS option for the standalone player to Refresh Rate
* Moved framing options to display
* Made a button to launch the blender player from within blender (only tested on windows for now)
37059:
==UI==
* Added the option to change the exit key for the BGE. The UI currently just sets a number, and this feature most likely does not work for blenderplayer yet. More work on this to come.
* Removed the physics settings from the scene panel for the BGE.
* Added an Add menu in the logic brick header.
37157:
Making the bake options available in Blender Game
37416:
Making the exit key UI element accept key presses instead of numbers. It still does not work for the Blenderplayer, and it does not limit the input to key presses (other events don't work for exiting)
37497:
Some more work on getting the exit key to work in the Blenderplayer.
Input is now restricted to keyboard events only for the exit key UI.
37498:
Some clean up from the last commit.
The exit key setting affects the Blenderplayer now.
37499:
Cleaning up some duplicate code. Now the reverseTranslateTable for converting blender key codes to ketsji key codes is only defined in BL_BlenderDataConverter.
37501:
Centralizing the exit key methods to the keyboard devices. This should make it easier to get exit key control to the python API.
[37517: committed previously]
37522:
Moved control of the exit key away from the keyboard devices, and moved it to ketsjiengine.
Added setExitKey and getExitKey to the python API
39036:
A couple of the doversions were in the wrong spot. This should fix some issues with the exit key not being set.
[not committed entirely, see below]]
40552: space_logic.py (* fixed an error in space_logic.py *)
40593:
launch blenderplayer from ui not working in OSX fix - by Daniel Stokes and me
########################################################
code left behind (to be included in next commit):
########################################################
{
/* Initialize default values for collision masks */
Object *ob;
for(ob=main->object.first; ob; ob=ob->id.next)
ob->col_group = ob->col_mask = 1;
}
2011-12-20 03:11:56 +00:00
|
|
|
col = layout.column(align=True)
|
|
|
|
col.prop(gs, "depth", text="Bit Depth", slider=False)
|
|
|
|
col.prop(gs, "frequency", text="Refresh Rate", slider=False)
|
2009-10-31 19:31:45 +00:00
|
|
|
|
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-08-12 06:57:00 +00:00
|
|
|
class RENDER_PT_game_stereo(RenderButtonsPanel, Panel):
|
2011-09-15 13:20:18 +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':
|
2011-09-21 15:18:38 +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
|
|
|
|
2011-11-08 01:32:34 +00:00
|
|
|
if dome_type in {'FISHEYE', 'TRUNCATED_REAR', 'TRUNCATED_FRONT'}:
|
2009-10-31 23:35:56 +00:00
|
|
|
col = split.column()
|
2011-09-21 15:18:38 +00:00
|
|
|
col.prop(gs, "dome_buffer_resolution", text="Resolution", slider=True)
|
2009-11-23 00:27:30 +00:00
|
|
|
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()
|
2012-03-02 16:05:54 +00:00
|
|
|
col.prop(gs, "dome_tessellation", text="Tessellation")
|
2009-11-23 00:27:30 +00:00
|
|
|
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()
|
2011-09-21 15:18:38 +00:00
|
|
|
col.prop(gs, "dome_buffer_resolution", text="Resolution", slider=True)
|
2012-07-29 12:07:06 +00:00
|
|
|
|
2010-08-06 15:17:44 +00:00
|
|
|
col = split.column()
|
2012-03-02 16:05:54 +00:00
|
|
|
col.prop(gs, "dome_tessellation", text="Tessellation")
|
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()
|
2011-09-21 15:18:38 +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):
|
2011-09-15 13:20:18 +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()
|
2011-09-21 15:18:38 +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")
|
|
|
|
col.prop(gs, "use_glsl_color_management", text="Color Management")
|
2009-10-31 19:31:45 +00:00
|
|
|
|
|
|
|
col = split.column()
|
2011-09-21 15:18:38 +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
|
|
|
|
Cucumber, first batch of merge - UI changes and custom exit key
---------------------------------------------------------------
This was a test drive to see how painful the merge will be.
Next batches are:
- use desktop option for fullscreen
- multisampling option
- bullet collision mask
- python
- storage (vbo, dl, ...)
- lighting
[lighting still needs review]
[python could use review, although it should be straightforward]
[storage should be tested more I think]
Merged /branches/soc-2011-cucumber:r
36991,37059,37157,37416,37497-37499,37501,37522,39036,40593
36991:
==UI==
* Made some options available in Blender Game that were only available in Blender Render (camera resolution, animation fps)
* Created a panel for the embedded player
* Renamed the FPS option for the standalone player to Refresh Rate
* Moved framing options to display
* Made a button to launch the blender player from within blender (only tested on windows for now)
37059:
==UI==
* Added the option to change the exit key for the BGE. The UI currently just sets a number, and this feature most likely does not work for blenderplayer yet. More work on this to come.
* Removed the physics settings from the scene panel for the BGE.
* Added an Add menu in the logic brick header.
37157:
Making the bake options available in Blender Game
37416:
Making the exit key UI element accept key presses instead of numbers. It still does not work for the Blenderplayer, and it does not limit the input to key presses (other events don't work for exiting)
37497:
Some more work on getting the exit key to work in the Blenderplayer.
Input is now restricted to keyboard events only for the exit key UI.
37498:
Some clean up from the last commit.
The exit key setting affects the Blenderplayer now.
37499:
Cleaning up some duplicate code. Now the reverseTranslateTable for converting blender key codes to ketsji key codes is only defined in BL_BlenderDataConverter.
37501:
Centralizing the exit key methods to the keyboard devices. This should make it easier to get exit key control to the python API.
[37517: committed previously]
37522:
Moved control of the exit key away from the keyboard devices, and moved it to ketsjiengine.
Added setExitKey and getExitKey to the python API
39036:
A couple of the doversions were in the wrong spot. This should fix some issues with the exit key not being set.
[not committed entirely, see below]]
40552: space_logic.py (* fixed an error in space_logic.py *)
40593:
launch blenderplayer from ui not working in OSX fix - by Daniel Stokes and me
########################################################
code left behind (to be included in next commit):
########################################################
{
/* Initialize default values for collision masks */
Object *ob;
for(ob=main->object.first; ob; ob=ob->id.next)
ob->col_group = ob->col_mask = 1;
}
2011-12-20 03:11:56 +00:00
|
|
|
class RENDER_PT_game_system(RenderButtonsPanel, Panel):
|
|
|
|
bl_label = "System"
|
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
|
2012-12-18 20:56:25 +00:00
|
|
|
col = layout.column()
|
|
|
|
row = col.row()
|
|
|
|
col = row.column()
|
|
|
|
col.prop(gs, "use_frame_rate")
|
2013-04-23 07:06:29 +00:00
|
|
|
col.prop(gs, "use_restrict_animation_updates")
|
2012-12-24 03:13:53 +00:00
|
|
|
col.prop(gs, "use_material_caching")
|
2012-12-18 20:56:25 +00:00
|
|
|
col = row.column()
|
|
|
|
col.prop(gs, "use_display_lists")
|
|
|
|
col.active = gs.raster_storage != 'VERTEX_BUFFER_OBJECT'
|
2013-01-15 23:15:32 +00:00
|
|
|
|
2013-07-29 22:31:32 +00:00
|
|
|
row = layout.row()
|
|
|
|
row.prop(gs, "vsync")
|
|
|
|
|
Cucumber, first batch of merge - UI changes and custom exit key
---------------------------------------------------------------
This was a test drive to see how painful the merge will be.
Next batches are:
- use desktop option for fullscreen
- multisampling option
- bullet collision mask
- python
- storage (vbo, dl, ...)
- lighting
[lighting still needs review]
[python could use review, although it should be straightforward]
[storage should be tested more I think]
Merged /branches/soc-2011-cucumber:r
36991,37059,37157,37416,37497-37499,37501,37522,39036,40593
36991:
==UI==
* Made some options available in Blender Game that were only available in Blender Render (camera resolution, animation fps)
* Created a panel for the embedded player
* Renamed the FPS option for the standalone player to Refresh Rate
* Moved framing options to display
* Made a button to launch the blender player from within blender (only tested on windows for now)
37059:
==UI==
* Added the option to change the exit key for the BGE. The UI currently just sets a number, and this feature most likely does not work for blenderplayer yet. More work on this to come.
* Removed the physics settings from the scene panel for the BGE.
* Added an Add menu in the logic brick header.
37157:
Making the bake options available in Blender Game
37416:
Making the exit key UI element accept key presses instead of numbers. It still does not work for the Blenderplayer, and it does not limit the input to key presses (other events don't work for exiting)
37497:
Some more work on getting the exit key to work in the Blenderplayer.
Input is now restricted to keyboard events only for the exit key UI.
37498:
Some clean up from the last commit.
The exit key setting affects the Blenderplayer now.
37499:
Cleaning up some duplicate code. Now the reverseTranslateTable for converting blender key codes to ketsji key codes is only defined in BL_BlenderDataConverter.
37501:
Centralizing the exit key methods to the keyboard devices. This should make it easier to get exit key control to the python API.
[37517: committed previously]
37522:
Moved control of the exit key away from the keyboard devices, and moved it to ketsjiengine.
Added setExitKey and getExitKey to the python API
39036:
A couple of the doversions were in the wrong spot. This should fix some issues with the exit key not being set.
[not committed entirely, see below]]
40552: space_logic.py (* fixed an error in space_logic.py *)
40593:
launch blenderplayer from ui not working in OSX fix - by Daniel Stokes and me
########################################################
code left behind (to be included in next commit):
########################################################
{
/* Initialize default values for collision masks */
Object *ob;
for(ob=main->object.first; ob; ob=ob->id.next)
ob->col_group = ob->col_mask = 1;
}
2011-12-20 03:11:56 +00:00
|
|
|
row = layout.row()
|
2012-12-18 20:56:25 +00:00
|
|
|
row.prop(gs, "raster_storage")
|
2013-01-15 23:15:32 +00:00
|
|
|
|
Cucumber, first batch of merge - UI changes and custom exit key
---------------------------------------------------------------
This was a test drive to see how painful the merge will be.
Next batches are:
- use desktop option for fullscreen
- multisampling option
- bullet collision mask
- python
- storage (vbo, dl, ...)
- lighting
[lighting still needs review]
[python could use review, although it should be straightforward]
[storage should be tested more I think]
Merged /branches/soc-2011-cucumber:r
36991,37059,37157,37416,37497-37499,37501,37522,39036,40593
36991:
==UI==
* Made some options available in Blender Game that were only available in Blender Render (camera resolution, animation fps)
* Created a panel for the embedded player
* Renamed the FPS option for the standalone player to Refresh Rate
* Moved framing options to display
* Made a button to launch the blender player from within blender (only tested on windows for now)
37059:
==UI==
* Added the option to change the exit key for the BGE. The UI currently just sets a number, and this feature most likely does not work for blenderplayer yet. More work on this to come.
* Removed the physics settings from the scene panel for the BGE.
* Added an Add menu in the logic brick header.
37157:
Making the bake options available in Blender Game
37416:
Making the exit key UI element accept key presses instead of numbers. It still does not work for the Blenderplayer, and it does not limit the input to key presses (other events don't work for exiting)
37497:
Some more work on getting the exit key to work in the Blenderplayer.
Input is now restricted to keyboard events only for the exit key UI.
37498:
Some clean up from the last commit.
The exit key setting affects the Blenderplayer now.
37499:
Cleaning up some duplicate code. Now the reverseTranslateTable for converting blender key codes to ketsji key codes is only defined in BL_BlenderDataConverter.
37501:
Centralizing the exit key methods to the keyboard devices. This should make it easier to get exit key control to the python API.
[37517: committed previously]
37522:
Moved control of the exit key away from the keyboard devices, and moved it to ketsjiengine.
Added setExitKey and getExitKey to the python API
39036:
A couple of the doversions were in the wrong spot. This should fix some issues with the exit key not being set.
[not committed entirely, see below]]
40552: space_logic.py (* fixed an error in space_logic.py *)
40593:
launch blenderplayer from ui not working in OSX fix - by Daniel Stokes and me
########################################################
code left behind (to be included in next commit):
########################################################
{
/* Initialize default values for collision masks */
Object *ob;
for(ob=main->object.first; ob; ob=ob->id.next)
ob->col_group = ob->col_mask = 1;
}
2011-12-20 03:11:56 +00:00
|
|
|
row = layout.row()
|
|
|
|
row.label("Exit Key")
|
|
|
|
row.prop(gs, "exit_key", text="", event=True)
|
2009-11-21 00:05:43 +00:00
|
|
|
|
2011-02-10 14:59:17 +00:00
|
|
|
|
2011-08-12 06:57:00 +00:00
|
|
|
class RENDER_PT_game_display(RenderButtonsPanel, Panel):
|
2011-09-15 13:20:18 +00:00
|
|
|
bl_label = "Display"
|
2011-02-07 14:53:40 +00:00
|
|
|
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
|
2012-07-29 12:07:06 +00:00
|
|
|
|
2012-07-29 10:03:46 +00:00
|
|
|
gs = context.scene.game_settings
|
2010-08-06 15:17:44 +00:00
|
|
|
|
2012-07-29 10:03:46 +00:00
|
|
|
layout.prop(context.scene.render, "fps", text="Animation Frame Rate", slider=False)
|
Cucumber, first batch of merge - UI changes and custom exit key
---------------------------------------------------------------
This was a test drive to see how painful the merge will be.
Next batches are:
- use desktop option for fullscreen
- multisampling option
- bullet collision mask
- python
- storage (vbo, dl, ...)
- lighting
[lighting still needs review]
[python could use review, although it should be straightforward]
[storage should be tested more I think]
Merged /branches/soc-2011-cucumber:r
36991,37059,37157,37416,37497-37499,37501,37522,39036,40593
36991:
==UI==
* Made some options available in Blender Game that were only available in Blender Render (camera resolution, animation fps)
* Created a panel for the embedded player
* Renamed the FPS option for the standalone player to Refresh Rate
* Moved framing options to display
* Made a button to launch the blender player from within blender (only tested on windows for now)
37059:
==UI==
* Added the option to change the exit key for the BGE. The UI currently just sets a number, and this feature most likely does not work for blenderplayer yet. More work on this to come.
* Removed the physics settings from the scene panel for the BGE.
* Added an Add menu in the logic brick header.
37157:
Making the bake options available in Blender Game
37416:
Making the exit key UI element accept key presses instead of numbers. It still does not work for the Blenderplayer, and it does not limit the input to key presses (other events don't work for exiting)
37497:
Some more work on getting the exit key to work in the Blenderplayer.
Input is now restricted to keyboard events only for the exit key UI.
37498:
Some clean up from the last commit.
The exit key setting affects the Blenderplayer now.
37499:
Cleaning up some duplicate code. Now the reverseTranslateTable for converting blender key codes to ketsji key codes is only defined in BL_BlenderDataConverter.
37501:
Centralizing the exit key methods to the keyboard devices. This should make it easier to get exit key control to the python API.
[37517: committed previously]
37522:
Moved control of the exit key away from the keyboard devices, and moved it to ketsjiengine.
Added setExitKey and getExitKey to the python API
39036:
A couple of the doversions were in the wrong spot. This should fix some issues with the exit key not being set.
[not committed entirely, see below]]
40552: space_logic.py (* fixed an error in space_logic.py *)
40593:
launch blenderplayer from ui not working in OSX fix - by Daniel Stokes and me
########################################################
code left behind (to be included in next commit):
########################################################
{
/* Initialize default values for collision masks */
Object *ob;
for(ob=main->object.first; ob; ob=ob->id.next)
ob->col_group = ob->col_mask = 1;
}
2011-12-20 03:11:56 +00:00
|
|
|
|
2011-02-07 14:53:40 +00:00
|
|
|
flow = layout.column_flow()
|
2011-09-21 15:18:38 +00:00
|
|
|
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")
|
2011-02-07 14:53:40 +00:00
|
|
|
flow.prop(gs, "use_deprecation_warnings")
|
2011-09-21 15:18:38 +00:00
|
|
|
flow.prop(gs, "show_mouse", text="Mouse Cursor")
|
2009-10-31 19:31:45 +00:00
|
|
|
|
Cucumber, first batch of merge - UI changes and custom exit key
---------------------------------------------------------------
This was a test drive to see how painful the merge will be.
Next batches are:
- use desktop option for fullscreen
- multisampling option
- bullet collision mask
- python
- storage (vbo, dl, ...)
- lighting
[lighting still needs review]
[python could use review, although it should be straightforward]
[storage should be tested more I think]
Merged /branches/soc-2011-cucumber:r
36991,37059,37157,37416,37497-37499,37501,37522,39036,40593
36991:
==UI==
* Made some options available in Blender Game that were only available in Blender Render (camera resolution, animation fps)
* Created a panel for the embedded player
* Renamed the FPS option for the standalone player to Refresh Rate
* Moved framing options to display
* Made a button to launch the blender player from within blender (only tested on windows for now)
37059:
==UI==
* Added the option to change the exit key for the BGE. The UI currently just sets a number, and this feature most likely does not work for blenderplayer yet. More work on this to come.
* Removed the physics settings from the scene panel for the BGE.
* Added an Add menu in the logic brick header.
37157:
Making the bake options available in Blender Game
37416:
Making the exit key UI element accept key presses instead of numbers. It still does not work for the Blenderplayer, and it does not limit the input to key presses (other events don't work for exiting)
37497:
Some more work on getting the exit key to work in the Blenderplayer.
Input is now restricted to keyboard events only for the exit key UI.
37498:
Some clean up from the last commit.
The exit key setting affects the Blenderplayer now.
37499:
Cleaning up some duplicate code. Now the reverseTranslateTable for converting blender key codes to ketsji key codes is only defined in BL_BlenderDataConverter.
37501:
Centralizing the exit key methods to the keyboard devices. This should make it easier to get exit key control to the python API.
[37517: committed previously]
37522:
Moved control of the exit key away from the keyboard devices, and moved it to ketsjiengine.
Added setExitKey and getExitKey to the python API
39036:
A couple of the doversions were in the wrong spot. This should fix some issues with the exit key not being set.
[not committed entirely, see below]]
40552: space_logic.py (* fixed an error in space_logic.py *)
40593:
launch blenderplayer from ui not working in OSX fix - by Daniel Stokes and me
########################################################
code left behind (to be included in next commit):
########################################################
{
/* Initialize default values for collision masks */
Object *ob;
for(ob=main->object.first; ob; ob=ob->id.next)
ob->col_group = ob->col_mask = 1;
}
2011-12-20 03:11:56 +00:00
|
|
|
col = layout.column()
|
|
|
|
col.label(text="Framing:")
|
|
|
|
col.row().prop(gs, "frame_type", expand=True)
|
|
|
|
if gs.frame_type == 'LETTERBOX':
|
|
|
|
col.prop(gs, "frame_color", text="")
|
|
|
|
|
2009-10-31 23:35:56 +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-11-11 03:28:46 +00:00
|
|
|
class SCENE_PT_game_navmesh(SceneButtonsPanel, Panel):
|
2011-09-09 22:47:26 +00:00
|
|
|
bl_label = "Navigation mesh"
|
2011-11-22 12:18:15 +00:00
|
|
|
bl_options = {'DEFAULT_CLOSED'}
|
2011-09-09 22:47:26 +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 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
|
|
|
|
|
2012-07-04 21:41:05 +00:00
|
|
|
layout.operator("mesh.navmesh_make", text="Build navigation mesh")
|
2011-09-09 22:47:26 +00:00
|
|
|
|
|
|
|
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()
|
2011-10-10 10:24:26 +00:00
|
|
|
col.prop(rd, "slope_max")
|
|
|
|
col.prop(rd, "climb_max")
|
2011-09-09 22:47:26 +00:00
|
|
|
|
|
|
|
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
|
|
|
|
2012-01-01 08:52:54 +00:00
|
|
|
|
Cucumber, first batch of merge - UI changes and custom exit key
---------------------------------------------------------------
This was a test drive to see how painful the merge will be.
Next batches are:
- use desktop option for fullscreen
- multisampling option
- bullet collision mask
- python
- storage (vbo, dl, ...)
- lighting
[lighting still needs review]
[python could use review, although it should be straightforward]
[storage should be tested more I think]
Merged /branches/soc-2011-cucumber:r
36991,37059,37157,37416,37497-37499,37501,37522,39036,40593
36991:
==UI==
* Made some options available in Blender Game that were only available in Blender Render (camera resolution, animation fps)
* Created a panel for the embedded player
* Renamed the FPS option for the standalone player to Refresh Rate
* Moved framing options to display
* Made a button to launch the blender player from within blender (only tested on windows for now)
37059:
==UI==
* Added the option to change the exit key for the BGE. The UI currently just sets a number, and this feature most likely does not work for blenderplayer yet. More work on this to come.
* Removed the physics settings from the scene panel for the BGE.
* Added an Add menu in the logic brick header.
37157:
Making the bake options available in Blender Game
37416:
Making the exit key UI element accept key presses instead of numbers. It still does not work for the Blenderplayer, and it does not limit the input to key presses (other events don't work for exiting)
37497:
Some more work on getting the exit key to work in the Blenderplayer.
Input is now restricted to keyboard events only for the exit key UI.
37498:
Some clean up from the last commit.
The exit key setting affects the Blenderplayer now.
37499:
Cleaning up some duplicate code. Now the reverseTranslateTable for converting blender key codes to ketsji key codes is only defined in BL_BlenderDataConverter.
37501:
Centralizing the exit key methods to the keyboard devices. This should make it easier to get exit key control to the python API.
[37517: committed previously]
37522:
Moved control of the exit key away from the keyboard devices, and moved it to ketsjiengine.
Added setExitKey and getExitKey to the python API
39036:
A couple of the doversions were in the wrong spot. This should fix some issues with the exit key not being set.
[not committed entirely, see below]]
40552: space_logic.py (* fixed an error in space_logic.py *)
40593:
launch blenderplayer from ui not working in OSX fix - by Daniel Stokes and me
########################################################
code left behind (to be included in next commit):
########################################################
{
/* Initialize default values for collision masks */
Object *ob;
for(ob=main->object.first; ob; ob=ob->id.next)
ob->col_group = ob->col_mask = 1;
}
2011-12-20 03:11:56 +00:00
|
|
|
class RENDER_PT_game_sound(RenderButtonsPanel, Panel):
|
|
|
|
bl_label = "Sound"
|
|
|
|
COMPAT_ENGINES = {'BLENDER_GAME'}
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
|
|
|
|
|
|
|
scene = context.scene
|
|
|
|
|
|
|
|
layout.prop(scene, "audio_distance_model")
|
|
|
|
|
|
|
|
col = layout.column(align=True)
|
|
|
|
col.prop(scene, "audio_doppler_speed", text="Speed")
|
|
|
|
col.prop(scene, "audio_doppler_factor")
|
2009-10-31 23:35:56 +00:00
|
|
|
|
2012-01-01 08:52:54 +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):
|
2011-09-15 13:20:18 +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):
|
2011-09-15 13:20:18 +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
|
2012-07-29 12:07:06 +00:00
|
|
|
|
2012-07-29 10:03:46 +00:00
|
|
|
layout.prop(world.mist_settings, "falloff")
|
2011-12-29 01:38:11 +00:00
|
|
|
|
|
|
|
row = layout.row(align=True)
|
2011-02-26 16:04:14 +00:00
|
|
|
row.prop(world.mist_settings, "start")
|
|
|
|
row.prop(world.mist_settings, "depth")
|
2012-07-29 12:07:06 +00:00
|
|
|
|
2012-07-29 10:03:46 +00:00
|
|
|
layout.prop(world.mist_settings, "intensity", text="Minimum Intensity")
|
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):
|
2011-09-15 13:20:18 +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
|
|
|
|
2013-05-16 21:37:24 +00:00
|
|
|
layout.prop(gs, "physics_engine", text="Engine")
|
2009-10-31 19:31:45 +00:00
|
|
|
if gs.physics_engine != 'NONE':
|
2013-05-16 21:37:24 +00:00
|
|
|
layout.prop(gs, "physics_gravity", text="Gravity")
|
2009-10-31 19:31:45 +00:00
|
|
|
|
|
|
|
split = layout.split()
|
|
|
|
|
|
|
|
col = split.column()
|
2011-09-21 15:18:38 +00:00
|
|
|
col.label(text="Physics Steps:")
|
2009-10-31 19:31:45 +00:00
|
|
|
sub = col.column(align=True)
|
2011-09-21 15:18:38 +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()
|
2011-09-21 15:18:38 +00:00
|
|
|
col.label(text="Logic Steps:")
|
|
|
|
col.prop(gs, "logic_step_max", text="Max")
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2012-05-29 20:30:33 +00:00
|
|
|
col = layout.column()
|
|
|
|
col.label(text="Physics Deactivation:")
|
|
|
|
sub = col.row(align=True)
|
|
|
|
sub.prop(gs, "deactivation_linear_threshold", text="Linear Threshold")
|
|
|
|
sub.prop(gs, "deactivation_angular_threshold", text="Angular Threshold")
|
|
|
|
sub = col.row()
|
|
|
|
sub.prop(gs, "deactivation_time", text="Time")
|
2013-06-27 03:05:19 +00:00
|
|
|
|
2013-05-16 21:37:24 +00:00
|
|
|
col = layout.column()
|
|
|
|
col.prop(gs, "use_occlusion_culling", text="Occlusion Culling")
|
|
|
|
sub = col.column()
|
|
|
|
sub.active = gs.use_occlusion_culling
|
|
|
|
sub.prop(gs, "occlusion_culling_resolution", text="Resolution")
|
2012-05-29 20:30:33 +00:00
|
|
|
|
2009-10-31 19:31:45 +00:00
|
|
|
else:
|
|
|
|
split = layout.split()
|
|
|
|
|
|
|
|
col = split.column()
|
2011-09-21 15:18:38 +00:00
|
|
|
col.label(text="Physics Steps:")
|
|
|
|
col.prop(gs, "fps", text="FPS")
|
2009-10-31 19:31:45 +00:00
|
|
|
|
|
|
|
col = split.column()
|
2011-09-21 15:18:38 +00:00
|
|
|
col.label(text="Logic Steps:")
|
|
|
|
col.prop(gs, "logic_step_max", text="Max")
|
2011-04-04 10:13:04 +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")
|
2012-05-01 13:32:55 +00:00
|
|
|
|
|
|
|
|
2012-05-01 11:09:05 +00:00
|
|
|
class DataButtonsPanel():
|
|
|
|
bl_space_type = 'PROPERTIES'
|
|
|
|
bl_region_type = 'WINDOW'
|
|
|
|
bl_context = "data"
|
2012-05-01 13:32:55 +00:00
|
|
|
|
|
|
|
|
|
|
|
class DATA_PT_shadow_game(DataButtonsPanel, Panel):
|
2012-05-01 11:09:05 +00:00
|
|
|
bl_label = "Shadow"
|
|
|
|
COMPAT_ENGINES = {'BLENDER_GAME'}
|
|
|
|
|
|
|
|
@classmethod
|
|
|
|
def poll(cls, context):
|
|
|
|
COMPAT_LIGHTS = {'SPOT', 'SUN'}
|
|
|
|
lamp = context.lamp
|
|
|
|
engine = context.scene.render.engine
|
|
|
|
return (lamp and lamp.type in COMPAT_LIGHTS) and (engine in cls.COMPAT_ENGINES)
|
2012-05-01 13:32:55 +00:00
|
|
|
|
2012-05-01 11:09:05 +00:00
|
|
|
def draw_header(self, context):
|
|
|
|
lamp = context.lamp
|
2012-05-01 13:32:55 +00:00
|
|
|
|
2012-05-01 11:09:05 +00:00
|
|
|
self.layout.prop(lamp, "use_shadow", text="")
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
|
|
|
|
|
|
|
lamp = context.lamp
|
2012-05-01 13:32:55 +00:00
|
|
|
|
2012-05-01 11:09:05 +00:00
|
|
|
layout.active = lamp.use_shadow
|
2012-05-01 13:32:55 +00:00
|
|
|
|
2012-05-01 11:09:05 +00:00
|
|
|
split = layout.split()
|
|
|
|
|
|
|
|
col = split.column()
|
|
|
|
col.prop(lamp, "shadow_color", text="")
|
|
|
|
|
|
|
|
col = split.column()
|
|
|
|
col.prop(lamp, "use_shadow_layer", text="This Layer Only")
|
|
|
|
col.prop(lamp, "use_only_shadow")
|
2012-05-01 13:32:55 +00:00
|
|
|
|
2012-05-01 11:09:05 +00:00
|
|
|
col = layout.column()
|
|
|
|
col.label("Buffer Type:")
|
|
|
|
col.prop(lamp, "ge_shadow_buffer_type", text="", toggle=True)
|
|
|
|
col.label("Quality:")
|
|
|
|
col = layout.column(align=True)
|
|
|
|
col.prop(lamp, "shadow_buffer_size", text="Size")
|
|
|
|
col.prop(lamp, "shadow_buffer_bias", text="Bias")
|
|
|
|
col.prop(lamp, "shadow_buffer_bleed_bias", text="Bleed Bias")
|
|
|
|
|
|
|
|
row = layout.row()
|
|
|
|
row.label("Clipping:")
|
|
|
|
row = layout.row(align=True)
|
|
|
|
row.prop(lamp, "shadow_buffer_clip_start", text="Clip Start")
|
|
|
|
row.prop(lamp, "shadow_buffer_clip_end", text="Clip End")
|
|
|
|
|
|
|
|
if lamp.type == 'SUN':
|
|
|
|
row = layout.row()
|
|
|
|
row.prop(lamp, "shadow_frustum_size", text="Frustum Size")
|
|
|
|
|
2010-02-14 11:21:21 +00:00
|
|
|
|
2013-12-18 06:35:05 +00:00
|
|
|
class ObjectButtonsPanel():
|
|
|
|
bl_space_type = 'PROPERTIES'
|
|
|
|
bl_region_type = 'WINDOW'
|
|
|
|
bl_context = "object"
|
|
|
|
|
|
|
|
|
|
|
|
class OBJECT_MT_lod_tools(Menu):
|
|
|
|
bl_label = "Level Of Detail Tools"
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
|
|
|
|
|
|
|
layout.operator("object.lod_by_name", text="Set By Name")
|
|
|
|
layout.operator("object.lod_generate", text="Generate")
|
|
|
|
layout.operator("object.lod_clear_all", text="Clear All", icon='PANEL_CLOSE')
|
|
|
|
|
|
|
|
|
|
|
|
class OBJECT_PT_levels_of_detail(ObjectButtonsPanel, Panel):
|
|
|
|
bl_label = "Levels of Detail"
|
|
|
|
COMPAT_ENGINES = {'BLENDER_GAME'}
|
|
|
|
|
|
|
|
@classmethod
|
|
|
|
def poll(cls, context):
|
|
|
|
return context.scene.render.engine in cls.COMPAT_ENGINES
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
|
|
|
ob = context.object
|
|
|
|
|
|
|
|
col = layout.column()
|
|
|
|
|
|
|
|
for i, level in enumerate(ob.lod_levels):
|
|
|
|
if i == 0:
|
|
|
|
continue
|
|
|
|
box = col.box()
|
|
|
|
row = box.row()
|
|
|
|
row.prop(level, "object", text="")
|
|
|
|
row.operator("object.lod_remove", text="", icon='PANEL_CLOSE').index = i
|
|
|
|
|
|
|
|
row = box.row()
|
|
|
|
row.prop(level, "distance")
|
|
|
|
row = row.row(align=True)
|
|
|
|
row.prop(level, "use_mesh", text="")
|
|
|
|
row.prop(level, "use_material", text="")
|
|
|
|
|
|
|
|
row = col.row(align=True)
|
|
|
|
row.operator("object.lod_add", text="Add", icon='ZOOMIN')
|
|
|
|
row.menu("OBJECT_MT_lod_tools", text="", icon='TRIA_DOWN')
|
|
|
|
|
|
|
|
|
2011-04-04 10:13:04 +00:00
|
|
|
if __name__ == "__main__": # only for live edit.
|
|
|
|
bpy.utils.register_module(__name__)
|