diff options
author | Dalai Felinto <dfelinto@gmail.com> | 2018-04-16 15:07:42 +0300 |
---|---|---|
committer | Dalai Felinto <dfelinto@gmail.com> | 2018-04-17 18:51:28 +0300 |
commit | 159806140fd33e6ddab951c0f6f180cfbf927d38 (patch) | |
tree | da076be3baa4d987fb5935e220a3d901c926e0e7 /release/scripts | |
parent | 28b996a9d2090efdd74115a653629ef9d7d871f7 (diff) |
Removing Blender Game Engine from Blender 2.8
Folders removed entirely:
* //extern/recastnavigation
* //intern/decklink
* //intern/moto
* //source/blender/editors/space_logic
* //source/blenderplayer
* //source/gameengine
This includes DNA data and any reference to the BGE code in Blender itself.
We are bumping the subversion.
Pending tasks:
* Tile/clamp code in image editor draw code.
* Viewport drawing code (so much of this will go away because of BI removal
that we can wait until then to remove this.
Diffstat (limited to 'release/scripts')
32 files changed, 100 insertions, 1498 deletions
diff --git a/release/scripts/modules/bl_i18n_utils/utils_spell_check.py b/release/scripts/modules/bl_i18n_utils/utils_spell_check.py index 2ce8385f714..ad25283a3fc 100644 --- a/release/scripts/modules/bl_i18n_utils/utils_spell_check.py +++ b/release/scripts/modules/bl_i18n_utils/utils_spell_check.py @@ -589,7 +589,6 @@ class SpellChecker: "yuv", "yuva", # Blender acronyms - "bge", "bli", "bpy", "bvh", diff --git a/release/scripts/modules/bpy_types.py b/release/scripts/modules/bpy_types.py index 5387af46d9d..511fc7e8d1e 100644 --- a/release/scripts/modules/bpy_types.py +++ b/release/scripts/modules/bpy_types.py @@ -517,15 +517,6 @@ class Text(bpy_types.ID): self.clear() self.write(string) - @property - def users_logic(self): - """Logic bricks that use this text""" - import bpy - return tuple(obj for obj in bpy.data.objects - if self in [cont.text for cont in obj.game.controllers - if cont.type == 'PYTHON'] - ) - # values are module: [(cls, path, line), ...] TypeMap = {} diff --git a/release/scripts/presets/keyconfig/3dsmax.py b/release/scripts/presets/keyconfig/3dsmax.py index a4288377b82..99fb11162c6 100644 --- a/release/scripts/presets/keyconfig/3dsmax.py +++ b/release/scripts/presets/keyconfig/3dsmax.py @@ -294,7 +294,6 @@ kmi = km.keymap_items.new('wm.context_cycle_enum', 'O', 'PRESS', shift=True) kmi.properties.data_path = 'tool_settings.proportional_edit_falloff' kmi = km.keymap_items.new('wm.context_toggle', 'O', 'PRESS') kmi.properties.data_path = 'tool_settings.use_proportional_edit_objects' -kmi = km.keymap_items.new('view3d.game_start', 'P', 'PRESS', shift=True, ctrl=True, alt=True) kmi = km.keymap_items.new('object.select_all', 'A', 'PRESS', ctrl=True) kmi.properties.action = 'INVERT' kmi = km.keymap_items.new('object.select_linked', 'L', 'PRESS', shift=True) diff --git a/release/scripts/startup/bl_operators/wm.py b/release/scripts/startup/bl_operators/wm.py index 1bbb3e9883e..9183c69b207 100644 --- a/release/scripts/startup/bl_operators/wm.py +++ b/release/scripts/startup/bl_operators/wm.py @@ -1492,54 +1492,6 @@ class WM_OT_copy_prev_settings(Operator): return {'CANCELLED'} -class WM_OT_blenderplayer_start(Operator): - """Launch the blender-player with the current blend-file""" - bl_idname = "wm.blenderplayer_start" - bl_label = "Start Game In Player" - - def execute(self, context): - import os - import sys - import subprocess - - gs = context.scene.game_settings - - # these remain the same every execution - blender_bin_path = bpy.app.binary_path - blender_bin_dir = os.path.dirname(blender_bin_path) - ext = os.path.splitext(blender_bin_path)[-1] - player_path = os.path.join(blender_bin_dir, "blenderplayer" + ext) - # done static vars - - if sys.platform == "darwin": - player_path = os.path.join(blender_bin_dir, "../../../blenderplayer.app/Contents/MacOS/blenderplayer") - - if not os.path.exists(player_path): - self.report({'ERROR'}, "Player path: %r not found" % player_path) - return {'CANCELLED'} - - filepath = bpy.data.filepath + '~' if bpy.data.is_saved else os.path.join(bpy.app.tempdir, "game.blend") - bpy.ops.wm.save_as_mainfile('EXEC_DEFAULT', filepath=filepath, copy=True) - - # start the command line call with the player path - args = [player_path] - - # handle some UI options as command line arguments - args.extend([ - "-g", "show_framerate", "=", "%d" % gs.show_framerate_profile, - "-g", "show_profile", "=", "%d" % gs.show_framerate_profile, - "-g", "show_properties", "=", "%d" % gs.show_debug_properties, - "-g", "ignore_deprecation_warnings", "=", "%d" % (not gs.use_deprecation_warnings), - ]) - - # finish the call with the path to the blend file - args.append(filepath) - - subprocess.call(args) - os.remove(filepath) - return {'FINISHED'} - - class WM_OT_keyconfig_test(Operator): """Test key-config for conflicts""" bl_idname = "wm.keyconfig_test" @@ -2375,7 +2327,6 @@ classes = ( WM_OT_app_template_install, WM_OT_appconfig_activate, WM_OT_appconfig_default, - WM_OT_blenderplayer_start, WM_OT_context_collection_boolean_set, WM_OT_context_cycle_array, WM_OT_context_cycle_enum, diff --git a/release/scripts/startup/bl_ui/__init__.py b/release/scripts/startup/bl_ui/__init__.py index 79d044c25bf..5c50cb74fdb 100644 --- a/release/scripts/startup/bl_ui/__init__.py +++ b/release/scripts/startup/bl_ui/__init__.py @@ -43,7 +43,6 @@ _modules = [ "properties_data_lightprobe", "properties_data_speaker", "properties_data_workspace", - "properties_game", "properties_mask_common", "properties_material", "properties_object", @@ -78,7 +77,6 @@ _modules = [ "space_graph", "space_image", "space_info", - "space_logic", "space_nla", "space_node", "space_outliner", diff --git a/release/scripts/startup/bl_ui/properties_data_armature.py b/release/scripts/startup/bl_ui/properties_data_armature.py index 413636d005b..12f862d92a1 100644 --- a/release/scripts/startup/bl_ui/properties_data_armature.py +++ b/release/scripts/startup/bl_ui/properties_data_armature.py @@ -65,11 +65,6 @@ class DATA_PT_skeleton(ArmatureButtonsPanel, Panel): col.label(text="Protected Layers:") col.prop(arm, "layers_protected", text="") - if context.engine == 'BLENDER_GAME': - col = layout.column() - col.label(text="Deform:") - col.prop(arm, "deform_method", expand=True) - class DATA_PT_display(ArmatureButtonsPanel, Panel): bl_label = "Display" @@ -328,7 +323,7 @@ class DATA_PT_onion_skinning(OnionSkinButtonsPanel): # , Panel): # inherit from class DATA_PT_custom_props_arm(ArmatureButtonsPanel, PropertyPanel, Panel): - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME', 'BLENDER_CLAY', 'BLENDER_EEVEE'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_CLAY', 'BLENDER_EEVEE'} _context_path = "object.data" _property_type = bpy.types.Armature diff --git a/release/scripts/startup/bl_ui/properties_data_bone.py b/release/scripts/startup/bl_ui/properties_data_bone.py index f0ef0032059..e1763e363ae 100644 --- a/release/scripts/startup/bl_ui/properties_data_bone.py +++ b/release/scripts/startup/bl_ui/properties_data_bone.py @@ -433,7 +433,7 @@ class BONE_PT_deform(BoneButtonsPanel, Panel): class BONE_PT_custom_props(BoneButtonsPanel, PropertyPanel, Panel): - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME', 'BLENDER_CLAY', 'BLENDER_EEVEE'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_CLAY', 'BLENDER_EEVEE'} _property_type = bpy.types.Bone, bpy.types.EditBone, bpy.types.PoseBone @property diff --git a/release/scripts/startup/bl_ui/properties_data_camera.py b/release/scripts/startup/bl_ui/properties_data_camera.py index 0d0fc96550d..bd80285515b 100644 --- a/release/scripts/startup/bl_ui/properties_data_camera.py +++ b/release/scripts/startup/bl_ui/properties_data_camera.py @@ -37,7 +37,7 @@ class CAMERA_MT_presets(Menu): bl_label = "Camera Presets" preset_subdir = "camera" preset_operator = "script.execute_preset" - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME', 'BLENDER_CLAY', 'BLENDER_EEVEE'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_CLAY', 'BLENDER_EEVEE'} draw = Menu.draw_preset @@ -45,14 +45,14 @@ class SAFE_AREAS_MT_presets(Menu): bl_label = "Camera Presets" preset_subdir = "safe_areas" preset_operator = "script.execute_preset" - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME', 'BLENDER_CLAY', 'BLENDER_EEVEE'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_CLAY', 'BLENDER_EEVEE'} draw = Menu.draw_preset class DATA_PT_context_camera(CameraButtonsPanel, Panel): bl_label = "" bl_options = {'HIDE_HEADER'} - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME', 'BLENDER_CLAY', 'BLENDER_EEVEE'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_CLAY', 'BLENDER_EEVEE'} def draw(self, context): layout = self.layout @@ -72,7 +72,7 @@ class DATA_PT_context_camera(CameraButtonsPanel, Panel): class DATA_PT_lens(CameraButtonsPanel, Panel): bl_label = "Lens" - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME', 'BLENDER_CLAY', 'BLENDER_EEVEE'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_CLAY', 'BLENDER_EEVEE'} def draw(self, context): layout = self.layout @@ -183,7 +183,7 @@ class DATA_PT_camera_stereoscopy(CameraButtonsPanel, Panel): class DATA_PT_camera(CameraButtonsPanel, Panel): bl_label = "Camera" - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME', 'BLENDER_CLAY', 'BLENDER_EEVEE'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_CLAY', 'BLENDER_EEVEE'} def draw(self, context): layout = self.layout @@ -217,7 +217,7 @@ class DATA_PT_camera(CameraButtonsPanel, Panel): class DATA_PT_camera_dof(CameraButtonsPanel, Panel): bl_label = "Depth of Field" - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME', 'BLENDER_CLAY', 'BLENDER_EEVEE'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_CLAY', 'BLENDER_EEVEE'} def draw(self, context): layout = self.layout @@ -258,7 +258,7 @@ class DATA_PT_camera_dof(CameraButtonsPanel, Panel): class DATA_PT_camera_background_image(CameraButtonsPanel, Panel): bl_label = "Background Images" bl_options = {'DEFAULT_CLOSED'} - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME', 'BLENDER_CLAY', 'BLENDER_EEVEE'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_CLAY', 'BLENDER_EEVEE'} def draw_header(self, context): cam = context.camera @@ -358,7 +358,7 @@ class DATA_PT_camera_background_image(CameraButtonsPanel, Panel): class DATA_PT_camera_display(CameraButtonsPanel, Panel): bl_label = "Display" - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME', 'BLENDER_CLAY', 'BLENDER_EEVEE'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_CLAY', 'BLENDER_EEVEE'} def draw(self, context): layout = self.layout @@ -388,7 +388,7 @@ class DATA_PT_camera_display(CameraButtonsPanel, Panel): class DATA_PT_camera_safe_areas(CameraButtonsPanel, Panel): bl_label = "Safe Areas" bl_options = {'DEFAULT_CLOSED'} - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME', 'BLENDER_CLAY', 'BLENDER_EEVEE'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_CLAY', 'BLENDER_EEVEE'} def draw_header(self, context): cam = context.camera @@ -404,7 +404,7 @@ class DATA_PT_camera_safe_areas(CameraButtonsPanel, Panel): class DATA_PT_custom_props_camera(CameraButtonsPanel, PropertyPanel, Panel): - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME', 'BLENDER_CLAY', 'BLENDER_EEVEE'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_CLAY', 'BLENDER_EEVEE'} _context_path = "object.data" _property_type = bpy.types.Camera diff --git a/release/scripts/startup/bl_ui/properties_data_curve.py b/release/scripts/startup/bl_ui/properties_data_curve.py index 6fb147007e6..00edc6403f9 100644 --- a/release/scripts/startup/bl_ui/properties_data_curve.py +++ b/release/scripts/startup/bl_ui/properties_data_curve.py @@ -136,7 +136,7 @@ class DATA_PT_shape_curve(CurveButtonsPanel, Panel): class DATA_PT_curve_texture_space(CurveButtonsPanel, Panel): bl_label = "Texture Space" bl_options = {'DEFAULT_CLOSED'} - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME', 'BLENDER_CLAY', 'BLENDER_EEVEE'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_CLAY', 'BLENDER_EEVEE'} def draw(self, context): layout = self.layout @@ -427,7 +427,7 @@ class DATA_PT_text_boxes(CurveButtonsPanelText, Panel): class DATA_PT_custom_props_curve(CurveButtonsPanel, PropertyPanel, Panel): - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME', 'BLENDER_CLAY', 'BLENDER_EEVEE'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_CLAY', 'BLENDER_EEVEE'} _context_path = "object.data" _property_type = bpy.types.Curve diff --git a/release/scripts/startup/bl_ui/properties_data_lamp.py b/release/scripts/startup/bl_ui/properties_data_lamp.py index 9ee17d808cf..f3daf64b442 100644 --- a/release/scripts/startup/bl_ui/properties_data_lamp.py +++ b/release/scripts/startup/bl_ui/properties_data_lamp.py @@ -26,7 +26,7 @@ class LAMP_MT_sunsky_presets(Menu): bl_label = "Sun & Sky Presets" preset_subdir = "sunsky" preset_operator = "script.execute_preset" - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME', 'BLENDER_CLAY', 'BLENDER_EEVEE'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_CLAY', 'BLENDER_EEVEE'} draw = Menu.draw_preset @@ -44,7 +44,7 @@ class DataButtonsPanel: class DATA_PT_context_lamp(DataButtonsPanel, Panel): bl_label = "" bl_options = {'HIDE_HEADER'} - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME', 'BLENDER_CLAY', 'BLENDER_EEVEE'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_CLAY', 'BLENDER_EEVEE'} def draw(self, context): layout = self.layout @@ -68,7 +68,7 @@ class DATA_PT_context_lamp(DataButtonsPanel, Panel): class DATA_PT_preview(DataButtonsPanel, Panel): bl_label = "Preview" - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME', 'BLENDER_CLAY', 'BLENDER_EEVEE'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_CLAY', 'BLENDER_EEVEE'} def draw(self, context): self.layout.template_preview(context.lamp) @@ -76,7 +76,7 @@ class DATA_PT_preview(DataButtonsPanel, Panel): class DATA_PT_lamp(DataButtonsPanel, Panel): bl_label = "Lamp" - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME', 'BLENDER_CLAY'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_CLAY'} def draw(self, context): layout = self.layout @@ -417,7 +417,7 @@ class DATA_PT_EEVEE_shadow(DataButtonsPanel, Panel): class DATA_PT_area(DataButtonsPanel, Panel): bl_label = "Area Shape" - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME', 'BLENDER_CLAY'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_CLAY'} @classmethod def poll(cls, context): @@ -443,7 +443,7 @@ class DATA_PT_area(DataButtonsPanel, Panel): class DATA_PT_spot(DataButtonsPanel, Panel): bl_label = "Spot Shape" - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME', 'BLENDER_CLAY'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_CLAY'} @classmethod def poll(cls, context): @@ -504,7 +504,7 @@ class DATA_PT_spot(DataButtonsPanel, Panel): class DATA_PT_falloff_curve(DataButtonsPanel, Panel): bl_label = "Falloff Curve" bl_options = {'DEFAULT_CLOSED'} - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME', 'BLENDER_CLAY', 'BLENDER_EEVEE'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_CLAY', 'BLENDER_EEVEE'} @classmethod def poll(cls, context): @@ -520,7 +520,7 @@ class DATA_PT_falloff_curve(DataButtonsPanel, Panel): class DATA_PT_custom_props_lamp(DataButtonsPanel, PropertyPanel, Panel): - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME', 'BLENDER_CLAY', 'BLENDER_EEVEE'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_CLAY', 'BLENDER_EEVEE'} _context_path = "object.data" _property_type = bpy.types.Lamp diff --git a/release/scripts/startup/bl_ui/properties_data_lattice.py b/release/scripts/startup/bl_ui/properties_data_lattice.py index 34cb323a8cb..c309642e8bc 100644 --- a/release/scripts/startup/bl_ui/properties_data_lattice.py +++ b/release/scripts/startup/bl_ui/properties_data_lattice.py @@ -78,7 +78,7 @@ class DATA_PT_lattice(DataButtonsPanel, Panel): class DATA_PT_custom_props_lattice(DataButtonsPanel, PropertyPanel, Panel): - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME', 'BLENDER_CLAY', 'BLENDER_EEVEE'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_CLAY', 'BLENDER_EEVEE'} _context_path = "object.data" _property_type = bpy.types.Lattice diff --git a/release/scripts/startup/bl_ui/properties_data_mesh.py b/release/scripts/startup/bl_ui/properties_data_mesh.py index 9f927fe3368..30690418e51 100644 --- a/release/scripts/startup/bl_ui/properties_data_mesh.py +++ b/release/scripts/startup/bl_ui/properties_data_mesh.py @@ -24,7 +24,7 @@ from rna_prop_ui import PropertyPanel class MESH_MT_vertex_group_specials(Menu): bl_label = "Vertex Group Specials" - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME', 'BLENDER_CLAY', 'BLENDER_EEVEE'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_CLAY', 'BLENDER_EEVEE'} def draw(self, context): layout = self.layout @@ -48,7 +48,7 @@ class MESH_MT_vertex_group_specials(Menu): class MESH_MT_shape_key_specials(Menu): bl_label = "Shape Key Specials" - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME', 'BLENDER_CLAY', 'BLENDER_EEVEE'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_CLAY', 'BLENDER_EEVEE'} def draw(self, context): layout = self.layout @@ -137,7 +137,7 @@ class MeshButtonsPanel: class DATA_PT_context_mesh(MeshButtonsPanel, Panel): bl_label = "" bl_options = {'HIDE_HEADER'} - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME', 'BLENDER_CLAY', 'BLENDER_EEVEE'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_CLAY', 'BLENDER_EEVEE'} def draw(self, context): layout = self.layout @@ -154,7 +154,7 @@ class DATA_PT_context_mesh(MeshButtonsPanel, Panel): class DATA_PT_normals(MeshButtonsPanel, Panel): bl_label = "Normals" - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME', 'BLENDER_CLAY', 'BLENDER_EEVEE'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_CLAY', 'BLENDER_EEVEE'} def draw(self, context): layout = self.layout @@ -175,7 +175,7 @@ class DATA_PT_normals(MeshButtonsPanel, Panel): class DATA_PT_texture_space(MeshButtonsPanel, Panel): bl_label = "Texture Space" bl_options = {'DEFAULT_CLOSED'} - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME', 'BLENDER_CLAY', 'BLENDER_EEVEE'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_CLAY', 'BLENDER_EEVEE'} def draw(self, context): layout = self.layout @@ -194,7 +194,7 @@ class DATA_PT_texture_space(MeshButtonsPanel, Panel): class DATA_PT_vertex_groups(MeshButtonsPanel, Panel): bl_label = "Vertex Groups" - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME', 'BLENDER_CLAY', 'BLENDER_EEVEE'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_CLAY', 'BLENDER_EEVEE'} @classmethod def poll(cls, context): @@ -241,7 +241,7 @@ class DATA_PT_vertex_groups(MeshButtonsPanel, Panel): class DATA_PT_face_maps(MeshButtonsPanel, Panel): bl_label = "Face Maps" - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'} + COMPAT_ENGINES = {'BLENDER_RENDER'} @classmethod def poll(cls, context): @@ -282,7 +282,7 @@ class DATA_PT_face_maps(MeshButtonsPanel, Panel): class DATA_PT_shape_keys(MeshButtonsPanel, Panel): bl_label = "Shape Keys" - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME', 'BLENDER_CLAY', 'BLENDER_EEVEE'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_CLAY', 'BLENDER_EEVEE'} @classmethod def poll(cls, context): @@ -375,7 +375,7 @@ class DATA_PT_shape_keys(MeshButtonsPanel, Panel): class DATA_PT_uv_texture(MeshButtonsPanel, Panel): bl_label = "UV Maps" - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME', 'BLENDER_CLAY', 'BLENDER_EEVEE'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_CLAY', 'BLENDER_EEVEE'} def draw(self, context): layout = self.layout @@ -394,7 +394,7 @@ class DATA_PT_uv_texture(MeshButtonsPanel, Panel): class DATA_PT_vertex_colors(MeshButtonsPanel, Panel): bl_label = "Vertex Colors" - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME', 'BLENDER_CLAY', 'BLENDER_EEVEE'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_CLAY', 'BLENDER_EEVEE'} def draw(self, context): layout = self.layout @@ -414,7 +414,7 @@ class DATA_PT_vertex_colors(MeshButtonsPanel, Panel): class DATA_PT_customdata(MeshButtonsPanel, Panel): bl_label = "Geometry Data" bl_options = {'DEFAULT_CLOSED'} - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME', 'BLENDER_CLAY', 'BLENDER_EEVEE'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_CLAY', 'BLENDER_EEVEE'} def draw(self, context): layout = self.layout @@ -440,7 +440,7 @@ class DATA_PT_customdata(MeshButtonsPanel, Panel): class DATA_PT_custom_props_mesh(MeshButtonsPanel, PropertyPanel, Panel): - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME', 'BLENDER_CLAY', 'BLENDER_EEVEE'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_CLAY', 'BLENDER_EEVEE'} _context_path = "object.data" _property_type = bpy.types.Mesh diff --git a/release/scripts/startup/bl_ui/properties_data_metaball.py b/release/scripts/startup/bl_ui/properties_data_metaball.py index e771caf49e3..5095fac40ca 100644 --- a/release/scripts/startup/bl_ui/properties_data_metaball.py +++ b/release/scripts/startup/bl_ui/properties_data_metaball.py @@ -76,7 +76,7 @@ class DATA_PT_metaball(DataButtonsPanel, Panel): class DATA_PT_mball_texture_space(DataButtonsPanel, Panel): bl_label = "Texture Space" bl_options = {'DEFAULT_CLOSED'} - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME', 'BLENDER_CLAY', 'BLENDER_EEVEE'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_CLAY', 'BLENDER_EEVEE'} def draw(self, context): layout = self.layout @@ -131,7 +131,7 @@ class DATA_PT_metaball_element(DataButtonsPanel, Panel): class DATA_PT_custom_props_metaball(DataButtonsPanel, PropertyPanel, Panel): - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME', 'BLENDER_CLAY', 'BLENDER_EEVEE'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_CLAY', 'BLENDER_EEVEE'} _context_path = "object.data" _property_type = bpy.types.MetaBall diff --git a/release/scripts/startup/bl_ui/properties_data_speaker.py b/release/scripts/startup/bl_ui/properties_data_speaker.py index 769efb96b38..c317f906ba5 100644 --- a/release/scripts/startup/bl_ui/properties_data_speaker.py +++ b/release/scripts/startup/bl_ui/properties_data_speaker.py @@ -36,7 +36,7 @@ class DataButtonsPanel: class DATA_PT_context_speaker(DataButtonsPanel, Panel): bl_label = "" bl_options = {'HIDE_HEADER'} - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME', 'BLENDER_CLAY', 'BLENDER_EEVEE'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_CLAY', 'BLENDER_EEVEE'} def draw(self, context): layout = self.layout @@ -117,7 +117,7 @@ class DATA_PT_cone(DataButtonsPanel, Panel): class DATA_PT_custom_props_speaker(DataButtonsPanel, PropertyPanel, Panel): - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME', 'BLENDER_CLAY', 'BLENDER_EEVEE'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_CLAY', 'BLENDER_EEVEE'} _context_path = "object.data" _property_type = bpy.types.Speaker diff --git a/release/scripts/startup/bl_ui/properties_game.py b/release/scripts/startup/bl_ui/properties_game.py deleted file mode 100644 index eb2d3d49e61..00000000000 --- a/release/scripts/startup/bl_ui/properties_game.py +++ /dev/null @@ -1,879 +0,0 @@ -# ##### BEGIN GPL LICENSE BLOCK ##### -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License -# as published by the Free Software Foundation; either version 2 -# of the License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software Foundation, -# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -# -# ##### END GPL LICENSE BLOCK ##### - -# <pep8 compliant> -import bpy -from bpy.types import Panel, Menu - - -class PhysicsButtonsPanel: - bl_space_type = 'PROPERTIES' - bl_region_type = 'WINDOW' - bl_context = "physics" - - -class PHYSICS_PT_game_physics(PhysicsButtonsPanel, Panel): - bl_label = "Physics" - COMPAT_ENGINES = {'BLENDER_GAME'} - - @classmethod - def poll(cls, context): - ob = context.active_object - view_render = context.scene.view_render - return ob and ob.game and (view_render.engine in cls.COMPAT_ENGINES) - - def draw(self, context): - layout = self.layout - - ob = context.active_object - game = ob.game - soft = ob.game.soft_body - - layout.prop(game, "physics_type") - layout.separator() - - physics_type = game.physics_type - - if physics_type == 'CHARACTER': - layout.prop(game, "use_actor") - layout.prop(ob, "hide_render", text="Invisible") # out of place but useful - layout.prop(game, "step_height", slider=True) - layout.prop(game, "jump_speed") - layout.prop(game, "fall_speed") - layout.prop(game, "jump_max") - - elif physics_type in {'DYNAMIC', 'RIGID_BODY'}: - split = layout.split() - - col = split.column() - col.prop(game, "use_actor") - col.prop(game, "use_ghost") - col.prop(ob, "hide_render", text="Invisible") # out of place but useful - - col = split.column() - col.prop(game, "use_material_physics_fh") - col.prop(game, "use_rotate_from_normal") - col.prop(game, "use_sleep") - - layout.separator() - - split = layout.split() - - col = split.column() - col.label(text="Attributes:") - col.prop(game, "mass") - col.prop(game, "radius") - col.prop(game, "form_factor") - - 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) - - split = layout.split() - - col = split.column() - col.label(text="Linear Velocity:") - sub = col.column(align=True) - sub.prop(game, "velocity_min", text="Minimum") - sub.prop(game, "velocity_max", text="Maximum") - col.label(text="Angular Velocity:") - sub = col.column(align=True) - sub.prop(game, "angular_velocity_min", text="Minimum") - sub.prop(game, "angular_velocity_max", text="Maximum") - - col = split.column() - col.label(text="Damping:") - sub = col.column(align=True) - sub.prop(game, "damping", text="Translation", slider=True) - sub.prop(game, "rotation_damping", text="Rotation", slider=True) - - layout.separator() - - split = layout.split() - - col = split.column() - col.label(text="Lock Translation:") - col.prop(game, "lock_location_x", text="X") - col.prop(game, "lock_location_y", text="Y") - col.prop(game, "lock_location_z", text="Z") - - if physics_type == 'RIGID_BODY': - col = split.column() - col.label(text="Lock Rotation:") - col.prop(game, "lock_rotation_x", text="X") - col.prop(game, "lock_rotation_y", text="Y") - col.prop(game, "lock_rotation_z", text="Z") - - elif physics_type == 'SOFT_BODY': - col = layout.column() - col.prop(game, "use_actor") - col.prop(game, "use_ghost") - col.prop(ob, "hide_render", text="Invisible") - - layout.separator() - - split = layout.split() - - col = split.column() - col.label(text="Attributes:") - col.prop(game, "mass") - # disabled in the code - # col.prop(soft, "weld_threshold") - col.prop(soft, "location_iterations") - col.prop(soft, "linear_stiffness", slider=True) - col.prop(soft, "dynamic_friction", slider=True) - col.prop(soft, "collision_margin", slider=True) - col.prop(soft, "use_bending_constraints", text="Bending Constraints") - - col = split.column() - col.prop(soft, "use_shape_match") - sub = col.column() - sub.active = soft.use_shape_match - sub.prop(soft, "shape_threshold", slider=True) - - col.separator() - - col.label(text="Cluster Collision:") - col.prop(soft, "use_cluster_rigid_to_softbody") - col.prop(soft, "use_cluster_soft_to_softbody") - sub = col.column() - sub.active = (soft.use_cluster_rigid_to_softbody or soft.use_cluster_soft_to_softbody) - sub.prop(soft, "cluster_iterations", text="Iterations") - - elif physics_type == 'STATIC': - col = layout.column() - col.prop(game, "use_actor") - col.prop(game, "use_ghost") - col.prop(game, "use_record_animation") - col.prop(ob, "hide_render", text="Invisible") - - layout.separator() - - split = layout.split() - - col = split.column() - col.label(text="Attributes:") - col.prop(game, "radius") - - col = split.column() - sub = col.column() - sub.prop(game, "use_anisotropic_friction") - subsub = sub.column() - subsub.active = game.use_anisotropic_friction - subsub.prop(game, "friction_coefficients", text="", slider=True) - - elif physics_type == 'SENSOR': - 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', 'OCCLUDER'}: - layout.prop(ob, "hide_render", text="Invisible") - - elif physics_type == 'NAVMESH': - layout.operator("mesh.navmesh_face_copy") - layout.operator("mesh.navmesh_face_add") - - layout.separator() - - layout.operator("mesh.navmesh_reset") - layout.operator("mesh.navmesh_clear") - - -class PHYSICS_PT_game_collision_bounds(PhysicsButtonsPanel, Panel): - bl_label = "Collision Bounds" - COMPAT_ENGINES = {'BLENDER_GAME'} - - @classmethod - def poll(cls, context): - game = context.object.game - view_render = context.scene.view_render - return (view_render.engine in cls.COMPAT_ENGINES) \ - and (game.physics_type in {'SENSOR', 'STATIC', 'DYNAMIC', 'RIGID_BODY', 'CHARACTER', 'SOFT_BODY'}) - - def draw_header(self, context): - game = context.active_object.game - - self.layout.prop(game, "use_collision_bounds", text="") - - def draw(self, context): - layout = self.layout - - game = context.active_object.game - split = layout.split() - split.active = game.use_collision_bounds - - col = split.column() - col.prop(game, "collision_bounds_type", text="Bounds") - - row = col.row() - row.prop(game, "collision_margin", text="Margin", slider=True) - - sub = row.row() - sub.active = game.physics_type not in {'SOFT_BODY', 'CHARACTER'} - sub.prop(game, "use_collision_compound", text="Compound") - - layout.separator() - split = layout.split() - col = split.column() - col.prop(game, "collision_group") - col = split.column() - col.prop(game, "collision_mask") - - -class PHYSICS_PT_game_obstacles(PhysicsButtonsPanel, Panel): - bl_label = "Create Obstacle" - COMPAT_ENGINES = {'BLENDER_GAME'} - - @classmethod - def poll(cls, context): - game = context.object.game - view_render = context.scene.view_render - return (view_render.engine in cls.COMPAT_ENGINES) \ - and (game.physics_type in {'SENSOR', 'STATIC', 'DYNAMIC', 'RIGID_BODY', 'SOFT_BODY', 'CHARACTER', 'NO_COLLISION'}) - - def draw_header(self, context): - game = context.active_object.game - - self.layout.prop(game, "use_obstacle_create", text="") - - def draw(self, context): - layout = self.layout - - game = context.active_object.game - - layout.active = game.use_obstacle_create - - row = layout.row() - row.prop(game, "obstacle_radius", text="Radius") - row.label() - - -class RenderButtonsPanel: - bl_space_type = 'PROPERTIES' - bl_region_type = 'WINDOW' - bl_context = "render" - - @classmethod - def poll(cls, context): - view_render = context.scene.view_render - return (view_render.engine in cls.COMPAT_ENGINES) - - -class RENDER_PT_embedded(RenderButtonsPanel, Panel): - bl_label = "Embedded Player" - COMPAT_ENGINES = {'BLENDER_GAME'} - - def draw(self, context): - layout = self.layout - - view_render = context.scene.view_render - - row = layout.row() - row.operator("view3d.game_start", text="Start") - 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") - - -class RENDER_PT_game_player(RenderButtonsPanel, Panel): - bl_label = "Standalone Player" - COMPAT_ENGINES = {'BLENDER_GAME'} - - def draw(self, context): - import sys - layout = self.layout - not_osx = sys.platform != "darwin" - - gs = context.scene.game_settings - - row = layout.row() - row.operator("wm.blenderplayer_start", text="Start") - row = layout.row() - row.label(text="Resolution:") - row = layout.row(align=True) - row.active = not_osx or not gs.show_fullscreen - row.prop(gs, "resolution_x", slider=False, text="X") - row.prop(gs, "resolution_y", slider=False, text="Y") - row = layout.row() - col = row.column() - col.prop(gs, "show_fullscreen") - - if not_osx: - col = row.column() - col.prop(gs, "use_desktop") - col.active = gs.show_fullscreen - - col = layout.column() - col.label(text="Quality:") - col.prop(gs, "samples") - col = layout.column(align=True) - col.prop(gs, "depth", text="Bit Depth", slider=False) - col.prop(gs, "frequency", text="Refresh Rate", slider=False) - - -class RENDER_PT_game_stereo(RenderButtonsPanel, Panel): - bl_label = "Stereo" - COMPAT_ENGINES = {'BLENDER_GAME'} - - def draw(self, context): - layout = self.layout - - gs = context.scene.game_settings - stereo_mode = gs.stereo - - # stereo options: - layout.row().prop(gs, "stereo", expand=True) - - # stereo: - if stereo_mode == 'STEREO': - layout.prop(gs, "stereo_mode") - layout.prop(gs, "stereo_eye_separation") - - # dome: - elif stereo_mode == 'DOME': - layout.prop(gs, "dome_mode", text="Dome Type") - - dome_type = gs.dome_mode - - split = layout.split() - - if dome_type in {'FISHEYE', 'TRUNCATED_REAR', 'TRUNCATED_FRONT'}: - col = split.column() - col.prop(gs, "dome_buffer_resolution", text="Resolution", slider=True) - col.prop(gs, "dome_angle", slider=True) - - col = split.column() - col.prop(gs, "dome_tessellation", text="Tessellation") - col.prop(gs, "dome_tilt") - - elif dome_type == 'PANORAM_SPH': - col = split.column() - col.prop(gs, "dome_buffer_resolution", text="Resolution", slider=True) - - col = split.column() - col.prop(gs, "dome_tessellation", text="Tessellation") - - else: # cube map - col = split.column() - col.prop(gs, "dome_buffer_resolution", text="Resolution", slider=True) - - col = split.column() - - layout.prop(gs, "dome_text") - - -class RENDER_PT_game_shading(RenderButtonsPanel, Panel): - bl_label = "Shading" - COMPAT_ENGINES = {'BLENDER_GAME'} - - def draw(self, context): - layout = self.layout - - gs = context.scene.game_settings - - layout.row().prop(gs, "material_mode", expand=True) - - if gs.material_mode == 'GLSL': - split = layout.split() - - col = split.column() - 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_environment_lighting", text="Environment Lighting") - - col = split.column() - 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") - - -class RENDER_PT_game_system(RenderButtonsPanel, Panel): - bl_label = "System" - COMPAT_ENGINES = {'BLENDER_GAME'} - - def draw(self, context): - layout = self.layout - - gs = context.scene.game_settings - col = layout.column() - row = col.row() - col = row.column() - col.prop(gs, "use_frame_rate") - col.prop(gs, "use_restrict_animation_updates") - col = row.column() - col.prop(gs, "use_material_caching") - - row = layout.row() - row.prop(gs, "vsync") - - row = layout.row() - row.prop(gs, "raster_storage") - - row = layout.row() - row.label("Exit Key") - row.prop(gs, "exit_key", text="", event=True) - - -class RENDER_PT_game_display(RenderButtonsPanel, Panel): - bl_label = "Display" - COMPAT_ENGINES = {'BLENDER_GAME'} - - def draw(self, context): - layout = self.layout - - gs = context.scene.game_settings - - layout.prop(context.scene.render, "fps", text="Animation Frame Rate", slider=False) - - flow = layout.column_flow() - flow.prop(gs, "show_debug_properties", text="Debug Properties") - flow.prop(gs, "show_framerate_profile", text="Framerate and Profile") - flow.prop(gs, "show_physics_visualization", text="Physics Visualization") - flow.prop(gs, "use_deprecation_warnings") - flow.prop(gs, "show_mouse", text="Mouse Cursor") - - 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="") - - -class SceneButtonsPanel: - bl_space_type = 'PROPERTIES' - bl_region_type = 'WINDOW' - bl_context = "scene" - - -class SCENE_PT_game_physics(SceneButtonsPanel, Panel): - bl_label = "Physics" - COMPAT_ENGINES = {'BLENDER_GAME'} - - @classmethod - def poll(cls, context): - scene = context.scene - return (scene.view_render.engine in cls.COMPAT_ENGINES) - - def draw(self, context): - layout = self.layout - - gs = context.scene.game_settings - - layout.prop(gs, "physics_engine", text="Engine") - if gs.physics_engine != 'NONE': - layout.prop(gs, "physics_gravity", text="Gravity") - - split = layout.split() - - col = split.column() - col.label(text="Physics Steps:") - sub = col.column(align=True) - sub.prop(gs, "physics_step_max", text="Max") - sub.prop(gs, "physics_step_sub", text="Substeps") - col.prop(gs, "fps", text="FPS") - - col = split.column() - col.label(text="Logic Steps:") - col.prop(gs, "logic_step_max", text="Max") - - 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") - - 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") - - else: - split = layout.split() - - col = split.column() - col.label(text="Physics Steps:") - col.prop(gs, "fps", text="FPS") - - col = split.column() - col.label(text="Logic Steps:") - col.prop(gs, "logic_step_max", text="Max") - - -class SCENE_PT_game_physics_obstacles(SceneButtonsPanel, Panel): - bl_label = "Obstacle Simulation" - bl_options = {'DEFAULT_CLOSED'} - COMPAT_ENGINES = {'BLENDER_GAME'} - - @classmethod - def poll(cls, context): - scene = context.scene - return (scene.view_render.engine in cls.COMPAT_ENGINES) - - def draw(self, context): - layout = self.layout - - gs = context.scene.game_settings - - layout.prop(gs, "obstacle_simulation", text="Type") - if gs.obstacle_simulation != 'NONE': - layout.prop(gs, "level_height") - layout.prop(gs, "show_obstacle_simulation") - - -class SCENE_PT_game_navmesh(SceneButtonsPanel, Panel): - bl_label = "Navigation Mesh" - bl_options = {'DEFAULT_CLOSED'} - COMPAT_ENGINES = {'BLENDER_GAME'} - - @classmethod - def poll(cls, context): - scene = context.scene - return (scene and scene.view_render.engine in cls.COMPAT_ENGINES) - - def draw(self, context): - layout = self.layout - - rd = context.scene.game_settings.recast_data - - layout.operator("mesh.navmesh_make", 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, "slope_max") - col.prop(rd, "climb_max") - - col = layout.column() - col.label(text="Region:") - row = col.row() - row.prop(rd, "region_min_size") - if rd.partitioning != 'LAYERS': - row.prop(rd, "region_merge_size") - - col = layout.column() - col.prop(rd, "partitioning") - - col = layout.column() - col.label(text="Polygonization:") - split = col.split() - - col = split.column() - col.prop(rd, "edge_max_len") - col.prop(rd, "edge_max_error") - - split.prop(rd, "verts_per_poly") - - col = layout.column() - col.label(text="Detail Mesh:") - row = col.row() - row.prop(rd, "sample_dist") - row.prop(rd, "sample_max_error") - - -class SCENE_PT_game_hysteresis(SceneButtonsPanel, Panel): - bl_label = "Level of Detail" - COMPAT_ENGINES = {'BLENDER_GAME'} - - @classmethod - def poll(cls, context): - scene = context.scene - return (scene and scene.view_render.engine in cls.COMPAT_ENGINES) - - def draw(self, context): - layout = self.layout - gs = context.scene.game_settings - - row = layout.row() - row.prop(gs, "use_scene_hysteresis", text="Hysteresis") - row = layout.row() - row.active = gs.use_scene_hysteresis - row.prop(gs, "scene_hysteresis_percentage", text="") - - -class WorldButtonsPanel: - bl_space_type = 'PROPERTIES' - bl_region_type = 'WINDOW' - bl_context = "world" - - -class WORLD_PT_game_context_world(WorldButtonsPanel, Panel): - bl_label = "" - bl_options = {'HIDE_HEADER'} - COMPAT_ENGINES = {'BLENDER_GAME'} - - @classmethod - def poll(cls, context): - view_render = context.scene.view_render - return (context.scene) and (view_render.engine in cls.COMPAT_ENGINES) - - def draw(self, context): - layout = self.layout - - scene = context.scene - world = context.world - space = context.space_data - - split = layout.split(percentage=0.65) - if scene: - split.template_ID(scene, "world", new="world.new") - elif world: - split.template_ID(space, "pin_id") - - -class WORLD_PT_game_world(WorldButtonsPanel, Panel): - bl_label = "World" - COMPAT_ENGINES = {'BLENDER_GAME'} - - @classmethod - def poll(cls, context): - scene = context.scene - return (scene.world and scene.view_render.engine in cls.COMPAT_ENGINES) - - def draw(self, context): - layout = self.layout - - world = context.world - - row = layout.row() - row.column().prop(world, "horizon_color") - row.column().prop(world, "zenith_color") - row.column().prop(world, "ambient_color") - - -class WORLD_PT_game_environment_lighting(WorldButtonsPanel, Panel): - bl_label = "Environment Lighting" - COMPAT_ENGINES = {'BLENDER_GAME'} - - @classmethod - def poll(cls, context): - scene = context.scene - return (scene.world and scene.view_render.engine in cls.COMPAT_ENGINES) - - def draw_header(self, context): - light = context.world.light_settings - self.layout.prop(light, "use_environment_light", text="") - - def draw(self, context): - layout = self.layout - - light = context.world.light_settings - - layout.active = light.use_environment_light - - split = layout.split() - split.prop(light, "environment_energy", text="Energy") - split.prop(light, "environment_color", text="") - - -class WORLD_PT_game_mist(WorldButtonsPanel, Panel): - bl_label = "Mist" - COMPAT_ENGINES = {'BLENDER_GAME'} - - @classmethod - def poll(cls, context): - scene = context.scene - return (scene.world and scene.view_render.engine in cls.COMPAT_ENGINES) - - def draw_header(self, context): - world = context.world - - self.layout.prop(world.mist_settings, "use_mist", text="") - - def draw(self, context): - layout = self.layout - - world = context.world - - layout.active = world.mist_settings.use_mist - - layout.prop(world.mist_settings, "falloff") - - row = layout.row(align=True) - row.prop(world.mist_settings, "start") - row.prop(world.mist_settings, "depth") - - layout.prop(world.mist_settings, "intensity", text="Minimum Intensity") - - -class DataButtonsPanel: - bl_space_type = 'PROPERTIES' - bl_region_type = 'WINDOW' - bl_context = "data" - - -class DATA_PT_shadow_game(DataButtonsPanel, Panel): - bl_label = "Shadow" - COMPAT_ENGINES = {'BLENDER_GAME'} - - @classmethod - def poll(cls, context): - COMPAT_LIGHTS = {'SPOT', 'SUN'} - lamp = context.lamp - engine = context.engine - return (lamp and lamp.type in COMPAT_LIGHTS) and (engine in cls.COMPAT_ENGINES) - - def draw_header(self, context): - lamp = context.lamp - - self.layout.prop(lamp, "use_shadow", text="") - - def draw(self, context): - layout = self.layout - - lamp = context.lamp - - layout.active = lamp.use_shadow - - split = layout.split() - - col = split.column() - col.prop(lamp, "shadow_color", text="") - if lamp.type == 'SUN': - col.prop(lamp, "show_shadow_box") - - col = split.column() - col.prop(lamp, "use_shadow_layer", text="This Layer Only") - col.prop(lamp, "use_only_shadow") - - 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") - - -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.engine in cls.COMPAT_ENGINES - - def draw(self, context): - layout = self.layout - ob = context.object - gs = context.scene.game_settings - - 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 = box.row() - row.active = gs.use_scene_hysteresis - row.prop(level, "use_object_hysteresis", text="Hysteresis Override") - row = box.row() - row.active = gs.use_scene_hysteresis and level.use_object_hysteresis - row.prop(level, "object_hysteresis_percentage", 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') - - -classes = ( - PHYSICS_PT_game_physics, - PHYSICS_PT_game_collision_bounds, - PHYSICS_PT_game_obstacles, - RENDER_PT_embedded, - RENDER_PT_game_player, - RENDER_PT_game_stereo, - RENDER_PT_game_shading, - RENDER_PT_game_system, - RENDER_PT_game_display, - SCENE_PT_game_physics, - SCENE_PT_game_physics_obstacles, - SCENE_PT_game_navmesh, - SCENE_PT_game_hysteresis, - WORLD_PT_game_context_world, - WORLD_PT_game_world, - WORLD_PT_game_environment_lighting, - WORLD_PT_game_mist, - DATA_PT_shadow_game, - OBJECT_MT_lod_tools, - OBJECT_PT_levels_of_detail, -) - -if __name__ == "__main__": # only for live edit. - from bpy.utils import register_class - for cls in classes: - register_class(cls) diff --git a/release/scripts/startup/bl_ui/properties_material.py b/release/scripts/startup/bl_ui/properties_material.py index edbe6816e5b..5010ea1e096 100644 --- a/release/scripts/startup/bl_ui/properties_material.py +++ b/release/scripts/startup/bl_ui/properties_material.py @@ -107,7 +107,7 @@ class MaterialButtonsPanel: class MATERIAL_PT_context_material(MaterialButtonsPanel, Panel): bl_label = "" bl_options = {'HIDE_HEADER'} - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'} + COMPAT_ENGINES = {'BLENDER_RENDER'} @classmethod def poll(cls, context): @@ -183,7 +183,7 @@ class MATERIAL_PT_context_material(MaterialButtonsPanel, Panel): class MATERIAL_PT_preview(MaterialButtonsPanel, Panel): bl_label = "Preview" - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME', 'BLENDER_EEVEE'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'} def draw(self, context): self.layout.template_preview(context.material) @@ -192,7 +192,7 @@ class MATERIAL_PT_preview(MaterialButtonsPanel, Panel): class MATERIAL_PT_pipeline(MaterialButtonsPanel, Panel): bl_label = "Render Pipeline Options" bl_options = {'DEFAULT_CLOSED'} - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'} + COMPAT_ENGINES = {'BLENDER_RENDER'} @classmethod def poll(cls, context): @@ -245,7 +245,7 @@ class MATERIAL_PT_pipeline(MaterialButtonsPanel, Panel): class MATERIAL_PT_diffuse(MaterialButtonsPanel, Panel): bl_label = "Diffuse" - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'} + COMPAT_ENGINES = {'BLENDER_RENDER'} @classmethod def poll(cls, context): @@ -302,7 +302,7 @@ class MATERIAL_PT_diffuse(MaterialButtonsPanel, Panel): class MATERIAL_PT_specular(MaterialButtonsPanel, Panel): bl_label = "Specular" - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'} + COMPAT_ENGINES = {'BLENDER_RENDER'} @classmethod def poll(cls, context): @@ -355,7 +355,7 @@ class MATERIAL_PT_specular(MaterialButtonsPanel, Panel): class MATERIAL_PT_shading(MaterialButtonsPanel, Panel): bl_label = "Shading" - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'} + COMPAT_ENGINES = {'BLENDER_RENDER'} @classmethod def poll(cls, context): @@ -650,66 +650,6 @@ class MATERIAL_PT_flare(MaterialButtonsPanel, Panel): col.prop(halo, "flare_subflare_size", text="Subsize") -class MATERIAL_PT_game_settings(MaterialButtonsPanel, Panel): - bl_label = "Game Settings" - COMPAT_ENGINES = {'BLENDER_GAME'} - - @classmethod - def poll(cls, context): - return context.material and (context.engine in cls.COMPAT_ENGINES) - - def draw(self, context): - layout = self.layout - game = context.material.game_settings # don't use node material - - row = layout.row() - row.prop(game, "use_backface_culling") - row.prop(game, "invisible") - row.prop(game, "text") - - row = layout.row() - row.label(text="Alpha Blend:") - row.label(text="Face Orientation:") - row = layout.row() - row.prop(game, "alpha_blend", text="") - row.prop(game, "face_orientation", text="") - - -class MATERIAL_PT_physics(MaterialButtonsPanel, Panel): - bl_label = "Physics" - COMPAT_ENGINES = {'BLENDER_GAME'} - - def draw_header(self, context): - game = context.material.game_settings - self.layout.prop(game, "physics", text="") - - @classmethod - def poll(cls, context): - return context.material and (context.engine in cls.COMPAT_ENGINES) - - def draw(self, context): - layout = self.layout - layout.active = context.material.game_settings.physics - - phys = context.material.physics # don't use node material - - split = layout.split() - row = split.row() - row.prop(phys, "friction") - row.prop(phys, "elasticity", slider=True) - - row = layout.row() - row.label(text="Force Field:") - - row = layout.row() - row.prop(phys, "fh_force") - row.prop(phys, "fh_damping", slider=True) - - row = layout.row() - row.prop(phys, "fh_distance") - row.prop(phys, "use_fh_normal") - - class MATERIAL_PT_strand(MaterialButtonsPanel, Panel): bl_label = "Strand" bl_options = {'DEFAULT_CLOSED'} @@ -759,7 +699,7 @@ class MATERIAL_PT_strand(MaterialButtonsPanel, Panel): class MATERIAL_PT_options(MaterialButtonsPanel, Panel): bl_label = "Options" - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'} + COMPAT_ENGINES = {'BLENDER_RENDER'} @classmethod def poll(cls, context): @@ -809,7 +749,7 @@ class MATERIAL_PT_options(MaterialButtonsPanel, Panel): class MATERIAL_PT_shadow(MaterialButtonsPanel, Panel): bl_label = "Shadow" bl_options = {'DEFAULT_CLOSED'} - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'} + COMPAT_ENGINES = {'BLENDER_RENDER'} @classmethod def poll(cls, context): @@ -856,38 +796,6 @@ class MATERIAL_PT_shadow(MaterialButtonsPanel, Panel): col.prop(mat, "use_cast_approximate") -class MATERIAL_PT_transp_game(MaterialButtonsPanel, Panel): - bl_label = "Transparency" - bl_options = {'DEFAULT_CLOSED'} - COMPAT_ENGINES = {'BLENDER_GAME'} - - @classmethod - def poll(cls, context): - mat = context.material - engine = context.engine - return check_material(mat) and (engine in cls.COMPAT_ENGINES) - - def draw_header(self, context): - mat = context.material - - if simple_material(mat): - self.layout.prop(mat, "use_transparency", text="") - - def draw(self, context): - layout = self.layout - base_mat = context.material - mat = active_node_mat(base_mat) - - layout.active = mat.use_transparency - - if simple_material(base_mat): - row = layout.row() - row.prop(mat, "transparency_method", expand=True) - - layout.prop(mat, "alpha") - layout.prop(mat, "specular_alpha", text="Specular") - - class VolumeButtonsPanel: bl_space_type = 'PROPERTIES' bl_region_type = 'WINDOW' @@ -1017,7 +925,7 @@ class MATERIAL_PT_volume_integration(VolumeButtonsPanel, Panel): class MATERIAL_PT_volume_options(VolumeButtonsPanel, Panel): bl_label = "Options" - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'} + COMPAT_ENGINES = {'BLENDER_RENDER'} bl_options = {'DEFAULT_CLOSED'} @classmethod @@ -1048,7 +956,7 @@ class MATERIAL_PT_volume_options(VolumeButtonsPanel, Panel): class MATERIAL_PT_custom_props(MaterialButtonsPanel, PropertyPanel, Panel): - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'} + COMPAT_ENGINES = {'BLENDER_RENDER'} _context_path = "material" _property_type = bpy.types.Material @@ -1207,12 +1115,9 @@ classes = ( MATERIAL_PT_sss, MATERIAL_PT_halo, MATERIAL_PT_flare, - MATERIAL_PT_game_settings, - MATERIAL_PT_physics, MATERIAL_PT_strand, MATERIAL_PT_options, MATERIAL_PT_shadow, - MATERIAL_PT_transp_game, MATERIAL_PT_volume_density, MATERIAL_PT_volume_shading, MATERIAL_PT_volume_lighting, diff --git a/release/scripts/startup/bl_ui/properties_object.py b/release/scripts/startup/bl_ui/properties_object.py index c6899eec408..2d2ab4623e0 100644 --- a/release/scripts/startup/bl_ui/properties_object.py +++ b/release/scripts/startup/bl_ui/properties_object.py @@ -161,11 +161,10 @@ class OBJECT_PT_relations_extras(ObjectButtonsPanel, Panel): split = layout.split() - if context.engine != 'BLENDER_GAME': - col = split.column() - col.label(text="Tracking Axes:") - col.prop(ob, "track_axis", text="Axis") - col.prop(ob, "up_axis", text="Up Axis") + col = split.column() + col.label(text="Tracking Axes:") + col.prop(ob, "track_axis", text="Axis") + col.prop(ob, "up_axis", text="Up Axis") col = split.column() col.prop(ob, "use_slow_parent") @@ -359,7 +358,7 @@ class OBJECT_PT_onion_skinning(OnionSkinButtonsPanel): # , Panel): # inherit fr class OBJECT_PT_custom_props(ObjectButtonsPanel, PropertyPanel, Panel): - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME', 'BLENDER_CLAY', 'BLENDER_EEVEE'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_CLAY', 'BLENDER_EEVEE'} _context_path = "object" _property_type = bpy.types.Object diff --git a/release/scripts/startup/bl_ui/properties_particle.py b/release/scripts/startup/bl_ui/properties_particle.py index fcfaf29521b..4a446ac5f48 100644 --- a/release/scripts/startup/bl_ui/properties_particle.py +++ b/release/scripts/startup/bl_ui/properties_particle.py @@ -66,7 +66,7 @@ def particle_get_settings(context): class PARTICLE_MT_specials(Menu): bl_label = "Particle Specials" - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME', 'BLENDER_CLAY', 'BLENDER_EEVEE'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_CLAY', 'BLENDER_EEVEE'} def draw(self, context): layout = self.layout @@ -86,7 +86,7 @@ class PARTICLE_MT_hair_dynamics_presets(Menu): bl_label = "Hair Dynamics Presets" preset_subdir = "hair_dynamics" preset_operator = "script.execute_preset" - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME', 'BLENDER_CLAY', 'BLENDER_EEVEE'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_CLAY', 'BLENDER_EEVEE'} draw = Menu.draw_preset @@ -131,7 +131,7 @@ class PARTICLE_UL_particle_systems(bpy.types.UIList): class PARTICLE_PT_context_particles(ParticleButtonsPanel, Panel): bl_label = "" bl_options = {'HIDE_HEADER'} - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME', 'BLENDER_CLAY', 'BLENDER_EEVEE'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_CLAY', 'BLENDER_EEVEE'} @classmethod def poll(cls, context): @@ -141,10 +141,6 @@ class PARTICLE_PT_context_particles(ParticleButtonsPanel, Panel): def draw(self, context): layout = self.layout - if context.engine == 'BLENDER_GAME': - layout.label("Not available in the Game Engine") - return - ob = context.object psys = context.particle_system part = 0 diff --git a/release/scripts/startup/bl_ui/properties_physics_smoke.py b/release/scripts/startup/bl_ui/properties_physics_smoke.py index d02bee3a0fa..9e6e73a4b1c 100644 --- a/release/scripts/startup/bl_ui/properties_physics_smoke.py +++ b/release/scripts/startup/bl_ui/properties_physics_smoke.py @@ -364,7 +364,7 @@ class PHYSICS_PT_smoke_display_settings(PhysicButtonsPanel, Panel): def poll(cls, context): md = context.smoke view_render = context.scene.view_render - return md and (md.smoke_type == 'DOMAIN') and (not view_render.use_game_engine) + return md and (md.smoke_type == 'DOMAIN') def draw(self, context): domain = context.smoke.domain_settings diff --git a/release/scripts/startup/bl_ui/properties_render.py b/release/scripts/startup/bl_ui/properties_render.py index 78b9f007bc0..11b71d6cb24 100644 --- a/release/scripts/startup/bl_ui/properties_render.py +++ b/release/scripts/startup/bl_ui/properties_render.py @@ -523,7 +523,7 @@ class RENDER_PT_encoding(RenderButtonsPanel, Panel): class RENDER_PT_bake(RenderButtonsPanel, Panel): bl_label = "Bake" bl_options = {'DEFAULT_CLOSED'} - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'} + COMPAT_ENGINES = {'BLENDER_RENDER'} def draw(self, context): layout = self.layout diff --git a/release/scripts/startup/bl_ui/properties_scene.py b/release/scripts/startup/bl_ui/properties_scene.py index e8f25ea891b..d61e99f1e1e 100644 --- a/release/scripts/startup/bl_ui/properties_scene.py +++ b/release/scripts/startup/bl_ui/properties_scene.py @@ -66,7 +66,7 @@ class SceneButtonsPanel: class SCENE_PT_scene(SceneButtonsPanel, Panel): bl_label = "Scene" - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME', 'BLENDER_CLAY', 'BLENDER_EEVEE'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_CLAY', 'BLENDER_EEVEE'} def draw(self, context): layout = self.layout @@ -75,13 +75,12 @@ class SCENE_PT_scene(SceneButtonsPanel, Panel): layout.prop(scene, "camera") layout.prop(scene, "background_set", text="Background") - if context.engine != 'BLENDER_GAME': - layout.prop(scene, "active_clip", text="Active Clip") + layout.prop(scene, "active_clip", text="Active Clip") class SCENE_PT_unit(SceneButtonsPanel, Panel): bl_label = "Units" - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME', 'BLENDER_CLAY', 'BLENDER_EEVEE'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_CLAY', 'BLENDER_EEVEE'} def draw(self, context): layout = self.layout @@ -166,7 +165,7 @@ class SceneKeyingSetsPanel: class SCENE_PT_keying_sets(SceneButtonsPanel, SceneKeyingSetsPanel, Panel): bl_label = "Keying Sets" - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME', 'BLENDER_CLAY', 'BLENDER_EEVEE'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_CLAY', 'BLENDER_EEVEE'} def draw(self, context): layout = self.layout @@ -199,7 +198,7 @@ class SCENE_PT_keying_sets(SceneButtonsPanel, SceneKeyingSetsPanel, Panel): class SCENE_PT_keying_set_paths(SceneButtonsPanel, SceneKeyingSetsPanel, Panel): bl_label = "Active Keying Set" - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME', 'BLENDER_CLAY', 'BLENDER_EEVEE'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_CLAY', 'BLENDER_EEVEE'} @classmethod def poll(cls, context): @@ -256,7 +255,7 @@ class SCENE_PT_keying_set_paths(SceneButtonsPanel, SceneKeyingSetsPanel, Panel): class SCENE_PT_color_management(SceneButtonsPanel, Panel): bl_label = "Color Management" bl_options = {'DEFAULT_CLOSED'} - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME', 'BLENDER_CLAY', 'BLENDER_EEVEE'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_CLAY', 'BLENDER_EEVEE'} def draw(self, context): layout = self.layout @@ -281,7 +280,7 @@ class SCENE_PT_color_management(SceneButtonsPanel, Panel): class SCENE_PT_audio(SceneButtonsPanel, Panel): bl_label = "Audio" bl_options = {'DEFAULT_CLOSED'} - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME', 'BLENDER_CLAY', 'BLENDER_EEVEE'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_CLAY', 'BLENDER_EEVEE'} def draw(self, context): layout = self.layout @@ -438,7 +437,7 @@ class SCENE_PT_simplify(SceneButtonsPanel, Panel): class SCENE_PT_custom_props(SceneButtonsPanel, PropertyPanel, Panel): - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME', 'BLENDER_CLAY', 'BLENDER_EEVEE'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_CLAY', 'BLENDER_EEVEE'} _context_path = "scene" _property_type = bpy.types.Scene diff --git a/release/scripts/startup/bl_ui/properties_texture.py b/release/scripts/startup/bl_ui/properties_texture.py index 38a7fff8ed3..8f2c3085881 100644 --- a/release/scripts/startup/bl_ui/properties_texture.py +++ b/release/scripts/startup/bl_ui/properties_texture.py @@ -38,7 +38,7 @@ from .properties_paint_common import brush_texture_settings class TEXTURE_MT_specials(Menu): bl_label = "Texture Specials" - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'} + COMPAT_ENGINES = {'BLENDER_RENDER'} def draw(self, context): layout = self.layout @@ -49,7 +49,7 @@ class TEXTURE_MT_specials(Menu): class TEXTURE_MT_envmap_specials(Menu): bl_label = "Environment Map Specials" - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'} + COMPAT_ENGINES = {'BLENDER_RENDER'} def draw(self, context): layout = self.layout @@ -131,7 +131,7 @@ class TextureButtonsPanel: class TEXTURE_PT_context_texture(TextureButtonsPanel, Panel): bl_label = "" bl_options = {'HIDE_HEADER'} - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'} + COMPAT_ENGINES = {'BLENDER_RENDER'} @classmethod def poll(cls, context): @@ -230,7 +230,7 @@ class TEXTURE_PT_context_texture(TextureButtonsPanel, Panel): class TEXTURE_PT_preview(TextureButtonsPanel, Panel): bl_label = "Preview" - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'} + COMPAT_ENGINES = {'BLENDER_RENDER'} def draw(self, context): layout = self.layout @@ -252,7 +252,7 @@ class TEXTURE_PT_preview(TextureButtonsPanel, Panel): class TEXTURE_PT_colors(TextureButtonsPanel, Panel): bl_label = "Colors" bl_options = {'DEFAULT_CLOSED'} - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'} + COMPAT_ENGINES = {'BLENDER_RENDER'} def draw(self, context): layout = self.layout @@ -285,7 +285,7 @@ class TEXTURE_PT_colors(TextureButtonsPanel, Panel): class TextureSlotPanel(TextureButtonsPanel): - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'} + COMPAT_ENGINES = {'BLENDER_RENDER'} @classmethod def poll(cls, context): @@ -311,7 +311,7 @@ class TextureTypePanel(TextureButtonsPanel): class TEXTURE_PT_clouds(TextureTypePanel, Panel): bl_label = "Clouds" tex_type = 'CLOUDS' - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'} + COMPAT_ENGINES = {'BLENDER_RENDER'} def draw(self, context): layout = self.layout @@ -335,7 +335,7 @@ class TEXTURE_PT_clouds(TextureTypePanel, Panel): class TEXTURE_PT_wood(TextureTypePanel, Panel): bl_label = "Wood" tex_type = 'WOOD' - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'} + COMPAT_ENGINES = {'BLENDER_RENDER'} def draw(self, context): layout = self.layout @@ -364,7 +364,7 @@ class TEXTURE_PT_wood(TextureTypePanel, Panel): class TEXTURE_PT_marble(TextureTypePanel, Panel): bl_label = "Marble" tex_type = 'MARBLE' - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'} + COMPAT_ENGINES = {'BLENDER_RENDER'} def draw(self, context): layout = self.layout @@ -391,7 +391,7 @@ class TEXTURE_PT_marble(TextureTypePanel, Panel): class TEXTURE_PT_magic(TextureTypePanel, Panel): bl_label = "Magic" tex_type = 'MAGIC' - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'} + COMPAT_ENGINES = {'BLENDER_RENDER'} def draw(self, context): layout = self.layout @@ -406,7 +406,7 @@ class TEXTURE_PT_magic(TextureTypePanel, Panel): class TEXTURE_PT_blend(TextureTypePanel, Panel): bl_label = "Blend" tex_type = 'BLEND' - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'} + COMPAT_ENGINES = {'BLENDER_RENDER'} def draw(self, context): layout = self.layout @@ -424,7 +424,7 @@ class TEXTURE_PT_blend(TextureTypePanel, Panel): class TEXTURE_PT_stucci(TextureTypePanel, Panel): bl_label = "Stucci" tex_type = 'STUCCI' - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'} + COMPAT_ENGINES = {'BLENDER_RENDER'} def draw(self, context): layout = self.layout @@ -444,7 +444,7 @@ class TEXTURE_PT_stucci(TextureTypePanel, Panel): class TEXTURE_PT_image(TextureTypePanel, Panel): bl_label = "Image" tex_type = 'IMAGE' - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'} + COMPAT_ENGINES = {'BLENDER_RENDER'} def draw(self, context): layout = self.layout @@ -471,15 +471,9 @@ class TEXTURE_PT_image_sampling(TextureTypePanel, Panel): bl_label = "Image Sampling" bl_options = {'DEFAULT_CLOSED'} tex_type = 'IMAGE' - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'} + COMPAT_ENGINES = {'BLENDER_RENDER'} def draw(self, context): - if context.engine == 'BLENDER_GAME': - self.draw_bge(context) - else: - self.draw_bi(context) - - def draw_bi(self, context): layout = self.layout idblock = context_tex_datablock(context) @@ -519,39 +513,12 @@ class TEXTURE_PT_image_sampling(TextureTypePanel, Panel): texture_filter_common(tex, col) - def draw_bge(self, context): - layout = self.layout - - idblock = context_tex_datablock(context) - tex = context.texture - slot = getattr(context, "texture_slot", None) - - split = layout.split() - - col = split.column() - col.label(text="Alpha:") - col.prop(tex, "use_calculate_alpha", text="Calculate") - col.prop(tex, "invert_alpha", text="Invert") - - col = split.column() - - # Only for Material based textures, not for Lamp/World... - if slot and isinstance(idblock, Material): - col.prop(tex, "use_normal_map") - row = col.row() - row.active = tex.use_normal_map - row.prop(slot, "normal_map_space", text="") - - row = col.row() - row.active = not tex.use_normal_map - row.prop(tex, "use_derivative_map") - class TEXTURE_PT_image_mapping(TextureTypePanel, Panel): bl_label = "Image Mapping" bl_options = {'DEFAULT_CLOSED'} tex_type = 'IMAGE' - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'} + COMPAT_ENGINES = {'BLENDER_RENDER'} def draw(self, context): layout = self.layout @@ -606,7 +573,7 @@ class TEXTURE_PT_image_mapping(TextureTypePanel, Panel): class TEXTURE_PT_envmap(TextureTypePanel, Panel): bl_label = "Environment Map" tex_type = 'ENVIRONMENT_MAP' - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'} + COMPAT_ENGINES = {'BLENDER_RENDER'} def draw(self, context): layout = self.layout @@ -645,7 +612,7 @@ class TEXTURE_PT_envmap_sampling(TextureTypePanel, Panel): bl_label = "Environment Map Sampling" bl_options = {'DEFAULT_CLOSED'} tex_type = 'ENVIRONMENT_MAP' - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'} + COMPAT_ENGINES = {'BLENDER_RENDER'} def draw(self, context): layout = self.layout @@ -658,7 +625,7 @@ class TEXTURE_PT_envmap_sampling(TextureTypePanel, Panel): class TEXTURE_PT_musgrave(TextureTypePanel, Panel): bl_label = "Musgrave" tex_type = 'MUSGRAVE' - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'} + COMPAT_ENGINES = {'BLENDER_RENDER'} def draw(self, context): layout = self.layout @@ -694,7 +661,7 @@ class TEXTURE_PT_musgrave(TextureTypePanel, Panel): class TEXTURE_PT_voronoi(TextureTypePanel, Panel): bl_label = "Voronoi" tex_type = 'VORONOI' - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'} + COMPAT_ENGINES = {'BLENDER_RENDER'} def draw(self, context): layout = self.layout @@ -730,7 +697,7 @@ class TEXTURE_PT_voronoi(TextureTypePanel, Panel): class TEXTURE_PT_distortednoise(TextureTypePanel, Panel): bl_label = "Distorted Noise" tex_type = 'DISTORTED_NOISE' - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'} + COMPAT_ENGINES = {'BLENDER_RENDER'} def draw(self, context): layout = self.layout @@ -751,7 +718,7 @@ class TEXTURE_PT_distortednoise(TextureTypePanel, Panel): class TEXTURE_PT_voxeldata(TextureButtonsPanel, Panel): bl_label = "Voxel Data" - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'} + COMPAT_ENGINES = {'BLENDER_RENDER'} @classmethod def poll(cls, context): @@ -794,7 +761,7 @@ class TEXTURE_PT_voxeldata(TextureButtonsPanel, Panel): class TEXTURE_PT_pointdensity(TextureButtonsPanel, Panel): bl_label = "Point Density" - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'} + COMPAT_ENGINES = {'BLENDER_RENDER'} @classmethod def poll(cls, context): @@ -869,7 +836,7 @@ class TEXTURE_PT_pointdensity(TextureButtonsPanel, Panel): class TEXTURE_PT_pointdensity_turbulence(TextureButtonsPanel, Panel): bl_label = "Turbulence" - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'} + COMPAT_ENGINES = {'BLENDER_RENDER'} @classmethod def poll(cls, context): @@ -907,7 +874,7 @@ class TEXTURE_PT_pointdensity_turbulence(TextureButtonsPanel, Panel): class TEXTURE_PT_ocean(TextureTypePanel, Panel): bl_label = "Ocean" tex_type = 'OCEAN' - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'} + COMPAT_ENGINES = {'BLENDER_RENDER'} def draw(self, context): layout = self.layout @@ -922,7 +889,7 @@ class TEXTURE_PT_ocean(TextureTypePanel, Panel): class TEXTURE_PT_mapping(TextureSlotPanel, Panel): bl_label = "Mapping" - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'} + COMPAT_ENGINES = {'BLENDER_RENDER'} @classmethod def poll(cls, context): @@ -1025,7 +992,7 @@ class TEXTURE_PT_mapping(TextureSlotPanel, Panel): class TEXTURE_PT_influence(TextureSlotPanel, Panel): bl_label = "Influence" - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'} + COMPAT_ENGINES = {'BLENDER_RENDER'} @classmethod def poll(cls, context): @@ -1233,7 +1200,7 @@ class TEXTURE_PT_influence(TextureSlotPanel, Panel): class TEXTURE_PT_custom_props(TextureButtonsPanel, PropertyPanel, Panel): - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'} + COMPAT_ENGINES = {'BLENDER_RENDER'} _context_path = "texture" _property_type = Texture diff --git a/release/scripts/startup/bl_ui/properties_view_layer.py b/release/scripts/startup/bl_ui/properties_view_layer.py index 4d61aacbf22..162f8b89a3e 100644 --- a/release/scripts/startup/bl_ui/properties_view_layer.py +++ b/release/scripts/startup/bl_ui/properties_view_layer.py @@ -48,7 +48,7 @@ class VIEWLAYER_UL_viewlayers(UIList): class VIEWLAYER_PT_layers(ViewLayerButtonsPanel, Panel): bl_label = "Layer List" bl_options = {'HIDE_HEADER'} - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME', 'BLENDER_CLAY', 'BLENDER_EEVEE'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_CLAY', 'BLENDER_EEVEE'} def draw(self, context): layout = self.layout @@ -57,10 +57,6 @@ class VIEWLAYER_PT_layers(ViewLayerButtonsPanel, Panel): rd = scene.render view_render = scene.view_render - if view_render.engine == 'BLENDER_GAME': - layout.label("Not available in the Game Engine") - return - row = layout.row() col = row.column() col.template_list("VIEWLAYER_UL_viewlayers", "", scene, "view_layers", scene.view_layers, "active_index", rows=2) diff --git a/release/scripts/startup/bl_ui/properties_world.py b/release/scripts/startup/bl_ui/properties_world.py index 48eed9acb3a..abf17b96064 100644 --- a/release/scripts/startup/bl_ui/properties_world.py +++ b/release/scripts/startup/bl_ui/properties_world.py @@ -271,7 +271,7 @@ class EEVEE_WORLD_PT_mist(WorldButtonsPanel, Panel): class WORLD_PT_custom_props(WorldButtonsPanel, PropertyPanel, Panel): - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME', 'BLENDER_EEVEE'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'} _context_path = "world" _property_type = bpy.types.World diff --git a/release/scripts/startup/bl_ui/space_info.py b/release/scripts/startup/bl_ui/space_info.py index cbe6449d1df..b6c845c5995 100644 --- a/release/scripts/startup/bl_ui/space_info.py +++ b/release/scripts/startup/bl_ui/space_info.py @@ -100,12 +100,7 @@ class INFO_MT_editor_menus(Menu): view_render = context.view_render layout.menu("INFO_MT_file") - - if view_render.use_game_engine: - layout.menu("INFO_MT_game") - else: - layout.menu("INFO_MT_render") - + layout.menu("INFO_MT_render") layout.menu("INFO_MT_window") layout.menu("INFO_MT_help") @@ -243,27 +238,6 @@ class INFO_MT_file_previews(Menu): layout.operator("wm.previews_batch_clear") -class INFO_MT_game(Menu): - bl_label = "Game" - - def draw(self, context): - layout = self.layout - - gs = context.scene.game_settings - - layout.operator("view3d.game_start") - - layout.separator() - - layout.prop(gs, "show_debug_properties") - layout.prop(gs, "show_framerate_profile") - layout.prop(gs, "show_physics_visualization") - layout.prop(gs, "use_deprecation_warnings") - layout.prop(gs, "use_animation_record") - layout.separator() - layout.prop(gs, "use_auto_start") - - class INFO_MT_render(Menu): bl_label = "Render" @@ -377,7 +351,6 @@ classes = ( INFO_MT_file_export, INFO_MT_file_external_data, INFO_MT_file_previews, - INFO_MT_game, INFO_MT_render, INFO_MT_opengl_render, INFO_MT_window, diff --git a/release/scripts/startup/bl_ui/space_logic.py b/release/scripts/startup/bl_ui/space_logic.py deleted file mode 100644 index b552181f491..00000000000 --- a/release/scripts/startup/bl_ui/space_logic.py +++ /dev/null @@ -1,145 +0,0 @@ -# ##### BEGIN GPL LICENSE BLOCK ##### -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License -# as published by the Free Software Foundation; either version 2 -# of the License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software Foundation, -# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -# -# ##### END GPL LICENSE BLOCK ##### - -# <pep8 compliant> -import bpy -from bpy.types import Header, Menu, Panel - - -class LOGIC_PT_properties(Panel): - bl_space_type = 'LOGIC_EDITOR' - bl_region_type = 'UI' - bl_label = "Properties" - - @classmethod - def poll(cls, context): - ob = context.active_object - return ob and ob.game - - def draw(self, context): - layout = self.layout - - ob = context.active_object - game = ob.game - is_font = (ob.type == 'FONT') - - if is_font: - prop_index = game.properties.find("Text") - if prop_index != -1: - layout.operator("object.game_property_remove", text="Remove Text Game Property", icon='X').index = prop_index - row = layout.row() - sub = row.row() - sub.enabled = 0 - prop = game.properties[prop_index] - sub.prop(prop, "name", text="") - row.prop(prop, "type", text="") - # get the property from the body, not the game property - # note, don't do this - it's too slow and body can potentially be a really long string. - #~ row.prop(ob.data, "body", text="") - row.label("See Text Object") - else: - props = layout.operator("object.game_property_new", text="Add Text Game Property", icon='ZOOMIN') - props.name = "Text" - props.type = 'STRING' - - props = layout.operator("object.game_property_new", text="Add Game Property", icon='ZOOMIN') - props.name = "" - - for i, prop in enumerate(game.properties): - - if is_font and i == prop_index: - continue - - box = layout.box() - row = box.row() - row.prop(prop, "name", text="") - row.prop(prop, "type", text="") - row.prop(prop, "value", text="") - row.prop(prop, "show_debug", text="", toggle=True, icon='INFO') - sub = row.row(align=True) - props = sub.operator("object.game_property_move", text="", icon='TRIA_UP') - props.index = i - props.direction = 'UP' - props = sub.operator("object.game_property_move", text="", icon='TRIA_DOWN') - props.index = i - props.direction = 'DOWN' - row.operator("object.game_property_remove", text="", icon='X', emboss=False).index = i - - -class LOGIC_MT_logicbricks_add(Menu): - bl_label = "Add" - - def draw(self, context): - layout = self.layout - - layout.operator_menu_enum("logic.sensor_add", "type", text="Sensor") - layout.operator_menu_enum("logic.controller_add", "type", text="Controller") - layout.operator_menu_enum("logic.actuator_add", "type", text="Actuator") - - -class LOGIC_HT_header(Header): - bl_space_type = 'LOGIC_EDITOR' - - def draw(self, context): - layout = self.layout.row(align=True) - - layout.template_header() - - LOGIC_MT_editor_menus.draw_collapsible(context, layout) - - -class LOGIC_MT_editor_menus(Menu): - bl_idname = "LOGIC_MT_editor_menus" - bl_label = "" - - def draw(self, context): - self.draw_menus(self.layout, context) - - @staticmethod - def draw_menus(layout, context): - layout.menu("LOGIC_MT_view") - layout.menu("LOGIC_MT_logicbricks_add") - - -class LOGIC_MT_view(Menu): - bl_label = "View" - - def draw(self, context): - layout = self.layout - - layout.operator("logic.properties", icon='MENU_PANEL') - - layout.separator() - - layout.operator("screen.area_dupli") - layout.operator("screen.screen_full_area") - layout.operator("screen.screen_full_area", text="Toggle Fullscreen Area").use_hide_panels = True - - -classes = ( - LOGIC_PT_properties, - LOGIC_MT_logicbricks_add, - LOGIC_HT_header, - LOGIC_MT_editor_menus, - LOGIC_MT_view, -) - -if __name__ == "__main__": # only for live edit. - from bpy.utils import register_class - for cls in classes: - register_class(cls) diff --git a/release/scripts/startup/bl_ui/space_sequencer.py b/release/scripts/startup/bl_ui/space_sequencer.py index 0697cf8e56b..5d6964ef758 100644 --- a/release/scripts/startup/bl_ui/space_sequencer.py +++ b/release/scripts/startup/bl_ui/space_sequencer.py @@ -1288,7 +1288,7 @@ class SEQUENCER_PT_grease_pencil_tools(GreasePencilToolsPanel, SequencerButtonsP class SEQUENCER_PT_custom_props(SequencerButtonsPanel, PropertyPanel, Panel): - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'} + COMPAT_ENGINES = {'BLENDER_RENDER'} _context_path = "scene.sequence_editor.active_strip" _property_type = (bpy.types.Sequence,) bl_category = "Strip" diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py index 8fa8d7e36a6..4a24beb36c1 100644 --- a/release/scripts/startup/bl_ui/space_view3d.py +++ b/release/scripts/startup/bl_ui/space_view3d.py @@ -1440,10 +1440,6 @@ class VIEW3D_MT_object(Menu): layout.separator() - layout.menu("VIEW3D_MT_object_game") - - layout.separator() - layout.operator_menu_enum("object.convert", "target") @@ -1810,26 +1806,6 @@ class VIEW3D_MT_make_links(Menu): layout.operator("object.join_uvs") # stupid place to add this! -class VIEW3D_MT_object_game(Menu): - bl_label = "Game" - - def draw(self, context): - layout = self.layout - - layout.operator("object.logic_bricks_copy", text="Copy Logic Bricks") - layout.operator("object.game_physics_copy", text="Copy Physics Properties") - - layout.separator() - - layout.operator("object.game_property_copy", text="Replace Properties").operation = 'REPLACE' - layout.operator("object.game_property_copy", text="Merge Properties").operation = 'MERGE' - layout.operator_menu_enum("object.game_property_copy", "property", text="Copy Properties...") - - layout.separator() - - layout.operator("object.game_property_clear") - - class VIEW3D_MT_brush(Menu): bl_label = "Brush" @@ -3927,7 +3903,6 @@ classes = ( VIEW3D_MT_object_quick_effects, VIEW3D_MT_make_single_user, VIEW3D_MT_make_links, - VIEW3D_MT_object_game, VIEW3D_MT_brush, VIEW3D_MT_brush_paint_modes, VIEW3D_MT_paint_vertex, diff --git a/release/scripts/startup/bl_ui/space_view3d_toolbar.py b/release/scripts/startup/bl_ui/space_view3d_toolbar.py index e29971e1835..d7c23e460a0 100644 --- a/release/scripts/startup/bl_ui/space_view3d_toolbar.py +++ b/release/scripts/startup/bl_ui/space_view3d_toolbar.py @@ -1199,7 +1199,7 @@ class TEXTURE_UL_texpaintslots(UIList): if self.layout_type in {'DEFAULT', 'COMPACT'}: layout.prop(item, "name", text="", emboss=False, icon_value=icon) - if (not mat.use_nodes) and context.engine in {'BLENDER_RENDER', 'BLENDER_GAME'}: + if (not mat.use_nodes) and context.engine == 'BLENDER_RENDER': mtex_index = mat.texture_paint_slots[index].index layout.prop(mat, "use_textures", text="", index=mtex_index) elif self.layout_type == 'GRID': @@ -1262,7 +1262,7 @@ class VIEW3D_PT_slots_projectpaint(View3DPanel, Panel): else: slot = None - if (not mat.use_nodes) and context.engine in {'BLENDER_RENDER', 'BLENDER_GAME'}: + if (not mat.use_nodes) and context.engine == 'BLENDER_RENDER': row = col.row(align=True) row.operator_menu_enum("paint.add_texture_paint_slot", "type") row.operator("paint.delete_texture_paint_slot", text="", icon='X') diff --git a/release/scripts/templates_py/gamelogic.py b/release/scripts/templates_py/gamelogic.py deleted file mode 100644 index e589ad43e63..00000000000 --- a/release/scripts/templates_py/gamelogic.py +++ /dev/null @@ -1,73 +0,0 @@ -# This script must be assigned to a python controller -# where it can access the object that owns it and the sensors/actuators that it connects to. - -import bge - -# support for Vector(), Matrix() types and advanced functions like Matrix.Scale(...) and Matrix.Rotation(...) -# import mathutils - -# for functions like getWindowWidth(), getWindowHeight() -# import Rasterizer - - -def main(): - cont = bge.logic.getCurrentController() - - # The KX_GameObject that owns this controller. - own = cont.owner - - # for scripts that deal with spacial logic - own_pos = own.worldPosition - - # Some example functions, remove to write your own script. - # check for a positive sensor, will run on any object without errors. - print("Logic info for KX_GameObject", own.name) - input = False - - for sens in cont.sensors: - # The sensor can be on another object, we may want to use it - own_sens = sens.owner - print(" sensor:", sens.name, end=" ") - if sens.positive: - print("(true)") - input = True - else: - print("(false)") - - for actu in cont.actuators: - # The actuator can be on another object, we may want to use it - own_actu = actu.owner - print(" actuator:", actu.name) - - # This runs the actuator or turns it off - # note that actuators will continue to run unless explicitly turned off. - if input: - cont.activate(actu) - else: - cont.deactivate(actu) - - # Its also good practice to get sensors and actuators by name - # rather then index so any changes to their order wont break the script. - - # sens_key = cont.sensors["key_sensor"] - # actu_motion = cont.actuators["motion"] - - # Loop through all other objects in the scene - sce = bge.logic.getCurrentScene() - print("Scene Objects:", sce.name) - for ob in sce.objects: - print(" ", ob.name, ob.worldPosition) - - # Example where collision objects are checked for their properties - # adding to our objects "life" property - """ - actu_collide = cont.sensors["collision_sens"] - for ob in actu_collide.hitObjectList: - # Check to see the object has this property - if "life" in ob: - own["life"] += ob["life"] - ob["life"] = 0 - print(own["life"]) - """ - -main() diff --git a/release/scripts/templates_py/gamelogic_module.py b/release/scripts/templates_py/gamelogic_module.py deleted file mode 100644 index 88c8cf0d75b..00000000000 --- a/release/scripts/templates_py/gamelogic_module.py +++ /dev/null @@ -1,27 +0,0 @@ -# This module can be accessed by a python controller with -# its execution method set to 'Module' -# * Set the module string to "gamelogic_module.main" (without quotes) -# * When renaming the script it MUST have a .py extension -# * External text modules are supported as long as they are at -# the same location as the blendfile or one of its libraries. - -import bge - -# variables defined here will only be set once when the -# module is first imported. Set object specific vars -# inside the function if you intend to use the module -# with multiple objects. - - -def main(cont): - own = cont.owner - - sens = cont.sensors['mySensor'] - actu = cont.actuators['myActuator'] - - if sens.positive: - cont.activate(actu) - else: - cont.deactivate(actu) - -# dont call main(bge.logic.getCurrentController()), the py controller will diff --git a/release/scripts/templates_py/gamelogic_simple.py b/release/scripts/templates_py/gamelogic_simple.py deleted file mode 100644 index dbfcf948b18..00000000000 --- a/release/scripts/templates_py/gamelogic_simple.py +++ /dev/null @@ -1,17 +0,0 @@ -import bge - - -def main(): - - cont = bge.logic.getCurrentController() - own = cont.owner - - sens = cont.sensors['mySensor'] - actu = cont.actuators['myActuator'] - - if sens.positive: - cont.activate(actu) - else: - cont.deactivate(actu) - -main() |