scene.render_data -> scene.render
bpy.types.SceneRenderData -> bpy.types.RenderSettings better do these changes before there are too many scripts out.
This commit is contained in:
@@ -29,7 +29,7 @@ class PhysicsButtonsPanel(bpy.types.Panel):
|
||||
|
||||
def poll(self, context):
|
||||
ob = context.active_object
|
||||
rd = context.scene.render_data
|
||||
rd = context.scene.render
|
||||
return ob and ob.game and (rd.engine == 'BLENDER_GAME')
|
||||
|
||||
|
||||
@@ -166,7 +166,7 @@ class PHYSICS_PT_game_collision_bounds(PhysicsButtonsPanel):
|
||||
|
||||
def poll(self, context):
|
||||
game = context.object.game
|
||||
rd = context.scene.render_data
|
||||
rd = context.scene.render
|
||||
return (game.physics_type in ('DYNAMIC', 'RIGID_BODY', 'SENSOR', 'SOFT_BODY', 'STATIC')) and (rd.engine == 'BLENDER_GAME')
|
||||
|
||||
def draw_header(self, context):
|
||||
@@ -202,7 +202,7 @@ class RenderButtonsPanel(bpy.types.Panel):
|
||||
bl_context = "render"
|
||||
|
||||
def poll(self, context):
|
||||
rd = context.scene.render_data
|
||||
rd = context.scene.render
|
||||
return (rd.engine == 'BLENDER_GAME')
|
||||
|
||||
|
||||
@@ -390,7 +390,7 @@ class WorldButtonsPanel(bpy.types.Panel):
|
||||
|
||||
def poll(self, context):
|
||||
scene = context.scene
|
||||
return (scene.render_data.engine == 'BLENDER_GAME') and (scene.world is not None)
|
||||
return (scene.render.engine == 'BLENDER_GAME') and (scene.world is not None)
|
||||
|
||||
|
||||
class WORLD_PT_game_context_world(WorldButtonsPanel):
|
||||
@@ -398,7 +398,7 @@ class WORLD_PT_game_context_world(WorldButtonsPanel):
|
||||
bl_show_header = False
|
||||
|
||||
def poll(self, context):
|
||||
rd = context.scene.render_data
|
||||
rd = context.scene.render
|
||||
return (context.scene) and (rd.use_game_engine)
|
||||
|
||||
def draw(self, context):
|
||||
|
||||
@@ -62,7 +62,7 @@ class MaterialButtonsPanel(bpy.types.Panel):
|
||||
|
||||
def poll(self, context):
|
||||
mat = context.material
|
||||
engine = context.scene.render_data.engine
|
||||
engine = context.scene.render.engine
|
||||
return mat and (engine in self.COMPAT_ENGINES)
|
||||
|
||||
|
||||
@@ -83,7 +83,7 @@ class MATERIAL_PT_context_material(MaterialButtonsPanel):
|
||||
# An exception, dont call the parent poll func because
|
||||
# this manages materials for all engine types
|
||||
|
||||
engine = context.scene.render_data.engine
|
||||
engine = context.scene.render.engine
|
||||
return (context.material or context.object) and (engine in self.COMPAT_ENGINES)
|
||||
|
||||
def draw(self, context):
|
||||
@@ -149,7 +149,7 @@ class MATERIAL_PT_shading(MaterialButtonsPanel):
|
||||
|
||||
def poll(self, context):
|
||||
mat = active_node_mat(context.material)
|
||||
engine = context.scene.render_data.engine
|
||||
engine = context.scene.render.engine
|
||||
return mat and (mat.type in ('SURFACE', 'WIRE', 'HALO')) and (engine in self.COMPAT_ENGINES)
|
||||
|
||||
def draw(self, context):
|
||||
@@ -188,7 +188,7 @@ class MATERIAL_PT_strand(MaterialButtonsPanel):
|
||||
|
||||
def poll(self, context):
|
||||
mat = context.material
|
||||
engine = context.scene.render_data.engine
|
||||
engine = context.scene.render.engine
|
||||
return mat and (mat.type in ('SURFACE', 'WIRE', 'HALO')) and (engine in self.COMPAT_ENGINES)
|
||||
|
||||
def draw(self, context):
|
||||
@@ -260,7 +260,7 @@ class MATERIAL_PT_options(MaterialButtonsPanel):
|
||||
|
||||
def poll(self, context):
|
||||
mat = active_node_mat(context.material)
|
||||
engine = context.scene.render_data.engine
|
||||
engine = context.scene.render.engine
|
||||
return mat and (mat.type in ('SURFACE', 'WIRE', 'HALO')) and (engine in self.COMPAT_ENGINES)
|
||||
|
||||
def draw(self, context):
|
||||
@@ -306,7 +306,7 @@ class MATERIAL_PT_shadow(MaterialButtonsPanel):
|
||||
|
||||
def poll(self, context):
|
||||
mat = active_node_mat(context.material)
|
||||
engine = context.scene.render_data.engine
|
||||
engine = context.scene.render.engine
|
||||
return mat and (mat.type in ('SURFACE', 'WIRE')) and (engine in self.COMPAT_ENGINES)
|
||||
|
||||
def draw(self, context):
|
||||
@@ -343,7 +343,7 @@ class MATERIAL_PT_diffuse(MaterialButtonsPanel):
|
||||
|
||||
def poll(self, context):
|
||||
mat = active_node_mat(context.material)
|
||||
engine = context.scene.render_data.engine
|
||||
engine = context.scene.render.engine
|
||||
return mat and (mat.type in ('SURFACE', 'WIRE')) and (engine in self.COMPAT_ENGINES)
|
||||
|
||||
def draw(self, context):
|
||||
@@ -414,7 +414,7 @@ class MATERIAL_PT_specular(MaterialButtonsPanel):
|
||||
|
||||
def poll(self, context):
|
||||
mat = active_node_mat(context.material)
|
||||
engine = context.scene.render_data.engine
|
||||
engine = context.scene.render.engine
|
||||
return mat and (mat.type in ('SURFACE', 'WIRE')) and (engine in self.COMPAT_ENGINES)
|
||||
|
||||
def draw(self, context):
|
||||
@@ -484,7 +484,7 @@ class MATERIAL_PT_sss(MaterialButtonsPanel):
|
||||
|
||||
def poll(self, context):
|
||||
mat = active_node_mat(context.material)
|
||||
engine = context.scene.render_data.engine
|
||||
engine = context.scene.render.engine
|
||||
return mat and (mat.type in ('SURFACE', 'WIRE')) and (engine in self.COMPAT_ENGINES)
|
||||
|
||||
def draw_header(self, context):
|
||||
@@ -536,7 +536,7 @@ class MATERIAL_PT_mirror(MaterialButtonsPanel):
|
||||
|
||||
def poll(self, context):
|
||||
mat = active_node_mat(context.material)
|
||||
engine = context.scene.render_data.engine
|
||||
engine = context.scene.render.engine
|
||||
return mat and (mat.type in ('SURFACE', 'WIRE')) and (engine in self.COMPAT_ENGINES)
|
||||
|
||||
def draw_header(self, context):
|
||||
@@ -595,7 +595,7 @@ class MATERIAL_PT_transp(MaterialButtonsPanel):
|
||||
|
||||
def poll(self, context):
|
||||
mat = active_node_mat(context.material)
|
||||
engine = context.scene.render_data.engine
|
||||
engine = context.scene.render.engine
|
||||
return mat and (mat.type in ('SURFACE', 'WIRE')) and (engine in self.COMPAT_ENGINES)
|
||||
|
||||
def draw_header(self, context):
|
||||
@@ -662,7 +662,7 @@ class MATERIAL_PT_transp_game(MaterialButtonsPanel):
|
||||
|
||||
def poll(self, context):
|
||||
mat = active_node_mat(context.material)
|
||||
engine = context.scene.render_data.engine
|
||||
engine = context.scene.render.engine
|
||||
return mat and (engine in self.COMPAT_ENGINES)
|
||||
|
||||
def draw_header(self, context):
|
||||
@@ -696,7 +696,7 @@ class MATERIAL_PT_halo(MaterialButtonsPanel):
|
||||
|
||||
def poll(self, context):
|
||||
mat = context.material
|
||||
engine = context.scene.render_data.engine
|
||||
engine = context.scene.render.engine
|
||||
return mat and (mat.type == 'HALO') and (engine in self.COMPAT_ENGINES)
|
||||
|
||||
def draw(self, context):
|
||||
@@ -746,7 +746,7 @@ class MATERIAL_PT_flare(MaterialButtonsPanel):
|
||||
|
||||
def poll(self, context):
|
||||
mat = context.material
|
||||
engine = context.scene.render_data.engine
|
||||
engine = context.scene.render.engine
|
||||
return mat and (mat.type == 'HALO') and (engine in self.COMPAT_ENGINES)
|
||||
|
||||
def draw_header(self, context):
|
||||
@@ -782,7 +782,7 @@ class VolumeButtonsPanel(bpy.types.Panel):
|
||||
|
||||
def poll(self, context):
|
||||
mat = context.material
|
||||
engine = context.scene.render_data.engine
|
||||
engine = context.scene.render.engine
|
||||
return mat and (mat.type == 'VOLUME') and (engine in self.COMPAT_ENGINES)
|
||||
|
||||
|
||||
|
||||
@@ -47,7 +47,7 @@ class PhysicButtonsPanel(bpy.types.Panel):
|
||||
|
||||
def poll(self, context):
|
||||
ob = context.object
|
||||
rd = context.scene.render_data
|
||||
rd = context.scene.render
|
||||
return (ob and ob.type == 'MESH') and (not rd.use_game_engine)
|
||||
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@ class PhysicButtonsPanel(bpy.types.Panel):
|
||||
bl_context = "physics"
|
||||
|
||||
def poll(self, context):
|
||||
rd = context.scene.render_data
|
||||
rd = context.scene.render
|
||||
return (context.object) and (not rd.use_game_engine)
|
||||
|
||||
|
||||
@@ -174,7 +174,7 @@ class PHYSICS_PT_collision(PhysicButtonsPanel):
|
||||
|
||||
def poll(self, context):
|
||||
ob = context.object
|
||||
rd = context.scene.render_data
|
||||
rd = context.scene.render
|
||||
return (ob and ob.type == 'MESH') and (not rd.use_game_engine)
|
||||
|
||||
def draw(self, context):
|
||||
|
||||
@@ -29,7 +29,7 @@ class PhysicButtonsPanel(bpy.types.Panel):
|
||||
|
||||
def poll(self, context):
|
||||
ob = context.object
|
||||
rd = context.scene.render_data
|
||||
rd = context.scene.render
|
||||
return (ob and ob.type == 'MESH') and (not rd.use_game_engine)
|
||||
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@ class PhysicButtonsPanel(bpy.types.Panel):
|
||||
|
||||
def poll(self, context):
|
||||
ob = context.object
|
||||
rd = context.scene.render_data
|
||||
rd = context.scene.render
|
||||
return (ob and ob.type == 'MESH') and (not rd.use_game_engine)
|
||||
|
||||
|
||||
|
||||
@@ -37,7 +37,7 @@ class PhysicButtonsPanel(bpy.types.Panel):
|
||||
|
||||
def poll(self, context):
|
||||
ob = context.object
|
||||
rd = context.scene.render_data
|
||||
rd = context.scene.render
|
||||
return (ob and ob.type == 'MESH') and (not rd.use_game_engine)
|
||||
|
||||
|
||||
|
||||
@@ -36,7 +36,7 @@ class RenderButtonsPanel(bpy.types.Panel):
|
||||
# COMPAT_ENGINES must be defined in each subclass, external engines can add themselves here
|
||||
|
||||
def poll(self, context):
|
||||
rd = context.scene.render_data
|
||||
rd = context.scene.render
|
||||
return (context.scene and rd.use_game_engine is False) and (rd.engine in self.COMPAT_ENGINES)
|
||||
|
||||
|
||||
@@ -47,7 +47,7 @@ class RENDER_PT_render(RenderButtonsPanel):
|
||||
def draw(self, context):
|
||||
layout = self.layout
|
||||
|
||||
rd = context.scene.render_data
|
||||
rd = context.scene.render
|
||||
wide_ui = context.region.width > narrowui
|
||||
|
||||
split = layout.split()
|
||||
@@ -71,7 +71,7 @@ class RENDER_PT_layers(RenderButtonsPanel):
|
||||
layout = self.layout
|
||||
|
||||
scene = context.scene
|
||||
rd = scene.render_data
|
||||
rd = scene.render
|
||||
wide_ui = context.region.width > narrowui
|
||||
|
||||
row = layout.row()
|
||||
@@ -176,7 +176,7 @@ class RENDER_PT_shading(RenderButtonsPanel):
|
||||
def draw(self, context):
|
||||
layout = self.layout
|
||||
|
||||
rd = context.scene.render_data
|
||||
rd = context.scene.render
|
||||
wide_ui = context.region.width > narrowui
|
||||
|
||||
split = layout.split()
|
||||
@@ -202,7 +202,7 @@ class RENDER_PT_performance(RenderButtonsPanel):
|
||||
def draw(self, context):
|
||||
layout = self.layout
|
||||
|
||||
rd = context.scene.render_data
|
||||
rd = context.scene.render
|
||||
wide_ui = context.region.width > narrowui
|
||||
|
||||
split = layout.split()
|
||||
@@ -246,7 +246,7 @@ class RENDER_PT_post_processing(RenderButtonsPanel):
|
||||
def draw(self, context):
|
||||
layout = self.layout
|
||||
|
||||
rd = context.scene.render_data
|
||||
rd = context.scene.render
|
||||
wide_ui = context.region.width > narrowui
|
||||
|
||||
split = layout.split()
|
||||
@@ -289,7 +289,7 @@ class RENDER_PT_output(RenderButtonsPanel):
|
||||
def draw(self, context):
|
||||
layout = self.layout
|
||||
|
||||
rd = context.scene.render_data
|
||||
rd = context.scene.render
|
||||
wide_ui = context.region.width > narrowui
|
||||
|
||||
layout.prop(rd, "output_path", text="")
|
||||
@@ -355,7 +355,7 @@ class RENDER_PT_output(RenderButtonsPanel):
|
||||
|
||||
elif rd.file_format == 'QUICKTIME_CARBON':
|
||||
split = layout.split()
|
||||
split.operator("scene.render_data_set_quicktime_codec")
|
||||
split.operator("scene.render_set_quicktime_codec")
|
||||
|
||||
elif rd.file_format == 'QUICKTIME_QTKIT':
|
||||
split = layout.split()
|
||||
@@ -370,13 +370,13 @@ class RENDER_PT_encoding(RenderButtonsPanel):
|
||||
COMPAT_ENGINES = {'BLENDER_RENDER'}
|
||||
|
||||
def poll(self, context):
|
||||
rd = context.scene.render_data
|
||||
rd = context.scene.render
|
||||
return rd.file_format in ('FFMPEG', 'XVID', 'H264', 'THEORA')
|
||||
|
||||
def draw(self, context):
|
||||
layout = self.layout
|
||||
|
||||
rd = context.scene.render_data
|
||||
rd = context.scene.render
|
||||
wide_ui = context.region.width > narrowui
|
||||
|
||||
split = layout.split()
|
||||
@@ -439,14 +439,14 @@ class RENDER_PT_antialiasing(RenderButtonsPanel):
|
||||
COMPAT_ENGINES = {'BLENDER_RENDER'}
|
||||
|
||||
def draw_header(self, context):
|
||||
rd = context.scene.render_data
|
||||
rd = context.scene.render
|
||||
|
||||
self.layout.prop(rd, "antialiasing", text="")
|
||||
|
||||
def draw(self, context):
|
||||
layout = self.layout
|
||||
|
||||
rd = context.scene.render_data
|
||||
rd = context.scene.render
|
||||
wide_ui = context.region.width > narrowui
|
||||
layout.active = rd.antialiasing
|
||||
|
||||
@@ -470,14 +470,14 @@ class RENDER_PT_motion_blur(RenderButtonsPanel):
|
||||
COMPAT_ENGINES = {'BLENDER_RENDER'}
|
||||
|
||||
def draw_header(self, context):
|
||||
rd = context.scene.render_data
|
||||
rd = context.scene.render
|
||||
|
||||
self.layout.prop(rd, "motion_blur", text="")
|
||||
|
||||
def draw(self, context):
|
||||
layout = self.layout
|
||||
|
||||
rd = context.scene.render_data
|
||||
rd = context.scene.render
|
||||
layout.active = rd.motion_blur
|
||||
|
||||
row = layout.row()
|
||||
@@ -492,7 +492,7 @@ class RENDER_PT_dimensions(RenderButtonsPanel):
|
||||
layout = self.layout
|
||||
|
||||
scene = context.scene
|
||||
rd = scene.render_data
|
||||
rd = scene.render
|
||||
wide_ui = context.region.width > narrowui
|
||||
|
||||
row = layout.row().split()
|
||||
@@ -538,14 +538,14 @@ class RENDER_PT_stamp(RenderButtonsPanel):
|
||||
COMPAT_ENGINES = {'BLENDER_RENDER'}
|
||||
|
||||
def draw_header(self, context):
|
||||
rd = context.scene.render_data
|
||||
rd = context.scene.render
|
||||
|
||||
self.layout.prop(rd, "render_stamp", text="")
|
||||
|
||||
def draw(self, context):
|
||||
layout = self.layout
|
||||
|
||||
rd = context.scene.render_data
|
||||
rd = context.scene.render
|
||||
wide_ui = context.region.width > narrowui
|
||||
|
||||
layout.active = rd.render_stamp
|
||||
@@ -586,7 +586,7 @@ class RENDER_PT_bake(RenderButtonsPanel):
|
||||
def draw(self, context):
|
||||
layout = self.layout
|
||||
|
||||
rd = context.scene.render_data
|
||||
rd = context.scene.render
|
||||
wide_ui = context.region.width > narrowui
|
||||
|
||||
layout.operator("object.bake_image", icon='RENDER_STILL')
|
||||
|
||||
@@ -192,13 +192,13 @@ class SCENE_PT_simplify(SceneButtonsPanel):
|
||||
|
||||
def draw_header(self, context):
|
||||
scene = context.scene
|
||||
rd = scene.render_data
|
||||
rd = scene.render
|
||||
self.layout.prop(rd, "use_simplify", text="")
|
||||
|
||||
def draw(self, context):
|
||||
layout = self.layout
|
||||
scene = context.scene
|
||||
rd = scene.render_data
|
||||
rd = scene.render
|
||||
wide_ui = context.region.width > narrowui
|
||||
|
||||
layout.active = rd.use_simplify
|
||||
|
||||
@@ -30,7 +30,7 @@ class WorldButtonsPanel(bpy.types.Panel):
|
||||
# COMPAT_ENGINES must be defined in each subclass, external engines can add themselves here
|
||||
|
||||
def poll(self, context):
|
||||
rd = context.scene.render_data
|
||||
rd = context.scene.render
|
||||
return (context.world) and (not rd.use_game_engine) and (rd.engine in self.COMPAT_ENGINES)
|
||||
|
||||
|
||||
@@ -48,7 +48,7 @@ class WORLD_PT_context_world(WorldButtonsPanel):
|
||||
COMPAT_ENGINES = {'BLENDER_RENDER'}
|
||||
|
||||
def poll(self, context):
|
||||
rd = context.scene.render_data
|
||||
rd = context.scene.render
|
||||
return (not rd.use_game_engine) and (rd.engine in self.COMPAT_ENGINES)
|
||||
|
||||
def draw(self, context):
|
||||
|
||||
@@ -349,7 +349,7 @@ class IMAGE_PT_game_properties(bpy.types.Panel):
|
||||
bl_label = "Game Properties"
|
||||
|
||||
def poll(self, context):
|
||||
rd = context.scene.render_data
|
||||
rd = context.scene.render
|
||||
sima = context.space_data
|
||||
return (sima and sima.image) and (rd.engine == 'BLENDER_GAME')
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@ class INFO_HT_header(bpy.types.Header):
|
||||
|
||||
window = context.window
|
||||
scene = context.scene
|
||||
rd = scene.render_data
|
||||
rd = scene.render
|
||||
|
||||
row = layout.row(align=True)
|
||||
row.template_header()
|
||||
@@ -263,7 +263,7 @@ class INFO_MT_render(bpy.types.Menu):
|
||||
def draw(self, context):
|
||||
layout = self.layout
|
||||
|
||||
# rd = context.scene.render_data
|
||||
# rd = context.scene.render
|
||||
|
||||
layout.operator("screen.render", text="Render Image", icon='RENDER_STILL')
|
||||
layout.operator("screen.render", text="Render Animation", icon='RENDER_ANIMATION').animation = True
|
||||
|
||||
@@ -60,10 +60,10 @@ class NODE_HT_header(bpy.types.Header):
|
||||
layout.prop(snode_id, "use_nodes")
|
||||
|
||||
elif snode.tree_type == 'COMPOSITING':
|
||||
snode_id = snode.id
|
||||
scene = snode.id
|
||||
|
||||
layout.prop(snode_id, "use_nodes")
|
||||
layout.prop(snode_id.render_data, "free_unused_nodes", text="Free Unused")
|
||||
layout.prop(scene, "use_nodes")
|
||||
layout.prop(scene.render, "free_unused_nodes", text="Free Unused")
|
||||
layout.prop(snode, "backdrop")
|
||||
|
||||
|
||||
|
||||
@@ -312,7 +312,7 @@ class SEQUENCER_PT_edit(SequencerButtonsPanel):
|
||||
|
||||
def draw(self, context):
|
||||
layout = self.layout
|
||||
render_data = context.scene.render_data
|
||||
render = context.scene.render
|
||||
strip = act_strip(context)
|
||||
|
||||
split = layout.split(percentage=0.3)
|
||||
@@ -348,7 +348,7 @@ class SEQUENCER_PT_edit(SequencerButtonsPanel):
|
||||
col.prop(strip, "start_frame")
|
||||
subrow = col.split(percentage=0.66)
|
||||
subrow.prop(strip, "length")
|
||||
subrow.label(text="%.2f sec" % (strip.length / (render_data.fps / render_data.fps_base)))
|
||||
subrow.label(text="%.2f sec" % (strip.length / (render.fps / render.fps_base)))
|
||||
|
||||
col = layout.column(align=True)
|
||||
col.label(text="Offset:")
|
||||
|
||||
Reference in New Issue
Block a user