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

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--release/ui/buttons_game.py254
-rw-r--r--release/ui/buttons_physics_cloth.py3
-rw-r--r--release/ui/buttons_physics_field.py8
-rw-r--r--release/ui/buttons_physics_fluid.py5
-rw-r--r--release/ui/buttons_physics_softbody.py3
-rw-r--r--release/ui/buttons_scene.py48
-rw-r--r--release/ui/buttons_world.py87
-rw-r--r--release/ui/space_info.py9
-rw-r--r--release/ui/space_logic.py139
-rw-r--r--source/blender/editors/screen/screen_ops.c7
-rw-r--r--source/blender/editors/space_buttons/buttons_context.c30
-rw-r--r--source/blender/editors/space_buttons/buttons_header.c2
-rw-r--r--source/blender/editors/space_buttons/space_buttons.c2
-rw-r--r--source/blender/makesdna/DNA_space_types.h1
-rw-r--r--source/blender/makesrna/SConscript3
-rw-r--r--source/blender/makesrna/intern/SConscript3
-rw-r--r--source/blender/makesrna/intern/rna_render.c35
-rw-r--r--source/blender/makesrna/intern/rna_scene.c20
-rw-r--r--source/blender/makesrna/intern/rna_space.c28
-rw-r--r--source/blender/makesrna/intern/rna_world.c2
-rw-r--r--source/blender/render/extern/include/RE_pipeline.h6
-rw-r--r--source/blender/render/intern/source/pipeline.c22
-rw-r--r--source/blender/windowmanager/intern/wm_init_exit.c2
-rw-r--r--source/creator/creator.c1
24 files changed, 390 insertions, 330 deletions
diff --git a/release/ui/buttons_game.py b/release/ui/buttons_game.py
index 5f953b1c8eb..1a0f6666a47 100644
--- a/release/ui/buttons_game.py
+++ b/release/ui/buttons_game.py
@@ -1,40 +1,19 @@
import bpy
-class GameButtonsPanel(bpy.types.Panel):
+class PhysicsButtonsPanel(bpy.types.Panel):
__space_type__ = "BUTTONS_WINDOW"
__region_type__ = "WINDOW"
- __context__ = "game"
-
-class GAME_PT_context_game(GameButtonsPanel):
- __idname__ = "GAME_PT_context_game"
- __no_header__ = True
-
- def draw(self, context):
- layout = self.layout
- ob = context.object
- game = context.game
-
- split = layout.split(percentage=0.06)
- split.itemL(text="", icon="ICON_GAME")
- split.itemR(game, "name", text="")
-
-class GAME_PT_data(GameButtonsPanel):
- __idname__ = "GAME_PT_data"
- __label__ = "Data"
-
- def draw(self, context):
- layout = self.layout
- ob = context.object
- game = context.game
-
-class GAME_PT_physics(GameButtonsPanel):
- __idname__ = "GAME_PT_physics"
- __label__ = "Physics"
+ __context__ = "physics"
def poll(self, context):
ob = context.active_object
- return ob and ob.game
+ rd = context.scene.render_data
+ return ob and ob.game and (rd.engine == 'BLENDER_GAME')
+
+class PHYSICS_PT_game_physics(PhysicsButtonsPanel):
+ __idname__ = "PHYSICS_PT_game_physics"
+ __label__ = "Physics"
def draw(self, context):
layout = self.layout
@@ -97,15 +76,10 @@ class GAME_PT_physics(GameButtonsPanel):
sub.itemR(game, "lock_y_rot_axis", text="Y")
sub.itemR(game, "lock_z_rot_axis", text="Z")
-
-class GAME_PT_collision_bounds(GameButtonsPanel):
- __idname__ = "GAME_PT_collision_bounds"
+class PHYSICS_PT_game_collision_bounds(PhysicsButtonsPanel):
+ __idname__ = "PHYSICS_PT_game_collision_bounds"
__label__ = "Collision Bounds"
- def poll(self, context):
- ob = context.active_object
- return ob and ob.game
-
def draw_header(self, context):
layout = self.layout
ob = context.active_object
@@ -130,8 +104,208 @@ class GAME_PT_collision_bounds(GameButtonsPanel):
sub = split.column()
sub.itemR(game, "collision_margin", text="Margin", slider=True)
+bpy.types.register(PHYSICS_PT_game_physics)
+bpy.types.register(PHYSICS_PT_game_collision_bounds)
+
+class SceneButtonsPanel(bpy.types.Panel):
+ __space_type__ = "BUTTONS_WINDOW"
+ __region_type__ = "WINDOW"
+ __context__ = "scene"
+
+ def poll(self, context):
+ rd = context.scene.render_data
+ return (rd.engine == 'BLENDER_GAME')
+
+class SCENE_PT_game(SceneButtonsPanel):
+ __label__ = "Game"
+
+ def draw(self, context):
+ layout = self.layout
+ rd = context.scene.render_data
+
+ row = layout.row()
+ row.itemO("view3d.game_start", text="Start")
+ row.itemL()
+
+class SCENE_PT_game_player(SceneButtonsPanel):
+ __label__ = "Player"
+
+ def draw(self, context):
+ layout = self.layout
+ gs = context.scene.game_data
+ row = layout.row()
+ row.itemR(gs, "fullscreen")
+
+ split = layout.split()
+ col = split.column()
+ col.itemL(text="Resolution:")
+ colsub = col.column(align=True)
+ colsub.itemR(gs, "resolution_x", slider=False, text="X")
+ colsub.itemR(gs, "resolution_y", slider=False, text="Y")
+
+ col = split.column()
+ col.itemL(text="Quality:")
+ colsub = col.column(align=True)
+ colsub.itemR(gs, "depth", text="Bit Depth", slider=False)
+ colsub.itemR(gs, "frequency", text="FPS", slider=False)
+
+ # framing:
+ col = layout.column()
+ col.itemL(text="Framing:")
+ col.row().itemR(gs, "framing_type", expand=True)
+
+ colsub = col.column()
+ colsub.itemR(gs, "framing_color", text="")
+
+class SCENE_PT_game_stereo(SceneButtonsPanel):
+ __label__ = "Stereo"
+
+ def draw(self, context):
+ layout = self.layout
+ gs = context.scene.game_data
+
+ # stereo options:
+ col= layout.column()
+ row = col.row()
+ row.itemR(gs, "stereo", expand=True)
+
+ stereo_mode = gs.stereo
+
+ # stereo:
+ if stereo_mode == 'STEREO':
+ row = layout.row()
+ row.itemR(gs, "stereo_mode")
+
+ # dome:
+ if stereo_mode == 'DOME':
+ row = layout.row()
+ row.itemR(gs, "dome_mode", text="Dome Type")
+
+ split=layout.split()
+ col=split.column()
+ col.itemR(gs, "dome_angle", slider=True)
+ col.itemR(gs, "dome_tesselation", text="Tesselation")
+ col=split.column()
+ col.itemR(gs, "dome_tilt")
+ col.itemR(gs, "dome_buffer_resolution", text="Resolution", slider=True)
+ col=layout.column()
+ col.itemR(gs, "dome_text")
+
+bpy.types.register(SCENE_PT_game)
+bpy.types.register(SCENE_PT_game_player)
+bpy.types.register(SCENE_PT_game_stereo)
+
+class WorldButtonsPanel(bpy.types.Panel):
+ __space_type__ = "BUTTONS_WINDOW"
+ __region_type__ = "WINDOW"
+ __context__ = "world"
+
+ def poll(self, context):
+ rd = context.scene.render_data
+ return (rd.engine == 'BLENDER_GAME')
+
+class WORLD_PT_game_context_world(WorldButtonsPanel):
+ __no_header__ = True
+
+ def poll(self, context):
+ rd = context.scene.render_data
+ return (context.scene != None) and (rd.use_game_engine)
+
+ 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):
+ __label__ = "World"
+
+ def draw(self, context):
+ layout = self.layout
+ world = context.world
+
+ row = layout.row()
+ row.column().itemR(world, "horizon_color")
+ row.column().itemR(world, "ambient_color")
+
+ layout.itemR(world.mist, "enabled", text="Mist")
+
+ row = layout.column_flow()
+ row.active = world.mist.enabled
+ row.itemR(world.mist, "start")
+ row.itemR(world.mist, "depth")
+
+
+"""
+class WORLD_PT_game(WorldButtonsPanel):
+ __space_type__ = "LOGIC_EDITOR"
+ __region_type__ = "UI"
+ __label__ = "Game Settings"
+
+ def draw(self, context):
+ layout = self.layout
+ world = context.world
+
+ flow = layout.column_flow()
+ flow.itemR(world, "physics_engine")
+ flow.itemR(world, "physics_gravity")
+
+ flow.itemR(world, "game_fps")
+ flow.itemR(world, "game_logic_step_max")
+ flow.itemR(world, "game_physics_substep")
+ flow.itemR(world, "game_physics_step_max")
+
+ flow.itemR(world, "game_use_occlusion_culling", text="Enable Occlusion Culling")
+ flow.itemR(world, "game_occlusion_culling_resolution")
+"""
+
+class WORLD_PT_game_physics(WorldButtonsPanel):
+ __label__ = "Physics"
+
+ def draw(self, context):
+ layout = self.layout
+ gs = context.scene.game_data
+ flow = layout.column_flow()
+ flow.itemR(gs, "physics_engine")
+ if gs.physics_engine != "NONE":
+ flow.itemR(gs, "physics_gravity", text="Gravity")
+
+ split = layout.split()
+ col = split.column()
+ col.itemL(text="Physics Steps:")
+ colsub = col.column(align=True)
+ colsub.itemR(gs, "physics_step_max", text="Max")
+ colsub.itemR(gs, "physics_step_sub", text="Substeps")
+ col.itemR(gs, "fps", text="FPS")
+
+ col = split.column()
+ col.itemL(text="Logic Steps:")
+ col.itemR(gs, "logic_step_max", text="Max")
+ col.itemS()
+ col.itemR(gs, "use_occlusion_culling", text="Occlusion Culling")
+ colsub = col.column()
+ colsub.active = gs.use_occlusion_culling
+ colsub.itemR(gs, "occlusion_culling_resolution", text="Resolution")
+
+
+ else:
+ split = layout.split()
+ col = split.column()
+ col.itemL(text="Physics Steps:")
+ col.itemR(gs, "fps", text="FPS")
+ col = split.column()
+ col.itemL(text="Logic Steps:")
+ col.itemR(gs, "logic_step_max", text="Max")
+
+bpy.types.register(WORLD_PT_game_context_world)
+bpy.types.register(WORLD_PT_game_world)
+bpy.types.register(WORLD_PT_game_physics)
-bpy.types.register(GAME_PT_context_game)
-bpy.types.register(GAME_PT_data)
-bpy.types.register(GAME_PT_physics)
-bpy.types.register(GAME_PT_collision_bounds) \ No newline at end of file
diff --git a/release/ui/buttons_physics_cloth.py b/release/ui/buttons_physics_cloth.py
index 08911b0195c..dcfa1a331e5 100644
--- a/release/ui/buttons_physics_cloth.py
+++ b/release/ui/buttons_physics_cloth.py
@@ -8,7 +8,8 @@ class PhysicButtonsPanel(bpy.types.Panel):
def poll(self, context):
ob = context.object
- return (ob and ob.type == 'MESH')
+ rd = context.scene.render_data
+ return (ob and ob.type == 'MESH') and (not rd.use_game_engine)
class PHYSICS_PT_cloth(PhysicButtonsPanel):
__idname__ = "PHYSICS_PT_cloth"
diff --git a/release/ui/buttons_physics_field.py b/release/ui/buttons_physics_field.py
index cdb90c95228..7df14b3eef9 100644
--- a/release/ui/buttons_physics_field.py
+++ b/release/ui/buttons_physics_field.py
@@ -7,7 +7,8 @@ class PhysicButtonsPanel(bpy.types.Panel):
__context__ = "physics"
def poll(self, context):
- return (context.object != None)
+ rd = context.scene.render_data
+ return (context.object != None) and (not rd.use_game_engine)
class PHYSICS_PT_field(PhysicButtonsPanel):
__idname__ = "PHYSICS_PT_field"
@@ -171,7 +172,8 @@ class PHYSICS_PT_collision(PhysicButtonsPanel):
def poll(self, context):
ob = context.object
- return (ob and ob.type == 'MESH')
+ rd = context.scene.render_data
+ return (ob and ob.type == 'MESH') and (not rd.use_game_engine)
def draw_header(self, context):
settings = context.object.collision
@@ -213,4 +215,4 @@ class PHYSICS_PT_collision(PhysicButtonsPanel):
col.itemR(settings, "damping", text="Factor", slider=True)
bpy.types.register(PHYSICS_PT_field)
-bpy.types.register(PHYSICS_PT_collision) \ No newline at end of file
+bpy.types.register(PHYSICS_PT_collision)
diff --git a/release/ui/buttons_physics_fluid.py b/release/ui/buttons_physics_fluid.py
index 8cec90f41ba..f25aa117c74 100644
--- a/release/ui/buttons_physics_fluid.py
+++ b/release/ui/buttons_physics_fluid.py
@@ -8,7 +8,8 @@ class PhysicButtonsPanel(bpy.types.Panel):
def poll(self, context):
ob = context.object
- return (ob and ob.type == 'MESH')
+ rd = context.scene.render_data
+ return (ob and ob.type == 'MESH') and (not rd.use_game_engine)
class PHYSICS_PT_fluid(PhysicButtonsPanel):
__idname__ = "PHYSICS_PT_fluid"
@@ -266,4 +267,4 @@ class PHYSICS_PT_domain_particles(PhysicButtonsPanel):
bpy.types.register(PHYSICS_PT_fluid)
bpy.types.register(PHYSICS_PT_domain_gravity)
bpy.types.register(PHYSICS_PT_domain_boundary)
-bpy.types.register(PHYSICS_PT_domain_particles) \ No newline at end of file
+bpy.types.register(PHYSICS_PT_domain_particles)
diff --git a/release/ui/buttons_physics_softbody.py b/release/ui/buttons_physics_softbody.py
index 836c557257e..fbcc1be3f01 100644
--- a/release/ui/buttons_physics_softbody.py
+++ b/release/ui/buttons_physics_softbody.py
@@ -8,7 +8,8 @@ class PhysicButtonsPanel(bpy.types.Panel):
def poll(self, context):
ob = context.object
- return (ob and ob.type == 'MESH')
+ rd = context.scene.render_data
+ return (ob and ob.type == 'MESH') and (not rd.use_game_engine)
class PHYSICS_PT_softbody(PhysicButtonsPanel):
__idname__ = "PHYSICS_PT_softbody"
diff --git a/release/ui/buttons_scene.py b/release/ui/buttons_scene.py
index db38a74d80b..8b6bcb98e06 100644
--- a/release/ui/buttons_scene.py
+++ b/release/ui/buttons_scene.py
@@ -6,7 +6,11 @@ class RenderButtonsPanel(bpy.types.Panel):
__region_type__ = "WINDOW"
__context__ = "scene"
-class RENDER_PT_render(RenderButtonsPanel):
+ def poll(self, context):
+ rd = context.scene.render_data
+ return (not rd.use_game_engine)
+
+class SCENE_PT_render(RenderButtonsPanel):
__label__ = "Render"
def draw(self, context):
@@ -15,13 +19,11 @@ class RENDER_PT_render(RenderButtonsPanel):
row = layout.row()
row.itemO("screen.render", text="Image", icon='ICON_IMAGE_COL')
- row.item_booleanO("screen.render", "anim", True, text="Animation", icon='ICON_SEQUENCE')
+ row.item_booleanO("screen.render", "animation", True, text="Animation", icon='ICON_SEQUENCE')
layout.itemR(rd, "display_mode", text="Display")
- if rd.multiple_engines:
- layout.itemR(rd, "engine")
-class RENDER_PT_layers(RenderButtonsPanel):
+class SCENE_PT_layers(RenderButtonsPanel):
__label__ = "Layers"
__default_closed__ = True
@@ -107,7 +109,7 @@ class RENDER_PT_layers(RenderButtonsPanel):
row.itemR(rl, "pass_refraction")
row.itemR(rl, "pass_refraction_exclude", text="", icon="ICON_X")
-class RENDER_PT_shading(RenderButtonsPanel):
+class SCENE_PT_shading(RenderButtonsPanel):
__label__ = "Shading"
def draw(self, context):
@@ -127,7 +129,7 @@ class RENDER_PT_shading(RenderButtonsPanel):
col.itemR(rd, "color_management")
col.itemR(rd, "alpha_mode", text="Alpha")
-class RENDER_PT_performance(RenderButtonsPanel):
+class SCENE_PT_performance(RenderButtonsPanel):
__label__ = "Performance"
__default_closed__ = True
@@ -169,7 +171,7 @@ class RENDER_PT_performance(RenderButtonsPanel):
row.itemR(rd, "octree_resolution", text="Ray Tracing Octree")
-class RENDER_PT_post_processing(RenderButtonsPanel):
+class SCENE_PT_post_processing(RenderButtonsPanel):
__label__ = "Post Processing"
__default_closed__ = True
@@ -197,7 +199,7 @@ class RENDER_PT_post_processing(RenderButtonsPanel):
split.itemL()
split.itemR(rd, "dither_intensity", text="Dither", slider=True)
-class RENDER_PT_output(RenderButtonsPanel):
+class SCENE_PT_output(RenderButtonsPanel):
__label__ = "Output"
def draw(self, context):
@@ -258,7 +260,7 @@ class RENDER_PT_output(RenderButtonsPanel):
split = layout.split()
split.itemR(rd, "tiff_bit")
-class RENDER_PT_encoding(RenderButtonsPanel):
+class SCENE_PT_encoding(RenderButtonsPanel):
__label__ = "Encoding"
__default_closed__ = True
@@ -305,7 +307,7 @@ class RENDER_PT_encoding(RenderButtonsPanel):
col = split.column()
col.itemR(rd, "ffmpeg_multiplex_audio")
-class RENDER_PT_antialiasing(RenderButtonsPanel):
+class SCENE_PT_antialiasing(RenderButtonsPanel):
__label__ = "Anti-Aliasing"
def draw_header(self, context):
@@ -330,7 +332,7 @@ class RENDER_PT_antialiasing(RenderButtonsPanel):
col.itemR(rd, "pixel_filter", text="")
col.itemR(rd, "filter_size", text="Size", slider=True)
-class RENDER_PT_dimensions(RenderButtonsPanel):
+class SCENE_PT_dimensions(RenderButtonsPanel):
__label__ = "Dimensions"
def draw(self, context):
@@ -368,7 +370,7 @@ class RENDER_PT_dimensions(RenderButtonsPanel):
col.itemR(rd, "fps")
col.itemR(rd, "fps_base",text="/")
-class RENDER_PT_stamp(RenderButtonsPanel):
+class SCENE_PT_stamp(RenderButtonsPanel):
__label__ = "Stamp"
__default_closed__ = True
@@ -408,14 +410,14 @@ class RENDER_PT_stamp(RenderButtonsPanel):
rowsub.active = rd.stamp_note
rowsub.itemR(rd, "stamp_note_text", text="")
-bpy.types.register(RENDER_PT_render)
-bpy.types.register(RENDER_PT_layers)
-bpy.types.register(RENDER_PT_dimensions)
-bpy.types.register(RENDER_PT_antialiasing)
-bpy.types.register(RENDER_PT_shading)
-bpy.types.register(RENDER_PT_output)
-bpy.types.register(RENDER_PT_encoding)
-bpy.types.register(RENDER_PT_performance)
-bpy.types.register(RENDER_PT_post_processing)
-bpy.types.register(RENDER_PT_stamp)
+bpy.types.register(SCENE_PT_render)
+bpy.types.register(SCENE_PT_layers)
+bpy.types.register(SCENE_PT_dimensions)
+bpy.types.register(SCENE_PT_antialiasing)
+bpy.types.register(SCENE_PT_shading)
+bpy.types.register(SCENE_PT_output)
+bpy.types.register(SCENE_PT_encoding)
+bpy.types.register(SCENE_PT_performance)
+bpy.types.register(SCENE_PT_post_processing)
+bpy.types.register(SCENE_PT_stamp)
diff --git a/release/ui/buttons_world.py b/release/ui/buttons_world.py
index 6e233f86765..e0305bbaf04 100644
--- a/release/ui/buttons_world.py
+++ b/release/ui/buttons_world.py
@@ -7,7 +7,8 @@ class WorldButtonsPanel(bpy.types.Panel):
__context__ = "world"
def poll(self, context):
- return (context.world != None)
+ rd = context.scene.render_data
+ return (context.world != None) and (not rd.use_game_engine)
class WORLD_PT_preview(WorldButtonsPanel):
__label__ = "Preview"
@@ -22,7 +23,8 @@ class WORLD_PT_context_world(WorldButtonsPanel):
__no_header__ = True
def poll(self, context):
- return (context.scene != None)
+ rd = context.scene.render_data
+ return (context.scene != None) and (not rd.use_game_engine)
def draw(self, context):
layout = self.layout
@@ -60,17 +62,6 @@ class WORLD_PT_world(WorldButtonsPanel):
col.active = world.blend_sky
row.column().itemR(world, "ambient_color")
-class WORLD_PT_color_correction(WorldButtonsPanel):
- __label__ = "Color Correction"
-
- def draw(self, context):
- layout = self.layout
- world = context.world
-
- row = layout.row()
- row.itemR(world, "exposure")
- row.itemR(world, "range")
-
class WORLD_PT_mist(WorldButtonsPanel):
__label__ = "Mist"
@@ -91,9 +82,8 @@ class WORLD_PT_mist(WorldButtonsPanel):
flow.itemR(world.mist, "depth")
flow.itemR(world.mist, "height")
flow.itemR(world.mist, "intensity")
- col = layout.column()
- col.itemL(text="Fallof:")
- col.row().itemR(world.mist, "falloff", expand=True)
+
+ layout.itemR(world.mist, "falloff")
class WORLD_PT_stars(WorldButtonsPanel):
__label__ = "Stars"
@@ -112,9 +102,9 @@ class WORLD_PT_stars(WorldButtonsPanel):
flow = layout.column_flow()
flow.itemR(world.stars, "size")
+ flow.itemR(world.stars, "color_randomization", text="Colors")
flow.itemR(world.stars, "min_distance", text="Min. Dist")
flow.itemR(world.stars, "average_separation", text="Separation")
- flow.itemR(world.stars, "color_randomization", text="Random")
class WORLD_PT_ambient_occlusion(WorldButtonsPanel):
__label__ = "Ambient Occlusion"
@@ -132,49 +122,46 @@ class WORLD_PT_ambient_occlusion(WorldButtonsPanel):
layout.active = ao.enabled
layout.itemR(ao, "gather_method", expand=True)
+
+ split = layout.split()
+ col = split.column()
+ col.itemL(text="Attenuation:")
+ col.itemR(ao, "distance")
+ col.itemR(ao, "falloff")
+ sub = col.row()
+ sub.active = ao.falloff
+ sub.itemR(ao, "falloff_strength", text="Strength")
+
if ao.gather_method == 'RAYTRACE':
- split = layout.split()
-
col = split.column()
- col.itemR(ao, "samples")
- col.itemR(ao, "distance")
- col = split.column()
- col.itemR(ao, "falloff")
- colsub = col.column()
- colsub.active = ao.falloff
- colsub.itemR(ao, "strength")
-
- layout.itemR(ao, "sample_method")
+ col.itemL(text="Sampling:")
+ col.itemR(ao, "sample_method", text="")
+
+ sub = col.column(align=True)
+ sub.itemR(ao, "samples")
+
if ao.sample_method == 'ADAPTIVE_QMC':
- row = layout.row()
- row.itemR(ao, "threshold")
- row.itemR(ao, "adapt_to_speed")
-
- if ao.sample_method == 'CONSTANT_JITTERED':
- row = layout.row()
- row.itemR(ao, "bias")
+ sub.itemR(ao, "threshold")
+ sub.itemR(ao, "adapt_to_speed")
+ elif ao.sample_method == 'CONSTANT_JITTERED':
+ sub.itemR(ao, "bias")
if ao.gather_method == 'APPROXIMATE':
- split = layout.split()
-
col = split.column()
- col.itemR(ao, "passes")
+
+ col.itemL(text="Sampling:")
col.itemR(ao, "error_tolerance", text="Error")
+ col.itemR(ao, "pixel_cache")
col.itemR(ao, "correction")
- col = split.column()
- col.itemR(ao, "falloff")
- colsub = col.column()
- colsub.active = ao.falloff
- colsub.itemR(ao, "strength")
- col.itemR(ao, "pixel_cache")
-
- col = layout.column()
- col.row().itemR(ao, "blend_mode", expand=True)
- col.row().itemR(ao, "color", expand=True)
- col.itemR(ao, "energy")
+ col = layout.column(align=True)
+ col.itemL(text="Influence:")
+ row = col.row()
+ row.itemR(ao, "blend_mode", text="")
+ row.itemR(ao, "color", text="")
+ row.itemR(ao, "energy", text="")
bpy.types.register(WORLD_PT_context_world)
bpy.types.register(WORLD_PT_preview)
@@ -182,4 +169,4 @@ bpy.types.register(WORLD_PT_world)
bpy.types.register(WORLD_PT_ambient_occlusion)
bpy.types.register(WORLD_PT_mist)
bpy.types.register(WORLD_PT_stars)
-bpy.types.register(WORLD_PT_color_correction)
+
diff --git a/release/ui/space_info.py b/release/ui/space_info.py
index 96494ccdb14..5f6d87c9a29 100644
--- a/release/ui/space_info.py
+++ b/release/ui/space_info.py
@@ -16,13 +16,18 @@ class INFO_HT_header(bpy.types.Header):
row = layout.row()
row.itemM("INFO_MT_file")
row.itemM("INFO_MT_add")
- row.itemM("INFO_MT_game")
- row.itemM("INFO_MT_render")
+ if rd.use_game_engine:
+ row.itemM("INFO_MT_game")
+ else:
+ row.itemM("INFO_MT_render")
row.itemM("INFO_MT_help")
layout.template_ID(context.window, "screen") #, new="screen.new", open="scene.unlink")
layout.template_ID(context.screen, "scene") #, new="screen.new", unlink="scene.unlink")
+ if rd.multiple_engines:
+ layout.itemR(rd, "engine", text="")
+
layout.itemS()
layout.template_operator_search()
diff --git a/release/ui/space_logic.py b/release/ui/space_logic.py
index b19351bf779..728e5e6307b 100644
--- a/release/ui/space_logic.py
+++ b/release/ui/space_logic.py
@@ -21,142 +21,5 @@ class LOGIC_PT_properties(bpy.types.Panel):
flow.itemR(prop, "value", text="") # we dont care about the type. rna will display correctly
flow.itemR(prop, "debug")
-"""
-class WORLD_PT_game(WorldButtonsPanel):
- __space_type__ = "LOGIC_EDITOR"
- __region_type__ = "UI"
- __label__ = "Game Settings"
-
- def draw(self, context):
- layout = self.layout
- world = context.world
-
- flow = layout.column_flow()
- flow.itemR(world, "physics_engine")
- flow.itemR(world, "physics_gravity")
-
- flow.itemR(world, "game_fps")
- flow.itemR(world, "game_logic_step_max")
- flow.itemR(world, "game_physics_substep")
- flow.itemR(world, "game_physics_step_max")
-
- flow.itemR(world, "game_use_occlusion_culling", text="Enable Occlusion Culling")
- flow.itemR(world, "game_occlusion_culling_resolution")
-"""
-class LOGIC_PT_player(bpy.types.Panel):
- __space_type__ = "LOGIC_EDITOR"
- __region_type__ = "UI"
- __label__ = "Player"
-
- def draw(self, context):
- layout = self.layout
- gs = context.scene.game_data
- row = layout.row()
- row.itemR(gs, "fullscreen")
-
- split = layout.split()
- col = split.column()
- col.itemL(text="Resolution:")
- colsub = col.column(align=True)
- colsub.itemR(gs, "resolution_x", slider=False, text="X")
- colsub.itemR(gs, "resolution_y", slider=False, text="Y")
-
- col = split.column()
- col.itemL(text="Quality:")
- colsub = col.column(align=True)
- colsub.itemR(gs, "depth", text="Bit Depth", slider=False)
- colsub.itemR(gs, "frequency", text="FPS", slider=False)
-
-
- # framing:
- col = layout.column()
- col.itemL(text="Framing:")
- col.row().itemR(gs, "framing_type", expand=True)
-
- colsub = col.column()
- colsub.itemR(gs, "framing_color", text="")
-
-class LOGIC_PT_stereo(bpy.types.Panel):
- __space_type__ = "LOGIC_EDITOR"
- __region_type__ = "UI"
- __label__ = "Stereo"
-
- def draw(self, context):
- layout = self.layout
- gs = context.scene.game_data
-
-
- # stereo options:
- col= layout.column()
- row = col.row()
- row.itemR(gs, "stereo", expand=True)
-
- stereo_mode = gs.stereo
-
-
- # stereo:
- if stereo_mode == 'STEREO':
-
- row = layout.row()
- row.itemR(gs, "stereo_mode")
-
- # dome:
- if stereo_mode == 'DOME':
- row = layout.row()
- row.itemR(gs, "dome_mode", text="Dome Type")
-
- split=layout.split()
- col=split.column()
- col.itemR(gs, "dome_angle", slider=True)
- col.itemR(gs, "dome_tesselation", text="Tesselation")
- col=split.column()
- col.itemR(gs, "dome_tilt")
- col.itemR(gs, "dome_buffer_resolution", text="Resolution", slider=True)
- col=layout.column()
- col.itemR(gs, "dome_text")
-
-
-class LOGIC_PT_physics(bpy.types.Panel):
- __space_type__ = "LOGIC_EDITOR"
- __region_type__ = "UI"
- __label__ = "World Physics"
-
- def draw(self, context):
- layout = self.layout
- gs = context.scene.game_data
- flow = layout.column_flow()
- flow.itemR(gs, "physics_engine")
- if gs.physics_engine != "NONE":
- flow.itemR(gs, "physics_gravity", text="Gravity")
-
- split = layout.split()
- col = split.column()
- col.itemL(text="Physics Steps:")
- colsub = col.column(align=True)
- colsub.itemR(gs, "physics_step_max", text="Max")
- colsub.itemR(gs, "physics_step_sub", text="Substeps")
- col.itemR(gs, "fps", text="FPS")
-
- col = split.column()
- col.itemL(text="Logic Steps:")
- col.itemR(gs, "logic_step_max", text="Max")
- col.itemS()
- col.itemR(gs, "use_occlusion_culling", text="Occlusion Culling")
- colsub = col.column()
- colsub.active = gs.use_occlusion_culling
- colsub.itemR(gs, "occlusion_culling_resolution", text="Resolution")
-
-
- else:
- split = layout.split()
- col = split.column()
- col.itemL(text="Physics Steps:")
- col.itemR(gs, "fps", text="FPS")
- col = split.column()
- col.itemL(text="Logic Steps:")
- col.itemR(gs, "logic_step_max", text="Max")
-
bpy.types.register(LOGIC_PT_properties)
-bpy.types.register(LOGIC_PT_player)
-bpy.types.register(LOGIC_PT_stereo)
-bpy.types.register(LOGIC_PT_physics) \ No newline at end of file
+
diff --git a/source/blender/editors/screen/screen_ops.c b/source/blender/editors/screen/screen_ops.c
index 3032bff18df..dc46940a733 100644
--- a/source/blender/editors/screen/screen_ops.c
+++ b/source/blender/editors/screen/screen_ops.c
@@ -2437,7 +2437,7 @@ static int screen_render_exec(bContext *C, wmOperator *op)
}
RE_test_break_cb(re, NULL, (int (*)(void *)) blender_test_break);
- if(RNA_boolean_get(op->ptr, "anim"))
+ if(RNA_boolean_get(op->ptr, "animation"))
RE_BlenderAnim(re, scene, scene->r.sfra, scene->r.efra, scene->frame_step);
else
RE_BlenderFrame(re, scene, scene->r.cfra);
@@ -2716,7 +2716,7 @@ static int screen_render_invoke(bContext *C, wmOperator *op, wmEvent *event)
rj= MEM_callocN(sizeof(RenderJob), "render job");
rj->scene= scene;
rj->win= CTX_wm_window(C);
- rj->anim= RNA_boolean_get(op->ptr, "anim");
+ rj->anim= RNA_boolean_get(op->ptr, "animation");
rj->iuser.scene= scene;
rj->iuser.ok= 1;
@@ -2772,7 +2772,7 @@ void SCREEN_OT_render(wmOperatorType *ot)
ot->poll= ED_operator_screenactive;
RNA_def_int(ot->srna, "layers", 0, 0, INT_MAX, "Layers", "", 0, INT_MAX);
- RNA_def_boolean(ot->srna, "anim", 0, "Animation", "");
+ RNA_def_boolean(ot->srna, "animation", 0, "Animation", "");
}
/* *********************** cancel render viewer *************** */
@@ -2977,6 +2977,7 @@ void ED_keymap_screen(wmWindowManager *wm)
/* render */
WM_keymap_add_item(keymap, "SCREEN_OT_render", F12KEY, KM_PRESS, 0, 0);
+ RNA_boolean_set(WM_keymap_add_item(keymap, "SCREEN_OT_render", F12KEY, KM_PRESS, KM_CTRL, 0)->ptr, "animation", 1);
WM_keymap_add_item(keymap, "SCREEN_OT_render_view_cancel", ESCKEY, KM_PRESS, 0, 0);
WM_keymap_add_item(keymap, "SCREEN_OT_render_view_show", F11KEY, KM_PRESS, 0, 0);
diff --git a/source/blender/editors/space_buttons/buttons_context.c b/source/blender/editors/space_buttons/buttons_context.c
index 9048565b01f..1ebab105086 100644
--- a/source/blender/editors/space_buttons/buttons_context.c
+++ b/source/blender/editors/space_buttons/buttons_context.c
@@ -360,32 +360,7 @@ static int buttons_context_path_texture(ButsContextPath *path)
return 0;
}
-static int buttons_context_path_game(ButsContextPath *path)
-{
- /* XXX temporary context. Using material slot instead of ob->game_data */
- Object *ob;
- PointerRNA *ptr= &path->ptr[path->len-1];
- Material *ma;
-
- /* if we already have a (pinned) material, we're done */
- if(RNA_struct_is_a(ptr->type, &RNA_Material)) {
- return 1;
- }
- /* if we have an object, use the object material slot */
- else if(buttons_context_path_object(path)) {
- ob= path->ptr[path->len-1].data;
- if(ob && ob->type && (ob->type<OB_LAMP)) {
- ma= give_current_material(ob, ob->actcol);
- RNA_id_pointer_create(&ma->id, &path->ptr[path->len]);
- path->len++;
- return 1;
- }
- }
-
- /* no path to a material possible */
- return 0;
-}
static int buttons_context_path(const bContext *C, ButsContextPath *path, int mainb, int worldtex)
{
SpaceButs *sbuts= (SpaceButs*)CTX_wm_space_data(C);
@@ -430,9 +405,6 @@ static int buttons_context_path(const bContext *C, ButsContextPath *path, int ma
case BCONTEXT_DATA:
found= buttons_context_path_data(path, -1);
break;
- case BCONTEXT_GAME:
- found= buttons_context_path_game(path);
- break;
case BCONTEXT_PARTICLE:
found= buttons_context_path_particle(path);
break;
@@ -526,7 +498,7 @@ int buttons_context(const bContext *C, const char *member, bContextDataResult *r
if(CTX_data_dir(member)) {
static const char *dir[] = {
"world", "object", "mesh", "armature", "lattice", "curve",
- "meta_ball", "lamp", "camera", "material", "material_slot", "game",
+ "meta_ball", "lamp", "camera", "material", "material_slot",
"texture", "texture_slot", "bone", "edit_bone", "particle_system",
"cloth", "soft_body", "fluid", "collision", NULL};
diff --git a/source/blender/editors/space_buttons/buttons_header.c b/source/blender/editors/space_buttons/buttons_header.c
index 0fb00b2780b..0f6ef6fe570 100644
--- a/source/blender/editors/space_buttons/buttons_header.c
+++ b/source/blender/editors/space_buttons/buttons_header.c
@@ -124,8 +124,6 @@ void buttons_header_buttons(const bContext *C, ARegion *ar)
uiDefIconButS(block, ROW, B_CONTEXT_SWITCH, ICON_PARTICLES, xco+=BUTS_UI_UNIT, yco, BUTS_UI_UNIT, BUTS_UI_UNIT, &(sbuts->mainb), 0.0, (float)BCONTEXT_PARTICLE, 0, 0, "Particles");
if(sbuts->pathflag & (1<<BCONTEXT_PHYSICS))
uiDefIconButS(block, ROW, B_CONTEXT_SWITCH, ICON_PHYSICS, xco+=BUTS_UI_UNIT, yco, BUTS_UI_UNIT, BUTS_UI_UNIT, &(sbuts->mainb), 0.0, (float)BCONTEXT_PHYSICS, 0, 0, "Physics");
- if(sbuts->pathflag & (1<<BCONTEXT_GAME))
- uiDefIconButS(block, ROW, B_CONTEXT_SWITCH, ICON_GAME, xco+=BUTS_UI_UNIT, yco, BUTS_UI_UNIT, BUTS_UI_UNIT, &(sbuts->mainb), 0.0, (float)BCONTEXT_GAME, 0, 0, "Game");
xco+= BUTS_UI_UNIT;
uiBlockEndAlign(block);
diff --git a/source/blender/editors/space_buttons/space_buttons.c b/source/blender/editors/space_buttons/space_buttons.c
index 05d181ba330..8284744d519 100644
--- a/source/blender/editors/space_buttons/space_buttons.c
+++ b/source/blender/editors/space_buttons/space_buttons.c
@@ -177,8 +177,6 @@ static void buttons_main_area_draw(const bContext *C, ARegion *ar)
ED_region_panels(C, ar, vertical, "modifier");
else if (sbuts->mainb == BCONTEXT_CONSTRAINT)
ED_region_panels(C, ar, vertical, "constraint");
- else if (sbuts->mainb == BCONTEXT_GAME)
- ED_region_panels(C, ar, vertical, "game");
sbuts->re_align= 0;
sbuts->mainbo= sbuts->mainb;
diff --git a/source/blender/makesdna/DNA_space_types.h b/source/blender/makesdna/DNA_space_types.h
index 61931085707..34a5efbdf5f 100644
--- a/source/blender/makesdna/DNA_space_types.h
+++ b/source/blender/makesdna/DNA_space_types.h
@@ -580,7 +580,6 @@ typedef struct SpaceConsole {
#define BCONTEXT_TEXTURE 5
#define BCONTEXT_PARTICLE 6
#define BCONTEXT_PHYSICS 7
-#define BCONTEXT_GAME 8
#define BCONTEXT_BONE 9
#define BCONTEXT_MODIFIER 10
#define BCONTEXT_CONSTRAINT 12
diff --git a/source/blender/makesrna/SConscript b/source/blender/makesrna/SConscript
index 3b47eeca59d..80abd4fda61 100644
--- a/source/blender/makesrna/SConscript
+++ b/source/blender/makesrna/SConscript
@@ -34,4 +34,7 @@ if env['WITH_BF_QUICKTIME']:
if env['WITH_BF_LCMS']:
defs.append('WITH_LCMS')
+if env['WITH_BF_GAMEENGINE']:
+ defs.append('GAMEBLENDER=1')
+
env.BlenderLib ( 'bf_rna', objs, Split(incs), defines=defs, libtype=['core'], priority = [195] )
diff --git a/source/blender/makesrna/intern/SConscript b/source/blender/makesrna/intern/SConscript
index a4f184a3f67..6c8038bd509 100644
--- a/source/blender/makesrna/intern/SConscript
+++ b/source/blender/makesrna/intern/SConscript
@@ -56,6 +56,9 @@ if env['WITH_BF_QUICKTIME']:
if env['WITH_BF_LCMS']:
defs.append('WITH_LCMS')
+if env['WITH_BF_GAMEENGINE']:
+ defs.append('GAMEBLENDER=1')
+
makesrna_tool.Append(CPPDEFINES=defs)
makesrna_tool.Append (CPPPATH = Split(incs))
diff --git a/source/blender/makesrna/intern/rna_render.c b/source/blender/makesrna/intern/rna_render.c
index 774eecba0f1..89c48230357 100644
--- a/source/blender/makesrna/intern/rna_render.c
+++ b/source/blender/makesrna/intern/rna_render.c
@@ -48,6 +48,41 @@
/* RenderEngine */
+static RenderEngineType internal_render_type = {
+ NULL, NULL, "BLENDER_RENDER", "Blender Render", RE_INTERNAL, NULL, {NULL, NULL, NULL, NULL}};
+#if GAMEBLENDER == 1
+static RenderEngineType internal_game_type = {
+ NULL, NULL, "BLENDER_GAME", "Blender Game", RE_INTERNAL|RE_GAME, NULL, {NULL, NULL, NULL, NULL}};
+#endif
+
+ListBase R_engines = {NULL, NULL};
+
+void RE_engines_init()
+{
+ BLI_addtail(&R_engines, &internal_render_type);
+#if GAMEBLENDER == 1
+ BLI_addtail(&R_engines, &internal_game_type);
+#endif
+}
+
+void RE_engines_exit()
+{
+ RenderEngineType *type, *next;
+
+ for(type=R_engines.first; type; type=next) {
+ next= type->next;
+
+ BLI_remlink(&R_engines, type);
+
+ if(!(type->flag & RE_INTERNAL)) {
+ if(type->ext.free)
+ type->ext.free(type->ext.data);
+
+ MEM_freeN(type);
+ }
+ }
+}
+
static void engine_render(RenderEngine *engine, struct Scene *scene)
{
PointerRNA ptr;
diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c
index bd23fc9e1f6..aa4c410bc73 100644
--- a/source/blender/makesrna/intern/rna_scene.c
+++ b/source/blender/makesrna/intern/rna_scene.c
@@ -232,6 +232,18 @@ static int rna_SceneRenderData_multiple_engines_get(PointerRNA *ptr)
return (BLI_countlist(&R_engines) > 1);
}
+static int rna_SceneRenderData_use_game_engine_get(PointerRNA *ptr)
+{
+ RenderData *rd= (RenderData*)ptr->data;
+ RenderEngineType *type;
+
+ for(type=R_engines.first; type; type=type->next)
+ if(strcmp(type->idname, rd->engine) == 0)
+ return (type->flag & RE_GAME);
+
+ return 0;
+}
+
static void rna_SceneRenderLayer_layer_set(PointerRNA *ptr, const int *values)
{
SceneRenderLayer *rl= (SceneRenderLayer*)ptr->data;
@@ -1579,11 +1591,17 @@ static void rna_def_scene_render_data(BlenderRNA *brna)
RNA_def_property_enum_items(prop, engine_items);
RNA_def_property_enum_funcs(prop, "rna_SceneRenderData_engine_get", "rna_SceneRenderData_engine_set", "rna_SceneRenderData_engine_itemf");
RNA_def_property_ui_text(prop, "Engine", "Engine to use for rendering.");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "multiple_engines", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_funcs(prop, "rna_SceneRenderData_multiple_engines_get", NULL);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
- RNA_def_property_ui_text(prop, "Multiple Engine", "More than one rendering engine is available.");
+ RNA_def_property_ui_text(prop, "Multiple Engines", "More than one rendering engine is available.");
+
+ prop= RNA_def_property(srna, "use_game_engine", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_funcs(prop, "rna_SceneRenderData_use_game_engine_get", NULL);
+ RNA_def_property_clear_flag(prop, PROP_EDITABLE);
+ RNA_def_property_ui_text(prop, "Use Game Engine", "Current rendering engine is a game engine.");
}
void RNA_def_scene(BlenderRNA *brna)
diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c
index 461c46e09bf..2231a59e770 100644
--- a/source/blender/makesrna/intern/rna_space.c
+++ b/source/blender/makesrna/intern/rna_space.c
@@ -239,6 +239,20 @@ StructRNA *rna_SpaceButtonsWindow_pin_id_typef(PointerRNA *ptr)
return &RNA_ID;
}
+void rna_SpaceButtonsWindow_align_set(PointerRNA *ptr, int value)
+{
+ SpaceButs *sbuts= (SpaceButs*)(ptr->data);
+ bScreen *sc= (bScreen*)(ptr->id.data);
+ ScrArea *sa;
+
+ sbuts->align= value;
+ sbuts->re_align= 1;
+
+ for(sa=sc->areabase.first; sa; sa=sa->next)
+ if(BLI_findindex(&sa->spacedata, sbuts) != -1)
+ ED_area_tag_redraw(sa);
+}
+
/* Space Console */
static void rna_ConsoleLine_line_get(PointerRNA *ptr, char *value)
{
@@ -658,12 +672,11 @@ static void rna_def_space_buttons(BlenderRNA *brna)
{BCONTEXT_TEXTURE, "TEXTURE", ICON_TEXTURE, "Texture", "Texture"},
{BCONTEXT_PARTICLE, "PARTICLE", ICON_PARTICLES, "Particle", "Particle"},
{BCONTEXT_PHYSICS, "PHYSICS", ICON_PHYSICS, "Physics", "Physics"},
- {BCONTEXT_GAME, "GAME", ICON_GAME, "Game", "Game"},
{0, NULL, 0, NULL, NULL}};
- static EnumPropertyItem panel_alignment_items[] = {
- {1, "HORIZONTAL", 0, "Horizontal", ""},
- {2, "VERTICAL", 0, "Vertical", ""},
+ static EnumPropertyItem align_items[] = {
+ {BUT_HORIZONTAL, "HORIZONTAL", 0, "Horizontal", ""},
+ {BUT_VERTICAL, "VERTICAL", 0, "Vertical", ""},
{0, NULL, 0, NULL, NULL}};
srna= RNA_def_struct(brna, "SpaceButtonsWindow", "Space");
@@ -676,10 +689,11 @@ static void rna_def_space_buttons(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Buttons Context", "The type of active data to display and edit in the buttons window");
RNA_def_property_update(prop, NC_WINDOW, NULL);
- prop= RNA_def_property(srna, "panel_alignment", PROP_ENUM, PROP_NONE);
+ prop= RNA_def_property(srna, "align", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "align");
- RNA_def_property_enum_items(prop, panel_alignment_items);
- RNA_def_property_ui_text(prop, "Panel Alignment", "Arrangement of the panels within the buttons window");
+ RNA_def_property_enum_items(prop, align_items);
+ RNA_def_property_enum_funcs(prop, NULL, "rna_SpaceButtonsWindow_align_set", NULL);
+ RNA_def_property_ui_text(prop, "Align", "Arrangement of the panels within the buttons window");
RNA_def_property_update(prop, NC_WINDOW, NULL);
/* pinned data */
diff --git a/source/blender/makesrna/intern/rna_world.c b/source/blender/makesrna/intern/rna_world.c
index c41c0a0fcef..8beaa855201 100644
--- a/source/blender/makesrna/intern/rna_world.c
+++ b/source/blender/makesrna/intern/rna_world.c
@@ -218,7 +218,7 @@ static void rna_def_ambient_occlusion(BlenderRNA *brna)
RNA_def_property_float_sdna(prop, NULL, "aodist");
RNA_def_property_ui_text(prop, "Distance", "Length of rays, defines how far away other faces give occlusion effect.");
- prop= RNA_def_property(srna, "strength", PROP_FLOAT, PROP_NONE);
+ prop= RNA_def_property(srna, "falloff_strength", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "aodistfac");
RNA_def_property_ui_text(prop, "Strength", "Distance attenuation factor, the higher, the 'shorter' the shadows.");
diff --git a/source/blender/render/extern/include/RE_pipeline.h b/source/blender/render/extern/include/RE_pipeline.h
index 643a381c54f..d96054f5a76 100644
--- a/source/blender/render/extern/include/RE_pipeline.h
+++ b/source/blender/render/extern/include/RE_pipeline.h
@@ -240,6 +240,8 @@ struct Scene *RE_GetScene(struct Render *re);
/* External Engine */
+#define RE_INTERNAL 1
+#define RE_GAME 2
extern ListBase R_engines;
@@ -249,6 +251,7 @@ typedef struct RenderEngineType {
/* type info */
char idname[32];
char name[32];
+ int flag;
void (*render)(struct RenderEngine *engine, struct Scene *scene);
@@ -269,7 +272,8 @@ void RE_engine_end_result(RenderEngine *engine, struct RenderResult *result);
int RE_engine_test_break(RenderEngine *engine);
void RE_engine_update_stats(RenderEngine *engine, char *stats, char *info);
-void RE_engines_free(void);
+void RE_engines_init(void);
+void RE_engines_exit(void);
#endif /* RE_PIPELINE_H */
diff --git a/source/blender/render/intern/source/pipeline.c b/source/blender/render/intern/source/pipeline.c
index 801a9729277..3e50ea92846 100644
--- a/source/blender/render/intern/source/pipeline.c
+++ b/source/blender/render/intern/source/pipeline.c
@@ -2783,12 +2783,6 @@ void RE_init_threadcount(Render *re)
/************************** External Engines ***************************/
-static RenderEngineType internal_engine_type = {
- NULL, NULL, "BlenderRenderEngine", "Blender", NULL,
- NULL, NULL, NULL, NULL};
-
-ListBase R_engines = {&internal_engine_type, &internal_engine_type};
-
RenderResult *RE_engine_begin_result(RenderEngine *engine, int x, int y, int w, int h)
{
Render *re= engine->re;
@@ -2924,19 +2918,3 @@ static void external_render_3d(Render *re, RenderEngineType *type)
}
}
-void RE_engines_free()
-{
- RenderEngineType *type, *next;
-
- for(type=R_engines.first; type; type=next) {
- next= type->next;
-
- if(type != &internal_engine_type) {
- if(type->ext.free)
- type->ext.free(type->ext.data);
-
- MEM_freeN(type);
- }
- }
-}
-
diff --git a/source/blender/windowmanager/intern/wm_init_exit.c b/source/blender/windowmanager/intern/wm_init_exit.c
index 3d8efc018c4..fd102b663d0 100644
--- a/source/blender/windowmanager/intern/wm_init_exit.c
+++ b/source/blender/windowmanager/intern/wm_init_exit.c
@@ -239,7 +239,7 @@ void WM_exit(bContext *C)
BLF_exit();
RE_FreeAllRender();
- RE_engines_free();
+ RE_engines_exit();
// free_txt_data();
diff --git a/source/creator/creator.c b/source/creator/creator.c
index a3e5ca16a13..9034833563b 100644
--- a/source/creator/creator.c
+++ b/source/creator/creator.c
@@ -313,6 +313,7 @@ int main(int argc, char **argv)
BLI_where_am_i(bprogname, argv[0]);
RNA_init();
+ RE_engines_init();
/* Hack - force inclusion of the plugin api functions,
* see blenpluginapi:pluginapi.c