diff options
author | Xiao Xiangquan <xiaoxiangquan@gmail.com> | 2011-06-15 12:28:56 +0400 |
---|---|---|
committer | Xiao Xiangquan <xiaoxiangquan@gmail.com> | 2011-06-15 12:28:56 +0400 |
commit | 40981d872f0410caf1870194c8e15ebaed864dea (patch) | |
tree | adde4556e99bbc684580f028c1d962369d9f2676 /release | |
parent | 68c8aecb465bf0c8e229c50958dc004bde7407b3 (diff) | |
parent | 81946b9138201800e495eb28addf254958feb1a4 (diff) |
merge from trunk r37405
Diffstat (limited to 'release')
20 files changed, 317 insertions, 228 deletions
diff --git a/release/datafiles/fonts/unifont.ttf.gz b/release/bin/.blender/fonts/unifont.ttf.gz Binary files differindex 8d10371899c..8d10371899c 100755 --- a/release/datafiles/fonts/unifont.ttf.gz +++ b/release/bin/.blender/fonts/unifont.ttf.gz diff --git a/release/scripts/modules/bpy_extras/image_utils.py b/release/scripts/modules/bpy_extras/image_utils.py index a7d0226fa23..f45f9c6f225 100644 --- a/release/scripts/modules/bpy_extras/image_utils.py +++ b/release/scripts/modules/bpy_extras/image_utils.py @@ -59,6 +59,7 @@ def load_image(imagepath, :rtype: :class:`Image` """ import os + import bpy # TODO: recursive @@ -88,7 +89,7 @@ def load_image(imagepath, for filepath_test in variants: if ncase_cmp: - ncase_variants = filepath_test, bpy.path.resolve_ncase(filepath) + ncase_variants = filepath_test, bpy.path.resolve_ncase(filepath_test) else: ncase_variants = (filepath_test, ) diff --git a/release/scripts/modules/bpy_extras/io_utils.py b/release/scripts/modules/bpy_extras/io_utils.py index c444fd618a8..12c2d809132 100644 --- a/release/scripts/modules/bpy_extras/io_utils.py +++ b/release/scripts/modules/bpy_extras/io_utils.py @@ -29,6 +29,7 @@ __all__ = ( "path_reference", "path_reference_copy", "path_reference_mode", + "unique_name" ) import bpy @@ -298,3 +299,43 @@ def path_reference_copy(copy_set, report=print): os.makedirs(dir_to) shutil.copy(file_src, file_dst) + + +def unique_name(key, name, name_dict, name_max=-1, clean_func=None): + """ + Helper function for storing unique names which may have special characters + stripped and restricted to a maximum length. + + :arg key: unique item this name belongs to, name_dict[key] will be reused + when available. + This can be the object, mesh, material, etc instance its self. + :type key: any hashable object assosiated with the *name*. + :arg name: The name used to create a unique value in *name_dict*. + :type name: string + :arg name_dict: This is used to cache namespace to ensure no collisions + occur, this should be an empty dict initially and only modified by this + function. + :type name_dict: dict + :arg clean_func: Function to call on *name* before creating a unique value. + :type clean_func: function + """ + name_new = name_dict.get(key) + if name_new is None: + count = 1 + name_dict_values = name_dict.values() + name_new = name_new_orig = name if clean_func is None else clean_func(name) + + if name_max == -1: + while name_new in name_dict_values: + name_new = "%s.%03d" % (name_new_orig, count) + count += 1 + else: + name_new = name_new[:name_max] + while name_new in name_dict_values: + count_str = "%03d" % count + name_new = "%.*s.%s" % (name_max - (len(count_str) + 1), name_new_orig, count_str) + count += 1 + + name_dict[key] = name_new + + return name_new diff --git a/release/scripts/modules/console/complete_namespace.py b/release/scripts/modules/console/complete_namespace.py index a31280ebff0..d787fed0967 100644 --- a/release/scripts/modules/console/complete_namespace.py +++ b/release/scripts/modules/console/complete_namespace.py @@ -37,6 +37,11 @@ def is_dict(obj): return hasattr(obj, 'keys') and hasattr(getattr(obj, 'keys'), '__call__') +def is_struct_seq(obj): + """Returns whether obj is a structured sequence subclass: sys.float_info""" + return isinstance(obj, tuple) and hasattr(obj, 'n_fields') + + def complete_names(word, namespace): """Complete variable names or attributes @@ -174,7 +179,7 @@ def complete(word, namespace, private=True): if type(obj) in (bool, float, int, str): return [] # an extra char '[', '(' or '.' will be added - if hasattr(obj, '__getitem__'): + if hasattr(obj, '__getitem__') and not is_struct_seq(obj): # list or dictionary matches = complete_indices(word, namespace, obj) elif hasattr(obj, '__call__'): diff --git a/release/scripts/modules/console/intellisense.py b/release/scripts/modules/console/intellisense.py index 9352d7c14e1..00f7dbd3657 100644 --- a/release/scripts/modules/console/intellisense.py +++ b/release/scripts/modules/console/intellisense.py @@ -126,7 +126,14 @@ def expand(line, cursor, namespace, private=True): if len(matches) == 1: scrollback = '' else: - scrollback = ' '.join([m.split('.')[-1] for m in matches]) + # causes blender bug [#27495] since string keys may contain '.' + # scrollback = ' '.join([m.split('.')[-1] for m in matches]) + scrollback = ' '.join( + [m[len(word):] + if (word and m.startswith(word)) + else m.split('.')[-1] + for m in matches]) + no_calltip = True prefix = os.path.commonprefix(matches)[len(word):] if prefix: diff --git a/release/scripts/modules/console_python.py b/release/scripts/modules/console_python.py index 3048fa1d597..455eabe377b 100644 --- a/release/scripts/modules/console_python.py +++ b/release/scripts/modules/console_python.py @@ -80,7 +80,7 @@ def get_console(console_id): if console_data: console, stdout, stderr = console_data - # XXX, bug in python 3.1.2 ? (worked in 3.1.1) + # XXX, bug in python 3.1.2, 3.2 ? (worked in 3.1.1) # seems there is no way to clear StringIO objects for writing, have to make new ones each time. import io stdout = io.StringIO() diff --git a/release/scripts/startup/bl_operators/presets.py b/release/scripts/startup/bl_operators/presets.py index 493c51ad237..2175d7528a4 100644 --- a/release/scripts/startup/bl_operators/presets.py +++ b/release/scripts/startup/bl_operators/presets.py @@ -326,7 +326,7 @@ class AddPresetOperator(AddPresetBase, bpy.types.Operator): ret = [] for prop_id, prop in operator_rna.properties.items(): - if (not prop.is_hidden) and prop_id not in properties_blacklist: + if (not (prop.is_hidden or prop.is_skip_save)) and prop_id not in properties_blacklist: ret.append("op.%s" % prop_id) return ret diff --git a/release/scripts/startup/bl_operators/wm.py b/release/scripts/startup/bl_operators/wm.py index 3f4a061c4ac..fcc30ecbb4b 100644 --- a/release/scripts/startup/bl_operators/wm.py +++ b/release/scripts/startup/bl_operators/wm.py @@ -106,7 +106,7 @@ class WM_OT_context_set_boolean(bpy.types.Operator): '''Set a context value.''' bl_idname = "wm.context_set_boolean" bl_label = "Context Set Boolean" - bl_options = {'UNDO'} + bl_options = {'UNDO', 'INTERNAL'} data_path = rna_path_prop value = BoolProperty(name="Value", @@ -119,7 +119,7 @@ class WM_OT_context_set_int(bpy.types.Operator): # same as enum '''Set a context value.''' bl_idname = "wm.context_set_int" bl_label = "Context Set" - bl_options = {'UNDO'} + bl_options = {'UNDO', 'INTERNAL'} data_path = rna_path_prop value = IntProperty(name="Value", description="Assign value", default=0) @@ -132,7 +132,7 @@ class WM_OT_context_scale_int(bpy.types.Operator): '''Scale an int context value.''' bl_idname = "wm.context_scale_int" bl_label = "Context Set" - bl_options = {'UNDO'} + bl_options = {'UNDO', 'INTERNAL'} data_path = rna_path_prop value = FloatProperty(name="Value", description="Assign value", default=1.0) @@ -168,7 +168,7 @@ class WM_OT_context_set_float(bpy.types.Operator): # same as enum '''Set a context value.''' bl_idname = "wm.context_set_float" bl_label = "Context Set Float" - bl_options = {'UNDO'} + bl_options = {'UNDO', 'INTERNAL'} data_path = rna_path_prop value = FloatProperty(name="Value", @@ -182,7 +182,7 @@ class WM_OT_context_set_string(bpy.types.Operator): # same as enum '''Set a context value.''' bl_idname = "wm.context_set_string" bl_label = "Context Set String" - bl_options = {'UNDO'} + bl_options = {'UNDO', 'INTERNAL'} data_path = rna_path_prop value = StringProperty(name="Value", @@ -195,7 +195,7 @@ class WM_OT_context_set_enum(bpy.types.Operator): '''Set a context value.''' bl_idname = "wm.context_set_enum" bl_label = "Context Set Enum" - bl_options = {'UNDO'} + bl_options = {'UNDO', 'INTERNAL'} data_path = rna_path_prop value = StringProperty(name="Value", @@ -209,7 +209,7 @@ class WM_OT_context_set_value(bpy.types.Operator): '''Set a context value.''' bl_idname = "wm.context_set_value" bl_label = "Context Set Value" - bl_options = {'UNDO'} + bl_options = {'UNDO', 'INTERNAL'} data_path = rna_path_prop value = StringProperty(name="Value", @@ -227,7 +227,7 @@ class WM_OT_context_toggle(bpy.types.Operator): '''Toggle a context value.''' bl_idname = "wm.context_toggle" bl_label = "Context Toggle" - bl_options = {'UNDO'} + bl_options = {'UNDO', 'INTERNAL'} data_path = rna_path_prop @@ -246,7 +246,7 @@ class WM_OT_context_toggle_enum(bpy.types.Operator): '''Toggle a context value.''' bl_idname = "wm.context_toggle_enum" bl_label = "Context Toggle Values" - bl_options = {'UNDO'} + bl_options = {'UNDO', 'INTERNAL'} data_path = rna_path_prop value_1 = StringProperty(name="Value", \ @@ -273,7 +273,7 @@ class WM_OT_context_cycle_int(bpy.types.Operator): '''vertex keys, groups' etc.''' bl_idname = "wm.context_cycle_int" bl_label = "Context Int Cycle" - bl_options = {'UNDO'} + bl_options = {'UNDO', 'INTERNAL'} data_path = rna_path_prop reverse = rna_reverse_prop @@ -307,7 +307,7 @@ class WM_OT_context_cycle_enum(bpy.types.Operator): '''Toggle a context value.''' bl_idname = "wm.context_cycle_enum" bl_label = "Context Enum Cycle" - bl_options = {'UNDO'} + bl_options = {'UNDO', 'INTERNAL'} data_path = rna_path_prop reverse = rna_reverse_prop @@ -360,7 +360,7 @@ class WM_OT_context_cycle_array(bpy.types.Operator): Useful for cycling the active mesh edit mode.''' bl_idname = "wm.context_cycle_array" bl_label = "Context Array Cycle" - bl_options = {'UNDO'} + bl_options = {'UNDO', 'INTERNAL'} data_path = rna_path_prop reverse = rna_reverse_prop @@ -406,7 +406,7 @@ class WM_MT_context_menu_enum(bpy.types.Menu): class WM_OT_context_menu_enum(bpy.types.Operator): bl_idname = "wm.context_menu_enum" bl_label = "Context Enum Menu" - bl_options = {'UNDO'} + bl_options = {'UNDO', 'INTERNAL'} data_path = rna_path_prop def execute(self, context): @@ -420,7 +420,7 @@ class WM_OT_context_set_id(bpy.types.Operator): '''Toggle a context value.''' bl_idname = "wm.context_set_id" bl_label = "Set Library ID" - bl_options = {'UNDO'} + bl_options = {'UNDO', 'INTERNAL'} data_path = rna_path_prop value = StringProperty(name="Value", @@ -462,6 +462,7 @@ class WM_OT_context_modal_mouse(bpy.types.Operator): '''Adjust arbitrary values with mouse input''' bl_idname = "wm.context_modal_mouse" bl_label = "Context Modal Mouse" + bl_options = {'INTERNAL'} data_path_iter = StringProperty(description="The data path relative to the context, must point to an iterable.") data_path_item = StringProperty(description="The data path from each iterable to the value (int or float)") diff --git a/release/scripts/startup/bl_ui/properties_data_curve.py b/release/scripts/startup/bl_ui/properties_data_curve.py index 623daffac93..11a129377e8 100644 --- a/release/scripts/startup/bl_ui/properties_data_curve.py +++ b/release/scripts/startup/bl_ui/properties_data_curve.py @@ -116,6 +116,10 @@ class DATA_PT_shape_curve(CurveButtonsPanel, bpy.types.Panel): col.label(text="Textures:") col.prop(curve, "use_uv_as_generated") col.prop(curve, "use_auto_texspace") + + row = layout.row() + row.column().prop(curve, "texspace_location") + row.column().prop(curve, "texspace_size") class DATA_PT_geometry_curve(CurveButtonsPanel, bpy.types.Panel): diff --git a/release/scripts/startup/bl_ui/properties_data_mesh.py b/release/scripts/startup/bl_ui/properties_data_mesh.py index 7097988d25b..e2c88413177 100644 --- a/release/scripts/startup/bl_ui/properties_data_mesh.py +++ b/release/scripts/startup/bl_ui/properties_data_mesh.py @@ -99,8 +99,9 @@ class DATA_PT_normals(MeshButtonsPanel, bpy.types.Panel): split.prop(mesh, "show_double_sided") -class DATA_PT_settings(MeshButtonsPanel, bpy.types.Panel): - bl_label = "Settings" +class DATA_PT_texture_space(MeshButtonsPanel, bpy.types.Panel): + bl_label = "Texture Space" + bl_options = {'DEFAULT_CLOSED'} COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'} def draw(self, context): @@ -109,8 +110,13 @@ class DATA_PT_settings(MeshButtonsPanel, bpy.types.Panel): mesh = context.mesh layout.prop(mesh, "texture_mesh") - layout.prop(mesh, "use_auto_texspace") + layout.separator() + + layout.prop(mesh, "use_auto_texspace") + row = layout.row() + row.column().prop(mesh, "texspace_location", text="Location") + row.column().prop(mesh, "texspace_size", text="Size") class DATA_PT_vertex_groups(MeshButtonsPanel, bpy.types.Panel): bl_label = "Vertex Groups" diff --git a/release/scripts/startup/bl_ui/properties_data_metaball.py b/release/scripts/startup/bl_ui/properties_data_metaball.py index 81ba15d6f40..c568d10b3b0 100644 --- a/release/scripts/startup/bl_ui/properties_data_metaball.py +++ b/release/scripts/startup/bl_ui/properties_data_metaball.py @@ -70,6 +70,10 @@ class DATA_PT_metaball(DataButtonsPanel, bpy.types.Panel): layout.label(text="Update:") layout.prop(mball, "update_method", expand=True) + + row = layout.row() + row.column().prop(mball, "texspace_location") + row.column().prop(mball, "texspace_size") class DATA_PT_metaball_element(DataButtonsPanel, bpy.types.Panel): diff --git a/release/scripts/startup/bl_ui/properties_data_modifier.py b/release/scripts/startup/bl_ui/properties_data_modifier.py index 75069993521..586675f2ca0 100644 --- a/release/scripts/startup/bl_ui/properties_data_modifier.py +++ b/release/scripts/startup/bl_ui/properties_data_modifier.py @@ -483,11 +483,10 @@ class DATA_PT_modifiers(ModifierButtonsPanel, bpy.types.Panel): col.label(text="Mode:") col.prop(md, "wrap_method", text="") - split = layout.split(percentage=0.25) - - col = split.column() - if md.wrap_method == 'PROJECT': + split = layout.split(percentage=0.25) + + col = split.column() col.label(text="Axis:") col.prop(md, "use_project_x") col.prop(md, "use_project_y") @@ -499,7 +498,6 @@ class DATA_PT_modifiers(ModifierButtonsPanel, bpy.types.Panel): col.prop(md, "use_positive_direction") col = split.column() - col.label(text="Cull Faces:") col.prop(md, "cull_face", expand=True) diff --git a/release/scripts/startup/bl_ui/properties_object_constraint.py b/release/scripts/startup/bl_ui/properties_object_constraint.py index 7c2fe76fe14..03823ad7345 100644 --- a/release/scripts/startup/bl_ui/properties_object_constraint.py +++ b/release/scripts/startup/bl_ui/properties_object_constraint.py @@ -655,17 +655,19 @@ class ConstraintButtonsPanel(): row = col.row() row.label(text="Source to Destination Mapping:") + # note: chr(187) is the ASCII arrow ( >> ). Blender Text Editor can't + # open it. Thus we are using the hardcoded value instead. row = col.row() row.prop(con, "map_to_x_from", expand=False, text="") - row.label(text=" -> X") + row.label(text=" %s X" % chr(187)) row = col.row() row.prop(con, "map_to_y_from", expand=False, text="") - row.label(text=" -> Y") + row.label(text=" %s Y" % chr(187)) row = col.row() row.prop(con, "map_to_z_from", expand=False, text="") - row.label(text=" -> Z") + row.label(text=" %s Z" % chr(187)) split = layout.split() diff --git a/release/scripts/startup/bl_ui/properties_render.py b/release/scripts/startup/bl_ui/properties_render.py index a3b10702fa7..54ca18ef828 100644 --- a/release/scripts/startup/bl_ui/properties_render.py +++ b/release/scripts/startup/bl_ui/properties_render.py @@ -172,8 +172,130 @@ class RENDER_PT_layers(RenderButtonsPanel, bpy.types.Panel): row.prop(rl, "exclude_refraction", text="") +class RENDER_PT_dimensions(RenderButtonsPanel, bpy.types.Panel): + bl_label = "Dimensions" + COMPAT_ENGINES = {'BLENDER_RENDER'} + + def draw(self, context): + layout = self.layout + + scene = context.scene + rd = scene.render + + row = layout.row(align=True) + row.menu("RENDER_MT_presets", text=bpy.types.RENDER_MT_presets.bl_label) + row.operator("render.preset_add", text="", icon="ZOOMIN") + row.operator("render.preset_add", text="", icon="ZOOMOUT").remove_active = True + + split = layout.split() + + col = split.column() + sub = col.column(align=True) + sub.label(text="Resolution:") + sub.prop(rd, "resolution_x", text="X") + sub.prop(rd, "resolution_y", text="Y") + sub.prop(rd, "resolution_percentage", text="") + + sub.label(text="Aspect Ratio:") + sub.prop(rd, "pixel_aspect_x", text="X") + sub.prop(rd, "pixel_aspect_y", text="Y") + + row = col.row() + row.prop(rd, "use_border", text="Border") + sub = row.row() + sub.active = rd.use_border + sub.prop(rd, "use_crop_to_border", text="Crop") + + col = split.column() + sub = col.column(align=True) + sub.label(text="Frame Range:") + sub.prop(scene, "frame_start", text="Start") + sub.prop(scene, "frame_end", text="End") + sub.prop(scene, "frame_step", text="Step") + + sub.label(text="Frame Rate:") + if rd.fps_base == 1: + fps_rate = round(rd.fps / rd.fps_base) + else: + fps_rate = round(rd.fps / rd.fps_base, 2) + + # TODO: Change the following to iterate over existing presets + custom_framerate = (fps_rate not in {23.98, 24, 25, 29.97, 30, 50, 59.94, 60}) + + if custom_framerate == True: + fps_label_text = "Custom (" + str(fps_rate) + " fps)" + else: + fps_label_text = str(fps_rate) + " fps" + + sub.menu("RENDER_MT_framerate_presets", text=fps_label_text) + + if custom_framerate or (bpy.types.RENDER_MT_framerate_presets.bl_label == "Custom"): + sub.prop(rd, "fps") + sub.prop(rd, "fps_base", text="/") + subrow = sub.row(align=True) + subrow.label(text="Time Remapping:") + subrow = sub.row(align=True) + subrow.prop(rd, "frame_map_old", text="Old") + subrow.prop(rd, "frame_map_new", text="New") + + +class RENDER_PT_antialiasing(RenderButtonsPanel, bpy.types.Panel): + bl_label = "Anti-Aliasing" + COMPAT_ENGINES = {'BLENDER_RENDER'} + + def draw_header(self, context): + rd = context.scene.render + + self.layout.prop(rd, "use_antialiasing", text="") + + def draw(self, context): + layout = self.layout + + rd = context.scene.render + layout.active = rd.use_antialiasing + + split = layout.split() + + 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() + col.prop(rd, "pixel_filter_type", text="") + col.prop(rd, "filter_size", text="Size") + + +class RENDER_PT_motion_blur(RenderButtonsPanel, bpy.types.Panel): + bl_label = "Sampled Motion Blur" + bl_options = {'DEFAULT_CLOSED'} + COMPAT_ENGINES = {'BLENDER_RENDER'} + + @classmethod + def poll(cls, context): + rd = context.scene.render + return not rd.use_full_sample and (rd.engine in cls.COMPAT_ENGINES) + + def draw_header(self, context): + rd = context.scene.render + + self.layout.prop(rd, "use_motion_blur", text="") + + def draw(self, context): + layout = self.layout + + rd = context.scene.render + layout.active = rd.use_motion_blur + + row = layout.row() + row.prop(rd, "motion_blur_samples") + row.prop(rd, "motion_blur_shutter") + + class RENDER_PT_shading(RenderButtonsPanel, bpy.types.Panel): bl_label = "Shading" + bl_options = {'DEFAULT_CLOSED'} COMPAT_ENGINES = {'BLENDER_RENDER'} def draw(self, context): @@ -254,8 +376,7 @@ class RENDER_PT_post_processing(RenderButtonsPanel, bpy.types.Panel): col.prop(rd, "use_compositing") col.prop(rd, "use_sequencer") - col = split.column() - col.prop(rd, "dither_intensity", text="Dither", slider=True) + split.prop(rd, "dither_intensity", text="Dither", slider=True) layout.separator() @@ -276,6 +397,51 @@ class RENDER_PT_post_processing(RenderButtonsPanel, bpy.types.Panel): sub.prop(rd, "edge_color", text="") +class RENDER_PT_stamp(RenderButtonsPanel, bpy.types.Panel): + bl_label = "Stamp" + bl_options = {'DEFAULT_CLOSED'} + COMPAT_ENGINES = {'BLENDER_RENDER'} + + def draw_header(self, context): + rd = context.scene.render + + self.layout.prop(rd, "use_stamp", text="") + + def draw(self, context): + layout = self.layout + + rd = context.scene.render + + layout.active = rd.use_stamp + + split = layout.split() + + col = split.column() + col.prop(rd, "use_stamp_time", text="Time") + col.prop(rd, "use_stamp_date", text="Date") + col.prop(rd, "use_stamp_render_time", text="RenderTime") + col.prop(rd, "use_stamp_frame", text="Frame") + col.prop(rd, "use_stamp_scene", text="Scene") + col.prop(rd, "use_stamp_camera", text="Camera") + col.prop(rd, "use_stamp_lens", text="Lens") + col.prop(rd, "use_stamp_filename", text="Filename") + col.prop(rd, "use_stamp_marker", text="Marker") + col.prop(rd, "use_stamp_sequencer_strip", text="Seq. Strip") + + col = split.column() + col.active = rd.use_stamp + col.prop(rd, "stamp_foreground", slider=True) + col.prop(rd, "stamp_background", slider=True) + col.separator() + col.prop(rd, "stamp_font_size", text="Font Size") + + row = layout.split(percentage=0.2) + row.prop(rd, "use_stamp_note", text="Note") + sub = row.row() + sub.active = rd.use_stamp_note + sub.prop(rd, "stamp_note_text", text="") + + class RENDER_PT_output(RenderButtonsPanel, bpy.types.Panel): bl_label = "Output" COMPAT_ENGINES = {'BLENDER_RENDER'} @@ -433,172 +599,6 @@ class RENDER_PT_encoding(RenderButtonsPanel, bpy.types.Panel): split.prop(rd, "ffmpeg_audio_volume", slider=True) -class RENDER_PT_antialiasing(RenderButtonsPanel, bpy.types.Panel): - bl_label = "Anti-Aliasing" - COMPAT_ENGINES = {'BLENDER_RENDER'} - - def draw_header(self, context): - rd = context.scene.render - - self.layout.prop(rd, "use_antialiasing", text="") - - def draw(self, context): - layout = self.layout - - rd = context.scene.render - layout.active = rd.use_antialiasing - - split = layout.split() - - 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() - col.prop(rd, "pixel_filter_type", text="") - col.prop(rd, "filter_size", text="Size") - - -class RENDER_PT_motion_blur(RenderButtonsPanel, bpy.types.Panel): - bl_label = "Sampled Motion Blur" - bl_options = {'DEFAULT_CLOSED'} - COMPAT_ENGINES = {'BLENDER_RENDER'} - - @classmethod - def poll(cls, context): - rd = context.scene.render - return not rd.use_full_sample and (rd.engine in cls.COMPAT_ENGINES) - - def draw_header(self, context): - rd = context.scene.render - - self.layout.prop(rd, "use_motion_blur", text="") - - def draw(self, context): - layout = self.layout - - rd = context.scene.render - layout.active = rd.use_motion_blur - - row = layout.row() - row.prop(rd, "motion_blur_samples") - row.prop(rd, "motion_blur_shutter") - - -class RENDER_PT_dimensions(RenderButtonsPanel, bpy.types.Panel): - bl_label = "Dimensions" - COMPAT_ENGINES = {'BLENDER_RENDER'} - - def draw(self, context): - layout = self.layout - - scene = context.scene - rd = scene.render - - row = layout.row(align=True) - row.menu("RENDER_MT_presets", text=bpy.types.RENDER_MT_presets.bl_label) - row.operator("render.preset_add", text="", icon="ZOOMIN") - row.operator("render.preset_add", text="", icon="ZOOMOUT").remove_active = True - - split = layout.split() - - col = split.column() - sub = col.column(align=True) - sub.label(text="Resolution:") - sub.prop(rd, "resolution_x", text="X") - sub.prop(rd, "resolution_y", text="Y") - sub.prop(rd, "resolution_percentage", text="") - - sub.label(text="Aspect Ratio:") - sub.prop(rd, "pixel_aspect_x", text="X") - sub.prop(rd, "pixel_aspect_y", text="Y") - - row = col.row() - row.prop(rd, "use_border", text="Border") - sub = row.row() - sub.active = rd.use_border - sub.prop(rd, "use_crop_to_border", text="Crop") - - col = split.column() - sub = col.column(align=True) - sub.label(text="Frame Range:") - sub.prop(scene, "frame_start", text="Start") - sub.prop(scene, "frame_end", text="End") - sub.prop(scene, "frame_step", text="Step") - - sub.label(text="Frame Rate:") - if rd.fps_base == 1: - fps_rate = round(rd.fps / rd.fps_base) - else: - fps_rate = round(rd.fps / rd.fps_base, 2) - - # TODO: Change the following to iterate over existing presets - custom_framerate = (fps_rate not in {23.98, 24, 25, 29.97, 30, 50, 59.94, 60}) - - if custom_framerate == True: - fps_label_text = "Custom (" + str(fps_rate) + " fps)" - else: - fps_label_text = str(fps_rate) + " fps" - - sub.menu("RENDER_MT_framerate_presets", text=fps_label_text) - - if custom_framerate or (bpy.types.RENDER_MT_framerate_presets.bl_label == "Custom"): - sub.prop(rd, "fps") - sub.prop(rd, "fps_base", text="/") - subrow = sub.row(align=True) - subrow.label(text="Time Remapping:") - subrow = sub.row(align=True) - subrow.prop(rd, "frame_map_old", text="Old") - subrow.prop(rd, "frame_map_new", text="New") - - -class RENDER_PT_stamp(RenderButtonsPanel, bpy.types.Panel): - bl_label = "Stamp" - bl_options = {'DEFAULT_CLOSED'} - COMPAT_ENGINES = {'BLENDER_RENDER'} - - def draw_header(self, context): - rd = context.scene.render - - self.layout.prop(rd, "use_stamp", text="") - - def draw(self, context): - layout = self.layout - - rd = context.scene.render - - layout.active = rd.use_stamp - - split = layout.split() - - col = split.column() - col.prop(rd, "use_stamp_time", text="Time") - col.prop(rd, "use_stamp_date", text="Date") - col.prop(rd, "use_stamp_render_time", text="RenderTime") - col.prop(rd, "use_stamp_frame", text="Frame") - col.prop(rd, "use_stamp_scene", text="Scene") - col.prop(rd, "use_stamp_camera", text="Camera") - col.prop(rd, "use_stamp_lens", text="Lens") - col.prop(rd, "use_stamp_filename", text="Filename") - col.prop(rd, "use_stamp_marker", text="Marker") - col.prop(rd, "use_stamp_sequencer_strip", text="Seq. Strip") - - col = split.column() - col.active = rd.use_stamp - col.prop(rd, "stamp_foreground", slider=True) - col.prop(rd, "stamp_background", slider=True) - col.separator() - col.prop(rd, "stamp_font_size", text="Font Size") - - row = layout.split(percentage=0.2) - row.prop(rd, "use_stamp_note", text="Note") - sub = row.row() - sub.active = rd.use_stamp_note - sub.prop(rd, "stamp_note_text", text="") - - class RENDER_PT_bake(RenderButtonsPanel, bpy.types.Panel): bl_label = "Bake" bl_options = {'DEFAULT_CLOSED'} @@ -613,29 +613,42 @@ class RENDER_PT_bake(RenderButtonsPanel, bpy.types.Panel): layout.prop(rd, "bake_type") - if rd.bake_type == 'NORMALS': - layout.prop(rd, "bake_normal_space") - elif rd.bake_type in {'DISPLACEMENT', 'AO'}: - layout.prop(rd, "use_bake_normalize") + multires_bake = False + if rd.bake_type in ['NORMALS', 'DISPLACEMENT']: + layout.prop(rd, 'use_bake_multires') + multires_bake = rd.use_bake_multires - # col.prop(rd, "bake_aa_mode") - # col.prop(rd, "use_bake_antialiasing") + if not multires_bake: + if rd.bake_type == 'NORMALS': + layout.prop(rd, "bake_normal_space") + elif rd.bake_type in {'DISPLACEMENT', 'AO'}: + layout.prop(rd, "use_bake_normalize") - layout.separator() + # col.prop(rd, "bake_aa_mode") + # col.prop(rd, "use_bake_antialiasing") - split = layout.split() + layout.separator() - col = split.column() - col.prop(rd, "use_bake_clear") - col.prop(rd, "bake_margin") - col.prop(rd, "bake_quad_split", text="Split") + split = layout.split() + + col = split.column() + col.prop(rd, "use_bake_clear") + col.prop(rd, "bake_margin") + col.prop(rd, "bake_quad_split", text="Split") + + col = split.column() + col.prop(rd, "use_bake_selected_to_active") + sub = col.column() + sub.active = rd.use_bake_selected_to_active + sub.prop(rd, "bake_distance") + sub.prop(rd, "bake_bias") + else: + if rd.bake_type == 'DISPLACEMENT': + layout.prop(rd, "use_bake_lores_mesh") + + layout.prop(rd, "use_bake_clear") + layout.prop(rd, "bake_margin") - col = split.column() - col.prop(rd, "use_bake_selected_to_active") - sub = col.column() - sub.active = rd.use_bake_selected_to_active - sub.prop(rd, "bake_distance") - sub.prop(rd, "bake_bias") if __name__ == "__main__": # only for live edit. bpy.utils.register_module(__name__) diff --git a/release/scripts/startup/bl_ui/space_text.py b/release/scripts/startup/bl_ui/space_text.py index 5b07e8dc37f..0fc8d937f66 100644 --- a/release/scripts/startup/bl_ui/space_text.py +++ b/release/scripts/startup/bl_ui/space_text.py @@ -42,7 +42,7 @@ class TEXT_HT_header(bpy.types.Header): if text and text.is_modified: row = layout.row() - # row.color(redalert) + row.alert = True row.operator("text.resolve_conflict", text="", icon='HELP') layout.template_ID(st, "text", new="text.new", unlink="text.unlink") diff --git a/release/scripts/startup/bl_ui/space_userpref.py b/release/scripts/startup/bl_ui/space_userpref.py index e34755ae72e..265debd10f4 100644 --- a/release/scripts/startup/bl_ui/space_userpref.py +++ b/release/scripts/startup/bl_ui/space_userpref.py @@ -22,7 +22,7 @@ import os import addon_utils from bpy.props import StringProperty, BoolProperty, EnumProperty - +from blf import gettext as _ def ui_items_general(col, context): """ General UI Theme Settings (User Interface) @@ -126,7 +126,7 @@ class USERPREF_MT_appconfigs(bpy.types.Menu): preset_operator = "wm.appconfig_activate" def draw(self, context): - props = self.layout.operator("wm.appconfig_default", text="Blender (default)") + props = self.layout.operator("wm.appconfig_default", text=_("Blender (default)")) # now draw the presets bpy.types.Menu.draw_preset(self, context) @@ -141,12 +141,12 @@ class USERPREF_MT_splash(bpy.types.Menu): row = split.row() row.label("") row = split.row() - row.label("Interaction:") + row.label(_("Interaction:")) # XXX, no redraws # text = bpy.path.display_name(context.window_manager.keyconfigs.active.name) # if not text: # text = "Blender (default)" - row.menu("USERPREF_MT_appconfigs", text="Preset") + row.menu("USERPREF_MT_appconfigs", text=_("Preset")) class USERPREF_PT_interface(bpy.types.Panel): diff --git a/release/scripts/startup/bl_ui/space_userpref_keymap.py b/release/scripts/startup/bl_ui/space_userpref_keymap.py index 982e19e6234..e99cefb91b8 100644 --- a/release/scripts/startup/bl_ui/space_userpref_keymap.py +++ b/release/scripts/startup/bl_ui/space_userpref_keymap.py @@ -411,8 +411,8 @@ def export_properties(prefix, properties, lines=None): if lines is None: lines = [] - for pname in properties.keys(): - if not properties.is_property_hidden(pname): + for pname in properties.bl_rna.properties.keys(): + if pname != "rna_type" and not properties.is_property_hidden(pname): value = getattr(properties, pname) if isinstance(value, bpy.types.OperatorProperties): export_properties(prefix + "." + pname, value, lines) diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py index 0583dc7e4be..775243a74d2 100644 --- a/release/scripts/startup/bl_ui/space_view3d.py +++ b/release/scripts/startup/bl_ui/space_view3d.py @@ -19,7 +19,6 @@ # <pep8 compliant> import bpy - class VIEW3D_HT_header(bpy.types.Header): bl_space_type = 'VIEW_3D' @@ -685,6 +684,7 @@ class VIEW3D_MT_object(bpy.types.Menu): layout.operator("ed.undo") layout.operator("ed.redo") + layout.operator("ed.undo_history") layout.separator() @@ -1049,6 +1049,7 @@ class VIEW3D_MT_paint_weight(bpy.types.Menu): layout.operator("ed.undo") layout.operator("ed.redo") + layout.operator("ed.undo_history") layout.separator() @@ -1129,6 +1130,7 @@ class VIEW3D_MT_particle(bpy.types.Menu): layout.operator("ed.undo") layout.operator("ed.redo") + layout.operator("ed.undo_history") layout.separator() @@ -1182,6 +1184,7 @@ class VIEW3D_MT_pose(bpy.types.Menu): layout.operator("ed.undo") layout.operator("ed.redo") + layout.operator("ed.undo_history") layout.separator() @@ -1373,6 +1376,7 @@ class VIEW3D_MT_edit_mesh(bpy.types.Menu): layout.operator("ed.undo") layout.operator("ed.redo") + layout.operator("ed.undo_history") layout.separator() @@ -1844,6 +1848,7 @@ class VIEW3D_MT_edit_meta(bpy.types.Menu): layout.operator("ed.undo") layout.operator("ed.redo") + layout.operator("ed.undo_history") layout.separator() diff --git a/release/scripts/startup/bl_ui/space_view3d_toolbar.py b/release/scripts/startup/bl_ui/space_view3d_toolbar.py index 503a1d806ac..3e263876e3d 100644 --- a/release/scripts/startup/bl_ui/space_view3d_toolbar.py +++ b/release/scripts/startup/bl_ui/space_view3d_toolbar.py @@ -19,7 +19,6 @@ # <pep8 compliant> import bpy - class View3DPanel(): bl_space_type = 'VIEW_3D' bl_region_type = 'TOOLS' diff --git a/release/windows/installer/00.sconsblender.nsi b/release/windows/installer/00.sconsblender.nsi index 42a9b1c13b6..eddd215c64d 100644 --- a/release/windows/installer/00.sconsblender.nsi +++ b/release/windows/installer/00.sconsblender.nsi @@ -205,6 +205,8 @@ Section "Uninstall" ; Remove files [DELROOTDIRCONTS] + [DELDATAFILES] + [DELDATADIRS] Delete "$INSTDIR\uninstall.exe" @@ -212,13 +214,14 @@ Section "Uninstall" RMDir /r "$BLENDERCONFIG\$SHORTVERSION" ${Endif} + ; Remove install directory if it's empty + RMDir $INSTDIR ; Remove shortcuts Delete "$SMPROGRAMS\Blender Foundation\Blender\*.*" Delete "$DESKTOP\Blender.lnk" ; Remove all link related directories and files - RMDir /r "$SMPROGRAMS\Blender Foundation" - ; Clear out installation dir - RMDir /r "$INSTDIR" + RMDir "$SMPROGRAMS\Blender Foundation\Blender" + RMDir "$SMPROGRAMS\Blender Foundation" System::Call 'shell32.dll::SHChangeNotify(i, i, i, i) v (0x08000000, 0, 0, 0)' ; Refresh icons SectionEnd |