diff options
Diffstat (limited to 'release')
-rw-r--r-- | release/scripts/startup/bl_operators/object.py | 85 | ||||
-rw-r--r-- | release/scripts/startup/bl_ui/properties_constraint.py | 38 | ||||
-rw-r--r-- | release/scripts/startup/bl_ui/properties_game.py | 27 | ||||
-rw-r--r-- | release/scripts/startup/bl_ui/properties_render.py | 3 | ||||
-rw-r--r-- | release/scripts/startup/bl_ui/space_dopesheet.py | 1 | ||||
-rw-r--r-- | release/scripts/startup/bl_ui/space_nla.py | 1 | ||||
-rw-r--r-- | release/scripts/startup/bl_ui/space_view3d.py | 14 | ||||
-rw-r--r-- | release/scripts/startup/bl_ui/space_view3d_toolbar.py | 14 |
8 files changed, 153 insertions, 30 deletions
diff --git a/release/scripts/startup/bl_operators/object.py b/release/scripts/startup/bl_operators/object.py index b89890a223c..6356da216b1 100644 --- a/release/scripts/startup/bl_operators/object.py +++ b/release/scripts/startup/bl_operators/object.py @@ -685,6 +685,91 @@ class ClearAllRestrictRender(Operator): return {'FINISHED'} +class TransformsToDeltas(Operator): + """Convert normal object transforms to delta transforms, """ \ + """any existing delta transforms will be included as well""" + bl_idname = "object.transforms_to_deltas" + bl_label = "Transforms to Deltas" + bl_options = {'REGISTER', 'UNDO'} + + mode = EnumProperty( + items=(('ALL', + "All Transforms", + "Transfer location, rotation, and scale transforms", + ), + ('LOC', + "Location", + "Transfer location transforms only", + ), + ('ROT', + "Rotation", + "Transfer rotation transforms only", + ), + ('SCALE', + "Scale", + "Transfer scale transforms only", + ), + ), + name="Mode", + description="Which transforms to transfer", + default='ALL', + ) + reset_values = BoolProperty( + name="Reset Values", + description=("Clear transform values after transferring to deltas"), + default=True, + ) + + @classmethod + def poll(cls, context): + obs = context.selected_editable_objects + return (obs is not None) + + def execute(self, context): + for obj in context.selected_editable_objects: + if self.mode in {'ALL', 'LOC'}: + self.transfer_location(obj) + + if self.mode in {'ALL', 'ROT'}: + self.transfer_rotation(obj) + + if self.mode in {'ALL', 'SCALE'}: + self.transfer_scale(obj) + + return {'FINISHED'} + + def transfer_location(self, obj): + obj.delta_location += obj.location + + if self.reset_values: + obj.location.zero() + + def transfer_rotation(self, obj): + # TODO: add transforms together... + if obj.rotation_mode == 'QUATERNION': + obj.delta_rotation_quaternion += obj.rotation_quaternion + + if self.reset_values: + obj.rotation_quaternion.identity() + elif obj.rotation_mode == 'AXIS_ANGLE': + pass # Unsupported + else: + delta = obj.delta_rotation_euler.copy() + obj.delta_rotation_euler = obj.rotation_euler + obj.delta_rotation_euler.rotate(delta) + + if self.reset_values: + obj.rotation_euler.zero() + + def transfer_scale(self, obj): + obj.delta_scale[0] *= obj.scale[0] + obj.delta_scale[1] *= obj.scale[1] + obj.delta_scale[2] *= obj.scale[2] + + if self.reset_values: + obj.scale[:] = (1, 1, 1) + + class TransformsToDeltasAnim(Operator): """Convert object animation for normal transforms to delta transforms""" bl_idname = "object.anim_transforms_to_deltas" diff --git a/release/scripts/startup/bl_ui/properties_constraint.py b/release/scripts/startup/bl_ui/properties_constraint.py index 2a98303d00e..4ca2f773dcc 100644 --- a/release/scripts/startup/bl_ui/properties_constraint.py +++ b/release/scripts/startup/bl_ui/properties_constraint.py @@ -96,25 +96,25 @@ class ConstraintButtonsPanel: def CHILD_OF(self, context, layout, con): self.target_template(layout, con) - #split = layout.split() - - #col = split.column() - #col.label(text="Location:") - #col.prop(con, "use_location_x", text="X") - #col.prop(con, "use_location_y", text="Y") - #col.prop(con, "use_location_z", text="Z") - - #col = split.column() - #col.label(text="Rotation:") - #col.prop(con, "use_rotation_x", text="X") - #col.prop(con, "use_rotation_y", text="Y") - #col.prop(con, "use_rotation_z", text="Z") - - #col = split.column() - #col.label(text="Scale:") - #col.prop(con, "use_scale_x", text="X") - #col.prop(con, "use_scale_y", text="Y") - #col.prop(con, "use_scale_z", text="Z") + split = layout.split() + + col = split.column() + col.label(text="Location:") + col.prop(con, "use_location_x", text="X") + col.prop(con, "use_location_y", text="Y") + col.prop(con, "use_location_z", text="Z") + + col = split.column() + col.label(text="Rotation:") + col.prop(con, "use_rotation_x", text="X") + col.prop(con, "use_rotation_y", text="Y") + col.prop(con, "use_rotation_z", text="Z") + + col = split.column() + col.label(text="Scale:") + col.prop(con, "use_scale_x", text="X") + col.prop(con, "use_scale_y", text="Y") + col.prop(con, "use_scale_z", text="Z") row = layout.row() row.operator("constraint.childof_set_inverse") diff --git a/release/scripts/startup/bl_ui/properties_game.py b/release/scripts/startup/bl_ui/properties_game.py index 8baad4ea0f2..300be708049 100644 --- a/release/scripts/startup/bl_ui/properties_game.py +++ b/release/scripts/startup/bl_ui/properties_game.py @@ -404,6 +404,7 @@ class RENDER_PT_game_shading(RenderButtonsPanel, Panel): 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") @@ -599,9 +600,35 @@ class WORLD_PT_game_world(WorldButtonsPanel, Panel): 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.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'} diff --git a/release/scripts/startup/bl_ui/properties_render.py b/release/scripts/startup/bl_ui/properties_render.py index 4ea1c3a5cc7..794ef5189d6 100644 --- a/release/scripts/startup/bl_ui/properties_render.py +++ b/release/scripts/startup/bl_ui/properties_render.py @@ -193,7 +193,6 @@ class RENDER_PT_antialiasing(RenderButtonsPanel, Panel): col = split.column() col.row().prop(rd, "antialiasing_samples", expand=True) sub = col.row() - sub.enabled = not rd.use_border sub.prop(rd, "use_full_sample") col = split.column() @@ -280,7 +279,7 @@ class RENDER_PT_performance(RenderButtonsPanel, Panel): col = split.column() col.label(text="Memory:") sub = col.column() - sub.enabled = not (rd.use_border or rd.use_full_sample) + sub.enabled = not rd.use_full_sample sub.prop(rd, "use_save_buffers") sub = col.column() sub.active = rd.use_compositing diff --git a/release/scripts/startup/bl_ui/space_dopesheet.py b/release/scripts/startup/bl_ui/space_dopesheet.py index e6f81656e45..6878d4dbb12 100644 --- a/release/scripts/startup/bl_ui/space_dopesheet.py +++ b/release/scripts/startup/bl_ui/space_dopesheet.py @@ -99,6 +99,7 @@ def dopesheet_filter(layout, context, genericFiltersOnly=False): if bpy.data.grease_pencil: row.prop(dopesheet, "show_gpencil", text="") + layout.prop(dopesheet, "use_datablock_sort", text="") ####################################### # DopeSheet Editor - General/Standard UI diff --git a/release/scripts/startup/bl_ui/space_nla.py b/release/scripts/startup/bl_ui/space_nla.py index f6f010e3760..8fbf9bfc6ac 100644 --- a/release/scripts/startup/bl_ui/space_nla.py +++ b/release/scripts/startup/bl_ui/space_nla.py @@ -77,6 +77,7 @@ class NLA_MT_view(Menu): layout.prop(st, "show_locked_time") layout.prop(st, "show_strip_curves") + layout.prop(st, "show_local_markers") layout.separator() layout.operator("anim.previewrange_set") diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py index 247c3e099a0..882c3e82001 100644 --- a/release/scripts/startup/bl_ui/space_view3d.py +++ b/release/scripts/startup/bl_ui/space_view3d.py @@ -293,10 +293,6 @@ class VIEW3D_MT_transform_object(VIEW3D_MT_transform_base): layout.operator("object.randomize_transform") layout.operator("object.align") - layout.separator() - - layout.operator("object.anim_transforms_to_deltas") - # Armature EditMode extensions to Transform menu class VIEW3D_MT_transform_armature(VIEW3D_MT_transform_base): @@ -1476,6 +1472,15 @@ class VIEW3D_MT_object_apply(Menu): props.location, props.rotation, props.scale = False, True, True layout.separator() + + layout.operator("object.transforms_to_deltas", text="Location to Deltas", text_ctxt=i18n_contexts.default).mode = 'LOC' + layout.operator("object.transforms_to_deltas", text="Rotation to Deltas", text_ctxt=i18n_contexts.default).mode = 'ROT' + layout.operator("object.transforms_to_deltas", text="Scale to Deltas", text_ctxt=i18n_contexts.default).mode = 'SCALE' + + layout.operator("object.transforms_to_deltas", text="All Transforms to Deltas", text_ctxt=i18n_contexts.default).mode = 'ALL' + layout.operator("object.anim_transforms_to_deltas") + + layout.separator() layout.operator("object.visual_transform_apply", text="Visual Transform", text_ctxt=i18n_contexts.default) layout.operator("object.duplicates_make_real") @@ -2476,6 +2481,7 @@ class VIEW3D_MT_edit_mesh_clean(Menu): layout.separator() + layout.operator("mesh.decimate") layout.operator("mesh.dissolve_degenerate") layout.operator("mesh.dissolve_limited") layout.operator("mesh.face_make_planar") diff --git a/release/scripts/startup/bl_ui/space_view3d_toolbar.py b/release/scripts/startup/bl_ui/space_view3d_toolbar.py index ce605fcdbbe..b2b4d4fa148 100644 --- a/release/scripts/startup/bl_ui/space_view3d_toolbar.py +++ b/release/scripts/startup/bl_ui/space_view3d_toolbar.py @@ -1507,6 +1507,15 @@ class VIEW3D_PT_sculpt_dyntopo(Panel, View3DPaintPanel): def poll(cls, context): return (context.sculpt_object and context.tool_settings.sculpt) + def draw_header(self, context): + layout = self.layout + layout.operator( + "sculpt.dynamic_topology_toggle", + icon='CHECKBOX_HLT' if context.sculpt_object.use_dynamic_topology_sculpting else 'CHECKBOX_DEHLT', + text="", + emboss=False, + ) + def draw(self, context): layout = self.layout @@ -1515,11 +1524,6 @@ class VIEW3D_PT_sculpt_dyntopo(Panel, View3DPaintPanel): settings = self.paint_settings(context) brush = settings.brush - if context.sculpt_object.use_dynamic_topology_sculpting: - layout.operator("sculpt.dynamic_topology_toggle", icon='X', text="Disable Dyntopo") - else: - layout.operator("sculpt.dynamic_topology_toggle", icon='SCULPT_DYNTOPO', text="Enable Dyntopo") - col = layout.column() col.active = context.sculpt_object.use_dynamic_topology_sculpting sub = col.column(align=True) |