diff options
Diffstat (limited to 'release')
22 files changed, 209 insertions, 50 deletions
diff --git a/release/datafiles/.Bfont b/release/datafiles/bfont.pfb Binary files differindex 364194d9ff1..8faffc3902d 100644 --- a/release/datafiles/.Bfont +++ b/release/datafiles/bfont.pfb diff --git a/release/datafiles/preview.blend b/release/datafiles/preview.blend Binary files differindex 807d1b08c4d..7eaa7a63eeb 100644 --- a/release/datafiles/preview.blend +++ b/release/datafiles/preview.blend diff --git a/release/datafiles/prvicons b/release/datafiles/prvicons.png Binary files differindex 364d9678f0b..364d9678f0b 100644 --- a/release/datafiles/prvicons +++ b/release/datafiles/prvicons.png diff --git a/release/datafiles/startup.blend b/release/datafiles/startup.blend Binary files differnew file mode 100644 index 00000000000..6f6c6646e31 --- /dev/null +++ b/release/datafiles/startup.blend diff --git a/release/scripts/modules/bpy/path.py b/release/scripts/modules/bpy/path.py index f1313b583f7..41fe052c434 100644 --- a/release/scripts/modules/bpy/path.py +++ b/release/scripts/modules/bpy/path.py @@ -256,7 +256,7 @@ def module_names(path, recursive=False): elif filename.endswith(".py") and filename != "__init__.py": fullpath = join(path, filename) modules.append((filename[0:-3], fullpath)) - elif ("." not in filename): + elif "." not in filename: directory = join(path, filename) fullpath = join(directory, "__init__.py") if isfile(fullpath): diff --git a/release/scripts/modules/console_python.py b/release/scripts/modules/console_python.py index d32606eb0b0..6e8fee07c0f 100644 --- a/release/scripts/modules/console_python.py +++ b/release/scripts/modules/console_python.py @@ -290,6 +290,40 @@ def autocomplete(context): return {'FINISHED'} +def copy_as_script(context): + sc = context.space_data + lines = [ + "import bpy", + "import bpy.context as C", + "import bpy.data as D", + "from mathutils import *", + "from math import *", + "", + ] + + for line in sc.scrollback: + text = line.body + type = line.type + + if type == 'INFO': # ignore autocomp. + continue + if type == 'INPUT': + if text.startswith(PROMPT): + text = text[len(PROMPT):] + elif text.startswith(PROMPT_MULTI): + text = text[len(PROMPT_MULTI):] + elif type == 'OUTPUT': + text = "#~ " + text + elif type == 'ERROR': + text = "#! " + text + + lines.append(text) + + context.window_manager.clipboard = "\n".join(lines) + + return {'FINISHED'} + + def banner(context): sc = context.space_data version_string = sys.version.strip().replace('\n', ' ') diff --git a/release/scripts/startup/bl_operators/console.py b/release/scripts/startup/bl_operators/console.py index 82a54077bdc..fd95da02b28 100644 --- a/release/scripts/startup/bl_operators/console.py +++ b/release/scripts/startup/bl_operators/console.py @@ -67,6 +67,25 @@ class ConsoleAutocomplete(Operator): return {'FINISHED'} +class ConsoleCopyAsScript(Operator): + """Copy the console contents for use in a script""" + bl_idname = "console.copy_as_script" + bl_label = "Copy to Clipboard (as script)" + + def execute(self, context): + sc = context.space_data + + module = _lang_module_get(sc) + copy_as_script = getattr(module, "copy_as_script", None) + + if copy_as_script: + return copy_as_script(context) + else: + print("Error: copy_as_script - not found for %r" % + sc.language) + return {'FINISHED'} + + class ConsoleBanner(Operator): """Print a message when the terminal initializes""" bl_idname = "console.banner" diff --git a/release/scripts/startup/bl_operators/node.py b/release/scripts/startup/bl_operators/node.py index 2f7fc359864..ee005fcb8bb 100644 --- a/release/scripts/startup/bl_operators/node.py +++ b/release/scripts/startup/bl_operators/node.py @@ -36,6 +36,7 @@ node_type_items_dict = {} node_type_prefix = 'NODE_' node_group_prefix = 'GROUP_' + # Generate a list of enum items for a given node class # Copy existing type enum, adding a prefix to distinguish from node groups # Skip the base node group type, node groups will be added below for all existing group trees @@ -43,23 +44,25 @@ def node_type_items(node_class): return [(node_type_prefix + item.identifier, item.name, item.description) for item in node_class.bl_rna.properties['type'].enum_items if item.identifier != 'GROUP'] + # Generate items for node group types -# Filter by the given tree_type +# Filter by the given tree_type # Node group trees don't have a description property yet (could add this as a custom property though) def node_group_items(tree_type): return [(node_group_prefix + group.name, group.name, '') for group in bpy.data.node_groups if group.type == tree_type] + # Returns the enum item list for the edited tree in the context def node_type_items_cb(self, context): snode = context.space_data if not snode: - return [] + return () tree = snode.edit_tree if not tree: - return [] + return () - # Lists of basic node types for each + # Lists of basic node types for each if not node_type_items_dict: node_type_items_dict.update({ 'SHADER': node_type_items(bpy.types.ShaderNode), @@ -73,7 +76,7 @@ def node_type_items_cb(self, context): if tree.type in node_type_items_dict: return node_type_items_dict[tree.type] + node_group_items(tree.type) else: - return [] + return () class NODE_OT_add_search(Operator): @@ -97,10 +100,10 @@ class NODE_OT_add_search(Operator): # Enum item identifier has an additional prefix to distinguish base node types from node groups item = self.type - if (item.startswith(node_type_prefix)): + if item.startswith(node_type_prefix): # item means base node type node = tree.nodes.new(type=item[len(node_type_prefix):]) - elif (item.startswith(node_group_prefix)): + elif item.startswith(node_group_prefix): # item means node group type node = tree.nodes.new(type='GROUP', group=bpy.data.node_groups[item[len(node_group_prefix):]]) else: @@ -119,7 +122,7 @@ class NODE_OT_add_search(Operator): def poll(cls, context): space = context.space_data # needs active node editor and a tree to add nodes to - return space.type == 'NODE_EDITOR' and space.edit_tree + return (space.type == 'NODE_EDITOR' and space.edit_tree) def execute(self, context): self.create_node(context) @@ -134,3 +137,33 @@ class NODE_OT_add_search(Operator): context.window_manager.invoke_search_popup(self) return {'CANCELLED'} + + +class NODE_OT_collapse_hide_unused_toggle(Operator): + '''Toggle collapsed nodes and hide unused sockets''' + bl_idname = "node.collapse_hide_unused_toggle" + bl_label = "Collapse and Hide Unused Sockets" + bl_options = {'REGISTER', 'UNDO'} + + @classmethod + def poll(cls, context): + space = context.space_data + # needs active node editor and a tree + return (space.type == 'NODE_EDITOR' and space.edit_tree) + + def execute(self, context): + space = context.space_data + tree = space.edit_tree + + for node in tree.nodes: + if node.select: + hide = (not node.hide) + + node.hide = hide + # Note: connected sockets are ignored internally + for socket in node.inputs: + socket.hide = hide + for socket in node.outputs: + socket.hide = hide + + return {'FINISHED'} diff --git a/release/scripts/startup/bl_ui/properties_animviz.py b/release/scripts/startup/bl_ui/properties_animviz.py index 3011f55fcb3..2d15c534e9f 100644 --- a/release/scripts/startup/bl_ui/properties_animviz.py +++ b/release/scripts/startup/bl_ui/properties_animviz.py @@ -44,10 +44,10 @@ class MotionPathButtonsPanel(): col = split.column() col.label(text="Display Range:") sub = col.column(align=True) - if (mps.type == 'CURRENT_FRAME'): + if mps.type == 'CURRENT_FRAME': sub.prop(mps, "frame_before", text="Before") sub.prop(mps, "frame_after", text="After") - elif (mps.type == 'RANGE'): + elif mps.type == 'RANGE': sub.prop(mps, "frame_start", text="Start") sub.prop(mps, "frame_end", text="End") diff --git a/release/scripts/startup/bl_ui/properties_data_curve.py b/release/scripts/startup/bl_ui/properties_data_curve.py index 1e9fd5dd8a9..a8f4aa30e95 100644 --- a/release/scripts/startup/bl_ui/properties_data_curve.py +++ b/release/scripts/startup/bl_ui/properties_data_curve.py @@ -106,7 +106,7 @@ class DATA_PT_shape_curve(CurveButtonsPanel, Panel): sub.prop(curve, "resolution_v", text="Preview V") sub.prop(curve, "render_resolution_v", text="Render V") - if (is_curve or is_text): + if is_curve or is_text: col.label(text="Fill:") sub = col.column() sub.active = (curve.dimensions == '2D' or (curve.bevel_object is None and curve.dimensions == '3D')) diff --git a/release/scripts/startup/bl_ui/properties_data_lamp.py b/release/scripts/startup/bl_ui/properties_data_lamp.py index 25b85591873..769715ef1b9 100644 --- a/release/scripts/startup/bl_ui/properties_data_lamp.py +++ b/release/scripts/startup/bl_ui/properties_data_lamp.py @@ -322,9 +322,9 @@ class DATA_PT_area(DataButtonsPanel, Panel): col.row().prop(lamp, "shape", expand=True) sub = col.row(align=True) - if (lamp.shape == 'SQUARE'): + if lamp.shape == 'SQUARE': sub.prop(lamp, "size") - elif (lamp.shape == 'RECTANGLE'): + elif lamp.shape == 'RECTANGLE': sub.prop(lamp, "size", text="Size X") sub.prop(lamp, "size_y", text="Size Y") diff --git a/release/scripts/startup/bl_ui/properties_data_modifier.py b/release/scripts/startup/bl_ui/properties_data_modifier.py index 7485e532bd4..ae0c4d4161c 100644 --- a/release/scripts/startup/bl_ui/properties_data_modifier.py +++ b/release/scripts/startup/bl_ui/properties_data_modifier.py @@ -215,6 +215,8 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel): layout.label(text="Face Count" + ": %d" % md.face_count) def DISPLACE(self, layout, ob, md): + has_texture = (md.texture is not None) + split = layout.split() col = split.column() @@ -226,12 +228,18 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel): col = split.column() col.label(text="Direction:") col.prop(md, "direction", text="") - col.label(text="Texture Coordinates:") - col.prop(md, "texture_coords", text="") + colsub = col.column() + colsub.active = has_texture + colsub.label(text="Texture Coordinates:") + colsub.prop(md, "texture_coords", text="") if md.texture_coords == 'OBJECT': - layout.prop(md, "texture_coords_object", text="Object") + row = layout.row() + row.active = has_texture + row.prop(md, "texture_coords_object", text="Object") elif md.texture_coords == 'UV' and ob.type == 'MESH': - layout.prop_search(md, "uv_layer", ob.data, "uv_textures") + row = layout.row() + row.active = has_texture + row.prop_search(md, "uv_layer", ob.data, "uv_textures") layout.separator() diff --git a/release/scripts/startup/bl_ui/properties_mask_common.py b/release/scripts/startup/bl_ui/properties_mask_common.py index 7cd2ae0b509..67980c388b5 100644 --- a/release/scripts/startup/bl_ui/properties_mask_common.py +++ b/release/scripts/startup/bl_ui/properties_mask_common.py @@ -223,7 +223,7 @@ class MASK_PT_tools(): col.operator("transform.translate") col.operator("transform.rotate") col.operator("transform.resize", text="Scale") - props = col.operator("transform.transform", text="Shrink/Fatten") + props = col.operator("transform.transform", text="Scale Feather") props.mode = 'MASK_SHRINKFATTEN' col = layout.column(align=True) @@ -237,6 +237,13 @@ class MASK_PT_tools(): col.operator("mask.parent_set") col.operator("mask.parent_clear") + col = layout.column(align=True) + col.label(text="Animation:") + col.operator("mask.shape_key_clear") + col.operator("mask.shape_key_insert") + col.operator("mask.shape_key_feather_reset") + col.operator("mask.shape_key_rekey") + class MASK_MT_mask(Menu): bl_label = "Mask" @@ -284,7 +291,7 @@ class MASK_MT_transform(Menu): layout.operator("transform.translate") layout.operator("transform.rotate") layout.operator("transform.resize") - props = layout.operator("transform.transform", text="Shrink/Fatten") + props = layout.operator("transform.transform", text="Scale Feather") props.mode = 'MASK_SHRINKFATTEN' diff --git a/release/scripts/startup/bl_ui/properties_particle.py b/release/scripts/startup/bl_ui/properties_particle.py index fe27a2d6f30..480cbcdba36 100644 --- a/release/scripts/startup/bl_ui/properties_particle.py +++ b/release/scripts/startup/bl_ui/properties_particle.py @@ -1008,7 +1008,7 @@ class PARTICLE_PT_draw(ParticleButtonsPanel, Panel): sub.active = (part.draw_color in {'VELOCITY', 'ACCELERATION'}) sub.prop(part, "color_maximum", text="Max") - if (path): + if path: col.prop(part, "draw_step") diff --git a/release/scripts/startup/bl_ui/properties_physics_field.py b/release/scripts/startup/bl_ui/properties_physics_field.py index 3864be57d36..efeac194d15 100644 --- a/release/scripts/startup/bl_ui/properties_physics_field.py +++ b/release/scripts/startup/bl_ui/properties_physics_field.py @@ -92,7 +92,7 @@ class PHYSICS_PT_field(PhysicButtonsPanel, Panel): layout.separator() layout.prop(field, "guide_kink_type") - if (field.guide_kink_type != 'NONE'): + if field.guide_kink_type != 'NONE': layout.prop(field, "guide_kink_axis") split = layout.split() diff --git a/release/scripts/startup/bl_ui/space_console.py b/release/scripts/startup/bl_ui/space_console.py index 7f9699f457b..7ded4954f80 100644 --- a/release/scripts/startup/bl_ui/space_console.py +++ b/release/scripts/startup/bl_ui/space_console.py @@ -51,6 +51,7 @@ class CONSOLE_MT_console(Menu): layout.separator() + layout.operator("console.copy_as_script") layout.operator("console.copy") layout.operator("console.paste") layout.menu("CONSOLE_MT_language") diff --git a/release/scripts/startup/bl_ui/space_image.py b/release/scripts/startup/bl_ui/space_image.py index 5302ad9b471..0b4d4cd19e4 100644 --- a/release/scripts/startup/bl_ui/space_image.py +++ b/release/scripts/startup/bl_ui/space_image.py @@ -774,7 +774,7 @@ class IMAGE_PT_paint_curve(BrushButtonsPanel, Panel): toolsettings = context.tool_settings.image_paint brush = toolsettings.brush - layout.template_curve_mapping(brush, "curve") + layout.template_curve_mapping(brush, "curve", type='COLOR') row = layout.row(align=True) row.operator("brush.curve_preset", icon='SMOOTHCURVE', text="").shape = 'SMOOTH' diff --git a/release/scripts/startup/bl_ui/space_node.py b/release/scripts/startup/bl_ui/space_node.py index 46baef9b043..5b7ecbfb618 100644 --- a/release/scripts/startup/bl_ui/space_node.py +++ b/release/scripts/startup/bl_ui/space_node.py @@ -182,6 +182,7 @@ class NODE_MT_node(Menu): layout.operator("node.preview_toggle") layout.operator("node.hide_socket_toggle") layout.operator("node.options_toggle") + layout.operator("node.collapse_hide_unused_toggle") layout.separator() diff --git a/release/scripts/startup/bl_ui/space_sequencer.py b/release/scripts/startup/bl_ui/space_sequencer.py index 77789496a15..cd10bce8ef6 100644 --- a/release/scripts/startup/bl_ui/space_sequencer.py +++ b/release/scripts/startup/bl_ui/space_sequencer.py @@ -28,6 +28,29 @@ def act_strip(context): return None +def draw_color_balance(layout, color_balance): + col = layout.column() + col.label(text="Lift:") + col.template_color_wheel(color_balance, "lift", value_slider=True, cubic=True) + row = col.row() + row.prop(color_balance, "lift", text="") + row.prop(color_balance, "invert_lift", text="Inverse") + + col = layout.column() + col.label(text="Gamma:") + col.template_color_wheel(color_balance, "gamma", value_slider=True, lock_luminosity=True, cubic=True) + row = col.row() + row.prop(color_balance, "gamma", text="") + row.prop(color_balance, "invert_gamma", text="Inverse") + + col = layout.column() + col.label(text="Gain:") + col.template_color_wheel(color_balance, "gain", value_slider=True, lock_luminosity=True, cubic=True) + row = col.row() + row.prop(color_balance, "gain", text="") + row.prop(color_balance, "invert_gain", text="Inverse") + + class SEQUENCER_HT_header(Header): bl_space_type = 'SEQUENCE_EDITOR' @@ -75,6 +98,9 @@ class SEQUENCER_HT_header(Header): row.prop(ed, "overlay_frame", text="") row.prop(ed, "overlay_lock", text="", icon='LOCKED') + row = layout.row() + row.prop(st, "overlay_type", text="") + row = layout.row(align=True) props = row.operator("render.opengl", text="", icon='RENDER_STILL') props.sequencer = True @@ -423,18 +449,24 @@ class SEQUENCER_PT_effect(SequencerButtonsPanel, Panel): return strip.type in {'ADD', 'SUBTRACT', 'ALPHA_OVER', 'ALPHA_UNDER', 'CROSS', 'GAMMA_CROSS', 'MULTIPLY', 'OVER_DROP', 'WIPE', 'GLOW', 'TRANSFORM', 'COLOR', 'SPEED', - 'MULTICAM'} + 'MULTICAM', 'ADJUSTMENT'} def draw(self, context): layout = self.layout + sequencer = context.scene.sequence_editor strip = act_strip(context) + if strip.input_count > 0: col = layout.column() col.prop(strip, "input_1") if strip.input_count > 1: col.prop(strip, "input_2") + if strip.is_supports_mask: + col = layout.column() + col.prop_search(strip, "input_mask_strip", sequencer, "sequences", text="Mask") + if strip.type == 'COLOR': layout.prop(strip, "color") @@ -488,7 +520,7 @@ class SEQUENCER_PT_effect(SequencerButtonsPanel, Panel): col = layout.column(align=True) col.prop(strip, "use_uniform_scale") - if (strip.use_uniform_scale): + if strip.use_uniform_scale: col = layout.column(align=True) col.prop(strip, "scale_start_x", text="Scale") else: @@ -763,26 +795,7 @@ class SEQUENCER_PT_filter(SequencerButtonsPanel, Panel): layout.prop(strip, "use_color_balance") if strip.use_color_balance and strip.color_balance: # TODO - need to add this somehow - col = layout.column() - col.label(text="Lift:") - col.template_color_wheel(strip.color_balance, "lift", value_slider=False, cubic=True) - row = col.row() - row.prop(strip.color_balance, "lift", text="") - row.prop(strip.color_balance, "invert_lift", text="Inverse") - - col = layout.column() - col.label(text="Gamma:") - col.template_color_wheel(strip.color_balance, "gamma", value_slider=False, lock_luminosity=True, cubic=True) - row = col.row() - row.prop(strip.color_balance, "gamma", text="") - row.prop(strip.color_balance, "invert_gamma", text="Inverse") - - col = layout.column() - col.label(text="Gain:") - col.template_color_wheel(strip.color_balance, "gain", value_slider=False, lock_luminosity=True, cubic=True) - row = col.row() - row.prop(strip.color_balance, "gain", text="") - row.prop(strip.color_balance, "invert_gain", text="Inverse") + draw_color_balance(layout, strip.color_balance) class SEQUENCER_PT_proxy(SequencerButtonsPanel, Panel): @@ -869,5 +882,46 @@ class SEQUENCER_PT_view(SequencerButtonsPanel_Output, Panel): col.prop(st, "show_separate_color") col.prop(st, "proxy_render_size") + +class SEQUENCER_PT_modifiers(SequencerButtonsPanel, Panel): + bl_label = "Modifiers" + + def draw(self, context): + layout = self.layout + + strip = act_strip(context) + sequencer = context.scene.sequence_editor + + layout.operator_menu_enum("sequencer.strip_modifier_add", "type") + + for mod in strip.modifiers: + box = layout.box() + + row = box.row() + row.prop(mod, "show_expanded", text="", emboss=False) + row.prop(mod, "name") + + row.prop(mod, "mute", text="") + props = row.operator("sequencer.strip_modifier_remove", text="", icon='X') + props.name = mod.name + + if mod.show_expanded: + row = box.row() + row.prop(mod, "input_mask_type", expand=True) + + if mod.input_mask_type == 'STRIP': + box.prop_search(mod, "input_mask_strip", sequencer, "sequences", text="Mask") + else: + box.prop(mod, "input_mask_id") + + if mod.type == 'COLOR_BALANCE': + box.prop(mod, "color_multiply") + draw_color_balance(box, mod.color_balance) + elif mod.type == 'CURVES': + box.template_curve_mapping(mod, "curve_mapping", type='COLOR') + elif mod.type == 'HUE_CORRECT': + box.template_curve_mapping(mod, "curve_mapping", type='HUE') + + if __name__ == "__main__": # only for live edit. bpy.utils.register_module(__name__) diff --git a/release/scripts/startup/bl_ui/space_userpref.py b/release/scripts/startup/bl_ui/space_userpref.py index e7dd9fb4751..b0b587056b1 100644 --- a/release/scripts/startup/bl_ui/space_userpref.py +++ b/release/scripts/startup/bl_ui/space_userpref.py @@ -858,6 +858,7 @@ class USERPREF_MT_ndof_settings(Menu): layout.separator() layout.prop(input_prefs, "ndof_sensitivity") + layout.prop(input_prefs, "ndof_orbit_sensitivity") if context.space_data.type == 'VIEW_3D': layout.separator() @@ -865,11 +866,10 @@ class USERPREF_MT_ndof_settings(Menu): layout.separator() layout.label(text="Orbit options") - if input_prefs.view_rotate_method == 'TRACKBALL': - layout.prop(input_prefs, "ndof_roll_invert_axis") + layout.prop(input_prefs, "ndof_turntable") + layout.prop(input_prefs, "ndof_roll_invert_axis") layout.prop(input_prefs, "ndof_tilt_invert_axis") layout.prop(input_prefs, "ndof_rotate_invert_axis") - layout.prop(input_prefs, "ndof_zoom_invert") layout.separator() layout.label(text="Pan options") @@ -878,6 +878,7 @@ class USERPREF_MT_ndof_settings(Menu): layout.prop(input_prefs, "ndof_panz_invert_axis") layout.label(text="Zoom options") + layout.prop(input_prefs, "ndof_zoom_invert") layout.prop(input_prefs, "ndof_zoom_updown") layout.separator() diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py index 2d9c9467a01..d81f53d4fa6 100644 --- a/release/scripts/startup/bl_ui/space_view3d.py +++ b/release/scripts/startup/bl_ui/space_view3d.py @@ -1183,6 +1183,7 @@ class VIEW3D_MT_hook(Menu): layout.operator_context = 'EXEC_AREA' layout.operator("object.hook_add_newob") layout.operator("object.hook_add_selob") + layout.operator("object.hook_add_selob", text="Hook to Selected Object Bone").use_bone = True if [mod.type == 'HOOK' for mod in context.active_object.modifiers]: layout.separator() @@ -2556,7 +2557,7 @@ class VIEW3D_PT_background_image(Panel): if bg.source == 'IMAGE': row = box.row() row.template_ID(bg, "image", open="image.open") - if (bg.image): + if bg.image is not None: box.template_image(bg, "image", bg.image_user, compact=True) has_bg = True diff --git a/release/scripts/startup/bl_ui/space_view3d_toolbar.py b/release/scripts/startup/bl_ui/space_view3d_toolbar.py index ac962ab5097..2c1e963dcfe 100644 --- a/release/scripts/startup/bl_ui/space_view3d_toolbar.py +++ b/release/scripts/startup/bl_ui/space_view3d_toolbar.py @@ -228,7 +228,7 @@ class VIEW3D_PT_tools_curveedit(View3DPanel, Panel): col = layout.column(align=True) col.operator("transform.tilt", text="Tilt") - col.operator("transform.transform", text="Shrink/Fatten").mode = 'CURVE_SHRINKFATTEN' + col.operator("transform.transform", text="Scale Feather").mode = 'CURVE_SHRINKFATTEN' col = layout.column(align=True) col.label(text="Curve:") |